Index: /trunk/admin.php
===================================================================
--- /trunk/admin.php	(revision 527)
+++ /trunk/admin.php	(revision 528)
@@ -198,5 +198,5 @@
   'L_CONFIG_SESSION'=>$lang['conf_cookie'],
   'L_CONFIG_METADATA'=>$lang['metadata'],
-  'L_CONFIG_SITES'=>$lang['remote_sites'],
+  'L_SITES'=>$lang['remote_sites'],
   'L_CATEGORIES'=>$lang['categories'],
   'L_MANAGE'=>$lang['manage'],
@@ -218,5 +218,5 @@
   'U_CONFIG_SESSION'=>add_session_id($link_start.'configuration&amp;section=session' ),
   'U_CONFIG_METADATA'=>add_session_id($link_start.'configuration&amp;section=metadata' ),
-  'U_CONFIG_SITES'=>add_session_id($link_start.'remote_site'),
+  'U_SITES'=>add_session_id($link_start.'remote_site'),
   'U_PHPINFO'=>add_session_id($link_start.'admin_phpinfo' ),
   'U_USERS'=>add_session_id($link_start.'user_search' ),
Index: /trunk/admin/configuration.php
===================================================================
--- /trunk/admin/configuration.php	(revision 527)
+++ /trunk/admin/configuration.php	(revision 528)
@@ -41,5 +41,4 @@
   $page['section'] = $_GET['section'];
 }
-
 //------------------------------------------------------ $conf reinitialization
 $result = mysql_query('SELECT param,value FROM '.CONFIG_TABLE);
@@ -142,5 +141,5 @@
   }
   
-  // updating configuraiton if no error found
+  // updating configuration if no error found
   if (count($errors) == 0)
   {
@@ -150,7 +149,9 @@
       if (isset($_POST[$row['param']]))
       {
-        $query = 'UPDATE '.CONFIG_TABLE.
-		  ' SET value = \''. str_replace("\'", "''", $_POST[$row['param']]).
-		  '\' WHERE param = \''.$row['param'].'\';';
+        $query = '
+UPDATE '.CONFIG_TABLE.'
+  SET value = \''. str_replace("\'", "''", $_POST[$row['param']]).'\'
+  WHERE param = \''.$row['param'].'\'
+;';
         mysql_query($query);
       }
@@ -162,203 +163,219 @@
 $template->set_filenames( array('config'=>'admin/configuration.tpl') );
 
-$template->assign_vars(array(  
-  'L_CONFIRM'=>$lang['conf_confirmation'],
-  'L_YES'=>$lang['yes'],
-  'L_NO'=>$lang['no'],
-  'L_SUBMIT'=>$lang['submit'],
-  'L_RESET'=>$lang['reset'],
+$action = PHPWG_ROOT_PATH.'admin.php?page=configuration';
+$action.= '&amp;section='.$page['section'];
+
+$template->assign_vars(
+  array(
+    'L_CONFIRM'=>$lang['conf_confirmation'],
+    'L_YES'=>$lang['yes'],
+    'L_NO'=>$lang['no'],
+    'L_SUBMIT'=>$lang['submit'],
+    'L_RESET'=>$lang['reset'],
+    
+    'F_ACTION'=>add_session_id($action)
+    ));
+
+switch ($page['section'])
+{
+  case 'general' :
+  {
+    $access_free = ($conf['access']=='free')?'checked="checked"':'';
+    $access_restricted = ($conf['access']=='restricted')?'checked="checked"':'';
+    $history_yes = ($conf['log']=='true')?'checked="checked"':'';
+    $history_no  = ($conf['log']=='false')?'checked="checked"':'';
+    $notif_yes = ($conf['mail_notification']=='true')?'checked="checked"':'';
+    $notif_no = ($conf['mail_notification']=='false')?'checked="checked"':'';
+    
+    $template->assign_block_vars(
+      'general',
+      array(
+        'L_CONF_TITLE'=>$lang['conf_general_title'],
+        'L_CONF_MAIL'=>$lang['conf_mail_webmaster'],
+        'L_CONF_MAIL_INFO'=>$lang['conf_mail_webmaster_info'],
+        'L_CONF_TN_PREFIX'=>$lang['conf_prefix'],
+        'L_CONF_TN_PREFIX_INFO'=>$lang['conf_prefix_info'],
+        'L_CONF_ACCESS'=>$lang['conf_access'],
+        'L_CONF_ACCESS_INFO'=>$lang['conf_access_info'],
+        'L_CONF_ACCESS_FREE'=>$lang['free'],
+        'L_CONF_ACCESS_RESTRICTED'=>$lang['restricted'],
+        'L_CONF_HISTORY'=>$lang['history'],
+        'L_CONF_HISTORY_INFO'=>$lang['conf_log_info'],
+        'L_CONF_NOTIFICATION'=>$lang['conf_notification'],
+        'L_CONF_NOTIFICATION_INFO'=>$lang['conf_notification_info'],
+          
+        'ADMIN_MAIL'=>$conf['mail_webmaster'],
+        'THUMBNAIL_PREFIX'=>$conf['prefix_thumbnail'],
+        'ACCESS_FREE'=>$access_free,
+        'ACCESS_RESTRICTED'=>$access_restricted,
+        'HISTORY_YES'=>$history_yes,
+        'HISTORY_NO'=>$history_no,
+        'NOTIFICATION_YES'=>$notif_yes,
+        'NOTIFICATION_NO'=>$notif_no
+        ));
+    break;
+  }
+  case 'comments' :
+  {
+    $show_yes = ($conf['show_comments']=='true')?'checked="checked"':'';
+    $show_no = ($conf['show_comments']=='false')?'checked="checked"':'';
+    $all_yes = ($conf['comments_forall']=='true')?'checked="checked"':'';
+    $all_no  = ($conf['comments_forall']=='false')?'checked="checked"':'';
+    $validate_yes = ($conf['comments_validation']=='true')?'checked="checked"':'';
+    $validate_no = ($conf['comments_validation']=='false')?'checked="checked"':'';
+      
+    $template->assign_block_vars(
+      'comments',
+      array(
+        'L_CONF_TITLE'=>$lang['conf_comments_title'],
+        'L_CONF_SHOW_COMMENTS'=>$lang['conf_show_comments'],
+        'L_CONF_SHOW_COMMENTS_INFO'=>$lang['conf_show_comments_info'],
+        'L_CONF_COMMENTS_ALL'=>$lang['conf_comments_forall'],
+        'L_CONF_COMMENTS_ALL_INFO'=>$lang['conf_comments_forall_info'],
+        'L_CONF_NB_COMMENTS_PAGE'=>$lang['conf_nb_comment_page'],
+        'L_CONF_NB_COMMENTS_PAGE_INFO'=>$lang['conf_nb_comment_page'],
+        'L_CONF_VALIDATE'=>$lang['conf_comments_validation'],
+        'L_CONF_VALIDATE_INFO'=>$lang['conf_comments_validation_info'],
+          
+        'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
+        'SHOW_COMMENTS_YES'=>$show_yes,
+        'SHOW_COMMENTS_NO'=>$show_no,
+        'COMMENTS_ALL_YES'=>$all_yes,
+        'COMMENTS_ALL_NO'=>$all_no,
+        'VALIDATE_YES'=>$validate_yes,
+        'VALIDATE_NO'=>$validate_no
+        ));
+    break;
+  }
+  case 'default' :
+  {
+    $show_yes = ($conf['show_nb_comments']=='true')?'checked="checked"':'';
+    $show_no = ($conf['show_nb_comments']=='false')?'checked="checked"':'';
+    $expand_yes = ($conf['auto_expand']=='true')?'checked="checked"':'';
+    $expand_no  = ($conf['auto_expand']=='false')?'checked="checked"':'';
+      
+    $template->assign_block_vars(
+      'default',
+      array(
+        'L_CONF_TITLE'=>$lang['conf_default_title'],
+        'L_CONF_LANG'=>$lang['language'],
+        'L_CONF_LANG_INFO'=>$lang['conf_default_language_info'],
+        'L_NB_IMAGE_LINE'=>$lang['nb_image_per_row'],
+        'L_NB_IMAGE_LINE_INFO'=>$lang['conf_nb_image_line_info'],
+        'L_NB_ROW_PAGE'=>$lang['nb_row_per_page'],
+        'L_NB_ROW_PAGE_INFO'=>$lang['conf_nb_line_page_info'],
+        'L_CONF_STYLE'=>$lang['theme'],
+        'L_CONF_STYLE_INFO'=>$lang['conf_default_theme_info'],
+        'L_CONF_RECENT'=>$lang['recent_period'],
+        'L_CONF_RECENT_INFO'=>$lang['conf_recent_period_info'],
+        'L_CONF_EXPAND'=>$lang['auto_expand'],
+        'L_CONF_EXPAND_INFO'=>$lang['conf_default_expand_info'],
+        'L_NB_COMMENTS'=>$lang['show_nb_comments'],
+        'L_NB_COMMENTS_INFO'=>$lang['conf_show_nb_comments_info'],
   
-  'F_ACTION'=>add_session_id(PHPWG_ROOT_PATH.'admin.php?page=configuration&amp;section='.$page['section'])
-  ));
-
-switch ($page['section'])
-  {
-    case 'general' :
-    {
-      $access_free = ($conf['access']=='free')?'checked="checked"':'';
-	  $access_restricted = ($conf['access']=='restricted')?'checked="checked"':'';
-      $history_yes = ($conf['log']=='true')?'checked="checked"':'';
-	  $history_no  = ($conf['log']=='false')?'checked="checked"':'';
-	  $notif_yes = ($conf['mail_notification']=='true')?'checked="checked"':'';
-	  $notif_no = ($conf['mail_notification']=='false')?'checked="checked"':'';
-
-	  $template->assign_block_vars('general',array(
-	    'L_CONF_TITLE'=>$lang['conf_general_title'],
-		'L_CONF_MAIL'=>$lang['conf_mail_webmaster'],
-		'L_CONF_MAIL_INFO'=>$lang['conf_mail_webmaster_info'],
-		'L_CONF_TN_PREFIX'=>$lang['conf_prefix'],
-		'L_CONF_TN_PREFIX_INFO'=>$lang['conf_prefix_info'],
-		'L_CONF_ACCESS'=>$lang['conf_access'],
-		'L_CONF_ACCESS_INFO'=>$lang['conf_access_info'],
-		'L_CONF_ACCESS_FREE'=>$lang['free'],
-		'L_CONF_ACCESS_RESTRICTED'=>$lang['restricted'],
-		'L_CONF_HISTORY'=>$lang['history'],
-		'L_CONF_HISTORY_INFO'=>$lang['conf_log_info'],
-		'L_CONF_NOTIFICATION'=>$lang['conf_notification'],
-		'L_CONF_NOTIFICATION_INFO'=>$lang['conf_notification_info'],
-		
-		'ADMIN_MAIL'=>$conf['mail_webmaster'],
-		'THUMBNAIL_PREFIX'=>$conf['prefix_thumbnail'],
-		'ACCESS_FREE'=>$access_free,
-		'ACCESS_RESTRICTED'=>$access_restricted,
-		'HISTORY_YES'=>$history_yes,
-		'HISTORY_NO'=>$history_no,
-		'NOTIFICATION_YES'=>$notif_yes,
-		'NOTIFICATION_NO'=>$notif_no
-	  ));
-	  break;
-	}
-	case 'comments' :
-    {
-	  $show_yes = ($conf['show_comments']=='true')?'checked="checked"':'';
-	  $show_no = ($conf['show_comments']=='false')?'checked="checked"':'';
-      $all_yes = ($conf['comments_forall']=='true')?'checked="checked"':'';
-	  $all_no  = ($conf['comments_forall']=='false')?'checked="checked"':'';
-	  $validate_yes = ($conf['comments_validation']=='true')?'checked="checked"':'';
-	  $validate_no = ($conf['comments_validation']=='false')?'checked="checked"':'';
-
-	  $template->assign_block_vars('comments',array(
-	    'L_CONF_TITLE'=>$lang['conf_comments_title'],
-		'L_CONF_SHOW_COMMENTS'=>$lang['conf_show_comments'],
-		'L_CONF_SHOW_COMMENTS_INFO'=>$lang['conf_show_comments_info'],
-		'L_CONF_COMMENTS_ALL'=>$lang['conf_comments_forall'],
-		'L_CONF_COMMENTS_ALL_INFO'=>$lang['conf_comments_forall_info'],
-		'L_CONF_NB_COMMENTS_PAGE'=>$lang['conf_nb_comment_page'],
-		'L_CONF_NB_COMMENTS_PAGE_INFO'=>$lang['conf_nb_comment_page'],
-		'L_CONF_VALIDATE'=>$lang['conf_comments_validation'],
-		'L_CONF_VALIDATE_INFO'=>$lang['conf_comments_validation_info'],
-				
-		'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
-		'SHOW_COMMENTS_YES'=>$show_yes,
-		'SHOW_COMMENTS_NO'=>$show_no,
-		'COMMENTS_ALL_YES'=>$all_yes,
-		'COMMENTS_ALL_NO'=>$all_no,
-		'VALIDATE_YES'=>$validate_yes,
-		'VALIDATE_NO'=>$validate_no
-	  ));
-	  break;
-	}
-	case 'default' :
-    {
-	  $show_yes = ($conf['show_nb_comments']=='true')?'checked="checked"':'';
-	  $show_no = ($conf['show_nb_comments']=='false')?'checked="checked"':'';
-      $expand_yes = ($conf['auto_expand']=='true')?'checked="checked"':'';
-	  $expand_no  = ($conf['auto_expand']=='false')?'checked="checked"':'';
-
-	  $template->assign_block_vars('default',array(
-	    'L_CONF_TITLE'=>$lang['conf_default_title'],
-		'L_CONF_LANG'=>$lang['language'],
-		'L_CONF_LANG_INFO'=>$lang['conf_default_language_info'],
-		'L_NB_IMAGE_LINE'=>$lang['nb_image_per_row'],
-		'L_NB_IMAGE_LINE_INFO'=>$lang['conf_nb_image_line_info'],
-		'L_NB_ROW_PAGE'=>$lang['nb_row_per_page'],
-		'L_NB_ROW_PAGE_INFO'=>$lang['conf_nb_line_page_info'],
-		'L_CONF_STYLE'=>$lang['theme'],
-		'L_CONF_STYLE_INFO'=>$lang['conf_default_theme_info'],
-		'L_CONF_RECENT'=>$lang['recent_period'],
-		'L_CONF_RECENT_INFO'=>$lang['conf_recent_period_info'],
-		'L_CONF_EXPAND'=>$lang['auto_expand'],
-		'L_CONF_EXPAND_INFO'=>$lang['conf_default_expand_info'],
-		'L_NB_COMMENTS'=>$lang['show_nb_comments'],
-		'L_NB_COMMENTS_INFO'=>$lang['conf_show_nb_comments_info'],
-  
-		'CONF_LANG_SELECT'=>language_select($conf['default_language'], 'default_language'),
-		'NB_IMAGE_LINE'=>$conf['nb_image_line'],
-		'NB_ROW_PAGE'=>$conf['nb_line_page'],
-		'CONF_STYLE_SELECT'=>style_select($conf['default_template'], 'default_template'),
-		'CONF_RECENT'=>$conf['recent_period'],
-		'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
-		'EXPAND_YES'=>$expand_yes,
-		'EXPAND_NO'=>$expand_no,
-		'SHOW_COMMENTS_YES'=>$show_yes,
-		'SHOW_COMMENTS_NO'=>$show_no
-	  ));
-	  break;
-	}
-	case 'upload' :
-    {
-	  $upload_yes = ($conf['upload_available']=='true')?'checked="checked"':'';
-	  $upload_no = ($conf['upload_available']=='false')?'checked="checked"':'';
-	  
-	  $template->assign_block_vars('upload',array(
-	    'L_CONF_TITLE'=>$lang['conf_upload_title'],
-		'L_CONF_UPLOAD'=>$lang['conf_authorize_upload'],
-		'L_CONF_UPLOAD_INFO'=>$lang['conf_authorize_upload_info'],
-		'L_CONF_MAXSIZE'=>$lang['conf_upload_maxfilesize'],
-		'L_CONF_MAXSIZE_INFO'=>$lang['conf_upload_maxfilesize_info'],
-		'L_CONF_MAXWIDTH'=>$lang['conf_upload_maxwidth'],
-		'L_CONF_MAXWIDTH_INFO'=>$lang['conf_upload_maxwidth_info'],
-		'L_CONF_MAXHEIGHT'=>$lang['conf_upload_maxheight'],
-		'L_CONF_MAXHEIGHT_INFO'=>$lang['conf_upload_maxheight_info'],
-		'L_CONF_TN_MAXWIDTH'=>$lang['conf_upload_tn_maxwidth'],
-		'L_CONF_TN_MAXWIDTH_INFO'=>$lang['conf_upload_tn_maxwidth_info'],
-		'L_CONF_TN_MAXHEIGHT'=>$lang['conf_upload_tn_maxheight'],
-		'L_CONF_TN_MAXHEIGHT_INFO'=>$lang['conf_upload_tn_maxheight_info'],
-				
-		'UPLOAD_MAXSIZE'=>$conf['upload_maxfilesize'],
-		'UPLOAD_MAXWIDTH'=>$conf['upload_maxwidth'],
-		'UPLOAD_MAXHEIGHT'=>$conf['upload_maxheight'],
-		'TN_UPLOAD_MAXWIDTH'=>$conf['upload_maxwidth_thumbnail'],
-		'TN_UPLOAD_MAXHEIGHT'=>$conf['upload_maxheight_thumbnail'],
-		'UPLOAD_YES'=>$upload_yes,
-		'UPLOAD_NO'=>$upload_no
-	  ));
-	  break;
-	}
-	case 'session' :
-    {
-	  $cookie_yes = ($conf['upload_available']=='true')?'checked="checked"':'';
-	  $cookie_no = ($conf['upload_available']=='false')?'checked="checked"':'';
-	  
-	  $template->assign_block_vars('session',array(
-	    'L_CONF_TITLE'=>$lang['conf_session_title'],
-		'L_CONF_COOKIE'=>$lang['conf_cookies'],
-		'L_CONF_COOKIE_INFO'=>$lang['conf_cookies_info'],
-		'L_SESSION_LENGTH'=>$lang['conf_session_time'],
-		'L_SESSION_LENGTH_INFO'=>$lang['conf_session_time_info'],
-		'L_SESSION_ID_SIZE'=>$lang['conf_session_size'],
-		'L_SESSION_ID_SIZE_INFO'=>$lang['conf_session_size_info'],
-
-		'SESSION_LENGTH'=>$conf['session_time'],
-		'SESSION_ID_SIZE'=>$conf['session_id_size'],
-		'COOKIE_YES'=>$cookie_yes,
-		'COOKIE_NO'=>$cookie_no
-	  ));
-	  break;
-	}
-	case 'metadata' :
-    {
-	  $exif_yes = ($conf['use_exif']=='true')?'checked="checked"':'';
-	  $exif_no = ($conf['use_exif']=='false')?'checked="checked"':'';
-	  $iptc_yes = ($conf['use_iptc']=='true')?'checked="checked"':'';
-	  $iptc_no = ($conf['use_iptc']=='false')?'checked="checked"':'';
-	  $show_exif_yes = ($conf['show_exif']=='true')?'checked="checked"':'';
-	  $show_exif_no = ($conf['show_exif']=='false')?'checked="checked"':'';
-	  $show_iptc_yes = ($conf['show_iptc']=='true')?'checked="checked"':'';
-	  $show_iptc_no = ($conf['show_iptc']=='false')?'checked="checked"':'';
-	  
-	  $template->assign_block_vars('metadata',array(
-	    'L_CONF_TITLE'=>$lang['conf_metadata_title'],
-		'L_CONF_EXIF'=>$lang['conf_use_exif'],
-		'L_CONF_EXIF_INFO'=>$lang['conf_use_exif_info'],
-		'L_CONF_IPTC'=>$lang['conf_use_iptc'],
-		'L_CONF_IPTC_INFO'=>$lang['conf_use_iptc_info'],
-		'L_CONF_SHOW_EXIF'=>$lang['conf_show_exif'],
-		'L_CONF_SHOW_EXIF_INFO'=>$lang['conf_show_exif_info'],
-		'L_CONF_SHOW_IPTC'=>$lang['conf_show_iptc'],
-		'L_CONF_SHOW_IPTC_INFO'=>$lang['conf_show_iptc_info'],
-
-		'USE_EXIF_YES'=>$exif_yes,
-		'USE_EXIF_NO'=>$exif_no,
-		'USE_IPTC_YES'=>$iptc_yes,
-		'USE_IPTC_NO'=>$iptc_no,
-		'SHOW_EXIF_YES'=>$show_exif_yes,
-		'SHOW_EXIF_NO'=>$show_exif_no,
-		'SHOW_IPTC_YES'=>$show_iptc_yes,
-		'SHOW_IPTC_NO'=>$show_iptc_no
-	  ));
-	  break;
-	}
-  }
+        'CONF_LANG_SELECT'=>language_select($conf['default_language'], 'default_language'),
+        'NB_IMAGE_LINE'=>$conf['nb_image_line'],
+        'NB_ROW_PAGE'=>$conf['nb_line_page'],
+        'CONF_STYLE_SELECT'=>style_select($conf['default_template'], 'default_template'),
+        'CONF_RECENT'=>$conf['recent_period'],
+        'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
+        'EXPAND_YES'=>$expand_yes,
+        'EXPAND_NO'=>$expand_no,
+        'SHOW_COMMENTS_YES'=>$show_yes,
+        'SHOW_COMMENTS_NO'=>$show_no
+        ));
+    break;
+  }
+  case 'upload' :
+  {
+    $upload_yes = ($conf['upload_available']=='true')?'checked="checked"':'';
+    $upload_no = ($conf['upload_available']=='false')?'checked="checked"':'';
+      
+    $template->assign_block_vars(
+      'upload',
+      array(
+        'L_CONF_TITLE'=>$lang['conf_upload_title'],
+        'L_CONF_UPLOAD'=>$lang['conf_authorize_upload'],
+        'L_CONF_UPLOAD_INFO'=>$lang['conf_authorize_upload_info'],
+        'L_CONF_MAXSIZE'=>$lang['conf_upload_maxfilesize'],
+        'L_CONF_MAXSIZE_INFO'=>$lang['conf_upload_maxfilesize_info'],
+        'L_CONF_MAXWIDTH'=>$lang['conf_upload_maxwidth'],
+        'L_CONF_MAXWIDTH_INFO'=>$lang['conf_upload_maxwidth_info'],
+        'L_CONF_MAXHEIGHT'=>$lang['conf_upload_maxheight'],
+        'L_CONF_MAXHEIGHT_INFO'=>$lang['conf_upload_maxheight_info'],
+        'L_CONF_TN_MAXWIDTH'=>$lang['conf_upload_tn_maxwidth'],
+        'L_CONF_TN_MAXWIDTH_INFO'=>$lang['conf_upload_tn_maxwidth_info'],
+        'L_CONF_TN_MAXHEIGHT'=>$lang['conf_upload_tn_maxheight'],
+        'L_CONF_TN_MAXHEIGHT_INFO'=>$lang['conf_upload_tn_maxheight_info'],
+          
+        'UPLOAD_MAXSIZE'=>$conf['upload_maxfilesize'],
+        'UPLOAD_MAXWIDTH'=>$conf['upload_maxwidth'],
+        'UPLOAD_MAXHEIGHT'=>$conf['upload_maxheight'],
+        'TN_UPLOAD_MAXWIDTH'=>$conf['upload_maxwidth_thumbnail'],
+        'TN_UPLOAD_MAXHEIGHT'=>$conf['upload_maxheight_thumbnail'],
+        'UPLOAD_YES'=>$upload_yes,
+        'UPLOAD_NO'=>$upload_no
+        ));
+    break;
+  }
+  case 'session' :
+  {
+    $cookie_yes = ($conf['upload_available']=='true')?'checked="checked"':'';
+    $cookie_no = ($conf['upload_available']=='false')?'checked="checked"':'';
+      
+    $template->assign_block_vars(
+      'session',
+      array(
+        'L_CONF_TITLE'=>$lang['conf_session_title'],
+        'L_CONF_COOKIE'=>$lang['conf_cookies'],
+        'L_CONF_COOKIE_INFO'=>$lang['conf_cookies_info'],
+        'L_SESSION_LENGTH'=>$lang['conf_session_time'],
+        'L_SESSION_LENGTH_INFO'=>$lang['conf_session_time_info'],
+        'L_SESSION_ID_SIZE'=>$lang['conf_session_size'],
+        'L_SESSION_ID_SIZE_INFO'=>$lang['conf_session_size_info'],
+          
+        'SESSION_LENGTH'=>$conf['session_time'],
+        'SESSION_ID_SIZE'=>$conf['session_id_size'],
+        'COOKIE_YES'=>$cookie_yes,
+        'COOKIE_NO'=>$cookie_no
+        ));
+    break;
+  }
+  case 'metadata' :
+  {
+    $exif_yes = ($conf['use_exif']=='true')?'checked="checked"':'';
+    $exif_no = ($conf['use_exif']=='false')?'checked="checked"':'';
+    $iptc_yes = ($conf['use_iptc']=='true')?'checked="checked"':'';
+    $iptc_no = ($conf['use_iptc']=='false')?'checked="checked"':'';
+    $show_exif_yes = ($conf['show_exif']=='true')?'checked="checked"':'';
+    $show_exif_no = ($conf['show_exif']=='false')?'checked="checked"':'';
+    $show_iptc_yes = ($conf['show_iptc']=='true')?'checked="checked"':'';
+    $show_iptc_no = ($conf['show_iptc']=='false')?'checked="checked"':'';
+      
+    $template->assign_block_vars(
+      'metadata',
+      array(
+        'L_CONF_TITLE'=>$lang['conf_metadata_title'],
+        'L_CONF_EXIF'=>$lang['conf_use_exif'],
+        'L_CONF_EXIF_INFO'=>$lang['conf_use_exif_info'],
+        'L_CONF_IPTC'=>$lang['conf_use_iptc'],
+        'L_CONF_IPTC_INFO'=>$lang['conf_use_iptc_info'],
+        'L_CONF_SHOW_EXIF'=>$lang['conf_show_exif'],
+        'L_CONF_SHOW_EXIF_INFO'=>$lang['conf_show_exif_info'],
+        'L_CONF_SHOW_IPTC'=>$lang['conf_show_iptc'],
+        'L_CONF_SHOW_IPTC_INFO'=>$lang['conf_show_iptc_info'],
+          
+        'USE_EXIF_YES'=>$exif_yes,
+        'USE_EXIF_NO'=>$exif_no,
+        'USE_IPTC_YES'=>$iptc_yes,
+        'USE_IPTC_NO'=>$iptc_no,
+        'SHOW_EXIF_YES'=>$show_exif_yes,
+        'SHOW_EXIF_NO'=>$show_exif_no,
+        'SHOW_IPTC_YES'=>$show_iptc_yes,
+        'SHOW_IPTC_NO'=>$show_iptc_no
+        ));
+    break;
+  }
+}
 //-------------------------------------------------------------- errors display
 if ( sizeof( $errors ) != 0 )
Index: /trunk/include/functions.inc.php
===================================================================
--- /trunk/include/functions.inc.php	(revision 527)
+++ /trunk/include/functions.inc.php	(revision 528)
@@ -278,5 +278,5 @@
     {
       list($language_name) = @file($path.'/iso.txt');
-      $languages[$language_name] = $file;
+      $languages[$file] = $language_name;
     }
   }
Index: /trunk/include/functions_html.inc.php
===================================================================
--- /trunk/include/functions_html.inc.php	(revision 527)
+++ /trunk/include/functions_html.inc.php	(revision 528)
@@ -117,5 +117,5 @@
 
   $lang_select = '<select name="' . $select_name . '" onchange="this.form.submit()">';
-  foreach ($available_lang as $displayname => $code)
+  foreach ($available_lang as $code => $displayname)
   {
     $selected = ( strtolower($default) == strtolower($code) ) ? ' selected="selected"' : '';
Index: /trunk/template/default/admin.tpl
===================================================================
--- /trunk/template/default/admin.tpl	(revision 527)
+++ /trunk/template/default/admin.tpl	(revision 528)
@@ -17,4 +17,5 @@
 <ul class="menu">
   <li><a class="adminMenu" href="{U_FAQ}">{L_FAQ}</a></li>
+  <li><a class="adminMenu" href="{U_SITES}">{L_SITES}</a></li>
   <li><a class="adminMenu" href="{U_PHPINFO}">{L_PHPINFO}</a></li>
   <li><a class="adminMenu" href="{U_HISTORY}">{L_HISTORY}</a></li>
@@ -30,6 +31,5 @@
   <li><a class="adminMenu" href="{U_CONFIG_SESSION}">{L_CONFIG_SESSION}</a></li>
   <li><a class="adminMenu" href="{U_CONFIG_METADATA}">{L_CONFIG_METADATA}</a></li>
-  <li><a class="adminMenu" href="{U_CONFIG_SITES}">{L_CONFIG_SITES}</a></li>
-  </ul>
+</ul>
 </div>
 <div class="titreMenu">{L_CATEGORIES}</div>
