Permalink
Browse files

added events geocode field

  • Loading branch information...
1 parent 488d0e7 commit e71c68c2b183add23a0e23590b40b8a7107f7b18 @hmayaktigranyan hmayaktigranyan committed Nov 14, 2012
Showing with 2,760 additions and 6 deletions.
  1. +1 −0 .gitignore
  2. +134 −0 conf/sysconf.php
  3. +54 −0 inc/lib_form.inc
  4. +5 −5 mod/analysis/analysisModule.class.php
  5. +3 −1 tpls/html_responce.php
  6. +1,384 −0 www/res/openlayers/OpenLayers.js
  7. BIN www/res/openlayers/img/404.png
  8. +25 −0 www/res/openlayers/img/LICENSE.txt
  9. BIN www/res/openlayers/img/add_point_off.png
  10. BIN www/res/openlayers/img/add_point_on.png
  11. BIN www/res/openlayers/img/blank.gif
  12. BIN www/res/openlayers/img/close.gif
  13. BIN www/res/openlayers/img/cloud-popup-relative.png
  14. BIN www/res/openlayers/img/drag-rectangle-off.png
  15. BIN www/res/openlayers/img/drag-rectangle-on.png
  16. BIN www/res/openlayers/img/draw_line_off.png
  17. BIN www/res/openlayers/img/draw_line_on.png
  18. BIN www/res/openlayers/img/draw_point_off.png
  19. BIN www/res/openlayers/img/draw_point_on.png
  20. BIN www/res/openlayers/img/draw_polygon_off.png
  21. BIN www/res/openlayers/img/draw_polygon_on.png
  22. BIN www/res/openlayers/img/east-mini.png
  23. BIN www/res/openlayers/img/editing_tool_bar.png
  24. BIN www/res/openlayers/img/label-maximize.png
  25. BIN www/res/openlayers/img/layer-switcher-maximize.png
  26. BIN www/res/openlayers/img/layer-switcher-minimize.png
  27. BIN www/res/openlayers/img/loading.gif
  28. BIN www/res/openlayers/img/loading_g.gif
  29. BIN www/res/openlayers/img/marker-blue.png
  30. BIN www/res/openlayers/img/marker-gold.png
  31. BIN www/res/openlayers/img/marker-green.png
  32. BIN www/res/openlayers/img/marker.png
  33. BIN www/res/openlayers/img/measuring-stick-off.png
  34. BIN www/res/openlayers/img/measuring-stick-on.png
  35. BIN www/res/openlayers/img/move_feature_off.png
  36. BIN www/res/openlayers/img/move_feature_on.png
  37. BIN www/res/openlayers/img/navigation_history.png
  38. BIN www/res/openlayers/img/north-mini.png
  39. BIN www/res/openlayers/img/overview_replacement.gif
  40. BIN www/res/openlayers/img/pan-panel-NOALPHA.png
  41. BIN www/res/openlayers/img/pan-panel.png
  42. BIN www/res/openlayers/img/pan_off.png
  43. BIN www/res/openlayers/img/pan_on.png
  44. BIN www/res/openlayers/img/panning-hand-off.png
  45. BIN www/res/openlayers/img/panning-hand-on.png
  46. BIN www/res/openlayers/img/remove_point_off.png
  47. BIN www/res/openlayers/img/remove_point_on.png
  48. BIN www/res/openlayers/img/ruler.png
  49. BIN www/res/openlayers/img/save_features_off.png
  50. BIN www/res/openlayers/img/save_features_on.png
  51. BIN www/res/openlayers/img/slider.png
  52. BIN www/res/openlayers/img/south-mini.png
  53. BIN www/res/openlayers/img/view_next_off.png
  54. BIN www/res/openlayers/img/view_next_on.png
  55. BIN www/res/openlayers/img/view_previous_off.png
  56. BIN www/res/openlayers/img/view_previous_on.png
  57. BIN www/res/openlayers/img/west-mini.png
  58. BIN www/res/openlayers/img/zoom-minus-mini.png
  59. BIN www/res/openlayers/img/zoom-panel-NOALPHA.png
  60. BIN www/res/openlayers/img/zoom-panel.png
  61. BIN www/res/openlayers/img/zoom-plus-mini.png
  62. BIN www/res/openlayers/img/zoom-world-mini.png
  63. BIN www/res/openlayers/img/zoombar.png
  64. +533 −0 www/res/openlayers/map.js
  65. +621 −0 www/theme/default/screen.css
View
@@ -0,0 +1 @@
+/nbproject
View
@@ -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;
View
@@ -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);
+
+}
@@ -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'];
@@ -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;
}
@@ -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
View
@@ -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">
Oops, something went wrong.

0 comments on commit e71c68c

Please sign in to comment.