Index: tensions/edit_gmaps/admin/admin_edit_meta.php
===================================================================
--- /extensions/edit_gmaps/admin/admin_edit_meta.php	(revision 17761)
+++ 	(revision )
@@ -1,505 +1,0 @@
-<?php 
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-global $lang;
-load_language('lang', dirname(__FILE__).'/../');
-$admin_url = PHPWG_ROOT_PATH.'admin.php';
-if ( !isset($_GET['cat']) )   $_GET['cat'] = 'caddie';
-$_GET['mode'] = 'map';
- include (PHPWG_ROOT_PATH.'admin/element_set.php');
- 
-
- 				
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-
-/***********************************************************************************/
-  if (!defined('TOOL_KIT_PATH')) define(  'TOOL_KIT_PATH',   EDIT_CL_PATH."admin/");
-  if (!defined('INCLUDE_PATH')) define(  'INCLUDE_PATH',   TOOL_KIT_PATH.'include/' );                      
-  $Toolkit_Dir =INCLUDE_PATH           ;   
-
-   include_once $Toolkit_Dir . 'fonctions.php';
-/***********************************************************************************/
-
- 
-$template->concat('TABSHEET_TITLE', ' '.l10n_dec('%d image', '%d images', count($page['cat_elements_id'])).' - '.$page['title']);
-
-
-if ( isset($_POST['submit'])  )
-{
-  $collection = array();
-  if( !isset ($_POST['target']))
-  {
-        $_POST['submit'] == l10n('Submit') ;
-        $_POST['target']='selection';
-        $collection = $_POST['selection'];
-
-  }
-
-  switch ($_POST['target'])
-  {
-    case 'all' :
-      $collection = $page['cat_elements_id'];
-      break;
-    case 'selection' :
-      if (!isset($_POST['selection']) or count($_POST['selection']) == 0)
-        array_push($page['errors'], l10n('Select at least one picture'));
-      else
-        $collection = $_POST['selection'];
-      break;
-  } 
-
-/*********************************** 
-mise a jour de la base de donnees 
-***********************************/ 
-  if (  $_POST['submit'] == l10n('update_database') ) {
-	  if ( count($collection)>0 )  {
-		$lat = trim($_POST['lat']);
-		$lon = trim($_POST['lon']);
-        $alt = trim($_POST['alt']);
- 
-		if ( strlen($lat)>0 and strlen($lon)>0 )
-		{
-		  if ( (double)$lat<=90 and (double)$lat>=-90
-			  and (double)$lon<=180 and (double)$lat>=-180 )
-			$update_query = 'lat='.$lat.', lon='.$lon;
-		  else
-			$page['errors'][] = 'Invalid lat or lon value';
-		}else if ( strlen($lat)==0 and strlen($lon)==0 )
-		  $update_query = 'lat=NULL, lon=NULL';
-		else
-		  $page['errors'][] = 'Both lat/lon must be empty or not empty';
-
-        if ( strlen($alt)==0) 
-             $update_query .= ', alt=NULL';
-          else
-             $update_query .= ', alt=' .$alt ;
-
-
-
-		if (isset($update_query))
-		{
-		  $update_query = '
-			UPDATE '.IMAGES_TABLE.' SET '.$update_query.'
-			WHERE id IN ('.implode(',',$collection).')';
-		  pwg_query($update_query);
-		  cl_meta_invalidate_cache();
-		}
-	  }  
-
-	}// fin test update
-
-} // fin post
-
-
-$template->append(
-  'specials',
-  array(
-		$admin_url.get_query_string_diff(array('start','cat')).'&amp;cat=caddie' => l10n('Caddie')
-    ),
-	true
-  );
-
-$query = '
-SELECT id,name,uppercats,global_rank
-  FROM '.CATEGORIES_TABLE.'
-;';
-$result = pwg_query($query);
-$categories = array();
-$selecteds = array();
-if (!empty($result))
-{
-  while ($row = mysql_fetch_assoc($result))
-  {
-    $url = $admin_url.get_query_string_diff(array('start','cat')).'&amp;cat='.$row['id'];
-    if ( $row['id']==$_GET['cat'] ) $selecteds[] = $url;
-    $row['id']=$url;
-    array_push($categories, $row);
-  }
-}
-usort($categories, 'global_rank_compare');
-
-display_select_categories($categories, $selecteds, 'categories', true);
-
-if (!empty($_GET['display']))
-{
-  if ('all' == $_GET['display'])
-    $page['nb_images'] = count($page['cat_elements_id']);
-  else
-    $page['nb_images'] = intval($_GET['display']);
-}
-else
-  $page['nb_images'] = 20;
-
-if ( !empty($page['cat_elements_id']) )
-{
-  $nav_bar = create_navigation_bar(
-    $admin_url.get_query_string_diff(array('start')),
-    count($page['cat_elements_id']),
-    $page['start'],
-    $page['nb_images']
-    );
-  $template->assign('navbar', $nav_bar);
-}
-
-$images=array();
-if ( !empty($page['cat_elements_id']) )
-{
-  $query='
-SELECT id,tn_ext,name,path,file,lat,lon,alt FROM '.IMAGES_TABLE.'
-  WHERE id IN ('.implode(',',$page['cat_elements_id']).')
-  '.$conf['order_by'].'
-  LIMIT '.$page['start'].', '.$page['nb_images'].'
-;';
-  $result = pwg_query($query);
-  while ( $row=mysql_fetch_assoc($result) )
-    $images[] = $row;
-}
-
-foreach ($images as $image)
-{
-	$tpl_var = array_merge( $image,
-      array(
-        'U_TN' => get_thumbnail_url($image),
-        'TITLE' => get_thumbnail_title($image)
-      )
-    );
-  if ( isset($image['lat']) )
-    $tpl_var['U_MAP'] = cl_make_map_picture_url( array('image_id'=>$image['id'], 'image_file'=>$image['file']) );
-	$template->append('thumbnails', $tpl_var);
-}
-
-$template->assign(
-    array(
-      'U_DISPLAY'=> $admin_url.get_query_string_diff(array('display'))
-    ) 
-  );
-
-//==========================================================
-	if (!defined('EDIT_CL_PATH')) define(  'EDIT_CL_PATH',  EDIT_CL_PATH .'admin/' ); 
-	$path = EDIT_CL_PATH;
-    $plg_data = implode( '', file($path.'main.inc.php') );
-	 if (preg_match("|Version: (.*)|", $plg_data, $val))
-          { $EDIT_CL_PATH_plugin['version'] = trim($val[1]);  }  
-            $EDIT_CL_PATH_plugin = array_map('htmlspecialchars', $EDIT_CL_PATH_plugin); 
-            $version= $EDIT_CL_PATH_plugin['version'] ;
-            $icon_path = 'themes/default/icon/help.png';
-            $path_js=  'themes/default/js/' ; 
-
-//==================================================================================
-$match="";  
-if ( isset($_POST['submit'])   )
-{ 	 
-
-  if ($_POST['submit']==l10n('update') )
-   {
-      $_POST['selection']=array();  
-      $collection =array(); 
-	  unset($collection); 
-  }
-
-  if ($_POST['submit']==l10n('Submit') )
-   {
-      $_POST['selection']=array();  
-      $collection =array(); 
-	  unset($collection); 
-  }
- 
-
- if ($_POST['submit']==l10n('reset' ) )
-		{
-			$_POST['selection']=array();
-			unset($collection);
-		}
- 
-
- }
-//=================================================================================
-$src="";
-$template->assign(
-    array(	'EDIT_CL_PATH' => EDIT_CL_PATH,
-	        'path_js' => $path_js,
-            'VERSION'=> $version,
-            'EDIT_CL_PATH_ABS' => dirname(__FILE__).'/',
-	      ) 
-  );
-  global $lang_info;
-if (date_default_timezone_get()) { $adresse =  date_default_timezone_get()   ;}
-else{
-
-}
-$adresse =  $lang_info['country'];   ;
-$adresse=str_replace("/",", ",$adresse);
-$template->assign( 'coordinates',
-				                   array('LAT' => '100',
-										 'LON' => '100',
-										 'ADRESSE' => $adresse,
-										 'ZOOM' => 18,
-                                         'ALT' => 0
-										)
-									); 
-                                    $filename ="";
-
-if (isset($_POST['submit']) and $_POST['submit']==l10n('selection' ))
-{
-    if (isset($collection))	
-        {  $lat =1000;
-            foreach ($collection as $id_0)  {
-  		        foreach ($images as $image)  {
-   			        if (array_search($id_0,$image)) { 
-			            $_POST['selection'] = $collection ;   
-                      
-                        $infos_gps=  Get_exif_gps( $image['path'],$image) ;    
-                        if( $image['lat'] == ''){  
-                                $image['lat']=$infos_gps['lat'];
-                                $image['lon']=$infos_gps['lon'];
-                                $image['alt']=$infos_gps['alt'];
-                            }else {
-                                $image['lat']=$infos_gps['lat'];
-                                $image['lon']=$infos_gps['lon'];
-                                $image['alt']=$infos_gps['alt'];
-                            }       
-      $filename=  $image;
-    
-         
-		if ($lat==1000) {
-			    $lat= ($image['lat'] <> '') ? $image['lat'] : '100'  ;
-				$lon= ($image['lon']  <> '') ? $image['lon'] : '3.0'  ;
-                $alt= ($image['alt']  <> '') ? $image['alt'] : '0'  ;
-				if($lat != '100') $lat=$image['lat'];
- 				//=====================================================
-				$template->assign( 'coordinates',
-				                   array('LAT' =>   $lat  ,
-										 'LON' =>   $lon  ,
-										 'ADRESSE' =>  $adresse ,
-										 'ZOOM' => 4,
-                                         'ALT' =>   $alt ,
-										)
-									);
-				}
-                $lonDMS= dec2dms($lon) ;
-                $latDMS= dec2dms($lat) ;
-                if ($infos_gps['lat']=="")
-                  $icon='icon/minus.png';
-                  else $icon='icon/minus.png';
-
-			    $tpl_var = array_merge( 
-			            $image,
-      					array(
-                           'icon' => $icon ,
-						   'lat'  =>    $image['lat']    ,
-						   'lon' =>     $image['lon']    ,
-                           'alt' =>     $image['alt']    , 
-                           'latDMS' =>    $latDMS[3]     ,
-                           'lonDMS' =>   $lonDMS[3]     ,
-						   'adresse' =>  $adresse   ,
-        					'U_TN' => get_thumbnail_url($image),
-        					'TITLE' => get_thumbnail_title($image),
-							'U_MAP' => cl_make_map_picture_url(
-							                                    array(
-							                                         'image_id'=>$image['id'],
-							                                         'image_file'=>$image['file'],
-							                                         ) 
-
-      						                                    ),
-								)  								
-    						);
-	 
-				$template->append('Selectthumbnails', $tpl_var);			
-			}
-		}	
-	}
-  }
-
-} 
-
-
- if ( !empty($filename))
- {
-// document.Envoie.latDMS.value
-        $image= $filename ;
-        $filename= $filename['path'] ;
-        $Val_exif="";
-        $Val_XMP="";    
-          // error_reporting ( 0 );
-  // Hide any unknown EXIF tags
-/*
- $GLOBALS['HIDE_UNKNOWN_TAGS'] = FALSE;
-   include $Toolkit_Dir . 'Toolkit_Version.php';          // Change: added as of version 1.11
-   include $Toolkit_Dir . 'JPEG.php';                     // Change: Allow this example file to be easily relocatable - as of version 1.11
-   include $Toolkit_Dir . 'JFIF.php';
-   include $Toolkit_Dir . 'PictureInfo.php';
-   include $Toolkit_Dir . 'XMP.php';
-   include $Toolkit_Dir . 'Photoshop_IRB.php';
-   include $Toolkit_Dir . 'EXIF.php';
-  
-        $jpeg_header_data = get_jpeg_header_data($filename ); 
-     */   
-     if (!empty($infos_gps)) 
-     $Position = $infos_gps ;
-
-     else  $Position =  Get_exif_gps($filename,$image) ;
-
-
-
-     $template->assign( array(
-      'filename_abs' =>   $filename , 
-      'filename' => $filename, 
-     'datas'    =>    array(
-     /*     'Val_JPEG_APP'=> Generate_JPEG_APP_Segment_HTML( $jpeg_header_data ), 
-        'Val_intrinsic'=> Interpret_intrinsic_values_to_HTML( get_jpeg_intrinsic_values( $jpeg_header_data ) ),
-        'Val_Comment'=> Interpret_Comment_to_HTML( $jpeg_header_data ), 
-        'Val_JFIF'=> Interpret_JFIF_to_HTML( get_JFIF( $jpeg_header_data ), $filename ),
-        'Val_JFXX'=>Interpret_JFXX_to_HTML( get_JFXX( $jpeg_header_data ), $filename ), 
-        'Val_App12' => Interpret_App12_Pic_Info_to_HTML( $jpeg_header_data ),          
-        'Val_IRB' => Interpret_IRB_to_HTML( get_Photoshop_IRB( $jpeg_header_data ), $filename ), 
-
-        'Val_exif'=>  Interpret_EXIF_to_HTML( get_EXIF_JPEG( $filename ), $filename),
-        'Val_XMP' =>  Interpret_XMP_to_HTML( read_XMP_array_from_text( get_XMP_text( $jpeg_header_data) ) ),
-          */ 
-     // 
-         ),
- 'Datadase' =>  ($Position) ,
-          ) );
-}
-
-function Memo_vars($variables)
-{
-   		ob_start();
-		echo '<pre>';
-		print_r($variables);
-		echo '</pre>';
- 	  	$m= ob_get_contents();
-
-    	ob_end_clean();
-		return $m;
-		
-}
-  //=======================================================================
-function cl_make_map_picture_url($params)
-{
-	global $conf;
-	/*if ( empty($conf['gmaps_api_key']) and $_SERVER['SERVER_ADDR']!='127.0.0.1' )
-		return "";*/
-	$map_url = make_picture_url($params);
-	return add_url_params($map_url, array('map'=>null) );
-}
-$v1=0;
-
-
-function Get_exif_gps($filename,$image)
-{
- error_reporting ( 1 );
-  $datas = array();
-  $errors = array();
-	//	
-
-     //	$Exif_array =    get_EXIF_JPEG( $filename );     
-     //  if ( empty($Exif_array) ) return;
-
-     $exif = @read_exif_data( $filename );  
- 
-
-      if ( empty($exif) ) return;
-	 $exif = array_intersect_key( $exif, array_flip( array('GPSLatitudeRef', 'GPSLatitude', 'GPSLongitudeRef', 'GPSLongitude', 'GPSAltitudeRef', 'GPSAltitude') ) );
-  
-
-       error_reporting ( 1 );
-       /*
- if ( count($exif)<4)
-			return; 
- 
-
-     if ( !in_array($exif['GPSLatitudeRef'], array('S', 'N') ) )
-		{
-			$errors[] = $filename. ': GPSLatitudeRef not S or N';
-			return; 
-		}
-		if ( !in_array($exif['GPSLongitudeRef'], array('W', 'E') ) )
-		{
-			$errors[] = $filename. ': GPSLongitudeRef not W or E';
-			return; 
-		}
-		if (!is_array($exif['GPSLatitude']) or !is_array($exif['GPSLongitude']) )
-		{
-			$errors[] = $filename. ': GPSLatitude and GPSLongitude are not arrays';
-			return; 
-		}	 
-*/
-
-
-    $lat = $image['lat'] ;          
-    $lon = $image['lon'] ; 
-    $alt=$image['alt'];
-
-if ($lat =="") 
-{ 
-  $lat = Parse_Lat_Lon( $exif['GPSLatitude'] );  
-  if ( $exif['GPSLatitudeRef']=='S' )$lat = -$lat;
-     $latDMS=$exif['GPSLatitude'][0] . " | " . $exif['GPSLatitude'][1]. " | " . $exif['GPSLatitude'][2] ;
-
-}else{
-
-    if($lat<0)      $exif['GPSLatitudeRef']='S' ;
-        else        $exif['GPSLatitudeRef']='N' ;
-        $latDMS=dec2dms($lat);
-        $exif['GPSLatitude']= $latDMS ;
-}         
-global $errors;
-if (!is_array($exif['GPSLatitude']) or !is_array($exif['GPSLongitude']) )
-		{
-			$errors[] = $filename. ': GPSLatitude and GPSLongitude are not arrays';
-			//return; 
-		}	 
-
-      if ($lon =="") {
-       
-            $lon = Parse_Lat_Lon( $exif['GPSLongitude'] );
-            $lonDMS= $exif['GPSLongitude'][0] . " | " . $exif['GPSLongitude'][1] . " | " . $exif['GPSLongitude'][2] ;
-  if ( $exif['GPSLongitudeRef']=='W' ) $lon = -$lon;
-           }else{
-             if ($lon<0) $exif['GPSLongitudeRef'] ='W' ;
-             else $exif['GPSLongitudeRef'] ='E' ;
-              $lonDMS=dec2dms($lon);
-                 $exif['GPSLongitude']=$lonDMS ;
-           }
-
-           
-
-//=======================================================================          
-           $altref = 0;
-
-if (!is_array($exif['GPSAltitude']) or !is_array($exif['GPSAltitudeRef']) )
-		{
-			 $exif['GPSAltitude']=$alt;
-             $exif['GPSAltitudeRef']=0;
-		}	else {
-        	$alt =		 $exif['GPSAltitude'];
-            $altref = $exif['GPSAltitudeRef'];
-        }
- //========================================================================           
-
-		$datas[] = array (
-            ' filename=' => $filename ,
-			'id' =>    $image['id'] ,
-			'lat' =>   $lat ,
-			'lon' =>   $lon ,
-			'latDMS' =>     $exif['GPSLatitude'][0]['Numerator']  . "/" .
-                            $exif['GPSLatitude'][0]['Denominator'] . " " .    
-                            $exif['GPSLatitude'][1]['Numerator'] . "/" .
-                            $exif['GPSLatitude'][1]['Denominator']. " " .    
-                            $exif['GPSLatitude'][2]['Numerator'] . "/" .
-                            $exif['GPSLatitude'][2]['Denominator'],
-			'lonDMS' =>     $exif['GPSLongitude'][0]['Numerator']  . "/" .
-                            $exif['GPSLongitude'][0]['Denominator'] . " " .    
-                            $exif['GPSLongitude'][1]['Numerator'] . "/" .
-                            $exif['GPSLongitude'][1]['Denominator']. " " .    
-                            $exif['GPSLongitude'][2]['Numerator'] . "/" .
-                            $exif['GPSLongitude'][2]['Denominator'],
-            'altref' => $exif['GPSAltitudeRef'],
-            'alt' =>   $exif['GPSAltitude'] ,
-
-			);  
-
-return $datas[0] ;
-}
-?> 
Index: tensions/edit_gmaps/admin/admin_edit_meta.tpl
===================================================================
--- /extensions/edit_gmaps/admin/admin_edit_meta.tpl	(revision 17761)
+++ 	(revision )
@@ -1,295 +1,0 @@
-{html_head}
-{* $Id: admin_edit.tpl  2011-01-03   *}
-{if PHPWG_VERSION < 2.2 } {include
-file=$EDIT_CL_PATH_ABS|@cat:'header_2_1.tpl'} {else} {include file= $EDIT_CL_PATH_ABS|@cat:'header_2_2.tpl'}
-{/if}
-
- {assign var='visible' value = true }
-  {if not empty($Selectthumbnails)  }
-    <script src="http://maps.google.com/maps/api/js?sensor=false&amp;hl={$lang_info.code}" type="text/javascript"></script>
-         <script type="text/javascript"> 
-            {if isset($coordinates) && $coordinates.LAT <= 90 }
-		      var   coordinates={ldelim} 
-                 LAT:'{$coordinates.LAT}',
-                 LON:'{$coordinates.LON}',
-                 ADRESSE:'{$coordinates.ADRESSE}',
-                 ZOOM:18,
-				 ALT:'{$coordinates.ALT}'
-                 };
-                 {else}
-             var    coordinates={ldelim} 
-                 LAT:' ',
-                 LON:' ',
-                 ADRESSE:'{$coordinates.ADRESSE}',
-                 ZOOM:4,
-				 ALT:' '
-                 };
-           {/if}           
-         
-        jQuery(window).load(function(){ldelim}
-                onLoad();
-                });
-
- 
-
-            </script>
- {/if}
-
-    <style type="text/css">{literal}
-#map{ 
- left:0px;
-  width:100%;
-  height:500px;
- border:outset;
-}
- 
-
-{/literal}
-</style>
-
-
-
-{/html_head}
- 
-
-  
-
-    <fieldset class="fieldset">
-        <legend>{'Display options'|@translate}</legend>
-        <table ><td class="cluetip" title="{'set'|translate}|{'hlp_line1'|@translate}." align="left"  >
-        <form>
-        Set:
-        <select onchange="document.location = this.options[this.selectedIndex].value;"   >
-        <optgroup label="Specials">
-        {html_options options=$specials}
-        </optgroup>
-        <optgroup label="{'Categories'|@translate}">
-        {html_options options=$categories selected=$categories_selected}
-        </optgroup>
-        <!-- <optgroup label="{'Tags'|@translate}"></optgroup> -->
-        </select>
-        </form>
-        </td>
-        <td   > {'hlp_line2'|@translate} </td>
-        </table>
-        <p>{'elements per page'|@translate}:
-            <a href="{$U_DISPLAY}&amp;display=20">20</a>
-        | <a href="{$U_DISPLAY}&amp;display=50">50</a>
-        | <a href="{$U_DISPLAY}&amp;display=100">100</a>
-        | <a href="{$U_DISPLAY}&amp;display=all">{'all'|@translate}</a>
-        </p>
-    </fieldset>
- {if  empty($Selectthumbnails) }{/if}
-
-
-<form action="" method="post" id="Envoie" name="Envoie"   >
-  {if not empty($thumbnails) &&  empty($Selectthumbnails) }  {/if} 
-
-<fieldset  id="Elements"  class="fieldset">
-	<legend>{'Elements'|@translate}</legend>
-
-    {if !empty($navbar) }{include file='navigation_bar.tpl'} {/if}
-        <fieldset >   
-	        <ul class="thumbnails">
-		        {foreach from=$thumbnails item=thumbnail}
-		        <li><span class="wrap1">
-			        <label>
-				        <span class="wrap2"><span>
-					        <img src="{$thumbnail.U_TN}" alt="{$thumbnail.file}" title="{$thumbnail.TITLE}" class="thumbnail" />
-				        </span></span>
-				        <input type="checkbox" name="selection[]" value="{$thumbnail.id}"    />
-			        </label>
-			        <span class="thumbLegend">
-			         {if isset($thumbnail.U_MAP)}
-			           <a href="{$thumbnail.U_MAP}" target="_blank">{$thumbnail.lat},{$thumbnail.lon}</a>
-			         {/if}
-                     {$thumbnail.file}  
-			        </span>
-
-			        </span>
-		        </li>
-		        {/foreach}
-	        </ul>	  
-        </fieldset>
-
-        <fieldset>
-        <label> {'target'|@translate}</label>
-        <table>
-        <td><label><input type="radio" name="target" value="all" /> {'all'|@translate}</label></td>
-        <td><label><input type="radio" name="target" value="selection" checked="checked" /> {'selection'|@translate}</label></td>
-        <td><input class="cluetip submit " title="{'selection'|@translate}|{'hlp_line3'|@translate}." type="submit" name="submit" value="{'selection'|@translate}"  {$tag_input_enabled} /></td>
-        </table>
-    </fieldset>
-</fieldset>
- <script>
-   {if empty($Selectthumbnails)  }
-  
-   var no_affiche=true ;
-   {else}
-   var no_affiche=false ;
-   {/if} </script>
-<fieldset   id ="geoposition"  class="fieldset">
-<legend>{'Selection'|@translate}</legend>
-  
-    <fieldset>    
-	    <ul class="thumbnails">
-		    {foreach from=$Selectthumbnails item=thumbnail}		 
-			<li><span class="wrap1">
-				<label>
-					<span class="wrap2"><span>
-						<img src="{$thumbnail.U_TN}" alt="{$thumbnail.file}" title="{$thumbnail.TITLE}" class="thumbnail" />
-					</span>					
-					</span>
-					<br/>
-                </label>
-				<input type="hidden"  value={$thumbnail.id}  name="selection[]"    />				
-				<span class="thumbLegend">
-				{if isset($thumbnail.U_MAP)}
-					<a href="{$thumbnail.U_MAP}" target="_blank">{$thumbnail.lat},{$thumbnail.lon}</a>
-				{/if}
-				{$thumbnail.file}  
-				</span>
-				</span>
-			</li>			
-		{/foreach}
-	</ul>
-</fieldset>
-    <fieldset>
-    <label>{'command'|@translate}</label>
-
-        <table>
-            <td>
-            <input class="cluetip" title="{'reset'|@translate}|{'hlp_line4'|@translate}."  type="submit" name="submit" value="{'reset'|@translate}" /><br />
-            </td>
-            <td>
-        <input class="cluetip" title="{'selection'|@translate}|{'hlp_line3'|@translate}." type="submit" name="submit" value="{'selection'|@translate}" />
-            </td>
-        </table>
-
-        <label>{'Form'|@translate}</label> 
-        <table >
-        <td >
-  
-        <input class="cluetip" title="{'search_title'|@translate}|{'hlp_line6'|@translate}." type=button  value="{'search_title'|@translate}" id="search" />
-
-        <input class="cluetip" title="{'lieu'|@translate}|{'hlp_line5'|@translate}." type="text" size="70"   value="{$match}"  name="match"   id="match"    />
-        </td>
-		<table >
-        <tr>   <input type="text" size="15" value="{$filename}"  name="filename" />
-        <td > 
-        <label>Latitude (-90=S to 90=N)</label>
-        <input type="text" size="15" value="{$lat}"  name="lat" />
-        </td>
-        <td>          
-        <label>Longitude (-180=E to 180=W) </label> 
-        <input type="text" size="15"value="{$lon}"  name="lon"  />         
-        </td>
-        <td>          
-        <label>Altitude </label> 
-		<input type="hidden" size="2"value="0"  name="altRef"  />
-          <input type="hidden" size="2" value="0" name="altDMS" />
-        <input type="text" size="15"value="{$alt}"  name="alt"  /> <label> m </label>         
-        </td>
-        </tr>
-		</table>
-		<tr>
-		<table >
-        <tr>  
-        <td > 
-        <label>Latitude DMS</label><input type="text" size="3" value="{$latRef}"  name="latRef" />
-        <input type="text" size="25" value="{$latDMS}"  name="latDMS" />
-        </td>
-        <td>          
-        <label>Longitude DMS </label><input type="text" size="3" value="{$lonRef}"  name="lonRef" /> 
-        <input type="text" size="25"value="{$lonDMS}"  name="lonDMS"  />         
-        </td>
-
-        </tr>
-		</table>
-		<tr>
-
-        <td>
-		<input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$tag_input_enabled} /></td>
-        </td></tr>
-        </table> 
-    </fieldset>
-
-    <fieldset>
-        <label>{'map'|@translate}</label>
-        <table>
-        <td><div id="markerStatus"></div></td>
-        <td><div id="markerAdress"></div></td>
-        </table>
-        <div id="map"></div>
-    </fieldset>
-  </fieldset>
-
-<fieldset   id ="metadata"  class="fieldset">
-<legend>{'Metadata'|@translate}</legend>
-<h4><a href="{$EDIT_CL_PATH}Edit_File_gps.php?jpeg_fname={$filename_abs}" >
-Click here to edit the Photoshop File Info for this file</a></h4>{$filename_abs}</fieldset>
-<table>
- {foreach from=$datas item=valeur}   
-				{$valeur}
-	{/foreach}
-</table>			 
-</fieldset>
-
-
-
-</form>
-
- <fieldset>
-<form name="EditJPEG" id="EditJPEG" action="{$EDIT_CL_PATH}Write_File_Info_Gps.php" method="post">
-  <input name="filename" size="60" id="filename" name="filename" type="test" value="../../../{$filename}"  />
-  <table> 
-    <tr>
-        <td>
-            Latitude Ref
-        </td>
-        <td>
-              <input size="60" id="latRef" name="GPSLatitudeRef" type="text" value="{$latRef}"> 
-        </td>
-     
-        <td>
-            Latitude
-        </td>
-        <td>
-             <input size="60" id="latDMS" name="GPSLatitude" type="text" value="{$latDMS}">   
-        </td>
-    </tr>
-        <tr>
-        <td>
-            Longitude Ref
-        </td>
-        <td>
-            <input size="60" id="lonRef" name="GPSLongitudeRef" type="text" value="{$lonRef}">
-        </td>
-  
-        <td>
-            Longitude
-        </td>
-        <td>
-<input size=60 id="lonDMS" name="GPSLongitude" type=\"text\" value="{$lonDMS}"> 
-        </td>
-    </tr>
-        <tr>
-		       <td>
-            Altitude Ref
-        </td>
-        <td>
-<input size=60 id="altRef" name="GPSAltitudeRef" type=\"text\" value="{$altRef}"> 
-        </td>
-     <input size=60 id="altDMS" name="GPSAltitudeRef" type=\"text\" value="{$altRef}"> 
-        <td>
-            Altitude
-        </td>
-        <td>
-<input size=60 id="alt" name="GPSAltitude" type=\"text\" value="{$alt}"> 
-        </td>
-    </tr>
-</table>
-<br>
-<input type="submit" value="Update!">
-</form>
-</fieldset>
Index: tensions/edit_gmaps/admin/element_set.php
===================================================================
--- /extensions/edit_gmaps/admin/element_set.php	(revision 17761)
+++ 	(revision )
@@ -1,247 +1,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery                                  |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | You should have received a copy of the GNU General Public License     |
-// | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
-// +-----------------------------------------------------------------------+
-
-/**
- * Management of elements set. Elements can belong to a category or to the
- * user caddie.
- *
- */
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok                      |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-check_input_parameter('selection', $_POST, true, PATTERN_ID);
-
-// +-----------------------------------------------------------------------+
-// |                          caddie management                            |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['submit_caddie']))
-{
-  if (isset($_POST['caddie_action']))
-  {
-    switch ($_POST['caddie_action'])
-    {
-      case 'empty_all' :
-      {
-          $query = '
-DELETE FROM '.CADDIE_TABLE.'
-  WHERE user_id = '.$user['id'].'
-;';
-          pwg_query($query);
-          break;
-      }
-      case 'empty_selected' :
-      {
-        if (isset($_POST['selection']) and count($_POST['selection']) > 0)
-        {
-          $query = '
-DELETE
-  FROM '.CADDIE_TABLE.'
-  WHERE element_id IN ('.implode(',', $_POST['selection']).')
-    AND user_id = '.$user['id'].'
-;';
-          pwg_query($query);
-        }
-        else
-        {
-          // TODO : add error
-        }
-        break;
-      }
-      case 'add_selected' :
-      {
-        if (isset($_POST['selection']) and count($_POST['selection']) > 0)
-        {
-          fill_caddie($_POST['selection']);
-        }
-        else
-        {
-          // TODO : add error
-        }
-        break;
-      }
-    }
-  }
-  else
-  {
-    // TODO : add error
-  }
-}
-
-// +-----------------------------------------------------------------------+
-// |                    initialize info about category                     |
-// +-----------------------------------------------------------------------+
-
-// To element_set_(global|unit).php, we must provide the elements id of the
-// managed category in $page['cat_elements_id'] array.
-$page['cat_elements_id'] = array();
-if (is_numeric($_GET['cat']))
-{
-  $page['title'] =
-    get_cat_display_name_from_id(
-      $_GET['cat'],
-      PHPWG_ROOT_PATH.'admin.php?page=cat_modify&amp;cat_id=',
-      false
-      );
-
-  $query = '
-SELECT image_id
-  FROM '.IMAGE_CATEGORY_TABLE.'
-  WHERE category_id = '.$_GET['cat'].'
-;';
-  $page['cat_elements_id'] = array_from_query($query, 'image_id');
-}
-else if ('caddie' == $_GET['cat'])
-{
-  $page['title'] = l10n('caddie');
-
-  $query = '
-SELECT element_id
-  FROM '.CADDIE_TABLE.'
-  WHERE user_id = '.$user['id'].'
-;';
-  $page['cat_elements_id'] = array_from_query($query, 'element_id');
-}
-else if ('not_linked' == $_GET['cat'])
-{
-  $page['title'] = l10n('Not linked elements');
-  $template->assign(array('U_ACTIVE_MENU' => 5 ));
-
-  // we are searching elements not linked to any virtual category
-  $query = '
-SELECT id
-  FROM '.IMAGES_TABLE.'
-;';
-  $all_elements = array_from_query($query, 'id');
-
-  $linked_to_virtual = array();
-
-  $query = '
-SELECT id
-  FROM '.CATEGORIES_TABLE.'
-  WHERE dir IS NULL
-;';
-  $virtual_categories = array_from_query($query, 'id');
-  if (!empty($virtual_categories))
-  {
-    $query = '
-SELECT DISTINCT(image_id)
-  FROM '.IMAGE_CATEGORY_TABLE.'
-  WHERE category_id IN ('.implode(',', $virtual_categories).')
-;';
-    $linked_to_virtual = array_from_query($query, 'image_id');
-  }
-
-  $page['cat_elements_id'] = array_diff($all_elements, $linked_to_virtual);
-}
-else if ('duplicates' == $_GET['cat'])
-{
-  $page['title'] = l10n('Files with same name in more than one physical category');
-  $template->assign(array('U_ACTIVE_MENU' => 5 ));
-
-  // we are searching related elements twice or more to physical categories
-  // 1 - Retrieve Files
-  $query = '
-SELECT DISTINCT(file)
-  FROM '.IMAGES_TABLE.'
- GROUP BY file
-HAVING COUNT(DISTINCT storage_category_id) > 1
-;';
-
-  $duplicate_files = array_from_query($query, 'file');
-  $duplicate_files[]='Nofiles';
-  // 2 - Retrives related picture ids
-  $query = '
-SELECT id, file
-  FROM '.IMAGES_TABLE.'
-WHERE file IN (\''.implode("','", $duplicate_files).'\')
-ORDER BY file, id
-;';
-
-  $page['cat_elements_id'] = array_from_query($query, 'id');
-}
-elseif ('recent'== $_GET['cat'])
-{
-  $page['title'] = l10n('Recent pictures');
-  $query = 'SELECT MAX(date_available) AS date
-  FROM '.IMAGES_TABLE;
-  $row = pwg_db_fetch_assoc(pwg_query($query));
-  if (!empty($row['date']))
-  {
-    $query = 'SELECT id
-  FROM '.IMAGES_TABLE.'
-  WHERE date_available BETWEEN '.pwg_db_get_recent_period_expression(1, $row['date']).' AND \''.$row['date'].'\'';
-    $page['cat_elements_id'] = array_from_query($query, 'id');
-  }
-}
-
-// +-----------------------------------------------------------------------+
-// |                       first element to display                        |
-// +-----------------------------------------------------------------------+
-
-// $page['start'] contains the number of the first element in its
-// category. For exampe, $page['start'] = 12 means we must show elements #12
-// and $page['nb_images'] next elements
-
-if (!isset($_GET['start'])
-    or !is_numeric($_GET['start'])
-    or $_GET['start'] < 0
-    or (isset($_GET['display']) and 'all' == $_GET['display']))
-{
-  $page['start'] = 0;
-}
-else
-{
-  $page['start'] = $_GET['start'];
-}
-
-// +-----------------------------------------------------------------------+
-// |                         open specific mode                            |
-// +-----------------------------------------------------------------------+
-
-$_GET['mode'] = !empty($_GET['mode']) ? $_GET['mode'] : 'global';
-
-switch ($_GET['mode'])
-{
-  case 'global' :
-  {
-    include(PHPWG_ROOT_PATH.'admin/element_set_global.php');
-    break;
-  }
-  case 'unit' :
-  {
-    include(PHPWG_ROOT_PATH.'admin/element_set_unit.php');
-    break;
-  }
-}
-?>
Index: tensions/edit_gmaps/admin/header_2_1.tpl
===================================================================
--- /extensions/edit_gmaps/admin/header_2_1.tpl	(revision 17761)
+++ 	(revision )
@@ -1,6 +1,0 @@
-{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.js" now=0}
-{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"}
-{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.core.js"}
-{known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/ui.resizable.js"}
-{known_script id="EDIT_RV_script" src=$EDIT_CL_PATH|@cat:"admin/js/JScript.js"}
-{known_script id="fieldset" src=$EDIT_CL_PATH|@cat:"admin/js/fieldset.js"}
