Changeset 20034 for extensions/edit_gmaps/admin
- Timestamp:
- Jan 10, 2013, 9:55:42 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/edit_gmaps/admin/admin_edit.php
r18635 r20034 53 53 //========== Mode GLOBAL ================================ 54 54 55 55 56 check_input_parameter('selection', $_POST, true, PATTERN_ID); 56 57 include (PHPWG_ROOT_PATH.'admin/batch_manager.php'); 57 58 $tabsheet = new tabsheet(); 58 $tabsheet->assign(); 59 60 59 $tabsheet->assign(); 61 60 62 61 if(isset($page['cat_elements_id'])) 63 62 $template->concat('TABSHEET_TITLE', ' '.l10n_dec('%d image', '%d images', count($page['cat_elements_id'])).' - '.$page['title']); 64 63 65 64 66 65 if(isset($_POST)){ 67 // $info_message .= cl_edit_functions::Memo_Vars($_POST); 68 66 // $info_message .= cl_print_var($_POST); 69 67 //=============================================================== 70 68 $collection = array(); … … 103 101 $adresse = $lang_info['country']; ; 104 102 $adresse=str_replace("/",", ",$adresse); 105 103 global $EDIT_CL_parametres ; 104 105 $EDIT_CL_parametres = cl_edit_controler::cl_edit_Get_Options(); 106 107 108 $template->assign( 'coordinates', 109 array( 'FILE' => '', 110 'LAT' => ($EDIT_CL_parametres->lat =='')?'100': $EDIT_CL_parametres->lat, 111 'LON' => ($EDIT_CL_parametres->lon =='')?'100': $EDIT_CL_parametres->lon , 112 'ADRESSE' => ($EDIT_CL_parametres->adress =='')?$adresse: $EDIT_CL_parametres->adress , 113 'ZOOM' => 18, 114 'ALT' => $EDIT_CL_parametres->alt =='' ?0: $EDIT_CL_parametres->alt 115 ) 116 ); 117 106 118 if (count($collection)>0 ) 107 119 if ( isset($_POST['update']) && ( $_POST['update']==l10n('update_exif') || $_POST['update'] == l10n('update_all') )){ … … 299 311 $j++ ; 300 312 } else{ 301 // $info_message .= cl_ edit_functions::Memo_Vars($current[$j]);313 // $info_message .= cl_print_var($current[$j]); 302 314 break ; 303 315 } … … 342 354 $match=""; 343 355 if ( isset($_POST['submit']) ) { 344 356 if ( isset($_POST['match']) && $_POST['match']!='' ){ 357 cl_edit_controler::cl_edit_Set_Options(); 358 cl_edit_controler::cl_edit_sauve_options_inf(); 359 } 345 360 if ($_POST['submit']==l10n('selection') ) { 346 361 $collection =$_POST['selection']; 347 362 } 363 348 364 if ($_POST['submit']==l10n('add') ) { 349 365 $_POST['selection']=array(); … … 359 375 //================================================================================= 360 376 $src=""; 361 $template->assign( 'coordinates', 362 array( 'FILE' => '', 363 'LAT' => '100', 364 'LON' => '100', 365 'ADRESSE' => $adresse, 366 'ZOOM' => 18, 367 'ALT' => 0 368 ) 369 ); 377 370 378 //====================================================================== 371 379 if (isset($_POST['submit']) and $_POST['submit']==l10n('selection' )){ … … 387 395 $infos_gps = cl_edit_controler::Get_exif_gps( $image['path'],$image,false,false) ; 388 396 389 if(isset($infos_gps['lat']) && $infos_gps['is_exif']){ 390 //======= test affichage BD ================ 391 if($image['lat']=='' || $image['lon']==''){ 397 398 399 400 if( ($image['lat']=='' || $image['lon']=='')|| $EDIT_CL_parametres->check_exif=='on' ) { 401 if(isset($infos_gps['lat']) && $infos_gps['is_exif']){ 392 402 $image['lat']=$infos_gps['lat']; 393 403 $image['lon']=$infos_gps['lon']; 394 $image['alt']=$infos_gps['alt']; 395 } 396 } 404 $image['alt']=$infos_gps['alt']; 405 } 406 } 407 if($image['lat'] <> ''){ 408 $lon=$image['lon']; 409 $lat=$image['lat']; 410 $alt=$image['alt']; 411 } 397 412 //========================================== 398 399 if ( $init_info && $image['lat'] <> '' ) { 400 401 $init_info = false ; 402 $lat = ($image['lat'] <> '') ? $image['lat'] : '100' ; 403 $lon = ($image['lon'] <> '') ? $image['lon'] : '3.0' ; 404 $alt = ($image['alt'] <> '') ? $image['alt'] : '0' ; 405 413 if ( $init_info && $image['lat'] <> '' ) { 414 $init_info = false ; 406 415 //===================================================== 407 416 $template->assign( 'coordinates', … … 417 426 } 418 427 //===================================================== 419 $lon=$image['lon']; 420 $lat=$image['lat']; 428 429 430 431 432 421 433 $lonDMS= dec2dms($lon) ; 422 434 $latDMS= dec2dms($lat) ; … … 456 468 //============================================================ 457 469 if ( !empty($first_image)) { 458 $erreur_message .= cl_ edit_functions::Memo_Vars($first_image);470 $erreur_message .= cl_print_var($first_image); 459 471 460 472 if (isset($_POST['update'])) {
Note: See TracChangeset
for help on using the changeset viewer.