Changeset 7132 for extensions/GMaps/gmaps_aip.class.inc.php
- Timestamp:
- Oct 9, 2010, 12:28:05 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GMaps/gmaps_aip.class.inc.php
r7128 r7132 50 50 l10n('gmaps_associate_category_maps'), 51 51 $this->getAdminLink()."&fGMaps_tabsheet=category_maps"); 52 /*53 52 $this->tabsheet->add('kml_files', 54 53 l10n('gmaps_kml_files_management'), 55 $this->getAdminLink()."&fGMaps_tabsheet=kml_files"); */54 $this->getAdminLink()."&fGMaps_tabsheet=kml_files"); 56 55 $this->tabsheet->add('search', 57 56 l10n('gmaps_search'), … … 128 127 129 128 $template->assign('plugin', $template_plugin); 129 130 if($_REQUEST['errcode']!='') 131 { 132 $template->assign('errcode', l10n('gmaps_error_code_'.$_REQUEST['errcode'])); 133 } 134 130 135 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 131 136 … … 144 149 { 145 150 //initialise $REQUEST values if not defined 151 152 if(!isset($_REQUEST['errcode'])) $_REQUEST['errcode']=''; 146 153 147 154 if(!isset($_REQUEST['fGMaps_tabsheet'])) … … 227 234 'maps' => $this->makeMapsList(), 228 235 'icons' => $this->makeIconsList(), 236 'kmlFiles' => $this->makeKmlFilesList() 229 237 ); 230 238 $template->assign('datas', $datas); … … 242 250 global $template; 243 251 244 /*$template->set_filename('body_page', 245 dirname($this->getFileLocation()).'/admin/plugin_admin_maps.tpl'); 246 247 248 $template->assign_var_from_handle('GMAPS_BODY_PAGE', 'body_page');*/ 252 $template->set_filename('body_page', 253 dirname($this->getFileLocation()).'/admin/gmaps_kmlfiles.tpl'); 254 255 $datas=Array( 256 'urlRequest' => $this->getAdminLink('ajax'), 257 ); 258 $template->assign('datas', $datas); 259 260 $template->assign_var_from_handle('GMAPS_BODY_PAGE', 'body_page'); 249 261 } 250 262 … … 370 382 371 383 return($returned); 372 } //make CategoriesTree384 } //makeMapsList 373 385 374 386 … … 395 407 396 408 return($returned); 409 } //makeIconsList 410 411 412 /** 413 * build the kml files list 414 * @return Array : an array, ready to use in the template 415 */ 416 private function makeKmlFilesList() 417 { 418 $returned=array(); 419 420 $sql="SELECT id, name 421 FROM ".$this->tables['kmlfiles']." 422 ORDER BY name, id"; 423 $result = pwg_query($sql); 424 if($result) 425 { 426 while($row = pwg_db_fetch_assoc($result)) 427 { 428 $returned[]=$row; 429 } 430 } 431 432 return($returned); 397 433 } //makeCategoriesTree 398 434 399 400 435 } //class 401 436
Note: See TracChangeset
for help on using the changeset viewer.