Changeset 17776 for extensions/edit_gmaps/admin/admin_edit.php
- Timestamp:
- Sep 6, 2012, 1:11:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/edit_gmaps/admin/admin_edit.php
r17761 r17776 48 48 if (!isset($page['title'])) $page['title']=""; 49 49 if(!isset($_POST['selectAction'])) $_POST['selectAction']="" ; 50 51 50 //$info_message .= cl_edit_functions::Memo_Vars($_POST); 51 //========== Mode GLOBAL ================================ 52 52 check_input_parameter('selection', $_POST, true, PATTERN_ID); 53 54 53 include (PHPWG_ROOT_PATH.'admin/batch_manager.php'); 54 $tabsheet = new tabsheet(); 55 $tabsheet->assign(); 56 57 58 55 59 56 60 if(isset($page['cat_elements_id'])) … … 58 62 59 63 60 $tabsheet = new tabsheet(); 61 $tabsheet->assign(); 62 63 // $current = $template->get_template_vars('TAB_DATA'); 64 // prefilters,tags 65 66 // $erreur_message .= cl_edit_functions::Memo_Vars( $current); 64 if(isset($_POST)){ 65 // $info_message .= cl_edit_functions::Memo_Vars($_POST); 67 66 68 67 //=============================================================== … … 104 103 105 104 if (count($collection)>0 ) 106 //=============================================================107 105 if (isset($_POST['update']) && $_POST['update']==l10n('update_exif')){ 108 /************* Mise à jour des meta données ***************/ 106 /******************************* 107 * Mise à jour des meta données 108 *******************************/ 109 109 // error_reporting ( 0 ); 110 110 // Hide any unknown EXIF tags … … 138 138 if (array_search($id_0,$image)) { 139 139 //================================================================= 140 // Donnée base de donnée141 //=================================================================142 // $info_message .= "<div style='border:2px solid red'>$id_0 Image:" . cl_edit_functions::Memo_vars($image)."</div>" ;143 144 //=================================================================145 140 // Meta donnée 146 141 //================================================================= … … 169 164 170 165 if( cl_edit_controler::add_meta_gps($new_ps_file_info_array,$image)){ 171 172 $exif = @read_exif_data( $image['path']); 173 $infos_gps = cl_edit_controler::Get_exif_gps( $image['path'],$image,false) ; 174 $info_message .= $image['path'] . " : " . $image['file'] . " : ok<BR />"; 166 $exif = @read_exif_data( $image['path']); 167 $infos_gps = cl_edit_controler::Get_exif_gps( $image['path'],$image,false) ; 168 $info_message .=l10n('update_exif') . ": " . $image['path'] . " : " . $image['file'] . " : ok<BR />"; 175 169 }else{ 176 170 … … 186 180 //====================================================================== 187 181 if ( isset($_POST['submit']) ) { 188 /******** Mise à jour base de données *****/189 182 if ( $_POST['submit'] == l10n('update_database') ){ 183 /************************************************** 184 * Uniquement Mise à jour de la base de données 185 **************************************************/ 190 186 if ( count($collection)>0 ){ 191 187 $lat = trim($_POST['lat']); … … 195 191 if($lat !="") cl_edit_controler::add_data_base($collection,$lat,$lon,$alt) ; 196 192 $_POST['submit'] = l10n('selectAction') ; 197 193 foreach ($collection as $id_0){ 198 194 foreach ($images as $image) { 199 195 if (array_search($id_0,$image)) { … … 207 203 } 208 204 } 209 210 205 /****************************************/ 211 206 $query = ' … … 245 240 $infos_gps = array(); 246 241 $infos_gps = cl_edit_controler::Get_exif_gps( $image['path'],$image,false) ; 247 $v_exif=$infos_gps['is_exif']?"EXIF":" " ;242 $v_exif=$infos_gps['is_exif']?"EXIF":"NO" ; 248 243 $v_db=false ; 249 244 $v_db=$image['lat']!=0 && $image['lon']!=0; 250 $v_db=$v_db?"BD":" ";251 245 $v_db=$v_db?"BD":"NO"; 246 //==== GPS infos -> image infos ==== 252 247 if( $infos_gps['lat'] !=0 || $infos_gps['lon'] !=0 ) { 253 248 $new= ( !isset($image['lat'])? true: $image['lat']!=$infos_gps['lat'] ) ; … … 256 251 $image['alt']=$infos_gps['alt']; 257 252 $sel_img= array($image['id']); 258 if ($new) cl_edit_controler::add_data_base( $sel_img,$image['lat'],$image['lon'],$image['alt']) ; 253 if ($new){ 254 255 cl_edit_controler::add_data_base( $sel_img,$image['lat'],$image['lon'],$image['alt']) ; 256 } 259 257 } 260 258 //================================================= … … 273 271 } 274 272 //================================================= 275 $tpl_var = array_merge( 276 $current[$j], array( 277 'ID' =>$image['id'], 273 274 $TN_SRC= $current[$j]['TN_SRC']; 275 $TITLE=$current[$j]['TITLE'] ; 276 277 $tpl_var = array( 278 'ID' =>$image['id'], 279 'TN_SRC' => $TN_SRC, 280 'FILE' => $current[$j]['FILE'], 281 'TITLE' => $TITLE, 282 'LEVEL' => $current[$j]['LEVEL'], 283 'FILE_SRC' => $current[$j]['FILE_SRC'], 284 'U_EDIT' => $current[$j]['U_EDIT'], 278 285 'lat' => $image['lat'] , 279 286 'lon' => $image['lon'] , 280 'alt' => $image['alt'] , 281 'TN_SRC' => get_thumbnail_url($image), 282 'TITLE' => get_thumbnail_title($image,$name,$desc), 283 'U_EXIF' => $v_exif, 284 'U_BD' => $v_db , 285 'U_MAP' => cl_make_map_picture_url( 286 array( 287 'image_id'=>$image['id'], 288 'image_file'=>$image['file'], 289 ) 290 ) 291 ) 292 ); 293 287 'alt' => $image['alt'] , 288 'U_EXIF' => $v_exif , 289 'U_BD' => $v_db 290 ); 291 292 294 293 $thumbnails[]=$tpl_var; 295 294 $j++; … … 339 338 340 339 if (isset($collection)) { 340 /********************************* 341 * Affichage de la selection 342 *********************************/ 341 343 $init_info =true; 342 344 $first_image=""; … … 454 456 455 457 //======================================================================= 458 459 $v1=0; 460 461 462 } 463 464 if ($info_message!="") 465 $template->assign('infos',$info_message); 466 if ($erreur_message!="") 467 $template->assign('errors',$erreur_message); 468 456 469 function cl_make_map_picture_url($params) 457 470 { … … 462 475 return add_url_params($map_url, array('map'=>null) ); 463 476 } 464 $v1=0;465 466 467 468 469 if ($info_message!="")470 $template->assign('infos',$info_message);471 if ($erreur_message!="")472 $template->assign('errors',$erreur_message);473 474 475 477 ?>
Note: See TracChangeset
for help on using the changeset viewer.