Ignore:
Timestamp:
Feb 28, 2011, 12:53:47 PM (13 years ago)
Author:
cljosse
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/edit_gmaps/admin/admin_edit_meta.php

    r9377 r9412  
    44load_language('lang', dirname(__FILE__).'/../');
    55$admin_url = PHPWG_ROOT_PATH.'admin.php';
    6 
    7 
    8 
    96if ( !isset($_GET['cat']) )   $_GET['cat'] = 'caddie';
    107$_GET['mode'] = 'map';
     
    2017
    2118/***********************************************************************************/
    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/");
    2320  if (!defined('INCLUDE_PATH')) define(  'INCLUDE_PATH',   TOOL_KIT_PATH.'include/' );                     
    2421  $Toolkit_Dir =INCLUDE_PATH           ;   
    2522
    26    include $Toolkit_Dir . 'fonctions.php';
     23   include_once $Toolkit_Dir . 'fonctions.php';
    2724/***********************************************************************************/
    2825
     
    5552  }
    5653
    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 )  {
    6257                $lat = trim($_POST['lat']);
    6358                $lon = trim($_POST['lon']);
     
    7166                  else
    7267                        $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 )
    7569                  $update_query = 'lat=NULL, lon=NULL';
    7670                else
     
    9286                  cl_meta_invalidate_cache();
    9387                }
    94           }
    95         }
    96 }
     88          } 
     89
     90        }// fin test update
     91
     92} // fin post
    9793
    9894
     
    180176
    181177//==========================================================
    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;
    184180    $plg_data = implode( '', file($path.'main.inc.php') );
    185181         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'] ;
    189185            $icon_path = 'themes/default/icon/help.png';
    190186            $path_js=  'themes/default/js/' ;
     
    194190if ( isset($_POST['submit'])   )
    195191{       
     192
     193  if ($_POST['submit']==l10n('update') )
     194   {
     195      $_POST['selection']=array(); 
     196      $collection =array();
     197          unset($collection);
     198  }
    196199
    197200  if ($_POST['submit']==l10n('Submit') )
     
    214217$src="";
    215218$template->assign(
    216     array(      'EDIT_RV_PATH' => EDIT_RV_PATH,
     219    array(      'EDIT_CL_PATH' => EDIT_CL_PATH,
    217220                'path_js' => $path_js,
    218221            'VERSION'=> $version,
    219             'EDIT_RV_PATH_ABS' => dirname(__FILE__).'/',
     222            'EDIT_CL_PATH_ABS' => dirname(__FILE__).'/',
    220223              )
    221224  );
Note: See TracChangeset for help on using the changeset viewer.