Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
added events geocode field
  • Loading branch information
hmayaktigranyan committed Nov 14, 2012
1 parent 488d0e7 commit e71c68c
Show file tree
Hide file tree
Showing 65 changed files with 2,760 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
/nbproject
134 changes: 134 additions & 0 deletions conf/sysconf.php
@@ -0,0 +1,134 @@
<?php
/**
* The main Openevsys configuration file
*
* PHP version 4 and 5
*
* LICENSE: This source file is subject to LGPL license
* that is available through the world-wide-web at the following URI:
* http://www.gnu.org/copyleft/lesser.html
*
* @package Sahana - http://sahana.sourceforge.net
* @author
* @copyright Lanka Software Foundation - http://www.opensource.lk
*/

######################################################################
# Openevsys Configuration Settings #
######################################################################
#
#

# Specify the name of this Openevsys instance. This should be a unique identifier
# of this instance of Openevsys.
# It has to be a 4 character alphanumeric
$conf['base_uuid'] = 'pnqQrb';

# Disable the access control system
$conf['acl_base'] = false;

# ACL mode refer documentation for more information
$conf['acl_mode'] = 'user';

# Root Name :The owner of the machine
$conf['root_name'] = '';

# Root Email :The email address of the admin
$conf['root_email'] = '';

# Root Telephone :The telephone of the admin
$conf['root_tel'] = '';


##########################
# Database Configuration #
##########################

# specify the host ip address of the database reside.
# if it's the same server that Sahana reside then put 'localhost'
#
$conf['db_host'] = 'localhost';

# port that data base talks. leave blank for default.
#
$conf['db_port'] = '';

# theme that sahana will use todo
#
$conf['theme'] = 'default';

# specify the database name.
#
$conf['db_name'] = 'openevsys';

# specify user name that Sahana can use to connect.
#
$conf['db_user'] = 'root';

# And password for that user.
#
$conf['db_pass'] = 'root';
#debug variable
# true/false
$conf['debug'] = false;


# Session writer
# enter your database name here.
#
$conf['session_writer'] = 'adodb' ;
$conf['session_name']='OESSESS';

# Sahana uses data base abstraction layer for connecting to data base.
# specify the Database Abstraction Layer Library Name here.
# Database Abstraction Layer Libraries are reside in
# /inc/lib_database/db_libs/
# The name should be same as the library folder
#
$conf['dbal_lib_name'] = 'adodb' ;

# mention the database engine name
# @todo Find supported engine list
# for the moment, Sahana supported and tested on PostgreSQL and MySql
#
# $conf['db_engine'] = 'postgres';
$conf['db_engine'] = 'mysql';

#specify the mysql engine to be used
$conf['storage_engine'] = '';


# @todo Look into the database caching directories etc
# This is a testing feature.
#
$conf['enable_cache'] = false;
$conf['cache_dir'] = 'cache/db_cache';

# Default locale
#
$conf['locale'] = 'en';
#options gettext & php-gettext
$conf['locale_lib'] = 'gettext';
#don't change this unless you know what you are doing
$conf['fb_locale'] = 'en';


$conf['custom_form']=true;
$conf['related_search'] = false;


# File upload configuration
#
$conf['media_dir'] ='../media/';
# mode should be a number not a string
$conf['media_mode'] = 0777;


# Authentication
#$conf['auth']['type'] = 'cas';
#$conf['auth']['host'] = 'localhost';
#$conf['auth']['port'] = 8080;
#$conf['auth']['app'] = 'cas-server-webapp-3.3.5';

//session timeout in minuts
$conf['session_timeout']= 60;
54 changes: 54 additions & 0 deletions inc/lib_form.inc
Expand Up @@ -1095,3 +1095,57 @@ function shn_form_address($label,$name,$extra_opts)
<?php
}
}


function shn_form_location($label,$name,$extra_opts)
{
//var_dump($extra_opts);exit;

$value = (isset($_POST[$name])? $_POST[$name] : $extra_opts['value']);
//to prevent warnings set $options to array() if it is null
$options=($options==null)?array():$options;

if(isset($label)){
?>
<label for="<?php echo $name?>"><?php echo $label?></label>
<?php } ?>
<div class="locationFieldsConatiner">
<input type="hidden" name="latitude" id="latitude" value="">
<input type="hidden" name="longitude" id="longitude" value="">
<input type="hidden" name="country_name" id="country_name" value="Armenia" />
<input type="hidden" name="incident_zoom" id="incident_zoom" value="" />

<div id="mapContainer"></div>
<div class="findLocation">
<div id="editContainer" class="olControlEditingToolbar"></div>
<div class="locationButtons" >
<ul >
<li><a href="#" class="locationButtonsLast" onclick="return false;">DELETE LAST</a></li>
<li><a href="#" class="locationButtonsDelete" onclick="return false;">DELETE SELECTED</a></li>
<li><a href="#" class="locationButtonsClear" onclick="return false;">CLEAR MAP</a></li>
</ul>
</div>
<div style="clear:both;"></div>
<input type="text" id="locationFind" name="location_find" value="" title="City, State and/or Country" class="findtext" />
<div style="float:left;margin:9px 0 0 5px;">
<input type="button" name="button" id="button" value="Find Location" class="buttonFind" />
</div>
<div id="findLoading" class="findLoading"></div>
<div style="clear:both;" id="find_text">* Search for your location using a location name OR latitude,longitude coordinates (format: 38.19, 85.61), OR click on the map to pinpoint the correct location..</div>
</div>
</div>
<script type="text/javascript">
jQuery(window).load(function() {
initEditMap();
});
</script>
<?php
if($extra_opts['clari']){
if(is_array($extra_opts['clari_value'])&&count($extra_opts['clari_value']) > 0)
$clari_value = array_pop($extra_opts['clari_value']);
shn_form_clari($name,$clari_value);
}

shn_form_extra_opts($extra_opts);

}
10 changes: 5 additions & 5 deletions mod/analysis/analysisModule.class.php
Expand Up @@ -1319,8 +1319,8 @@ public function act_load_grid(){
global $global;
include_once 'searchSql.php';

$page = $_GET['page'];
$limit = $_GET['rows'];
$page = (int)$_GET['page'];
$limit = (int)$_GET['rows'];
$sidx = $_GET['sidx'];
$sord = $_GET['sord'];

Expand Down Expand Up @@ -1353,14 +1353,14 @@ public function act_load_grid(){

$searchSql = new SearchResultGenerator();
$sqlArray = $searchSql->sqlForJsonQuery($_GET['query']);
//var_dump($sqlArray);
//var_dump($sqlArray);exit;
//$count_query = $sqlArray['count'];
$count_query = "SELECT COUNT(*) FROM ({$sqlArray['result']}) as results";

try{
$res_count = $global['db']->Execute($count_query);
}catch( Exception $e){
$response->error = $e->getMessage();
$response->error = "error";//$e->getMessage();
$res_count = null;
}

Expand Down Expand Up @@ -1393,7 +1393,7 @@ public function act_load_grid(){
try{
$res = $global['db']->Execute($sql);
}catch( Exception $e){
$response->error = $e->getMessage();
$response->error = "error";//$e->getMessage();
}

$response->page = $page; // current page
Expand Down
4 changes: 3 additions & 1 deletion tpls/html_responce.php
Expand Up @@ -50,7 +50,9 @@

<script type="text/javascript" src="res/js/jwysiwyg/jquery.wysiwyg.js"></script>
<script type="text/javascript" src="res/jquery/jquery.ajaxhelptextviewer.js"></script>

<script type="text/javascript" src="res/openlayers/OpenLayers.js"></script>
<script type="text/javascript" src="res/openlayers/map.js"></script>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?v=3.7&amp;sensor=false"></script>
</head>
<body>
<div id="container">
Expand Down

0 comments on commit e71c68c

Please sign in to comment.