Changeset 9412 for extensions/edit_gmaps/admin/admin_edit_meta.php
- Timestamp:
- Feb 28, 2011, 12:53:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/edit_gmaps/admin/admin_edit_meta.php
r9377 r9412 4 4 load_language('lang', dirname(__FILE__).'/../'); 5 5 $admin_url = PHPWG_ROOT_PATH.'admin.php'; 6 7 8 9 6 if ( !isset($_GET['cat']) ) $_GET['cat'] = 'caddie'; 10 7 $_GET['mode'] = 'map'; … … 20 17 21 18 /***********************************************************************************/ 22 if (!defined('TOOL_KIT_PATH')) define( 'TOOL_KIT_PATH', EDIT_ RV_PATH."admin/");19 if (!defined('TOOL_KIT_PATH')) define( 'TOOL_KIT_PATH', EDIT_CL_PATH."admin/"); 23 20 if (!defined('INCLUDE_PATH')) define( 'INCLUDE_PATH', TOOL_KIT_PATH.'include/' ); 24 21 $Toolkit_Dir =INCLUDE_PATH ; 25 22 26 include $Toolkit_Dir . 'fonctions.php';23 include_once $Toolkit_Dir . 'fonctions.php'; 27 24 /***********************************************************************************/ 28 25 … … 55 52 } 56 53 57 // test si mise à jour (valider) 58 if ( isset($_POST['submit']) and $_POST['submit'] == l10n('Submit') ) 59 { 60 if ( count($collection)>0 ) 61 { 54 //**************** mise a jour de la base de données ************************** 55 if ( $_POST['submit'] == l10n('update_database') ) { 56 if ( count($collection)>0 ) { 62 57 $lat = trim($_POST['lat']); 63 58 $lon = trim($_POST['lon']); … … 71 66 else 72 67 $page['errors'][] = 'Invalid lat or lon value'; 73 } 74 elseif ( strlen($lat)==0 and strlen($lon)==0 ) 68 }else if ( strlen($lat)==0 and strlen($lon)==0 ) 75 69 $update_query = 'lat=NULL, lon=NULL'; 76 70 else … … 92 86 cl_meta_invalidate_cache(); 93 87 } 94 } 95 } 96 } 88 } 89 90 }// fin test update 91 92 } // fin post 97 93 98 94 … … 180 176 181 177 //========================================================== 182 if (!defined('EDIT_ RV_PATH')) define( 'EDIT_RV_PATH', EDIT_RV_PATH .'admin/' );183 $path = EDIT_ RV_PATH;178 if (!defined('EDIT_CL_PATH')) define( 'EDIT_CL_PATH', EDIT_CL_PATH .'admin/' ); 179 $path = EDIT_CL_PATH; 184 180 $plg_data = implode( '', file($path.'main.inc.php') ); 185 181 if (preg_match("|Version: (.*)|", $plg_data, $val)) 186 { $EDIT_ RV_PATH_plugin['version'] = trim($val[1]); }187 $EDIT_ RV_PATH_plugin = array_map('htmlspecialchars', $EDIT_RV_PATH_plugin);188 $version= $EDIT_ RV_PATH_plugin['version'] ;182 { $EDIT_CL_PATH_plugin['version'] = trim($val[1]); } 183 $EDIT_CL_PATH_plugin = array_map('htmlspecialchars', $EDIT_CL_PATH_plugin); 184 $version= $EDIT_CL_PATH_plugin['version'] ; 189 185 $icon_path = 'themes/default/icon/help.png'; 190 186 $path_js= 'themes/default/js/' ; … … 194 190 if ( isset($_POST['submit']) ) 195 191 { 192 193 if ($_POST['submit']==l10n('update') ) 194 { 195 $_POST['selection']=array(); 196 $collection =array(); 197 unset($collection); 198 } 196 199 197 200 if ($_POST['submit']==l10n('Submit') ) … … 214 217 $src=""; 215 218 $template->assign( 216 array( 'EDIT_ RV_PATH' => EDIT_RV_PATH,219 array( 'EDIT_CL_PATH' => EDIT_CL_PATH, 217 220 'path_js' => $path_js, 218 221 'VERSION'=> $version, 219 'EDIT_ RV_PATH_ABS' => dirname(__FILE__).'/',222 'EDIT_CL_PATH_ABS' => dirname(__FILE__).'/', 220 223 ) 221 224 );
Note: See TracChangeset
for help on using the changeset viewer.