Index: /branches/1.3/about.php
===================================================================
--- /branches/1.3/about.php	(revision 3252)
+++ /branches/1.3/about.php	(revision 3252)
@@ -0,0 +1,41 @@
+<?php
+/***************************************************************************
+ *                                about.php                                *
+ *                            ------------------                           *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+//----------------------------------------------------------- personnal include
+include_once( './include/init.inc.php' );
+//----------------------------------------------------- template initialization
+//
+// Start output of page
+//
+$title= $lang['about_page_title'];
+include('include/page_header.php');
+
+$handle = $vtp->Open( './template/'.$user['template'].'/about.vtp' );
+initialize_template();
+
+$tpl = array('about_title','about_message','about_return');
+templatize_array( $tpl, 'lang', $handle );
+$vtp->setVar( $handle, 'user_template', $user['template'] );
+
+$url = './category.php?'.$_SERVER['QUERY_STRING'];
+$vtp->setVar( $handle, 'back_url', add_session_id( $url ) );
+//----------------------------------------------------------- html code display
+$output.= $vtp->Display( $handle, 0 );
+include('include/page_tail.php');
+?>
Index: /branches/1.3/admin/admin.php
===================================================================
--- /branches/1.3/admin/admin.php	(revision 3252)
+++ /branches/1.3/admin/admin.php	(revision 3252)
@@ -0,0 +1,261 @@
+<?php
+/***************************************************************************
+ *                                 admin.php                               *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+//----------------------------------------------------------- personnal include
+include_once( './include/isadmin.inc.php' );
+//----------------------------------------------------- template initialization
+$vtp = new VTemplate;
+$handle = $vtp->Open( '../template/'.$user['template'].'/admin/admin.vtp' );
+// language
+$tpl = array( 'menu_title','title_default','charset','install_warning' );
+templatize_array( $tpl, 'lang', $handle );
+$vtp->setGlobalVar( $handle, 'user_template',$user['template']);
+$vtp->setGlobalVar( $handle, 'style', '../template/'.$user['template'].'/'.$user['template'].'-admin.css');
+
+//-------------------------------------------------- install.php still exists ?
+if ( is_file( './install.php' ) )
+{
+  $vtp->addSession( $handle, 'install_warning' );
+  $vtp->closeSession( $handle, 'install_warning' );
+}
+//--------------------------------------- validating page and creation of title
+$page_valide = false;
+$title = '';
+if (isset( $_GET['page'] ))
+switch ( $_GET['page'] )
+{
+ case 'user_list':
+   $title = $lang['title_liste_users'];   $page_valide = true; break;
+ case 'user_modify':
+   $title = $lang['title_modify'];        $page_valide = true; break;
+ case 'user_perm':
+   if ( !is_numeric( $_GET['user_id'] ) ) $_GET['user_id'] = -1;
+   $query = 'SELECT status,username';
+   $query.= ' FROM '.PREFIX_TABLE.'users';
+   $query.= ' WHERE id = '.$_GET['user_id'];
+   $query.= ';';
+   $result = mysql_query( $query );
+   if ( mysql_num_rows( $result ) > 0 )
+   {
+     $row = mysql_fetch_array( $result );
+     $page['user_status']   = $row['status'];
+     if ( $row['username'] == 'guest' ) $row['username'] = $lang['guest'];
+     $page['user_username'] = $row['username'];
+     $page_valide = true;
+     $title = $lang['title_user_perm'].' "'.$page['user_username'].'"';
+   }
+   else
+   {
+     $page_valide = false;
+   }
+   break;
+ case 'group_list' :
+   $title = $lang['title_groups'];        $page_valide = true; break;
+ case 'group_perm' :
+   if ( !is_numeric( $_GET['group_id'] ) ) $_GET['group_id'] = -1;
+   $query = 'SELECT name';
+   $query.= ' FROM '.PREFIX_TABLE.'groups';
+   $query.= ' WHERE id = '.$_GET['group_id'];
+   $query.= ';';
+   $result = mysql_query( $query );
+   if ( mysql_num_rows( $result ) > 0 )
+   {
+     $row = mysql_fetch_array( $result );
+     $title = $lang['title_group_perm'].' "'.$row['name'].'"';
+     $page_valide = true;
+   }
+   else
+   {
+     $page_valide = false;
+   }
+   break;
+ case 'stats':
+   $title = $lang['title_history'];       $page_valide = true; break;
+ case 'update':
+   $title = $lang['title_update'];        $page_valide = true; break;
+ case 'configuration':
+   $title = $lang['title_configuration']; $page_valide = true; break;
+ case 'help':
+   $title = $lang['title_instructions'];  $page_valide = true; break;
+ case 'cat_perm':
+   $title = $lang['title_cat_perm'];
+   if ( isset( $_GET['cat_id'] ) )
+   {
+     check_cat_id( $_GET['cat_id'] );
+     if ( isset( $page['cat'] ) and is_numeric( $page['cat'] ) )
+     {
+       $result = get_cat_info( $page['cat'] );
+       $name = get_cat_display_name( $result['name'],' &gt; ', '' );
+       $title.= ' "'.$name.'"';
+     }
+   }
+   $page_valide = true;
+   break;
+ case 'cat_list':
+   $title = $lang['title_categories'];    $page_valide = true; break;
+ case 'cat_modify':
+   $title = $lang['title_edit_cat'];      $page_valide = true; break;
+ case 'infos_images':
+   $title = $lang['title_info_images'];   $page_valide = true; break;
+ case 'waiting':
+   $title = $lang['title_waiting'];       $page_valide = true; break;
+ case 'thumbnail':
+   $title = $lang['title_thumbnails'];
+   if ( isset( $_GET['dir'] ) )
+   {
+     $title.= ' '.$lang['title_thumbnails_2'].' <span style="color:#006699;">';
+     // $_GET['dir'] contains :
+     // ../galleries/vieux_lyon ou
+     // ../galleries/vieux_lyon/visite ou
+     // ../galleries/vieux_lyon/visite/truc ...
+     $dir = explode( "/", $_GET['dir'] );
+     $title.= $dir[2];
+     for ( $i = 3; $i < sizeof( $dir ) - 1; $i++ )
+     {
+       $title.= ' &gt; '.$dir[$i];
+     }
+     $title.= "</span>";
+   }
+   $page_valide = true;
+   break;
+ case 'comments' :
+   $title = $lang['title_comments'];
+   $page_valide = true;
+   break;
+ case 'picture_modify' :
+   $title = $lang['title_picmod'];
+   $page_valide = true;
+   break;
+ default:
+   $title = $lang['title_default']; break;
+}
+if ( $title == '' ) $title = $lang['title_default'];
+$vtp->setGlobalVar( $handle, 'title', $title );
+//--------------------------------------------------------------------- summary
+$link_start = './admin.php?page=';
+// configuration
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.indent', '' );
+$vtp->setVar( $handle, 'summary.link',
+              add_session_id( $link_start.'configuration' ) );
+$vtp->setVar( $handle, 'summary.name', $lang['menu_config'] );
+$vtp->closeSession( $handle, 'summary' );
+// users
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.indent', '' );
+$vtp->setVar( $handle, 'summary.link',
+              add_session_id( $link_start.'user_list' ) );
+$vtp->setVar( $handle, 'summary.name', $lang['menu_users'] );
+$vtp->closeSession( $handle, 'summary' );
+// groups
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.indent', '' );
+$vtp->setVar( $handle, 'summary.link',
+              add_session_id( $link_start.'group_list' ) );
+$vtp->setVar( $handle, 'summary.name', $lang['menu_groups'] );
+$vtp->closeSession( $handle, 'summary' );
+// categories
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.indent', '' );
+$vtp->setVar( $handle, 'summary.link',add_session_id( $link_start.'cat_list'));
+$vtp->setVar( $handle, 'summary.name', $lang['menu_categories'] );
+$vtp->closeSession( $handle, 'summary' );
+// waiting
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.indent', '' );
+$vtp->setVar( $handle, 'summary.link',
+              add_session_id( $link_start.'waiting' ) );
+$query = 'SELECT id';
+$query.= ' FROM '.PREFIX_TABLE.'waiting';
+$query.= " WHERE validated='false'";
+$query.= ';';
+$result = mysql_query( $query );
+$nb_waiting = '';
+if ( mysql_num_rows( $result ) > 0 )
+{
+  $nb_waiting =  ' [ '.mysql_num_rows( $result ).' ]';
+}
+$vtp->setVar( $handle, 'summary.name', $lang['menu_waiting'].$nb_waiting );
+$vtp->closeSession( $handle, 'summary' );
+// comments
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.indent', '' );
+$vtp->setVar( $handle, 'summary.link',
+              add_session_id( $link_start.'comments' ) );
+$query = 'SELECT id';
+$query.= ' FROM '.PREFIX_TABLE.'comments';
+$query.= " WHERE validated='false'";
+$query.= ';';
+$result = mysql_query( $query );
+$nb_waiting = '';
+if ( mysql_num_rows( $result ) > 0 )
+{
+  $nb_waiting =  ' [ '.mysql_num_rows( $result ).' ]';
+}
+$vtp->setVar( $handle, 'summary.name', $lang['menu_comments'].$nb_waiting );
+$vtp->closeSession( $handle, 'summary' );
+// update
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.indent', '' );
+$vtp->setVar( $handle, 'summary.link',
+              add_session_id( $link_start.'update' ) );
+$vtp->setVar( $handle, 'summary.name', $lang['menu_update'] );
+$vtp->closeSession( $handle, 'summary' );
+// thumbnails
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.indent', '' );
+$vtp->setVar( $handle, 'summary.link',
+              add_session_id( $link_start.'thumbnail' ) );
+$vtp->setVar( $handle, 'summary.name', $lang['menu_thumbnails'] );
+$vtp->closeSession( $handle, 'summary' );
+// history
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.indent', '' );
+$vtp->setVar( $handle, 'summary.link',
+              add_session_id( $link_start.'stats' ) );
+$vtp->setVar( $handle, 'summary.name', $lang['menu_history'] );
+$vtp->closeSession( $handle, 'summary' );
+// instructions
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.indent', '' );
+$vtp->setVar( $handle, 'summary.link',
+              add_session_id( $link_start.'help' ) );
+$vtp->setVar( $handle, 'summary.name', $lang['menu_instructions'] );
+$vtp->closeSession( $handle, 'summary' );
+// back to thumbnails page
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.indent', '' );
+$vtp->setVar( $handle, 'summary.link', add_session_id( '../category.php' ) );
+$vtp->setVar( $handle, 'summary.name', $lang['menu_back'] );
+$vtp->closeSession( $handle, 'summary' );
+//------------------------------------------------------------- content display
+if ( $page_valide )
+{
+  include ( $_GET['page'].'.php' );
+}
+else
+{
+  $vtp->setVar(
+    $handle, 'sub',
+    '<div style="text-align:center">'.$lang['default_message'].'</div>' );
+}
+//----------------------------------------------------------- html code display
+$code = $vtp->Display( $handle, 0 );
+echo $code;
+?>
Index: /branches/1.3/admin/cat_list.php
===================================================================
--- /branches/1.3/admin/cat_list.php	(revision 3252)
+++ /branches/1.3/admin/cat_list.php	(revision 3252)
@@ -0,0 +1,488 @@
+<?php
+/***************************************************************************
+ *                                  cat_list.php                           *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   website              : http://www.phpwebgallery.net                   *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+include_once( './include/isadmin.inc.php' );
+//------------------------------------------------ expand categories management
+// creation of the array containing the cat ids to expand
+// $page['tab_expand'] contains an array with the category ids
+// $page['expand'] contains the string to display in URL with comma
+
+// if there is less than $conf['max_LOV_categories'] categories, they are
+// all expande
+$query = 'SELECT COUNT(id) AS nb_total_categories';
+$query.= ' FROM '.PREFIX_TABLE.'categories';
+$query.= ';';
+$row = mysql_fetch_array( mysql_query( $query ) );
+if ( $row['nb_total_categories'] < $conf['max_LOV_categories']
+     or ( isset( $_GET['expand'] ) and $_GET['expand'] == 'all' ) )
+{
+  $page['tab_expand'] = array();
+  $page['expand'] = 'all';
+}
+else
+{
+  $page['tab_expand'] = array();
+  if ( isset ( $_GET['expand'] ) and $_GET['expand'] != 'all' )
+  {
+    $tab_expand = explode( ',', $_GET['expand'] );
+    foreach ( $tab_expand as $id ) {
+      if ( is_numeric( $id ) ) array_push( $page['tab_expand'], $id );
+    }
+  }
+  $page['tab_expand'] = array_unique( $page['tab_expand'] );
+  $page['expand'] = implode( ',', $page['tab_expand'] );
+}
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/cat_list.vtp' );
+$tpl = array( 'cat_edit','cat_up','cat_down','cat_image_info',
+              'cat_permission','cat_update','cat_add','cat_parent','submit',
+              'cat_virtual','delete','cat_first','cat_last','errors_title' );
+templatize_array( $tpl, 'lang', $sub );
+$vtp->setGlobalVar( $sub, 'user_template', $user['template'] );
+//--------------------------------------------------- adding a virtual category
+$errors = array();
+if ( isset( $_POST['submit'] ) )
+{
+  // is the given category name only containing blank spaces ?
+  if ( preg_match( '/^\s*$/', $_POST['virtual_name'] ) )
+    array_push( $errors, $lang['cat_error_name'] );
+  // does the uppercat id exists in the database ?
+  if ( $_POST['associate'] == ''
+       or $_POST['associate'] == '-1' )
+  {
+    $_POST['associate'] = -1;
+  }
+  else if ( !is_numeric( $_POST['associate'] ) )
+  {
+    array_push( $errors, $lang['cat_unknown_id'] );
+  }
+  else
+  {
+    $query = 'SELECT id';
+    $query.= ' FROM '.PREFIX_TABLE.'categories';
+    $query.= ' WHERE id = '.$_POST['associate'];
+    $query.= ';';
+    if ( mysql_num_rows( mysql_query( $query ) ) == 0 )
+      array_push( $errors, $lang['cat_unknown_id'] );
+  }
+  
+  if ( count( $errors ) == 0 )
+  {
+    // we have then to add the virtual category
+    $query = 'INSERT INTO '.PREFIX_TABLE.'categories';
+    $query.= ' (name,id_uppercat) VALUES ';
+    if ( $_POST['associate'] == -1 )
+    {
+      $_POST['associate'] = 'NULL';
+    }
+    $query.= " ('".$_POST['virtual_name']."',".$_POST['associate'].")";
+    $query.= ';';
+    mysql_query( $query );
+    synchronize_all_users();
+  }
+}
+//---------------------------------------------------------------  rank updates
+if ( isset( $_GET['up'] ) and is_numeric( $_GET['up'] ) )
+{
+  // 1. searching level (id_uppercat)
+  //    and rank of the category to move
+  $query = 'SELECT id_uppercat,rank';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE id = '.$_GET['up'];
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  $level = $row['id_uppercat'];
+  $rank  = $row['rank'];
+  // 2. searching the id and the rank of the category
+  //    just above at the same level
+  $query = 'SELECT id,rank';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE rank < '.$rank;
+  if ( $level == '' )
+  {
+    $query.= ' AND id_uppercat IS NULL';
+  }
+  else
+  {
+    $query.= ' AND id_uppercat = '.$level;
+  }
+  $query.= ' ORDER BY rank DESC';
+  $query.= ' LIMIT 0,1';
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  $new_rank     = $row['rank'];
+  $replaced_cat = $row['id'];
+  // 3. exchanging ranks between the two categories
+  $query = 'UPDATE '.PREFIX_TABLE.'categories';
+  $query.= ' SET rank = '.$new_rank;
+  $query.= ' WHERE id = '.$_GET['up'];
+  $query.= ';';
+  mysql_query( $query );
+  $query = 'UPDATE '.PREFIX_TABLE.'categories';
+  $query.= ' SET rank = '.$rank;
+  $query.= ' WHERE id = '.$replaced_cat;
+  $query.= ';';
+  mysql_query( $query );
+}
+if ( isset( $_GET['down'] ) and is_numeric( $_GET['down'] ) )
+{
+  // 1. searching level (id_uppercat)
+  //    and rank of the category to move
+  $query = 'SELECT id_uppercat,rank';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE id = '.$_GET['down'];
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  $level = $row['id_uppercat'];
+  $rank  = $row['rank'];
+  // 2. searching the id and the rank of the category
+  //    just below at the same level
+  $query = 'SELECT id,rank';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE rank > '.$rank;
+  if ( $level == '' )
+  {
+    $query.= ' AND id_uppercat IS NULL';
+  }
+  else
+  {
+    $query.= ' AND id_uppercat = '.$level;
+  }
+  $query.= ' ORDER BY rank ASC';
+  $query.= ' LIMIT 0,1';
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  $new_rank     = $row['rank'];
+  $replaced_cat = $row['id'];
+  // 3. exchanging ranks between the two categories
+  $query = 'UPDATE '.PREFIX_TABLE.'categories';
+  $query.= ' SET rank = '.$new_rank;
+  $query.= ' WHERE id = '.$_GET['down'];
+  $query.= ';';
+  mysql_query( $query );
+  $query = 'UPDATE '.PREFIX_TABLE.'categories';
+  $query.= ' SET rank = '.$rank;
+  $query.= ' WHERE id = '.$replaced_cat;
+  $query.= ';';
+  mysql_query( $query );
+}
+if ( isset( $_GET['last'] ) and is_numeric( $_GET['last'] ) )
+{
+  // 1. searching level (id_uppercat) of the category to move
+  $query = 'SELECT id_uppercat,rank';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE id = '.$_GET['last'];
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  $level = $row['id_uppercat'];
+  // 2. searching the highest rank of the categories of the same parent
+  $query = 'SELECT MAX(rank) AS max_rank';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE id_uppercat';
+  if ( $level == '' ) $query.= ' IS NULL';
+  else                $query.= ' = '.$level;
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  $max_rank = $row['max_rank'];
+  // 3. updating the rank of our category to be after the previous max rank
+  $query = 'UPDATE '.PREFIX_TABLE.'categories';
+  $query.= ' SET rank = '.($max_rank + 1);
+  $query.= ' WHERE id = '.$_GET['last'];
+  $query.= ';';
+  mysql_query( $query );
+}
+if ( isset( $_GET['first'] ) and is_numeric( $_GET['first'] ) )
+{
+  // to place our category as first, we simply say that is rank is 0, then
+  // reordering will move category ranks correctly (first rank should be 1
+  // and not 0)
+  $query = 'UPDATE '.PREFIX_TABLE.'categories';
+  $query.= ' SET rank = 0';
+  $query.= ' WHERE id = '.$_GET['first'];
+  $query.= ';';
+  mysql_query( $query );
+}
+if ( isset( $_GET['delete'] ) and is_numeric( $_GET['delete'] ) )
+{
+  delete_category( $_GET['delete'] );
+  synchronize_all_users();
+}
+//------------------------------------------------------------------ reordering
+function ordering( $id_uppercat )
+{
+  $rank = 1;
+		
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  if ( !is_numeric( $id_uppercat ) )
+  {
+    $query.= ' WHERE id_uppercat IS NULL';
+  }
+  else
+  {
+    $query.= ' WHERE id_uppercat = '.$id_uppercat;
+  }
+  $query.= ' ORDER BY rank ASC, dir ASC';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $query = 'UPDATE '.PREFIX_TABLE.'categories';
+    $query.= ' SET rank = '.$rank;
+    $query.= ' WHERE id = '.$row['id'];
+    $query.= ';';
+    mysql_query( $query );
+    $rank++;
+    ordering( $row['id'] );
+  }
+}
+ordering( 'NULL' );
+//-------------------------------------------------------------- errors display
+if ( count( $errors ) != 0 )
+{
+  $vtp->addSession( $sub, 'errors' );
+  foreach ( $errors as $error ) {
+    $vtp->addSession( $sub, 'li' );
+    $vtp->setVar( $sub, 'li.content', $error );
+    $vtp->closeSession( $sub, 'li' );
+  }
+  $vtp->closeSession( $sub, 'errors' );
+}
+//---------------------------------------------------------------- page display
+function display_cat_manager( $id_uppercat, $indent,
+                              $uppercat_visible, $level )
+{
+  global $lang,$conf,$sub,$vtp,$page;
+		
+  // searching the min_rank and the max_rank of the category
+  $query = 'SELECT MIN(rank) AS min, MAX(rank) AS max';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  if ( !is_numeric( $id_uppercat ) )
+  {
+    $query.= ' WHERE id_uppercat IS NULL';
+  }
+  else
+  {
+    $query.= ' WHERE id_uppercat = '.$id_uppercat;
+  }
+  $query.= ';';
+  $result = mysql_query( $query );
+  $row    = mysql_fetch_array( $result );
+  if ( !isset( $row['min'] ) ) $row['min'] = 0;
+  if ( !isset( $row['max'] ) ) $row['max'] = 0;
+  $min_rank = $row['min'];
+  $max_rank = $row['max'];
+		
+  // will we use <th> or <td> lines ?
+  $td    = 'td';
+  $class = '';
+  if ( $level > 0 ) $class = 'row'.$level;
+  else              $td = 'th';
+		
+  $query = 'SELECT id,name,dir,nb_images,status,rank,site_id,visible';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  if ( !is_numeric( $id_uppercat ) )
+  {
+    $query.= ' WHERE id_uppercat IS NULL';
+  }
+  else
+  {
+    $query.= ' WHERE id_uppercat = '.$id_uppercat;
+  }
+  $query.= ' ORDER BY rank ASC';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $subcat_visible = true;
+    if ( !isset( $row['dir'] ) ) $row['dir'] = '';
+
+    $vtp->addSession( $sub, 'cat' );
+    // is the category expanded or not ?
+    if ( $page['expand'] == 'all' )
+    {
+      $vtp->addSession( $sub, 'bullet_wo_link' );
+      $vtp->closeSession( $sub, 'bullet_wo_link' );
+    }
+    else if ( in_array( $row['id'], $page['tab_expand'] ) )
+    {
+      $vtp->addSession( $sub, 'bullet_expanded' );
+      $tab_expand = array_diff( $page['tab_expand'], array( $row['id'] ) );
+      $expand = implode( ',', $tab_expand );
+      $url = './admin.php?page=cat_list&amp;expand='.$expand;
+      $vtp->setVar( $sub, 'bullet_expanded.link', add_session_id( $url ) );
+      $vtp->closeSession( $sub, 'bullet_expanded' );
+    }
+    else
+    {
+      $vtp->addSession( $sub, 'bullet_collapsed' );
+      $tab_expand = array_merge( $page['tab_expand'], array( $row['id'] ) );
+      $expand = implode( ',', $tab_expand );
+      $url = './admin.php?page=cat_list&amp;expand='.$expand;
+      $vtp->setVar( $sub, 'bullet_collapsed.link', add_session_id( $url ) );
+      $vtp->closeSession( $sub, 'bullet_collapsed' );
+    }
+    
+    $vtp->setVar( $sub, 'cat.td', $td );
+    $vtp->setVar( $sub, 'cat.class', $class );
+    $vtp->setVar( $sub, 'cat.indent', $indent );
+    $vtp->setVar( $sub, 'cat.name', $row['name'] );
+
+    if ( $row['dir'] != '' )
+    {
+      $vtp->addSession( $sub, 'storage' );
+      $vtp->setVar( $sub, 'storage.dir', $row['dir'] );
+      $vtp->closeSession( $sub, 'storage' );
+      // category can't be deleted
+      $vtp->addSession( $sub, 'no_delete' );
+      $vtp->closeSession( $sub, 'no_delete' );
+    }
+    else
+    {
+      $vtp->addSession( $sub, 'virtual' );
+      $vtp->closeSession( $sub, 'virtual' );
+      // category can be deleted
+      $vtp->addSession( $sub, 'delete' );
+      $url = './admin.php?page=cat_list&amp;expand='.$page['expand'];
+      $url.= '&amp;delete='.$row['id'];
+      $vtp->setVar( $sub, 'delete.delete_url', add_session_id( $url ) );
+      $vtp->closeSession( $sub, 'delete' );
+    }
+    if ( $row['visible'] == 'false' or !$uppercat_visible )
+    {
+      $subcat_visible = false;
+      $vtp->setVar( $sub, 'cat.invisible', $lang['cat_invisible'] );
+    }
+    if ( $row['status'] == 'private' )
+    {
+      $vtp->setVar( $sub, 'cat.private', $lang['private'] );
+    }
+    $vtp->setVar( $sub, 'cat.nb_picture', $row['nb_images'] );
+    $url = add_session_id( './admin.php?page=cat_modify&amp;cat='.$row['id'] );
+    $vtp->setVar( $sub, 'cat.edit_url', $url );
+    if ( $row['rank'] != $min_rank )
+    {
+      $vtp->addSession( $sub, 'up' );
+      $url = './admin.php?page=cat_list&amp;expand='.$page['expand'];
+      $url.= '&amp;up='.$row['id'];
+      $vtp->setVar( $sub, 'up.up_url', add_session_id( $url ) );
+      $vtp->closeSession( $sub, 'up' );
+    }
+    else if ( $min_rank != $max_rank )
+    {
+      $vtp->addSession( $sub, 'no_up' );
+      $url = './admin.php?page=cat_list&amp;expand='.$page['expand'];
+      $url.= '&amp;last='.$row['id'];
+      $vtp->setVar( $sub, 'no_up.last_url', add_session_id( $url ) );
+      $vtp->closeSession( $sub, 'no_up' );
+    }
+    if ( $row['rank'] != $max_rank )
+    {
+      $vtp->addSession( $sub, 'down' );
+      $url = './admin.php?page=cat_list&amp;expand='.$page['expand'];
+      $url.= '&amp;down='.$row['id'];
+      $vtp->setVar( $sub, 'down.down_url', add_session_id( $url ) );
+      $vtp->closeSession( $sub, 'down' );
+    }
+    else if ( $min_rank != $max_rank )
+    {
+      $vtp->addSession( $sub, 'no_down' );
+      $url = './admin.php?page=cat_list&amp;expand='.$page['expand'];
+      $url.= '&amp;first='.$row['id'];
+      $vtp->setVar( $sub, 'no_down.first_url', add_session_id( $url ) );
+      $vtp->closeSession( $sub, 'no_down' );
+    }
+    if ( $row['nb_images'] > 0 )
+    {
+      $vtp->addSession( $sub, 'image_info' );
+      $url = './admin.php?page=infos_images&amp;cat_id='.$row['id'];
+      $vtp->setVar( $sub, 'image_info.image_info_url', add_session_id($url) );
+      $vtp->closeSession( $sub, 'image_info' );
+    }
+    else
+    {
+      $vtp->addSession( $sub, 'no_image_info' );
+      $vtp->closeSession( $sub, 'no_image_info' );
+    }
+    if ( $row['status'] == 'private' )
+    {
+      $vtp->addSession( $sub, 'permission' );
+      $url=add_session_id('./admin.php?page=cat_perm&amp;cat_id='.$row['id']);
+      $vtp->setVar( $sub, 'permission.url', $url );
+      $vtp->closeSession( $sub, 'permission' );
+    }
+    else
+    {
+      $vtp->addSession( $sub, 'no_permission' );
+      $vtp->closeSession( $sub, 'no_permission' );
+    }
+    // you can individually update a category only if it is on the main site
+    // and if it's not a virtual category (a category is virtual if there is
+    // no directory associated)
+    if ( $row['site_id'] == 1 and $row['dir'] != '' )
+    {
+      $vtp->addSession( $sub, 'update' );
+      $url = add_session_id('./admin.php?page=update&amp;update='.$row['id']);
+      $vtp->setVar( $sub, 'update.update_url', $url );
+      $vtp->closeSession( $sub, 'update' );
+    }
+    else
+    {
+      $vtp->addSession( $sub, 'no_update' );
+      $vtp->closeSession( $sub, 'no_update' );
+    }
+
+    $vtp->closeSession( $sub, 'cat' );
+
+    if ( in_array( $row['id'], $page['tab_expand'] )
+         or $page['expand'] == 'all')
+      display_cat_manager( $row['id'], $indent.str_repeat( '&nbsp', 4 ),
+                           $subcat_visible, $level + 1 );
+  }
+}
+display_cat_manager( 'NULL', str_repeat( '&nbsp', 4 ), true, 0 );
+// add a virtual category ?
+// We only show a List Of Values if the number of categories is less than
+// $conf['max_LOV_categories']
+$query = 'SELECT COUNT(id) AS nb_total_categories';
+$query.= ' FROM '.PREFIX_TABLE.'categories';
+$query.= ';';
+$row = mysql_fetch_array( mysql_query( $query ) );
+if ( $row['nb_total_categories'] < $conf['max_LOV_categories'] )
+{
+  $vtp->addSession( $sub, 'associate_LOV' );
+  $vtp->addSession( $sub, 'associate_cat' );
+  $vtp->setVar( $sub, 'associate_cat.value', '-1' );
+  $vtp->setVar( $sub, 'associate_cat.content', '' );
+  $vtp->closeSession( $sub, 'associate_cat' );
+  $page['plain_structure'] = get_plain_structure( true );
+  $structure = create_structure( '', array() );
+  display_categories( $structure, '&nbsp;' );
+  $vtp->closeSession( $sub, 'associate_LOV' );
+}
+// else, we only display a small text field, we suppose the administrator
+// knows the id of its category
+else
+{
+  $vtp->addSession( $sub, 'associate_text' );
+  $vtp->closeSession( $sub, 'associate_text' );
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/cat_modify.php
===================================================================
--- /branches/1.3/admin/cat_modify.php	(revision 3252)
+++ /branches/1.3/admin/cat_modify.php	(revision 3252)
@@ -0,0 +1,245 @@
+<?php
+/***************************************************************************
+ *                               cat_modify.php                            *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+include_once( './include/isadmin.inc.php' );
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/cat_modify.vtp' );
+$tpl = array( 'remote_site','editcat_confirm','editcat_back','editcat_title1',
+              'editcat_name','editcat_comment','editcat_status',
+              'editcat_visible','editcat_visible_info', 'submit',
+              'editcat_uploadable','cat_virtual','cat_parent' );
+templatize_array( $tpl, 'lang', $sub );
+//---------------------------------------------------------------- verification
+if ( !is_numeric( $_GET['cat'] ) )
+{
+  $_GET['cat'] = '-1';
+}
+//--------------------------------------------------------- form criteria check
+if ( isset( $_POST['submit'] ) )
+{
+  // if new status is different from previous one, deletion of all related
+  // links for access rights
+  $query = 'SELECT status';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE id = '.$_GET['cat'];
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  
+  $query = 'UPDATE '.PREFIX_TABLE.'categories';
+
+  $query.= ' SET name = ';
+  if ( $_POST['name'] == '' )
+    $query.= 'NULL';
+  else
+    $query.= "'".htmlentities( $_POST['name'], ENT_QUOTES)."'";
+
+  $query.= ', comment = ';
+  if ( $_POST['comment'] == '' )
+    $query.= 'NULL';
+  else
+    $query.= "'".htmlentities( $_POST['comment'], ENT_QUOTES )."'";
+
+  $query.= ", status = '".$_POST['status']."'";
+  $query.= ", visible = '".$_POST['visible']."'";
+
+  if ( isset( $_POST['uploadable'] ) )
+    $query.= ", uploadable = '".$_POST['uploadable']."'";
+
+  if ( isset( $_POST['associate'] ) )
+  {
+    $query.= ', id_uppercat = ';
+    if ( $_POST['associate'] == -1 or $_POST['associate'] == '' )
+      $query.= 'NULL';
+    else
+      $query.= $_POST['associate'];
+  }
+  $query.= ' WHERE id = '.$_GET['cat'];
+  $query.= ';';
+  mysql_query( $query );
+
+  if ( $_POST['status'] != $row['status'] )
+  {
+    // deletion of all access for groups concerning this category
+    $query = 'DELETE';
+    $query.= ' FROM '.PREFIX_TABLE.'group_access';
+    $query.= ' WHERE cat_id = '.$_GET['cat'];
+    mysql_query( $query );
+    // deletion of all access for users concerning this category
+    $query = 'DELETE';
+    $query.= ' FROM '.PREFIX_TABLE.'user_access';
+    $query.= ' WHERE cat_id = '.$_GET['cat'];
+    mysql_query( $query );
+    // resynchronize all users
+    synchronize_all_users();
+  }
+
+  // checking users favorites
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'users';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    check_favorites( $row['id'] );
+  }
+
+  $vtp->addSession( $sub, 'confirmation' );
+  $url = add_session_id( './admin.php?page=cat_list' );
+  $vtp->setVar( $sub, 'confirmation.back_url', $url );
+  $vtp->closeSession( $sub, 'confirmation' );
+}
+//------------------------------------------------------------------------ form
+$form_action = './admin.php?page=cat_modify&amp;cat='.$_GET['cat'];
+$vtp->setVar( $sub, 'form_action', add_session_id( $form_action ) );
+
+$query = 'SELECT a.id,name,dir,status,comment,uploadable';
+$query.= ',id_uppercat,site_id,galleries_url,visible';
+$query.= ' FROM '.PREFIX_TABLE.'categories as a, '.PREFIX_TABLE.'sites as b';
+$query.= ' WHERE a.id = '.$_GET['cat'];
+$query.= ' AND a.site_id = b.id';
+$query.= ';';
+$row = mysql_fetch_array( mysql_query( $query ) );
+
+if ( !isset( $row['dir'] ) ) $row['dir'] = '';
+if ( !isset( $row['id_uppercat'] ) ) $row['id_uppercat'] = '';
+
+$result = get_cat_info( $row['id'] );
+// cat name
+$cat_name = get_cat_display_name( $result['name'], ' - ', '' );
+$vtp->setVar( $sub, 'cat:name', $cat_name );
+// cat dir
+if ( $row['dir'] != '' )
+{
+  $vtp->addSession( $sub, 'storage' );
+  $vtp->setVar( $sub, 'storage.dir', $row['dir'] );
+  $vtp->closeSession( $sub, 'storage' );
+}
+else
+{
+  $vtp->addSession( $sub, 'virtual' );
+  $vtp->closeSession( $sub, 'virtual' );
+}
+// remote site ?
+if ( $row['site_id'] != 1 )
+{
+  $vtp->addSession( $sub, 'server' );
+  $vtp->setVar( $sub, 'server.url', $row['galleries_url'] );
+  $vtp->closeSession( $sub, 'server' );
+}
+$vtp->setVar( $sub, 'name',    $row['name'] );
+if ( !isset( $row['comment'] ) ) $row['comment'] = '';
+$vtp->setVar( $sub, 'comment', $row['comment'] );
+// status : public, private...
+$options = get_enums( PREFIX_TABLE.'categories', 'status' );
+foreach ( $options as $option  ) {
+  $vtp->addSession( $sub, 'status_option' );
+  $vtp->setVar( $sub, 'status_option.option', $lang[$option] );
+  $vtp->setVar( $sub, 'status_option.value', $option );
+  if ( $option == $row['status'] )
+  {
+    $vtp->setVar( $sub, 'status_option.checked', ' checked="checked"' );  
+  }
+  $vtp->closeSession( $sub, 'status_option' );
+}
+// visible : true or false
+$vtp->addSession( $sub, 'visible_option' );
+$vtp->setVar( $sub, 'visible_option.value', 'true' );
+$vtp->setVar( $sub, 'visible_option.option', $lang['yes'] );
+$checked = '';
+if ( $row['visible'] == 'true' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'visible_option.checked', $checked );
+$vtp->closeSession( $sub, 'visible_option' );
+$vtp->addSession( $sub, 'visible_option' );
+$vtp->setVar( $sub, 'visible_option.value', 'false' );
+$vtp->setVar( $sub, 'visible_option.option', $lang['no'] );
+$checked = '';
+if ( $row['visible'] == 'false' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'visible_option.checked', $checked );
+$vtp->closeSession( $sub, 'visible_option' );
+// uploadable : true or false
+// a category can be uploadable if :
+//  1. upload is authorized
+//  2. category is not virtual
+//  3. category is on the main site
+if ( $conf['upload_available'] and $row['dir'] != '' and $row['site_id'] == 1 )
+{
+  $vtp->addSession( $sub, 'uploadable' );
+  $vtp->addSession( $sub, 'uploadable_option' );
+  $vtp->setVar( $sub, 'uploadable_option.value', 'true' );
+  $vtp->setVar( $sub, 'uploadable_option.option', $lang['yes'] );
+  $checked = '';
+  if ( $row['uploadable'] == 'true' )
+  {
+    $checked = ' checked="checked"';
+  }
+  $vtp->setVar( $sub, 'uploadable_option.checked', $checked );
+  $vtp->closeSession( $sub, 'uploadable_option' );
+  $vtp->addSession( $sub, 'uploadable_option' );
+  $vtp->setVar( $sub, 'uploadable_option.value', 'false' );
+  $vtp->setVar( $sub, 'uploadable_option.option', $lang['no'] );
+  $checked = '';
+  if ( $row['uploadable'] == 'false' )
+  {
+    $checked = ' checked="checked"';
+  }
+  $vtp->setVar( $sub, 'uploadable_option.checked', $checked );
+  $vtp->closeSession( $sub, 'uploadable_option' );
+  $vtp->closeSession( $sub, 'uploadable' );
+}
+// can the parent category be changed ? (is the category virtual ?)
+if ( $row['dir'] == '' )
+{
+  $vtp->addSession( $sub, 'parent' );
+  // We only show a List Of Values if the number of categories is less than
+  // $conf['max_LOV_categories']
+  $query = 'SELECT COUNT(id) AS nb_total_categories';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ';';
+  $countrow = mysql_fetch_array( mysql_query( $query ) );
+  if ( $countrow['nb_total_categories'] < $conf['max_LOV_categories'] )
+  {
+    $vtp->addSession( $sub, 'associate_LOV' );
+    $vtp->addSession( $sub, 'associate_cat' );
+    $vtp->setVar( $sub, 'associate_cat.value', '-1' );
+    $vtp->setVar( $sub, 'associate_cat.content', '' );
+    $vtp->closeSession( $sub, 'associate_cat' );
+    $page['plain_structure'] = get_plain_structure( true );
+    $structure = create_structure( '', array() );
+    display_categories( $structure, '&nbsp;', $row['id_uppercat'],$row['id'] );
+    $vtp->closeSession( $sub, 'associate_LOV' );
+  }
+  // else, we only display a small text field, we suppose the administrator
+  // knows the id of its category
+  else
+  {
+    $vtp->addSession( $sub, 'associate_text' );
+    $vtp->setVar( $sub, 'associate_text.value', $row['id_uppercat'] );
+    $vtp->closeSession( $sub, 'associate_text' );
+  }
+  $vtp->closeSession( $sub, 'parent' );
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/cat_perm.php
===================================================================
--- /branches/1.3/admin/cat_perm.php	(revision 3252)
+++ /branches/1.3/admin/cat_perm.php	(revision 3252)
@@ -0,0 +1,220 @@
+<?php
+/***************************************************************************
+ *                               cat_perm.php                              *
+ *                            ------------------                           *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+include_once( './include/isadmin.inc.php' );
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/cat_perm.vtp' );
+$error = array();
+$tpl = array( 'permuser_authorized','permuser_forbidden','menu_groups',
+              'submit','menu_users','permuser_parent_forbidden' );
+templatize_array( $tpl, 'lang', $sub );
+$vtp->setGlobalVar( $sub, 'user_template', $user['template'] );
+//-------------------------------------------------------------- category infos
+if ( isset( $_GET['cat_id'] ) )
+{
+  check_cat_id( $_GET['cat_id'] );
+  if ( isset( $page['cat'] ) and is_numeric( $page['cat'] ) )
+  {
+    $result = get_cat_info( $page['cat'] );
+    $page['cat_name']    = $result['name'];
+    $page['id_uppercat'] = $result['id_uppercat'];
+  }
+}
+//---------------------------------------------------------- permission updates
+if ( isset( $_POST['submit'] ) )
+{
+  // groups access update
+  $query = 'DELETE';
+  $query.= ' FROM '.PREFIX_TABLE.'group_access';
+  $query.= ' WHERE cat_id = '.$page['cat'];
+  $query.= ';';
+  mysql_query( $query );
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'groups';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $radioname = 'groupaccess-'.$row['id'];
+    if ( $_POST[$radioname] == 0 )
+    {
+      $query = 'INSERT INTO '.PREFIX_TABLE.'group_access';
+      $query.= ' (cat_id,group_id) VALUES';
+      $query.= ' ('.$page['cat'].','.$row['id'].')';
+      $query.= ';';
+      mysql_query( $query );
+    }
+  }
+  // users access update
+  $query = 'DELETE';
+  $query.= ' FROM '.PREFIX_TABLE.'user_access';
+  $query.= ' WHERE cat_id = '.$page['cat'];
+  $query.= ';';
+  mysql_query( $query );
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'users';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $radioname = 'useraccess-'.$row['id'];
+    if ( $_POST[$radioname] == 0 )
+    {
+      $query = 'INSERT INTO '.PREFIX_TABLE.'user_access';
+      $query.= ' (cat_id,user_id) VALUES';
+      $query.= ' ('.$page['cat'].','.$row['id'].')';
+      $query.= ';';
+      mysql_query( $query );
+    }
+    check_favorites( $row['id'] );
+  }
+  // resynchronize all users
+  synchronize_all_users();
+}
+//---------------------------------------------------------------------- groups
+$query = 'SELECT id,name';
+$query.= ' FROM '.PREFIX_TABLE.'groups';
+$query. ';';
+$result = mysql_query( $query );
+if ( mysql_num_rows( $result ) > 0 )
+{
+  $vtp->addSession( $sub, 'groups' );
+  // creating an array with all authorized groups for this category
+  $query = 'SELECT group_id';
+  $query.= ' FROM '.PREFIX_TABLE.'group_access';
+  $query.= ' WHERE cat_id = '.$_GET['cat_id'];
+  $query.= ';';
+  $subresult = mysql_query( $query );
+  $authorized_groups = array();
+  while ( $subrow = mysql_fetch_array( $subresult ) )
+  {
+    array_push( $authorized_groups, $subrow['group_id'] );
+  }
+  // displaying each group
+  while( $row = mysql_fetch_array( $result ) )
+  {
+    $vtp->addSession( $sub, 'group' );
+    if ( in_array( $row['id'], $authorized_groups ) )
+    {
+      $vtp->setVar( $sub, 'group.color', 'green' );
+      $vtp->setVar( $sub, 'group.authorized_checked', ' checked="checked"' );
+    }
+    else
+    {
+      $vtp->setVar( $sub, 'group.color', 'red' );
+      $vtp->setVar( $sub, 'group.forbidden_checked', ' checked="checked"' );
+    }
+    $vtp->setVar( $sub, 'group.groupname', $row['name'] );
+    $vtp->setVar( $sub, 'group.id', $row['id'] );
+    $url = './admin.php?page=group_perm&amp;group_id='.$row['id'];
+    $vtp->setVar( $sub, 'group.group_perm_link', add_session_id( $url ) );
+    $vtp->closeSession( $sub, 'group' );
+  }
+  $vtp->closeSession( $sub, 'groups' );
+}
+//----------------------------------------------------------------------- users
+$query = 'SELECT id,username,status';
+$query.= ' FROM '.PREFIX_TABLE.'users';
+// only the webmaster can modify webmaster's permissions
+if ( $user['username'] != $conf['webmaster'] )
+{
+  $query.= " WHERE username != '".$conf['webmaster']."'";
+}
+$query.= ';';
+$result = mysql_query( $query );
+while ( $row = mysql_fetch_array( $result ) )
+{
+  $vtp->addSession( $sub, 'user' );
+  $vtp->setVar( $sub, 'user.id', $row['id'] );
+  $url = add_session_id( './admin.php?page=user_perm&amp;user_id='.$row['id']);
+  $vtp->setVar( $sub, 'user.user_perm_link', $url);
+  if ( $row['username'] == 'guest' )
+  {
+    $row['username'] = $lang['guest'];
+  }
+  $vtp->setVar( $sub, 'user.username', $row['username'] );
+
+  // for color of user : (red means access forbidden, green authorized) we
+  // ask all forbidden categories, including the groups rights
+  $restrictions = get_user_restrictions( $row['id'], $row['status'], false );
+  $is_user_allowed = is_user_allowed( $page['cat'], $restrictions );
+  if ( $is_user_allowed == 0 )
+  {
+    $vtp->setVar( $sub, 'user.color', 'green' );
+  }
+  else
+  {
+    $vtp->setVar( $sub, 'user.color', 'red' );
+  }
+  // for permission update button, we only ask forbidden categories for the
+  // user, not taking into account the groups the user belongs to
+  $restrictions = get_user_restrictions($row['id'],$row['status'],false,false);
+  $is_user_allowed = is_user_allowed( $page['cat'], $restrictions );
+  if ( $is_user_allowed == 2 )
+  {
+    $vtp->addSession( $sub, 'parent_forbidden' );
+    $url = './admin.php?page=cat_perm&amp;cat_id='.$page['id_uppercat'];
+    $vtp->setVar( $sub, 'parent_forbidden.url', add_session_id( $url ) );
+    $vtp->closeSession( $sub, 'parent_forbidden' );
+  }
+  if ( $is_user_allowed == 0 )
+  {
+    $vtp->setVar( $sub, 'user.authorized_checked', ' checked="checked"' );
+  }
+  else
+  {
+    $vtp->setVar( $sub, 'user.forbidden_checked', ' checked="checked"' );
+  }
+  // user's group(s)
+  $query = 'SELECT g.name as groupname, g.id as groupid';
+  $query.= ' FROM '.PREFIX_TABLE.'groups as g';
+  $query.= ', '.PREFIX_TABLE.'user_group as ug';
+  $query.= ' WHERE ug.group_id = g.id';
+  $query.= ' AND ug.user_id = '.$row['id'];
+  $query.= ';';
+  $subresult = mysql_query( $query );
+  if ( mysql_num_rows( $subresult ) > 0 )
+  {
+    $vtp->addSession( $sub, 'usergroups' );
+    $i = 0;
+    while( $subrow = mysql_fetch_array( $subresult ) )
+    {
+      $vtp->addSession( $sub, 'usergroup' );
+      if ( in_array( $subrow['groupid'], $authorized_groups ) )
+      {
+        $vtp->setVar( $sub, 'usergroup.color', 'green' );
+      }
+      else
+      {
+        $vtp->setVar( $sub, 'usergroup.color', 'red' );
+      }
+      $vtp->setVar( $sub, 'usergroup.name', $subrow['groupname'] );
+      if ( $i < mysql_num_rows( $subresult ) - 1 )
+      {
+        $vtp->setVar( $sub, 'usergroup.separation', ',' );
+      }
+      $vtp->closeSession( $sub, 'usergroup' );
+      $i++;
+    }
+    $vtp->closeSession( $sub, 'usergroups' );
+  }
+  $vtp->closeSession( $sub, 'user' );
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/comments.php
===================================================================
--- /branches/1.3/admin/comments.php	(revision 3252)
+++ /branches/1.3/admin/comments.php	(revision 3252)
@@ -0,0 +1,270 @@
+<?php
+/***************************************************************************
+ *                               comments.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+include_once( './include/isadmin.inc.php' );
+$page['plain_structure'] = get_plain_structure();
+//------------------------------------------------------------------- functions
+function display_pictures( $mysql_result, $maxtime, $validation_box = false )
+{
+  global $vtp,$sub,$lang,$conf,
+    $array_cat_directories,$array_cat_site_id,$array_cat_names;
+
+  while ( $row = mysql_fetch_array( $mysql_result ) )
+  {
+    $vtp->addSession( $sub, 'picture' );
+    // 2. for each picture, getting informations for displaying thumbnail and
+    //    link to the full size picture
+    $query = 'SELECT name,file,storage_category_id as cat_id,tn_ext';
+    $query.= ' FROM '.PREFIX_TABLE.'images';
+    $query.= ' WHERE id = '.$row['image_id'];
+    $query.= ';';
+    $subresult = mysql_query( $query );
+    $subrow = mysql_fetch_array( $subresult );
+
+    if ( !isset( $array_cat_directories[$subrow['cat_id']] ) )
+    {
+      $array_cat_directories[$subrow['cat_id']] =
+        get_complete_dir( $subrow['cat_id'] );
+      $cat_result = get_cat_info( $subrow['cat_id'] );
+      $array_cat_site_id[$subrow['cat_id']] = $cat_result['site_id'];
+      $array_cat_names[$subrow['cat_id']] =
+        get_cat_display_name( $cat_result['name'], ' &gt; ', '' );
+    }
+
+    $file = get_filename_wo_extension( $subrow['file'] );
+    // name of the picture
+    $name = $array_cat_names[$subrow['cat_id']].' &gt; ';
+    if ( isset( $subrow['name'] ) and $subrow['name'] != '' )
+    {
+      $name.= $subrow['name'];
+    }
+    else
+    {
+      $name.= str_replace( '_', ' ', $file );
+    }
+    $name.= ' [ '.$subrow['file'].' ]';
+    $vtp->setVar( $sub, 'picture.title', $name );
+    // source of the thumbnail picture
+    $src = '';
+    if ( $array_cat_site_id[$subrow['cat_id']] == 1 )
+    {
+      $src.= '.';
+    }
+    $src.= $array_cat_directories[$subrow['cat_id']];
+    $src.= 'thumbnail/'.$conf['prefix_thumbnail'];
+    $src.= $file.'.'.$subrow['tn_ext'];
+    $vtp->setVar( $sub, 'picture.thumb_src', $src );
+    // link to the full size picture
+    $url = '../picture.php?cat='.$subrow['cat_id'];
+    $url.= '&amp;image_id='.$row['image_id'];
+    $vtp->setVar( $sub, 'picture.thumb_url', add_session_id( $url ) );
+    // 3. for each picture, retrieving all comments
+    $query = 'SELECT id,date,author,content';
+    $query.= ' FROM '.PREFIX_TABLE.'comments';
+    $query.= ' WHERE image_id = '.$row['image_id'];
+    $query.= ' AND date > '.$maxtime;
+    if ( $validation_box ) $query.= " AND validated = 'false'";
+    $query.= ' ORDER BY date DESC';
+    $query.= ';';
+    $subresult = mysql_query( $query );
+    while ( $subrow = mysql_fetch_array( $subresult ) )
+    {
+      $vtp->addSession( $sub, 'comment' );
+      $author = $subrow['author'];
+      if ( $subrow['author'] == '' ) $author = $lang['guest'];
+      $vtp->setVar( $sub, 'comment.author', $author );
+      $displayed_date = format_date( $subrow['date'], 'unix', true );
+      $vtp->setVar( $sub, 'comment.date', $displayed_date );
+
+      $content = nl2br( $subrow['content'] );
+      
+      // replace _word_ by an underlined word
+      $pattern = '/_([^\s]*)_/';
+      $replacement = '<span style="text-decoration:underline;">\1</span>';
+      $content = preg_replace( $pattern, $replacement, $content );
+      
+      // replace *word* by a bolded word
+      $pattern = '/\*([^\s]*)\*/';
+      $replacement = '<span style="font-weight:bold;">\1</span>';
+      $content = preg_replace( $pattern, $replacement, $content );
+
+      // replace /word/ by an italic word
+      $pattern = '/\/([^\s]*)\//';
+      $replacement = '<span style="font-style:italic;">\1</span>';
+      $content = preg_replace( $pattern, $replacement, $content );
+
+      $vtp->setVar( $sub, 'comment.content', $content );
+
+      $vtp->addSession( $sub, 'delete' );
+      $url = './admin.php?page=comments';
+      if ( isset( $_GET['last_days'] ) ) $url.= '&amp;last_days='.MAX_DAYS;
+      if ( isset( $_GET['show_unvalidated'] ) )
+        $url.= '&amp;show_unvalidated=true';
+      $url.= '&amp;del='.$subrow['id'];
+      $vtp->setVar( $sub, 'delete.link', add_session_id( $url ) );
+      $vtp->closeSession( $sub, 'delete' );
+      // if the comment has to be validated, we display a checkbox
+      if ( $validation_box )
+      {
+        $vtp->addSession( $sub, 'validation' );
+        $vtp->setVar( $sub, 'validation.id', $subrow['id'] );
+        $vtp->closeSession( $sub, 'validation' );
+      }
+      $vtp->closeSession( $sub, 'comment' );
+    }
+    $vtp->closeSession( $sub, 'picture' );
+  }
+}
+//------------------------------------------------------------ comment deletion
+if ( isset( $_GET['del'] ) and is_numeric( $_GET['del'] ) )
+{
+  $query = 'DELETE FROM '.PREFIX_TABLE.'comments';
+  $query.= ' WHERE id = '.$_GET['del'];
+  $query.= ';';
+  mysql_query( $query );
+}
+//--------------------------------------------------------- comments validation
+if ( isset( $_POST['submit'] ) )
+{
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'comments';
+  $query.= " WHERE validated = 'false'";
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    if ( $_POST['validate-'.$row['id']] == 'true' )
+    {
+      $query = 'UPDATE '.PREFIX_TABLE.'comments';
+      $query.= " SET validated = 'true'";
+      $query.= ' WHERE id = '.$row['id'];
+      $query.= ';';
+      mysql_query( $query );
+    }
+  }
+}
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/comments.vtp' );
+$tpl = array( 'stats_last_days','delete','close','submit','open' );
+templatize_array( $tpl, 'lang', $sub );
+$vtp->setGlobalVar( $sub, 'user_template', $user['template'] );
+//--------------------------------------------------- number of days to display
+if ( isset( $_GET['last_days'] ) ) define( 'MAX_DAYS', $_GET['last_days'] );
+else                               define( 'MAX_DAYS', 0 );
+//----------------------------------------- non specific section initialization
+$array_cat_directories = array();
+$array_cat_names       = array();
+$array_cat_site_id     = array();
+//------------------------------------------------------- last comments display
+$vtp->addSession( $sub, 'section' );
+$vtp->setVar( $sub, 'section.title', $lang['comments_last_title'] );
+$vtp->addSession( $sub, 'last_days' );
+foreach ( $conf['last_days'] as $option ) {
+  $vtp->addSession( $sub, 'last_day_option' );
+  $vtp->setVar( $sub, 'last_day_option.option', $option );
+  $url = './admin.php?page=comments';
+  $url.= '&amp;last_days='.($option - 1);
+  $vtp->setVar( $sub, 'last_day_option.link', add_session_id( $url ) );
+  if ( $option == MAX_DAYS + 1 )
+  {
+    $vtp->setVar( $sub, 'last_day_option.style', 'font-weight:bold;');
+  }
+  $vtp->closeSession( $sub, 'last_day_option' );
+}
+$vtp->closeSession( $sub, 'last_days' );
+if ( isset( $_GET['last_days'] ) )
+{
+  $vtp->addSession( $sub, 'close' );
+  $url = './admin.php?page=comments';
+  if ( isset( $_GET['show_unvalidated'] ) )
+  {
+    $url.= '&amp;show_unvalidated='.$_GET['show_unvalidated'];
+  }
+  $vtp->setVar( $sub, 'close.url', add_session_id( $url ) );
+  $vtp->closeSession( $sub, 'close' );
+  // 1. retrieving picture ids which have comments recently added
+  $date = date( 'Y-m-d', time() - ( MAX_DAYS*24*60*60 ) );
+  list($year,$month,$day) = explode( '-', $date);
+  $maxtime = mktime( 0,0,0,$month,$day,$year );
+  $query = 'SELECT DISTINCT(image_id) as image_id';
+  $query.= ' FROM '.PREFIX_TABLE.'comments';
+  $query.=     ', '.PREFIX_TABLE.'images as images';
+  $query.= ' WHERE image_id = images.id';
+  $query.= ' AND date > '.$maxtime;
+  $query.= ' ORDER BY date_available DESC';
+  $query.= ';';
+  $result = mysql_query( $query );
+  display_pictures( $result, $maxtime );
+}
+$vtp->closeSession( $sub, 'section' );
+//---------------------------------------------- non validated comments display
+$vtp->addSession( $sub, 'section' );
+$vtp->setVar( $sub, 'section.title', $lang['comments_non_validated_title'] );
+if ( isset( $_GET['show_unvalidated'] ) )
+{
+  // form starts
+  $vtp->addSession( $sub, 'start_form' );
+  $action = './admin.php?page=comments';
+  if ( isset( $_GET['last_days'] ) )
+  {
+    $action.= '&amp;last_days='.$_GET['last_days'];
+  }
+  $action.= '&amp;show_unvalidated=true';
+  $vtp->setVar( $sub, 'start_form.action', add_session_id( $action ) );
+  $vtp->closeSession( $sub, 'start_form' );
+  // close this section ?
+  $vtp->addSession( $sub, 'close' );
+  $url = './admin.php?page=comments';
+  if ( isset( $_GET['last_days'] ) )
+  {
+    $url.= '&amp;last_days='.$_GET['last_days'];
+  }
+  $vtp->setVar( $sub, 'close.url', add_session_id( $url ) );
+  $vtp->closeSession( $sub, 'close' );
+  // retrieving all picture ids which have unvalidated comments
+  $query = 'SELECT DISTINCT(image_id) as image_id';
+  $query.= ' FROM '.PREFIX_TABLE.'comments as comments';
+  $query.=     ', '.PREFIX_TABLE.'images as images';
+  $query.= ' WHERE image_id = images.id';
+  $query.= " AND comments.validated = 'false'";
+  $query.= ' ORDER BY date_available DESC';
+  $query.= ';';
+  $result = mysql_query( $query );
+  display_pictures( $result, 0, true );
+  $vtp->addSession( $sub, 'submit' );
+  $vtp->closeSession( $sub, 'submit' );
+  // form ends
+  $vtp->addSession( $sub, 'end_form' );
+  $vtp->closeSession( $sub, 'end_form' );
+}
+else
+{
+  $vtp->addSession( $sub, 'open' );
+  $url = './admin.php?page=comments';
+  if ( isset( $_GET['last_days'] ) )
+  {
+    $url.= '&amp;last_days='.$_GET['last_days'];
+  }
+  $url.= '&amp;show_unvalidated=true';
+  $vtp->setVar( $sub, 'open.url', add_session_id( $url ) );
+  $vtp->closeSession( $sub, 'open' );
+}
+$vtp->closeSession( $sub, 'section' );
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle, 'sub', $sub );
+?>
Index: /branches/1.3/admin/configuration.php
===================================================================
--- /branches/1.3/admin/configuration.php	(revision 3252)
+++ /branches/1.3/admin/configuration.php	(revision 3252)
@@ -0,0 +1,1003 @@
+<?
+/***************************************************************************
+ *                             configuration.php                           *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+include_once( './include/isadmin.inc.php' );
+	
+$Caracs = array("¥" => "Y", "µ" => "u", "À" => "A", "Á" => "A", 
+                "Â" => "A", "Ã" => "A", "Ä" => "A", "Å" => "A", 
+                "Æ" => "A", "Ç" => "C", "È" => "E", "É" => "E", 
+                "Ê" => "E", "Ë" => "E", "Ì" => "I", "Í" => "I", 
+                "Î" => "I", "Ï" => "I", "Ð" => "D", "Ñ" => "N", 
+                "Ò" => "O", "Ó" => "O", "Ô" => "O", "Õ" => "O", 
+                "Ö" => "O", "Ø" => "O", "Ù" => "U", "Ú" => "U", 
+                "Û" => "U", "Ü" => "U", "Ý" => "Y", "ß" => "s", 
+                "à" => "a", "á" => "a", "â" => "a", "ã" => "a", 
+                "ä" => "a", "å" => "a", "æ" => "a", "ç" => "c", 
+                "è" => "e", "é" => "e", "ê" => "e", "ë" => "e", 
+                "ì" => "i", "í" => "i", "î" => "i", "ï" => "i", 
+                "ð" => "o", "ñ" => "n", "ò" => "o", "ó" => "o", 
+                "ô" => "o", "õ" => "o", "ö" => "o", "ø" => "o", 
+                "ù" => "u", "ú" => "u", "û" => "u", "ü" => "u", 
+                "ý" => "y", "ÿ" => "y");
+//------------------------------ verification and registration of modifications
+$conf_infos =
+array( 'prefix_thumbnail','webmaster','mail_webmaster','access',
+       'session_id_size','session_time','session_keyword','max_user_listbox',
+       'show_comments','nb_comment_page','upload_available',
+       'upload_maxfilesize', 'upload_maxwidth','upload_maxheight',
+       'upload_maxwidth_thumbnail','upload_maxheight_thumbnail','log',
+       'comments_validation','comments_forall','authorize_cookies',
+       'mail_notification' );
+$default_user_infos =
+array( 'nb_image_line','nb_line_page','language','maxwidth',
+       'maxheight','expand','show_nb_comments','short_period','long_period',
+       'template' );
+$error = array();
+if ( isset( $_POST['submit'] ) )
+{
+  $int_pattern = '/^\d+$/';
+  // empty session table if asked
+  if ( $_POST['empty_session_table'] == 1 )
+  {
+    $query = 'DELETE FROM '.PREFIX_TABLE.'sessions';
+    $query.= ' WHERE expiration < '.time().';';
+    mysql_query( $query );
+  }
+  // deletion of site as asked
+  $site_deleted = false;
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'sites';
+  $query.= " WHERE galleries_url <> './galleries/';";
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $site = 'delete_site_'.$row['id'];
+    if ( $_POST[$site] == 1 )
+    {
+      delete_site( $row['id'] );
+      $site_deleted = true;
+    }
+  }
+  // if any picture of this site were linked to another categories, we have
+  // to update the informations of those categories. To make it simple, we
+  // just update all the categories
+  if ( $site_deleted )
+  {
+    update_category( 'all' );
+    synchronize_all_users();
+  }
+  // thumbnail prefix must not contain accentuated characters
+  $old_prefix = $_POST['prefix_thumbnail'];
+  $prefix = strtr( $_POST['prefix_thumbnail'], $Caracs );
+  if ( $old_prefix != $prefix )
+  {
+    array_push( $error, $lang['conf_err_prefixe'] );
+  }
+  // mail must be formatted as follows : name@server.com
+  $pattern = '/^[\w-]+(\.[\w-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/';
+  if ( !preg_match( $pattern, $_POST['mail_webmaster'] ) )
+  {
+    array_push( $error, $lang['conf_err_mail'] );
+  }
+  // periods must be integer values, they represents number of days
+  if ( !preg_match( $int_pattern, $_POST['short_period'] )
+       or !preg_match( $int_pattern, $_POST['long_period'] ) )
+  {
+    array_push( $error, $lang['err_periods'] );
+  }
+  else
+  {
+    // long period must be longer than short period
+    if ( $_POST['long_period'] <= $_POST['short_period']
+         or $_POST['short_period'] <= 0 )
+    {
+      array_push( $error, $lang['err_periods_2'] );
+    }
+  }
+  // session_id size must be an integer between 4 and 50
+  if ( !preg_match( $int_pattern, $_POST['session_id_size'] )
+       or $_POST['session_id_size'] < 4
+       or $_POST['session_id_size'] > 50 )
+  {
+    array_push( $error, $lang['conf_err_sid_size'] );
+  }
+  // session_time must be an integer between 5 and 60, in minutes
+  if ( !preg_match( $int_pattern, $_POST['session_time'] )
+       or $_POST['session_time'] < 5
+       or $_POST['session_time'] > 60 )
+  {
+    array_push( $error, $lang['conf_err_sid_time'] );
+  }
+  // max_user_listbox must be an integer between 0 and 255 included
+  if ( !preg_match( $int_pattern, $_POST['max_user_listbox'] )
+       or $_POST['max_user_listbox'] < 0
+       or $_POST['max_user_listbox'] > 255 )
+  {
+    array_push( $error, $lang['conf_err_max_user_listbox'] );
+  }
+  // the number of comments per page must be an integer between 5 and 50
+  // included
+  if ( !preg_match( $int_pattern, $_POST['nb_comment_page'] )
+       or $_POST['nb_comment_page'] < 5
+       or $_POST['nb_comment_page'] > 50 )
+  {
+    array_push( $error, $lang['conf_err_comment_number'] );
+  }
+  // the maximum upload filesize must be an integer between 10 and 1000
+  if ( !preg_match( $int_pattern, $_POST['upload_maxfilesize'] )
+       or $_POST['upload_maxfilesize'] < 10
+       or $_POST['upload_maxfilesize'] > 1000 )
+  {
+    array_push( $error, $lang['conf_err_upload_maxfilesize'] );
+  }
+  // the maximum width of uploaded pictures must be an integer superior to
+  // 10
+  if ( !preg_match( $int_pattern, $_POST['upload_maxwidth'] )
+       or $_POST['upload_maxwidth'] < 10 )
+  {
+    array_push( $error, $lang['conf_err_upload_maxwidth'] );
+  }
+  // the maximum height  of uploaded pictures must be an integer superior to
+  // 10
+  if ( !preg_match( $int_pattern, $_POST['upload_maxheight'] )
+       or $_POST['upload_maxheight'] < 10 )
+  {
+    array_push( $error, $lang['conf_err_upload_maxheight'] );
+  }
+  // the maximum width of uploaded thumbnails must be an integer superior to
+  // 10
+  if ( !preg_match( $int_pattern, $_POST['upload_maxwidth_thumbnail'] )
+       or $_POST['upload_maxwidth_thumbnail'] < 10 )
+  {
+    array_push( $error, $lang['conf_err_upload_maxwidth_thumbnail'] );
+  }
+  // the maximum width of uploaded thumbnails must be an integer superior to
+  // 10
+  if ( !preg_match( $int_pattern, $_POST['upload_maxheight_thumbnail'] )
+       or $_POST['upload_maxheight_thumbnail'] < 10 )
+  {
+    array_push( $error, $lang['conf_err_upload_maxheight_thumbnail'] );
+  }
+
+  if ( $_POST['maxwidth'] != ''
+       and ( !preg_match( $int_pattern, $_POST['maxwidth'] )
+             or $_POST['maxwidth'] < 50 ) )
+  {
+    array_push( $error, $lang['err_maxwidth'] );
+  }
+  if ( $_POST['maxheight']
+       and ( !preg_match( $int_pattern, $_POST['maxheight'] )
+             or $_POST['maxheight'] < 50 ) )
+  {
+    array_push( $error, $lang['err_maxheight'] );
+  }
+  // updating configuraiton if no error found
+  if ( count( $error ) == 0 )
+  {
+    mysql_query( 'DELETE FROM '.PREFIX_TABLE.'config;' );
+    $query = 'INSERT INTO '.PREFIX_TABLE.'config';
+    $query.= ' (';
+    foreach ( $conf_infos as $i => $conf_info ) {
+      if ( $i > 0 ) $query.= ',';
+      $query.= $conf_info;
+    }
+    $query.= ')';
+    $query.= ' VALUES';
+    $query.= ' (';
+    foreach ( $conf_infos as $i => $conf_info ) {
+      if ( $i > 0 ) $query.= ',';
+      if ( $_POST[$conf_info] == '' ) $query.= 'NULL';
+      else                            $query.= "'".$_POST[$conf_info]."'";
+    }
+    $query.= ')';
+    $query.= ';';
+    mysql_query( $query );
+
+    $query = 'UPDATE '.PREFIX_TABLE.'users';
+    $query.= ' SET';
+    foreach ( $default_user_infos as $i => $default_user_info ) {
+      if ( $i > 0 ) $query.= ',';
+      else          $query.= ' ';
+      $query.= $default_user_info;
+      $query.= ' = ';
+      if ( $_POST[$default_user_info] == '' )
+      {
+        $query.= 'NULL';
+      }
+      else
+      {
+        $query.= "'".$_POST[$default_user_info]."'";
+      }
+    }
+    $query.= " WHERE username = 'guest'";
+    $query.= ';';
+    mysql_query( $query );
+  }
+//--------------------------------------------------------- data initialization
+  foreach ( $conf_infos as $conf_info ) {
+    $$conf_info = $_POST[$conf_info];
+  }
+  foreach ( $default_user_infos as $default_user_info ) {
+    $$default_user_info = $_POST[$default_user_info];
+  }
+}
+else
+{
+//--------------------------------------------------------- data initialization
+  $query  = 'SELECT '.implode( ',', $conf_infos );
+  $query .= ' FROM '.PREFIX_TABLE.'config;';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  foreach ( $conf_infos as $info ) {
+    if ( isset( $row[$info] ) ) $$info = $row[$info];
+    else                        $$info = '';
+  }
+
+  $query  = 'SELECT '.implode( ',', $default_user_infos );
+  $query.= ' FROM '.PREFIX_TABLE.'users';
+  $query.= " WHERE username = 'guest'";
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  foreach ( $default_user_infos as $info ) {
+    if ( isset( $row[$info] ) ) $$info = $row[$info];
+    else                        $$info = '';
+  }
+}
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open(
+  '../template/'.$user['template'].'/admin/configuration.vtp' );
+
+$tpl = array( 'conf_confirmation','remote_site','delete',
+              'conf_remote_site_delete_info','submit','errors_title' );
+templatize_array( $tpl, 'lang', $sub );
+//-------------------------------------------------------------- errors display
+if ( sizeof( $error ) != 0 )
+{
+  $vtp->addSession( $sub, 'errors' );
+  for ( $i = 0; $i < sizeof( $error ); $i++ )
+  {
+    $vtp->addSession( $sub, 'li' );
+    $vtp->setVar( $sub, 'li.li', $error[$i] );
+    $vtp->closeSession( $sub, 'li' );
+  }
+  $vtp->closeSession( $sub, 'errors' );
+}
+//-------------------------------------------------------- confirmation display
+if ( count( $error ) == 0 and isset( $_POST['submit'] ) )
+{
+  $vtp->addSession( $sub, 'confirmation' );
+  $vtp->closeSession( $sub, 'confirmation' );
+}
+//----------------------------------------------------------------- form action
+$form_action = add_session_id( './admin.php?page=configuration' );
+$vtp->setVar( $sub, 'form_action', $form_action );
+//------------------------------------------------------- general configuration
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'title_line' );
+$vtp->setVar( $sub, 'title_line.title', $lang['conf_general_title'] );
+$vtp->closeSession( $sub, 'title_line' );
+$vtp->closeSession( $sub, 'line' );
+
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'line' );
+// webmaster name
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_general_webmaster'] );
+$vtp->addSession( $sub, 'hidden' );
+$vtp->setVar( $sub, 'hidden.text', $webmaster );
+$vtp->setVar( $sub, 'hidden.name', 'webmaster' );
+$vtp->setVar( $sub, 'hidden.value', $webmaster );
+$vtp->closeSession( $sub, 'hidden' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_general_webmaster_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// webmaster mail address
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_general_mail'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'mail_webmaster' );
+$vtp->setVar( $sub, 'text.value', $mail_webmaster );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_general_mail_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// prefix for thumbnails
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_general_prefix'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'prefix_thumbnail' );
+$vtp->setVar( $sub, 'text.value', $prefix_thumbnail );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_general_prefix_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// access type
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_general_access'] );
+$vtp->addSession( $sub, 'group' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'access' );
+$vtp->setVar( $sub, 'radio.value', 'free' );
+$vtp->setVar( $sub, 'radio.option', $lang['conf_general_access_1'] );
+$checked = '';
+if ( $access == 'free' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'access' );
+$vtp->setVar( $sub, 'radio.value', 'restricted' );
+$vtp->setVar( $sub, 'radio.option', $lang['conf_general_access_2'] );
+$checked = '';
+if ( $access == 'restricted' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->closeSession( $sub, 'group' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_general_access_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// maximum user number to display in the listbox of identification page
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name',
+              $lang['conf_general_max_user_listbox'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'max_user_listbox' );
+$vtp->setVar( $sub, 'text.value', $max_user_listbox );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def',
+              $lang['conf_general_max_user_listbox_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// activate log
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_general_log'] );
+$vtp->addSession( $sub, 'group' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'log' );
+$vtp->setVar( $sub, 'radio.value', 'true' );
+$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
+$checked = '';
+if ( $log == 'true' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'log' );
+$vtp->setVar( $sub, 'radio.value', 'false' );
+$vtp->setVar( $sub, 'radio.option', $lang['no'] );
+$checked = '';
+if ( $log == 'false' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->closeSession( $sub, 'group' );
+$vtp->setVar( $sub, 'param_line.def',
+              $lang['conf_general_log_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// mail notification for admins
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name',
+              $lang['conf_general_mail_notification'] );
+$vtp->addSession( $sub, 'group' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'mail_notification' );
+$vtp->setVar( $sub, 'radio.value', 'true' );
+$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
+$checked = '';
+if ( $mail_notification == 'true' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'mail_notification' );
+$vtp->setVar( $sub, 'radio.value', 'false' );
+$vtp->setVar( $sub, 'radio.option', $lang['no'] );
+$checked = '';
+if ( $mail_notification == 'false' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->closeSession( $sub, 'group' );
+$vtp->setVar( $sub, 'param_line.def',
+              $lang['conf_general_mail_notification_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'line' );
+//------------------------------------------------------ comments configuration
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'title_line' );
+$vtp->setVar( $sub, 'title_line.title', $lang['conf_comments_title'] );
+$vtp->closeSession( $sub, 'title_line' );
+$vtp->closeSession( $sub, 'line' );
+
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'line' );
+// show comments ?
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_comments_show_comments'] );
+$vtp->addSession( $sub, 'group' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'show_comments' );
+$vtp->setVar( $sub, 'radio.value', 'true' );
+$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
+$checked = '';
+if ( $show_comments == 'true' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'show_comments' );
+$vtp->setVar( $sub, 'radio.value', 'false' );
+$vtp->setVar( $sub, 'radio.option', $lang['no'] );
+$checked = '';
+if ( $show_comments == 'false' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->closeSession( $sub, 'group' );
+$vtp->setVar( $sub, 'param_line.def',
+              $lang['conf_comments_show_comments_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// coments for all ? true -> guests can post messages
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_comments_forall'] );
+$vtp->addSession( $sub, 'group' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'comments_forall' );
+$vtp->setVar( $sub, 'radio.value', 'true' );
+$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
+$checked = '';
+if ( $comments_forall == 'true' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'comments_forall' );
+$vtp->setVar( $sub, 'radio.value', 'false' );
+$vtp->setVar( $sub, 'radio.option', $lang['no'] );
+$checked = '';
+if ( $comments_forall == 'false' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->closeSession( $sub, 'group' );
+$vtp->setVar( $sub, 'param_line.def',
+              $lang['conf_comments_forall_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// number of comments per page
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name',
+              $lang['conf_comments_comments_number'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'nb_comment_page' );
+$vtp->setVar( $sub, 'text.value', $nb_comment_page );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def',
+              $lang['conf_comments_comments_number_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// coments validation
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_comments_validation'] );
+$vtp->addSession( $sub, 'group' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'comments_validation' );
+$vtp->setVar( $sub, 'radio.value', 'true' );
+$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
+$checked = '';
+if ( $comments_validation == 'true' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'comments_validation' );
+$vtp->setVar( $sub, 'radio.value', 'false' );
+$vtp->setVar( $sub, 'radio.option', $lang['no'] );
+$checked = '';
+if ( $comments_validation == 'false' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->closeSession( $sub, 'group' );
+$vtp->setVar( $sub, 'param_line.def',
+              $lang['conf_comments_validation_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'line' );
+//-------------------------------------------------- default user configuration
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'title_line' );
+$vtp->setVar( $sub, 'title_line.title', $lang['conf_default_title'] );
+$vtp->closeSession( $sub, 'title_line' );
+$vtp->closeSession( $sub, 'line' );
+
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'line' );
+// default language
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['customize_language'] );
+$vtp->addSession( $sub, 'select' );
+$vtp->setVar( $sub, 'select.name', 'language' );
+$option = get_languages( '../language/' );
+for ( $i = 0; $i < sizeof( $option ); $i++ )
+{
+  $vtp->addSession( $sub, 'option' );
+  $vtp->setVar( $sub, 'option.option', $option[$i] );
+  if ( $option[$i] == $language )
+  {
+    $vtp->setVar( $sub, 'option.selected', ' selected="selected"' );
+  }
+  $vtp->closeSession( $sub, 'option' );
+}
+$vtp->closeSession( $sub, 'select' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_language_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// number of image per row
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['customize_nb_image_per_row'] );
+$vtp->addSession( $sub, 'select' );
+$vtp->setVar( $sub, 'select.name', 'nb_image_line' );
+for ( $i = 0; $i < sizeof( $conf['nb_image_row'] ); $i++ )
+{
+  $vtp->addSession( $sub, 'option' );
+  $vtp->setVar( $sub, 'option.option', $conf['nb_image_row'][$i] );
+  if ( $conf['nb_image_row'][$i] == $nb_image_line )
+  {
+    $vtp->setVar( $sub, 'option.selected', ' selected="selected"' );
+  }
+  $vtp->closeSession( $sub, 'option' );
+}
+$vtp->closeSession( $sub, 'select' );
+$vtp->setVar( $sub, 'param_line.def',
+              $lang['conf_default_nb_image_per_row_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// number of row per page
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['customize_nb_row_per_page'] );
+$vtp->addSession( $sub, 'select' );
+$vtp->setVar( $sub, 'select.name', 'nb_line_page' );
+for ( $i = 0; $i < sizeof( $conf['nb_row_page'] ); $i++ )
+{
+  $vtp->addSession( $sub, 'option' );
+  $vtp->setVar( $sub, 'option.option', $conf['nb_row_page'][$i] );
+  if ( $conf['nb_row_page'][$i] == $nb_line_page )
+  {
+    $vtp->setVar( $sub, 'option.selected', ' selected="selected"' );
+  }
+  $vtp->closeSession( $sub, 'option' );
+}
+$vtp->closeSession( $sub, 'select' );
+$vtp->setVar( $sub, 'param_line.def',
+              $lang['conf_default_nb_row_per_page_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// template
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['customize_theme'] );
+$vtp->addSession( $sub, 'select' );
+$vtp->setVar( $sub, 'select.name', 'template' );
+$option = get_dirs( '../template' );
+for ( $i = 0; $i < sizeof( $option ); $i++ )
+{
+  $vtp->addSession( $sub, 'option' );
+  $vtp->setVar( $sub, 'option.option', $option[$i] );
+  if ( $option[$i] == $template )
+  {
+    $vtp->setVar( $sub, 'option.selected', ' selected="selected"' );
+  }
+  $vtp->closeSession( $sub, 'option' );
+}
+$vtp->closeSession( $sub, 'select' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_theme_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// short period time
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['customize_short_period'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'short_period' );
+$vtp->setVar( $sub, 'text.value', $short_period );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_short_period_info']);
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// long period time
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['customize_long_period'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'long_period' );
+$vtp->setVar( $sub, 'text.value', $long_period );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_long_period_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// max displayed width
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['maxwidth'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'maxwidth' );
+$vtp->setVar( $sub, 'text.value', $maxwidth );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_maxwidth_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// max displayed height
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['maxheight'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'maxheight' );
+$vtp->setVar( $sub, 'text.value', $maxheight );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_maxheight_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// expand all categories ?
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['customize_expand'] );
+$vtp->addSession( $sub, 'group' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'expand' );
+
+$vtp->setVar( $sub, 'radio.value', 'true' );
+$checked = '';
+if ( $expand == 'true' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'expand' );
+$vtp->setVar( $sub, 'radio.value', 'false' );
+$checked = '';
+if ( $expand == 'false' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->setVar( $sub, 'radio.option', $lang['no'] );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->closeSession( $sub, 'group' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_expand_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// show number of comments on thumbnails page
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['customize_show_nb_comments'] );
+$vtp->addSession( $sub, 'group' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'show_nb_comments' );
+$vtp->setVar( $sub, 'radio.value', 'true' );
+$checked = '';
+if ( $show_nb_comments == 'true' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'show_nb_comments' );
+$vtp->setVar( $sub, 'radio.value', 'false' );
+$checked = '';
+if ( $show_nb_comments == 'false' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->setVar( $sub, 'radio.option', $lang['no'] );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->closeSession( $sub, 'group' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_default_show_nb_comments_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'line' );
+//-------------------------------------------------------- upload configuration
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'title_line' );
+$vtp->setVar( $sub, 'title_line.title', $lang['conf_upload_title'] );
+$vtp->closeSession( $sub, 'title_line' );
+$vtp->closeSession( $sub, 'line' );
+
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'line' );
+// is upload available ?
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_upload_available'] );
+$vtp->addSession( $sub, 'group' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'upload_available' );
+$vtp->setVar( $sub, 'radio.value', 'true' );
+$checked = '';
+if ( $upload_available == 'true' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'upload_available' );
+$vtp->setVar( $sub, 'radio.value', 'false' );
+$checked = '';
+if ( $upload_available == 'false' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->setVar( $sub, 'radio.option', $lang['no'] );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->closeSession( $sub, 'group' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_upload_available_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// max filesize uploadable
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_upload_maxfilesize'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'upload_maxfilesize' );
+$vtp->setVar( $sub, 'text.value', $upload_maxfilesize );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_upload_maxfilesize_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// maxwidth uploadable
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_upload_maxwidth'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'upload_maxwidth' );
+$vtp->setVar( $sub, 'text.value', $upload_maxwidth );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_upload_maxwidth_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// maxheight uploadable
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_upload_maxheight'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'upload_maxheight' );
+$vtp->setVar( $sub, 'text.value', $upload_maxheight );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_upload_maxheight_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// maxwidth for thumbnail
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name',$lang['conf_upload_maxwidth_thumbnail']);
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'upload_maxwidth_thumbnail' );
+$vtp->setVar( $sub, 'text.value', $upload_maxwidth_thumbnail );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar($sub,'param_line.def',$lang['conf_upload_maxwidth_thumbnail_info']);
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// maxheight for thumbnail
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub,'param_line.name',$lang['conf_upload_maxheight_thumbnail']);
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'upload_maxheight_thumbnail' );
+$vtp->setVar( $sub, 'text.value', $upload_maxheight_thumbnail );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_upload_maxheight_thumbnail_info']);
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'line' );
+//------------------------------------------------------ sessions configuration
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'title_line' );
+$vtp->setVar( $sub, 'title_line.title', $lang['conf_session_title'] );
+$vtp->closeSession( $sub, 'title_line' );
+$vtp->closeSession( $sub, 'line' );
+
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'line' );
+// authorize cookies ?
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_session_cookie'] );
+$vtp->addSession( $sub, 'group' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'authorize_cookies' );
+$vtp->setVar( $sub, 'radio.value', 'true' );
+$checked = '';
+if ( $authorize_cookies == 'true' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->setVar( $sub, 'radio.option', $lang['yes'] );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->addSession( $sub, 'radio' );
+$vtp->setVar( $sub, 'radio.name', 'authorize_cookies' );
+$vtp->setVar( $sub, 'radio.value', 'false' );
+$checked = '';
+if ( $authorize_cookies == 'false' )
+{
+  $checked = ' checked="checked"';
+}
+$vtp->setVar( $sub, 'radio.checked', $checked );
+$vtp->setVar( $sub, 'radio.option', $lang['no'] );
+$vtp->closeSession( $sub, 'radio' );
+$vtp->closeSession( $sub, 'group' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_session_cookie_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// session size
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_session_size'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'session_id_size' );
+$vtp->setVar( $sub, 'text.value', $session_id_size );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_session_size_info']);
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// session length
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_session_time'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'session_time' );
+$vtp->setVar( $sub, 'text.value', $session_time );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_session_time_info']);
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// session keyword
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_session_key'] );
+$vtp->addSession( $sub, 'text' );
+$vtp->setVar( $sub, 'text.name', 'session_keyword' );
+$vtp->setVar( $sub, 'text.value', $session_keyword );
+$vtp->closeSession( $sub, 'text' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_session_key_info']);
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+// session deletion
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'param_line' );
+$vtp->setVar( $sub, 'param_line.name', $lang['conf_session_delete'] );
+$vtp->addSession( $sub, 'check' );
+$vtp->addSession( $sub, 'box' );
+$vtp->setVar( $sub, 'box.name', 'empty_session_table' );
+$vtp->setVar( $sub, 'box.value', '1' );
+$vtp->setVar( $sub, 'box.checked', ' checked="checked"' );
+$vtp->closeSession( $sub, 'box' );
+$vtp->closeSession( $sub, 'check' );
+$vtp->setVar( $sub, 'param_line.def', $lang['conf_session_delete_info'] );
+$vtp->closeSession( $sub, 'param_line' );
+$vtp->closeSession( $sub, 'line' );
+
+$vtp->addSession( $sub, 'line' );
+$vtp->addSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'space_line' );
+$vtp->closeSession( $sub, 'line' );
+//------------------------------------------------ remote sites administration 
+$query = 'select id,galleries_url';
+$query.= ' from '.PREFIX_TABLE.'sites';
+$query.= " where galleries_url <> './galleries/';";
+$result = mysql_query( $query );
+if ( mysql_num_rows( $result ) > 0 )
+{
+  $vtp->addSession( $sub, 'remote_sites' );
+  $i = 0;
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $vtp->addSession( $sub, 'site' );
+    $vtp->setVar( $sub, 'site.url', $row['galleries_url'] );
+    $vtp->setVar( $sub, 'site.id', $row['id'] );
+    if ( $i == 0 )
+    {
+      $vtp->addSession( $sub, 'rowspan' );
+      $vtp->setVar( $sub, 'rowspan.nb_sites', mysql_num_rows( $result ) );
+      $vtp->closeSession( $sub, 'rowspan' );
+    }
+    $vtp->closeSession( $sub, 'site' );
+    $i++;
+  }
+  $vtp->closeSession( $sub, 'remote_sites' );
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/create_listing_file.php
===================================================================
--- /branches/1.3/admin/create_listing_file.php	(revision 3252)
+++ /branches/1.3/admin/create_listing_file.php	(revision 3252)
@@ -0,0 +1,195 @@
+<?php
+/***************************************************************************
+ *                          create_listing_file.php                        *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+$conf['prefix_thumbnail'] = 'TN-';
+$conf['picture_ext'] = array ( 'jpg', 'gif', 'png', 'JPG', 'GIF', 'PNG' );
+
+$listing = '';
+
+$end = strrpos( $_SERVER['PHP_SELF'], '/' ) + 1;
+$local_folder = substr( $_SERVER['PHP_SELF'], 0, $end );
+$url = 'http://'.$_SERVER['HTTP_HOST'].$local_folder;
+
+$listing.= '<url>'.$url.'</url>';
+
+/**
+ * returns an array with all picture files according to $conf['picture_ext']
+ *
+ * @param string $dir
+ * @return array
+ */
+function get_picture_files( $dir )
+{
+  global $conf;
+
+  $pictures = array();
+  if ( $opendir = opendir( $dir ) )
+  {
+    while ( $file = readdir( $opendir ) )
+    {
+      if ( in_array( get_extension( $file ), $conf['picture_ext'] ) )
+      {
+        array_push( $pictures, $file );
+      }
+    }
+  }
+  return $pictures;
+}
+
+/**
+ * returns an array with all thumbnails according to $conf['picture_ext']
+ * and $conf['prefix_thumbnail']
+ *
+ * @param string $dir
+ * @return array
+ */
+function get_thumb_files( $dir )
+{
+  global $conf;
+
+  $prefix_length = strlen( $conf['prefix_thumbnail'] );
+  
+  $thumbnails = array();
+  if ( $opendir = @opendir( $dir ) )
+  {
+    while ( $file = readdir( $opendir ) )
+    {
+      if ( in_array( get_extension( $file ), $conf['picture_ext'] )
+           and substr($file,0,$prefix_length) == $conf['prefix_thumbnail'] )
+      {
+        array_push( $thumbnails, $file );
+      }
+    }
+  }
+  return $thumbnails;
+}
+
+// get_dirs retourne un tableau contenant tous les sous-répertoires d'un
+// répertoire
+function get_dirs( $basedir, $indent, $level )
+{
+  $fs_dirs = array();
+  $dirs = "";
+
+  if ( $opendir = opendir( $basedir ) )
+  {
+    while ( $file = readdir( $opendir ) )
+    {
+      if ( $file != '.'
+           and $file != '..'
+           and is_dir ( $basedir.'/'.$file )
+           and $file != 'thumbnail' )
+      {
+        array_push( $fs_dirs, $file );
+        if ( !preg_match( '/^[a-zA-Z0-9-_.]+$/', $file ) )
+        {
+          echo '<span style="color:red;">"'.$file.'" : ';
+          echo 'The name of the directory should be composed of ';
+          echo 'letters, figures, "-", "_" or "." ONLY';
+          echo '</span><br />';
+        }
+      }
+    }
+  }
+  // write of the dirs
+  foreach ( $fs_dirs as $fs_dir ) {
+    $dirs.= "\n".$indent.'<dir'.$level.' name="'.$fs_dir.'">';
+    $dirs.= get_pictures( $basedir.'/'.$fs_dir, $indent.'  ' );
+    $dirs.= get_dirs( $basedir.'/'.$fs_dir, $indent.'  ', $level + 1 );
+    $dirs.= "\n".$indent.'</dir'.$level.'>';
+  }
+  return $dirs;		
+}
+
+// get_extension returns the part of the string after the last "."
+function get_extension( $filename )
+{
+  return substr( strrchr( $filename, '.' ), 1, strlen ( $filename ) );
+}
+
+// get_filename_wo_extension returns the part of the string before the last
+// ".".
+// get_filename_wo_extension( 'test.tar.gz' ) -> 'test.tar'
+function get_filename_wo_extension( $filename )
+{
+  return substr( $filename, 0, strrpos( $filename, '.' ) );
+}
+
+function get_pictures( $dir, $indent )
+{
+  global $conf;
+  
+  // fs means filesystem : $fs_pictures contains pictures in the filesystem
+  // found in $dir, $fs_thumbnails contains thumbnails...
+  $fs_pictures   = get_picture_files( $dir );
+  $fs_thumbnails = get_thumb_files( $dir.'/thumbnail' );
+
+  $root = "\n".$indent.'<root>';
+
+  foreach ( $fs_pictures as $fs_picture ) {
+    $file_wo_ext = get_filename_wo_extension( $fs_picture );
+    $tn_ext = '';
+    foreach ( $conf['picture_ext'] as $ext ) {
+      $test = $conf['prefix_thumbnail'].$file_wo_ext.'.'.$ext;
+      if ( !in_array( $test, $fs_thumbnails ) ) continue;
+      else { $tn_ext = $ext; break; }
+    }
+    // if we found a thumnbnail corresponding to our picture...
+    if ( $tn_ext != '' )
+    {
+      list( $width,$height ) = @getimagesize( $dir.'/'.$fs_picture );
+
+      $root.= "\n".$indent.'  ';
+      $root.= '<picture';
+      $root.= ' file="'.    $fs_picture.'"';
+      $root.= ' tn_ext="'.  $tn_ext.'"';
+      $root.= ' filesize="'.floor(filesize($dir.'/'.$fs_picture)/1024).'"';
+      $root.= ' width="'.   $width.'"';
+      $root.= ' height="'.  $height.'"';
+      $root.= ' />';
+      
+      if ( !preg_match( '/^[a-zA-Z0-9-_.]+$/', $fs_picture ) )
+      {
+        echo '<span style="color:red;">"'.$fs_picture.'" : ';
+        echo 'The name of the picture should be composed of ';
+        echo 'letters, figures, "-", "_" or "." ONLY';
+        echo '</span><br />';
+      }
+    }
+    else
+    {
+      echo 'The thumbnail is missing for '.$dir.'/'.$fs_picture;
+      echo '-> '.$dir.'/thumbnail/';
+      echo $conf['prefix_thumbnail'].$file_wo_ext.'.xxx';
+      echo ' ("xxx" can be : ';
+      echo implode( ', ', $conf['picture_ext'] );
+      echo ')<br />';
+    }
+  }
+
+  $root.= "\n".$indent.'</root>';
+
+  return $root;
+}
+
+$listing.= get_dirs( '.', '', 0 );
+
+if ( $fp = @fopen("./listing.xml","w") )
+{
+  fwrite( $fp, $listing );
+  fclose( $fp );
+  echo "listing.xml created";
+}
+else
+{
+  echo "I can't write the file listing.xml";
+}
+?>
Index: /branches/1.3/admin/group_list.php
===================================================================
--- /branches/1.3/admin/group_list.php	(revision 3252)
+++ /branches/1.3/admin/group_list.php	(revision 3252)
@@ -0,0 +1,138 @@
+<?php
+/***************************************************************************
+ *                                 group_list.php                          *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+include_once( './include/isadmin.inc.php' );
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/group_list.vtp' );
+$tpl = array( 'group_add','add','listuser_permission','delete',
+              'group_confirm','yes','no','group_list_title' );
+templatize_array( $tpl, 'lang', $sub );
+$vtp->setGlobalVar( $sub, 'user_template', $user['template'] );
+//-------------------------------------------------------------- delete a group
+$error = array();
+if ( isset ( $_GET['delete'] ) and is_numeric( $_GET['delete'] ) )
+{
+  $query = 'SELECT name';
+  $query.= ' FROM '.PREFIX_TABLE.'groups';
+  $query.= ' WHERE id = '.$_GET['delete'];
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  // confirm group deletion ?
+  if ( !isset( $_GET['confirm'] ) or $_GET['confirm'] != 1 )
+  {
+    $vtp->addSession( $sub, 'deletion' );
+    $vtp->setVar( $sub, 'deletion.name', $row['name'] );
+    $yes_url = './admin.php?page=group_list&amp;delete='.$_GET['delete'];
+    $yes_url.= '&amp;confirm=1';
+    $vtp->setVar( $sub, 'deletion.yes_url', add_session_id( $yes_url ) );
+    $no_url = './admin.php?page=group_list';
+    $vtp->setVar( $sub, 'deletion.no_url', add_session_id( $no_url ) );
+    $vtp->closeSession( $sub, 'deletion' );
+  }
+  // group deletion confirmed
+  else
+  {
+    $vtp->addSession( $sub, 'confirmation' );
+    $query = 'SELECT COUNT(*) AS nb_result';
+    $query.= ' FROM '.PREFIX_TABLE.'groups';
+    $query.= ' WHERE id = '.$_GET['delete'];
+    $query.= ';';
+    $row2 = mysql_fetch_array( mysql_query( $query ) );
+    if ( $row2['nb_result'] > 0 )
+    {
+      delete_group( $_GET['delete'] );
+      $vtp->setVar( $sub, 'confirmation.class', 'info' );
+      $info = '"'.$row['name'].'" '.$lang['listuser_info_deletion'];
+      $vtp->setVar( $sub, 'confirmation.info', $info );
+    }
+    else
+    {
+      $vtp->setVar( $sub, 'confirmation.class', 'erreur' );
+      $vtp->setVar( $sub, 'confirmation.info', $lang['group_err_unknown'] );
+    }
+    $vtp->closeSession( $sub, 'confirmation' );
+  }
+}
+//----------------------------------------------------------------- add a group
+if ( isset( $_POST['submit'] ) )
+{
+  if ( preg_match( "/'/", $_POST['name'] )
+       or preg_match( '/"/', $_POST['name'] ) )
+  {
+    array_push( $error, $lang['group_add_error1'] );
+  }
+  if ( count( $error ) == 0 )
+  {
+    // is the group not already existing ?
+    $query = 'SELECT id';
+    $query.= ' FROM '.PREFIX_TABLE.'groups';
+    $query.= " WHERE name = '".$_POST['name']."'";
+    $query.= ';';
+    $result = mysql_query( $query );
+    if ( mysql_num_rows( $result ) > 0 )
+    {
+      array_push( $error, $lang['group_add_error2'] );
+    }
+  }
+  if ( count( $error ) == 0 )
+  {
+    // creating the group
+    $query = ' INSERT INTO '.PREFIX_TABLE.'groups';
+    $query.= " (name) VALUES ('".$_POST['name']."')";
+    $query.= ';';
+    mysql_query( $query );
+  }
+}
+//-------------------------------------------------------------- errors display
+if ( sizeof( $error ) != 0 )
+{
+  $vtp->addSession( $sub, 'errors' );
+  for ( $i = 0; $i < sizeof( $error ); $i++ )
+  {
+    $vtp->addSession( $sub, 'li' );
+    $vtp->setVar( $sub, 'li.li', $error[$i] );
+    $vtp->closeSession( $sub, 'li' );
+  }
+  $vtp->closeSession( $sub, 'errors' );
+}
+//----------------------------------------------------------------- groups list
+$vtp->addSession( $sub, 'groups' );
+
+$query = 'SELECT id,name';
+$query.= ' FROM '.PREFIX_TABLE.'groups';
+$query.= ' ORDER BY id ASC';
+$query.= ';';
+$result = mysql_query( $query );
+while ( $row = mysql_fetch_array( $result ) )
+{
+  $vtp->addSession( $sub, 'group' );
+  $vtp->setVar( $sub, 'group.name', $row['name'] );
+  $url = './admin.php?page=group_perm&amp;group_id='.$row['id'];
+  $vtp->setVar( $sub, 'group.permission_url', add_session_id( $url ) );
+  $url = './admin.php?page=group_list&amp;delete='.$row['id'];
+  $vtp->setVar( $sub, 'group.deletion_url', add_session_id( $url ) );
+  $vtp->closeSession( $sub, 'group' );
+}
+
+$vtp->closeSession( $sub, 'groups' );
+//------------------------------------------------------- create new group form
+$action = './admin.php?'.$_SERVER['QUERY_STRING'];
+$vtp->setVar( $sub, 'form_action', $action );
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/group_perm.php
===================================================================
--- /branches/1.3/admin/group_perm.php	(revision 3252)
+++ /branches/1.3/admin/group_perm.php	(revision 3252)
@@ -0,0 +1,121 @@
+<?php
+/***************************************************************************
+ *                               group_perm.php                            *
+ *                            ------------------                           *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+include_once( './include/isadmin.inc.php' );
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/group_perm.vtp' );
+$error = array();
+$tpl = array( 'permuser_authorized','permuser_forbidden','submit',
+              'permuser_parent_forbidden','permuser_info_message',
+              'adduser_info_back','permuser_only_private' );
+templatize_array( $tpl, 'lang', $sub );
+$vtp->setGlobalVar( $sub, 'user_template', $user['template'] );
+//--------------------------------------------------------------------- updates
+if ( isset( $_POST['submit'] ) )
+{
+  // cleaning the user_access table for this group
+  $query = 'DELETE FROM '.PREFIX_TABLE.'group_access';
+  $query.= ' WHERE group_id = '.$_GET['group_id'];
+  $query.= ';';
+  mysql_query( $query );
+  // selecting all private categories
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= " WHERE status = 'private'";
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $radioname = 'access-'.$row['id'];
+    if ( $_POST[$radioname] == 0 )
+    {
+      $query = 'INSERT INTO '.PREFIX_TABLE.'group_access';
+      $query.= ' (group_id,cat_id) VALUES';
+      $query.= ' ('.$_GET['group_id'].','.$row['id'].')';
+      $query.= ';';
+      mysql_query ( $query );
+    }
+  }
+  // checking users favorites
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'users';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    check_favorites( $row['id'] );
+  }
+  // synchronization of calculated data
+  synchronize_group( $_GET['group_id'] );
+  // confirmation display
+  $vtp->addSession( $sub, 'confirmation' );
+  $url = './admin.php?page=group_list';
+  $vtp->setVar( $sub, 'confirmation.back_url', add_session_id( $url ) );
+  $vtp->closeSession( $sub, 'confirmation' );
+}
+//---------------------------------------------------------------- form display
+$restrictions = get_group_restrictions( $_GET['group_id'] );
+$action = './admin.php?page=group_perm&amp;group_id='.$_GET['group_id'];
+$vtp->setVar( $sub, 'action', add_session_id( $action ) );
+// only private categories are listed
+$query = 'SELECT id';
+$query.= ' FROM '.PREFIX_TABLE.'categories';
+$query.= " WHERE status = 'private'";
+$query.= ';';
+$result = mysql_query( $query );
+while ( $row = mysql_fetch_array( $result ) )
+{
+  $vtp->addSession( $sub, 'category' );
+  $vtp->setVar( $sub, 'category.id', $row['id'] );
+  $url = './admin.php?page=cat_perm&amp;cat_id='.$row['id'];
+  $vtp->setVar( $sub, 'category.cat_perm_link', add_session_id( $url ) );
+  // Is the group allowed to access this category
+  $is_group_allowed = is_group_allowed( $row['id'], $restrictions );
+  if ( $is_group_allowed == 0 )
+  {
+    $vtp->setVar( $sub, 'category.color', 'green' );
+  }
+  else
+  {
+    $vtp->setVar( $sub, 'category.color', 'red' );
+  }
+  // category name
+  $cat_infos = get_cat_info( $row['id'] );
+  $name = get_cat_display_name( $cat_infos['name'],' &gt; ',
+                                'font-weight:bold;' );
+  $vtp->setVar( $sub, 'category.name', $name );
+  // any subcat forbidden for this group ?
+  if ( $is_group_allowed == 2 )
+  {
+    $vtp->addSession( $sub, 'parent_forbidden' );
+    $vtp->closeSession( $sub, 'parent_forbidden' );
+  }
+  // forbidden or authorized access ?
+  if ( $is_group_allowed == 0 or $is_group_allowed == 2 )
+  {
+    $vtp->setVar( $sub, 'category.authorized_checked', ' checked="checked"' );
+  }
+  else
+  {
+    $vtp->setVar( $sub, 'category.forbidden_checked', ' checked="checked"' );
+  }
+  $vtp->closeSession( $sub, 'category' );
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/help.php
===================================================================
--- /branches/1.3/admin/help.php	(revision 3252)
+++ /branches/1.3/admin/help.php	(revision 3252)
@@ -0,0 +1,48 @@
+<?php
+/***************************************************************************
+ *                                  help.php                               *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+include_once( './include/isadmin.inc.php' );
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/help.vtp' );
+$tpl = array( );
+templatize_array( $tpl, 'lang', $sub );
+//----------------------------------------------------- help categories display
+$categories = array( 'images','thumbnails','database','remote','upload',
+                     'virtual','groups','access','infos' );
+foreach ( $categories as $category ) {
+  $vtp->addSession( $sub, 'cat' );
+  if ( $category == 'images' )
+  {
+    $vtp->addSession( $sub, 'illustration' );
+    $vtp->setVar( $sub, 'illustration.pic_src', './images/admin.png' );
+    $vtp->setVar( $sub, 'illustration.pic_alt', '' );
+    $vtp->setVar( $sub, 'illustration.caption', $lang['help_images_intro'] );
+    $vtp->closeSession( $sub, 'illustration' );
+  }
+  $vtp->setVar( $sub, 'cat.name', $lang['help_'.$category.'_title'] );
+  foreach ( $lang['help_'.$category] as $item ) {
+    $vtp->addSession( $sub, 'item' );
+    $vtp->setVar( $sub, 'item.content', $item );
+    $vtp->closeSession( $sub, 'item' );
+  }
+
+  $vtp->closeSession( $sub, 'cat' );
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/images/index.htm
===================================================================
--- /branches/1.3/admin/images/index.htm	(revision 3252)
+++ /branches/1.3/admin/images/index.htm	(revision 3252)
@@ -0,0 +1,8 @@
+<html>
+    <head>
+        <title>PhpWebGallery</title>
+    </head>
+    <body>
+        No access authorized
+    </body>
+</html>
Index: /branches/1.3/admin/include/functions.php
===================================================================
--- /branches/1.3/admin/include/functions.php	(revision 3252)
+++ /branches/1.3/admin/include/functions.php	(revision 3252)
@@ -0,0 +1,1012 @@
+<?php
+/***************************************************************************
+ *                               functions.php                             *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+$tab_ext_create_TN = array ( 'jpg', 'png', 'JPG', 'PNG' );
+
+// is_image returns true if the given $filename (including the path) is a
+// picture according to its format and its extension.
+// As GD library can only generate pictures from jpeg and png files, if you
+// ask if the filename is an image for thumbnail creation (second parameter
+// set to true), the only authorized formats are jpeg and png.
+function is_image( $filename, $create_thumbnail = false )
+{
+  global $conf, $tab_ext_create_TN;
+
+  if ( is_file( $filename ) )
+  {
+    $size = getimagesize( $filename );
+    // $size[2] == 1 means GIF
+    // $size[2] == 2 means JPG
+    // $size[2] == 3 means PNG
+    if ( !$create_thumbnail )
+    {
+      if ( in_array( get_extension( $filename ), $conf['picture_ext'] )
+           and ( $size[2] == 1 or $size[2] == 2 or $size[2] == 3 ) )
+      {
+        return true;
+      }
+    }
+    else
+    {
+      if ( in_array( get_extension( $filename ), $tab_ext_create_TN )
+           and ( $size[2] == 2 or $size[2] == 3 ) )
+      {
+        return true;
+      }
+    }
+  }
+  return false;
+}
+
+/**
+ * returns an array with all picture files according to $conf['picture_ext']
+ *
+ * @param string $dir
+ * @return array
+ */
+function get_picture_files( $dir )
+{
+  global $conf;
+
+  $pictures = array();
+  if ( $opendir = opendir( $dir ) )
+  {
+    while ( $file = readdir( $opendir ) )
+    {
+      if ( in_array( get_extension( $file ), $conf['picture_ext'] ) )
+      {
+        array_push( $pictures, $file );
+      }
+    }
+  }
+  return $pictures;
+}
+
+/**
+ * returns an array with all thumbnails according to $conf['picture_ext']
+ * and $conf['prefix_thumbnail']
+ *
+ * @param string $dir
+ * @return array
+ */
+function get_thumb_files( $dir )
+{
+  global $conf;
+
+  $prefix_length = strlen( $conf['prefix_thumbnail'] );
+  
+  $thumbnails = array();
+  if ( $opendir = @opendir( $dir ) )
+  {
+    while ( $file = readdir( $opendir ) )
+    {
+      if ( in_array( get_extension( $file ), $conf['picture_ext'] )
+           and substr($file,0,$prefix_length) == $conf['prefix_thumbnail'] )
+      {
+        array_push( $thumbnails, $file );
+      }
+    }
+  }
+  return $thumbnails;
+}
+
+function TN_exists( $dir, $file )
+{
+  global $conf;
+
+  $filename = get_filename_wo_extension( $file );
+  foreach ( $conf['picture_ext'] as $ext ) {
+    $test = $dir.'/thumbnail/'.$conf['prefix_thumbnail'].$filename.'.'.$ext;
+    if ( is_file ( $test ) )
+    {
+      return $ext;
+    }
+  }
+  return false;
+}
+	
+
+// The function delete_site deletes a site
+// and call the function delete_category for each primary category of the site
+function delete_site( $id )
+{
+  // destruction of the categories of the site
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE site_id = '.$id;
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    delete_category( $row['id'] );
+  }
+		
+  // destruction of the site
+  $query = 'DELETE FROM '.PREFIX_TABLE.'sites';
+  $query.= ' WHERE id = '.$id;
+  $query.= ';';
+  mysql_query( $query );
+}
+	
+
+// The function delete_category deletes the category identified by the $id
+// It also deletes (in the database) :
+//    - all the images of the images (thanks to delete_image, see further)
+//    - all the links between images and this category
+//    - all the restrictions linked to the category
+// The function works recursively.
+function delete_category( $id )
+{
+  // destruction of all the related images
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'images';
+  $query.= ' WHERE storage_category_id = '.$id;
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    delete_image( $row['id'] );
+  }
+
+  // destruction of the links between images and this category
+  $query = 'DELETE FROM '.PREFIX_TABLE.'image_category';
+  $query.= ' WHERE category_id = '.$id;
+  $query.= ';';
+  mysql_query( $query );
+
+  // destruction of the access linked to the category
+  $query = 'DELETE FROM '.PREFIX_TABLE.'user_access';
+  $query.= ' WHERE cat_id = '.$id;
+  $query.= ';';
+  mysql_query( $query );
+  $query = 'DELETE FROM '.PREFIX_TABLE.'group_access';
+  $query.= ' WHERE cat_id = '.$id;
+  $query.= ';';
+  mysql_query( $query );
+
+  // destruction of the sub-categories
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE id_uppercat = '.$id;
+  $query.= ';';
+  $result = mysql_query( $query );
+  while( $row = mysql_fetch_array( $result ) )
+  {
+    delete_category( $row['id'] );
+  }
+
+  // destruction of the category
+  $query = 'DELETE FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE id = '.$id;
+  $query.= ';';
+  mysql_query( $query );
+}
+	
+
+// The function delete_image deletes the image identified by the $id
+// It also deletes (in the database) :
+//    - all the comments related to the image
+//    - all the links between categories and this image
+//    - all the favorites associated to the image
+function delete_image( $id )
+{
+  global $count_deleted;
+		
+  // destruction of the comments on the image
+  $query = 'DELETE FROM '.PREFIX_TABLE.'comments';
+  $query.= ' WHERE image_id = '.$id;
+  $query.= ';';
+  mysql_query( $query );
+
+  // destruction of the links between images and this category
+  $query = 'DELETE FROM '.PREFIX_TABLE.'image_category';
+  $query.= ' WHERE image_id = '.$id;
+  $query.= ';';
+  mysql_query( $query );
+
+  // destruction of the favorites associated with the picture
+  $query = 'DELETE FROM '.PREFIX_TABLE.'favorites';
+  $query.= ' WHERE image_id = '.$id;
+  $query.= ';';
+  mysql_query( $query );
+		
+  // destruction of the image
+  $query = 'DELETE FROM '.PREFIX_TABLE.'images';
+  $query.= ' WHERE id = '.$id;
+  $query.= ';';
+  mysql_query( $query );
+  $count_deleted++;
+}
+
+// The delete_user function delete a user identified by the $user_id
+// It also deletes :
+//     - all the access linked to this user
+//     - all the links to any group
+//     - all the favorites linked to this user
+//     - all sessions linked to this user
+//     - all categories informations linked to this user
+function delete_user( $user_id )
+{
+  // destruction of the access linked to the user
+  $query = 'DELETE FROM '.PREFIX_TABLE.'user_access';
+  $query.= ' WHERE user_id = '.$user_id;
+  $query.= ';';
+  mysql_query( $query );
+
+  // destruction of the group links for this user
+  $query = 'DELETE FROM '.PREFIX_TABLE.'user_group';
+  $query.= ' WHERE user_id = '.$user_id;
+  $query.= ';';
+  mysql_query( $query );
+
+  // destruction of the favorites associated with the user
+  $query = 'DELETE FROM '.PREFIX_TABLE.'favorites';
+  $query.= ' WHERE user_id = '.$user_id;
+  $query.= ';';
+  mysql_query( $query );
+
+  // destruction of the sessions linked with the user
+  $query = 'DELETE FROM '.PREFIX_TABLE.'sessions';
+  $query.= ' WHERE user_id = '.$user_id;
+  $query.= ';';
+  mysql_query( $query );
+
+  // destruction of the categories informations linked with the user
+  $query = 'DELETE FROM '.PREFIX_TABLE.'user_category';
+  $query.= ' WHERE user_id = '.$user_id;
+  $query.= ';';
+  mysql_query( $query );
+
+  // destruction of the user
+  $query = 'DELETE FROM '.PREFIX_TABLE.'users';
+  $query.= ' WHERE id = '.$user_id;
+  $query.= ';';
+  mysql_query( $query );
+}
+
+// delete_group deletes a group identified by its $group_id.
+// It also deletes :
+//     - all the access linked to this group
+//     - all the links between this group and any user
+function delete_group( $group_id )
+{
+  // destruction of the access linked to the group
+  $query = 'DELETE FROM '.PREFIX_TABLE.'group_access';
+  $query.= ' WHERE group_id = '.$group_id;
+  $query.= ';';
+  mysql_query( $query );
+
+  // synchronize all users linked to the group
+  synchronize_group( $group_id );
+
+  // destruction of the users links for this group
+  $query = 'DELETE FROM '.PREFIX_TABLE.'user_group';
+  $query.= ' WHERE group_id = '.$group_id;
+  $query.= ';';
+  mysql_query( $query );
+
+  // destruction of the group
+  $query = 'DELETE FROM '.PREFIX_TABLE.'groups';
+  $query.= ' WHERE id = '.$group_id;
+  $query.= ';';
+  mysql_query( $query );
+}
+
+// The check_favorites function deletes all the favorites of a user if he is
+// not allowed to see them (the category or an upper category is restricted
+// or invisible)
+function check_favorites( $user_id )
+{
+  $query = 'SELECT status,forbidden_categories';
+  $query.= ' FROM '.PREFIX_TABLE.'users';
+  $query.= ' WHERE id = '.$user_id;
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  $status = $row['status'];
+  // retrieving all the restricted categories for this user
+  if ( isset( $row['forbidden_categories'] ) )
+    $restricted_cat = explode( ',', $row['forbidden_categories'] );
+  else
+    $restricted_cat = array();
+  // retrieving all the favorites for this user and comparing their
+  // categories to the restricted categories
+  $query = 'SELECT image_id';
+  $query.= ' FROM '.PREFIX_TABLE.'favorites';
+  $query.= ' WHERE user_id = '.$user_id;
+  $query.= ';';
+  $result = mysql_query ( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    // for each picture, we have to check all the categories it belongs
+    // to. Indeed if a picture belongs to category_1 and category_2 and that
+    // category_2 is not restricted to the user, he can have the picture as
+    // favorite.
+    $query = 'SELECT DISTINCT(category_id) as category_id';
+    $query.= ' FROM '.PREFIX_TABLE.'image_category';
+    $query.= ' WHERE image_id = '.$row['image_id'];
+    $query.= ';';
+    $picture_result = mysql_query( $query );
+    $picture_cat = array();
+    while ( $picture_row = mysql_fetch_array( $picture_result ) )
+    {
+      array_push( $picture_cat, $picture_row['category_id'] );
+    }
+    if ( count( array_diff( $picture_cat, $restricted_cat ) ) == 0 )
+    {
+      $query = 'DELETE FROM '.PREFIX_TABLE.'favorites';
+      $query.= ' WHERE image_id = '.$row['image_id'];
+      $query.= ' AND user_id = '.$user_id;
+      $query.= ';';
+      mysql_query( $query );
+    }
+  }
+}
+
+// update_category updates calculated informations about a category :
+// date_last and nb_images. It also verifies that the representative picture
+// is really linked to the category.
+function update_category( $id = 'all' )
+{
+  if ( $id == 'all' )
+  {
+    $query = 'SELECT id';
+    $query.= ' FROM '.PREFIX_TABLE.'categories';
+    $query.= ';';
+    $result = mysql_query( $query );
+    while ( $row = mysql_fetch_array( $result ) )
+    {
+      // recursive call
+      update_category( $row['id'] );
+    }
+  }
+  else if ( is_numeric( $id ) )
+  {
+    // updating the number of pictures
+    $query = 'SELECT COUNT(*) as nb_images';
+    $query.= ' FROM '.PREFIX_TABLE.'image_category';
+    $query.= ' WHERE category_id = '.$id;
+    $query.= ';';
+    list( $nb_images ) = mysql_fetch_array( mysql_query( $query ) );
+    // updating the date_last
+    $query = 'SELECT MAX(date_available) AS date_available';
+    $query.= ' FROM '.PREFIX_TABLE.'images';
+    $query.= ' INNER JOIN '.PREFIX_TABLE.'image_category ON id = image_id';
+    $query.= ' WHERE category_id = '.$id;
+    $query.= ';';
+    list( $date_available ) = mysql_fetch_array( mysql_query( $query ) );
+    
+    $query = 'UPDATE '.PREFIX_TABLE.'categories';
+    $query.= " SET date_last = '".$date_available."'";
+    $query.= ', nb_images = '.$nb_images;
+    $query.= ' WHERE id = '.$id;
+    $query.= ';';
+    mysql_query( $query );
+
+    // updating the representative_picture_id : if the representative
+    // picture of the category is not any more linked to the category, we
+    // have to set representative_picture_id to NULL
+    $query = 'SELECT representative_picture_id';
+    $query.= ' FROM '.PREFIX_TABLE.'categories';
+    $query.= ' WHERE id = '.$id;
+    $row = mysql_fetch_array( mysql_query( $query ) );
+    // if the category has no representative picture (ie
+    // representative_picture_id == NULL) we don't update anything
+    if ( isset( $row['representative_picture_id'] ) )
+    {
+      $query = 'SELECT image_id';
+      $query.= ' FROM '.PREFIX_TABLE.'image_category';
+      $query.= ' WHERE category_id = '.$id;
+      $query.= ' AND image_id = '.$row['representative_picture_id'];
+      $query.= ';';
+      $result = mysql_query( $query );
+      if ( mysql_num_rows( $result ) == 0 )
+      {
+        $query = 'UPDATE '.PREFIX_TABLE.'categories';
+        $query.= ' SET representative_picture_id = NULL';
+        $query.= ' WHERE id = '.$id;
+        $query.= ';';
+        mysql_query( $query );
+      }
+    }
+  }
+}
+
+function check_date_format( $date )
+{
+  // date arrives at this format : DD/MM/YYYY
+  @list($day,$month,$year) = explode( '/', $date );
+  return @checkdate( $month, $day, $year );
+}
+
+function date_convert( $date )
+{
+  // date arrives at this format : DD/MM/YYYY
+  // It must be transformed in YYYY-MM-DD
+  list($day,$month,$year) = explode( '/', $date );
+  return $year.'-'.$month.'-'.$day;
+}
+
+function date_convert_back( $date )
+{
+  // date arrives at this format : YYYY-MM-DD
+  // It must be transformed in DD/MM/YYYY
+  if ( $date != '' )
+  {
+    list($year,$month,$day) = explode( '-', $date );
+    return $day.'/'.$month.'/'.$year;
+  }
+  else
+  {
+    return '';
+  }
+}
+
+// get_keywords returns an array with relevant keywords found in the string
+// given in argument. Keywords must be separated by comma in this string.
+// keywords must :
+//   - be longer or equal to 3 characters
+//   - not contain ', " or blank characters
+//   - unique in the string ("test,test" -> "test")
+function get_keywords( $keywords_string )
+{
+  $keywords = array();
+
+  $candidates = explode( ',', $keywords_string );
+  foreach ( $candidates as $candidate ) {
+    if ( strlen($candidate) >= 3 and !preg_match( '/(\'|"|\s)/', $candidate ) )
+      array_push( $keywords, $candidate );
+  }
+
+  return array_unique( $keywords );
+}
+
+function display_categories( $categories, $indent,
+                             $selected = -1, $forbidden = -1 )
+{
+  global $vtp,$sub;
+
+  foreach ( $categories as $category ) {
+    if ( $category['id'] != $forbidden )
+    {
+      $vtp->addSession( $sub, 'associate_cat' );
+      $vtp->setVar( $sub, 'associate_cat.value',   $category['id'] );
+      $content = $indent.'- '.$category['name'];
+      $vtp->setVar( $sub, 'associate_cat.content', $content );
+      if ( $category['id'] == $selected )
+        $vtp->setVar( $sub, 'associate_cat.selected', ' selected="selected"' );
+      $vtp->closeSession( $sub, 'associate_cat' );
+      display_categories( $category['subcats'], $indent.str_repeat('&nbsp;',3),
+                          $selected, $forbidden );
+    }
+  }
+}
+
+/**
+ * Complete plain structure of the gallery
+ *
+ * Returns the plain structure (one level array) of the gallery. In the
+ * returned array, each element is an array with jeys 'id' and
+ * 'id_uppercat'. The function also fills the array $page['subcats'] which
+ * associate (category_id => array of sub-categories id).
+ *
+ * @param bool $use_name
+ * @return array
+ */
+function get_plain_structure( $use_name = false )
+{
+  global $page;
+
+  $plain_structure = array();
+
+  $query = 'SELECT id,id_uppercat';
+  if ( $use_name ) $query.= ',name';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' ORDER BY id_uppercat ASC, rank ASC';
+  $query.= ';';
+
+  $subcats = array();
+  $id_uppercat = 'NULL';
+
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $plain_structure[$row['id']]['id'] = $row['id'];
+    if ( !isset( $row['id_uppercat'] ) ) $row['id_uppercat'] = 'NULL';
+    $plain_structure[$row['id']]['id_uppercat'] = $row['id_uppercat'];
+    if ( $use_name ) $plain_structure[$row['id']]['name'] = $row['name'];
+    // subcats list
+    if ( $row['id_uppercat'] != $id_uppercat )
+    {
+      $page['subcats'][$id_uppercat] = $subcats;
+
+      $subcats = array();
+      $id_uppercat = $row['id_uppercat'];
+    }
+    array_push( $subcats, $row['id'] );
+  }
+  mysql_free_result( $result );
+  
+  $page['subcats'][$id_uppercat] = $subcats;
+
+  return $plain_structure;
+}
+
+/**
+ * get N levels array representing structure under the given category
+ *
+ * create_structure returns the N levels array representing structure under
+ * the given gategory id. It also updates the
+ * $page['plain_structure'][id]['all_subcats_id'] and
+ * $page['plain_structure'][id]['direct_subcats_ids'] for each sub category.
+ *
+ * @param int $id_uppercat
+ * @return array
+ */
+function create_structure( $id_uppercat )
+{
+  global $page;
+
+  $structure = array();
+  $ids = get_subcats_ids( $id_uppercat );
+  foreach ( $ids as $id ) {
+    $category = $page['plain_structure'][$id];
+
+    $category['subcats'] = create_structure( $id );
+
+    $page['plain_structure'][$id]['all_subcats_ids'] =
+      get_all_subcats_ids( $id );
+
+    $page['plain_structure'][$id]['direct_subcats_ids'] =
+      get_subcats_ids( $id );
+
+    array_push( $structure, $category );
+  }
+  return $structure;
+}
+
+/**
+ * returns direct sub-categories ids
+ *
+ * Returns an array containing all the direct sub-categories ids of the
+ * given category. It uses the $page['subcats'] global array.
+ *
+ * @param int $id_uppercat
+ * @return array
+ */
+function get_subcats_ids( $id_uppercat )
+{
+  global $page;
+
+  if ( $id_uppercat == '' ) $id_uppercat = 'NULL';
+
+  if ( isset( $page['subcats'][$id_uppercat] ) )
+    return $page['subcats'][$id_uppercat];
+  else
+    return array();
+}
+
+/**
+ * returns all sub-categories ids, not only direct ones
+ *
+ * Returns an array containing all the sub-categories ids of the given
+ * category, not only direct ones. This function is recursive.
+ *
+ * @param int $category_id
+ * @return array
+ */
+function get_all_subcats_ids( $category_id )
+{
+  $ids = array();
+  
+  $subcats = get_subcats_ids( $category_id );
+  $ids = array_merge( $ids, $subcats );
+  foreach ( $subcats as $subcat ) {
+    // recursive call
+    $sub_subcats = get_all_subcats_ids( $subcat );
+    $ids = array_merge( $ids, $sub_subcats );
+  }
+  return array_unique( $ids );
+}
+
+/**
+ * prepares the query to update the table user_category
+ *
+ * Prepares the query (global variable $values) to update table
+ * user_category : for a couple (user,category) the number of sub-categories
+ * and the last date of the category (all sub-categories taken into
+ * account). It also calls function update_uppercats for each category. The
+ * function is recursive.
+ *
+ * @param array $categories
+ * @return void
+ */
+function update_user_category( $categories )
+{
+  global $page,$user_restrictions,$value_num,$values;
+
+  foreach ( $categories as $category ) {
+    // recursive call
+    update_user_category( $category['subcats'] );
+    // 1. update the table user_category
+    foreach ( $user_restrictions as $user_id => $restrictions ) {
+      // if the category is forbidden to this user, go to next user
+      if ( in_array( $category['id'], $restrictions ) ) continue;
+
+      // how many sub_categories for this user ?
+      $user_subcats = array_diff(
+        $page['plain_structure'][$category['id']]['direct_subcats_ids'],
+        $restrictions );
+      $user_nb_subcats = count( array_unique( $user_subcats ) );
+      // last date of the category
+      $user_all_subcats = array_unique( array_diff(
+        $page['plain_structure'][$category['id']]['all_subcats_ids'],
+        $restrictions ) );
+            
+      $query = 'SELECT MAX(date_last) AS last_date';
+      $query.= ' FROM '.PREFIX_TABLE.'categories';
+      $query.= ' WHERE id IN ('.$category['id'];
+      if ( count( $user_all_subcats ) > 0 )
+        $query.= ','.implode( ',', $user_all_subcats );
+      $query.= ')';
+      $query.= ';';
+      $row = mysql_fetch_array( mysql_query( $query ) );
+
+      // insert a new line in database
+      if ( $value_num++ > 0 ) $values.= ', ';
+      else                    $values.= ' ';
+      $values.= '('.$user_id.",".$category['id'];
+      if ( isset( $row['last_date'] ) ) $values.= ",'".$row['last_date']."'";
+      else                              $values.= ',NULL';
+      $values.= ','.$user_nb_subcats.')';
+    }
+    update_uppercats( $category['id'] );
+  }
+}
+
+/**
+ * updates the column categories.uppercats
+ *
+ * @param int $category_id
+ * @return void
+ */
+function update_uppercats( $category_id )
+{
+  global $page;
+
+  $final_id = $category_id;
+  $uppercats = array();
+
+  array_push( $uppercats, $category_id );
+  $uppercat = $page['plain_structure'][$category_id]['id_uppercat'];
+
+  while ( $uppercat != 'NULL' )
+  {
+    array_push( $uppercats, $uppercat );
+    $category_id = $page['plain_structure'][$category_id]['id_uppercat'];
+    $uppercat = $page['plain_structure'][$category_id]['id_uppercat'];
+  }
+
+  $string_uppercats = implode( ',', array_reverse( $uppercats ) );
+  $query = 'UPDATE '.PREFIX_TABLE.'categories';
+  $query.= ' SET uppercats = '."'".$string_uppercats."'";
+  $query.= ' WHERE id = '.$final_id;
+  $query.= ';';
+  mysql_query( $query );
+}
+
+/**
+ * returns an array with the ids of the restricted categories for the user
+ *
+ * Returns an array with the ids of the restricted categories for the
+ * user. If the $check_invisible parameter is set to true, invisible
+ * categorie are added to the restricted one in the array.
+ *
+ * @param int $user_id
+ * @param string $user_status
+ * @param bool $check_invisible
+ * @param bool $use_groups
+ * @return array
+ */
+function get_user_restrictions( $user_id, $user_status,
+                                $check_invisible, $use_groups = true )
+{
+  // 1. retrieving ids of private categories
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= " WHERE status = 'private'";
+  $query.= ';';
+  $result = mysql_query( $query );
+  $privates = array();
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    array_push( $privates, $row['id'] );
+  }
+  // 2. retrieving all authorized categories for the user
+  $authorized = array();
+  // 2.1. retrieving authorized categories thanks to personnal user
+  //      authorization
+  $query = 'SELECT cat_id';
+  $query.= ' FROM '.PREFIX_TABLE.'user_access';
+  $query.= ' WHERE user_id = '.$user_id;
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    array_push( $authorized, $row['cat_id'] );
+  }
+  // 2.2. retrieving authorized categories thanks to group authorization to
+  //      which the user is a member
+  if ( $use_groups )
+  {
+    $query = 'SELECT ga.cat_id';
+    $query.= ' FROM '.PREFIX_TABLE.'user_group as ug';
+    $query.= ', '.PREFIX_TABLE.'group_access as ga';
+    $query.= ' WHERE ug.group_id = ga.group_id';
+    $query.= ' AND ug.user_id = '.$user_id;
+    $query.= ';';
+    $result = mysql_query( $query );
+    while ( $row = mysql_fetch_array( $result ) )
+    {
+      array_push( $authorized, $row['cat_id'] );
+    }
+    $authorized = array_unique( $authorized );
+  }
+
+  $forbidden = array();
+  foreach ( $privates as $private ) {
+    if ( !in_array( $private, $authorized ) )
+    {
+      array_push( $forbidden, $private );
+    }
+  }
+
+  if ( $check_invisible )
+  {
+    // 3. adding to the restricted categories, the invisible ones
+    if ( $user_status != 'admin' )
+    {
+      $query = 'SELECT id';
+      $query.= ' FROM '.PREFIX_TABLE.'categories';
+      $query.= " WHERE visible = 'false';";
+      $result = mysql_query( $query );
+      while ( $row = mysql_fetch_array( $result ) )
+      {
+        array_push( $forbidden, $row['id'] );
+      }
+    }
+  }
+  return array_unique( $forbidden );
+}
+
+/**
+ * finalizes operation for user_category table update
+ *
+ * This function is called by synchronization_*. It creates the
+ * $page['plain_structure'] and $page['structure'], get the SQL query to
+ * update user_category, clean user_category, and finally update the
+ * table. The users updates depends on the global array $user_restrictions.
+ *
+ * @return void
+ */
+function synchronize()
+{
+  global $user_restrictions,$page,$values;
+
+  update_user_category( $page['structure'] );
+
+  // cleaning user_category table for users to update
+  foreach( $user_restrictions as $user_id => $restrictions ) {
+    $query = 'DELETE';
+    $query.= ' FROM '.PREFIX_TABLE.'user_category';
+    $query.= ' WHERE user_id = '.$user_id;
+    $query.= ';';
+    mysql_query( $query );
+  }
+
+  $query = 'INSERT INTO '.PREFIX_TABLE.'user_category';
+  $query.= ' (user_id,category_id,date_last,nb_sub_categories) VALUES ';
+  $query.= $values;
+  $query.= ';';
+  mysql_query( $query );
+}
+
+/**
+ * synchronizes all users calculated informations
+ *
+ * fills global array $user_restrictions with all users and related
+ * restrictions before calling synchronize.
+ *
+ * @return void
+ */
+function synchronize_all_users()
+{
+  global $user_restrictions,$page;
+
+  $page['plain_structure'] = get_plain_structure();
+  $page['structure']       = create_structure( '' );
+  
+  $user_restrictions = array();
+  
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'users';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $user_restrictions[$row['id']] = update_user_restrictions( $row['id'] );
+  }
+  synchronize();
+}
+
+/**
+ * synchronizes 1 user calculated informations
+ *
+ * fills global array $user_restrictions with the user id and its related
+ * restrictions before calling synchronize.
+ *
+ * @param int $user_id
+ * @return void
+ */
+function synchronize_user( $user_id )
+{
+  global $user_restrictions,$page;
+
+  $page['plain_structure'] = get_plain_structure();
+  $page['structure']       = create_structure( '' );
+  
+  $user_restrictions = array();
+  $user_restrictions[$user_id] = update_user_restrictions( $user_id );
+  synchronize();
+}
+
+/**
+ * synchronizes all users (belonging to the group) calculated informations
+ *
+ * fills global array $user_restrictions with all users and related
+ * restrictions before calling synchronize.
+ *
+ * @return void
+ */
+function synchronize_group( $group_id )
+{
+  global $user_restrictions,$page;
+
+  $page['plain_structure'] = get_plain_structure();
+  $page['structure']       = create_structure( '' );
+  
+  $user_restrictions = array();
+  
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'users';
+  $query.= ', '.PREFIX_TABLE.'user_group';
+  $query.= ' WHERE group_id = '.$group_id;
+  $query.= ' AND id = user_id';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $user_restrictions[$row['id']] = update_user_restrictions( $row['id'] );
+  }
+  synchronize();
+}
+
+/**
+ * updates the calculated data users.forbidden_categories, it includes
+ * sub-categories of the direct forbidden categories
+ *
+ * @param nt $user_id
+ * @return array
+ */
+function update_user_restrictions( $user_id )
+{
+  $restrictions = get_user_all_restrictions( $user_id );
+
+  // update the users.forbidden_categories in database
+  $query = 'UPDATE '.PREFIX_TABLE.'users';
+  $query.= ' SET forbidden_categories = ';
+  if ( count( $restrictions ) > 0 )
+    $query.= "'".implode( ',', $restrictions )."'";
+  else
+    $query.= 'NULL';
+  $query .= ' WHERE id = '.$user_id;
+  $query.= ';';
+  mysql_query( $query );
+
+  return $restrictions;
+}
+
+/**
+ * returns all the restricted categories ids including sub-categories
+ *
+ * @param int $user_id
+ * @return array
+ */
+function get_user_all_restrictions( $user_id )
+{
+  global $page;
+  
+  $query = 'SELECT status';
+  $query.= ' FROM '.PREFIX_TABLE.'users';
+  $query.= ' WHERE id = '.$user_id;
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  
+  $base_restrictions=get_user_restrictions($user_id,$row['status'],true,true);
+
+  $restrictions = $base_restrictions;
+  foreach ( $base_restrictions as $category_id ) {
+    $restrictions =
+      array_merge( $restrictions,
+                   $page['plain_structure'][$category_id]['all_subcats_ids'] );
+  }
+
+  return array_unique( $restrictions );
+}
+
+// The function is_user_allowed returns :
+//      - 0 : if the category is allowed with this $restrictions array
+//      - 1 : if this category is not allowed
+//      - 2 : if an uppercat category is not allowed
+// Note : the restrictions array must represent ONLY direct forbidden
+// categories, not all forbidden categories
+function is_user_allowed( $category_id, $restrictions )
+{
+  if ( in_array( $category_id, $restrictions ) ) return 1;
+
+  $query = 'SELECT uppercats';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE id = '.$category_id;
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  $uppercats = explode( ',', $row['uppercats'] );
+  foreach ( $uppercats as $category_id ) {
+    if ( in_array( $category_id, $restrictions ) ) return 2;
+  }
+
+  // no restriction found : the user is allowed to access this category
+  return 0;
+}
+
+/**
+ * returns an array containing sub-directories which can be a category
+ *
+ * directories nammed "thumbnail" are omitted
+ *
+ * @param string $basedir
+ * @return array
+ */
+function get_category_directories( $basedir )
+{
+  $sub_dirs = array();
+
+  if ( $opendir = opendir( $basedir ) )
+  {
+    while ( $file = readdir( $opendir ) )
+    {
+      if ( $file != '.' and $file != '..'
+           and is_dir( $basedir.'/'.$file )
+           and $file != 'thumbnail' )
+      {
+        array_push( $sub_dirs, $file );
+      }
+    }
+  }
+  return $sub_dirs;
+}
+?>
Index: /branches/1.3/admin/include/index.htm
===================================================================
--- /branches/1.3/admin/include/index.htm	(revision 3252)
+++ /branches/1.3/admin/include/index.htm	(revision 3252)
@@ -0,0 +1,8 @@
+<html>
+    <head>
+        <title>PhpWebGallery</title>
+    </head>
+    <body>
+        No access authorized
+    </body>
+</html>
Index: /branches/1.3/admin/include/isadmin.inc.php
===================================================================
--- /branches/1.3/admin/include/isadmin.inc.php	(revision 3252)
+++ /branches/1.3/admin/include/isadmin.inc.php	(revision 3252)
@@ -0,0 +1,34 @@
+<?php
+/***************************************************************************
+ *                              isadmin.inc.php                            *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+define( 'PREFIX_INCLUDE', '.' );
+
+include_once( '../include/config.inc.php' );
+include_once( '../include/user.inc.php' );
+include( './include/functions.php' );
+
+$isadmin = true;
+include_once( '../language/'.$user['language'].'.php' );
+
+if ( $user['status'] != 'admin' )
+{
+  echo '<div style="text-align:center;">'.$lang['access_forbiden'].'<br />';
+  echo '<a href="../identification.php">'.$lang['ident_title'].'</a></div>';
+  exit();
+}
+?>
Index: /branches/1.3/admin/index.htm
===================================================================
--- /branches/1.3/admin/index.htm	(revision 3252)
+++ /branches/1.3/admin/index.htm	(revision 3252)
@@ -0,0 +1,8 @@
+<html>
+    <head>
+        <title>PhpWebGallery</title>
+    </head>
+    <body>
+        No access authorized
+    </body>
+</html>
Index: /branches/1.3/admin/infos_images.php
===================================================================
--- /branches/1.3/admin/infos_images.php	(revision 3252)
+++ /branches/1.3/admin/infos_images.php	(revision 3252)
@@ -0,0 +1,349 @@
+<?php
+/***************************************************************************
+ *                             infos_images.php                            *
+ *                            ------------------                           *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+include_once( './include/isadmin.inc.php' );
+include_once( '../template/'.$user['template'].'/htmlfunctions.inc.php' );
+//-------------------------------------------------------------- initialization
+$page['nb_image_page'] = 5;
+
+check_cat_id( $_GET['cat_id'] );
+
+$errors = array();
+
+if ( isset( $page['cat'] ) )
+{
+//--------------------------------------------------- update individual options
+  if ( isset( $_POST['submit'] ) )
+  {
+    if ( isset( $_POST['associate'] ) and $_POST['associate'] != '' )
+    {
+      // does the uppercat id exists in the database ?
+      if ( !is_numeric( $_POST['associate'] ) )
+      {
+        array_push( $errors, $lang['cat_unknown_id'] );
+      }
+      else
+      {
+        $query = 'SELECT id';
+        $query.= ' FROM '.PREFIX_TABLE.'categories';
+        $query.= ' WHERE id = '.$_POST['associate'];
+        $query.= ';';
+        if ( mysql_num_rows( mysql_query( $query ) ) == 0 )
+          array_push( $errors, $lang['cat_unknown_id'] );
+      }
+    }
+
+    $associate = false;
+    
+    $query = 'SELECT id,file';
+    $query.= ' FROM '.PREFIX_TABLE.'images';
+    $query.= ' INNER JOIN '.PREFIX_TABLE.'image_category ON id = image_id';
+    $query.= ' WHERE category_id = '.$page['cat'];
+    $query.= ';';
+    $result = mysql_query( $query );
+    while ( $row = mysql_fetch_array( $result ) )
+    {
+      $name          = 'name-'.$row['id'];
+      $author        = 'author-'.$row['id'];
+      $comment       = 'comment-'.$row['id'];
+      $date_creation = 'date_creation-'.$row['id'];
+      $keywords      = 'keywords-'.$row['id'];
+      if ( isset( $_POST[$name] ) )
+      {
+        $query = 'UPDATE '.PREFIX_TABLE.'images';
+
+        $query.= ' SET name = ';
+        if ( $_POST[$name] == '' )
+          $query.= 'NULL';
+        else
+          $query.= "'".htmlentities( $_POST[$name], ENT_QUOTES )."'";
+
+        $query.= ', author = ';
+        if ( $_POST[$author] == '' )
+          $query.= 'NULL';
+        else
+          $query.= "'".htmlentities($_POST[$author],ENT_QUOTES)."'";
+
+        $query.= ', comment = ';
+        if ( $_POST[$comment] == '' )
+          $query.= 'NULL';
+        else
+          $query.= "'".htmlentities($_POST[$comment],ENT_QUOTES)."'";
+
+        $query.= ', date_creation = ';
+        if ( check_date_format( $_POST[$date_creation] ) )
+          $query.= "'".date_convert( $_POST[$date_creation] )."'";
+        else if ( $_POST[$date_creation] == '' )
+          $query.= 'NULL';
+
+        $query.= ', keywords = ';
+
+        $keywords_array = get_keywords( $_POST[$keywords] );
+        if ( count( $keywords_array ) == 0 ) $query.= 'NULL';
+        else $query.= "'".implode( ',', $keywords_array )."'";
+
+        $query.= ' WHERE id = '.$row['id'];
+        $query.= ';';
+        mysql_query( $query );
+      }
+      // add link to another category
+      if ( isset( $_POST['check-'.$row['id']] ) and count( $errors ) == 0 )
+      {
+        $query = 'INSERT INTO '.PREFIX_TABLE.'image_category';
+        $query.= ' (image_id,category_id) VALUES';
+        $query.= ' ('.$row['id'].','.$_POST['associate'].')';
+        $query.= ';';
+        mysql_query( $query );
+        $associate = true;
+      }
+    }
+    update_category( $_POST['associate'] );
+    if ( $associate ) synchronize_all_users();
+//------------------------------------------------------ update general options
+    if ( isset( $_POST['use_common_author'] ) )
+    {
+      $query = 'SELECT image_id';
+      $query.= ' FROM '.PREFIX_TABLE.'image_category';
+      $query.= ' WHERE category_id = '.$page['cat'];
+      $result = mysql_query( $query );
+      while ( $row = mysql_fetch_array( $result ) )
+      {
+        $query = 'UPDATE '.PREFIX_TABLE.'images';
+        if ( $_POST['author_cat'] == '' )
+        {
+          $query.= ' SET author = NULL';
+        }
+        else
+        {
+          $query.= ' SET author = ';
+          $query.= "'".htmlentities( $_POST['author_cat'], ENT_QUOTES )."'";
+        }
+        $query.= ' WHERE id = '.$row['image_id'];
+        $query.= ';';
+        mysql_query( $query );
+      }
+    }
+    if ( isset( $_POST['use_common_date_creation'] ) )
+    {
+      if ( check_date_format( $_POST['date_creation_cat'] ) )
+      {
+        $date = date_convert( $_POST['date_creation_cat'] );
+        $query = 'SELECT image_id';
+        $query.= ' FROM '.PREFIX_TABLE.'image_category';
+        $query.= ' WHERE category_id = '.$page['cat'];
+        $result = mysql_query( $query );
+        while ( $row = mysql_fetch_array( $result ) )
+        {
+          $query = 'UPDATE '.PREFIX_TABLE.'images';
+          if ( $_POST['date_creation_cat'] == '' )
+          {
+            $query.= ' SET date_creation = NULL';
+          }
+          else
+          {
+            $query.= " SET date_creation = '".$date."'";
+          }
+          $query.= ' WHERE id = '.$row['image_id'];
+          $query.= ';';
+          mysql_query( $query );
+        }
+      }
+      else
+      {
+        array_push( $errors, $lang['err_date'] );
+      }
+    }
+    if ( isset( $_POST['common_keywords'] ) and $_POST['keywords_cat'] != '' )
+    {
+      $query = 'SELECT id,keywords';
+      $query.= ' FROM '.PREFIX_TABLE.'images';
+      $query.= ' INNER JOIN '.PREFIX_TABLE.'image_category ON id = image_id';
+      $query.= ' WHERE category_id = '.$page['cat'];
+      $query.= ';';
+      $result = mysql_query( $query );
+      while ( $row = mysql_fetch_array( $result ) )
+      {
+        if ( !isset( $row['keywords'] ) ) $specific_keywords = array();
+        else $specific_keywords = explode( ',', $row['keywords'] );
+        
+        $common_keywords   = get_keywords( $_POST['keywords_cat'] );
+        // first possiblity : adding the given keywords to all the pictures
+        if ( $_POST['common_keywords'] == 'add' )
+        {
+          $keywords = array_merge( $specific_keywords, $common_keywords );
+          $keywords = array_unique( $keywords );
+        }
+        // second possiblity : removing the given keywords from all pictures
+        // (without deleting the other specific keywords
+        if ( $_POST['common_keywords'] == 'remove' )
+        {
+          $keywords = array_diff( $specific_keywords, $common_keywords );
+        }
+        // cleaning the keywords array, sometimes, an empty value still remain
+        $keywords = array_remove( $keywords, '' );
+        // updating the picture with new keywords array
+        $query = 'UPDATE '.PREFIX_TABLE.'images';
+        $query.= ' SET keywords = ';
+        if ( count( $keywords ) == 0 )
+        {
+          $query.= 'NULL';
+        }
+        else
+        {
+          $query.= '"';
+          $i = 0;
+          foreach ( $keywords as $keyword ) {
+            if ( $i++ > 0 ) $query.= ',';
+            $query.= $keyword;
+          }
+          $query.= '"';
+        }
+        $query.= ' WHERE id = '.$row['id'];
+        $query.= ';';
+        mysql_query( $query );
+      }
+    }
+  }
+//--------------------------------------------------------- form initialization
+  if( !isset( $_GET['start'] )
+      or !is_numeric( $_GET['start'] )
+      or ( is_numeric( $_GET['start'] ) and $_GET['start'] < 0 ) )
+  {
+    $page['start'] = 0;
+  }
+  else
+  {
+    $page['start'] = $_GET['start'];
+  }
+
+  if ( isset($_GET['num']) and is_numeric($_GET['num']) and $_GET['num'] >= 0 )
+  {
+    $page['start'] =
+      floor( $_GET['num'] / $page['nb_image_page'] ) * $page['nb_image_page'];
+  }
+  // retrieving category information
+  $result = get_cat_info( $page['cat'] );
+  $cat['name'] = $result['name'];
+  $cat['nb_images'] = $result['nb_images'];
+//----------------------------------------------------- template initialization
+  $sub = $vtp->Open('../template/'.$user['template'].'/admin/infos_image.vtp');
+  $tpl = array( 'infoimage_general','author','infoimage_useforall','submit',
+                'infoimage_creation_date','infoimage_detailed','thumbnail',
+                'infoimage_title','infoimage_comment',
+                'infoimage_creation_date','keywords',
+                'infoimage_addtoall','infoimage_removefromall',
+                'infoimage_keyword_separation','infoimage_associate',
+                'errors_title' );
+  templatize_array( $tpl, 'lang', $sub );
+  $vtp->setGlobalVar( $sub, 'user_template',   $user['template'] );
+//-------------------------------------------------------------- errors display
+if ( count( $errors ) != 0 )
+{
+  $vtp->addSession( $sub, 'errors' );
+  foreach ( $errors as $error ) {
+    $vtp->addSession( $sub, 'li' );
+    $vtp->setVar( $sub, 'li.content', $error );
+    $vtp->closeSession( $sub, 'li' );
+  }
+  $vtp->closeSession( $sub, 'errors' );
+}
+//------------------------------------------------------------------------ form
+  $url = './admin.php?page=infos_images&amp;cat_id='.$page['cat'];
+  $url.= '&amp;start='.$page['start'];
+  $vtp->setVar( $sub, 'form_action', add_session_id( $url ) ); 
+  $page['navigation_bar'] = create_navigation_bar(
+    $url, $cat['nb_images'],$page['start'], $page['nb_image_page'], '' );
+  $vtp->setVar( $sub, 'navigation_bar', $page['navigation_bar'] );
+  $cat_name = get_cat_display_name( $cat['name'], ' - ', 'font-style:italic;');
+  $vtp->setVar( $sub, 'cat_name', $cat_name );
+
+  $array_cat_directories = array();
+
+  $infos = array( 'id','file','comment','author','tn_ext','name'
+                  ,'date_creation','keywords','storage_category_id'
+                  ,'category_id' );
+  
+  $query = 'SELECT '.implode( ',', $infos );
+  $query.= ' FROM '.PREFIX_TABLE.'images';
+  $query.= ' INNER JOIN '.PREFIX_TABLE.'image_category ON id = image_id';
+  $query.= ' WHERE category_id = '.$page['cat'];
+  $query.= $conf['order_by'];
+  $query.= ' LIMIT '.$page['start'].','.$page['nb_image_page'];
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    foreach ($infos as $info) { if (!isset($row[$info])) $row[$info] = ''; }
+    
+    $vtp->addSession( $sub, 'picture' );
+    $vtp->setVar( $sub, 'picture.id', $row['id'] );
+    $vtp->setVar( $sub, 'picture.filename', $row['file'] );
+    $vtp->setVar( $sub, 'picture.name', $row['name'] );
+    $vtp->setVar( $sub, 'picture.author', $row['author'] );
+    $vtp->setVar( $sub, 'picture.comment', $row['comment'] );
+    $vtp->setVar( $sub, 'picture.keywords', $row['keywords'] );
+    $vtp->setVar( $sub, 'picture.date_creation',
+                  date_convert_back( $row['date_creation'] ) );
+    $file = get_filename_wo_extension( $row['file'] );
+    $vtp->setVar( $sub, 'picture.default_name', $file );
+    // creating url to thumbnail
+    if ( !isset( $array_cat_directories[$row['storage_category_id']] ) )
+    {
+      $array_cat_directories[$row['storage_category_id']] =
+        get_complete_dir( $row['storage_category_id'] );
+    }
+    $thumbnail_url = $array_cat_directories[$row['storage_category_id']];
+    if ( preg_match( '/^\.\/galleries/', $thumbnail_url ) )
+    {
+      $thumbnail_url = '.'.$thumbnail_url;
+    }
+    $thumbnail_url.= 'thumbnail/';
+    $thumbnail_url.= $conf['prefix_thumbnail'].$file.".".$row['tn_ext'];
+    $vtp->setVar( $sub, 'picture.thumbnail_url', $thumbnail_url );
+    $url = './admin.php?page=picture_modify&amp;image_id='.$row['id'];
+    $vtp->setVar( $sub, 'picture.url', add_session_id( $url ) );
+    $vtp->closeSession( $sub, 'picture' );
+  }
+  // Virtualy associate a picture to a category
+  //
+  // We only show a List Of Values if the number of categories is less than
+  // $conf['max_LOV_categories']
+  $query = 'SELECT COUNT(id) AS nb_total_categories';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  if ( $row['nb_total_categories'] < $conf['max_LOV_categories'] )
+  {
+    $vtp->addSession( $sub, 'associate_LOV' );
+    $page['plain_structure'] = get_plain_structure( true );
+    $structure = create_structure( '', array() );
+    display_categories( $structure, '&nbsp;' );
+    $vtp->closeSession( $sub, 'associate_LOV' );
+  }
+  // else, we only display a small text field, we suppose the administrator
+  // knows the id of its category
+  else
+  {
+    $vtp->addSession( $sub, 'associate_text' );
+    $vtp->closeSession( $sub, 'associate_text' );
+  }
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/install.php
===================================================================
--- /branches/1.3/admin/install.php	(revision 3252)
+++ /branches/1.3/admin/install.php	(revision 3252)
@@ -0,0 +1,305 @@
+<?php
+/***************************************************************************
+ *                                install.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+//-------------------------------------------------------------------- includes
+define( 'PREFIX_INCLUDE', '.' );
+include( '../include/vtemplate.class.php' );
+include( '../include/functions.inc.php' );
+//----------------------------------------------------- template initialization
+$vtp = new VTemplate;
+$handle = $vtp->Open( '../template/default/admin/install.vtp' );
+$vtp->setGlobalVar( $handle, 'release', '1.3' );
+//-------------------------------------------------------------------- language
+if ( isset( $_GET['language'] ) )
+{
+  $isadmin = true;
+  $lang = array();
+  error_reporting( E_ALL ^ E_NOTICE );
+  include( '../language/'.$_GET['language'].'.php' );
+  $tpl = array( 'step1_err_copy', 'step1_err_copy_2', 'step1_err_copy_next',
+                'errors_title', 'step1_title','step1_host','step1_host_info',
+                'step1_user','step1_user_info','step1_pass','step1_pass_info',
+                'step1_database','step1_database_info','step1_prefix',
+                'step1_prefix_info','submit','infos_title','step2_title',
+                'conf_general_webmaster','conf_general_webmaster_info',
+                'step2_pwd','step2_pwd_info','step2_pwd_conf',
+                'step2_pwd_conf_info','conf_general_mail',
+                'conf_general_mail_info','install_end_title',
+                'install_end_message','install_help');
+  templatize_array( $tpl, 'lang', $handle );
+  $vtp->setGlobalVar( $handle, 'language', $_GET['language'] );
+}
+//---------------------- Step 1 : connection informations, write of config file
+if ( isset($_GET['step']) && $_GET['step'] == 1 )
+{
+  $errors = array();
+  $infos  = array();
+  // creation of ./include/mysql.inc.php : file containing database
+  // connection informations
+  if ( isset( $_POST['cfgBase'] )
+       and isset( $_POST['cfgUser'] )
+       and isset( $_POST['cfgPassword'] )
+       and isset( $_POST['cfgHote'] ) )
+  {
+    if ( @mysql_connect( $_POST['cfgHote'],
+                         $_POST['cfgUser'],
+                         $_POST['cfgPassword'] ) )
+    {
+      if ( @mysql_select_db($_POST['cfgBase'] ) )
+      {
+        array_push( $infos, $lang['step1_confirmation'] );
+      }
+      else
+      {
+        array_push( $errors, $lang['step1_err_db'] );
+      }
+    }
+    else
+    {
+      array_push( $errors, $lang['step1_err_server'] );
+    }
+
+    $config_file = '../include/mysql.inc.php';
+    
+    if ( count( $errors ) == 0 )
+    {
+      $file_content = "<?php";
+      $file_content.= "\n\$cfgBase = '".     $_POST['cfgBase']."';";
+      $file_content.= "\n\$cfgUser = '".     $_POST['cfgUser']."';";
+      $file_content.= "\n\$cfgPassword = '". $_POST['cfgPassword']."';";
+      $file_content.= "\n\$cfgHote = '".     $_POST['cfgHote']."';";
+      $file_content.= "\n\$prefixeTable = '".$_POST['prefixeTable']."';";
+      $file_content.= "\n?>";
+      // writting the configuration file
+      if ( $fp = @fopen( $config_file, 'a+' ) )
+      {
+        fwrite( $fp, $file_content ); 
+        fclose( $fp );
+      }
+      $cfgHote     = '';
+      $cfgUser     = '';
+      $cfgPassword = '';
+      $cfgBase     = '';
+      if ( is_file( $config_file ) ) include( $config_file );
+      $file_OK = false;
+      if ( @mysql_connect( $cfgHote, $cfgUser, $cfgPassword ) )
+      {
+        if ( @mysql_select_db( $cfgBase ) ) $file_OK = true;
+      }
+      if ( !$file_OK )
+      {
+        $vtp->addSession( $handle, 'error_copy' );
+        $html_content = htmlentities( $file_content, ENT_QUOTES );
+        $html_content = nl2br( $html_content );
+        $vtp->setVar( $handle, 'error_copy.file_content', $html_content );
+        $vtp->closeSession( $handle, 'error_copy' );
+      }
+      else
+      {
+        $url = 'install.php?step=2&language='.$_GET['language'];
+        header( 'Request-URI: '.$url );  
+        header( 'Content-Location: '.$url);  
+        header( 'Location: '.$url );
+        exit();
+      }
+    }
+  }
+  // errors display
+  if ( sizeof( $errors ) != 0 )
+  {
+    $vtp->addSession( $handle, 'errors' );
+    foreach ( $errors as $error ) {
+      $vtp->addSession( $handle, 'error' );
+      $vtp->setVar( $handle, 'error.content', $error );
+      $vtp->closeSession( $handle, 'error' );
+    }
+    $vtp->closeSession( $handle, 'errors' );
+  }
+  // infos display
+  if ( sizeof( $infos ) != 0 )
+  {
+    $vtp->addSession( $handle, 'infos' );
+    foreach ( $infos as $info ) {
+      $vtp->addSession( $handle, 'info' );
+      $vtp->setVar( $handle, 'info.content', $info );
+      $vtp->closeSession( $handle, 'info' );
+    }
+    $vtp->closeSession( $handle, 'infos' );
+  }
+  // form display (if necessary)
+  if ( !isset( $_POST['submit'] ) or sizeof( $errors ) > 0 )
+  {
+    $vtp->addSession( $handle, 'step1' );
+
+    // host
+    if ( !isset( $_POST['cfgHote'] ) )
+      $vtp->setVar( $handle, 'step1.f_host', 'localhost' );
+    else
+      $vtp->setVar( $handle, 'step1.f_host', $_POST['cfgHote'] );
+    // user
+	if ( isset( $_POST['cfgUser'] ) )
+	    $vtp->setVar( $handle, 'step1.f_user', $_POST['cfgUser'] );
+    // base
+	if ( isset( $_POST['cfgBase'] ) )
+	    $vtp->setVar( $handle, 'step1.f_base', $_POST['cfgBase'] );
+    // prefixeTable
+    if ( !isset( $_POST['prefixeTable'] ) )
+      $vtp->setVar( $handle, 'step1.f_prefixeTable', 'phpwebgallery_' );
+    else
+      $vtp->setVar( $handle, 'step1.f_prefixeTable', $_POST['prefixeTable'] );
+
+    $vtp->closeSession( $handle, 'step1' );
+  }
+}
+//------------------------------------- Step 2 : creation of tables in database
+else if (  isset($_GET['step']) && $_GET['step'] == 2 )
+{
+  $errors = array();
+  $infos  = array();
+
+  include( '../include/mysql.inc.php' );
+  mysql_connect( $cfgHote, $cfgUser, $cfgPassword )
+    or die ( "Can't connect to database host" );
+  mysql_select_db( $cfgBase )
+    or die ( "Connection to host succeeded, but database selection failed" );
+		
+  if ( !isset( $_POST['submit'] ) )
+  {
+    // tables creation, based on phpwebgallery_structure.sql
+    $sql_lines = file( './phpwebgallery_structure.sql' );
+    $query = '';
+    foreach ( $sql_lines as $sql_line ) {
+      $sql_line = trim( $sql_line );
+      if ( preg_match( '/(^--|^$)/', $sql_line ) ) continue;
+      $query.= ' '.$sql_line;
+      // if we reached the end of query, we execute it and reinitialize the
+      // variable "query"
+      if ( preg_match( '/;$/', $sql_line ) )
+      {
+        $query = trim( $query );
+        $query = str_replace( 'phpwebgallery_', $prefixeTable, $query );
+        // we don't execute "DROP TABLE" queries
+        if ( !preg_match( '/^DROP TABLE/i', $query ) )
+          mysql_query( $query );
+        $query = '';
+      }
+    }
+  }
+
+  if ( isset( $_POST['submit'] ) )
+  {
+    // webmaster login must be
+    // 1. non empty
+    // 2. without characters ' or "
+    $webmaster = preg_replace( '/\s{2,}/', ' ', $_POST['webmaster'] );
+    $webmaster = trim( $webmaster );
+    if ( $webmaster == '' )
+      array_push( $errors, $lang['step2_err_login1'] );
+    if ( preg_match( '/[\'"]/', $webmaster ) )
+      array_push( $errors, $lang['step2_err_login3'] );
+    // the webmaster string must be the same as its confirmation
+    if ( $_POST['pwdWebmaster'] != $_POST['pwdWebmasterConf'] )
+      array_push( $errors, $lang['step2_err_pass'] );
+    // mail address must have this format : name@server.com
+    $error_mail_address = validate_mail_address( $_POST['mail_webmaster'] );
+    if ( $error_mail_address != '' )
+      array_push( $errors, $error_mail_address );
+    if ( $_POST['mail_webmaster'] == '' )
+      array_push( $errors, $lang['reg_err_mail_address'] );
+
+    // if no error found till here : insertion of data in tables
+    if ( count( $errors ) == 0 )
+    {
+      $query = 'DELETE FROM '.$prefixeTable.'config';
+      mysql_query( $query );
+
+      $query = 'INSERT INTO '.$prefixeTable.'config';
+      $query.= ' (webmaster,mail_webmaster) VALUES ';
+      $query.= " ('".$webmaster."','".$_POST['mail_webmaster']."')";
+      $query.= ';';
+      mysql_query( $query );
+
+      $query = 'INSERT INTO '.$prefixeTable.'sites';
+      $query.= " (id,galleries_url) VALUES (1, './galleries/')";
+      $query.= ';';
+      mysql_query( $query );
+
+      // webmaster admin user
+      $query = 'INSERT INTO '.$prefixeTable.'users';
+      $query.= ' (id,username,password,status,language,mail_address) VALUES ';
+      $query.= "(1,'".$webmaster."','".md5( $_POST['pwdWebmaster'] )."'";
+      $query.= ",'admin','".$_GET['language']."'";
+      $query.= ",'".$_POST['mail_webmaster']."')";
+      $query.= ';';
+      mysql_query($query);
+
+      // guest user
+      $query = 'INSERT INTO '.$prefixeTable.'users';
+      $query.= '(id,username,password,status,language) VALUES ';
+      $query.= "(2,'guest','','guest','".$_GET['language']."')";
+      $query.= ';';
+      mysql_query( $query );
+    }
+  }
+
+  // errors display
+  if ( sizeof( $errors ) != 0 )
+  {
+    $vtp->addSession( $handle, 'errors' );
+    foreach ( $errors as $error ) {
+      $vtp->addSession( $handle, 'error' );
+      $vtp->setVar( $handle, 'error.content', $error );
+      $vtp->closeSession( $handle, 'error' );
+      }
+    $vtp->closeSession( $handle, 'errors' );
+  }
+
+  if ( !isset( $_POST['submit'] ) or sizeof( $errors ) > 0 )
+  {
+    $vtp->addSession( $handle, 'step2' );
+	if ( isset( $_POST['webmaster'] ))
+    $vtp->setVar( $handle, 'step2.f_webmaster', $_POST['webmaster'] );
+	if ( isset( $_POST['mail_webmaster'] ))
+    $vtp->setVar( $handle, 'step2.f_mail_webmaster', $_POST['mail_webmaster']);
+    $vtp->closeSession( $handle, 'step2' );
+  }
+
+  // end of installation message
+  if ( isset( $_POST['submit'] ) and count( $errors ) == 0 )
+  {
+    $vtp->addSession( $handle, 'install_end' );
+    $vtp->closeSession( $handle, 'install_end' );
+  }
+}
+//---------------------------------------------------- Step 0 : language choice
+else
+{
+  $vtp->addSession( $handle, 'step0' );
+  $languages = get_languages( '../language/' );
+  foreach ( $languages as $language ) {
+    $vtp->addSession( $handle, 'language' );
+    $vtp->setVar( $handle, 'language.name', $language );
+    $vtp->closeSession( $handle, 'language' );
+  }
+  $vtp->closeSession( $handle, 'step0' );
+}
+//----------------------------------------------------------- html code display
+$code = $vtp->Display( $handle, 0 );
+echo $code;
+?>
Index: /branches/1.3/admin/phpwebgallery_structure.sql
===================================================================
--- /branches/1.3/admin/phpwebgallery_structure.sql	(revision 3252)
+++ /branches/1.3/admin/phpwebgallery_structure.sql	(revision 3252)
@@ -0,0 +1,262 @@
+-- MySQL dump 8.21
+--
+-- Host: localhost    Database: pwg-1_3
+---------------------------------------------------------
+-- Server version	3.23.49-log
+
+--
+-- Table structure for table 'phpwebgallery_categories'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_categories;
+CREATE TABLE phpwebgallery_categories (
+  id smallint(5) unsigned NOT NULL auto_increment,
+  date_last date default NULL,
+  nb_images mediumint(8) unsigned NOT NULL default '0',
+  name varchar(255) NOT NULL default '',
+  id_uppercat smallint(5) unsigned default NULL,
+  comment text,
+  dir varchar(255) default NULL,
+  rank tinyint(3) unsigned default NULL,
+  status enum('public','private') NOT NULL default 'public',
+  site_id tinyint(4) unsigned NOT NULL default '1',
+  visible enum('true','false') NOT NULL default 'true',
+  uploadable enum('true','false') NOT NULL default 'false',
+  representative_picture_id mediumint(8) unsigned default NULL,
+  uppercats varchar(255) NOT NULL default '',
+  PRIMARY KEY  (id),
+  KEY id_uppercat (id_uppercat)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_comments'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_comments;
+CREATE TABLE phpwebgallery_comments (
+  id int(11) unsigned NOT NULL auto_increment,
+  image_id mediumint(8) unsigned NOT NULL default '0',
+  date int(11) unsigned NOT NULL default '0',
+  author varchar(255) default NULL,
+  content longtext,
+  validated enum('true','false') NOT NULL default 'false',
+  PRIMARY KEY  (id)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_config'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_config;
+CREATE TABLE phpwebgallery_config (
+  prefix_thumbnail varchar(10) default 'TN-',
+  webmaster varchar(255) NOT NULL default '',
+  mail_webmaster varchar(255) NOT NULL default '',
+  access enum('free','restricted') default 'free',
+  session_id_size tinyint(3) unsigned NOT NULL default '4',
+  session_keyword varchar(255) default NULL,
+  session_time tinyint(3) unsigned NOT NULL default '30',
+  max_user_listbox tinyint(3) unsigned NOT NULL default '10',
+  show_comments enum('true','false') NOT NULL default 'true',
+  nb_comment_page tinyint(4) NOT NULL default '10',
+  upload_available enum('true','false') NOT NULL default 'false',
+  upload_maxfilesize smallint(5) unsigned NOT NULL default '150',
+  upload_maxwidth smallint(5) unsigned NOT NULL default '800',
+  upload_maxheight smallint(5) unsigned NOT NULL default '600',
+  upload_maxwidth_thumbnail smallint(5) unsigned NOT NULL default '150',
+  upload_maxheight_thumbnail smallint(5) unsigned NOT NULL default '100',
+  log enum('true','false') NOT NULL default 'false',
+  comments_validation enum('true','false') NOT NULL default 'false',
+  comments_forall enum('true','false') NOT NULL default 'false',
+  authorize_cookies enum('true','false') NOT NULL default 'false',
+  mail_notification enum('true','false') NOT NULL default 'false'
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_favorites'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_favorites;
+CREATE TABLE phpwebgallery_favorites (
+  user_id smallint(5) unsigned NOT NULL default '0',
+  image_id mediumint(8) unsigned NOT NULL default '0',
+  KEY user_id (user_id,image_id)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_group_access'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_group_access;
+CREATE TABLE phpwebgallery_group_access (
+  group_id smallint(5) unsigned NOT NULL default '0',
+  cat_id smallint(5) unsigned NOT NULL default '0',
+  PRIMARY KEY  (group_id,cat_id)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_groups'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_groups;
+CREATE TABLE phpwebgallery_groups (
+  id smallint(5) unsigned NOT NULL auto_increment,
+  name varchar(255) NOT NULL default '',
+  PRIMARY KEY  (id)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_history'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_history;
+CREATE TABLE phpwebgallery_history (
+  date int(11) NOT NULL default '0',
+  login varchar(15) default NULL,
+  IP varchar(50) NOT NULL default '',
+  category varchar(150) default NULL,
+  file varchar(50) default NULL,
+  picture varchar(150) default NULL
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_image_category'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_image_category;
+CREATE TABLE phpwebgallery_image_category (
+  image_id mediumint(8) unsigned NOT NULL default '0',
+  category_id smallint(5) unsigned NOT NULL default '0',
+  PRIMARY KEY  (image_id,category_id),
+  KEY category_id (category_id),
+  KEY image_id (image_id)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_images'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_images;
+CREATE TABLE phpwebgallery_images (
+  id mediumint(8) unsigned NOT NULL auto_increment,
+  file varchar(255) NOT NULL default '',
+  date_available date NOT NULL default '0000-00-00',
+  date_creation date default NULL,
+  tn_ext char(3) NOT NULL default 'jpg',
+  name varchar(255) default NULL,
+  comment text,
+  author varchar(255) default NULL,
+  hit int(10) unsigned NOT NULL default '0',
+  filesize mediumint(9) unsigned default NULL,
+  width smallint(9) unsigned default NULL,
+  height smallint(9) unsigned default NULL,
+  keywords varchar(255) default NULL,
+  storage_category_id smallint(5) unsigned default NULL,
+  PRIMARY KEY  (id),
+  KEY storage_category_id (storage_category_id)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_sessions'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_sessions;
+CREATE TABLE phpwebgallery_sessions (
+  id varchar(255) binary NOT NULL default '',
+  user_id smallint(5) unsigned NOT NULL default '0',
+  expiration int(10) unsigned NOT NULL default '0',
+  ip varchar(255) NOT NULL default '',
+  PRIMARY KEY  (id)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_sites'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_sites;
+CREATE TABLE phpwebgallery_sites (
+  id tinyint(4) NOT NULL auto_increment,
+  galleries_url varchar(255) NOT NULL default '',
+  PRIMARY KEY  (id),
+  UNIQUE KEY galleries_url (galleries_url)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_user_access'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_user_access;
+CREATE TABLE phpwebgallery_user_access (
+  user_id smallint(5) unsigned NOT NULL default '0',
+  cat_id smallint(5) unsigned NOT NULL default '0',
+  PRIMARY KEY  (user_id,cat_id)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_user_category'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_user_category;
+CREATE TABLE phpwebgallery_user_category (
+  user_id smallint(5) unsigned NOT NULL default '0',
+  category_id smallint(5) unsigned NOT NULL default '0',
+  date_last date default NULL,
+  nb_sub_categories smallint(5) unsigned NOT NULL default '0',
+  PRIMARY KEY  (user_id,category_id)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_user_group'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_user_group;
+CREATE TABLE phpwebgallery_user_group (
+  user_id smallint(5) unsigned NOT NULL default '0',
+  group_id smallint(5) unsigned NOT NULL default '0',
+  PRIMARY KEY  (group_id,user_id)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_users'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_users;
+CREATE TABLE phpwebgallery_users (
+  id smallint(5) unsigned NOT NULL auto_increment,
+  username varchar(20) binary NOT NULL default '',
+  password varchar(255) NOT NULL default '',
+  mail_address varchar(255) default NULL,
+  nb_image_line tinyint(1) unsigned NOT NULL default '5',
+  nb_line_page tinyint(3) unsigned NOT NULL default '3',
+  status enum('admin','guest') NOT NULL default 'guest',
+  language varchar(50) NOT NULL default 'english',
+  maxwidth smallint(6) default NULL,
+  maxheight smallint(6) default NULL,
+  expand enum('true','false') NOT NULL default 'false',
+  show_nb_comments enum('true','false') NOT NULL default 'false',
+  short_period tinyint(3) unsigned NOT NULL default '7',
+  long_period tinyint(3) unsigned NOT NULL default '14',
+  template varchar(255) NOT NULL default 'default',
+  forbidden_categories text,
+  PRIMARY KEY  (id),
+  UNIQUE KEY username (username)
+) TYPE=MyISAM;
+
+--
+-- Table structure for table 'phpwebgallery_waiting'
+--
+
+DROP TABLE IF EXISTS phpwebgallery_waiting;
+CREATE TABLE phpwebgallery_waiting (
+  id int(10) unsigned NOT NULL auto_increment,
+  storage_category_id smallint(5) unsigned NOT NULL default '0',
+  file varchar(255) NOT NULL default '',
+  username varchar(255) NOT NULL default '',
+  mail_address varchar(255) NOT NULL default '',
+  date int(10) unsigned NOT NULL default '0',
+  tn_ext char(3) default NULL,
+  validated enum('true','false') NOT NULL default 'false',
+  infos text,
+  PRIMARY KEY  (id)
+) TYPE=MyISAM;
+
Index: /branches/1.3/admin/picture_modify.php
===================================================================
--- /branches/1.3/admin/picture_modify.php	(revision 3252)
+++ /branches/1.3/admin/picture_modify.php	(revision 3252)
@@ -0,0 +1,370 @@
+<?php
+/***************************************************************************
+ *                            picture_modify.php                           *
+ *                            ------------------                           *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+include_once( './include/isadmin.inc.php' );
+//--------------------------------------------------------- update informations
+$errors = array();
+// first, we verify whether there is a mistake on the given creation date
+if ( isset( $_POST['creation_date'] ) and $_POST['creation_date'] != '' )
+{
+  if ( !check_date_format( $_POST['creation_date'] ) )
+    array_push( $errors, $lang['err_date'] );
+}
+if ( isset( $_POST['submit'] ) )
+{
+  $query = 'UPDATE '.PREFIX_TABLE.'images';
+  
+  $query.= ' SET name = ';
+  if ( $_POST['name'] == '' )
+    $query.= 'NULL';
+  else
+    $query.= "'".htmlentities( $_POST['name'], ENT_QUOTES )."'";
+  
+  $query.= ', author = ';
+  if ( $_POST['author'] == '' )
+    $query.= 'NULL';
+  else
+    $query.= "'".htmlentities($_POST['author'],ENT_QUOTES)."'";
+
+  $query.= ', comment = ';
+  if ( $_POST['comment'] == '' )
+    $query.= 'NULL';
+  else
+    $query.= "'".htmlentities($_POST['comment'],ENT_QUOTES)."'";
+
+  $query.= ', date_creation = ';
+  if ( check_date_format( $_POST['creation_date'] ) )
+    $query.= "'".date_convert( $_POST['creation_date'] )."'";
+  else if ( $_POST['creation_date'] == '' )
+    $query.= 'NULL';
+
+  $query.= ', keywords = ';
+  $keywords_array = get_keywords( $_POST['keywords'] );
+  if ( count( $keywords_array ) == 0 )
+    $query.= 'NULL';
+  else
+  {
+    $query.= "'";
+    foreach ( $keywords_array as $i => $keyword ) {
+      if ( $i > 0 ) $query.= ',';
+      $query.= $keyword;
+    }
+    $query.= "'";
+  }
+
+  $query.= ' WHERE id = '.$_GET['image_id'];
+  $query.= ';';
+  mysql_query( $query );
+  // make the picture representative of a category ?
+  $query = 'SELECT DISTINCT(category_id) as category_id';
+  $query.= ',representative_picture_id';
+  $query.= ' FROM '.PREFIX_TABLE.'image_category AS ic';
+  $query.= ', '.PREFIX_TABLE.'categories AS c';
+  $query.= ' WHERE c.id = ic.category_id';
+  $query.= ' AND image_id = '.$_GET['image_id'];
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    // if the user ask the picture to be the representative picture of its
+    // category, the category is updated in the database (without wondering
+    // if this picture was already the representative one)
+    if ( isset($_POST['representative-'.$row['category_id']]) )
+    {
+      $query = 'UPDATE '.PREFIX_TABLE.'categories';
+      $query.= ' SET representative_picture_id = '.$_GET['image_id'];
+      $query.= ' WHERE id = '.$row['category_id'];
+      $query.= ';';
+      mysql_query( $query );
+    }
+    // if the user ask this picture to be not any more the representative,
+    // we have to set the representative_picture_id of this category to NULL
+    else if ( isset( $row['representative_picture_id'] )
+              and $row['representative_picture_id'] == $_GET['image_id'] )
+    {
+      $query = 'UPDATE '.PREFIX_TABLE.'categories';
+      $query.= ' SET representative_picture_id = NULL';
+      $query.= ' WHERE id = '.$row['category_id'];
+      $query.= ';';
+      mysql_query( $query );
+    }
+  }
+  $associate_or_dissociate = false;
+  // associate with a new category ?
+  if ( $_POST['associate'] != '-1' and $_POST['associate'] != '' )
+  {
+    // does the uppercat id exists in the database ?
+    if ( !is_numeric( $_POST['associate'] ) )
+    {
+      array_push( $errors, $lang['cat_unknown_id'] );
+    }
+    else
+    {
+      $query = 'SELECT id';
+      $query.= ' FROM '.PREFIX_TABLE.'categories';
+      $query.= ' WHERE id = '.$_POST['associate'];
+      $query.= ';';
+      if ( mysql_num_rows( mysql_query( $query ) ) == 0 )
+        array_push( $errors, $lang['cat_unknown_id'] );
+    }
+  }
+  if ( $_POST['associate'] != '-1'
+       and $_POST['associate'] != ''
+       and count( $errors ) == 0 )
+  {
+    $query = 'INSERT INTO '.PREFIX_TABLE.'image_category';
+    $query.= ' (category_id,image_id) VALUES ';
+    $query.= '('.$_POST['associate'].','.$_GET['image_id'].')';
+    $query.= ';';
+    mysql_query( $query);
+    $associate_or_dissociate = true;
+    update_category( $_POST['associate'] );
+  }
+  // dissociate any category ?
+  // retrieving all the linked categories
+  $query = 'SELECT DISTINCT(category_id) as category_id';
+  $query.= ' FROM '.PREFIX_TABLE.'image_category';
+  $query.= ' WHERE image_id = '.$_GET['image_id'];
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    if ( isset($_POST['dissociate-'.$row['category_id']]) )
+    {
+      $query = 'DELETE FROM '.PREFIX_TABLE.'image_category';
+      $query.= ' WHERE image_id = '.$_GET['image_id'];
+      $query.= ' AND category_id = '.$row['category_id'];
+      $query.= ';';
+      mysql_query( $query );
+      $associate_or_dissociate = true;
+      update_category( $row['category_id'] );
+    }
+  }
+  if ( $associate_or_dissociate )
+  {
+    synchronize_all_users();
+  }
+}
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open(
+  '../template/'.$user['template'].'/admin/picture_modify.vtp' );
+
+$tpl = array( 'submit','errors_title','picmod_update','picmod_back',
+              'default','file','size','filesize','registration_date',
+              'author','creation_date','keywords','comment', 'upload_name',
+              'dissociate','categories','infoimage_associate',
+              'cat_image_info','category_representative' );
+templatize_array( $tpl, 'lang', $sub );
+$vtp->setGlobalVar( $sub, 'user_template', $user['template'] );
+//-------------------------------------------------------------- errors display
+if ( count( $errors ) != 0 )
+{
+  $vtp->addSession( $sub, 'errors' );
+  foreach ( $errors as $error ) {
+    $vtp->addSession( $sub, 'li' );
+    $vtp->setVar( $sub, 'li.content', $error );
+    $vtp->closeSession( $sub, 'li' );
+  }
+  $vtp->closeSession( $sub, 'errors' );
+}
+//-------------------------------------------- displaying informations and form
+$action = './admin.php?'.$_SERVER['QUERY_STRING'];
+$vtp->setVar( $sub, 'form_action', $action );
+// retrieving direct information about picture
+$infos = array( 'file','date_available','date_creation','tn_ext','name'
+                ,'filesize','width','height','author','comment','keywords'
+                ,'storage_category_id' );
+$query = 'SELECT '. implode( ',', $infos );
+$query.= ' FROM '.PREFIX_TABLE.'images';
+$query.= ' WHERE id = '.$_GET['image_id'];
+$query.= ';';
+$row = mysql_fetch_array( mysql_query( $query ) );
+
+foreach ( $infos as $info ) {
+  if ( !isset( $row[$info] ) ) $row[$info] = '';
+}
+
+// picture title
+if ( $row['name'] == '' )
+{
+  $title = str_replace( '_',' ',get_filename_wo_extension($row['file']) );
+}
+else
+{
+  $title = $row['name'];
+}
+$vtp->setVar( $sub, 'title', $title );
+$vtp->setVar( $sub, 'f_file', $row['file'] );
+$vtp->setVar( $sub, 'f_size', $row['width'].' * '.$row['height'] );
+$vtp->setVar( $sub, 'f_filesize', $row['filesize'].' KB' );
+$vtp->setVar( $sub, 'f_registration_date',format_date($row['date_available']));
+$default_name = str_replace( '_',' ',get_filename_wo_extension($row['file']) );
+$vtp->setVar( $sub, 'default_name', $default_name );
+// if this form is displayed after an unsucceeded submit, we have to display
+// the values filled by the user (wright or wrong).
+if ( count( $errors ) > 0 )
+{
+  $name            = $_POST['name'];
+  $author          = $_POST['author'];
+  $creation_date   = $_POST['creation_date'];
+  $keywords        = $_POST['keywords'];
+  $comment         = $_POST['comment'];
+}
+else
+{
+  $name            = $row['name'];
+  $author          = $row['author'];
+  $creation_date   = date_convert_back( $row['date_creation'] );
+  $keywords        = $row['keywords'];
+  $comment         = $row['comment'];
+}
+$vtp->setVar( $sub, 'f_name',            $name );
+$vtp->setVar( $sub, 'f_author',          $author );
+$vtp->setVar( $sub, 'f_creation_date',   $creation_date );
+$vtp->setVar( $sub, 'f_keywords',        $keywords );
+$vtp->setVar( $sub, 'f_comment',         $comment );
+// retrieving directory where picture is stored (for displaying the
+// thumbnail)
+$thumbnail_url = get_complete_dir( $row['storage_category_id'] );
+$result = get_cat_info( $row['storage_category_id'] );
+$cat_name = get_cat_display_name( $result['name'], ' &gt; ', '' );
+$vtp->setVar( $sub, 'dir', $cat_name );
+if ( $result['site_id'] == 1 ) $thumbnail_url = '.'.$thumbnail_url;
+$file_wo_ext = get_filename_wo_extension( $row['file'] );
+$thumbnail_url.= '/thumbnail/';
+$thumbnail_url.= $conf['prefix_thumbnail'].$file_wo_ext.'.'.$row['tn_ext'];
+$vtp->setVar( $sub, 'thumbnail_url', $thumbnail_url );
+// storage category is linked by default
+$vtp->addSession( $sub, 'linked_category' );
+$vtp->setVar( $sub, 'linked_category.name', $cat_name );
+$url = '../picture.php?image_id='.$_GET['image_id'];
+$url.= '&amp;cat='.$row['storage_category_id'];
+$vtp->setVar( $sub, 'linked_category.url',add_session_id( $url));
+$url = './admin.php?page=infos_images&amp;cat_id='.$row['storage_category_id'];
+$vtp->setVar( $sub, 'linked_category.infos_images_link',add_session_id( $url));
+if ( $result['status'] == 'private' )
+{
+  $private_string = '<span style="color:red;font-weight:bold;">';
+  $private_string.= $lang['private'].'</span>';
+  $vtp->setVar( $sub, 'linked_category.private', $private_string );
+}
+if ( !$result['visible'] )
+{
+  $invisible_string = '<span style="color:red;">';
+  $invisible_string.= $lang['cat_invisible'].'</span>';
+  $vtp->setVar( $sub, 'linked_category.invisible', $invisible_string );
+}
+$vtp->setVar( $sub, 'linked_category.id', $row['storage_category_id'] );
+if ( $result['representative_picture_id'] == $_GET['image_id'] )
+{
+  $vtp->setVar( $sub, 'linked_category.representative_checked',
+                ' checked="checked"' );
+}
+$vtp->closeSession( $sub, 'linked_category' );
+// retrieving all the linked categories
+$query = 'SELECT DISTINCT(category_id) as category_id,status,visible';
+$query.= ',representative_picture_id';
+$query.= ' FROM '.PREFIX_TABLE.'image_category';
+$query.= ','.PREFIX_TABLE.'categories';
+$query.= ' WHERE image_id = '.$_GET['image_id'];
+$query.= ' AND category_id != '.$row['storage_category_id'];
+$query.= ' AND category_id = id';
+$query.= ';';
+$result = mysql_query( $query );
+while ( $row = mysql_fetch_array( $result ) )
+{
+  $vtp->addSession( $sub, 'linked_category' );
+  $vtp->setVar( $sub, 'linked_category.id', $row['category_id'] );
+
+  $vtp->addSession( $sub, 'checkbox' );
+  $vtp->setVar( $sub, 'checkbox.id', $row['category_id'] );
+  $vtp->closeSession( $sub, 'checkbox' );
+
+  $cat_infos = get_cat_info( $row['category_id'] );
+  $cat_name = get_cat_display_name( $cat_infos['name'], ' &gt; ', '' );
+  $vtp->setVar( $sub, 'linked_category.name', $cat_name );
+
+  $url = '../picture.php?image_id='.$_GET['image_id'];
+  $url.= '&amp;cat='.$row['category_id'];
+  $vtp->setVar( $sub, 'linked_category.url',add_session_id( $url));
+
+  $url = './admin.php?page=infos_images&amp;cat_id='.$row['category_id'];
+  $vtp->setVar( $sub, 'linked_category.infos_images_link',
+                add_session_id( $url));
+
+  if ( $row['status'] == 'private' )
+  {
+    $private_string = '<span style="color:red;font-weight:bold;">';
+    $private_string.= $lang['private'].'</span>';
+    $vtp->setVar( $sub, 'linked_category.private', $private_string );
+  }
+
+  if ( !get_boolean( $row['visible'] ) )
+  {
+    $invisible_string = '<span style="color:red;">';
+    $invisible_string.= $lang['cat_invisible'].'</span>';
+    $vtp->setVar( $sub, 'linked_category.invisible', $invisible_string );
+  }
+
+  if ( isset( $row['representative_picture_id'] )
+       and $row['representative_picture_id'] == $_GET['image_id'] )
+  {
+    $vtp->setVar( $sub, 'linked_category.representative_checked',
+                  ' checked="checked"' );
+  }
+  
+  $vtp->closeSession( $sub, 'linked_category' );
+}
+// if there are linked category other than the storage category, we show
+// propose the dissociate text
+if ( mysql_num_rows( $result ) > 0 )
+{
+  $vtp->addSession( $sub, 'dissociate' );
+  $vtp->closeSession( $sub, 'dissociate' );
+}
+// associate to another category ?
+//
+// We only show a List Of Values if the number of categories is less than
+// $conf['max_LOV_categories']
+$query = 'SELECT COUNT(id) AS nb_total_categories';
+$query.= ' FROM '.PREFIX_TABLE.'categories';
+$query.= ';';
+$row = mysql_fetch_array( mysql_query( $query ) );
+if ( $row['nb_total_categories'] < $conf['max_LOV_categories'] )
+{
+  $vtp->addSession( $sub, 'associate_LOV' );
+  $vtp->addSession( $sub, 'associate_cat' );
+  $vtp->setVar( $sub, 'associate_cat.value', '-1' );
+  $vtp->setVar( $sub, 'associate_cat.content', '' );
+  $vtp->closeSession( $sub, 'associate_cat' );
+  $page['plain_structure'] = get_plain_structure( true );
+  $structure = create_structure( '', array() );
+  display_categories( $structure, '&nbsp;' );
+  $vtp->closeSession( $sub, 'associate_LOV' );
+}
+// else, we only display a small text field, we suppose the administrator
+// knows the id of its category
+else
+{
+  $vtp->addSession( $sub, 'associate_text' );
+  $vtp->closeSession( $sub, 'associate_text' );
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/stats.php
===================================================================
--- /branches/1.3/admin/stats.php	(revision 3252)
+++ /branches/1.3/admin/stats.php	(revision 3252)
@@ -0,0 +1,189 @@
+<?php
+/***************************************************************************
+ *                                 stats.php                               *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+include_once( './include/isadmin.inc.php' );
+$max_pixels = 500;
+//------------------------------------------------------------ comment deletion
+if ( isset( $_GET['del'] ) and is_numeric( $_GET['del'] ) )
+{
+  $query = 'DELETE FROM '.PREFIX_TABLE.'comments';
+  $query.= ' WHERE id = '.$_GET['del'];
+  $query.= ';';
+  mysql_query( $query );
+}
+//--------------------------------------------------------- history table empty
+if ( isset( $_GET['act'] ) and $_GET['act'] == 'empty' )
+{
+  $query = 'DELETE FROM '.PREFIX_TABLE.'history';
+  $query.= ';';
+  mysql_query( $query );
+}
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/stats.vtp' );
+$tpl = array( 'stats_last_days','date','login',
+              'IP','file','picture','category','stats_pages_seen',
+              'stats_visitors','stats_empty', 'stats_pages_seen_graph_title',
+              'stats_visitors_graph_title');
+templatize_array( $tpl, 'lang', $sub );
+$vtp->setGlobalVar( $sub, 'user_template', $user['template'] );
+//--------------------------------------------------- number of days to display
+if ( isset( $_GET['last_days'] ) ) define( 'MAX_DAYS', $_GET['last_days'] );
+else                               define( 'MAX_DAYS', 0 );
+
+foreach ( $conf['last_days'] as $option ) {
+  $vtp->addSession( $sub, 'last_day_option' );
+  $vtp->setVar( $sub, 'last_day_option.option', $option );
+  $url = './admin.php?page=stats';
+  if (isset($_GET['expand']))
+	  $url .='&amp;expand='.$_GET['expand'];
+  $url.= '&amp;last_days='.($option - 1);
+  $vtp->setVar( $sub, 'last_day_option.link', add_session_id( $url ) );
+  if ( $option == MAX_DAYS + 1 )
+  {
+    $vtp->setVar( $sub, 'last_day_option.style', 'font-weight:bold;');
+  }
+  $vtp->closeSession( $sub, 'last_day_option' );
+}
+//---------------------------------------------------------------- log  history
+// empty link
+$url = './admin.php?page=stats';
+if (isset($_GET['last_days']))
+  	$url .='&amp;last_days='.$_GET['last_days'];
+// expand array management
+$expand_days = array();
+if (isset($_GET['expand']))
+{
+	$url.= '&amp;expand='.$_GET['expand'];
+	$expand_days = explode( ',', $_GET['expand'] );
+}
+$url.= '&amp;act=empty';
+$vtp->setVar( $sub, 'emply_url', add_session_id( $url ) );
+$page['expand_days'] = array();
+foreach ( $expand_days as $expand_day ) {
+  if ( is_numeric( $expand_day ) )
+  {
+    array_push( $page['expand_days'], $expand_day );
+  }
+}
+
+$days = array();
+$max_nb_visitors = 0;
+$max_pages_seen = 0;
+
+$starttime = mktime(  0, 0, 0,date('n'),date('j'),date('Y') );
+$endtime   = mktime( 23,59,59,date('n'),date('j'),date('Y') );
+for ( $i = 0; $i <= MAX_DAYS; $i++ )
+{
+  $day = array();
+  $vtp->addSession( $sub, 'day' );
+  // link to open the day to see details
+  $local_expand = $page['expand_days'];
+  if ( in_array( $i, $page['expand_days'] ) )
+  {
+    $vtp->addSession( $sub, 'expanded' );
+    $vtp->closeSession( $sub, 'expanded' );
+    $vtp->setVar( $sub, 'day.open_or_close', $lang['close'] );
+    $local_expand = array_remove( $local_expand, $i );
+  }
+  else
+  {
+    $vtp->addSession( $sub, 'collapsed' );
+    $vtp->closeSession( $sub, 'collapsed' );
+    $vtp->setVar( $sub, 'day.open_or_close', $lang['open'] );
+    array_push( $local_expand, $i );
+  }
+  $url = './admin.php?page=stats';
+  if (isset($_GET['last_days']))
+  	$url.= '&amp;last_days='.$_GET['last_days'];
+  $url.= '&amp;expand='.implode( ',', $local_expand );
+  $vtp->setVar( $sub, 'day.url', add_session_id( $url ) );
+  // date displayed like this (in English ) :
+  //                     Sunday 15 June 2003
+  $date = $lang['day'][date( 'w', $starttime )];   // Sunday
+  $date.= date( ' j ', $starttime );               // 15
+  $date.= $lang['month'][date( 'n', $starttime )]; // June
+  $date.= date( ' Y', $starttime );                // 2003
+  $day['date'] = $date;
+  $vtp->setVar( $sub, 'day.name', $date );
+  // number of visitors for this day
+  $query = 'SELECT DISTINCT(IP) as nb_visitors';
+  $query.= ' FROM '.PREFIX_TABLE.'history';
+  $query.= ' WHERE date > '.$starttime;
+  $query.= ' AND date < '.$endtime;
+  $query.= ';';
+  $result = mysql_query( $query );
+  $nb_visitors = mysql_num_rows( $result );
+  $day['nb_visitors'] = $nb_visitors;
+  if ( $nb_visitors > $max_nb_visitors ) $max_nb_visitors = $nb_visitors;
+  $vtp->setVar( $sub, 'day.nb_visitors', $nb_visitors );
+  // log lines for this day
+  $query = 'SELECT date,login,IP,category,file,picture';
+  $query.= ' FROM '.PREFIX_TABLE.'history';
+  $query.= ' WHERE date > '.$starttime;
+  $query.= ' AND date < '.$endtime;
+  $query.= ' ORDER BY date DESC';
+  $query.= ';';
+  $result = mysql_query( $query );
+  $nb_pages_seen = mysql_num_rows( $result );
+  $day['nb_pages_seen'] = $nb_pages_seen;
+  if ( $nb_pages_seen > $max_pages_seen ) $max_pages_seen = $nb_pages_seen;
+  $vtp->setVar( $sub, 'day.nb_pages', $nb_pages_seen );
+  if ( in_array( $i, $page['expand_days'] ) )
+  {
+    while ( $row = mysql_fetch_array( $result ) )
+    {
+      $vtp->addSession( $sub, 'line' );
+      $vtp->setVar( $sub, 'line.date', date( 'G:i:s', $row['date'] ) );
+      $vtp->setVar( $sub, 'line.login', $row['login'] );
+      $vtp->setVar( $sub, 'line.IP', $row['IP'] );
+      $vtp->setVar( $sub, 'line.category', $row['category'] );
+      $vtp->setVar( $sub, 'line.file', $row['file'] );
+      $vtp->setVar( $sub, 'line.picture', $row['picture'] );
+      $vtp->closeSession( $sub, 'line' );
+    }
+  }
+  $starttime-= 24*60*60;
+  $endtime  -= 24*60*60;
+  $vtp->closeSession( $sub, 'day' );
+  array_push( $days, $day );
+}
+//------------------------------------------------------------ pages seen graph
+foreach ( $days as $day ) {
+  $vtp->addSession( $sub, 'pages_day' );
+  if ( $max_pages_seen > 0 )
+    $width = floor( ( $day['nb_pages_seen']*$max_pixels ) / $max_pages_seen );
+  else $width = 0;
+  $vtp->setVar( $sub, 'pages_day.date', $day['date'] );
+  $vtp->setVar( $sub, 'pages_day.width', $width );
+  $vtp->setVar( $sub, 'pages_day.nb_pages', $day['nb_pages_seen'] );
+  $vtp->closeSession( $sub, 'pages_day' );
+}
+//-------------------------------------------------------------- visitors grpah
+foreach ( $days as $day ) {
+  $vtp->addSession( $sub, 'visitors_day' );
+  if ( $max_nb_visitors > 0 )
+    $width = floor( ( $day['nb_visitors'] * $max_pixels ) / $max_nb_visitors );
+  else $width = 0;
+  $vtp->setVar( $sub, 'visitors_day.date', $day['date'] );
+  $vtp->setVar( $sub, 'visitors_day.width', $width );
+  $vtp->setVar( $sub, 'visitors_day.nb_visitors', $day['nb_visitors'] );
+  $vtp->closeSession( $sub, 'visitors_day' );
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/thumbnail.php
===================================================================
--- /branches/1.3/admin/thumbnail.php	(revision 3252)
+++ /branches/1.3/admin/thumbnail.php	(revision 3252)
@@ -0,0 +1,433 @@
+<?php
+/***************************************************************************
+ *                              thumbnail.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+include_once( './include/isadmin.inc.php' );
+//------------------------------------------------------------------- functions
+// get_subdirs returns an array containing all sub directory names,
+// excepting : '.', '..' and 'thumbnail'.
+function get_subdirs( $dir )
+{
+  $sub_dirs = array();
+  if ( $opendir = opendir( $dir ) )
+  {
+    while ( $file = readdir( $opendir ) )
+    {
+      if ( $file != 'thumbnail' and $file != '.'
+           and $file != '..' and is_dir( $dir.'/'.$file ) )
+      {
+        array_push( $sub_dirs, $file );
+      }
+    }
+  }
+  return $sub_dirs;
+}
+
+// get_images_without_thumbnail returns an array with all the picture names
+// that don't have associated thumbnail in the directory. Each picture name
+// is associated with the width, heigh and filesize of the picture.
+function get_images_without_thumbnail( $dir )
+{
+  $images = array();
+  if ( $opendir = opendir( $dir ) )
+  {
+    while ( $file = readdir( $opendir ) )
+    {
+      if (preg_match('/^[a-zA-Z0-9-_.]+$/', $file))
+      {
+        $path = $dir.'/'.$file;
+        if ( is_image( $path, true ) )
+        {
+          if ( !TN_exists( $dir, $file ) )
+          {
+            $image_infos = getimagesize( $path );
+            $size = floor( filesize( $path ) / 1024 ). ' KB';
+            array_push( $images, array( 'name' => $file,
+                                        'width' => $image_infos[0],
+                                        'height' => $image_infos[1],
+                                        'size' => $size ) );
+          }
+        }
+      }
+    }
+  }
+  return $images;
+}
+
+// pwg_scandir scans a dir to find pictures without thumbnails. Once found,
+// creation of the thumbnails (RatioResizeImg). Only the first $_POST['n']
+// pictures without thumbnails are treated.
+// pwg_scandir returns an array with the generation time of each thumbnail (for
+// statistics purpose)
+function pwg_scandir( $dir, $width, $height )
+{
+  global $conf;
+  $stats = array();
+  if ( $opendir = opendir( $dir ) )
+  {
+    while ( $file = readdir ( $opendir ) )
+    {
+      $path = $dir.'/'.$file;
+      if ( is_image( $path, true ) )
+      {
+        if ( count( $stats ) < $_POST['n'] and !TN_exists( $dir, $file ) )
+        {
+          $starttime = get_moment();
+          $info = RatioResizeImg( $file, $width, $height, $dir.'/', 'jpg' );
+          $endtime = get_moment();
+          $info['time'] = ( $endtime - $starttime ) * 1000;
+          array_push( $stats, $info );
+        }
+      }
+    }
+  }
+  return $stats;
+}
+
+// RatioResizeImg creates a new picture (a thumbnail since it is supposed to
+// be smaller than original picture !) in the sub directory named
+// "thumbnail".
+function RatioResizeImg( $filename, $newWidth, $newHeight, $path, $tn_ext )
+{
+  global $conf, $lang;
+  // full path to picture
+  $filepath = $path.$filename;
+  // extension of the picture filename
+  $extension = get_extension( $filepath );
+  switch( $extension )
+  {
+  case 'jpg': $srcImage = @imagecreatefromjpeg( $filepath ); break; 
+  case 'JPG': $srcImage = @imagecreatefromjpeg( $filepath ); break; 
+  case 'png': $srcImage = @imagecreatefrompng(  $filepath ); break; 
+  case 'PNG': $srcImage = @imagecreatefrompng(  $filepath ); break; 
+  default : unset( $extension ); break;
+  }
+		
+  if ( isset( $srcImage ) )
+  {
+    // width/height
+    $srcWidth    = imagesx( $srcImage ); 
+    $srcHeight   = imagesy( $srcImage ); 
+    $ratioWidth  = $srcWidth/$newWidth;
+    $ratioHeight = $srcHeight/$newHeight;
+
+    // maximal size exceeded ?
+    if ( ( $ratioWidth > 1 ) or ( $ratioHeight > 1 ) )
+    {
+      if ( $ratioWidth < $ratioHeight)
+      { 
+        $destWidth = $srcWidth/$ratioHeight;
+        $destHeight = $newHeight; 
+      }
+      else
+      { 
+        $destWidth = $newWidth; 
+        $destHeight = $srcHeight/$ratioWidth;
+      }
+    }
+    else
+    {
+      $destWidth = $srcWidth;
+      $destHeight = $srcHeight;
+    }
+    // according to the GD version installed on the server
+    if ( $_POST['gd'] == 2 )
+    {
+      // GD 2.0 or more recent -> good results (but slower)
+      $destImage = imagecreatetruecolor( $destWidth, $destHeight); 
+      imagecopyresampled( $destImage, $srcImage, 0, 0, 0, 0,
+                          $destWidth,$destHeight,$srcWidth,$srcHeight );
+    }
+    else
+    {
+      // GD prior to version  2 -> pretty bad results :-/ (but fast)
+      $destImage = imagecreate( $destWidth, $destHeight);
+      imagecopyresized( $destImage, $srcImage, 0, 0, 0, 0,
+                        $destWidth,$destHeight,$srcWidth,$srcHeight );
+    }
+			
+			
+    if( !is_dir( $path.'thumbnail' ) )
+    {
+      umask( 0000 );
+      mkdir( $path.'thumbnail', 0777 );
+    }
+    $dest_file = $path.'thumbnail/'.$conf['prefix_thumbnail'];
+    $dest_file.= get_filename_wo_extension( $filename );
+    $dest_file.= '.'.$tn_ext;
+			
+    // creation and backup of final picture
+    imagejpeg( $destImage, $dest_file );
+    // freeing memory ressources
+    imagedestroy( $srcImage );
+    imagedestroy( $destImage );
+			
+    list( $width,$height ) = getimagesize( $filepath );
+    $size = floor( filesize( $filepath ) / 1024 ).' KB';
+    list( $tn_width,$tn_height ) = getimagesize( $dest_file );
+    $tn_size = floor( filesize( $dest_file ) / 1024 ).' KB';
+    $info = array( 'file'      => $filename,
+                   'width'     => $width,
+                   'height'    => $height,
+                   'size'      => $size,
+                   'tn_file'   => $dest_file,
+                   'tn_width'  => $tn_width,
+                   'tn_height' => $tn_height,
+                   'tn_size'   => $tn_size );
+    return $info;
+  }
+  // error
+  else
+  {
+    echo $lang['tn_no_support']." ";
+    if ( isset( $extenstion ) )
+    {
+      echo $lang['tn_format'].' '.$extension;
+    }
+    else
+    {
+      echo $lang['tn_thisformat'];
+    }
+    exit();
+  }
+}
+
+// array_max returns the highest value of the given array
+function array_max( $array )
+{
+  sort( $array, SORT_NUMERIC );
+  return array_pop( $array );
+}
+
+// array_min returns the lowest value of the given array
+function array_min( $array )
+{
+  sort( $array, SORT_NUMERIC );
+  return array_shift( $array );
+}
+
+// array_avg returns the average value of the array
+function array_avg( $array )
+{
+  return array_sum( $array ) / sizeof( $array );
+}
+	
+// get_displayed_dirs builds the tree of dirs under "galleries". If a
+// directory contains pictures without thumbnails, the become linked to the
+// page of thumbnails creation.
+function get_displayed_dirs( $dir, $indent )
+{
+  global $conf,$lang,$vtp,$sub;
+		
+  $sub_dirs = get_subdirs( $dir );
+  // write of the dirs
+  foreach ( $sub_dirs as $sub_dir ) {
+    $pictures = get_images_without_thumbnail( $dir.'/'.$sub_dir );
+    $vtp->addSession( $sub, 'dir' );
+    $vtp->setVar( $sub, 'dir.indent', $indent );
+    if ( count( $pictures ) > 0 )
+    {
+      $vtp->addSession( $sub, 'linked' );
+      $url = './admin.php?page=thumbnail&amp;dir='.$dir."/".$sub_dir;
+      $vtp->setVar( $sub, 'linked.url', add_session_id( $url ) );
+      $vtp->setVar( $sub, 'linked.name', $sub_dir );
+      $vtp->setVar( $sub, 'linked.nb_pic', count( $pictures ) );
+      $vtp->closeSession( $sub, 'linked' );
+    }
+    else
+    {
+      $vtp->addSession( $sub, 'unlinked' );
+      $vtp->setVar( $sub, 'unlinked.name', $sub_dir );
+      $vtp->closeSession( $sub, 'unlinked' );
+    }
+    $vtp->closeSession( $sub, 'dir' );
+    // recursive call
+    get_displayed_dirs( $dir.'/'.$sub_dir,
+                                $indent+30 );    
+  }
+}
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/thumbnail.vtp' );
+$tpl = array(
+  'tn_dirs_title','tn_dirs_alone','tn_params_title','tn_params_GD',
+  'tn_params_GD_info','tn_width','tn_params_width_info','tn_height',
+  'tn_params_height_info','tn_params_create','tn_params_create_info',
+  'tn_params_format','tn_params_format_info','submit','tn_alone_title',
+  'filesize','tn_picture','tn_results_title','thumbnail',
+  'tn_results_gen_time','tn_stats','tn_stats_nb','tn_stats_total',
+  'tn_stats_max','tn_stats_min','tn_stats_mean' );
+templatize_array( $tpl, 'lang', $sub );
+$vtp->setGlobalVar( $sub, 'user_template', $user['template'] );
+//----------------------------------------------------- miniaturization results
+if ( isset( $_GET['dir'] ) )
+{
+  $pictures = get_images_without_thumbnail( $_GET['dir'] );
+  if ( count( $pictures ) == 0 )
+  {
+    $vtp->addSession( $sub, 'warning' );
+    $vtp->closeSession( $sub, 'warning' );
+  }
+  elseif ( isset( $_POST['submit'] ) )
+  {
+    // checking criteria
+    $errors = array();
+    if ( !ereg( "^[0-9]{2,3}$", $_POST['width'] ) or $_POST['width'] < 10 )
+    {
+      array_push( $errors, $lang['tn_err_width'].' 10' );
+    }
+    if ( !ereg( "^[0-9]{2,3}$", $_POST['height'] ) or $_POST['height'] < 10 )
+    {
+      array_push( $errors, $lang['tn_err_height'].' 10' );
+    }
+    // picture miniaturization
+    if ( count( $errors ) == 0 )
+    {
+      $vtp->addSession( $sub, 'results' );
+      $stats = pwg_scandir( $_GET['dir'], $_POST['width'], $_POST['height'] );
+      $times = array();
+      foreach ( $stats as $stat ) {
+        array_push( $times, $stat['time'] );
+      }
+      $max = array_max( $times );
+      $min = array_min( $times );
+      foreach ( $stats as $i => $stat ) {
+        $vtp->addSession( $sub, 'picture' );
+        if ( $i % 2 == 1 )
+        {
+          $vtp->setVar( $sub, 'picture.class', 'row2' );
+        }
+        $vtp->setVar( $sub, 'picture.num',            ($i+1) );
+        $vtp->setVar( $sub, 'picture.file',           $stat['file'] );
+        $vtp->setVar( $sub, 'picture.filesize',       $stat['size'] );
+        $vtp->setVar( $sub, 'picture.width',          $stat['width'] );
+        $vtp->setVar( $sub, 'picture.height',         $stat['height'] );
+        $vtp->setVar( $sub, 'picture.thumb_file',     $stat['tn_file'] );
+        $vtp->setVar( $sub, 'picture.thumb_filesize', $stat['tn_size'] );
+        $vtp->setVar( $sub, 'picture.thumb_width',    $stat['tn_width'] );
+        $vtp->setVar( $sub, 'picture.thumb_height',   $stat['tn_height'] );
+        $vtp->setVar( $sub, 'picture.time',
+                      number_format( $stat['time'], 2, '.', ' ').' ms' );
+        if ( $stat['time'] == $max )
+        {
+          $vtp->setVar( $sub, 'picture.color', 'red' );
+        }
+        else if ( $stat['time'] == $min )
+        {
+          $vtp->setVar( $sub, 'picture.color', 'green' );
+        }
+        $vtp->closeSession( $sub, 'picture' );
+      }
+      // general statistics
+      $vtp->setVar( $sub, 'results.stats_nb', count( $stats ) );
+      $vtp->setVar( $sub, 'results.stats_total',
+                    number_format( array_sum( $times ), 2, '.', ' ').' ms' );
+      $vtp->setVar( $sub, 'results.stats_max',
+                    number_format( $max, 2, '.', ' ').' ms' );
+      $vtp->setVar( $sub, 'results.stats_min',
+                    number_format( $min, 2, '.', ' ').' ms' );
+      $vtp->setVar( $sub, 'results.stats_mean',
+                    number_format( array_avg( $times ), 2, '.', ' ').' ms' );
+      $vtp->closeSession( $sub, 'results' );
+    }
+    else
+    {
+      $vtp->addSession( $sub, 'errors' );
+      foreach ( $errors as $error ) {
+        $vtp->addSession( $sub, 'li' );
+        $vtp->setVar( $sub, 'li.li', $error );
+        $vtp->closeSession( $sub, 'li' );
+      }
+      $vtp->closeSession( $sub, 'errors' );
+    }
+  }
+//-------------------------------------------------- miniaturization parameters
+  if ( sizeof( $pictures ) != 0 )
+  {
+    $vtp->addSession( $sub, 'params' );
+    $url = './admin.php?page=thumbnail&amp;dir='.$_GET['dir'];
+    $vtp->setVar( $sub, 'params.action', add_session_id( $url ) );
+    // GD version selected...
+    if ( isset( $_POST['gd'] ) and $_POST['gd'] == 1 )
+    {
+      $vtp->setVar( $sub, 'params.gd1_checked', ' checked="checked"' );
+    }
+    else
+    {
+      $vtp->setVar( $sub, 'params.gd2_checked', ' checked="checked"' );
+    }
+    // width values
+    if ( isset( $_POST['width'] ) )
+    {
+      $vtp->setVar( $sub, 'params.width_value', $_POST['width'] );
+    }
+    else
+    {
+      $vtp->setVar( $sub, 'params.width_value', '128' );
+    }
+    // height value
+    if ( isset( $_POST['height'] ) )
+    {
+      $vtp->setVar( $sub, 'params.height_value', $_POST['height'] );
+    }
+    else
+    {
+      $vtp->setVar( $sub, 'params.height_value', '96' );
+    }
+    // options for the number of picture to miniaturize : "n"
+    $options = array( 5,10,20,40 );
+    if ( isset( $_POST['n'] ) ) $n = $_POST['n'];
+    else                        $n = 5;
+    foreach ( $options as $option ) {
+      $vtp->addSession( $sub, 'n_option' );
+      $vtp->setVar( $sub, 'n_option.option', $option );
+      if ( $option == $n )
+      {
+        $vtp->setVar( $sub, 'n_option.selected', ' selected="selected"' );
+      }
+      $vtp->closeSession( $sub, 'n_option' );
+    }
+    $vtp->closeSession( $sub, 'params' );
+//---------------------------------------------------------- remaining pictures
+    $vtp->addSession( $sub, 'remainings' );
+    $pictures = get_images_without_thumbnail( $_GET['dir'] );
+    $vtp->setVar( $sub, 'remainings.total', count( $pictures ) );
+    foreach ( $pictures as $i => $picture ) {
+      $vtp->addSession( $sub, 'remaining' );
+      if ( $i % 2 == 1 )
+      {
+        $vtp->setVar( $sub, 'remaining.class', 'row2' );
+      }
+      $vtp->setVar( $sub, 'remaining.num',      ($i+1) );
+      $vtp->setVar( $sub, 'remaining.file',     $picture['name'] );
+      $vtp->setVar( $sub, 'remaining.filesize', $picture['size'] );
+      $vtp->setVar( $sub, 'remaining.width',    $picture['width'] );
+      $vtp->setVar( $sub, 'remaining.height',   $picture['height'] );
+      $vtp->closeSession( $sub, 'remaining' );
+    }
+    $vtp->closeSession( $sub, 'remainings' );
+  }
+}
+//-------------------------------------------------------------- directory list
+else
+{
+  $vtp->addSession( $sub, 'directory_list' );
+  get_displayed_dirs( '../galleries', 60 );
+  $vtp->closeSession( $sub, 'directory_list' );
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/update.php
===================================================================
--- /branches/1.3/admin/update.php	(revision 3252)
+++ /branches/1.3/admin/update.php	(revision 3252)
@@ -0,0 +1,743 @@
+<?php
+/***************************************************************************
+ *                                update.php                               *
+ *                            ------------------                           *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+include_once( './include/isadmin.inc.php' );
+//------------------------------------------------------------------- functions
+function insert_local_category( $id_uppercat )
+{
+  global $conf, $page, $user, $lang;
+ 
+  $uppercats = '';
+  $output = '';
+  // 0. retrieving informations on the category to display
+  $cat_directory = '../galleries';
+		
+  if ( is_numeric( $id_uppercat ) )
+  {
+    $query = 'SELECT name,uppercats,dir';
+    $query.= ' FROM '.PREFIX_TABLE.'categories';
+    $query.= ' WHERE id = '.$id_uppercat;
+    $query.= ';';
+    $row = mysql_fetch_array( mysql_query( $query ) );
+    $uppercats = $row['uppercats'];
+    $name      = $row['name'];
+    $dir       = $row['dir'];
+
+    $upper_array = explode( ',', $uppercats );
+
+    $local_dir = '';
+
+    $database_dirs = array();
+    $query = 'SELECT id,dir';
+    $query.= ' FROM '.PREFIX_TABLE.'categories';
+    $query.= ' WHERE id IN ('.$uppercats.')';
+    $query.= ';';
+    $result = mysql_query( $query );
+    while( $row = mysql_fetch_array( $result ) )
+    {
+      $database_dirs[$row['id']] = $row['dir'];
+    }
+    foreach ( $upper_array as $id ) {
+      $local_dir.= $database_dirs[$id].'/';
+    }
+
+    $cat_directory.= '/'.$local_dir;
+
+    // 1. display the category name to update
+    $src = '../template/'.$user['template'].'/admin/images/puce.gif';
+    $output = '<img src="'.$src.'" alt="&gt;" />';
+    $output.= '<span style="font-weight:bold;">'.$name.'</span>';
+    $output.= ' [ '.$dir.' ]';
+    $output.= '<div class="retrait">';
+
+    // 2. we search pictures of the category only if the update is for all
+    //    or a cat_id is specified
+    if ( isset( $page['cat'] ) or $_GET['update'] == 'all' )
+    {
+      $output.= insert_local_image( $cat_directory, $id_uppercat );
+    }
+  }
+
+  $sub_dirs = get_category_directories( $cat_directory );
+
+  $sub_category_dirs = array();
+  $query = 'SELECT id,dir';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE site_id = 1';
+  if (!is_numeric($id_uppercat)) $query.= ' AND id_uppercat IS NULL';
+  else                           $query.= ' AND id_uppercat = '.$id_uppercat;
+  $query.= ' AND dir IS NOT NULL'; // virtual categories not taken
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $sub_category_dirs[$row['id']] = $row['dir'];
+  }
+  
+  // 3. we have to remove the categories of the database not present anymore
+  foreach ( $sub_category_dirs as $id => $dir ) {
+    if ( !in_array( $dir, $sub_dirs ) ) delete_category( $id );
+  }
+
+  // array of new categories to insert
+  $inserts = array();
+  
+  foreach ( $sub_dirs as $sub_dir ) {
+    // 5. Is the category already existing ? we create a subcat if not
+    //    existing
+    $category_id = array_search( $sub_dir, $sub_category_dirs );
+    if ( !is_numeric( $category_id ) )
+    {
+      if ( preg_match( '/^[a-zA-Z0-9-_.]+$/', $sub_dir ) )
+      {
+        $name = str_replace( '_', ' ', $sub_dir );
+
+        $value = "('".$sub_dir."','".$name."',1";
+        if ( !is_numeric( $id_uppercat ) ) $value.= ',NULL';
+        else                               $value.= ','.$id_uppercat;
+        $value.= ",'undef'";
+        $value.= ')';
+        array_push( $inserts, $value );
+      }
+      else
+      {
+        $output.= '<span style="color:red;">"'.$sub_dir.'" : ';
+        $output.= $lang['update_wrong_dirname'].'</span><br />';
+      }
+    }
+  }
+
+  // we have to create the category
+  if ( count( $inserts ) > 0 )
+  {
+    $query = 'INSERT INTO '.PREFIX_TABLE.'categories';
+    $query.= ' (dir,name,site_id,id_uppercat,uppercats) VALUES ';
+    $query.= implode( ',', $inserts );
+    $query.= ';';
+    mysql_query( $query );
+    // updating uppercats field
+    $query = 'UPDATE '.PREFIX_TABLE.'categories';
+    $query.= ' SET uppercats = ';
+    if ( $uppercats != '' ) $query.= "CONCAT('".$uppercats."',',',id)";
+    else                    $query.= 'id';
+    $query.= ' WHERE id_uppercat ';
+    if (!is_numeric($id_uppercat)) $query.= 'IS NULL';
+    else                           $query.= '= '.$id_uppercat;
+    $query.= ';';
+    mysql_query( $query );
+  }
+
+  // Recursive call on the sub-categories (not virtual ones)
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE site_id = 1';
+  if (!is_numeric($id_uppercat)) $query.= ' AND id_uppercat IS NULL';
+  else                           $query.= ' AND id_uppercat = '.$id_uppercat;
+  $query.= ' AND dir IS NOT NULL'; // virtual categories not taken
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $output.= insert_local_category( $row['id'] );
+  }
+
+  if ( is_numeric( $id_uppercat ) )
+  {
+    $output.= '</div>';
+  }
+  return $output;
+}
+
+function insert_local_image( $dir, $category_id )
+{
+  global $lang,$conf,$count_new;
+
+  $output = '';
+
+  // fs means filesystem : $fs_pictures contains pictures in the filesystem
+  // found in $dir, $fs_thumbnails contains thumbnails...
+  $fs_pictures   = get_picture_files( $dir );
+  $fs_thumbnails = get_thumb_files( $dir.'thumbnail' );
+
+  // we have to delete all the images from the database that :
+  //     - are not in the directory anymore
+  //     - don't have the associated thumbnail available anymore
+  $query = 'SELECT id,file,tn_ext';
+  $query.= ' FROM '.PREFIX_TABLE.'images';
+  $query.= ' WHERE storage_category_id = '.$category_id;
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $pic_to_delete = false;
+    if ( !in_array( $row['file'], $fs_pictures ) )
+    {
+      $output.= $row['file'];
+      $output.= ' <span style="font-weight:bold;">';
+      $output.= $lang['update_disappeared'].'</span><br />';
+      $pic_to_delete = true;
+    }
+
+    $thumbnail = $conf['prefix_thumbnail'];
+    $thumbnail.= get_filename_wo_extension( $row['file'] );
+    $thumbnail.= '.'.$row['tn_ext'];
+    if ( !in_array( $thumbnail, $fs_thumbnails ) )
+    {
+      $output.= $row['file'];
+      $output.= ' : <span style="font-weight:bold;">';
+      $output.= $lang['update_disappeared_tn'].'</span><br />';
+      $pic_to_delete = true;
+    }
+
+    if ( $pic_to_delete ) delete_image( $row['id'] );
+  }
+
+  $registered_pictures = array();
+  $query = 'SELECT file';
+  $query.= ' FROM '.PREFIX_TABLE.'images';
+  $query.= ' WHERE storage_category_id = '.$category_id;
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    array_push( $registered_pictures, $row['file'] );
+  }
+
+  // validated pictures are picture uploaded by users, validated by an admin
+  // and not registered (visible) yet
+  $validated_pictures    = array();
+  $unvalidated_pictures  = array();
+  
+  $query = 'SELECT file,infos,validated';
+  $query.= ' FROM '.PREFIX_TABLE.'waiting';
+  $query.= ' WHERE storage_category_id = '.$category_id;
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    if ( $row['validated'] == 'true' )
+      $validated_pictures[$row['file']] = $row['infos'];
+    else
+      array_push( $unvalidated_pictures, $row['file'] );
+  }
+
+  // we only search among the picture present in the filesystem and not
+  // present in the database yet. If we know that this picture is known as
+  // an uploaded one but not validated, it's not tested neither
+  $unregistered_pictures = array_diff( $fs_pictures
+                                       ,$registered_pictures
+                                       ,$unvalidated_pictures );
+
+  $inserts = array();
+  
+  foreach ( $unregistered_pictures as $unregistered_picture ) {
+    if ( preg_match( '/^[a-zA-Z0-9-_.]+$/', $unregistered_picture ) )
+    {
+      $file_wo_ext = get_filename_wo_extension( $unregistered_picture );
+      $tn_ext = '';
+      foreach ( $conf['picture_ext'] as $ext ) {
+        $test = $conf['prefix_thumbnail'].$file_wo_ext.'.'.$ext;
+        if ( !in_array( $test, $fs_thumbnails ) ) continue;
+        else { $tn_ext = $ext; break; }
+      }
+      // if we found a thumnbnail corresponding to our picture...
+      if ( $tn_ext != '' )
+      {
+        $image_size = @getimagesize( $dir.$unregistered_picture );
+        // (file, storage_category_id, date_available, tn_ext, filesize,
+        // width, height, name, author, comment, date_creation)'
+        $value = '(';
+        $value.= "'".$unregistered_picture."'";
+        $value.= ','.$category_id;
+        $value.= ",'".date( 'Y-m-d' )."'";
+        $value.= ",'".$tn_ext."'";
+        $value.= ','.floor( filesize( $dir.$unregistered_picture) / 1024 );
+        $value.= ','.$image_size[0];
+        $value.= ','.$image_size[1];
+        if ( isset( $validated_pictures[$unregistered_picture] ) )
+        {
+          // retrieving infos from the XML description from waiting table
+          $infos = nl2br( $validated_pictures[$unregistered_picture] );
+
+          $unixtime = getAttribute( $infos, 'date_creation' );
+          if ($unixtime != '') $date_creation ="'".date('Y-m-d',$unixtime)."'";
+          else                 $date_creation = 'NULL';
+          
+          $value.= ",'".getAttribute( $infos, 'name' )."'";
+          $value.= ",'".getAttribute( $infos, 'author' )."'";
+          $value.= ",'".getAttribute( $infos, 'comment')."'";
+          $value.= ','.$date_creation;
+
+          // deleting the waiting element
+          $query = 'DELETE FROM '.PREFIX_TABLE.'waiting';
+          $query.= " WHERE file = '".$unregistered_picture."'";
+          $query.= ' AND storage_category_id = '.$category_id;
+          $query.= ';';
+          mysql_query( $query );
+        }
+        else
+        {
+          $value.= ",'','','',NULL";
+        }
+        $value.= ')';
+        
+        $count_new++;
+        $output.= $unregistered_picture;
+        $output.= ' <span style="font-weight:bold;">';
+        $output.= $lang['update_research_added'].'</span>';
+        $output.= ' ('.$lang['update_research_tn_ext'].' '.$tn_ext.')';
+        $output.= '<br />';
+        array_push( $inserts, $value );
+      }
+      else
+      {
+        $output.= '<span style="color:red;">';
+        $output.= $lang['update_missing_tn'].' : '.$unregistered_picture;
+        $output.= ' (<span style="font-weight:bold;">';
+        $output.= $conf['prefix_thumbnail'];
+        $output.= get_filename_wo_extension( $unregistered_picture );
+        $output.= '.XXX</span>';
+        $output.= ', XXX = ';
+        $output.= implode( ', ', $conf['picture_ext'] );
+        $output.= ')</span><br />';
+      }
+    }
+    else
+    {
+      $output.= '<span style="color:red;">"'.$unregistered_picture.'" : ';
+      $output.= $lang['update_wrong_dirname'].'</span><br />';
+    }
+  }
+
+  if ( count( $inserts ) > 0 )
+  {
+    // inserts all found pictures
+    $query = 'INSERT INTO '.PREFIX_TABLE.'images';
+    $query.= ' (file,storage_category_id,date_available,tn_ext';
+    $query.= ',filesize,width,height';
+    $query.= ',name,author,comment,date_creation)';
+    $query.= ' VALUES ';
+    $query.= implode( ',', $inserts );
+    $query.= ';';
+    mysql_query( $query );
+
+    // what are the ids of the pictures in the $category_id ?
+    $ids = array();
+
+    $query = 'SELECT id';
+    $query.= ' FROM '.PREFIX_TABLE.'images';
+    $query.= ' WHERE storage_category_id = '.$category_id;
+    $query.= ';';
+    $result = mysql_query( $query );
+    while ( $row = mysql_fetch_array( $result ) )
+    {
+      array_push( $ids, $row['id'] );
+    }
+
+    // recreation of the links between this storage category pictures and
+    // its storage category
+    $query = 'DELETE FROM '.PREFIX_TABLE.'image_category';
+    $query.= ' WHERE category_id = '.$category_id;
+    $query.= ' AND image_id IN ('.implode( ',', $ids ).')';
+    $query.= ';';
+    mysql_query( $query );
+
+    $query = 'INSERT INTO '.PREFIX_TABLE.'image_category';
+    $query.= '(category_id,image_id) VALUES ';
+    foreach ( $ids as $num => $image_id ) {
+      if ( $num > 0 ) $query.= ',';
+      $query.= '('.$category_id.','.$image_id.')';
+    }
+    $query.= ';';
+    mysql_query( $query );
+  }
+  return $output;
+}
+
+// remote_images verifies if a file named "listing.xml" is present is the
+// admin directory. If it is the case, creation of a remote picture storage
+// site if it doesn't already exists. Then, the function calls
+// insert_remote_category for this remote site on the root category.
+function remote_images()
+{
+  global $conf, $lang, $vtp, $sub;
+
+  // 1. is there a file listing.xml ?
+  if ( !( $xml_content = getXmlCode( 'listing.xml' ) ) )
+  {
+    return false;
+  }
+  $url = getContent( getChild( $xml_content, 'url' ) );
+  $vtp->setVar( $sub, 'remote_update.url', $url );
+
+  // 2. is the site already existing ?
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'sites';
+  $query.= " WHERE galleries_url = '".$url."'";
+  $query.= ';';
+  $result = mysql_query( $query );
+  if ( mysql_num_rows($result ) == 0 )
+  {
+    // we have to register this site in the database
+    $query = 'INSERT INTO '.PREFIX_TABLE.'sites';
+    $query.= " (galleries_url) VALUES ('".$url."')";
+    $query.= ';';
+    mysql_query( $query );
+    $site_id = mysql_insert_id();
+  }
+  else
+  {
+    // we get the already registered id
+    $row = mysql_fetch_array( $result );
+    $site_id = $row['id'];
+  }
+
+  // 3. available dirs in the file
+  $categories = insert_remote_category( $xml_content, $site_id, 'NULL', 0 );
+  $vtp->setVar( $sub, 'remote_update.categories', $categories );
+}
+
+// insert_remote_category searchs the "dir" node of the xml_dir given and
+// insert the contained categories if the are not in the database yet. The
+// function also deletes the categories that are in the database and not in
+// the xml_file.
+function insert_remote_category( $xml_content, $site_id, $id_uppercat, $level )
+{
+  global $conf, $page, $user, $lang;
+ 
+  $uppercats = '';
+  $output = '';
+  // 0. retrieving informations on the category to display
+  $cat_directory = '../galleries';
+		
+  if ( is_numeric( $id_uppercat ) )
+  {
+    $query = 'SELECT name,uppercats,dir';
+    $query.= ' FROM '.PREFIX_TABLE.'categories';
+    $query.= ' WHERE id = '.$id_uppercat;
+    $query.= ';';
+    $row = mysql_fetch_array( mysql_query( $query ) );
+    $uppercats = $row['uppercats'];
+    $name      = $row['name'];
+
+    // 1. display the category name to update
+    $src = '../template/'.$user['template'].'/admin/images/puce.gif';
+    $output = '<img src="'.$src.'" alt="&gt;" />';
+    $output.= '<span style="font-weight:bold;">'.$name.'</span>';
+    $output.= ' [ '.$row['dir'].' ]';
+    $output.= '<div class="retrait">';
+
+    // 2. we search pictures of the category only if the update is for all
+    //    or a cat_id is specified
+    $output.= insert_remote_image( $xml_content, $id_uppercat );
+  }
+
+  // $xml_dirs contains dir names contained in the xml file for this
+  // id_uppercat
+  $xml_dirs = array();
+  $temp_dirs = getChildren( $xml_content, 'dir'.$level );
+  foreach ( $temp_dirs as $temp_dir ) {
+    array_push( $xml_dirs, getAttribute( $temp_dir, 'name' ) );
+  }
+
+  // $database_dirs contains dir names contained in the database for this
+  // id_uppercat and site_id
+  $database_dirs = array();
+  $query = 'SELECT id,dir';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE site_id = '.$site_id;
+  if (!is_numeric($id_uppercat)) $query.= ' AND id_uppercat IS NULL';
+  else                           $query.= ' AND id_uppercat = '.$id_uppercat;
+  $query.= ' AND dir IS NOT NULL'; // virtual categories not taken
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $database_dirs[$row['id']] = $row['dir'];
+  }
+  
+  // 3. we have to remove the categories of the database not present anymore
+  foreach ( $database_dirs as $id => $dir ) {
+    if ( !in_array( $dir, $xml_dirs ) ) delete_category( $id );
+  }
+
+  // array of new categories to insert
+  $inserts = array();
+  
+  foreach ( $xml_dirs as $xml_dir ) {
+    // 5. Is the category already existing ? we create a subcat if not
+    //    existing
+    $category_id = array_search( $xml_dir, $database_dirs );
+    if ( !is_numeric( $category_id ) )
+    {
+      $name = str_replace( '_', ' ', $xml_dir );
+
+      $value = "('".$xml_dir."','".$name."',".$site_id;
+      if ( !is_numeric( $id_uppercat ) ) $value.= ',NULL';
+      else                               $value.= ','.$id_uppercat;
+      $value.= ",'undef'";
+      $value.= ')';
+      array_push( $inserts, $value );
+    }
+  }
+
+  // we have to create the category
+  if ( count( $inserts ) > 0 )
+  {
+    $query = 'INSERT INTO '.PREFIX_TABLE.'categories';
+    $query.= ' (dir,name,site_id,id_uppercat,uppercats) VALUES ';
+    $query.= implode( ',', $inserts );
+    $query.= ';';
+    mysql_query( $query );
+    // updating uppercats field
+    $query = 'UPDATE '.PREFIX_TABLE.'categories';
+    $query.= ' SET uppercats = ';
+    if ( $uppercats != '' ) $query.= "CONCAT('".$uppercats."',',',id)";
+    else                    $query.= 'id';
+    $query.= ' WHERE id_uppercat ';
+    if (!is_numeric($id_uppercat)) $query.= 'IS NULL';
+    else                           $query.= '= '.$id_uppercat;
+    $query.= ';';
+    mysql_query( $query );
+  }
+
+  // Recursive call on the sub-categories (not virtual ones)
+  $query = 'SELECT id,dir';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE site_id = '.$site_id;
+  if (!is_numeric($id_uppercat)) $query.= ' AND id_uppercat IS NULL';
+  else                           $query.= ' AND id_uppercat = '.$id_uppercat;
+  $query.= ' AND dir IS NOT NULL'; // virtual categories not taken
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $database_dirs[$row['dir']] = $row['id'];
+  }
+  foreach ( $temp_dirs as $temp_dir ) {
+    $dir = getAttribute( $temp_dir, 'name' );
+    $id_uppercat = $database_dirs[$dir];
+    $output.= insert_remote_category( $temp_dir, $site_id,
+                                      $id_uppercat,$level+1 );
+  }
+
+  if ( is_numeric( $id_uppercat ) ) $output.= '</div>';
+
+  return $output;
+}
+
+// insert_remote_image searchs the "root" node of the xml_dir given and
+// insert the contained pictures if the are not in the database yet.
+function insert_remote_image( $xml_dir, $category_id )
+{
+  global $count_new,$lang;
+
+  $output = '';
+  $root = getChild( $xml_dir, 'root' );
+
+  $fs_pictures = array();
+  $xml_pictures = getChildren( $root, 'picture' );
+  foreach ( $xml_pictures as $xml_picture ) {
+    array_push( $fs_pictures, getAttribute( $xml_picture, 'file' ) );
+  }
+  
+  // we have to delete all the images from the database that are not in the
+  // directory anymore (not in the XML anymore)
+  $query = 'SELECT id,file';
+  $query.= ' FROM '.PREFIX_TABLE.'images';
+  $query.= ' WHERE storage_category_id = '.$category_id;
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    if ( !in_array( $row['file'], $fs_pictures ) )
+    {
+      $output.= $row['file'];
+      $output.= ' <span style="font-weight:bold;">';
+      $output.= $lang['update_disappeared'].'</span><br />';
+      delete_image( $row['id'] );
+    }
+  }
+
+  $database_pictures = array();
+  $query = 'SELECT file';
+  $query.= ' FROM '.PREFIX_TABLE.'images';
+  $query.= ' WHERE storage_category_id = '.$category_id;
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    array_push( $database_pictures, $row['file'] );
+  }
+
+  $inserts = array();
+  $xml_pictures = getChildren( $root, 'picture' );
+  foreach ( $xml_pictures as $xml_picture ) {
+    // <picture file="albatros.jpg" tn_ext="png" filesize="35" width="640"
+    // height="480" />
+    $file = getAttribute( $xml_picture, 'file' );
+
+    // is the picture already existing in the database ?
+    if ( !in_array( $file, $database_pictures ) )
+    {
+      $tn_ext = getAttribute( $xml_picture, 'tn_ext' );
+      // (file, storage_category_id, date_available, tn_ext, filesize,
+      // width, height)
+      $value = '(';
+      $value.= "'".$file."'";
+      $value.= ','.$category_id;
+      $value.= ",'".date( 'Y-m-d' )."'";
+      $value.= ",'".$tn_ext."'";
+      $value.= ','.getAttribute( $xml_picture, 'filesize' );
+      $value.= ','.getAttribute( $xml_picture, 'width' );
+      $value.= ','.getAttribute( $xml_picture, 'height' );
+      $value.= ')';
+
+      $count_new++;
+      $output.= $file;
+      $output.= ' <span style="font-weight:bold;">';
+      $output.= $lang['update_research_added'].'</span>';
+      $output.= ' ('.$lang['update_research_tn_ext'].' '.$tn_ext.')';
+      $output.= '<br />';
+      array_push( $inserts, $value );
+    }
+  }
+
+  if ( count( $inserts ) > 0 )
+  {
+    // inserts all found pictures
+    $query = 'INSERT INTO '.PREFIX_TABLE.'images';
+    $query.= ' (file,storage_category_id,date_available,tn_ext';
+    $query.= ',filesize,width,height)';
+    $query.= ' VALUES ';
+    $query.= implode( ',', $inserts );
+    $query.= ';';
+    mysql_query( $query );
+
+    // what are the ids of the pictures in the $category_id ?
+    $ids = array();
+
+    $query = 'SELECT id';
+    $query.= ' FROM '.PREFIX_TABLE.'images';
+    $query.= ' WHERE storage_category_id = '.$category_id;
+    $query.= ';';
+    $result = mysql_query( $query );
+    while ( $row = mysql_fetch_array( $result ) )
+    {
+      array_push( $ids, $row['id'] );
+    }
+
+    // recreation of the links between this storage category pictures and
+    // its storage category
+    $query = 'DELETE FROM '.PREFIX_TABLE.'image_category';
+    $query.= ' WHERE category_id = '.$category_id;
+    $query.= ' AND image_id IN ('.implode( ',', $ids ).')';
+    $query.= ';';
+    mysql_query( $query );
+
+    $query = 'INSERT INTO '.PREFIX_TABLE.'image_category';
+    $query.= '(category_id,image_id) VALUES ';
+    foreach ( $ids as $num => $image_id ) {
+      if ( $num > 0 ) $query.= ',';
+      $query.= '('.$category_id.','.$image_id.')';
+    }
+    $query.= ';';
+    mysql_query( $query );
+  }
+
+  return $output;
+}
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/update.vtp' );
+$tpl = array( 'update_default_title', 'update_only_cat', 'update_all',
+              'update_research_conclusion', 'update_deletion_conclusion',
+              'remote_site', 'update_part_research' );
+templatize_array( $tpl, 'lang', $sub );
+$vtp->setGlobalVar( $sub, 'user_template', $user['template'] );
+//-------------------------------------------- introduction : choices of update
+// Display choice if "update" var is not specified
+if (!isset( $_GET['update'] ))
+{
+  $vtp->addSession( $sub, 'introduction' );
+  // only update the categories, not the pictures.
+  $url = add_session_id( './admin.php?page=update&amp;update=cats' );
+  $vtp->setVar( $sub, 'introduction.only_cat:url', $url );
+  // update the entire tree folder
+  $url = add_session_id( './admin.php?page=update&amp;update=all' );
+  $vtp->setVar( $sub, 'introduction.all:url', $url );
+  $vtp->closeSession( $sub, 'introduction' );
+}
+//------------------------------------------------- local update : ../galleries
+else
+{
+  check_cat_id( $_GET['update'] );
+  $start = get_moment();
+  $count_new = 0;
+  $count_deleted = 0;
+  $vtp->addSession( $sub, 'local_update' );
+  if ( isset( $page['cat'] ) )
+  {
+    $categories = insert_local_category( $page['cat'] );
+  }
+  else
+  {
+    $categories = insert_local_category( 'NULL' );
+  }
+  $end = get_moment();
+//  echo get_elapsed_time( $start, $end ).' for update <br />';
+  $vtp->setVar( $sub, 'local_update.categories', $categories );
+  $vtp->setVar( $sub, 'local_update.count_new', $count_new );
+  $vtp->setVar( $sub, 'local_update.count_deleted', $count_deleted );
+  $vtp->closeSession( $sub, 'local_update' );
+}
+//------------------------------------------------- remote update : listing.xml
+if ( @is_file( './listing.xml' ) )
+{
+  $count_new = 0;
+  $count_deleted = 0;
+  $vtp->addSession( $sub, 'remote_update' );
+  
+  $start = get_moment();
+  remote_images();
+  $end = get_moment();
+//  echo get_elapsed_time( $start, $end ).' for remote_images<br />';
+  
+  $vtp->setVar( $sub, 'remote_update.count_new', $count_new );
+  $vtp->setVar( $sub, 'remote_update.count_deleted', $count_deleted );
+
+  $vtp->closeSession( $sub, 'remote_update' );
+}
+//---------------------------------------- update informations about categories
+if ( isset( $_GET['update'] )
+     or isset( $page['cat'] )
+     or @is_file( './listing.xml' ) )
+{
+  $start = get_moment();
+  update_category( 'all' );
+  $end = get_moment();
+//  echo get_elapsed_time( $start, $end ).' for update_category( all )<br />';
+
+  $start = get_moment();
+  synchronize_all_users();
+  $end = get_moment();
+//  echo get_elapsed_time( $start, $end ).' for synchronize_all_users<br />';
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/user_list.php
===================================================================
--- /branches/1.3/admin/user_list.php	(revision 3252)
+++ /branches/1.3/admin/user_list.php	(revision 3252)
@@ -0,0 +1,254 @@
+<?php
+/***************************************************************************
+ *                               user_list.php                             *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+include_once( './include/isadmin.inc.php' );
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/user_list.vtp' );
+$tpl = array( 'listuser_confirm','listuser_modify_hint','listuser_modify',
+              'listuser_permission','listuser_permission_hint',
+              'listuser_delete_hint','listuser_delete','yes','no',
+              'listuser_button_all','listuser_button_invert',
+              'listuser_button_create_address','title_add','login','password',
+              'add','errors_title' );
+templatize_array( $tpl, 'lang', $sub );
+$vtp->setGlobalVar( $sub, 'user_template',   $user['template'] );
+//------------------------------------------------------------------ add a user
+$errors = array();
+if ( isset( $_POST['submit_add_user'] ) )
+{
+  $errors = register_user(
+    $_POST['username'], $_POST['password'], $_POST['password'], '', 'guest' );
+}
+//-------------------------------------------------------------- errors display
+if ( sizeof( $errors ) != 0 )
+{
+  $vtp->addSession( $sub, 'errors' );
+  foreach ( $errors as $error ) {
+    $vtp->addSession( $sub, 'li' );
+    $vtp->setVar( $sub, 'li.li', $error );
+    $vtp->closeSession( $sub, 'li' );
+  }
+  $vtp->closeSession( $sub, 'errors' );
+}
+else if ( isset( $_POST['submit_add_user'] ) )
+{
+  $_POST = array();
+}
+//--------------------------------------------------------------- delete a user
+if ( isset ( $_GET['delete'] ) and is_numeric( $_GET['delete'] ) )
+{
+  $query = 'SELECT username';
+  $query.= ' FROM '.PREFIX_TABLE.'users';
+  $query.= ' WHERE id = '.$_GET['delete'];
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  // confirm user deletion ?
+  if ( !isset( $_GET['confirm'] ) )
+  {
+    $vtp->addSession( $sub, 'deletion' );
+    $vtp->setVar( $sub, 'deletion.login', $row['username'] );
+    $yes_url = './admin.php?page=user_list&amp;delete='.$_GET['delete'];
+    $yes_url.= '&amp;confirm=1';
+    $vtp->setVar( $sub, 'deletion.yes_url', add_session_id( $yes_url ) );
+    $no_url = './admin.php?page=user_list';
+    $vtp->setVar( $sub, 'deletion.no_url', add_session_id( $no_url ) );
+    $vtp->closeSession( $sub, 'deletion' );
+  }
+  // user deletion confirmed
+  else
+  {
+    $vtp->addSession( $sub, 'confirmation' );
+    if ( $row['username'] != 'guest'
+         and $row['username'] != $conf['webmaster'] )
+    {
+      $query = 'SELECT COUNT(*) AS nb_result';
+      $query.= ' FROM '.PREFIX_TABLE.'users';
+      $query.= ' WHERE id = '.$_GET['delete'];
+      $query.= ';';
+      $row2 = mysql_fetch_array( mysql_query( $query ) );
+      if ( $row2['nb_result'] > 0 )
+      {
+        delete_user( $_GET['delete'] );
+        $vtp->setVar( $sub, 'confirmation.class', 'info' );
+        $info = '"'.$row['username'].'" '.$lang['listuser_info_deletion'];
+        $vtp->setVar( $sub, 'confirmation.info', $info );
+      }
+      else
+      {
+        $vtp->setVar( $sub, 'confirmation.class', 'erreur' );
+        $vtp->setVar( $sub, 'confirmation.info', $lang['user_err_unknown'] );
+      }
+    }
+    else
+    {
+      $vtp->setVar( $sub, 'confirmation.class', 'erreur' );
+      $vtp->setVar( $sub, 'confirmation.info', $lang['user_err_modify'] );
+    }
+    $vtp->closeSession( $sub, 'confirmation' );
+  }
+}
+//------------------------------------------------------------------ users list
+else
+{
+  // add a user
+  $vtp->addSession( $sub, 'add_user' );
+  $action = './admin.php?'.$_SERVER['QUERY_STRING'];
+  $vtp->setVar( $sub, 'add_user.form_action', $action );
+  if (isset( $_POST['username']))
+	  $vtp->setVar( $sub, 'add_user.f_username', $_POST['username'] );
+  $vtp->closeSession( $sub, 'add_user' );
+  
+  $vtp->addSession( $sub, 'users' );
+
+  $action = './admin.php?'.$_SERVER['QUERY_STRING'];
+  if ( !isset( $_GET['mail'] ) )
+  {
+    $action.= '&amp;mail=true';
+  }
+  $vtp->setVar( $sub, 'users.form_action', $action );
+
+  $query = 'SELECT id,username,status,mail_address';
+  $query.= ' FROM '.PREFIX_TABLE.'users';
+  $query.= ' ORDER BY status ASC, username ASC';
+  $query.= ';';
+  $result = mysql_query( $query );
+
+  $current_status = '';
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    // display the line indicating the status of the next users
+    if ( $row['status'] != $current_status )
+    {
+      if ( $current_status != '' )
+      {
+        $vtp->closeSession( $sub, 'category' );
+      }
+      $vtp->addSession( $sub, 'category' );
+      $title = $lang['listuser_user_group'].' ';
+      switch ( $row['status'] )
+      {
+      case 'admin' : $title.= $lang['adduser_status_admin']; break;
+      case 'guest' : $title.= $lang['adduser_status_guest']; break;
+      }
+      $vtp->setVar( $sub, 'category.title', $title );
+      $current_status = $row['status'];
+    }
+    $vtp->addSession( $sub, 'user' );
+    // checkbox for mail management if the user has a mail address
+    if ( isset( $row['mail_address'] ) and $row['username'] != 'guest' )
+    {
+      $vtp->addSession( $sub, 'checkbox' );
+      $vtp->setVar( $sub, 'checkbox.name', 'mail-'.$row['id'] );
+      $vtp->closeSession( $sub, 'checkbox' );
+    }
+    // use a special color for the login of the user ?
+    if ( $row['username'] == $conf['webmaster'] )
+    {
+      $vtp->setVar( $sub, 'user.color', 'red' );
+    }
+    if ( $row['username'] == 'guest' )
+    {
+      $vtp->setVar( $sub, 'user.color', 'green' );
+      $vtp->setVar( $sub, 'user.login', $lang['guest'] );
+    }
+    else
+    {
+      $vtp->setVar( $sub, 'user.login', $row['username'] );
+    }
+    // modify or not modify ?
+    if ( $row['username'] == 'guest'
+         or ( $row['username'] == $conf['webmaster']
+              and $user['username'] != $conf['webmaster'] ) )
+    {
+      $vtp->addSession( $sub, 'not_modify' );
+      $vtp->closeSession( $sub, 'not_modify' );
+    }
+    else
+    {
+      $vtp->addSession( $sub, 'modify' );
+      $url = './admin.php?page=user_modify&amp;user_id=';
+      $url.= $row['id'];
+      $vtp->setVar( $sub, 'modify.url', add_session_id( $url ) );
+      $vtp->setVar( $sub, 'modify.login', $row['username'] );
+      $vtp->closeSession( $sub, 'modify' );
+    }
+    // manage permission or not ?
+    if ( $row['username'] == $conf['webmaster']
+         and $user['username'] != $conf['webmaster'] )
+    {
+      $vtp->addSession( $sub, 'not_permission' );
+      $vtp->closeSession( $sub, 'not_permission' );
+    }
+    else
+    {
+      $vtp->addSession( $sub, 'permission' );
+      $url = './admin.php?page=user_perm&amp;user_id='.$row['id'];
+      $vtp->setVar( $sub, 'permission.url', add_session_id( $url ) );
+      $vtp->setVar( $sub, 'permission.login', $row['username'] );
+      $vtp->closeSession( $sub, 'permission' );
+    }
+    // is the user deletable or not ?
+    if ( $row['username'] == 'guest'
+         or $row['username'] == $conf['webmaster'] )
+    {
+      $vtp->addSession( $sub, 'not_delete' );
+      $vtp->closeSession( $sub, 'not_delete' );
+    }
+    else
+    {
+      $vtp->addSession( $sub, 'delete' );
+      $url = './admin.php?page=user_list&amp;delete='.$row['id'];
+      $vtp->setVar( $sub, 'delete.url', add_session_id( $url ) );
+      $vtp->setVar( $sub, 'delete.login', $row['username'] );
+      $vtp->closeSession( $sub, 'delete' );
+    }
+    $vtp->closeSession( $sub, 'user' );
+  }
+  $vtp->closeSession( $sub, 'category' );
+  // mail management : creation of the mail address if asked by administrator
+  if ( isset( $_POST['submit_generate_mail'] ) and isset( $_GET['mail'] ) )
+  {
+    $mails = array();
+    $query = 'SELECT id,mail_address';
+    $query.= ' FROM '.PREFIX_TABLE.'users';
+    $query.= ';';
+    $result = mysql_query( $query );
+    while ( $row = mysql_fetch_array( $result ) )
+    {
+      if ( isset( $_POST['mail-'.$row['id']] ) )
+        array_push( $mails, $row['mail_address'] );
+    }
+    $mail_destination = '';
+    foreach ( $mails as $i => $mail_address ) {
+      if ( $i > 0 ) $mail_destination.= ',';
+      $mail_destination.= $mail_address;
+    }
+    if ( sizeof( $mails ) > 0 )
+    {
+      $vtp->addSession( $sub, 'mail_link' );
+      $vtp->setVar( $sub, 'mail_link.mailto', $mail_destination );
+      $vtp->setVar( $sub, 'mail_link.mail_address_start',
+                    substr( $mail_destination, 0, 50 ) );
+      $vtp->closeSession( $sub, 'mail_link' );
+    }
+  }
+  $vtp->closeSession( $sub, 'users' );
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/user_modify.php
===================================================================
--- /branches/1.3/admin/user_modify.php	(revision 3252)
+++ /branches/1.3/admin/user_modify.php	(revision 3252)
@@ -0,0 +1,217 @@
+<?php
+/***************************************************************************
+ *                              user_modify.php                            *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+include_once( './include/isadmin.inc.php' );
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/user_modify.vtp' );
+$error = array();
+$tpl = array( 'adduser_info_message', 'adduser_info_back', 'adduser_fill_form',
+              'login', 'new', 'password', 'mail_address', 'adduser_status',
+              'submit', 'adduser_info_password_updated','menu_groups',
+              'dissociate','adduser_associate' );
+templatize_array( $tpl, 'lang', $sub );
+//--------------------------------------------------------- form criteria check
+$error = array();
+$display_form = true;
+
+// retrieving information in the database about the user identified by its
+// id in $_GET['user_id']
+$query = 'select';
+$query.= ' username,status,mail_address';
+$query.= ' from '.PREFIX_TABLE.'users';
+$query.= ' where id = '.$_GET['user_id'];
+$query.= ';';
+$row = mysql_fetch_array( mysql_query( $query ) );
+$page['username'] = $row['username'];
+$page['status'] = $row['status'];
+if ( !isset( $row['mail_address'] ) ) $row['mail_address'] = '';
+$page['mail_address'] = $row['mail_address'];
+// user is not modifiable if :
+//   1. the selected user is the user "guest"
+//   2. the selected user is the webmaster and the user making the modification
+//      is not the webmaster
+if ( $row['username'] == 'guest'
+     or ( $row['username'] == $conf['webmaster']
+          and $user['username'] != $conf['webmaster'] ) )
+{
+  array_push( $error, $lang['user_err_modify'] );
+  $display_form = false;
+}
+// if the user was not found in the database, no modification possible
+if ( $row['username'] == '' )
+{
+  array_push( $error, $lang['user_err_unknown'] );
+  $display_form = false;
+}
+
+if ( sizeof( $error ) == 0 and isset( $_POST['submit'] ) )
+{
+  // shall we use a new password and overwrite the old one ?
+  $use_new_password = false;
+  if ( isset( $_POST['use_new_pwd'] ) ) $use_new_password = true;
+  // if we try to update the webmaster infos, we have to set the status to
+  // 'admin'
+  if ( $row['username'] == $conf['webmaster'] )
+    $_POST['status'] = 'admin';
+
+  $error = array_merge( $error, update_user(
+                          $_GET['user_id'], $_POST['mail_address'],
+                          $_POST['status'], $use_new_password,
+                          $_POST['password'] ) );
+}
+// association with groups management
+if ( isset( $_POST['submit'] ) )
+{
+  // deletion of checked groups
+  $query = 'SELECT id,name';
+  $query.= ' FROM '.PREFIX_TABLE.'groups';
+  $query.= ' ORDER BY id ASC';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $dissociate = 'dissociate-'.$row['id'];
+    if ( isset( $_POST[$dissociate] ) )
+    {
+      $query = 'DELETE FROM '.PREFIX_TABLE.'user_group';
+      $query.= ' WHERE user_id = '.$_GET['user_id'];
+      $query.= ' AND group_id ='.$row['id'];
+      $query.= ';';
+      mysql_query( $query );
+    }
+  }
+  // create a new association between the user and a group
+  $query = 'INSERT INTO '.PREFIX_TABLE.'user_group';
+  $query.= ' (user_id,group_id) VALUES';
+  $query.= ' ('.$_GET['user_id'].','.$_POST['associate'].')';
+  $query.= ';';
+  mysql_query( $query );
+  // synchronize category informations for this user
+  synchronize_user( $_GET['user_id'] );
+}
+//-------------------------------------------------------------- errors display
+if ( sizeof( $error ) != 0 )
+{
+  $vtp->addSession( $sub, 'errors' );
+  for ( $i = 0; $i < sizeof( $error ); $i++ )
+  {
+    $vtp->addSession( $sub, 'li' );
+    $vtp->setVar( $sub, 'li.li', $error[$i] );
+    $vtp->closeSession( $sub, 'li' );
+  }
+  $vtp->closeSession( $sub, 'errors' );
+}
+//---------------------------------------------------------------- confirmation
+if ( sizeof( $error ) == 0 and isset( $_POST['submit'] ) )
+{
+  $vtp->addSession( $sub, 'confirmation' );
+  $vtp->setVar( $sub, 'confirmation.username', $page['username'] );
+  $url = add_session_id( './admin.php?page=user_list' );
+  $vtp->setVar( $sub, 'confirmation.url', $url );
+  $vtp->closeSession( $sub, 'confirmation' );
+  if ( $use_new_password )
+  {
+    $vtp->addSession( $sub, 'password_updated' );
+    $vtp->closeSession( $sub, 'password_updated' );
+  }
+}
+//------------------------------------------------------------------------ form
+if ( $display_form )
+{
+  $vtp->addSession( $sub, 'form' );
+  $action = './admin.php?page=user_modify&amp;user_id='.$_GET['user_id'];
+  $vtp->setVar( $sub, 'form.form_action', add_session_id( $action ) );
+  $vtp->setVar( $sub, 'form.user:username',     $page['username'] );
+  if ( isset( $_POST['mail_address'] ) )
+  {
+    $page['mail_address'] = $_POST['mail_address'];
+  }
+  $vtp->setVar( $sub, 'form.user:mail_address', $page['mail_address'] );
+  // change status only if the user is not the webmaster
+  if ( $page['username'] != $conf['webmaster'] )
+  {
+    $vtp->addSession( $sub, 'status' );
+    if ( isset( $_POST['status'] ) )
+    {
+      $page['status'] = $_POST['status'];
+    }
+    $option = get_enums( PREFIX_TABLE.'users', 'status' );
+    for ( $i = 0; $i < sizeof( $option ); $i++ )
+    {
+      $vtp->addSession( $sub, 'status_option' );
+      $vtp->setVar( $sub, 'status_option.value', $option[$i] );
+      $vtp->setVar( $sub, 'status_option.option',
+                    $lang['adduser_status_'.$option[$i]] );
+      if( $option[$i] == $page['status'] )
+      {
+        $vtp->setVar( $sub, 'status_option.selected', ' selected="selected"' );
+      }
+      $vtp->closeSession( $sub, 'status_option' );
+    }
+    $vtp->closeSession( $sub, 'status' );
+  }
+  // groups linked with this user
+  $query = 'SELECT id,name';
+  $query.= ' FROM '.PREFIX_TABLE.'user_group, '.PREFIX_TABLE.'groups';
+  $query.= ' WHERE group_id = id';
+  $query.= ' AND user_id = '.$_GET['user_id'];
+  $query.= ';';
+  $result = mysql_query( $query );
+  $user_groups = array();
+  if ( mysql_num_rows( $result ) > 0 )
+  {
+    $vtp->addSession( $sub, 'groups' );
+    while ( $row = mysql_fetch_array( $result ) )
+    {
+      $vtp->addSession( $sub, 'group' );
+      $vtp->setVar( $sub, 'group.name', $row['name'] );
+      $vtp->setVar( $sub, 'group.dissociate_id', $row['id'] );
+      $vtp->closeSession( $sub, 'group' );
+      array_push( $user_groups, $row['id'] );
+    }
+    $vtp->closeSession( $sub, 'groups' );
+  }
+  // empty group not to take into account
+  $vtp->addSession( $sub, 'associate_group' );
+  $vtp->setVar( $sub, 'associate_group.value', 'undef' );
+  $vtp->setVar( $sub, 'associate_group.option', '' );
+  $vtp->closeSession( $sub, 'associate_group' );
+  // groups not linked yet to the user
+  $query = 'SELECT id,name';
+  $query.= ' FROM '.PREFIX_TABLE.'groups';
+  $query.= ' ORDER BY id ASC';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    if ( !in_array( $row['id'], $user_groups ) )
+    {
+      $vtp->addSession( $sub, 'associate_group' );
+      $vtp->setVar( $sub, 'associate_group.value', $row['id'] );
+      $vtp->setVar( $sub, 'associate_group.option', $row['name'] );
+      $vtp->closeSession( $sub, 'associate_group' );
+    }
+  }
+
+  $url = add_session_id( './admin.php?page=user_list' );
+  $vtp->setVar( $sub, 'form.url_back', $url );
+  $vtp->closeSession( $sub, 'form' );
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/user_perm.php
===================================================================
--- /branches/1.3/admin/user_perm.php	(revision 3252)
+++ /branches/1.3/admin/user_perm.php	(revision 3252)
@@ -0,0 +1,180 @@
+<?php
+/***************************************************************************
+ *                               user_perm.php                             *
+ *                            ------------------                           *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+include_once( './include/isadmin.inc.php' );
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/user_perm.vtp' );
+$error = array();
+$tpl = array( 'permuser_authorized','permuser_forbidden','submit',
+              'permuser_parent_forbidden','permuser_info_message',
+              'adduser_info_back','permuser_only_private' );
+templatize_array( $tpl, 'lang', $sub );
+$vtp->setGlobalVar( $sub, 'user_template', $user['template'] );
+//--------------------------------------------------------------------- updates
+if ( isset( $_POST['submit'] ) )
+{
+  // cleaning the user_access table for this user
+  $query = 'DELETE FROM '.PREFIX_TABLE.'user_access';
+  $query.= ' WHERE user_id = '.$_GET['user_id'];
+  $query.= ';';
+  mysql_query( $query );
+  // selecting all private categories
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= " WHERE status = 'private'";
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $radioname = 'access-'.$row['id'];
+    if ( $_POST[$radioname] == 0 )
+    {
+      $query = 'INSERT INTO '.PREFIX_TABLE.'user_access';
+      $query.= ' (user_id,cat_id) VALUES';
+      $query.= ' ('.$_GET['user_id'].','.$row['id'].')';
+      $query.= ';';
+      mysql_query ( $query );
+    }
+  }
+  check_favorites( $_GET['user_id'] );
+  synchronize_user( $_GET['user_id'] );
+  $vtp->addSession( $sub, 'confirmation' );
+  $url = './admin.php?page=user_list';
+  $vtp->setVar( $sub, 'confirmation.back_url', add_session_id( $url ) );
+  $vtp->closeSession( $sub, 'confirmation' );
+}
+//---------------------------------------------------------------- form display
+$restrictions = get_user_restrictions( $_GET['user_id'], $page['user_status'],
+                                  false, false );
+$action = './admin.php?page=user_perm&amp;user_id='.$_GET['user_id'];
+$vtp->setVar( $sub, 'action', add_session_id( $action ) );
+// Association of group_ids with group_names -> caching informations
+$query = 'SELECT id,name';
+$query.= ' FROM '.PREFIX_TABLE.'groups';
+$query.= ';';
+$result = mysql_query( $query );
+$groups = array();
+while ( $row = mysql_fetch_array( $result ) )
+{
+  $groups[$row['id']] = $row['name'];
+}
+// Listing of groups the user belongs to
+$query = 'SELECT ug.group_id as groupid';
+$query.= ' FROM '.PREFIX_TABLE.'user_group as ug';
+$query.= ' WHERE user_id = '.$_GET['user_id'];
+$query.= ';';
+$result = mysql_query( $query );
+$usergroups = array();
+while ( $row = mysql_fetch_array( $result ) )
+{
+  array_push( $usergroups, $row['groupid'] );
+}
+// only private categories are listed
+$query = 'SELECT id';
+$query.= ' FROM '.PREFIX_TABLE.'categories';
+$query.= " WHERE status = 'private'";
+$query.= ';';
+$result = mysql_query( $query );
+while ( $row = mysql_fetch_array( $result ) )
+{
+  $vtp->addSession( $sub, 'category' );
+  $vtp->setVar( $sub, 'category.id', $row['id'] );
+  // we have to know whether the user is authorized to access this
+  // category. The category can be accessible for this user thanks to his
+  // personnal access rights OR thanks to the access rights of a group he
+  // belongs to.
+  // 1. group access :
+  //    retrieving all authorized groups for this category and for this user
+  $query = 'SELECT ga.group_id as groupid';
+  $query.= ' FROM '.PREFIX_TABLE.'group_access as ga';
+  $query.= ', '.PREFIX_TABLE.'user_group as ug';
+  $query.= ' WHERE ga.group_id = ug.group_id';
+  $query.= ' AND ug.user_id = '.$_GET['user_id'];
+  $query.= ' AND cat_id = '.$row['id'];
+  $query.= ';';
+  $subresult = mysql_query( $query );
+  $authorized_groups = array();
+  while ( $subrow = mysql_fetch_array( $subresult ) )
+  {
+    array_push( $authorized_groups, $subrow['groupid'] );
+  }
+  // 2. personnal access
+  $is_user_allowed = is_user_allowed( $row['id'], $restrictions );
+  // link to the category permission management
+  $url = './admin.php?page=cat_perm&amp;cat_id='.$row['id'];
+  $vtp->setVar( $sub, 'category.cat_perm_link', add_session_id( $url ) );
+  // color of the category : green if the user is allowed by himself or
+  // thanks to a group he belongs to
+  if ( $is_user_allowed == 0 or count( $authorized_groups ) > 0 )
+  {
+    $vtp->setVar( $sub, 'category.color', 'green' );
+  }
+  else
+  {
+    $vtp->setVar( $sub, 'category.color', 'red' );
+  }
+  // category name
+  $cat_infos = get_cat_info( $row['id'] );
+  $name = get_cat_display_name( $cat_infos['name'],' &gt; ',
+                                'font-weight:bold;' );
+  $vtp->setVar( $sub, 'category.name', $name );
+  // usergroups
+  if ( count( $usergroups ) > 0 )
+  {
+    $vtp->addSession( $sub, 'usergroups' );
+    foreach ( $usergroups as $i => $usergroup ) {
+      $vtp->addSession( $sub, 'usergroup' );
+      $vtp->setVar( $sub, 'usergroup.name', $groups[$usergroup] );
+      $url = './admin.php?page=group_perm&amp;group_id='.$usergroup;
+      $vtp->setVar( $sub, 'usergroup.url', add_session_id( $url ) );
+      if ( in_array( $usergroup, $authorized_groups ) )
+      {
+        $vtp->setVar( $sub, 'usergroup.color', 'green' );
+      }
+      else
+      {
+        $vtp->setVar( $sub, 'usergroup.color', 'red' );
+      }
+      if ( $i < count( $usergroups ) - 1 )
+      {
+        $vtp->setVar( $sub, 'usergroup.separation', ',' );
+      }
+      $vtp->closeSession( $sub, 'usergroup' );
+    }
+    $vtp->closeSession( $sub, 'usergroups' );
+  }
+  // any subcat forbidden for this user ?
+  if ( $is_user_allowed == 2 )
+  {
+    $vtp->addSession( $sub, 'parent_forbidden' );
+    $vtp->closeSession( $sub, 'parent_forbidden' );
+  }
+  // personnal forbidden or authorized access ?
+  if ( $is_user_allowed == 0 )
+  {
+    $vtp->setVar( $sub, 'category.authorized_checked', ' checked="checked"' );
+  }
+  else
+  {
+    $vtp->setVar( $sub, 'category.forbidden_checked', ' checked="checked"' );
+  }
+  $vtp->closeSession( $sub, 'category' );
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/admin/waiting.php
===================================================================
--- /branches/1.3/admin/waiting.php	(revision 3252)
+++ /branches/1.3/admin/waiting.php	(revision 3252)
@@ -0,0 +1,144 @@
+<?php
+/***************************************************************************
+ *                                waiting.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+include_once( './include/isadmin.inc.php' );
+//--------------------------------------------------------------------- updates
+if ( isset( $_POST['submit'] ) )
+{
+  $query = 'SELECT id,storage_category_id,file,tn_ext';
+  $query.= ' FROM '.PREFIX_TABLE.'waiting';
+  $query.= " WHERE validated = 'false'";
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $key = 'validate-'.$row['id'];
+    if ( isset( $_POST[$key] ) )
+    {
+      if ( $_POST[$key] == 'true' )
+      {
+        // The uploaded element was validated, we have to set the
+        // "validated" field to "true"
+        $query = 'UPDATE '.PREFIX_TABLE.'waiting';
+        $query.= " SET validated = 'true'";
+        $query.= ' WHERE id = '.$row['id'];
+        $query.= ';';
+        mysql_query( $query );
+        // linking logically the picture to its storage category
+        $query = 'INSERT INTO';
+      }
+      else
+      {
+        // The uploaded element was refused, we have to delete its reference
+        // in the database and to delete the element as well.
+        $query = 'DELETE FROM '.PREFIX_TABLE.'waiting';
+        $query.= ' WHERE id = '.$row['id'];
+        $query.= ';';
+        mysql_query( $query );
+        // deletion of the associated files
+        $dir = get_complete_dir( $row['storage_category_id'] );
+        unlink( '.'.$dir.$row['file'] );
+        if ( $row['tn_ext'] != '' )
+        {
+          $thumbnail = $conf['prefix_thumbnail'];
+          $thumbnail.= get_filename_wo_extension( $row['file'] );
+          $thumbnail.= '.'.$row['tn_ext'];
+          $url = '.'.$dir.'thumbnail/'.$thumbnail;
+          unlink( $url );
+        }
+      }
+    }
+  }
+}
+//----------------------------------------------------- template initialization
+$sub = $vtp->Open( '../template/'.$user['template'].'/admin/waiting.vtp' );
+$tpl = array( 'category','date','author','thumbnail','file','delete',
+              'submit','waiting_update' );
+templatize_array( $tpl, 'lang', $sub );
+//-------------------------------------------------------- confirmation message
+if ( isset( $_POST['submit'] ) )
+{
+  $vtp->addSession( $sub, 'confirmation' );
+  $vtp->closeSession( $sub, 'confirmation' );
+}
+//---------------------------------------------------------------- form display
+$cat_names = array();
+$query = 'SELECT id,storage_category_id,file,username,mail_address';
+$query.= ',date,tn_ext';
+$query.= ' FROM '.PREFIX_TABLE.'waiting';
+$query.= " WHERE validated = 'false'";
+$query.= ' ORDER BY storage_category_id';
+$query.= ';';
+$result = mysql_query( $query );
+$i = 0;
+while ( $row = mysql_fetch_array( $result ) )
+{
+  $vtp->addSession( $sub, 'picture' );
+  $vtp->setVar( $sub, 'picture.id', $row['id'] );
+  if ( $i++ % 2 == 0 )
+  {
+    $vtp->setVar( $sub, 'picture.class', 'row2' );
+  }
+  if ( !isset( $cat_names[$row['storage_category_id']] ) )
+  {
+    $cat = get_cat_info( $row['storage_category_id'] );
+    $cat_names[$row['storage_category_id']] = array();
+    $cat_names[$row['storage_category_id']]['dir'] =
+      '.'.get_complete_dir( $row['storage_category_id'] );
+    $cat_names[$row['storage_category_id']]['display_name'] =
+      get_cat_display_name( $cat['name'], ' &gt; ', 'font-weight:bold;' );
+  }
+  // category name
+  $vtp->setVar( $sub, 'picture.cat_name',
+                $cat_names[$row['storage_category_id']]['display_name'] );
+  // date displayed like this (in English ) :
+  //                     Sunday 15 June 2003 21:29
+  $date = format_date( $row['date'], 'unix', true );
+  $vtp->setVar( $sub, 'picture.date', $date );
+  // file preview link
+  $url = $cat_names[$row['storage_category_id']]['dir'].$row['file'];
+  $vtp->setVar( $sub, 'picture.preview_url', $url );
+  // file name
+  $vtp->setVar( $sub, 'picture.file', $row['file'] );
+  // is there an existing associated thumnail ?
+  if ( isset( $row['tn_ext'] ) and $row['tn_ext'] != '' )
+  {
+    $vtp->addSession( $sub, 'thumbnail' );
+    $thumbnail = $conf['prefix_thumbnail'];
+    $thumbnail.= get_filename_wo_extension( $row['file'] );
+    $thumbnail.= '.'.$row['tn_ext'];
+    $url = $cat_names[$row['storage_category_id']]['dir'];
+    $url.= 'thumbnail/'.$thumbnail;
+    $vtp->setVar( $sub, 'thumbnail.preview_url', $url );
+    $vtp->setVar( $sub, 'thumbnail.file', $thumbnail );
+    $vtp->closeSession( $sub, 'thumbnail' );
+  }
+  else
+  {
+    $vtp->addSession( $sub, 'no_thumbnail' );
+    $vtp->closeSession( $sub, 'no_thumbnail' );
+  }
+  // username and associated mail address
+  $vtp->setVar( $sub, 'picture.mail_address', $row['mail_address'] );
+  $vtp->setVar( $sub, 'picture.username', $row['username'] );
+
+  $vtp->closeSession( $sub, 'picture' );
+}
+//----------------------------------------------------------- sending html code
+$vtp->Parse( $handle , 'sub', $sub );
+?>
Index: /branches/1.3/category.php
===================================================================
--- /branches/1.3/category.php	(revision 3252)
+++ /branches/1.3/category.php	(revision 3252)
@@ -0,0 +1,498 @@
+<?php
+/***************************************************************************
+ *                               category.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+//----------------------------------------------------------- personnal include
+include_once( './include/init.inc.php' );
+//---------------------------------------------------------------------- logout
+if ( isset( $_GET['act'] )
+     and $_GET['act'] == 'logout'
+     and isset( $_COOKIE['id'] ) )
+{
+  // cookie deletion if exists
+  setcookie( 'id', '', 0, cookie_path() );
+  $url = 'category.php';
+  header( 'Request-URI: '.$url );  
+  header( 'Content-Location: '.$url );  
+  header( 'Location: '.$url );
+  exit();
+}
+//-------------------------------------------------- access authorization check
+if ( isset( $_GET['cat'] ) ) check_cat_id( $_GET['cat'] );
+check_login_authorization();
+if ( isset( $page['cat'] ) and is_numeric( $page['cat'] ) )
+{
+  check_restrictions( $page['cat'] );
+}
+//-------------------------------------------------------------- initialization
+// detection of the start picture to display
+if ( !isset( $_GET['start'] )
+     or !is_numeric( $_GET['start'] )
+     or ( is_numeric( $_GET['start'] ) and $_GET['start'] < 0 ) )
+  $page['start'] = 0;
+else
+  $page['start'] = $_GET['start'];
+// Sometimes, a "num" is provided in the URL. It is the number
+// of the picture to show. This picture must be in the thumbnails page.
+// We have to find the right $page['start'] that show the num picture
+// in this category
+if ( isset( $_GET['num'] )
+     and is_numeric( $_GET['num'] )
+     and $_GET['num'] >= 0 )
+{
+  $page['start'] = floor( $_GET['num'] / $user['nb_image_page'] );
+  $page['start']*= $user['nb_image_page'];
+}
+
+initialize_category();
+
+// creation of the array containing the cat ids to expand in the menu
+// $page['tab_expand'] contains an array with the category ids
+// $page['expand'] contains the string to display in URL with comma
+$page['tab_expand'] = array();
+if ( isset ( $_GET['expand'] ) and $_GET['expand'] != 'all' )
+{
+  $tab_expand = explode( ',', $_GET['expand'] );
+  foreach ( $tab_expand as $id ) {
+    if ( is_numeric( $id ) ) array_push( $page['tab_expand'], $id );
+  }
+}
+if ( isset($page['cat']) && is_numeric( $page['cat'] ) )
+{
+  // the category displayed (in the URL cat=23) must be seen in the menu ->
+  // parent categories must be expanded
+  $uppercats = explode( ',', $page['uppercats'] );
+  foreach ( $uppercats as $uppercat ) {
+    array_push( $page['tab_expand'], $uppercat );
+  }
+}
+$page['tab_expand'] = array_unique( $page['tab_expand'] );
+$page['expand'] = implode( ',', $page['tab_expand'] );
+// in case of expanding all authorized cats
+// The $page['expand'] equals 'all' and
+// $page['tab_expand'] contains all the authorized cat ids
+if ( $user['expand']
+     or ( isset( $_GET['expand'] ) and $_GET['expand'] == 'all' ) )
+{
+  $page['tab_expand'] = array();
+  $page['expand'] = 'all';
+}
+// creating the structure of the categories (useful for displaying the menu)
+// creating the plain structure : array of all the available categories and
+// their relative informations, see the definition of the function
+// get_user_plain_structure for further details.
+$page['plain_structure'] = get_user_plain_structure();
+$page['structure'] = create_user_structure( '' );
+$page['structure'] = update_structure( $page['structure'] );
+
+//----------------------------------------------------- template initialization
+
+//
+// Start output of page
+//
+$title = $page['title'];
+include('include/page_header.php');
+
+$handle = $vtp->Open( './template/'.$user['template'].'/category.vtp' );
+initialize_template();
+$tpl = array(
+  'categories','hint_category','sub-cat','images_available','total',
+  'title_menu','nb_image_category','send_mail','title_send_mail',
+  'connected_user','recent_image','days',
+  'favorite_cat_hint','favorite_cat','stats','most_visited_cat_hint',
+  'most_visited_cat','recent_cat','recent_cat_hint','upload_picture',
+  'comments' );
+templatize_array( $tpl, 'lang', $handle );
+
+$tpl = array( 'mail_webmaster','webmaster','top_number');
+templatize_array( $tpl, 'conf', $handle );
+
+$tpl = array( 'short_period','long_period','lien_collapsed', 'username' );
+templatize_array( $tpl, 'user', $handle );
+
+$tpl = array( 'navigation_bar','cat_comment','cat_nb_images' );
+templatize_array( $tpl, 'page', $handle );
+
+// special global template vars
+$vtp->setGlobalVar( $handle, 'icon_short', get_icon( time() ) );
+$icon_long = get_icon( time() - ( $user['short_period'] * 24 * 60 * 60 + 1 ) );
+$vtp->setGlobalVar( $handle, 'icon_long', $icon_long );
+$nb_total_pictures = count_user_total_images();
+$vtp->setGlobalVar( $handle, 'nb_total_pictures',$nb_total_pictures );
+
+//------------------------------------------------------------- categories menu
+$vtp->setVar( $handle, 'home_url', add_session_id( 'category.php' ) );
+// normal categories
+foreach ( $page['structure'] as $category ) {
+  // display category is a function relative to the template
+  display_category( $category, '&nbsp;', $handle );
+}
+// favorites cat
+if ( !$user['is_the_guest'] )
+{
+  $vtp->addSession( $handle, 'favorites' );
+  $url = './category.php?cat=fav&amp;expand='.$page['expand'];
+  $vtp->setVar( $handle, 'favorites.url', add_session_id( $url ) );
+  // searching the number of favorite picture
+  $query = 'SELECT COUNT(*) AS count';
+  $query.= ' FROM '.PREFIX_TABLE.'favorites';
+  $query.= ' WHERE user_id = '.$user['id'].';';
+  $result = mysql_query( $query );
+  $row = mysql_fetch_array( $result );
+  $vtp->setVar( $handle, 'favorites.nb_favorites', $row['count'] );
+  $vtp->closeSession( $handle, 'favorites' );
+}
+// most visited pictures category
+$url = './category.php?cat=most_visited&amp;expand='.$page['expand'];
+$vtp->setGlobalVar( $handle, 'most_visited_url', add_session_id( $url ) );
+// recent pictures
+$url = './category.php?cat=recent&amp;expand='.$page['expand'];
+$vtp->setGlobalVar( $handle, 'recent_url', add_session_id( $url ) );
+//--------------------------------------------------------------------- summary
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.url', './identification.php' );
+if ( !$user['is_the_guest'] )
+{
+  $vtp->setVar( $handle, 'summary.title', '' );
+  $vtp->setVar( $handle, 'summary.name',replace_space($lang['change_login']));
+}
+else
+{
+  $vtp->setVar( $handle, 'summary.title', $lang['hint_login'] );
+  $vtp->setVar( $handle, 'summary.name',  replace_space( $lang['menu_login']));
+}
+$vtp->closeSession( $handle, 'summary' );
+// links for registered users
+if ( !$user['is_the_guest'] )
+{
+  // logout link
+  $vtp->addSession( $handle, 'summary' );
+  $vtp->setVar( $handle, 'summary.url', './category.php?act=logout' );
+  $vtp->setVar( $handle, 'summary.title', '' );
+  $vtp->setVar( $handle, 'summary.name', replace_space( $lang['logout'] ) );
+  $vtp->closeSession( $handle, 'summary' );
+  // customization link
+  $vtp->addSession( $handle, 'summary' );
+  $url = './profile.php';
+  if (isset($page['cat']) && isset($page['expand']))
+  	$url.='?cat='.$page['cat'].'&amp;expand='.$page['expand'];
+  if ( isset($page['cat']) && $page['cat'] == 'search' )
+  {
+    $url.= '&amp;search='.$_GET['search'].'&amp;mode='.$_GET['mode'];
+  }
+  $vtp->setVar( $handle, 'summary.url', add_session_id( $url ) );
+  $vtp->setVar( $handle, 'summary.title', $lang['hint_customize'] );
+  $vtp->setVar( $handle, 'summary.name', replace_space( $lang['customize'] ) );
+  $vtp->closeSession( $handle, 'summary' );
+}
+// search link
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.url', add_session_id( './search.php' ) );
+$vtp->setVar( $handle, 'summary.title', $lang['hint_search'] );
+$vtp->setVar( $handle, 'summary.name', replace_space( $lang['search'] ) );
+$vtp->closeSession( $handle, 'summary' );
+// comments link
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.url', add_session_id( './comments.php' ) );
+$vtp->setVar( $handle, 'summary.title', $lang['hint_comments'] );
+$vtp->setVar( $handle, 'summary.name', replace_space( $lang['comments'] ) );
+$vtp->closeSession( $handle, 'summary' );
+// about link
+$vtp->addSession( $handle, 'summary' );
+$vtp->setVar( $handle, 'summary.url', './about.php?'.
+              str_replace( '&', '&amp;', $_SERVER['QUERY_STRING'] ) );
+$vtp->setVar( $handle, 'summary.title', $lang['hint_about'] );
+$vtp->setVar( $handle, 'summary.name', replace_space( $lang['about'] ) );
+$vtp->closeSession( $handle, 'summary' );
+// administration link
+if ( $user['status'] == 'admin' )
+{
+  $vtp->addSession( $handle, 'summary' );
+  $vtp->setVar( $handle, 'summary.url',
+                add_session_id( './admin/admin.php' ) );
+  $vtp->setVar( $handle, 'summary.title', $lang['hint_admin'] );
+  $vtp->setVar( $handle, 'summary.name', replace_space( $lang['admin'] ) );
+  $vtp->closeSession( $handle, 'summary' );
+}
+//-------------------------------------------------------------- category title
+if ( isset ( $page['cat'] ) )
+{
+  if ( is_numeric( $page['cat'] ) )
+  {
+    $cat_title = get_cat_display_name( $page['cat_name'], '<br />',
+                                    'font-style:italic;' );
+    $vtp->setGlobalVar( $handle, "cat_title", $cat_title );
+  }
+  else
+  {
+    if ( $page['cat'] == 'search' )
+    {
+      $page['title'].= ' : <span style="font-style:italic;">';
+      $page['title'].= $_GET['search']."</span>";
+    }
+    $page['title'] = replace_space( $page['title'] );
+    $vtp->setGlobalVar( $handle, "cat_title", $page['title'] );
+  }
+}
+else
+{
+  $vtp->setGlobalVar( $handle, "cat_title",
+                      replace_space( $lang['no_category'] ) );
+}
+//------------------------------------------------------------------ thumbnails
+if ( isset( $page['cat'] ) and $page['cat_nb_images'] != 0 )
+{
+  $array_cat_directories = array();
+  
+  $query = 'SELECT distinct(id),file,date_available,tn_ext,name,filesize';
+  $query.= ',storage_category_id';
+  $query.= ' FROM '.PREFIX_TABLE.'images AS i';
+  $query.=' INNER JOIN '.PREFIX_TABLE.'image_category AS ic ON id=ic.image_id';
+  $query.= $page['where'];
+  $query.= $conf['order_by'];
+  $query.= ' LIMIT '.$page['start'].','.$page['nb_image_page'];
+  $query.= ';';
+  $result = mysql_query( $query );
+
+  $vtp->addSession( $handle, 'thumbnails' );
+  $vtp->addSession( $handle, 'line' );
+  // iteration counter to use a new <tr> every "$nb_image_line" pictures
+  $cell_number = 1;
+  // iteration counter to be sure not to create too much lines in the table
+  $line_number = 1;
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    // retrieving the storage dir of the picture
+    if ( !isset($array_cat_directories[$row['storage_category_id']]))
+    {
+      $array_cat_directories[$row['storage_category_id']] =
+        get_complete_dir( $row['storage_category_id'] );
+    }
+    $cat_directory = $array_cat_directories[$row['storage_category_id']];
+
+    $file = get_filename_wo_extension( $row['file'] );
+    // name of the picture
+    if ( isset( $row['name'] ) and $row['name'] != '' ) $name = $row['name'];
+    else $name = str_replace( '_', ' ', $file );
+
+    if ( $page['cat'] == 'search' )
+    {
+      $name = replace_search( $name, $_GET['search'] );
+    }
+    // thumbnail url
+    $thumbnail_url = $cat_directory;
+    $thumbnail_url.= 'thumbnail/'.$conf['prefix_thumbnail'];
+    $thumbnail_url.= $file.'.'.$row['tn_ext'];
+    // message in title for the thumbnail
+    $thumbnail_title = $row['file'];
+    if ( $row['filesize'] == '' )
+      $poids = floor( filesize( $cat_directory.$row['file'] ) / 1024 );
+    else
+      $poids = $row['filesize'];
+    $thumbnail_title .= ' : '.$poids.' KB';
+    // url link on picture.php page
+    $url_link = './picture.php?cat='.$page['cat'];
+    $url_link.= '&amp;image_id='.$row['id'].'&amp;expand='.$page['expand'];
+    if ( $page['cat'] == 'search' )
+    {
+      $url_link.= '&amp;search='.$_GET['search'].'&amp;mode='.$_GET['mode'];
+    }
+    // date of availability for creation icon
+    list( $year,$month,$day ) = explode( '-', $row['date_available'] );
+    $date = mktime( 0, 0, 0, $month, $day, $year );
+    // sending vars to display
+    $vtp->addSession( $handle, 'thumbnail' );
+    $vtp->setVar( $handle, 'thumbnail.url', add_session_id( $url_link ) );
+    $vtp->setVar( $handle, 'thumbnail.src', $thumbnail_url );
+    $vtp->setVar( $handle, 'thumbnail.alt', $row['file'] );
+    $vtp->setVar( $handle, 'thumbnail.title', $thumbnail_title );
+    $vtp->setVar( $handle, 'thumbnail.name', $name );
+    $vtp->setVar( $handle, 'thumbnail.icon', get_icon( $date ) );
+
+    if ( $conf['show_comments'] and $user['show_nb_comments'] )
+    {
+      $vtp->addSession( $handle, 'nb_comments' );
+      $query = 'SELECT COUNT(*) AS nb_comments';
+      $query.= ' FROM '.PREFIX_TABLE.'comments';
+      $query.= ' WHERE image_id = '.$row['id'];
+      $query.= " AND validated = 'true'";
+      $query.= ';';
+      $row = mysql_fetch_array( mysql_query( $query ) );
+      $vtp->setVar( $handle, 'nb_comments.nb', $row['nb_comments'] );
+      $vtp->closeSession( $handle, 'nb_comments' );
+    }
+    
+    $vtp->closeSession( $handle, 'thumbnail' );
+    
+    if ( $cell_number++ == $user['nb_image_line'] )
+    {
+      // creating a new line
+      $vtp->closeSession( $handle, 'line' );
+      // the number of the next cell is 1
+      $cell_number = 1;
+      // we only create a new line if it does not exceed the maximum line
+      // per page for the logged user
+      if ( $line_number++ < $user['nb_line_page'] )
+      {
+        $vtp->addSession( $handle, 'line' );
+      }
+    }
+  }
+  $vtp->closeSession( $handle, 'thumbnails' );
+}
+//-------------------------------------------------------------- empty category
+elseif ( ( isset( $page['cat'] )
+           and is_numeric( $page['cat'] )
+           and $page['cat_nb_images'] == 0
+           and $page['plain_structure'][$page['cat']]['nb_sub_categories'] > 0)
+         or (!isset($_GET['cat'])))
+{
+  $vtp->addSession( $handle, 'thumbnails' );
+  $vtp->addSession( $handle, 'line' );
+
+  $subcats=array();
+  if (isset($page['cat'])) $subcats = get_non_empty_subcat_ids( $page['cat'] );
+  else                     $subcats = get_non_empty_subcat_ids( '' );
+  $cell_number = 1;
+  $i = 0;
+  foreach ( $subcats as $subcat_id => $non_empty_id ) {
+    $name = '<img src="'.$user['lien_collapsed'].'" style="border:none;"';
+    $name.= ' alt="&gt;"/> ';
+    $name.= '[ <span style="font-weight:bold;">';
+    $name.= $page['plain_structure'][$subcat_id]['name'];
+    $name.= '</span> ]';
+
+    // searching the representative picture of the category
+    $query = 'SELECT representative_picture_id';
+    $query.= ' FROM '.PREFIX_TABLE.'categories';
+    $query.= ' WHERE id = '.$non_empty_id;
+    $query.= ';';
+    $row = mysql_fetch_array( mysql_query( $query ) );
+    
+    $query = 'SELECT file,tn_ext,storage_category_id';
+    $query.= ' FROM '.PREFIX_TABLE.'images, '.PREFIX_TABLE.'image_category';
+    $query.= ' WHERE category_id = '.$non_empty_id;
+    $query.= ' AND id = image_id';
+    // if the category has a representative picture, this is its thumbnail
+    // that will be displayed !
+    if ( isset( $row['representative_picture_id'] ) )
+      $query.= ' AND id = '.$row['representative_picture_id'];
+    else
+      $query.= ' ORDER BY RAND()';
+    $query.= ' LIMIT 0,1';
+    $query.= ';';
+    $image_result = mysql_query( $query );
+    $image_row    = mysql_fetch_array( $image_result );
+
+    $file = get_filename_wo_extension( $image_row['file'] );
+
+    // creating links for thumbnail and associated category
+    $thumbnail_link = get_complete_dir( $image_row['storage_category_id'] );
+    $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
+    $thumbnail_link.= $file.'.'.$image_row['tn_ext'];
+
+    $thumbnail_title = $lang['hint_category'];
+
+    $url_link = './category.php?cat='.$subcat_id;
+    if ( isset($page['cat'])&& !in_array( $page['cat'], $page['tab_expand'] ) )
+    {
+      array_push( $page['tab_expand'], $page['cat'] );
+      $page['expand'] = implode( ',', $page['tab_expand'] );
+    }
+    $url_link.= '&amp;expand='.$page['expand'];
+    // we add the category to explore in the expand list
+    if ( $page['expand'] != '' ) $url_link.= ',';
+    $url_link.= $subcat_id;
+
+    $date = $page['plain_structure'][$subcat_id]['date_last'];
+
+    // sending vars to display
+    $vtp->addSession( $handle, 'thumbnail' );
+    $vtp->setVar( $handle, 'thumbnail.url', add_session_id( $url_link ) );
+    $vtp->setVar( $handle, 'thumbnail.src', $thumbnail_link );
+    $vtp->setVar( $handle, 'thumbnail.alt', $image_row['file'] );
+    $vtp->setVar( $handle, 'thumbnail.title', $thumbnail_title );
+    $vtp->setVar( $handle, 'thumbnail.name', $name );
+    $vtp->setVar( $handle, 'thumbnail.icon', get_icon( $date ) );
+    $vtp->closeSession( $handle, 'thumbnail' );
+
+    if ( $cell_number++ == $user['nb_image_line'] )
+    {
+      $vtp->closeSession( $handle, 'line' );
+      $cell_number = 1;
+      // we open a new line if the subcat was not the last one
+      if ( $i++ < count( $subcats ) - 1 )
+      {
+        $vtp->addSession( $handle, 'line' );
+      }
+    }
+  }
+  if ( $i < count( $subcats ) - 1 )
+  {
+    $vtp->closeSession( $handle, 'line' );
+  }
+  $vtp->closeSession( $handle, 'thumbnails' );
+}
+//------------------------------------------------------- category informations
+if ( isset ( $page['cat'] ) )
+{
+  $vtp->addSession( $handle, 'cat_infos' );
+  // navigation bar
+  if ( $page['navigation_bar'] != '' )
+  {
+    $vtp->addSession( $handle, 'navigation' );
+    $vtp->closeSession( $handle, 'navigation' );
+  }
+  // category comment
+  if ( isset( $page['comment'] ) and $page['comment'] != '' )
+  {
+    $vtp->addSession( $handle, 'comment' );
+    $vtp->setVar( $handle, 'comment.cat_comment', $page['comment'] );
+    $vtp->closeSession( $handle, 'comment' );
+  }
+  // total number of pictures in the category
+  if ( is_numeric( $page['cat'] ) )
+  {
+    $vtp->setVar( $handle, 'cat_infos.cat_name',
+                  get_cat_display_name( $page['cat_name'], ' - ',
+                                        'font-style:italic;' ) );
+    // upload a picture in the category
+    if ( $page['cat_site_id'] == 1
+         and $conf['upload_available']
+         and $page['cat_uploadable'] )
+    {
+      $vtp->addSession( $handle, 'upload' );
+      $url = './upload.php?cat='.$page['cat'].'&amp;expand='.$page['expand'];
+      $vtp->setVar( $handle, 'upload.url', add_session_id( $url ) );
+      $vtp->closeSession( $handle, 'upload' );
+    }
+  }
+  else
+  {
+    $vtp->setVar( $handle, 'cat_infos.cat_name', $page['title'] );
+  }
+  
+  $vtp->closeSession( $handle, 'cat_infos' );
+}
+//------------------------------------------------------------ log informations
+pwg_log( 'category', $page['title'] );
+mysql_close();
+//----------------------------------------------------------- html code display
+$output.= $vtp->Display( $handle, 0 );
+
+include('include/page_tail.php');
+?>
Index: /branches/1.3/comments.php
===================================================================
--- /branches/1.3/comments.php	(revision 3252)
+++ /branches/1.3/comments.php	(revision 3252)
@@ -0,0 +1,189 @@
+<?php
+/***************************************************************************
+ *                               comments.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+include_once( './include/init.inc.php' );
+//------------------------------------------------------------------- functions
+function display_pictures( $mysql_result, $maxtime, $forbidden_cat_ids )
+{
+  global $vtp,$handle,$lang,$conf,
+    $array_cat_directories,$array_cat_site_id,$array_cat_names;
+
+  while ( $row = mysql_fetch_array( $mysql_result ) )
+  {
+    $vtp->addSession( $handle, 'picture' );
+    // 1. find a category wich is authorized for the user to display a
+    //    category name.
+    $query = 'SELECT category_id';
+    $query.= ' FROM '.PREFIX_TABLE.'image_category';
+    $query.= ' WHERE image_id = '.$row['image_id'];
+    if ( count( $forbidden_cat_ids ) > 0 )
+    {
+      $query.= ' AND category_id NOT IN (';
+      foreach ( $forbidden_cat_ids as $i => $restricted_cat ) {
+        if ( $i > 0 ) $query.= ',';
+        $query.= $restricted_cat;
+      }
+      $query.= ')';
+    }
+    $query.= ' ORDER BY RAND()';
+    $query.= ';';
+    $subrow = mysql_fetch_array( mysql_query( $query ) );
+    $category_id = $subrow['category_id'];
+
+    if ( !isset($array_cat_directories[$category_id]))
+    {
+      $array_cat_directories[$category_id] =
+        get_complete_dir( $category_id );
+      $cat_result = get_cat_info( $category_id );
+      $array_cat_site_id[$category_id] = $cat_result['site_id'];
+      $array_cat_names[$category_id] =
+        get_cat_display_name( $cat_result['name'], ' &gt; ', '' );
+    }
+    
+    // 2. for each picture, getting informations for displaying thumbnail and
+    //    link to the full size picture
+    $query = 'SELECT name,file,storage_category_id as cat_id,tn_ext';
+    $query.= ' FROM '.PREFIX_TABLE.'images';
+    $query.= ' WHERE id = '.$row['image_id'];
+    $query.= ';';
+    $subresult = mysql_query( $query );
+    $subrow = mysql_fetch_array( $subresult );
+
+    if ( $array_cat_directories[$subrow['cat_id']] == '' )
+    {
+      $array_cat_directories[$subrow['cat_id']] =
+        get_complete_dir( $subrow['cat_id'] );
+      $cat_result = get_cat_info( $subrow['cat_id'] );
+      $array_cat_site_id[$subrow['cat_id']] = $cat_result['site_id'];
+      $array_cat_names[$subrow['cat_id']] =
+        get_cat_display_name( $cat_result['name'], ' &gt; ', '' );
+    }
+
+    $file = get_filename_wo_extension( $subrow['file'] );
+    // name of the picture
+    $name = $array_cat_names[$category_id].' &gt; ';
+    if ( $subrow['name'] != '' ) $name.= $subrow['name'];
+    else                         $name.= str_replace( '_', ' ', $file );
+    $name.= ' [ '.$subrow['file'].' ]';
+    $vtp->setVar( $handle, 'picture.title', $name );
+    // source of the thumbnail picture
+    $src = $array_cat_directories[$subrow['cat_id']];
+    $src.= 'thumbnail/'.$conf['prefix_thumbnail'];
+    $src.= $file.'.'.$subrow['tn_ext'];
+    $vtp->setVar( $handle, 'picture.thumb_src', $src );
+    // link to the full size picture
+    $url = './picture.php?cat='.$category_id;
+    $url.= '&amp;image_id='.$row['image_id'];
+    $vtp->setVar( $handle, 'picture.thumb_url', add_session_id( $url ) );
+    // 3. for each picture, retrieving all comments
+    $query = 'SELECT id,date,author,content';
+    $query.= ' FROM '.PREFIX_TABLE.'comments';
+    $query.= ' WHERE image_id = '.$row['image_id'];
+    $query.= ' AND date > '.$maxtime;
+    $query.= " AND validated = 'true'";
+    $query.= ' ORDER BY date DESC';
+    $query.= ';';
+    $handleresult = mysql_query( $query );
+    while ( $subrow = mysql_fetch_array( $handleresult ) )
+    {
+      $vtp->addSession( $handle, 'comment' );
+      $author = $subrow['author'];
+      if ( $subrow['author'] == '' ) $author = $lang['guest'];
+      $vtp->setVar( $handle, 'comment.author', $author );
+      $displayed_date = format_date( $subrow['date'], 'unix', true );
+      $vtp->setVar( $handle, 'comment.date', $displayed_date );
+
+      $content = nl2br( $subrow['content'] );
+      
+      // replace _word_ by an underlined word
+      $pattern = '/_([^\s]*)_/';
+      $replacement = '<span style="text-decoration:underline;">\1</span>';
+      $content = preg_replace( $pattern, $replacement, $content );
+      
+      // replace *word* by a bolded word
+      $pattern = '/\*([^\s]*)\*/';
+      $replacement = '<span style="font-weight:bold;">\1</span>';
+      $content = preg_replace( $pattern, $replacement, $content );
+
+      // replace /word/ by an italic word
+      $pattern = '/\/([^\s]*)\//';
+      $replacement = '<span style="font-style:italic;">\1</span>';
+      $content = preg_replace( $pattern, $replacement, $content );
+      
+      $vtp->setVar( $handle, 'comment.content', $content );
+      $vtp->closeSession( $handle, 'comment' );
+    }
+    $vtp->closeSession( $handle, 'picture' );
+  }
+}
+//----------------------------------------------------- template initialization
+//
+// Start output of page
+//
+$title= $lang['title_comments'];
+include('include/page_header.php');
+
+$handle = $vtp->Open( './template/'.$user['template'].'/comments.vtp' );
+initialize_template();
+$tpl = array( 'title_comments','stats_last_days','search_return_main_page' );
+templatize_array( $tpl, 'lang', $handle );
+//--------------------------------------------------- number of days to display
+if ( isset( $_GET['last_days'] ) ) define( 'MAX_DAYS', $_GET['last_days'] );
+else                               define( 'MAX_DAYS', 0 );
+//----------------------------------------- non specific section initialization
+$array_cat_directories = array();
+$array_cat_names       = array();
+$array_cat_site_id     = array();
+//------------------------------------------------------- last comments display
+foreach ( $conf['last_days'] as $option ) {
+  $vtp->addSession( $handle, 'last_day_option' );
+  $vtp->setVar( $handle, 'last_day_option.option', $option );
+  $url = './comments.php';
+  $url.= '?last_days='.($option - 1);
+  $vtp->setVar( $handle, 'last_day_option.link', add_session_id( $url ) );
+  $style = '';
+  if ( $option == MAX_DAYS + 1 ) $style = 'text-decoration:underline;';
+  $vtp->setVar( $handle, 'last_day_option.style', $style );
+  $vtp->closeSession( $handle, 'last_day_option' );
+}
+$vtp->setVar( $handle, 'back_url', add_session_id( './category.php' ) );
+// 1. retrieving picture ids which have comments recently added
+$date = date( 'Y-m-d', time() - ( MAX_DAYS*24*60*60 ) );
+list($year,$month,$day) = explode( '-', $date);
+$maxtime = mktime( 0,0,0,$month,$day,$year );
+$query = 'SELECT DISTINCT(ic.image_id) as image_id';
+$query.= ' FROM '.PREFIX_TABLE.'comments AS c';
+$query.=     ', '.PREFIX_TABLE.'image_category AS ic';
+$query.= ' WHERE c.image_id = ic.image_id';
+$query.= ' AND date > '.$maxtime;
+$query.= " AND validated = 'true'";
+// we must not show pictures of a forbidden category
+if ( $user['forbidden_categories'] != '' )
+{
+  $query.= ' AND category_id NOT IN ';
+  $query.= '('.$user['forbidden_categories'].')';
+}
+$query.= ' ORDER BY ic.image_id DESC';
+$query.= ';';
+$result = mysql_query( $query );
+display_pictures( $result, $maxtime, $user['restrictions'] );
+//----------------------------------------------------------- html code display
+$output.= $vtp->Display( $handle, 0 );
+include('include/page_tail.php');
+?>
Index: /branches/1.3/galleries/index.htm
===================================================================
--- /branches/1.3/galleries/index.htm	(revision 3252)
+++ /branches/1.3/galleries/index.htm	(revision 3252)
@@ -0,0 +1,8 @@
+<html>
+    <head>
+        <title>PhpWebGallery</title>
+    </head>
+    <body>
+        No access authorized
+    </body>
+</html>
Index: /branches/1.3/identification.php
===================================================================
--- /branches/1.3/identification.php	(revision 3252)
+++ /branches/1.3/identification.php	(revision 3252)
@@ -0,0 +1,116 @@
+<?php
+/***************************************************************************
+ *                            identification.php                           *
+ *                            ------------------                           *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+//----------------------------------------------------------- personnal include
+include_once( "./include/init.inc.php" );
+//-------------------------------------------------------------- identification
+$errors = array();
+if ( isset( $_POST['login'] ) )
+{
+  // retrieving the encrypted password of the login submitted
+  $query = 'SELECT password';
+  $query.= ' FROM '.PREFIX_TABLE.'users';
+  $query.= " WHERE username = '".$_POST['login']."';";
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  if( $row['password'] == md5( $_POST['pass'] ) )
+  {
+    $session_id = session_create( $_POST['login'] );
+    $url = 'category.php?id='.$session_id;
+    header( 'Request-URI: '.$url );
+    header( 'Content-Location: '.$url );  
+    header( 'Location: '.$url );
+    exit();
+  }
+  else
+  {
+    array_push( $errors, $lang['invalid_pwd'] );
+  }
+}
+//----------------------------------------------------- template initialization
+//
+// Start output of page
+//
+$title = $lang['ident_page_title'];
+include('include/page_header.php');
+
+$handle = $vtp->Open( './template/'.$user['template'].'/identification.vtp' );
+// language
+$vtp->setGlobalVar( $handle, 'ident_title',      $lang['ident_title'] );
+$vtp->setGlobalVar( $handle, 'login',            $lang['login'] );
+$vtp->setGlobalVar( $handle, 'password',         $lang['password'] );
+$vtp->setGlobalVar( $handle, 'submit',           $lang['submit'] );
+$vtp->setGlobalVar( $handle, 'ident_guest_visit',$lang['ident_guest_visit'] );
+$vtp->setGlobalVar( $handle, 'ident_register',   $lang['ident_register'] );
+$vtp->setGlobalVar( $handle, 'ident_forgotten_password',
+                    $lang['ident_forgotten_password'] );
+// conf
+$vtp->setGlobalVar( $handle, 'mail_webmaster',   $conf['mail_webmaster'] );
+// user
+$vtp->setGlobalVar( $handle, 'user_template',    $user['template'] );
+initialize_template();
+//-------------------------------------------------------------- errors display
+if ( sizeof( $errors ) != 0 )
+{
+  $vtp->addSession( $handle, 'errors' );
+  foreach ( $errors as $error ) {
+    $vtp->addSession( $handle, 'li' );
+    $vtp->setVar( $handle, 'li.li', $error );
+    $vtp->closeSession( $handle, 'li' );
+  }
+  $vtp->closeSession( $handle, 'errors' );
+}
+//------------------------------------------------------------------ users list
+// retrieving all the users login
+$query = 'select username from '.PREFIX_TABLE.'users;';
+$result = mysql_query( $query );
+if ( mysql_num_rows ( $result ) < $conf['max_user_listbox'] )
+{
+  $vtp->addSession( $handle, 'select_field' );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    if ( $row['username'] != 'guest' )
+    {
+      $vtp->addSession( $handle, 'option' );
+      $vtp->setVar( $handle, 'option.option', $row['username'] );
+      $vtp->closeSession( $handle, 'option' );
+    }
+  }
+  $vtp->closeSession( $handle, 'select_field' );
+}
+else
+{
+  $vtp->addSession( $handle, 'text_field' );
+  $vtp->closeSession( $handle, 'text_field' );
+}
+//-------------------------------------------------------------- visit as guest
+if ( $conf['access'] == 'free' )
+{
+  $vtp->addSession( $handle, 'guest_visit' );
+  $vtp->closeSession( $handle, 'guest_visit' );
+}
+//---------------------------------------------------------------- registration
+if ( $conf['access'] == 'free' )
+{
+  $vtp->addSession( $handle, 'register' );
+  $vtp->closeSession( $handle, 'register' );
+}
+//----------------------------------------------------------- html code display
+$output.= $vtp->Display( $handle, 0 );
+include('include/page_tail.php');
+?>
Index: /branches/1.3/include/config.inc.php
===================================================================
--- /branches/1.3/include/config.inc.php	(revision 3252)
+++ /branches/1.3/include/config.inc.php	(revision 3252)
@@ -0,0 +1,87 @@
+<?php
+/***************************************************************************
+ *                              config.inc.php                             *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+unset( $conf, $page, $user, $lang );
+$conf = array();
+$page = array();
+$user = array();
+$lang = array();
+
+include_once( PREFIX_INCLUDE.'./include/functions.inc.php' );
+include( PREFIX_INCLUDE.'./include/vtemplate.class.php' );
+// How to change the order of display for images in a category ?
+//
+// You have to modify $conf['order_by'].
+// There are several fields that can order the display :
+//  - date_available : the date of the adding to the gallery
+//  - file : the name of the file
+// Once you've chosen which field(s) to use for ordering,
+// you must chose the ascending or descending order for each field.
+// examples :
+// 1. $conf['order_by'] = " order by date_available desc, file asc";
+//    will order pictures by date_available descending & by filename ascending
+// 2. $conf['order_by'] = " order by file asc";
+//    will only order pictures by file ascending
+//    without taking into account the date_available
+$conf['order_by'] = ' ORDER BY date_available DESC, file ASC';
+
+$conf['nb_image_row']       = array(4,5,6,7,8);
+$conf['nb_row_page']        = array(2,3,4,5,6,7,10,20,1000);
+$conf['slideshow_period']   = array(2,5,10);
+$conf['last_days']          = array(1,2,3,10,30,365);
+$conf['version']            = '1.3.4';
+$conf['site_url']           = 'http://www.phpwebgallery.net';
+$conf['forum_url']          = 'http://forum.phpwebgallery.net';
+$conf['picture_ext']        = array('jpg','JPG','gif','GIF','png','PNG');
+$conf['document_ext']       = array('doc','pdf','zip');
+$conf['top_number']         = 10;
+$conf['anti-flood_time']    = 60; // seconds between 2 comments : 0 to disable
+$conf['max_LOV_categories'] = 50;
+
+database_connection();
+// rertieving the configuration informations for site
+// $infos array is used to know the fields to retrieve in the table "config"
+// Each field becomes an information of the array $conf.
+// Example :
+//            prefix_thumbnail --> $conf['prefix_thumbnail']
+$infos = array( 'prefix_thumbnail', 'webmaster', 'mail_webmaster', 'access',
+                'session_id_size', 'session_keyword', 'session_time',
+                'max_user_listbox', 'show_comments', 'nb_comment_page',
+                'upload_available', 'upload_maxfilesize', 'upload_maxwidth',
+                'upload_maxheight', 'upload_maxwidth_thumbnail',
+                'upload_maxheight_thumbnail','log','comments_validation',
+                'comments_forall','authorize_cookies','mail_notification' );
+
+$query  = 'SELECT '.implode( ',', $infos );
+$query.= ' FROM '.PREFIX_TABLE.'config;';
+
+$row = mysql_fetch_array( mysql_query( $query ) );
+
+// affectation of each field of the table "config" to an information of the
+// array $conf.
+foreach ( $infos as $info ) {
+  if ( isset( $row[$info] ) ) $conf[$info] = $row[$info];
+  else                        $conf[$info] = '';
+  // If the field is true or false, the variable is transformed into a boolean
+  // value.
+  if ( $conf[$info] == 'true' or $conf[$info] == 'false' )
+  {
+    $conf[$info] = get_boolean( $conf[$info] );
+  }
+}
+?>
Index: /branches/1.3/include/functions.inc.php
===================================================================
--- /branches/1.3/include/functions.inc.php	(revision 3252)
+++ /branches/1.3/include/functions.inc.php	(revision 3252)
@@ -0,0 +1,468 @@
+<?php
+/***************************************************************************
+ *                             functions.inc.php                           *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+include( PREFIX_INCLUDE.'./include/functions_user.inc.php' );
+include( PREFIX_INCLUDE.'./include/functions_session.inc.php' );
+include( PREFIX_INCLUDE.'./include/functions_category.inc.php' );
+include( PREFIX_INCLUDE.'./include/functions_xml.inc.php' );
+include( PREFIX_INCLUDE.'./include/functions_group.inc.php' );
+
+//----------------------------------------------------------- generic functions
+
+// get_enums returns an array containing the possible values of a enum field
+// in a table of the database.
+function get_enums( $table, $field )
+{
+  // retrieving the properties of the table. Each line represents a field :
+  // columns are 'Field', 'Type'
+  $result=mysql_query("desc $table");
+  while ( $row = mysql_fetch_array( $result ) ) 
+  {
+    // we are only interested in the the field given in parameter for the
+    // function
+    if ( $row['Field']==$field )
+    {
+      // retrieving possible values of the enum field
+      // enum('blue','green','black')
+      $option = explode( ',', substr($row['Type'], 5, -1 ) );
+      for ( $i = 0; $i < sizeof( $option ); $i++ )
+      {
+        // deletion of quotation marks
+        $option[$i] = str_replace( "'", '',$option[$i] );
+      }                 
+    }
+  }
+  mysql_free_result( $result );
+  return $option;
+}
+
+// get_boolean transforms a string to a boolean value. If the string is
+// "false" (case insensitive), then the boolean value false is returned. In
+// any other case, true is returned.
+function get_boolean( $string )
+{
+  $boolean = true;
+  if ( preg_match( '/^false$/i', $string ) )
+  {
+    $boolean = false;
+  }
+  return $boolean;
+}
+
+// array_remove removes a value from the given array if the value existed in
+// this array.
+function array_remove( $array, $value )
+{
+  $output = array();
+  foreach ( $array as $v ) {
+    if ( $v != $value ) array_push( $output, $v );
+  }
+  return $output;
+}
+
+// The function get_moment returns a float value coresponding to the number
+// of seconds since the unix epoch (1st January 1970) and the microseconds
+// are precised : e.g. 1052343429.89276600
+function get_moment()
+{
+  $t1 = explode( ' ', microtime() );
+  $t2 = explode( '.', $t1[0] );
+  $t2 = $t1[1].'.'.$t2[1];
+  return $t2;
+}
+
+// The function get_elapsed_time returns the number of seconds (with 3
+// decimals precision) between the start time and the end time given.
+function get_elapsed_time( $start, $end )
+{
+  return number_format( $end - $start, 3, '.', ' ').' s';
+}
+
+// - The replace_space function replaces space and '-' characters
+//   by their HTML equivalent  &nbsb; and &minus;
+// - The function does not replace characters in HTML tags
+// - This function was created because IE5 does not respect the
+//   CSS "white-space: nowrap;" property unless space and minus
+//   characters are replaced like this function does.
+// - Example :
+//                 <div class="foo">My friend</div>
+//               ( 01234567891111111111222222222233 )
+//               (           0123456789012345678901 )
+// becomes :
+//             <div class="foo">My&nbsp;friend</div>
+function replace_space( $string )
+{
+  //return $string;
+  $return_string = '';
+  // $remaining is the rest of the string where to replace spaces characters
+  $remaining = $string;
+  // $start represents the position of the next '<' character
+  // $end   represents the position of the next '>' character
+  $start = 0;
+  $end = 0;
+  $start = strpos ( $remaining, '<' ); // -> 0
+  $end   = strpos ( $remaining, '>' ); // -> 16
+  // as long as a '<' and his friend '>' are found, we loop
+  while ( is_numeric( $start ) and is_numeric( $end ) )
+  {
+    // $treatment is the part of the string to treat
+    // In the first loop of our example, this variable is empty, but in the
+    // second loop, it equals 'My friend'
+    $treatment = substr ( $remaining, 0, $start );
+    // Replacement of ' ' by his equivalent '&nbsp;'
+    $treatment = str_replace( ' ', '&nbsp;', $treatment );
+    $treatment = str_replace( '-', '&minus;', $treatment );
+    // composing the string to return by adding the treated string and the
+    // following HTML tag -> 'My&nbsp;friend</div>'
+    $return_string.= $treatment.substr( $remaining, $start, $end-$start+1 );
+    // the remaining string is deplaced to the part after the '>' of this
+    // loop
+    $remaining = substr ( $remaining, $end + 1, strlen( $remaining ) );
+    $start = strpos ( $remaining, '<' );
+    $end   = strpos ( $remaining, '>' );
+  }
+  $treatment = str_replace( ' ', '&nbsp;', $remaining );
+  $treatment = str_replace( '-', '&minus;', $treatment );
+  $return_string.= $treatment;
+
+  return $return_string;
+}
+
+// get_extension returns the part of the string after the last "."
+function get_extension( $filename )
+{
+  return substr( strrchr( $filename, '.' ), 1, strlen ( $filename ) );
+}
+
+// get_filename_wo_extension returns the part of the string before the last
+// ".".
+// get_filename_wo_extension( 'test.tar.gz' ) -> 'test.tar'
+function get_filename_wo_extension( $filename )
+{
+  return substr( $filename, 0, strrpos( $filename, '.' ) );
+}
+
+/**
+ * returns an array contening sub-directories
+ *
+ * @param string $dir
+ * @return array
+ */
+function get_dirs( $directory )
+{
+  $sub_dirs = array();
+
+  if ( $opendir = opendir( $directory ) )
+  {
+    while ( $file = readdir ( $opendir ) )
+    {
+      if ( $file != '.' and $file != '..' and is_dir ( $directory.'/'.$file ) )
+      {
+        array_push( $sub_dirs, $file );
+      }
+    }
+  }
+  return $sub_dirs;
+}
+
+// The get_picture_size function return an array containing :
+//      - $picture_size[0] : final width
+//      - $picture_size[1] : final height
+// The final dimensions are calculated thanks to the original dimensions and
+// the maximum dimensions given in parameters.  get_picture_size respects
+// the width/height ratio
+function get_picture_size( $original_width, $original_height,
+                           $max_width, $max_height )
+{
+  $width = $original_width;
+  $height = $original_height;
+  $is_original_size = true;
+                
+  if ( $max_width != "" )
+  {
+    if ( $original_width > $max_width )
+    {
+      $width = $max_width;
+      $height = floor( ( $width * $original_height ) / $original_width );
+    }
+  }
+  if ( $max_height != "" )
+  {
+    if ( $original_height > $max_height )
+    {
+      $height = $max_height;
+      $width = floor( ( $height * $original_width ) / $original_height );
+      $is_original_size = false;
+    }
+  }
+  if ( is_numeric( $max_width ) and is_numeric( $max_height )
+       and $max_width != 0 and $max_height != 0 )
+  {
+    $ratioWidth = $original_width / $max_width;
+    $ratioHeight = $original_height / $max_height;
+    if ( ( $ratioWidth > 1 ) or ( $ratioHeight > 1 ) )
+    {
+      if ( $ratioWidth < $ratioHeight )
+      { 
+        $width = floor( $original_width / $ratioHeight );
+        $height = $max_height;
+      }
+      else
+      { 
+        $width = $max_width; 
+        $height = floor( $original_height / $ratioWidth );
+      }
+      $is_original_size = false;
+    }
+  }
+  $picture_size = array();
+  $picture_size[0] = $width;
+  $picture_size[1] = $height;
+  return $picture_size;
+}
+//-------------------------------------------- PhpWebGallery specific functions
+
+// get_languages retourne un tableau contenant tous les languages
+// disponibles pour PhpWebGallery
+function get_languages( $rep_language )
+{
+  $languages = array();
+  $i = 0;
+  if ( $opendir = opendir ( $rep_language ) )
+  {
+    while ( $file = readdir ( $opendir ) )
+    {
+      if ( is_file ( $rep_language.$file )
+           and $file != "index.php"
+           and strrchr ( $file, "." ) == ".php" )
+      {
+        $languages[$i++] =
+          substr ( $file, 0, strlen ( $file )
+                   - strlen ( strrchr ( $file, "." ) ) );
+      }
+    }
+  }
+  return $languages;
+}
+
+/**
+ * replaces the $search into <span style="$style">$search</span> in the
+ * given $string.
+ *
+ * case insensitive replacements, does not replace characters in HTML tags
+ *
+ * @param string $string
+ * @param string $search
+ * @param string $style
+ * @return string
+ */
+function add_style( $string, $search, $style )
+{
+  //return $string;
+  $return_string = '';
+  $remaining = $string;
+
+  $start = 0;
+  $end = 0;
+  $start = strpos ( $remaining, '<' );
+  $end   = strpos ( $remaining, '>' );
+  while ( is_numeric( $start ) and is_numeric( $end ) )
+  {
+    $treatment = substr ( $remaining, 0, $start );
+    $treatment = preg_replace( '/('.$search.')/i',
+                               '<span style="'.$style.'">\\0</span>',
+                               $treatment );
+    $return_string.= $treatment.substr( $remaining, $start, $end-$start+1 );
+    $remaining = substr ( $remaining, $end + 1, strlen( $remaining ) );
+    $start = strpos ( $remaining, '<' );
+    $end   = strpos ( $remaining, '>' );
+  }
+  $treatment = preg_replace( '/('.$search.')/i',
+                             '<span style="'.$style.'">\\0</span>',
+                             $remaining );
+  $return_string.= $treatment;
+                
+  return $return_string;
+}
+
+// replace_search replaces a searched words array string by the search in
+// another style for the given $string.
+function replace_search( $string, $search )
+{
+  $words = explode( ',', $search );
+  $style = 'background-color:white;color:red;';
+  foreach ( $words as $word ) {
+    $string = add_style( $string, $word, $style );
+  }
+  return $string;
+}
+
+function database_connection()
+{
+  include( PREFIX_INCLUDE.'./include/mysql.inc.php' );
+  define( 'PREFIX_TABLE', $prefixeTable );
+
+  @mysql_connect( $cfgHote, $cfgUser, $cfgPassword )
+    or die ( "Could not connect to server" );
+  @mysql_select_db( $cfgBase )
+    or die ( "Could not connect to database" );
+}
+
+function pwg_log( $file, $category, $picture = '' )
+{
+  global $conf, $user;
+
+  if ( $conf['log'] )
+  {
+    $query = 'insert into '.PREFIX_TABLE.'history';
+    $query.= ' (date,login,IP,file,category,picture) values';
+    $query.= " (".time().", '".$user['username']."'";
+    $query.= ",'".$_SERVER['REMOTE_ADDR']."'";
+    $query.= ",'".$file."','".$category."','".$picture."');";
+    mysql_query( $query );
+  }
+}
+
+function templatize_array( $array, $global_array_name, $handle )
+{
+  global $vtp, $lang, $page, $user, $conf;
+
+  foreach ( $array as $value ) {
+  if (isset(${$global_array_name}[$value]))
+    $vtp->setGlobalVar( $handle, $value, ${$global_array_name}[$value] );
+  }
+}
+
+// format_date returns a formatted date for display. The date given in
+// argument can be a unixdate (number of seconds since the 01.01.1970) or an
+// american format (2003-09-15). By option, you can show the time. The
+// output is internationalized.
+//
+// format_date( "2003-09-15", 'us', true ) -> "Monday 15 September 2003 21:52"
+function format_date( $date, $type = 'us', $show_time = false )
+{
+  global $lang;
+
+  switch ( $type )
+  {
+  case 'us' :
+    list( $year,$month,$day ) = explode( '-', $date );
+    $unixdate = mktime(0,0,0,$month,$day,$year);
+    break;
+  case 'unix' :
+    $unixdate = $date;
+    break;
+  }
+  $formated_date = $lang['day'][date( "w", $unixdate )];
+  $formated_date.= date( " j ", $unixdate );
+  $formated_date.= $lang['month'][date( "n", $unixdate )];
+  $formated_date.= date( ' Y', $unixdate );
+  if ( $show_time )
+  {
+    $formated_date.= date( ' G:i', $unixdate );
+  }
+
+  return $formated_date;
+}
+
+// notify sends a email to every admin of the gallery
+function notify( $type, $infos = '' )
+{
+  global $conf;
+
+  $headers = 'From: '.$conf['webmaster'].' <'.$conf['mail_webmaster'].'>'."\n";
+  $headers.= 'Reply-To: '.$conf['mail_webmaster']."\n";
+  $headers.= 'X-Mailer: PhpWebGallery, PHP '.phpversion();
+
+  $options = '-f '.$conf['mail_webmaster'];
+  // retrieving all administrators
+  $query = 'SELECT username,mail_address,language';
+  $query.= ' FROM '.PREFIX_TABLE.'users';
+  $query.= " WHERE status = 'admin'";
+  $query.= ' AND mail_address IS NOT NULL';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $to = $row['mail_address'];
+    $isadmin = false;
+    include( PREFIX_INCLUDE.'./language/'.$row['language'].'.php' );
+    $content = $lang['mail_hello']."\n\n";
+    switch ( $type )
+    {
+    case 'upload' :
+      $subject = $lang['mail_new_upload_subject'];
+      $content.= $lang['mail_new_upload_content'];
+      break;
+    case 'comment' :
+      $subject = $lang['mail_new_comment_subject'];
+      $content.= $lang['mail_new_comment_content'];
+      break;
+    }
+    $infos = str_replace( '&nbsp;',  ' ', $infos );
+    $infos = str_replace( '&minus;', '-', $infos );
+    $content.= "\n\n".$infos;
+    $content.= "\n\n-- \nPhpWebGallery ".$conf['version'];
+    $content = wordwrap( $content, 72 );
+    @mail( $to, $subject, $content, $headers, $options );
+  }
+}
+
+function pwg_write_debug()
+{
+  global $debug;
+  
+  $fp = @fopen( './log/debug.log', 'a+' );
+  fwrite( $fp, "\n\n" );
+  fwrite( $fp, $debug );
+  fclose( $fp );
+}
+
+function pwg_query( $query )
+{
+  global $count_queries,$queries_time;
+
+  $start = get_moment();
+  $output = '';
+  
+  $count_queries++;
+  $output.= '<br /><br />['.$count_queries.'] '.$query;
+  $result = mysql_query( $query );
+  $time = get_moment() - $start;
+  $queries_time+= $time;
+  $output.= '<b>('.number_format( $time, 3, '.', ' ').' s)</b>';
+  $output.= '('.number_format( $queries_time, 3, '.', ' ').' s)';
+
+  // echo $output;
+  
+  return $result;
+}
+
+function pwg_debug( $string )
+{
+  global $debug,$t2,$count_queries;
+
+  $now = explode( ' ', microtime() );
+  $now2 = explode( '.', $now[0] );
+  $now2 = $now[1].'.'.$now2[1];
+  $time = number_format( $now2 - $t2, 3, '.', ' ').' s';
+  $debug.= '['.$time.', ';
+  $debug.= $count_queries.' queries] : '.$string;
+  $debug.= "\n";
+}
+?>
Index: /branches/1.3/include/functions_category.inc.php
===================================================================
--- /branches/1.3/include/functions_category.inc.php	(revision 3252)
+++ /branches/1.3/include/functions_category.inc.php	(revision 3252)
@@ -0,0 +1,666 @@
+<?php
+/***************************************************************************
+ *                         functions_category.inc.php                      *
+ *                            --------------------                         *
+ *   application          : PhpWebGallery 1.3 <http://phpwebgallery.net>   *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+function check_restrictions( $category_id )
+{
+  global $user,$lang;
+
+  if ( in_array( $category_id, $user['restrictions'] ) )
+  {
+    echo '<div style="text-align:center;">'.$lang['access_forbiden'].'<br />';
+    echo '<a href="'.add_session_id( './category.php' ).'">';
+    echo $lang['thumbnails'].'</a></div>';
+    exit();
+  }
+}
+
+// the check_cat_id function check whether the $cat is a right parameter :
+//  - $cat is numeric and corresponds to a category in the database
+//  - $cat equals 'fav' (for favorites)
+//  - $cat equals 'search' (when the result of a search is displayed)
+function check_cat_id( $cat )
+{
+  global $page;
+
+  unset( $page['cat'] );
+  if ( isset( $cat ) )
+  {
+    if ( isset( $page['plain_structure'][$cat] ) )
+    {
+      $page['cat'] = $cat;
+    }
+    else if ( is_numeric( $cat ) )
+    {
+      $query = 'SELECT id';
+      $query.= ' FROM '.PREFIX_TABLE.'categories';
+      $query.= ' WHERE id = '.$cat;
+      $query.= ';';
+      $result = mysql_query( $query );
+      if ( mysql_num_rows( $result ) != 0 )
+      {
+        $page['cat'] = $cat;
+      }
+    }
+    if ( $cat == 'fav'
+         or $cat == 'search'
+         or $cat == 'most_visited'
+         or $cat == 'best_rated'
+         or $cat == 'recent' )
+    {
+      $page['cat'] = $cat;
+    }
+  }
+}
+
+function get_user_plain_structure()
+{
+  global $page,$user;
+  
+  $infos = array( 'name','id','uc.date_last','nb_images','dir','id_uppercat',
+                  'rank','site_id','nb_sub_categories','uppercats');
+  
+  $query = 'SELECT '.implode( ',', $infos );
+  $query.= ' FROM '.PREFIX_TABLE.'categories AS c';
+//  $query.= ' ,'.PREFIX_TABLE.'user_category AS uc';
+  $query.= ' INNER JOIN '.PREFIX_TABLE.'user_category AS uc';
+  $query.= ' ON c.id = uc.category_id';
+  $query.= ' WHERE user_id = '.$user['id'];
+  if ( $page['expand'] != 'all' )
+  {
+    $query.= ' AND (id_uppercat is NULL';
+    if ( count( $page['tab_expand'] ) > 0 )
+    {
+      $query.= ' OR id_uppercat IN ('.$page['expand'].')';
+    }
+    $query.= ')';
+  }
+  if ( $user['forbidden_categories'] != '' )
+  {
+    $query.= ' AND id NOT IN ';
+    $query.= '('.$user['forbidden_categories'].')';
+  }
+//  $query.= ' AND c.id = uc.category_id';
+  $query.= ' ORDER BY id_uppercat ASC, rank ASC';
+  $query.= ';';
+
+  $plain_structure = array();
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $category = array();
+    foreach ( $infos as $info ) {
+      if ( $info == 'uc.date_last' )
+      {
+        if ( isset( $row['date_last'] ) and $row['date_last'] != '' )
+        {
+          list($year,$month,$day) = explode( '-', $row['date_last'] );
+          $category['date_last'] = mktime(0,0,0,$month,$day,$year);
+        }
+      }
+      else if ( isset( $row[$info] ) ) $category[$info] = $row[$info];
+      else                             $category[$info] = '';
+    }
+    $plain_structure[$row['id']] = $category;
+  }
+
+  return $plain_structure;
+}
+
+function create_user_structure( $id_uppercat )
+{
+  global $page;
+
+  if ( !isset( $page['plain_structure'] ) )
+    $page['plain_structure'] = get_user_plain_structure();
+
+  $structure = array();
+  $ids = get_user_subcat_ids( $id_uppercat );
+  foreach ( $ids as $id ) {
+    $category = $page['plain_structure'][$id];
+    $category['subcats'] = create_user_structure( $id );
+    array_push( $structure, $category );
+  }
+  return $structure;
+}
+
+function get_user_subcat_ids( $id_uppercat )
+{
+  global $page;
+
+  $ids = array();
+  foreach ( $page['plain_structure'] as $id => $category ) {
+    if ( $category['id_uppercat'] == $id_uppercat ) array_push( $ids, $id );
+    else if ( count( $ids ) > 0 )                   return $ids;
+  }
+  return $ids;
+}
+
+// update_structure updates or add informations about each node of the
+// structure :
+//
+// 1. should the category be expanded in the menu ?
+// If the category has to be expanded (ie its id is in the
+// $page['tab_expand'] or all the categories must be expanded by default),
+// $category['expanded'] is set to true.
+//
+// 2. associated expand string
+// in the menu, there is a expand string (used in the URL) to tell which
+// categories must be expanded in the menu if this category is chosen
+function update_structure( $categories )
+{
+  global $page, $user;
+
+  $updated_categories = array();
+
+  foreach ( $categories as $category ) {
+    // update the "expanded" key
+    if ( $user['expand']
+         or $page['expand'] == 'all'
+         or in_array( $category['id'], $page['tab_expand'] ) )
+    {
+      $category['expanded'] = true;
+    }
+    else
+    {
+      $category['expanded'] = false;
+    }
+    // update the "expand_string" key
+    if ( $page['expand'] == 'all' )
+    {
+      $category['expand_string'] = 'all';
+    }
+    else
+    {
+      $tab_expand = $page['tab_expand'];
+      if ( in_array( $category['id'], $page['tab_expand'] ) )
+      {
+        // the expand string corresponds to the $page['tab_expand'] without
+        // the $category['id']
+        $tab_expand = array_diff( $page['tab_expand'],array($category['id']) );
+      }
+      else if ( $category['nb_sub_categories'] > 0 )
+      {
+        // we have this time to add the $category['id']...
+        $tab_expand = array_merge($page['tab_expand'],array($category['id']));
+      }
+      $category['expand_string'] = implode( ',', $tab_expand );
+    }
+    // recursive call
+    $category['subcats'] = update_structure( $category['subcats'] );
+    // adding the updated category
+    array_push( $updated_categories, $category );
+  }
+
+  return $updated_categories;
+}
+
+// count_images returns the number of pictures contained in the given
+// category represented by an array, in this array, we have (among other
+// things) :
+// $category['nb_images'] -> number of pictures in this category
+// $category['subcats'] -> array of sub-categories
+// count_images goes to the deepest sub-category to find the total number of
+// pictures contained in the given given category
+function count_images( $categories )
+{
+  return count_user_total_images();
+  $total = 0;
+  foreach ( $categories as $category ) {
+    $total+= $category['nb_images'];
+    $total+= count_images( $category['subcats'] );
+  }
+  return $total;
+}
+
+function count_user_total_images()
+{
+  global $user;
+
+  $query = 'SELECT SUM(nb_images) AS total';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  if ( count( $user['restrictions'] ) > 0 )
+    $query.= ' WHERE id NOT IN ('.$user['forbidden_categories'].')';
+  $query.= ';';
+  
+  $row = mysql_fetch_array( mysql_query( $query ) );
+
+  if ( !isset( $row['total'] ) ) $row['total'] = 0;
+
+  return $row['total'];
+}
+
+// variables :
+// $cat['comment']
+// $cat['dir']
+// $cat['dir']
+// $cat['name'] is an array :
+//      - $cat['name'][0] is the lowest cat name
+//      and
+//      - $cat['name'][n] is the most uppercat name findable
+// $cat['nb_images']
+// $cat['id_uppercat']
+// $cat['site_id']
+function get_cat_info( $id )
+{
+  global $page;
+
+  $infos = array( 'nb_images','id_uppercat','comment','site_id','galleries_url'
+                  ,'dir','date_last','uploadable','status','visible'
+                  ,'representative_picture_id','uppercats' );
+
+  $query = 'SELECT '.implode( ',', $infos );
+  $query.= ' FROM '.PREFIX_TABLE.'categories AS a';
+  $query.= ', '.PREFIX_TABLE.'sites AS b';
+  $query.= ' WHERE a.id = '.$id;
+  $query.= ' AND a.site_id = b.id';
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+
+  $cat = array();
+  // affectation of each field of the table "config" to an information of the
+  // array $cat.
+  foreach ( $infos as $info ) {
+    if ( isset( $row[$info] ) ) $cat[$info] = $row[$info];
+    else                        $cat[$info] = '';
+    // If the field is true or false, the variable is transformed into a
+    // boolean value.
+    if ( $cat[$info] == 'true' or $cat[$info] == 'false' )
+    {
+      $cat[$info] = get_boolean( $cat[$info] );
+    }
+  }
+  $cat['comment'] = nl2br( $cat['comment'] );
+
+  // first, we retrieve the names of upper categories in the default order
+  // (not the correct one automatically)
+  $buffers_name = array();
+
+  $query = 'SELECT id, name';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE id IN ('.$cat['uppercats'].')';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while( $row = mysql_fetch_array( $result ) )
+  {
+    $buffer_names[$row['id']] = $row['name'];
+  }
+
+  // then we reorder the names with the order given in the
+  // categories.uppercats database field
+  $cat['name'] = array();
+  
+  foreach ( explode( ',', $cat['uppercats'] ) as $id_uppercat ) {
+    array_push( $cat['name'], $buffer_names[$id_uppercat] );
+  }
+  
+  return $cat;
+}
+
+// get_complete_dir returns the concatenation of get_site_url and
+// get_local_dir
+// Example : "pets > rex > 1_year_old" is on the the same site as the
+// PhpWebGallery files and this category has 22 for identifier
+// get_complete_dir(22) returns "./galleries/pets/rex/1_year_old/"
+function get_complete_dir( $category_id )
+{
+  return get_site_url( $category_id ).get_local_dir( $category_id );
+}
+
+// get_local_dir returns an array with complete path without the site url
+// Example : "pets > rex > 1_year_old" is on the the same site as the
+// PhpWebGallery files and this category has 22 for identifier
+// get_local_dir(22) returns "pets/rex/1_year_old/"
+function get_local_dir( $category_id )
+{
+  global $page;
+
+  $uppercats = '';
+  $local_dir = '';
+
+  if ( isset( $page['plain_structure'][$category_id]['uppercats'] ) )
+  {
+    $uppercats = $page['plain_structure'][$category_id]['uppercats'];
+  }
+  else
+  {
+    $query = 'SELECT uppercats';
+    $query.= ' FROM '.PREFIX_TABLE.'categories';
+    $query.= ' WHERE id = '.$category_id;
+    $query.= ';';
+    $row = mysql_fetch_array( mysql_query( $query ) );
+    $uppercats = $row['uppercats'];
+  }
+
+  $upper_array = explode( ',', $uppercats );
+
+  $database_dirs = array();
+  $query = 'SELECT id,dir';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE id IN ('.$uppercats.')';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while( $row = mysql_fetch_array( $result ) )
+  {
+    $database_dirs[$row['id']] = $row['dir'];
+  }
+  foreach ( $upper_array as $id ) {
+    $local_dir.= $database_dirs[$id].'/';
+  }
+
+  return $local_dir;
+}
+
+// retrieving the site url : "http://domain.com/gallery/" or
+// simply "./galleries/"
+function get_site_url( $category_id )
+{
+  global $page;
+
+  $query = 'SELECT galleries_url';
+  $query.= ' FROM '.PREFIX_TABLE.'sites AS s,'.PREFIX_TABLE.'categories AS c';
+  $query.= ' WHERE s.id = c.site_id';
+  $query.= ' AND c.id = '.$category_id;
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  return $row['galleries_url'];
+}
+
+// The function get_cat_display_name returns a string containing the list
+// of upper categories to the root category from the lowest category shown
+// example : "anniversaires - fete mere 2002 - animaux - erika"
+// You can give two parameters :
+//   - $separation : the string between each category name " - " for example
+//   - $style : the style of the span tag for the lowest category,
+//     "font-style:italic;" for example
+function get_cat_display_name( $array_cat_names, $separation,
+                               $style, $replace_space = true )
+{
+  $output = '';
+  foreach ( $array_cat_names as $i => $name ) {
+    if ( $i > 0 ) $output.= $separation;
+    if ( $i < count( $array_cat_names ) - 1 or $style == '')
+      $output.= $name;
+    else
+      $output.= '<span style="'.$style.'">'.$name.'</span>';
+  }
+  if ( $replace_space ) return replace_space( $output );
+  else                  return $output;
+}
+
+// initialize_category initializes ;-) the variables in relation
+// with category :
+// 1. calculation of the number of pictures in the category
+// 2. determination of the SQL query part to ask to find the right category
+//    $page['where'] is not the same if we are in
+//       - simple category
+//       - search result
+//       - favorites displaying
+//       - most visited pictures
+//       - best rated pictures
+//       - recent pictures
+// 3. determination of the title of the page
+// 4. creation of the navigation bar
+function initialize_category( $calling_page = 'category' )
+{
+  pwg_debug( 'start initialize_category' );
+  global $page,$lang,$user,$conf;
+
+  if ( isset( $page['cat'] ) )
+  {
+    // $page['nb_image_page'] is the number of picture to display on this page
+    // By default, it is the same as the $user['nb_image_page']
+    $page['nb_image_page'] = $user['nb_image_page'];
+    // $url is used to create the navigation bar
+    $url = './category.php?cat='.$page['cat'];
+    if ( isset($page['expand']) ) $url.= '&amp;expand='.$page['expand'];
+    // simple category
+    if ( is_numeric( $page['cat'] ) )
+    {
+      $result = get_cat_info( $page['cat'] );
+      $page['comment']        = $result['comment'];
+      $page['cat_dir']        = $result['dir'];
+      $page['cat_name']       = $result['name'];
+      $page['cat_nb_images']  = $result['nb_images'];
+      $page['cat_site_id']    = $result['site_id'];
+      $page['cat_uploadable'] = $result['uploadable'];
+      $page['uppercats']      = $result['uppercats'];
+      $page['title'] = get_cat_display_name( $page['cat_name'],' - ','',false);
+      $page['where'] = ' WHERE category_id = '.$page['cat'];
+    }
+    else
+    {
+      if ( $page['cat'] == 'search' or $page['cat'] == 'most_visited'
+           or $page['cat'] == 'recent' or $page['cat'] == 'best_rated' )
+      {
+        // we must not show pictures of a forbidden category
+        if ( $user['forbidden_categories'] != '' )
+        {
+          $forbidden = ' category_id NOT IN ';
+          $forbidden.= '('.$user['forbidden_categories'].')';
+        }
+      }
+      // search result
+      if ( $page['cat'] == 'search' )
+      {
+        $page['title'] = $lang['search_result'];
+        if ( $calling_page == 'picture' )
+        {
+          $page['title'].= ' : <span style="font-style:italic;">';
+          $page['title'].= $_GET['search']."</span>";
+        }
+
+        $page['where'] = ' WHERE (';
+        $fields = array( 'file', 'name', 'comment', 'keywords' );
+        $words = explode( ',', $_GET['search'] );
+        $sql_search = array();
+        foreach ( $words as $i => $word ) {
+          // if the user searchs any of the words, the where statement must
+          // be :
+          // field1 LIKE '%$word1%' OR field2 LIKE '%$word1%' ...
+          // OR field1 LIKE '%$word2%' OR field2 LIKE '%$word2%' ...
+          if ( $_GET['mode'] == 'OR' )
+          {
+            if ( $i != 0 ) $page['where'].= ' OR';
+            foreach ( $fields as $j => $field ) {
+              if ( $j != 0 ) $page['where'].= ' OR';
+              $page['where'].= ' '.$field." LIKE '%".$word."%'";
+            }
+          }
+          // if the user searchs all the words :
+          // ( field1 LIKE '%$word1%' OR field2 LIKE '%$word1%' )
+          // AND ( field1 LIKE '%$word2%' OR field2 LIKE '%$word2%' )
+          else if ( $_GET['mode'] == 'AND' )
+          {
+            if ( $i != 0 ) $page['where'].= ' AND';
+            $page['where'].= ' (';
+            foreach ( $fields as $j => $field ) {
+              if ( $j != 0 ) $page['where'].= ' OR';
+              $page['where'].= ' '.$field." LIKE '%".$word."%'";
+            }
+            $page['where'].= ' )';
+          }
+        }
+        $page['where'].= ' )';
+        if ( isset( $forbidden ) ) $page['where'].= ' AND '.$forbidden;
+
+        $query = 'SELECT COUNT(DISTINCT(id)) AS nb_total_images';
+        $query.= ' FROM '.PREFIX_TABLE.'images';
+        $query.= ' INNER JOIN '.PREFIX_TABLE.'image_category AS ic';
+        $query.= ' ON id = ic.image_id';
+        $query.= $page['where'];
+        $query.= ';';
+
+        $url.= '&amp;search='.$_GET['search'].'&amp;mode='.$_GET['mode'];
+      }
+      // favorites displaying
+      else if ( $page['cat'] == 'fav' )
+      {
+        $page['title'] = $lang['favorites'];
+
+        $page['where'] = ', '.PREFIX_TABLE.'favorites AS fav';
+        $page['where'].= ' WHERE user_id = '.$user['id'];
+        $page['where'].= ' AND fav.image_id = id';
+      
+        $query = 'SELECT COUNT(*) AS nb_total_images';
+        $query.= ' FROM '.PREFIX_TABLE.'favorites';
+        $query.= ' WHERE user_id = '.$user['id'];
+        $query.= ';';
+      }
+      // pictures within the short period
+      else if ( $page['cat'] == 'recent' )
+      {
+        $page['title'] = $lang['recent_cat_title'];
+        // We must find the date corresponding to :
+        // today - $conf['periode_courte']
+        $date = time() - 60*60*24*$user['short_period'];
+        $page['where'] = " WHERE date_available > '";
+        $page['where'].= date( 'Y-m-d', $date )."'";
+        if ( isset( $forbidden ) ) $page['where'].= ' AND '.$forbidden;
+
+        $query = 'SELECT COUNT(DISTINCT(id)) AS nb_total_images';
+        $query.= ' FROM '.PREFIX_TABLE.'images';
+        $query.= ' INNER JOIN '.PREFIX_TABLE.'image_category AS ic';
+        $query.= ' ON id = ic.image_id';
+        $query.= $page['where'];
+        $query.= ';';
+      }
+      // most visited pictures
+      else if ( $page['cat'] == 'most_visited' )
+      {
+        $page['title'] = $conf['top_number'].' '.$lang['most_visited_cat'];
+        
+        if ( isset( $forbidden ) ) $page['where'] = ' WHERE '.$forbidden;
+        else                       $page['where'] = '';
+        $conf['order_by'] = ' ORDER BY hit DESC, file ASC';
+        $page['cat_nb_images'] = $conf['top_number'];
+        if ( isset( $page['start'] )
+             and ($page['start']+$user['nb_image_page']>=$conf['top_number']))
+        {
+          $page['nb_image_page'] = $conf['top_number'] - $page['start'];
+        }
+      }
+
+      if ( isset($query))
+      {
+        $result = mysql_query( $query );
+        $row = mysql_fetch_array( $result );
+        $page['cat_nb_images'] = $row['nb_total_images'];
+      }
+    }
+    if ( $calling_page == 'category' )
+    {
+      $page['navigation_bar'] =
+        create_navigation_bar( $url, $page['cat_nb_images'], $page['start'],
+                               $user['nb_image_page'], 'back' );
+    }
+  }
+  else
+  {
+    $page['title'] = $lang['diapo_default_page_title'];
+  }
+  pwg_debug( 'end initialize_category' );
+}
+
+// get_non_empty_subcat_ids returns an array with sub-categories id
+// associated with their first non empty category id.
+//
+//                          example :
+//
+// - catname [cat_id]
+// - cat1 [1] -> given uppercat
+//   - cat1.1 [12] (empty)
+//     - cat1.1.1 [5] (empty)
+//     - cat1.1.2 [6]
+//   - cat1.2 [3]
+//   - cat1.3 [4]
+//
+// get_non_empty_sub_cat_ids will return :
+//   $ids[12] = 6;
+//   $ids[3]  = 3;
+//   $ids[4]  = 4;
+function get_non_empty_subcat_ids( $id_uppercat )
+{
+  global $user;
+
+  $ids = array();
+
+  $query = 'SELECT id,nb_images';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE id_uppercat ';
+  if ( !is_numeric( $id_uppercat ) ) $query.= 'is NULL';
+  else                               $query.= '= '.$id_uppercat;
+  // we must not show pictures of a forbidden category
+  if ( $user['forbidden_categories'] != '' )
+  {
+    $query.= ' AND id NOT IN ('.$user['forbidden_categories'].')';
+  }
+  $query.= ' ORDER BY rank';
+  $query.= ';';
+
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    // only categories with findable picture in any of its subcats is
+    // represented.
+    if ( ( $row['nb_images'] != 0 and $non_empty_cat = $row['id'] )
+         or $non_empty_cat = get_first_non_empty_cat_id( $row['id'] ) )
+    {
+      $ids[$row['id']] = $non_empty_cat;
+    }
+  }
+  return $ids;
+}
+
+// get_first_non_empty_cat_id returns the id of the first non empty
+// sub-category to the given uppercat. If no picture is found in any
+// subcategory, false is returned.
+function get_first_non_empty_cat_id( $id_uppercat )
+{
+  global $user;
+
+  $query = 'SELECT id,nb_images';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= ' WHERE id_uppercat = '.$id_uppercat;
+  // we must not show pictures of a forbidden category
+  if ( $user['forbidden_categories'] != '' )
+  {
+    $query.= ' AND id NOT IN ('.$user['forbidden_categories'].')';
+  }
+  $query.= ' ORDER BY RAND()';
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    if ( $row['nb_images'] > 0 )
+    {
+      return $row['id'];
+    }
+  }
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    // recursive call
+    if ( $subcat = get_first_non_empty_cat_id( $row['id'] ) )
+    {
+      return $subcat;
+    }
+  }
+  return false;
+}
+?>
Index: /branches/1.3/include/functions_group.inc.php
===================================================================
--- /branches/1.3/include/functions_group.inc.php	(revision 3252)
+++ /branches/1.3/include/functions_group.inc.php	(revision 3252)
@@ -0,0 +1,104 @@
+<?php
+/***************************************************************************
+ *                           functions_group.inc.php                       *
+ *                            --------------------                         *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+// get_group_restrictions returns an array containing all unaccessible
+// category ids.
+function get_group_restrictions( $group_id )
+{
+  // 1. retrieving ids of private categories
+  $query = 'SELECT id';
+  $query.= ' FROM '.PREFIX_TABLE.'categories';
+  $query.= " WHERE status = 'private'";
+  $query.= ';';
+  $result = mysql_query( $query );
+  $privates = array();
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    array_push( $privates, $row['id'] );
+  }
+  // 2. retrieving all authorized categories for the group
+  $authorized = array();
+  $query = 'SELECT cat_id';
+  $query.= ' FROM '.PREFIX_TABLE.'group_access';
+  $query.= ' WHERE group_id = '.$group_id;
+  $query.= ';';
+  $result = mysql_query( $query );
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    array_push( $authorized, $row['cat_id'] );
+  }
+
+  $forbidden = array();
+  foreach ( $privates as $private ) {
+    if ( !in_array( $private, $authorized ) )
+    {
+      array_push( $forbidden, $private );
+    }
+  }
+
+  return $forbidden;
+}
+
+// get_all_group_restrictions returns an array with ALL unaccessible
+// category ids, including sub-categories
+function get_all_group_restrictions( $group_id )
+{
+  $restricted_cats = get_group_restrictions( $group_id );
+  foreach ( $restricted_cats as $restricted_cat ) {
+    $sub_restricted_cats = get_subcats_id( $restricted_cat );
+    foreach ( $sub_restricted_cats as $sub_restricted_cat ) {
+      array_push( $restricted_cats, $sub_restricted_cat );
+    }
+  }
+  return $restricted_cats;
+}
+
+// The function is_group_allowed returns :
+//      - 0 : if the category is allowed with this $restrictions array
+//      - 1 : if this category is not allowed
+//      - 2 : if an uppercat category is not allowed
+function is_group_allowed( $category_id, $restrictions )
+{
+  $lowest_category_id = $category_id;
+                
+  $is_root = false;
+  while ( !$is_root and !in_array( $category_id, $restrictions ) )
+  {
+    $query = 'SELECT id_uppercat';
+    $query.= ' FROM '.PREFIX_TABLE.'categories';
+    $query.= ' WHERE id = '.$category_id;
+    $query.= ';';
+    $row = mysql_fetch_array( mysql_query( $query ) );
+    if ( !isset( $row['id_uppercat'] ) ) $row['id_uppercat'] = '';
+    if ( $row['id_uppercat'] == '' ) $is_root = true;
+    $category_id = $row['id_uppercat'];
+  }
+                
+  if ( in_array( $lowest_category_id, $restrictions ) )
+  {
+    return 1;
+  }
+  if ( in_array( $category_id, $restrictions ) )
+  {
+    return 2;
+  }
+  // this group is allowed to go in this category
+  return 0;
+}
+?>
Index: /branches/1.3/include/functions_session.inc.php
===================================================================
--- /branches/1.3/include/functions_session.inc.php	(revision 3252)
+++ /branches/1.3/include/functions_session.inc.php	(revision 3252)
@@ -0,0 +1,125 @@
+<?php
+/***************************************************************************
+ *                         functions_session.inc.php                       *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+// The function generate_key creates a string with pseudo random characters.
+// the size of the string depends on the $conf['session_id_size'].
+// Characters used are a-z A-Z and numerical values. Examples :
+//                    "Er4Tgh6", "Rrp08P", "54gj"
+// input  : none (using global variable)
+// output : $key
+function generate_key()
+{
+  global $conf;
+
+  $md5 = md5( substr( microtime(), 2, 6 ).$conf['session_keyword'] );
+  $init = '';
+  for ( $i = 0; $i < strlen( $md5 ); $i++ )
+  {
+    if ( is_numeric( $md5[$i] ) ) $init.= $md5[$i];
+  }
+  $init = substr( $init, 0, 8 );
+  mt_srand( $init );
+  $key = '';
+  for ( $i = 0; $i < $conf['session_id_size']; $i++ )
+  {
+    $c = mt_rand( 0, 2 );
+    if ( $c == 0 )      $key .= chr( mt_rand( 65, 90 ) );
+    else if ( $c == 1 ) $key .= chr( mt_rand( 97, 122 ) );
+    else                $key .= mt_rand( 0, 9 );
+  }
+  return $key;
+}
+
+// The function create_session finds a non-already-used session key and
+// returns it once found for the given user.
+function session_create( $username )
+{
+  global $conf;
+  // 1. searching an unused session key
+  $id_found = false;
+  while ( !$id_found )
+  {
+    $generated_id = generate_key();
+    $query = 'select id';
+    $query.= ' from '.PREFIX_TABLE.'sessions';
+    $query.= " where id = '".$generated_id."';";
+    $result = mysql_query( $query );
+    if ( mysql_num_rows( $result ) == 0 )
+    {
+      $id_found = true;
+    }
+  }
+  // 2. retrieving id of the username given in parameter
+  $query = 'select id';
+  $query.= ' from '.PREFIX_TABLE.'users';
+  $query.= " where username = '".$username."';";
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  $user_id = $row['id'];
+  // 3. inserting session in database
+  $expiration = $conf['session_time'] * 60 + time();
+  $query = 'insert into '.PREFIX_TABLE.'sessions';
+  $query.= ' (id,user_id,expiration,ip) values';
+  $query.= "('".$generated_id."','".$user_id;
+  $query.= "','".$expiration."','".$_SERVER['REMOTE_ADDR']."');";
+  mysql_query( $query );
+                
+  return $generated_id;
+}
+
+// add_session_id adds the id of the session to the string given in
+// parameter as $url. If the session id is the first parameter to the url,
+// it is preceded by a '?', else it is preceded by a '&amp;'. If the
+// parameter $redirect is set to true, '&' is used instead of '&'.
+function add_session_id( $url, $redirect = false )
+{
+  global $page, $user;
+
+  if ( $user['has_cookie'] ) return $url;
+
+  $amp = '&amp;';
+  if ( $redirect )
+  {
+    $amp = '&';
+  }
+  if ( !$user['is_the_guest'] )
+  {
+    if ( preg_match( '/\.php\?/',$url ) )
+    {
+      return $url.$amp.'id='.$page['session_id'];
+    }
+    else
+    {
+      return $url.'?id='.$page['session_id'];
+    }
+  }
+  else
+  {
+    return $url;
+  }
+}
+
+// cookie_path returns the path to use for the PhpWebGallery cookie.
+// If PhpWebGallery is installed on :
+// http://domain.org/meeting/gallery/category.php
+// cookie_path will return : "/meeting/gallery"
+function cookie_path()
+{
+  return substr($_SERVER['PHP_SELF'],0,strrpos( $_SERVER['PHP_SELF'],'/'));
+}
+?>
Index: /branches/1.3/include/functions_user.inc.php
===================================================================
--- /branches/1.3/include/functions_user.inc.php	(revision 3252)
+++ /branches/1.3/include/functions_user.inc.php	(revision 3252)
@@ -0,0 +1,228 @@
+<?php
+/***************************************************************************
+ *                           functions_user.inc.php                        *
+ *                            --------------------                         *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+// validate_mail_address verifies whether the given mail address has the
+// right format. ie someone@domain.com "someone" can contain ".", "-" or
+// even "_". Exactly as "domain". The extension doesn't have to be
+// "com". The mail address can also be empty.
+// If the mail address doesn't correspond, an error message is returned.
+function validate_mail_address( $mail_address )
+{
+  global $lang;
+
+  if ( $mail_address == '' )
+  {
+    return '';
+  }
+  $regex = '/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)*\.[a-z]+$/';
+  if ( !preg_match( $regex, $mail_address ) )
+  {
+    return $lang['reg_err_mail_address'];
+  }
+}
+
+function register_user( $login, $password, $password_conf,
+                        $mail_address, $status = 'guest' )
+{
+  global $lang;
+
+  $error = array();
+  $i = 0;
+  // login must not
+  //      1. be empty
+  //      2. start ou end with space character
+  //      3. include ' or " characters
+  //      4. be already used
+  if ( $login == '' )            $error[$i++] = $lang['reg_err_login1'];
+  if ( ereg( "^.* $", $login) )  $error[$i++] = $lang['reg_err_login2'];
+  if ( ereg( "^ .*$", $login ) ) $error[$i++] = $lang['reg_err_login3'];
+
+  if ( ereg( "'", $login ) or ereg( "\"", $login ) )
+    $error[$i++] = $lang['reg_err_login4'];
+  else
+  {
+    $query = 'SELECT id';
+    $query.= ' FROM '.PREFIX_TABLE.'users';
+    $query.= " WHERE username = '".$login."'";
+    $query.= ';';
+    $result = mysql_query( $query );
+    if ( mysql_num_rows($result) > 0 ) $error[$i++] = $lang['reg_err_login5'];
+  }
+  // given password must be the same as the confirmation
+  if ( $password != $password_conf ) $error[$i++] = $lang['reg_err_pass'];
+
+  $error_mail_address = validate_mail_address( $mail_address );
+  if ( $error_mail_address != '' ) $error[$i++] = $error_mail_address;
+
+  // if no error until here, registration of the user
+  if ( sizeof( $error ) == 0 )
+  {
+    // 1. retrieving default values, the ones of the user "guest"
+    $infos = array( 'nb_image_line', 'nb_line_page', 'language',
+                    'maxwidth', 'maxheight', 'expand', 'show_nb_comments',
+                    'short_period', 'long_period', 'template',
+                    'forbidden_categories' );
+    $query = 'SELECT ';
+    for ( $i = 0; $i < sizeof( $infos ); $i++ )
+    {
+      if ( $i > 0 ) $query.= ',';
+      $query.= $infos[$i];
+    }
+    $query.= ' FROM '.PREFIX_TABLE.'users';
+    $query.= " WHERE username = 'guest'";
+    $query.= ';';
+    $row = mysql_fetch_array( mysql_query( $query ) );
+    // 2. adding new user
+    $query = 'INSERT INTO '.PREFIX_TABLE.'users';
+    $query.= ' (';
+    $query.= ' username,password,mail_address,status';
+    for ( $i = 0; $i < sizeof( $infos ); $i++ )
+    {
+      $query.= ','.$infos[$i];
+    }
+    $query.= ') values (';
+    $query.= " '".$login."'";
+    $query.= ",'".md5( $password )."'";
+    if ( $mail_address != '' ) $query.= ",'".$mail_address."'";
+    else                       $query.= ',NULL';
+    $query.= ",'".$status."'";
+    foreach ( $infos as $info ) {
+      $query.= ',';
+      if ( !isset( $row[$info] ) ) $query.= 'NULL';
+      else                         $query.= "'".$row[$info]."'";
+    }
+    $query.= ');';
+    mysql_query( $query );
+    // 3. retrieving the id of the newly created user
+    $query = 'SELECT id';
+    $query.= ' FROM '.PREFIX_TABLE.'users';
+    $query.= " WHERE username = '".$login."';";
+    $row = mysql_fetch_array( mysql_query( $query ) );
+    $user_id = $row['id'];
+    // 4. adding access to the new user, the same as the user "guest"
+    $query = 'SELECT cat_id';
+    $query.= ' FROM '.PREFIX_TABLE.'user_access as ua';
+    $query.=      ','.PREFIX_TABLE.'users as u ';
+    $query.= ' where u.id = ua.user_id';
+    $query.= " and u.username = 'guest';";
+    $result = mysql_query( $query );
+    while( $row = mysql_fetch_array( $result ) )
+    {
+      $query = 'INSERT INTO '.PREFIX_TABLE.'user_access';
+      $query.= ' (user_id,cat_id) VALUES';
+      $query.= ' ('.$user_id.','.$row['cat_id'].');';
+      mysql_query ( $query );
+    }
+    // 5. associate new user to the same groups that the guest
+    $query = 'SELECT group_id';
+    $query.= ' FROM '.PREFIX_TABLE.'user_group AS ug';
+    $query.= ',     '.PREFIX_TABLE.'users      AS u';
+    $query.= " WHERE u.username = 'guest'";
+    $query.= ' AND ug.user_id = u.id';
+    $query.= ';';
+    $result = mysql_query( $query );
+    while( $row = mysql_fetch_array( $result ) )
+    {
+      $query = 'INSERT INTO '.PREFIX_TABLE.'user_group';
+      $query.= ' (user_id,group_id) VALUES';
+      $query.= ' ('.$user_id.','.$row['group_id'].')';
+      $query.= ';';
+      mysql_query ( $query );
+    }
+    // 6. has the same categories informations than guest
+    $query = 'SELECT category_id,date_last,nb_sub_categories';
+    $query.= ' FROM '.PREFIX_TABLE.'user_category AS uc';
+    $query.= ',     '.PREFIX_TABLE.'users         AS u';
+    $query.= " WHERE u.username = 'guest'";
+    $query.= ' AND uc.user_id = u.id';
+    $query.= ';';
+    $result = mysql_query( $query );
+    while( $row = mysql_fetch_array( $result ) )
+    {
+      $query = 'INSERT INTO '.PREFIX_TABLE.'user_category';
+      $query.= ' (user_id,category_id,date_last,nb_sub_categories) VALUES';
+      $query.= ' ('.$user_id.','.$row['category_id'];
+      $query.= ",";
+      if (!isset($row['date_last']) or $row['date_last'] == '')
+      {
+        $query.= 'NULL';
+      }
+      else
+      {
+        $query.= "'".$row['date_last']."'";
+      }
+      $query.= ",".$row['nb_sub_categories'].')';
+      $query.= ';';
+      mysql_query ( $query );
+    }
+  }
+  return $error;
+}
+
+function update_user( $user_id, $mail_address, $status,
+                      $use_new_password = false, $password = '' )
+{
+  $error = array();
+  $i = 0;
+  
+  $error_mail_address = validate_mail_address( $mail_address );
+  if ( $error_mail_address != '' )
+  {
+    $error[$i++] = $error_mail_address;
+  }
+
+  if ( sizeof( $error ) == 0 )
+  {
+    $query = 'UPDATE '.PREFIX_TABLE.'users';
+    $query.= " SET status = '".$status."'";
+    if ( $use_new_password )
+    {
+      $query.= ", password = '".md5( $password )."'";
+    }
+    $query.= ', mail_address = ';
+    if ( $mail_address != '' )
+    {
+      $query.= "'".$mail_address."'";
+    }
+    else
+    {
+      $query.= 'NULL';
+    }
+    $query.= ' WHERE id = '.$user_id;
+    $query.= ';';
+    mysql_query( $query );
+  }
+  return $error;
+}
+
+function check_login_authorization()
+{
+  global $user,$lang,$conf,$page;
+
+  if ( $user['is_the_guest'])
+  {
+  if ( $conf['access'] == 'restricted' || (isset($page['cat']) && $page['cat'] == 'fav' ) )
+  {
+    echo '<div style="text-align:center;">'.$lang['only_members'].'<br />';
+    echo '<a href="./identification.php">'.$lang['ident_title'].'</a></div>';
+    exit();
+  }
+  }
+}
+?>
Index: /branches/1.3/include/functions_xml.inc.php
===================================================================
--- /branches/1.3/include/functions_xml.inc.php	(revision 3252)
+++ /branches/1.3/include/functions_xml.inc.php	(revision 3252)
@@ -0,0 +1,119 @@
+<?php
+/***************************************************************************
+ *                           functions_xml.inc.php                         *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+//------------------------------------------------------------------ constantes
+define( 'ATT_REG', '\w+' );
+define( 'VAL_REG', '[^"]*' );
+//------------------------------------------------------------------- functions
+// getContent returns the content of a tag
+//
+// example : getContent( "<name>Joe</name>" ) returns "Joe"
+//
+// It also works with strings containing themself sub-tags :
+// <perso><name>Jean</name><firstname>Billie</fisrtname></perso> ->
+// <name>Jean</name><firstname>Billie</firstname>
+function getContent( $element )
+{
+  // deleting start of the tag
+  $content = preg_replace( '/^<[^>]+>/', '', $element );
+  // deleting end of the tag
+  $content = preg_replace( '/<\/[^>]+>$/', '', $content );
+  // replacing multiple instance of space character
+  $content = preg_replace( '/\s+/', ' ', $content );
+
+  return $content;
+}
+
+// The function get Attribute returns the value corresponding to the
+// attribute $attribute for the tag $element.
+function getAttribute( $element, $attribute )
+{
+  $regex = '/^<\w+[^>]*'.$attribute.'\s*=\s*"('.VAL_REG.')"/i';
+  if ( preg_match( $regex, $element, $out ) ) return $out[1];
+  else return '';
+}
+
+function deprecated_getAttribute( $element, $attribute )
+{
+  // Retrieving string with tag name and all attributes
+  $regex = '/^<\w+( '.ATT_REG.'="'.VAL_REG.'")*/';
+  preg_match( $regex, $element, $out );
+
+  // Splitting string for retrieving separately attributes
+  // and corresponding values
+  $regex = '/('.ATT_REG.')="('.VAL_REG.')"/';
+  preg_match_all( $regex, $out[0], $out );
+
+  // Searching and returning the value of the requested attribute
+  for ( $i = 0; $i < sizeof( $out[0] ); $i++ )
+  {
+    if ( $out[1][$i] == $attribute )
+    {
+      return $out[2][$i];
+    }
+  }
+  return '';
+}
+	
+// The function getChild returns the first child
+// exemple : getChild( "<table><tr>XXX</tr><tr>YYY</tr></table>", "tr" )
+//           returns "<tr>XXX</tr>"
+function getChild( $document, $node )
+{
+  $regex = '/<'.$node.'(\s+'.ATT_REG.'="'.VAL_REG.'")*';
+  $regex.= '(\s*\/>|>.*<\/'.$node.'>)/U';
+
+  preg_match( $regex, $document, $out );
+  return $out[0];
+}
+
+// getChildren returns a list of the children identified by the $node
+// example : 
+//     getChild( "<table><tr>XXX</tr><tr>YYY</tr></table>", "tr" )
+//     returns an array with :
+//          $array[0] equals "<tr>XXX</tr>"
+//          $array[1] equals "<tr>YYY</tr>"
+function getChildren( $document, $node )
+{
+  $regex = '/<'.$node.'(\s+'.ATT_REG.'="'.VAL_REG.'")*';
+  $regex.= '(\s*\/>|>.*<\/'.$node.'>)/U';
+
+  preg_match_all( $regex, $document, $out );
+  return $out[0];
+}
+	
+// get_CodeXML places the content of a text file in a PHP variable and
+// return it. If the file can't be opened, returns false.
+function getXmlCode( $filename )
+{
+  $file = fopen( $filename, 'r' );
+  if ( !$file )
+  {
+    return false;
+  }
+  while ( !feof( $file ) )
+  {
+    $xml_content .= fgets( $file, 1024 );
+  }
+  fclose( $file );
+  $xml_content = str_replace( "\n", '', $xml_content );
+  $xml_content = str_replace( "\t", '', $xml_content );
+
+  return $xml_content;
+}
+?>
Index: /branches/1.3/include/index.php
===================================================================
--- /branches/1.3/include/index.php	(revision 3252)
+++ /branches/1.3/include/index.php	(revision 3252)
@@ -0,0 +1,17 @@
+<?php
+/***************************************************************************
+ *                                  index.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+$url = '../category.php';
+header( 'Request-URI: '.$url );  
+header( 'Content-Location: '.$url );  
+header( 'Location: '.$url );
+exit();
+?>
Index: /branches/1.3/include/init.inc.php
===================================================================
--- /branches/1.3/include/init.inc.php	(revision 3252)
+++ /branches/1.3/include/init.inc.php	(revision 3252)
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************************
+ *                               init.inc.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+// determine the initial instant to indicate the generation time of this page
+$t1 = explode( ' ', microtime() );
+$t2 = explode( '.', $t1[0] );
+$t2 = $t1[1].'.'.$t2[1];
+
+define( 'PREFIX_INCLUDE', '' );
+
+include_once( './include/config.inc.php' );
+include_once( './include/user.inc.php' );
+
+// calculation of the number of picture to display per page
+$user['nb_image_page'] = $user['nb_image_line'] * $user['nb_line_page'];
+
+$isadmin = false;
+include_once( './language/'.$user['language'].'.php' );
+// displaying the username in the language of the connected user, instead of
+// "guest" as you can find in the database
+if ( $user['is_the_guest'] ) $user['username'] = $lang['guest'];
+include_once( './template/'.$user['template'].'/htmlfunctions.inc.php' );
+?>
Index: /branches/1.3/include/page_header.php
===================================================================
--- /branches/1.3/include/page_header.php	(revision 3252)
+++ /branches/1.3/include/page_header.php	(revision 3252)
@@ -0,0 +1,47 @@
+<?php
+/***************************************************************************
+ *                              page_header.php                            *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+//
+// Start output of page
+//
+$vtp = new VTemplate;
+$handle = $vtp->Open( './template/'.$user['template'].'/header.vtp' );
+$vtp->setGlobalVar( $handle, 'charset', $lang['charset'] );
+$vtp->setGlobalVar( $handle, 'style',
+                    './template/'.$user['template'].'/default.css');
+
+// refresh
+if ( isset( $refresh ) and $refresh > 0 and isset( $url_link ) )
+{
+  $vtp->addSession( $handle, 'refresh' );
+  $vtp->setVar( $handle, 'refresh.time', $refresh );
+  $url = $url_link.'&amp;slideshow='.$refresh;
+  $vtp->setVar( $handle, 'refresh.url', add_session_id( $url ) );
+  $vtp->closeSession( $handle, 'refresh' );
+}
+
+$vtp->setGlobalVar( $handle, 'title', $title );
+$vtp->setVarF( $handle, 'header',
+               './template/'.$user['template'].'/header.htm' );
+
+//
+// Generate the page
+//
+
+$output = $vtp->Display( $handle, 0 );
+?>
Index: /branches/1.3/include/page_tail.php
===================================================================
--- /branches/1.3/include/page_tail.php	(revision 3252)
+++ /branches/1.3/include/page_tail.php	(revision 3252)
@@ -0,0 +1,37 @@
+<?php
+/***************************************************************************
+ *                              page_footer.php                            *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+$handle = $vtp->Open( './template/'.$user['template'].'/footer.vtp' );
+//------------------------------------------------------------- generation time
+$time = get_elapsed_time( $t2, get_moment() );
+$vtp->setGlobalVar( $handle, 'time', $time );
+
+$vtp->setGlobalVar( $handle, 'generation_time', $lang['generation_time'] );
+$vtp->setGlobalVar( $handle, 'version', $conf['version'] );
+$vtp->setGlobalVar( $handle, 'site_url', $conf['site_url'] );
+$vtp->setVarF( $handle, 'footer',
+               './template/'.$user['template'].'/footer.htm' );
+
+//
+// Generate the page
+//
+
+$output.= $vtp->Display( $handle, 0 );
+echo $output;
+?>
Index: /branches/1.3/include/user.inc.php
===================================================================
--- /branches/1.3/include/user.inc.php	(revision 3252)
+++ /branches/1.3/include/user.inc.php	(revision 3252)
@@ -0,0 +1,119 @@
+<?php
+/***************************************************************************
+ *                               user.inc.php                              *
+ *                            ------------------                           *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+// retrieving user informations
+// $infos array is used to know the fields to retrieve in the table "users"
+// Each field becomes an information of the array $user.
+// Example :
+//            status --> $user['status']
+$infos = array( 'id', 'username', 'mail_address', 'nb_image_line',
+                'nb_line_page', 'status', 'language', 'maxwidth',
+                'maxheight', 'expand', 'show_nb_comments', 'short_period',
+                'long_period', 'template', 'forbidden_categories' );
+
+$query_user = 'SELECT '.implode( ',', $infos );
+$query_user.= ' FROM '.PREFIX_TABLE.'users';
+$query_done = false;
+$user['is_the_guest'] = false;
+
+// cookie deletion if administrator don't authorize them anymore
+if ( !$conf['authorize_cookies'] and isset( $_COOKIE['id'] ) )
+{
+  setcookie( 'id', '', 0, cookie_path() );
+  $url = 'category.php';
+  header( 'Request-URI: '.$url );  
+  header( 'Content-Location: '.$url );  
+  header( 'Location: '.$url );
+  exit();
+}
+
+$user['has_cookie'] = false;
+if     ( isset( $_GET['id']    ) ) $session_id = $_GET['id'];
+elseif ( isset( $_COOKIE['id'] ) )
+{
+  $session_id = $_COOKIE['id'];
+  $user['has_cookie'] = true;
+}
+
+if ( isset( $session_id )
+     and ereg( "^[0-9a-zA-Z]{".$conf['session_id_size']."}$", $session_id ) )
+{
+  $page['session_id'] = $session_id;
+  $query = 'SELECT user_id,expiration,ip';
+  $query.= ' FROM '.PREFIX_TABLE.'sessions';
+  $query.= " WHERE id = '".$page['session_id']."'";
+  $query.= ';';
+  $result = mysql_query( $query );
+  if ( mysql_num_rows( $result ) > 0 )
+  {
+    $row = mysql_fetch_array( $result );
+    if ( !$user['has_cookie'] )
+    {
+      if ( $row['expiration'] < time() )
+      {
+        // deletion of the session from the database,
+        // because it is out-of-date
+        $delete_query = 'DELETE FROM '.PREFIX_TABLE.'sessions';
+        $delete_query.= " WHERE id = '".$page['session_id']."'";
+        $delete_query.= ';';
+        mysql_query( $delete_query );
+      }
+      else if ( $_SERVER['REMOTE_ADDR'] == $row['ip'] )
+      {
+        $query_user .= ' WHERE id = '.$row['user_id'];
+        $query_done = true;
+      }
+    }
+    else
+    {
+      $query_user .= ' WHERE id = '.$row['user_id'];
+      $query_done = true;
+    }
+  }
+}
+if ( !$query_done )
+{
+  $query_user .= ' WHERE id = 2';
+  $user['is_the_guest'] = true;
+}
+$query_user .= ';';
+$row = mysql_fetch_array( mysql_query( $query_user ) );
+
+// affectation of each value retrieved in the users table into a variable
+// of the array $user.
+foreach ( $infos as $info ) {
+  if ( isset( $row[$info] ) )
+  {
+    // If the field is true or false, the variable is transformed into a
+    // boolean value.
+    if ( $row[$info] == 'true' or $row[$info] == 'false' )
+      $user[$info] = get_boolean( $row[$info] );
+    else
+      $user[$info] = $row[$info];    
+  }
+  else
+  {
+    $user[$info] = '';
+  }
+}
+
+// special for $user['restrictions'] array
+$user['restrictions'] = explode( ',', $user['forbidden_categories'] );
+if ( $user['restrictions'][0] == '' ) $user['restrictions'] = array();
+?>
Index: /branches/1.3/include/vtemplate.class.php
===================================================================
--- /branches/1.3/include/vtemplate.class.php	(revision 3252)
+++ /branches/1.3/include/vtemplate.class.php	(revision 3252)
@@ -0,0 +1,592 @@
+<?php
+/*****************************************************************
+ *			VIRTUAL-TEMPLATE
+ *
+ * Version : 1.3.2 Base Edition ( Decembre 2003 ) build 1
+ *
+ * Address : http://vtemplate.sourceforge.net
+ * 
+ * Authors: 
+ *   + THIEBAUT Jean-Baptiste(J.Baptiste@leweby.com)  -  http://www.leweby.com .
+ *   + CAMPANA François (fc@netouaibe.com).
+ * Licence: GPL.
+ * 
+ * 
+ *
+ *			  
+ *****************************************************************/ 
+// to make it work on nexen.net
+set_magic_quotes_runtime(0);
+
+if ( !isset( $DEFINE_VTEMPLATE ) )
+{
+  define("ALL",1);
+  // Tag d'ouverture des variables : vous pouvez changer ce paramètre.
+  define("VARTAG","{#");
+  define("VTEMPLATE_VERSION","1.3.1");
+  define("VTEMPLATE_TYPE","BA");
+  define("VTEMPLATE_BUILD","6");
+  
+  class Err {
+    var $msg;
+    var $titre;
+
+    function error( $errno, $arg = "", $code = 0, $disp = 0 ) {
+      // Gestion des erreurs
+      switch ( $errno )
+      {
+      case 1:
+        $this->titre="Erreur de session n° $code";
+        $this->msg = "La zone $arg est déjà ouverte.Avant d'ajouter une session sur cette zone, vous devez la fermer à l'aide de la fonction closeSession().<br>"	;
+        break;
+      case 2:
+        $this->titre="Erreur de session n° $code";
+        $this->msg = "Vous tentez de fermer une session de la zone $arg alors qu'aucune session pour cette zone n'existe.Pour ouvrir une session, utilisez la fonction addSession().<br>";
+        break;
+      case 3:
+        $this->titre="Erreur de session n° $code";
+	$var = $arg[1];
+	$zone = $arg[0];
+        $this->msg = "Vous essayez de valoriser la variable $var sans avoir créer de session de la zone $zone.Utilisez la fonction addSession() pour créer une session, puis setVar pour valoriser une variable.<br>";
+        break;
+      case 4:
+        $this->titre="Erreur de session n° $code";
+	$var = $arg[1];
+	$zone = $arg[0];
+        $this->msg = "La variable $var que vous souhaitez valoriser n'existe pas dans la zone $zone.<br>";
+        break;
+      case 5:
+        $this->titre="Erreur de parsing n° $code";
+        $this->msg = "Vous utilisez des caractère non autorisés pour déclarer vos zones.Vous pouvez utiliser tous les caractères à l'exception de \'{\' , \'#\' \'}\' et \'|\'.<br>";
+        break;
+      case 6:
+        $this->titre="Erreur de parsing n° $code";
+        $this->msg = "Vous ne pouvez pas utiliser le même nom ($arg)de zone plusieurs fois.<br>";
+        break;
+      case 7:
+        $this->titre="Erreur de parsing n° $code";
+        $this->msg = "Vous avez oublié de fermer la zone $arg.<br>";
+        break;
+      case 8:
+        $this->titre="Erreur de traitement n° $code";
+        $this->msg = "Le fichier template $arg est introuvable.<br>";
+        break;
+      case 9:
+        $this->titre="Erreur de traitement n° $code";
+        $this->msg = "Impossible d'ouvrir le fichier $arg.Vérifiez les droits de ce fichier.<br>";
+        break;
+      case 10:
+        $this->titre="Erreur de traitement n° $code";
+        $this->msg = "Impossible de lire le fichier template $arg.<br>";
+        break;
+      case 11:
+        $this->titre="Erreur de traitement n° $code";
+        $this->msg = "La zone $arg est introuvable.Vérifiez la syntaxe de cette zone.<br>"; 
+        break;
+      case 12:  
+        $this->titre="Erreur de traitement n° $code";
+        $this->msg = "La variable $arg est introuvable .Vérifiez la syntaxe de la variable.<br>";	
+        break;
+      case 13:
+        $this->titre="Erreur de traitement n° $code";
+        $this->msg = "L'identifiant de fichier spécifié n'existe pas.Vérifiez les fonctions Open() de votre script.<br>";
+        break;  
+      case 14:
+        $this->titre="Erreur de traitement n° $code";
+	$var = $arg[1];
+	$file = $arg[0];
+        $this->msg = "La variable $var dans le fichier $file est introuvable.Vérifiez la syntaxe de la variable.<br>";	
+        break;  
+      case 15:
+        $this->titre="Erreur de traitement n° $code";
+	$var = $arg[2];
+	$zone = $arg[1];
+	$fichier = $arg[0];
+        $this->msg = "La variable $var dans la zone $zone du fichier $fichier est introuvable.Vérifiez la syntaxe de la variable et du nom de la zone.<br>";
+        break; 
+      default:
+        $this->titre = "Erreur inconnue $code";	 
+        $this->msg = "Veuillez le rapporter aux auteurs de la classe.";
+      }
+      $this->titre .= ": <br>";
+      if ( $disp )
+      {
+	$web = "Pour plus d'informations, consultez la <a href=\"http://www.virtual-solution.net/vtemplate/docs/debug-mod.php?version=".VTEMPLATE_VERSION."&build=".VTEMPLATE_BUILD."&type=".VTEMPLATE_TYPE."&error=$code\" target=\"_blank\">doc en ligne</a>";
+	echo "<font face=verdana size=2 color=red><u>$this->titre</u><i>$this->msg</i>$web<br><br></font>";
+      }
+      return -1;
+    }
+  } // Fin classe
+
+  class Session extends err {
+    var $name;		// Name of the session
+    var $globalvar = array();  // List of global variable of the session
+    var $varlist = array();  // List of var in this session
+    var $subzone = array(); // list of sub-zone
+    var $temp; // Generated code for the current session
+    var $generated = NULL; // The final code
+    var $source; // Source code
+    var $used=0; // Indicates if the session contain used variable
+    var $stored; // Give the filename were is stored the session
+
+    function Session( $name, $source, $stored ) {
+      $this->name = $name;
+      $this->source = $source;
+      $this->stored = $stored;
+      $this->parseVar();
+    }
+
+    function parseVar(){
+      // Récupération des noms des variables
+      $regle = "|".VARTAG."(.*)}|sU"; 
+      preg_match_all ($regle,$this->source,$var1);
+      // Création du tableau de variable  à partir de la liste parsée.
+      $this->varlist=@array_merge((array)$var[1],(array)$var1[1]);
+      return 1;
+    }
+
+    function init(){
+      if ( $this->used )
+        return $this->error(1,array($this->stored,$this->name),"SESSION1",1);
+      // Reset generated code
+      $this->temp = $this->source;
+      $this->used = 1;
+    }
+
+    function closeSession(){
+      // Check if the zone has been used.    
+      if ( !$this->used )
+        return $this->error(2,array($this->stored,$this->name),"SESSION2",1);
+      // Set Globals vars.
+      $this->generateCode();
+      $this->used=0;
+      return 1;
+    }
+
+    function reset(){
+      $this->used = 0;
+      $this->generated = NULL;
+      return 1;
+    }
+
+    function addSubZone( &$subzone ) {
+      $this->subzone[$subzone->name] = &$subzone;
+      return 1;
+    }
+
+    function setVar($varname,$value){
+      if ( !$this->used )
+        return $this->error(3,array($this->stored,$this->name,$varname),
+                            "SESSION3",1);
+      if (!in_array($varname,$this->varlist))
+        return $this->error(4,array($this->name,$varname),"SESSION4",1);
+      $regle = "(\\".VARTAG."$varname\})";
+      $this->temp = preg_replace($regle,$value,$this->temp);
+      return 1;
+    }
+
+    function dispVar(){
+      echo "Liste variables de $this->name:<br>";
+      foreach ( $this->varlist as $vars ) echo "$vars <br>";
+    }
+
+    function setGlobalVar($varname,$value){
+      $set = 0;
+      if (in_array($varname,$this->varlist ) )
+      {
+        // Replace the var into this session 
+        $this->globalvar[$varname]=$value;   
+        $set = 1;
+      }
+      // Replace the var into sub zones
+      foreach(array_keys($this->subzone) as $subzone){
+        $set = $this->subzone[$subzone]->setGlobalVar($varname,$value) || $set;
+      }
+      return $set;
+    }
+
+    function replaceGlobalVar(){
+      if ( count($this->globalvar) )
+      {
+        foreach($this->globalvar as $varname => $value) {
+          $regle = "(\\".VARTAG."$varname\})";
+          $this->temp = preg_replace($regle,$value,$this->temp);
+        }
+      }
+    }
+
+
+    function generateCode(){
+      if ($this->used == 0) return $this->generated;
+      // Replace global var.
+      if ( count($this->globalvar) ) $this->replaceGlobalVar();
+      // Replace all unused variable by ""
+      $regle = "|\\".VARTAG."([^}]*)\}|";
+      $this->temp = preg_replace($regle,"",$this->temp);
+      // Generate the subzone(s) code
+      if(count($this->subzone)){
+        foreach(array_keys($this->subzone) as $subzone){
+          $text = ($this->subzone[$subzone]->used) ? $this->subzone[$subzone]->generateCode() : $this->subzone[$subzone]->generated;
+          $this->temp = preg_replace("(\|$subzone\|)",$text,$this->temp); 	
+          $this->subzone[$subzone]->reset();
+        }
+      }
+      $this->generated .= $this->temp;
+      return $this->generated;
+    }
+
+    function inVarList($varname){
+      return in_array($varname,$this->varlist);
+    }
+  } // Fin classe
+
+  class VTemplate_Private extends Err{
+    /**************************************** 
+     *	        Private Class.              *
+     ****************************************/
+
+    var $sources=array(); // Sources des zones issues
+                          // de la premiere partie du parsing.
+    var $sessions=array(); // Tableau de sessions
+    var $v_global=array(); // Globla var array.
+
+/****************************************************************
+	    Parsing Functions for Template files.  ( PF 1.0 )
+ ****************************************************************/
+
+    function getNom($code){
+      // Retourne le premier nom de zone qu'il trouve dans le code
+      preg_match("(<!--VTP_([^()]+)-->)sU",$code,$reg);   
+      // Tester la présence des caratère invalides dans le nom ( | et {});
+      if ( @count( explode("|",$reg[1]))>1
+           || @count(explode("{",$reg[1]))>1
+           || @count(explode("}",$reg[1]))>1 )
+        exit($this->error(5,$reg[1],"PARSE1",1));
+      return @$reg[1];
+    }
+
+    function endTag($code,$nom){
+      // Renvoie TRUE(1) si le tag de fermeture est présent.
+      preg_match("(<!--/VTP_$nom-->)sU",$code,$reg);
+      return ($reg[0]!="<!--/VTP_$nom-->") ? 0 : 1;
+    }
+
+    function getSource($code,$nom,$type=0){
+      // Retourne le source de la zone de nom $nom
+      preg_match_all ("(<!--VTP_$nom-->(.*)<!--/VTP_$nom-->)sU",$code,$reg);
+      return $reg[$type][0];
+    }
+
+    function parseZone($code_source,$nom_zone="|root|"){
+      // Fonction récursive de parsing du fichier template
+      // Vérification que la zone n'existe pas
+      if (isset($this->sources[$nom_zone]))
+        exit($this->error(6,$nom_zone,"PARSE2",1));
+      // Enregistrement du code source
+      $this->sources[$nom_zone]["source"]=$code_source;
+      // Rappel de la fonction pour chaque fils.
+      while ($nom_fils=$this->getNom($this->sources[$nom_zone]["source"]) ) {
+        // Vérification que le tag de fin est présent.
+        if (!$this->endTag($code_source,$nom_fils))
+          exit($this->error(7,$nom_fils,"PARSE3",1));
+        // Parse le fils
+        $this->parseZone($this->getSource($this->sources[$nom_zone]["source"],$nom_fils,1),$nom_fils);
+        // Enregistre le nom du fils dans la liste des fils
+        $this->sources[$nom_zone]["fils"][]=$nom_fils;
+        // Remplace le code du fils dans le source du père
+        $this->sources[$nom_zone]["source"]=str_replace(
+          $this->getSource($this->sources[$nom_zone]["source"],$nom_fils,0),
+          "|$nom_fils|",
+          $this->sources[$nom_zone]["source"]);
+        // Teste si la zone $nom_fils n'existe pas plusieurs fois
+        // dans la zone $nom_zone
+        if (count(explode("|$nom_fils|",$this->sources[$nom_zone]["source"]))>2)
+          exit($this->error(6,$nom_fils,"PARSE4",1));
+      } // fin While
+      return 1;
+    }
+
+/****************************************************************
+	    Session Management functions ( SMF 1.0 )
+ ****************************************************************/
+
+    function createSession($handle,$zone = "|root|"){
+      // Create a new session of the zone
+      $this->sessions[$handle][$zone] = new Session($zone,$this->sources[$zone]["source"],$this->file_name[$handle]);
+      // Create sub-zone
+      if (@count($this->sources[$zone]["fils"])){
+        foreach($this->sources[$zone]["fils"] as $subzone){	  
+          $this->createSession($handle,$subzone);
+          $this->sessions[$handle][$zone]->addSubZone($this->sessions[$handle][$subzone]);
+        }
+      }
+      //end createSession
+    }
+
+
+/****************************************************************
+	    Global Variable Management Functions ( GVMF 1.0 )
+ ****************************************************************/
+
+    function setGZone($handle,$zone,$var,$value){
+      // Define Global var for $zone and its sub-zone.
+      // Set global value to $zone vars.
+      return $this->sessions[$handle][$zone]->setGlobalVar($var,$value);
+    }
+
+    function setGFile($handle,$var,$value) {
+      return $this->sessions[$handle]["|root|"]->setGlobalVar($var,$value);
+    }
+
+    function setGAll($var,$value){
+      $declare = 0;
+      $this->v_global[$var]=$value;
+      if (is_array($this->sessions)){
+        foreach($this->sessions as $handle => $v){
+          $declare = $this->setGFile($handle,$var,$value) || $declare;
+        }	
+      } 
+      return $declare;
+    }
+
+    function setGOpened($handle){
+// Set Global var into the opened file
+      foreach($this->v_global as $name => $val){
+        $this->setGFile($handle,$name,$val);
+      }
+      return 1;
+    }
+ 
+// Fin VTemplate_Private
+  }
+
+
+  class VTemplate extends VTemplate_Private{
+/****************************************
+ *	   Public Class.		*
+ * ***************************************/
+
+
+/****************************************************************
+	    Core Functions 
+*****************************************************************/
+
+
+    function Open($nomfichier){
+// Ouverture d'un fichier source et retourne le handle de ce fichier
+// Création du handle:
+      $handle =  "{".count($this->sessions)."}" ;
+
+
+// Récupération du source à parser
+      if (!@file_exists($nomfichier)) return $this->error(8,$nomfichier,"TTT1",1);
+      if (!$f_id=@fopen($nomfichier,"r")) return $this->error(9,$nomfichier,"TTT2",1);
+      if (!$source=@fread($f_id, filesize($nomfichier))) return $this->error(10,$nomfichier,"TTT3",1);
+      clearstatcache();
+      fclose($f_id);
+
+// Store the filename
+      $this->file_name[$handle]=$nomfichier;
+
+// Parse les zones
+      $this->parseZone($source);
+
+// Création du tableau de session
+      $this->createSession($handle);
+
+//Nettoyage des variables temporaires
+      $this->sources=NULL;
+
+// Set global var.
+      $this->setGOpened($handle);
+
+      $this->addSession($handle);
+      return $handle;
+    }
+
+    function newSession($handle="{0}",$nom_zone = "|root|"){
+      if ( $this->sessions[$handle][$nom_zone]->used ) $this->closeSession($handle,$nom_zone);
+      $this->addSession($handle,$nom_zone,$cache,$time,$num_session);
+      return 1;
+    }
+
+    function addSession($handle="{0}",$nom_zone = "|root|"){
+      // Does the zone exist ?
+      if(!isset($this->sessions[$handle][$nom_zone])) return $this->error(11,array($nom_zone,$this->file_name[$handle]),"TTT4",1);   
+      $this->sessions[$handle][$nom_zone]->init();
+      return 1;
+    }
+
+    function closeSession($handle="{0}",$nom_zone = "|root|"){ 
+// Close the current session and all his sub-session
+      // Check if the zone exists.
+      if(!isset($this->sessions[$handle][$nom_zone])) return $this->error(11,array($nom_zone,$this->file_name[$handle]),"TTT5",1);
+      // Closing sub-zone
+      $this->sessions[$handle][$nom_zone]->closeSession();	
+      return 1;
+    }
+
+    function setGlobalVar($arg1,$arg2,$arg3){
+      if ($arg1 == 1){
+        if (!$this->setGAll($arg2,$arg3)) return $this->error(12,$arg2,"TTT6",1);
+        return 1; 
+      }
+      if (!isset($this->sessions[$arg1])) return $this->error(13,$arg1,"TTT7",1);
+      $tab=explode(".",$arg2);
+      if (count($tab)==1){
+        if (!$this->setGFile($arg1,$arg2,$arg3)) return $this->error(14,array($this->file_name[$arg1],$arg2),"TTT8",1);
+      }
+      else if (count($tab==2)){
+        if (!isset($this->sessions[$arg1][$tab[0]])) return $this->error(11,array($tab[0],$this->file_name[$arg1],"TTT9",1));
+        if (!$this->setGZone($arg1,$tab[0],$tab[1],$arg3)) return $this->error(15,array($this->file_name[$arg1],$tab[0],$tab[1]),"TTT10",1);
+      }
+      return 1;
+    }
+
+    function setVar($handle,$zone_var,$val){
+      // Fill the variable
+      $tab=explode(".",$zone_var);
+      if(count($tab)==2){
+        $zone=$tab[0];
+        $var=$tab[1];
+      }
+      else
+      {
+        $zone="|root|";
+        $var=$tab[0];
+      }
+
+      // Teste l'existence de la zone dans la liste
+      if (!isset($this->sessions[$handle][$zone])) return $this->error(11,array($this->file_name[$handle],$zone),"TTT11",1);
+
+      //Enregistre la variable
+      return $this->sessions[$handle][$zone]->setVar($var,$val);
+    }
+
+    function Parse($handle_dest,$zone_var_dest,$handle_source,$zone_source="|root|"){
+      if($this->sessions[$handle_source][$zone_source]->used == 1) $this->closeSession($handle_source,$zone_source);
+      $this->setVar($handle_dest,$zone_var_dest, $this->sessions[$handle_source][$zone_source]->generated);
+    }
+
+    function setVarF($handle,$zone_var,$file){
+// Fonction qui ouvre le fichier file et copie ce qu'il y a dedans dans une variable.
+      $tab=explode(".",$zone_var);
+
+// Récupération nom de la zone et de la variable.
+      if(count($tab)==2){
+        $zone=$tab[0];
+        $var=$tab[1];
+      }
+      else
+      {
+        $zone="|root|";
+        $var=$tab[0];
+      }
+// Teste l'existence de la zone dans la liste
+      if (!is_object($this->sessions[$handle][$zone])) return $this->error(11,array($handle,$zone),"TTT12",1);
+
+      // Récupération du source à lire
+      if (!@file_exists($file)) return $this->error(8,$file,"TTT13",1);
+      if (!$f_id=@fopen($file,"r")) return $this->error(9,$file,"TTT14",1);
+      if (!$val=@fread($f_id, filesize($file))) return $this->error(10,$file,"TTT15",1);
+      clearstatcache();
+      fclose($f_id);
+
+//Enregistre la variable
+      return $this->sessions[$handle][$zone]->setVar($var,$val);
+    }
+
+
+
+
+
+    function isZone($handle, $zone="|root|") 
+      { 
+        return isset($this->sessions[$handle][$zone]) ; 
+      } 
+
+    function Display($handle="{0}",$display=1,$zone="|root|"){
+      $this->closeSession($handle,$zone);
+      $c_genere = $this->sessions[$handle][$zone]->generated; 
+	
+      if ($display) echo $c_genere; else return ($c_genere);
+    }
+//fonction complementaire version BETA
+
+/*
+ * 
+ On peut l'utiliser : 
+- SetVarTab($array): tout les couples clef/valeur sont valorisées 
+- SetVarTab($array,$index) seuls les couples clef/valeur dont la clef est dans le tableau index ou dont la valeur == $index (si pas tableau) 
+Si $index contient ou est une clef de type zone.clef, la clef sera extraite du texte est servira d'index pour $array 
+
+Vincent 
+*/
+
+    function setVarTab($handle,$zones,$index = array()){ 
+      if (is_array($index)) 
+      { 
+        if (count($index)>0) 
+        { 
+          reset($index); 
+          while (list (, $key) = each ($index)) 
+          { 
+            $tab=explode(".",$key); 
+            if(count($tab)==2){ 
+              $var=$tab[1]; 
+            } 
+            else 
+            { 
+              $var=$tab[0]; 
+            } 
+            setVar($handle,$key,$zones[$var]); 
+          } 
+        } 
+        else 
+        { 
+          reset($zones); 
+          while (list ($key, $val) = each ($zones)) 
+          { 
+            setVar($handle,$key,$val); 
+          } 
+        } 
+      } 
+      else 
+      { 
+        setVar($handle,$index,$zones[$index]); 
+      } 
+    } 
+
+    function setGlobalVarTab($handle,$zones,$index = array()){ 
+      if (is_array($index)) 
+      { 
+        if (count($index)>0) 
+        { 
+          reset($index); 
+          while (list (, $key) = each ($index)) 
+          { 
+            $tab=explode(".",$key); 
+            if ( count( $tab ) == 2 ) $var=$tab[1]; 
+            else                      $var=$tab[0]; 
+            setGlobalVar( $handle, $key, $zones[$var] );
+          } 
+        } 
+        else 
+        { 
+          reset($zones); 
+          while (list ($key, $val) = each ($zones)) 
+          {
+            GlobalVar($handle,$key,$val); 
+          } 
+        } 
+      } 
+      else 
+      {
+        setBlobalVar($handle,$index,$zones[$index]); 
+      } 
+    } 
+    // End VTemplate
+  }
+  $DEFINE_VTEMPLATE = 1;
+}
+?>
Index: /branches/1.3/index.php
===================================================================
--- /branches/1.3/index.php	(revision 3252)
+++ /branches/1.3/index.php	(revision 3252)
@@ -0,0 +1,39 @@
+<?php
+/***************************************************************************
+ *                                  index.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+define( 'PREFIX_INCLUDE', '' );
+include_once( './include/functions.inc.php' );
+database_connection();
+// retrieving configuration informations
+$query = 'SELECT access';
+$query.= ' FROM '.PREFIX_TABLE.'config;';
+$row = mysql_fetch_array( mysql_query( $query ) );
+if ( $row['access'] == 'restricted' )
+{
+  if ( isset( $_COOKIE['id'] ) ) $url = 'category';
+  else                           $url = 'identification';
+}
+else                             $url = 'category';
+// redirection
+$url.= '.php';
+header( 'Request-URI: '.$url );  
+header( 'Content-Location: '.$url );  
+header( 'Location: '.$url );
+exit();
+?>
Index: /branches/1.3/language/catala.php
===================================================================
--- /branches/1.3/language/catala.php	(revision 3252)
+++ /branches/1.3/language/catala.php	(revision 3252)
@@ -0,0 +1,550 @@
+<?php
+/***************************************************************************
+ *                                catala.php                               *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *   translation   : Xolda <xolda@hotmail.com>                             *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+$lang['only_members'] = 'Accés restringit a membres';
+$lang['invalid_pwd'] = '¡Contrasenya errònia!';
+$lang['access_forbiden'] = 'No està autoritzat per accedir a aquesta plana';
+$lang['submit'] = 'Validar';
+$lang['login'] = 'usuari';
+$lang['password'] = 'contrasenya';
+$lang['new'] = 'nova';
+$lang['delete'] = 'esborrar';
+$lang['category'] = 'categoria';
+$lang['thumbnail'] = 'miniatura';
+$lang['date'] = 'data';
+$lang['diapo_default_page_title'] = 'No hi ha cap categoria seleccionada';
+$lang['thumbnails'] = 'Miniatures';
+$lang['categories'] = 'Categories';
+$lang['hint_category'] = 'mostra imatges a l\'arrel d\'aquesta categoria';
+$lang['total_images'] = 'total';
+$lang['title_menu'] = 'Menú';
+$lang['change_login'] = 'canviar usuari';
+$lang['login'] = 'usuari';
+$lang['hint_login'] = 'identificar-se li permet modificar l\'aparença del site';
+$lang['logout'] = 'sortir';
+$lang['customize'] = 'personalitzar';
+$lang['hint_customize'] = 'personalitzar l\'aspecte de la galeria';
+$lang['hint_search'] = 'cercar';
+$lang['search'] = 'cercar';
+$lang['favorite_cat'] = 'favorits';
+$lang['favorite_cat_hint'] = 'mostrar els seus favorits';
+$lang['about'] = 'quant a';
+$lang['hint_about'] = 'més informació a PhpWebGallery...';
+$lang['admin'] = 'admin';
+$lang['hint_admin'] = 'disponible només per a administradors';
+$lang['no_category'] = 'No hi ha una categoria seleccionada,<br>si us plau, seleccioni\'n una al menú';
+$lang['page_number'] = 'plana número';
+$lang['previous_page'] = 'Anterior';
+$lang['next_page'] = 'Següent';
+$lang['nb_image_category'] = 'número d\'imatges en aquesta categoria';
+$lang['recent_image'] = 'imatge dels darrers';
+$lang['days'] = 'dies';
+$lang['send_mail'] = 'Si té cap comentari o desitja comprar<br>alguna imatge, enviï un correu electrònic';
+$lang['title_send_mail'] = 'Comentari del site o comprar imatge';
+$lang['sub-cat'] = 'subcategories';
+$lang['images_available'] = 'imatges en aquesta categoria';
+$lang['total'] = 'imatges';
+$lang['upload_picture'] = 'Pujar una imatge';
+$lang['registration_date'] = 'registrada el';
+$lang['creation_date'] = 'creada el';
+$lang['comment'] = 'comentari';
+$lang['author'] = 'autor';
+$lang['size'] = 'tamany';
+$lang['filesize'] = 'tamany de l\'arxiu';
+$lang['file'] = 'arxiu';
+$lang['generation_time'] = 'Plana creada en';
+$lang['favorites'] = 'Favorits';
+$lang['search_result'] = 'Resultats de la cerca';
+$lang['about_page_title'] = 'Quant a PhpWebGallery';
+$lang['about_title'] = 'Quant a...';
+$lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Informació quant a PhpWebGallery</div>
+<ul>
+  <li>Aquest lloc web utilitza  <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> versió '.$conf['version'].'. PhpWebGallery és una aplicació web que li ofereix la possibilitat de crear fàcilment una galeria d\'imatges on-line.</li>
+  <li>Tècnicament, PhpWebGallery està totalment desenvolupat en PHP (the elePHPant) en combinació amb la base de dades MySQL (the SQuirreL).</li>
+  <li>Si té qualsevol suggerència o comentari, si us plau, visiti el site oficial de <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> i el seu <a href="'.$conf['forum_url'].'" style="text-decoration:underline">fòrum de discussió</a>.</li>
+</ul>';
+$lang['about_return'] = 'Enrere';
+$lang['ident_page_title'] = 'Identificació';
+$lang['ident_title'] = 'Identificació';
+$lang['ident_register'] = 'Registrar';
+$lang['ident_forgotten_password'] = 'Ha oblidat la seva contrasenya?';
+$lang['ident_guest_visit'] = 'Entri a la Galeria com a visitant';
+$lang['customize_page_title'] = 'Personalització';
+$lang['customize_title'] = 'Personalització';
+$lang['customize_nb_image_per_row'] = 'número d\'imatges per filera';
+$lang['customize_nb_row_per_page'] = 'número d\'imatges per plana';
+$lang['customize_language'] = 'idioma';
+$lang['maxwidth'] = 'amplada màxima de les imatges';
+$lang['maxheight'] = 'alçada màxima de les imatges';
+$lang['err_maxwidth'] = 'l\'amplada màxima ha de ser un número superior a 50';
+$lang['err_maxheight'] = 'l\'alçada màxima ha de ser un número superior a 50';
+$lang['previous_image'] = 'Anterior';
+$lang['next_image'] = 'Següent';
+$lang['back'] = 'Polsi a l\'imatge per tornar a la plana de miniatures';
+$lang['info_image_title'] = 'Informació de l\'imatge';
+$lang['link_info_image'] = 'Modificar informació';
+$lang['true_size'] = 'Tamany real';
+$lang['comments_title'] = 'Comentaris dels usuaris del lloc web';
+$lang['comments_del'] = 'esborrar aquest comentari';
+$lang['comments_add'] = 'Afegir un comentari';
+$lang['month'][1] = 'Gener';
+$lang['month'][2] = 'Febrer';
+$lang['month'][3] = 'Març';
+$lang['month'][4] = 'Abril';
+$lang['month'][5] = 'Maig';
+$lang['month'][6] = 'Juny';
+$lang['month'][7] = 'Juliol';
+$lang['month'][8] = 'Agost';
+$lang['month'][9] = 'Setembre';
+$lang['month'][10] = 'Octubre';
+$lang['month'][11] = 'Novembre';
+$lang['month'][12] = 'Desembre';
+$lang['day'][0] = 'Diumenge';
+$lang['day'][1] = 'Dilluns';
+$lang['day'][2] = 'Dimarts';
+$lang['day'][3] = 'Dimecres';
+$lang['day'][4] = 'Dijous';
+$lang['day'][5] = 'Divendres';
+$lang['day'][6] = 'Dissabte';
+$lang['add_favorites_alt'] = 'Afegir a favorits';
+$lang['add_favorites_hint'] = 'Afegir imatge a favorits';
+$lang['del_favorites_alt'] = 'Eliminar imatge de favorits';
+$lang['del_favorites_hint'] = 'Eliminar imatge de favorits';
+$lang['register_page_title'] = 'Registre';
+$lang['register_title'] = 'Registre';
+$lang['reg_err_login1'] = 'Si us plau, introdueixi un nom d\'usuari';
+$lang['reg_err_login2'] = 'el nom d\'usuari no pot acabar en espai';
+$lang['reg_err_login3'] = 'el nom d\'usuari no pot començar en espai';
+$lang['reg_err_login4'] = 'el nom d\'usuari no pot contenir " ni \'';
+$lang['reg_err_login5'] = 'el nom d\'usuari ja existeix';
+$lang['reg_err_pass'] = 'si us plau, introdueixi la seva contrasenya de nou';
+$lang['reg_confirm'] = 'confirmar';
+$lang['reg_err_mail_address'] = 'l\'adreça de correu ha de ser del tipus xxx@yyy.eee (p.ex.: usuari@proveidor.com)';
+$lang['search_title'] = 'Cercar';
+$lang['invalid_search'] = 'la cerca ha de tenir 3 caràcters o més';
+$lang['search_field_search'] = 'Cercar';
+$lang['search_return_main_page'] = 'Tornar a la plana de miniatures';
+$lang['upload_forbidden'] = 'No pot pujar imatges en aquesta categoria';
+$lang['upload_file_exists'] = 'El nom d\'alguna imatge ja existeix';
+$lang['upload_filenotfound'] = 'Ha d\'escollir un format d\'imatge per a l\'arxiu';
+$lang['upload_cannot_upload'] = 'no es pot pujar la imatge al servidor';
+$lang['upload_title'] = 'Pujar una imatge';
+$lang['upload_advise'] = 'Esculli una imatge per posar-la a la categoria: ';
+$lang['upload_advise_thumbnail'] = 'Opcional, però recomanable: esculli una miniatura per associar-la a ';
+$lang['upload_advise_filesize'] = 'el tamany de l\'arxiu de la imatge no ha de passar de: ';
+$lang['upload_advise_width'] = 'l\'amplada de la imatge no ha de passar de: ';
+$lang['upload_advise_height'] = 'l\'alçada de la imatge no ha de passar de: ';
+$lang['upload_advise_filetype'] = 'la imatge ha d\'estar en format JPG, GIF ó PNG';
+$lang['upload_err_username'] = 'ha de donar el nom d\'usuari';
+$lang['upload_username'] = 'Usuari';
+$lang['upload_successful'] = 'Imatge pujada correctament, un administrador la validarà tan aviat com sigui possible';
+// new or modified in release 1.3
+$lang['charset'] = 'iso-8859-1';
+$lang['no'] = 'no';
+$lang['yes'] = 'si';
+$lang['guest'] = 'convidat';
+$lang['mail_address'] = 'adreça de correu';
+$lang['public'] = 'públic';
+$lang['private'] = 'privat';
+$lang['add'] = 'afegir';
+$lang['dissociate'] = 'diferenciar';
+$lang['mandatory'] = 'obligatori';
+$lang['err_date'] = 'data errònia';
+$lang['picture'] = 'imatge';
+$lang['IP'] = 'IP';
+$lang['close'] = 'tancar';
+$lang['open'] = 'obrir';
+$lang['keywords'] = 'paraules clau';
+$lang['errors_title'] = 'Errors';
+$lang['infos_title'] = 'Informacions';
+$lang['default'] = 'per defecte';
+$lang['comments'] = 'comentaris';
+$lang['category_representative'] = 'representativa';
+$lang['stats'] = 'estadístiques';
+$lang['most_visited_cat_hint'] = 'mostra les imatges més visitades';
+$lang['most_visited_cat'] = 'més visitades';
+$lang['best_rated_cat_hint'] = 'mostra les imatges millor valorades';
+$lang['best_rated_cat'] = 'millor valorades';
+$lang['recent_cat_hint'] = 'mostra les imatges més recents';
+$lang['recent_cat'] = 'més recents';
+$lang['recent_cat_title'] = 'Imatges recents';
+$lang['visited'] = 'visitada';
+$lang['times'] = 'vegades';
+$lang['customize_theme'] = 'tema de l\'interface';
+$lang['customize_expand'] = 'expandir totes les categories';
+$lang['customize_show_nb_comments'] = 'mostrar el nombre de comentaris';
+$lang['customize_short_period'] = 'període curt';
+$lang['customize_long_period'] = 'període llarg';
+$lang['customize_template'] = 'plantilla';
+$lang['err_periods'] = 'els períodes han de ser valors enters';
+$lang['err_periods_2'] = 'els períodes han de ser superiors a 0. El període llarg ha de ser més gran que el període curt.';
+$lang['create_cookie'] = 'crear una cookie';
+$lang['customize_day'] = 'dia';
+$lang['customize_week'] = 'setmana';
+$lang['customize_month'] = 'mes';
+$lang['customize_year'] = 'any';
+$lang['slideshow'] = 'slideshow';
+$lang['period_seconds'] = 'segons per imatge';
+$lang['slideshow_stop'] = 'parar l\'slideshow';
+$lang['comment_added'] = 'El seu comentari ha estat registrat';
+$lang['comment_to_validate'] = 'Un administrador ha d\'autoritzar el comentari abans de que sigui visible.';
+$lang['comment_anti-flood'] = 'Sistema Anti-flood: si us plau, esperi un moment abans d\'intentar enviar un altre comentari';
+$lang['comment_user_exists'] = 'El nom d\'usuari ja està en us';
+$lang['invalid_search'] = 'Les paraules cercades han de ser de més de 3 caràcters i no han de contenir signes de puntuació';
+$lang['search_mode_or'] = 'almenys una paraula';
+$lang['search_mode_and'] = 'totes les paraules';
+$lang['search_comments'] = 'separi les diferents paraules amb espais';
+$lang['upload_name'] = 'Nom de la imatge';
+$lang['upload_author'] = 'Autor (ex "Pierrick LE GALL")';
+$lang['upload_creation_date'] = 'Data de creació (DD/MM/AAAA)';
+$lang['upload_comment'] = 'Comentari';
+$lang['mail_hello'] = 'Hola,';
+$lang['mail_new_upload_subject'] = 'Nova imatge al lloc web';
+$lang['mail_new_upload_content'] = 'S\'ha pujat una nova imatge a la galeria. Està esperant a ser validada. Vagi al panell d\'administració per autoritzar o refusar la imatge.';
+$lang['mail_new_comment_subject'] = 'Nou comentari del lloc web';
+$lang['mail_new_comment_content'] = 'S\'ha registrat un nou comentari a la galeria. Si escull validar cada comentari, primer haurà de validar aquest comentari al panell d\'administració per fer-lo visible a la galeria.'."\n\n".'Pot veure els últims comentaris al panell d\'administració';
+$lang['connected_user'] = 'usuari connectat';
+$lang['title_comments'] = 'Comentaris dels usuaris';
+$lang['stats_last_days'] = 'últims dies';
+$lang['hint_comments'] = 'Veure els últims comentaris dels usuaris';
+$lang['menu_login'] = 'usuari';
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+  $lang['title_liste_users'] = 'Llista d\'usuaris';
+  $lang['title_history'] = 'Historial';
+  $lang['title_update'] = 'Actualitzar base de dades';
+  $lang['title_configuration'] = 'Configuració de PhpWebGallery';
+  $lang['title_instructions'] = 'Instruccions';
+  $lang['title_categories'] = 'Administració de categories';
+  $lang['title_edit_cat'] = 'Editar una categoria';
+  $lang['title_info_images'] = 'Modificar informació de la categoria d\'imatges';
+  $lang['title_thumbnails'] = 'Creació de miniatures';
+  $lang['title_thumbnails_2'] = 'per a';
+  $lang['title_default'] = 'Administració de PhpWebGallery';
+  $lang['menu_title'] = 'Administració';
+  $lang['menu_config'] = 'Configuració';
+  $lang['menu_users'] = 'Usuaris';
+  $lang['menu_add_user'] = 'afegir';
+  $lang['menu_list_user'] = 'llistar';
+  $lang['menu_categories'] = 'Categories';
+  $lang['menu_update'] = 'Actualitzar base de dades';
+  $lang['menu_thumbnails'] = 'Miniatures';
+  $lang['menu_history'] = 'Historial';
+  $lang['menu_instructions'] = 'Instruccions';
+  $lang['menu_back'] = 'Tornar a les galeries';
+  $lang['title_waiting'] = 'Imatges pendents de validació';
+  $lang['menu_waiting'] = 'En espera';
+  $lang['default_message'] = 'Panell d\'administració de PhpWebGallery';
+  $lang['conf_err_prefixe'] = 'el prefix de la miniatura no ha de contenir caràcters accentuats';
+  $lang['conf_err_mail'] = 'direcció d\'E-mail refusada, ha de ser del tipus usuari@servidor.com';
+  $lang['conf_err_sid_size'] = 'el tamany d\'identificador de sessió ha de ser un valor enter entre 4 i 50';
+  $lang['conf_err_sid_time'] = 'el temps de sessió ha de ser un valor enter entre 5 i 60';
+  $lang['conf_err_max_user_listbox'] = 'el nombre màxim d\'usuaris a la llista ha de ser un valor enter entre 0 i 255';
+  $lang['conf_confirmation'] = 'Informació registrada a la base de dades';
+  $lang['conf_general_title'] = 'Configuració principal';
+  $lang['conf_general_webmaster'] = 'login del webmaster';
+  $lang['conf_general_webmaster_info'] = 'Serà mostrat als visitants. Es necessari per a l\'administració del lloc web';
+  $lang['conf_general_mail'] = 'E-mail del Webmaster';
+  $lang['conf_general_mail_info'] = 'Els visitants podran contactar mitjançant aquest E-mail';
+  $lang['conf_general_prefix'] = 'prefix de las miniatures';
+  $lang['conf_general_prefix_info'] = 'Les miniatures utilitzaran aquest prefix. Deixar en blanc en cas de dubte.';
+  $lang['conf_general_access'] = 'tipus d\'accés';
+  $lang['conf_general_access_1'] = 'lliure';
+  $lang['conf_general_access_2'] = 'restringit';
+  $lang['conf_general_access_info'] = '- lliure: qualsevol pot entrar al site i crear un compte per personalitzar l\'apariència del lloc web<br />- restringit: el webmaster crea els comptes. Només els usuaris registrats poden entrar al lloc web';
+  $lang['conf_general_max_user_listbox'] = 'màxim nombre d\'usuaris a la llista';
+  $lang['conf_general_max_user_listbox_info'] = '- aquest és el nombre màx. d\'usuaris que PhpWebGallery mostrarà a la llista en lloc d\'una simple caixa de text a la plana d\'identificació<br />- introdueixi un número entre 0 i 255, 0 farà que es mostri la llista';
+  $lang['conf_comments'] = 'comentaris dels usuaris';
+  $lang['conf_comments_title'] = 'Configuració dels '.$lang['conf_comments'];
+  $lang['conf_comments_show_comments'] = $lang['conf_comments'];
+  $lang['conf_comments_show_comments_info'] = '¿mostrar comentaris dels usuaris a sota de cada imatge?';
+  $lang['conf_comments_comments_number'] = 'nombre de comentaris per plana';
+  $lang['conf_comments_comments_number_info'] = 'nombre de comentaris a mostrar a cada plana. Aquest nombre és ilimitat per a cada imatge. Introdueixi un número entre 5 i 50.';
+  $lang['conf_err_comment_number'] = 'El nombre de comentaris per plana ha d\'estar entre 5 i 50 (inclòs).';
+  $lang['conf_remote_site_delete_info'] = 'Si elimina un servidor remot, esborrarà totes les imatges i categories relacionades amb el servidor.';
+  $lang['conf_upload_title'] = 'Configuració dels enviaments dels usuaris';
+  $lang['conf_upload_available'] = 'autoritzada la pujada d\'imatges';
+  $lang['conf_upload_maxfilesize'] = 'tamany màxim de l\'arxiu';
+  $lang['conf_upload_maxfilesize_info'] = 'Tamany màxim dels arxius a pujar. Ha de ser un enter entre 10 i 1000 (Kb).';
+  $lang['conf_err_upload_maxfilesize'] = 'tamany màxim dels arxius a pujar. Ha de ser un enter entre 10 i 1000 (Kb).';
+  $lang['conf_upload_maxwidth'] = 'amplada màxima';
+  $lang['conf_upload_maxwidth_info'] = 'Amplada màxima de les imatges a pujar. Ha de ser un número superior a 10 (píxels).';
+  $lang['conf_err_upload_maxwidth'] = 'amplada màxima de les imatges a pujar. Ha de ser un número superior a 10 (píxels).';
+  $lang['conf_upload_maxheight'] = 'alçada màxima';
+  $lang['conf_upload_maxheight_info'] = 'Alçada màxima de les imatges a pujar. Ha de ser un número superior a 10 (píxels).';
+  $lang['conf_err_upload_maxwidth'] = 'alçada màxima de les imatges a pujar. Ha de ser un número superior a 10 (píxels).';
+  $lang['conf_upload_maxwidth_thumbnail'] = 'amplada màxima de les miniatures';
+  $lang['conf_upload_maxwidth_thumbnail_info'] = 'Amplada màxima de les miniatures a pujar. Ha de ser un número superior a 10 (píxels).';
+  $lang['conf_err_upload_maxwidth_thumbnail'] = 'amplada màxima de les miniatures a pujar. Ha de ser un número superior a 10 (píxels).';
+  $lang['conf_upload_maxheight_thumbnail'] = 'alçada màxima de les miniatures';
+  $lang['conf_upload_maxheight_thumbnail_info'] = 'Alçada màxima de les miniatures a pujar. Ha de ser un número superior a 10 (píxels).';
+  $lang['conf_err_upload_maxheight_thumbnail'] = 'alçada màxima de les miniatures a pujar. Ha de ser un número superior a 10 (píxels).';
+  $lang['conf_default_title'] = 'Propietats de visualització per defecte per a usuaris no registrats i nous comptes';
+  $lang['conf_default_language_info'] = 'idioma per defecte';
+  $lang['conf_default_theme_info'] = 'tema per defecte';
+  $lang['conf_session_title'] = 'Configuració de les sessions';
+  $lang['conf_session_size'] = 'tamany de l\'identificador';
+  $lang['conf_session_size_info'] = '- com més llarg sigui l\'identificador, més segur serà el site<br />- introdueixi un número entre 4 i 50';
+  $lang['conf_session_time'] = 'període de validesa';
+  $lang['conf_session_time_info'] = '- com més curt sigui el període de validesa més segur serà el site<br />- introdueixi un número entre 5 i 60, en minuts';
+  $lang['conf_session_key'] = 'paraula clau';
+  $lang['conf_session_key_info'] = '- la paraula clau de la sessió millora la codificació de l\'identificador de sessió<br />- introdueixi una frase que no passi de 255 caràcters';
+  $lang['conf_session_delete'] = 'esborrar sessions caducades';
+  $lang['conf_session_delete_info'] = 'és recomanable buidar la taula de sessions de la base de dades, perquè les sessions caducades romanen a la base de dades (encara que no representen cap problema de seguretat)';
+  $lang['user_err_modify'] = 'Aquest usuari no pot ser modificat ni esborrat';
+  $lang['user_err_unknown'] = 'Aquest usuari no existeix a la base de dades';
+  $lang['adduser_info_message'] = 'Informació registrada a la base de dades per a l\'usuari ';
+  $lang['adduser_info_password_updated'] = '(contrasenya actualitzada)';
+  $lang['adduser_info_back'] = 'tornar a la llista d\'usuaris';
+  $lang['adduser_fill_form'] = 'Si us plau, empleni el següent formulari';
+  $lang['adduser_unmodify'] = 'no-modificable';
+  $lang['adduser_status'] = 'estat';
+  $lang['adduser_status_admin'] = 'admin';
+  $lang['adduser_status_guest'] = 'convidat';
+  $lang['permuser_info_message'] = 'Permisos registrats';
+  $lang['permuser_title'] = 'Restriccions per a l\'usuari';
+  $lang['permuser_warning'] = 'Atenció : un "<span style="font-weight:bold;">accés prohibit</span>" a l\'arrel d\'una categoria denega l\'accés a tota la categoria';
+  $lang['permuser_authorized'] = 'autoritzat';
+  $lang['permuser_forbidden'] = 'prohibit';
+  $lang['permuser_parent_forbidden'] = 'categoria superior prohibida';
+  $lang['listuser_confirm'] = 'Realment desitja esborrar aquest usuari?';
+  $lang['listuser_info_deletion'] = 'esborrat de la base de dades';
+  $lang['listuser_user_group'] = 'Grup d\'usuaris';
+  $lang['listuser_modify'] = 'modificar';
+  $lang['listuser_modify_hint'] = 'modificar la informació de';
+  $lang['listuser_permission'] = 'permisos';
+  $lang['listuser_permission_hint'] = 'modifica els permisos de';
+  $lang['listuser_delete'] = 'esborrar';
+  $lang['listuser_delete_hint'] = 'esborrar usuari';
+  $lang['listuser_button_all'] = 'tots';
+  $lang['listuser_button_invert'] = 'invertir';
+  $lang['listuser_button_create_address'] = 'crear adreça de correu';
+  $lang['cat_invisible'] = 'invisible';
+  $lang['cat_edit'] = 'Editar';
+  $lang['cat_up'] = 'Pujar';
+  $lang['cat_down'] = 'Baixar';
+  $lang['cat_image_info'] = 'Informació de les imatges';
+  $lang['cat_total'] = 'total';
+  $lang['editcat_confirm'] = 'Informació registrada a la base de dades';
+  $lang['editcat_back'] = 'categories';
+  $lang['editcat_title1'] = 'Opcions per al';
+  $lang['editcat_name'] = 'Nom';
+  $lang['editcat_comment'] = 'Comentari';
+  $lang['editcat_status'] = 'Estat';
+  $lang['infoimage_general'] = 'Opcions generals per a la categoria';
+  $lang['infoimage_useforall'] = 'utilitzar per a totes les imatges?';
+  $lang['infoimage_creation_date'] = 'data de creació';
+  $lang['infoimage_detailed'] = 'Opció per a cada imatge';
+  $lang['infoimage_title'] = 'títol';
+  $lang['infoimage_comment'] = 'comentari';
+  $lang['update_missing_tn'] = 'no hi ha miniatura per a';
+  $lang['update_disappeared_tn'] = 'la miniatura no existeix';
+  $lang['update_disappeared'] = 'no existeix';
+  $lang['update_part_deletion'] = 'Esborrat d\'imatges que no tenen miniatura o que no existeixen';
+  $lang['update_deletion_conclusion'] = 'imatges esborrades de la base de dades';
+  $lang['update_part_research'] = 'Buscar noves imatges als directoris';
+  $lang['update_research_added'] = 'afegides';
+  $lang['update_research_tn_ext'] = 'miniatures a';
+  $lang['update_research_conclusion'] = 'imatges afegides a la base de dades';
+  $lang['update_default_title'] = 'Esculli una opció';
+  $lang['update_only_cat'] = 'actualitzar categories, no imatges';
+  $lang['update_all'] = 'actualitzar totes';
+  $lang['tn_width'] = 'amplada';
+  $lang['tn_height'] = 'alçada';
+  $lang['tn_no_support'] = 'Imatge inaccessible o sense suport';
+  $lang['tn_format'] = 'per al format d\'arxiu';
+  $lang['tn_thisformat'] = 'per a aquest format d\'arxiu';
+  $lang['tn_err_width'] = 'l\'amplada ha de ser un número superior a';
+  $lang['tn_err_height'] = 'l\'alçada ha de ser un número superior a';
+  $lang['tn_results_title'] = 'Resultats de la miniaturització';
+  $lang['tn_picture'] = 'imatge';
+  $lang['tn_results_gen_time'] = 'generada en';
+  $lang['tn_stats'] = 'Estadístiques generals';
+  $lang['tn_stats_nb'] = 'nombre d\'imatges miniaturitzades';
+  $lang['tn_stats_total'] = 'temps total';
+  $lang['tn_stats_max'] = 'temps màx.';
+  $lang['tn_stats_min'] = 'temps mín.';
+  $lang['tn_stats_mean'] = 'temps mitjà';
+  $lang['tn_err'] = 'Ha comès errors';
+  $lang['tn_params_title'] = 'Paràmetres de la miniaturització';
+  $lang['tn_params_GD'] = 'Versió de GD';
+  $lang['tn_params_GD_info'] = '- GD és la llibreria de manipulació de miniatures per a PHP<br />-esculli la versió instal·lada en el seu servidor. Si n\'escull una d\'incorrecta, obtindrà missatges d\'error, torni enrere amb el seu navegador i esculli una altra versió. Si no funciona, és que el seu servidor no suporta GD.';
+  $lang['tn_params_width_info'] = 'màxima amplada de les miniatures';
+  $lang['tn_params_height_info'] = 'màxima alçada de les miniatures';
+  $lang['tn_params_create'] = 'crear';
+  $lang['tn_params_create_info'] = 'No intenti miniaturitzar massa imatges a la vegada.<br />De fet, la miniaturització utilitza molts recursos de la CPU. Si va instal·lar PhpWebGallery a un proveïdor gratuït, una sobrecàrrega de la CPU pot derivar en l\'eliminació del seu lloc web.';
+  $lang['tn_params_format'] = 'format d\'arxiu';
+  $lang['tn_params_format_info'] = 'únicament es permet el format JPG per a la creació de miniatures.';
+  $lang['tn_alone_title'] = 'imatge sense miniatura (només JPG i PNG)';
+  $lang['tn_dirs_title'] = 'Llista de directoris';
+  $lang['tn_dirs_alone'] = 'imatges sense miniatura';
+  $lang['help_images_title'] = 'Afegir imatges';
+  $lang['help_images_intro'] = 'Com posar les imatges als seus directoris';
+  $lang['help_images'][0] = 'al directori "galleries", creï directoris que representin a les seves categories.';
+  $lang['help_images'][1] = 'a cada directori, pot crear tants subdirectoris com desitgi.';
+  $lang['help_images'][2] = 'pot crear tantes categories i subcategories com desitgi.';
+  $lang['help_images'][3] = 'les imatges han de ser en format JPG (extensió jpg ó JPG), format GIF (extensió gif ó GIF) o format PNG (extensió png ó PNG).';
+  $lang['help_images'][4] = 'intenti NO utilitzar espais en blanc " " ni guions "-" als noms d\'imatge, li recomanem utilitzar el caràcter "_" de subratllat suportat per PhpWebGallery i obtindrà millors resultats.';
+  $lang['help_thumbnails_title'] = 'Miniatures';
+  $lang['help_thumbnails'][0] = 'a cada directori que contingui imatges a mostrar, ha d\'haver-hi un subdirectori amb el nom "thumbnail", si no existeix, creï\'l i posi les miniatures dins d\'ell.';
+  $lang['help_thumbnails'][1] = 'les miniatures no necessiten tenir la mateixa extensió que la seva imatge associada (una imatge en format .JPG pot tenir associada una miniatura en format .GIF).';
+  $lang['help_thumbnails'][2] = 'la miniatura associada a la imatge ha de tenir el prefix que es va indicar a la plana de configuració (imatge.jpg -> TN_imatge.GIF, per exemple).';
+  $lang['help_thumbnails'][3] = 'li recomanem utilitzar el mòdul per a Windows, descarregable al site de presentació de PhpWebGallery, per a la gestió de les miniatures.';
+  $lang['help_thumbnails'][4] = 'pot utilitzar la plana de creació de miniatures integrada a PhpWebGallery, però no és aconsellable, perquè la qualitat pot ser bastant pobre i carrega bastant la CPU, cosa que pot ser un problema si utilitza un servidor gratuït.';
+  $lang['help_thumbnails'][5] = 'si escull utilitzar al seu proveïdor de hosting per crear les miniatures, ha de donar els drets 775 a la carpeta "galleries" i a totes les seves subcarpetes.';
+  $lang['help_database_title'] = 'Actualitzant la base de dades';
+  $lang['help_database'][0] = 'un cop ubicades correctament les imatges i miniatures als directoris, polsi a "database update" al menú del panell d\'administració.';
+  $lang['help_infos_title'] = 'Informació diversa';
+  $lang['help_infos'][1] = 'Un cop hagi creat la seva galeria, vagi a la llista d\'usuaris i modifiqui els permisos per al "visiteur". De fet, cada nou usuari tindrà per defecte els mateixos permisos que l\'usuari "visiteur".';
+  $lang['help_remote_title'] = 'Site remot';
+  $lang['help_remote'][0] = 'PhpWebGallery ofereix la possibilitat d\'utilitzar diversos servidors per emmagatzemar les imatges que componen la seva galeria. Pot ser útil si la seva galeria està instal·lada en un espai web reduït i té gran quantitat d\'imatges per mostrar. Si us plau, segueixi el següent procediment: ';
+  $lang['help_remote'][1] = '1. Editi el fitxer "create_listing_file.php" (el trobarà al directori "admin"), i modifiqui la línia "$prefix_thumbnail = "TN-";" si el prefix de les seves miniatures no és "TN-".';
+  $lang['help_remote'][2] = '2. Posi l\'arxiu "create_listing_file.php" modificat al seu website remot, al directori arrel dels seus directoris d\'imatges (com el directori "galleries" d\'aquest website), mitjançant l\'ftp.';
+  $lang['help_remote'][3] = '3. Executi l\'script utilitzant la url http://DominiRemot/Galeria/create_listing_file.php, i es crearà l\'arxiu listing.xml.';
+  $lang['help_remote'][4] = '4. Recuperi el fitxer listing.xml del seu website remot i posi\'l al directori "admin" d\'aquest website.';
+  $lang['help_remote'][5] = '5. Si us plau, realitzi una actualització de les dades de les imatges mitjançant l\'interface d\'administració, i un cop utilitzat el fitxer listing.xml, esborri\'l del directori "admin".';
+  $lang['help_remote'][6] = 'Pot actualitzar els continguts del site remot repetint els passos descrits. També pot eliminar el site remot escollint l\'opció a la secció de configuració del panell d\'administració.';
+  $lang['help_upload_title'] = 'Imatges afegides pels usuaris';
+  $lang['help_upload'][0] = 'PhpWebGallery ofereix la possibilitat als usuaris de pujar imatges. Per fer-ho:';
+  $lang['help_upload'][1] = '1. Autoritzi l\'opció a la zona de configuració del panell d\'administració';
+  $lang['help_upload'][2] = '2. Autoritzi els drets d\'escriptura als directoris d\'imatges';
+  $lang['install_message'] = 'Missatge';
+  $lang['step1_confirmation'] = 'Paràmetres correctes';
+  $lang['step1_err_db'] = 'Connexió al servidor realitzada, però impossible connectar amb la base de dades';
+  $lang['step1_err_server'] = 'No es pot connectar al servidor';
+  $lang['step1_err_copy_2'] = 'Es pot procedir al següent pas de la instal·lació';
+  $lang['step1_err_copy_next'] = 'següent pas';
+  $lang['step1_title'] = 'Pas 1/2';
+  $lang['step1_host'] = 'Servidor MySQL';
+  $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
+  $lang['step1_user'] = 'usuari';
+  $lang['step1_user_info'] = 'nom d\'usuari proporcionat pel seu proveïdor';
+  $lang['step1_pass'] = 'Contrasenya';
+  $lang['step1_pass_info'] = 'contrasenya d\'usuari proporcionada pel seu proveïdor';
+  $lang['step1_database'] = 'Nom de la base de dades';
+  $lang['step1_database_info'] = 'també proporcionat pel seu proveïdor';
+  $lang['step1_prefix'] = 'Prefix per a les taules a la base de dades';
+  $lang['step1_prefix_info'] = 'els noms de les taules de la base de dades hauran de dur un prefix (facilita la gestió de les taules)';
+  $lang['step2_err_login1'] = 'introdueixi un nom d\'usuari per al webmaster';
+  $lang['step2_err_login3'] = 'el nom del Webmaster no pot incloure caràcters com \' o "';
+  $lang['step2_err_pass'] = 'si us plau, confirmi la seva contrasenya';
+  $lang['step2_err_mail'] = $lang['conf_err_mail'];
+  $lang['install_end_title'] = 'Instal·lació finalitzada';
+  $lang['install_end_message'] = 'La configuració de PhpWebGallery s\'ha acabat, aquest és el següent pas<br /><br />
+Per raons de seguretat, si us plau esborri el fitxer "install.php" del directori "admin"<br />
+Un cop esborrat, segueixi aquestes instruccions:
+<ul>
+  <li>vagi a la plana d\'identificació: [ <a href="../identification.php">identificació</a> ] i introdueixi l\'usuari/contrasenya assignats al webmaster</li>
+  <li>Aquesta identificació li donarà accés al [ <a href="admin.php">panell d\'administració</a> ] i a les instruccions necessàries per posar imatges als seus directoris</li>
+</ul>';
+  $lang['step2_title'] = 'Pas 2/2';
+  $lang['step2_pwd'] = 'contrasenya del webmaster';
+  $lang['step2_pwd_info'] = 'Mantingui-la confidencial, ja que li dóna accés al panell d\'administració';
+  $lang['step2_pwd_conf'] = 'confirmar contrasenya';
+  $lang['step2_pwd_conf_info'] = 'verificació';
+  // new or modified in release 1.3
+  $lang['remote_site'] = 'Site remot';
+  $lang['title_add'] = 'Afegir usuari';
+  $lang['title_modify'] = 'Modificar usuari';
+  $lang['title_groups'] = 'Gestió de grups';
+  $lang['title_user_perm'] = 'Modificar permisos per a l\'usuari';
+  $lang['title_cat_perm'] = 'Modificar permisos per a la categoria';
+  $lang['title_group_perm'] = 'Modificar permisos per al grup';
+  $lang['title_picmod'] = 'Modificar informació de la imatge';
+  $lang['menu_groups'] = 'Grups';
+  $lang['menu_comments'] = 'Comentaris';
+  $lang['conf_general_log'] = 'historial';
+  $lang['conf_general_log_info'] = 'Mantenir historial de visites del seu lloc web? Les visites es mostraran a la secció d\'historial del panell d\'administració';
+  $lang['conf_general_mail_notification'] = 'Notificació per correu';
+  $lang['conf_general_mail_notification_info'] = 'Notificació automàtica de correu per als administradors (i només per a ells) quan un usuari afegeixi un comentari o pugi una imatge.';
+  $lang['conf_comments_validation'] = 'validació';
+  $lang['conf_comments_validation_info'] = 'Un administrador valida els comentaris enviats pels usuaris abans de que siguin visibles al lloc web.';
+  $lang['conf_comments_forall'] = 'per a tots?';
+  $lang['conf_comments_forall_info'] = 'Els usuaris no registrats poden enviar comentaris';
+  $lang['conf_default_nb_image_per_row_info'] = 'nombre d\'imatges per fila per defecte';
+  $lang['conf_default_nb_row_per_page_info'] = 'nombre de files per plana per defecte';
+  $lang['conf_default_short_period_info'] = 'Per dies. Període durant el qual una imatge es mostra amb la marca vermella. El període curt ha de ser superior a 1 dia.';
+  $lang['conf_default_long_period_info'] = 'Per dies. Període durant el qual una imatge es mostra amb la marca verda. El període llarg ha de ser superior al període curt.';
+  $lang['conf_default_expand_info'] = 'expandir totes les categories per defecte al menú?';
+  $lang['conf_default_show_nb_comments_info'] = 'mostrar el nombre de comentaris per a cada imatge a la plana de miniatures';
+  $lang['conf_default_maxwidth_info'] = 'Màxima amplada per a la visualització d\'imatges: la imatge tindrà una nova amplada només per a la visualització, els arxius d\'imatge no es canviaran. Deixi-ho buit si no vol posar límit.';
+  $lang['conf_default_maxheight_info'] = 'Només com la màxima amplada, excepte per a l\'alçada';
+  $lang['conf_session_cookie'] = 'autoritzar cookies';
+  $lang['conf_session_cookie_info'] = 'els usuaris no hauran d\'identificar-se a cada visita. Menys segur.';
+  $lang['adduser_associate'] = 'Associar al grup';
+  $lang['group_add'] = 'Afegir un grup';
+  $lang['group_add_error1'] = 'El nom del grup no ha d\'incloure " o \'';
+  $lang['group_add_error2'] = 'El nom ja l\'utilitza un altre grup';
+  $lang['group_confirm'] = 'Està segur de que vol esborrar aquest grup?';
+  $lang['group_list_title'] = 'Llista de grups existents';
+  $lang['group_err_unknown'] = 'Aquest grup no existeix a la base de dades';
+  $lang['cat_permission'] = 'permisos';
+  $lang['cat_update'] = 'actualitzar';
+  $lang['cat_add'] = 'Afegir una categoria virtual';
+  $lang['cat_parent'] = 'categoria pare';
+  $lang['cat_error_name'] = 'El nom de la categoria no ha d\'estar buit';
+  $lang['cat_virtual'] = 'virtual';
+  $lang['cat_first'] = 'Posar primera';
+  $lang['cat_last'] = 'Posar última';
+  $lang['editcat_visible_info'] = '(invisible excepte per als administradors)';
+  $lang['editcat_visible'] = 'Visible';
+  $lang['editcat_uploadable'] = 'Pujar disponible';
+  $lang['infoimage_keyword_separation'] = '(separar amb coma ",")';
+  $lang['infoimage_addtoall'] = 'afegir a totes';
+  $lang['infoimage_removefromall'] = 'esborrar de totes';
+  $lang['infoimage_associate'] = 'Associar a la categoria';
+  $lang['update_wrong_dirname'] = 'El nom dels directoris i dels arxius ha d\'estar compost de lletres, xifres,  "-", "_" o "."';
+  $lang['stats_pages_seen'] = 'planes visitades';
+  $lang['stats_visitors'] = 'convidats';
+  $lang['stats_empty'] = 'esborrar historial';
+  $lang['stats_pages_seen_graph_title'] = 'Nombre de planes visitades per dia';
+  $lang['stats_visitors_graph_title'] = 'Nombre de convidats per dia';
+  $lang['comments_last_title'] = 'Darrers comentaris';
+  $lang['comments_non_validated_title'] = 'Comentaris en espera de validació';
+  $lang['help_database'][1] = 'Per a evitar l\'actualització de massa imatges en una actualització simple, li recomanem que comenci actualitzant només les categories, i llavors a la secció de categories del panell d\'administració, actualitzi cada categoria des de l\'enllaç "actualitzar"';
+  $lang['help_upload'][3] = 'La categoria ha de tenir habilitat "pujar" per poder fer-ho.';
+  $lang['help_upload'][4] = 'Les imatges pujades pels usuaris no estan directament visibles al lloc web, han de ser validades per l\'administrador. Per fer-ho, un administrador ha  d\'entrar a la plana "en attente" del panell d\'administració, per validar o refusar les imatges proposades, i llavors realitzar una actualització de les dades de les imatges.';
+  $lang['help_virtual_title'] = 'Enllaços entre les imatges i les categories i les categories virtuals';
+  $lang['help_virtual'][0] = 'PhpWebGallery és capaç de diferenciar les categories on les imatges estan guardades i les categories on les imatges es mostren.';
+  $lang['help_virtual'][1] = 'Per defecte, les imatges només es mostren a les seves categories reals: les que es corresponguin als directoris al servidor web.';
+  $lang['help_virtual'][2] = 'Per a enllaçar una imatge a una categoria, només ha de fer l\'associació a la pàgina d\'informació de la imatge o a les informacions de totes les imatges d\'una categoria.';
+  $lang['help_virtual'][3] = 'Utilitzant aquest principi, és possible crear categories virtuals a PhpWebGallery: cap directori real correspon a aquesta categoria. Només ha de crear aquesta categoria a la secció de "categories" del panell d\'administració.';
+  $lang['help_groups_title'] = 'Grups d\'Usuaris';
+  $lang['help_groups'][0] = 'PhpWebGallery pot gestionar grups d\'usuaris. Pot ser molt útil tenir un permís d\'accés comú per a les categories privades.';
+  $lang['help_groups'][1] = '1. Crear el grup "família" a la secció "Grups" del panell d\'administració.';
+  $lang['help_groups'][2] = '2. A la secció d\'"Usuaris", editi un d\'ells i associï\'l al grup "família".';
+  $lang['help_groups'][3] = '3. Modificant els permisos d\'una categoria o grup, veurà que totes les categories accessibles per a un grup són accessibles per als seus membres.';
+  $lang['help_groups'][4] = 'Un usuari pot pertànyer a diversos grups. L\'autorització té més pes que la prohibició: si l\'usuari "pep" pertany al grup "família" i "amics", i només el grup "família" pot veure la categoria "Nadal 2003", "pep" podrà veure "Nadal 2003".';
+  $lang['help_access_title'] = 'Autorització d\'accés';
+  $lang['help_access'][0] = 'PhpWebGallery pot prohibir l\'accés a les categories. Les categories poden ser "públiques" o "privades". Per prohibir l\'accés a una categoria:';
+  $lang['help_access'][1] = '1. Modifiqui les informacions de la categoria (des de la secció de "categories" al panell d\'administració) i faci-la "privada".';
+  $lang['help_access'][2] = '2. A la pàgina de permisos (per a un grup o un usuari) la categoria privada es mostrarà i podrà autoritzar l\'accés o no.';
+  $lang['help_infos'][2] = 'Si té alguna pregunta, no dubti en entrar al fòrum o realitzi una consulta des d\'allà. El <a href="'.$conf['forum_url'].'" style="text-decoration:underline">fòrum</a> (taulell de missatges) està disponible al site de presentació de PhpWebGallery.';
+  $lang['step1_err_copy'] = 'Copiï el text entre parèntesi i enganxi\'l a l\'arxiu "include/mysql.inc.php"(Atenció: mysql.inc.php només ha de contenir el que està en blau, sense cap salt de línia ni espai)';
+  $lang['permuser_only_private'] = 'Només es mostren les categories privades';
+  $lang['waiting_update'] = 'Les imatges validades seran mostrades quan s\'actualitzi la base de dades de les imatges';
+  $lang['conf_upload_available_info'] = 'Autoritzant la pujada d\'imatges pels usuaris a les categories del lloc web (no a un servidor remot). Aquest és un paràmetre general, és necessari autoritzar la pujada categoria per categoria, ja que per defecte no es poden pujar imatges a les categories.';
+  $lang['install_help'] = 'Necessita ajuda? Realitzi la seva consulta al <a href="http://forum.phpwebgallery.net">Taulell de missatges de PhpWebGallery</a>.';
+  $lang['install_warning'] = 'L\'arxiu "admin/install.php" encara està present. Si us plau, elimini\'l del seu servidor. No és segur mantenir-lo.';
+  // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'This category is unknown in the database';
+}
+?>
Index: /branches/1.3/language/czech.php
===================================================================
--- /branches/1.3/language/czech.php	(revision 3252)
+++ /branches/1.3/language/czech.php	(revision 3252)
@@ -0,0 +1,551 @@
+<?php
+/***************************************************************************
+ *                                english.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+$lang['only_members'] = 'Na tyto stránky mají pøístup pouze èlenové';
+$lang['invalid_pwd'] = 'patné heslo!';
+$lang['access_forbiden'] = 'Na tuto stránku nemáte pøístup';
+$lang['submit'] = 'Odeslat';
+$lang['login'] = 'pøihlásit';
+$lang['password'] = 'heslo';
+$lang['new'] = 'nové';
+$lang['delete'] = 'smazat';
+$lang['category'] = 'kategorie';
+$lang['thumbnail'] = 'thumbnail';
+$lang['date'] = 'datum';
+$lang['diapo_default_page_title'] = 'Nebyla vybrána kategorie';
+$lang['thumbnails'] = 'Thumbnails';
+$lang['categories'] = 'Kategorie';
+$lang['hint_category'] = 'zobraz obrázky v koøeni této kategorie';
+$lang['total_images'] = 'celkem';
+$lang['title_menu'] = 'Menu';
+$lang['change_login'] = 'pøihlásit';
+$lang['login'] = 'jméno';
+$lang['hint_login'] = 'identification enables site\'s appareance customization';
+$lang['logout'] = 'odhlásit';
+$lang['customize'] = 'nastavení';
+$lang['hint_customize'] = 'pøizpùsobit vzhled galerie';
+$lang['hint_search'] = 'hledat';
+$lang['search'] = 'hledat';
+$lang['favorite_cat'] = 'oblíbené';
+$lang['favorite_cat_hint'] = 'zobrazit Vae oblíbené';
+$lang['about'] = 'O ...';
+$lang['hint_about'] = 'více informací o PhpWebGallery...';
+$lang['admin'] = 'admin';
+$lang['hint_admin'] = 'dostupné pouze pro administrátory';
+$lang['no_category'] = 'Nebyla vybrána kategorie<br />prosím, vyberte ji v menu';
+$lang['page_number'] = 'stránka èislo';
+$lang['previous_page'] = 'Pøedchozí';
+$lang['next_page'] = 'Dalí';
+$lang['nb_image_category'] = 'poèet obrázkù v kategorii';
+$lang['recent_image'] = 'obrázky bìhem';
+$lang['days'] = 'dní';
+$lang['send_mail'] = 'Máte nìjaký komentáø? ? Polete e-mail na';
+$lang['title_send_mail'] = 'A comment on your site';
+$lang['sub-cat'] = 'podkategorie';
+$lang['images_available'] = 'obrázky v této kategorii';
+$lang['total'] = 'obrázkù';
+$lang['upload_picture'] = 'Pøidat obrázek';
+$lang['registration_date'] = 'registrován';
+$lang['creation_date'] = 'vytvoøen';
+$lang['comment'] = 'komentáø';
+$lang['author'] = 'autor';
+$lang['size'] = 'velikost';
+$lang['filesize'] = 'velikost souboru';
+$lang['file'] = 'soubor';
+$lang['generation_time'] = 'Stránka vygenerována';
+$lang['favorites'] = 'Oblíbené';
+$lang['search_result'] = 'Výsledky vyhledávání';
+$lang['about_page_title'] = 'O PhpWebGallery';
+$lang['about_title'] = 'O...';
+$lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Informace o PhpWebGallery</div>
+<ul>
+  <li>Tyto stránky pouívají <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> release '.$conf['version'].'. PhpWebGallery je webová aplikace, která Vám umoòuje jednodue vytváøet online obrázkovou galerii.</li>
+  <li>Technicaly, PhpWebGallery is fully developped with PHP (the elePHPant) with a MySQL database (the SQuirreL).</li>
+  <li>If you have any suggestions or comments, please visit <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> official site, and its dedicated <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a>.</li>
+</ul>';
+$lang['about_return'] = 'Zpìt';
+$lang['ident_page_title'] = 'Pøihláení';
+$lang['ident_title'] = 'Pøihláení';
+$lang['ident_register'] = 'Registrovat';
+$lang['ident_forgotten_password'] = 'Zapomìli jste heslo ?';
+$lang['ident_guest_visit'] = 'Procházet galerii jako host';
+$lang['customize_page_title'] = 'Pøispùspbení';
+$lang['customize_title'] = 'Pøispùspbení';
+$lang['customize_nb_image_per_row'] = 'poèet obrázkú na øádek';
+$lang['customize_nb_row_per_page'] = 'poèet obrázkú na stránku';
+$lang['customize_language'] = 'jazyk';
+$lang['maxwidth'] = 'maximální íøka obrázkù';
+$lang['maxheight'] = 'maximální výka obrázkù';
+$lang['err_maxwidth'] = 'maximální íøka musí být èíslo vyí ne 50';
+$lang['err_maxheight'] = 'maximální výka musí být èíslo vyí ne 50';
+$lang['previous_image'] = 'Pøedchozí';
+$lang['next_image'] = 'Dalí';
+$lang['back'] = 'Kliknutím na obrázek se vrátíte zpìt na stránku s náhledy';
+$lang['info_image_title'] = 'Informace o obrázku';
+$lang['link_info_image'] = 'Zmìnit informace';
+$lang['true_size'] = 'Reálná velikost';
+$lang['comments_title'] = 'Komentáøe od uivatelù tìchto stránek';
+$lang['comments_del'] = 'smazat tento komentáø';
+$lang['comments_add'] = 'Pøidat komentáø';
+$lang['month'][1] = 'Leden';
+$lang['month'][2] = 'Únor';
+$lang['month'][3] = 'Bøezen';
+$lang['month'][4] = 'Duben';
+$lang['month'][5] = 'Kvìten';
+$lang['month'][6] = 'Èerven';
+$lang['month'][7] = 'Èervenec';
+$lang['month'][8] = 'Srpen';
+$lang['month'][9] = 'Záøí';
+$lang['month'][10] = 'Øíjen';
+$lang['month'][11] = 'Listopad';
+$lang['month'][12] = 'Prosinec';
+$lang['day'][0] = 'Nedìle';
+$lang['day'][1] = 'Pondìlí';
+$lang['day'][2] = 'Úterý';
+$lang['day'][3] = 'Støeda';
+$lang['day'][4] = 'Ètvrtek';
+$lang['day'][5] = 'Pátek';
+$lang['day'][6] = 'Sobota';
+$lang['add_favorites_alt'] = 'Pøidat k oblíbeným';
+$lang['add_favorites_hint'] = 'Pøidat tento obrázek k oblíbeným';
+$lang['del_favorites_alt'] = 'Smazat z oblíbených';
+$lang['del_favorites_hint'] = 'Smazat tento obrázek z oblíbených';
+$lang['register_page_title'] = 'Registrace';
+$lang['register_title'] = 'Registrace';
+$lang['reg_err_login1'] = 'Prosím, zadejte login';
+$lang['reg_err_login2'] = 'login nesmí konèit prázdným znakem';
+$lang['reg_err_login3'] = 'login nesmí zaèínat mezerou';
+$lang['reg_err_login4'] = 'login nesmí obsahovat znak " a \'';
+$lang['reg_err_login5'] = 'tento login je ji registrován';
+$lang['reg_err_pass'] = 'prosím zadejte Vae heslo znova';
+$lang['reg_confirm'] = 'potvrdit heslo';
+$lang['reg_err_mail_address'] = 'e-mail adresa musí být ve formátu xxx@yyy.eee (napø. : jack@altern.org)';
+$lang['search_title'] = 'Hledat';
+$lang['invalid_search'] = 'vyhledávání musí být minimálnì 3 znaky';
+$lang['search_field_search'] = 'Hledat';
+$lang['search_return_main_page'] = 'Zpìt na stránku s náhledy';
+$lang['upload_forbidden'] = 'Do této kategorie nemùete uploadovat obrázky';
+$lang['upload_file_exists'] = 'Obrázek je ji pouíván';
+$lang['upload_filenotfound'] = 'Pro tento obrázek musíte vybrat formát';
+$lang['upload_cannot_upload'] = 'nelze uploadovat obrázek na server';
+$lang['upload_title'] = 'Upload obrázek';
+$lang['upload_advise'] = 'Zvolte obrázek, který chcete umístin v kategorii : ';
+$lang['upload_advise_thumbnail'] = 'Volitelné, ale doporuèené : zvlote náhled k asocici ';
+$lang['upload_advise_filesize'] = 'velikost obrázku nesmí pøekroèit : ';
+$lang['upload_advise_width'] = 'íøka obrázku nesmí pøekroèit : ';
+$lang['upload_advise_height'] = 'výka obrázku nesmí pøekroèit : ';
+$lang['upload_advise_filetype'] = 'formát obrázku musí být jpg, gif nebo png';
+$lang['upload_err_username'] = 'musí být zadáno uivatelské jméno';
+$lang['upload_username'] = 'Uivatelské jméno';
+$lang['upload_successful'] = 'Obrázek byl úspìnì nahrán, administrátor jej registruje jakmile to bude moné';
+// new or modified in release 1.3
+$lang['charset'] = 'windows-1250';
+$lang['no'] = 'ne';
+$lang['yes'] = 'ano';
+$lang['guest'] = 'host';
+$lang['mail_address'] = 'e-mailová adresa';
+$lang['public'] = 'veøejné';
+$lang['private'] = 'soukromé';
+$lang['add'] = 'pøidat';
+$lang['dissociate'] = 'oddìlit';
+$lang['mandatory'] = 'povinný';
+$lang['err_date'] = 'patné datum';
+$lang['picture'] = 'obrázek';
+$lang['IP'] = 'IP';
+$lang['close'] = 'zavøít';
+$lang['open'] = 'otevøít';
+$lang['keywords'] = 'Klíèová slova';
+$lang['errors_title'] = 'Chyba';
+$lang['infos_title'] = 'Informace';
+$lang['default'] = 'default';
+$lang['comments'] = 'komentáøe';
+$lang['category_representative'] = 'zástupce';
+$lang['stats'] = 'statistiky';
+$lang['most_visited_cat_hint'] = 'zobrazí nejnavtìvovanìjí obrázky';
+$lang['most_visited_cat'] = 'nejnavtìvovanìjí';
+$lang['best_rated_cat_hint'] = 'zobrazí nejhodnocenìjí obrázky';
+$lang['best_rated_cat'] = 'nejhodnocenìjí';
+$lang['recent_cat_hint'] = 'zobrazí nejposlednìjí obrázky';
+$lang['recent_cat'] = 'nejposlednìjí';
+$lang['recent_cat_title'] = 'Nejposlednìjí obrázky';
+$lang['visited'] = 'navtíveno';
+$lang['times'] = 'krát';
+$lang['customize_theme'] = 'téma';
+$lang['customize_expand'] = 'rozbali vechny kategorie';
+$lang['customize_show_nb_comments'] = 'zobrazit poèet komentáøù';
+$lang['customize_short_period'] = 'krátké období';
+$lang['customize_long_period'] = 'dlouhé období';
+$lang['customize_template'] = 'template';
+$lang['err_periods'] = 'periods must be integer values';
+$lang['err_periods_2'] = 'periods must be superior to 0. The long period must be grater than the short period.';
+$lang['create_cookie'] = 'create a cookie';
+$lang['customize_day'] = 'day';
+$lang['customize_week'] = 'week';
+$lang['customize_month'] = 'month';
+$lang['customize_year'] = 'year';
+$lang['slideshow'] = 'slideshow';
+$lang['period_seconds'] = 'seconds per picture';
+$lang['slideshow_stop'] = 'stop the slideshow';
+$lang['comment_added'] = 'Your comment has been registered';
+$lang['comment_to_validate'] = 'An administrator must authorize your comment before it is visible.';
+$lang['comment_anti-flood'] = 'Anti-flood system : please wait for a moment before trying to post another comment';
+$lang['comment_user_exists'] = 'This login is already used by another user';
+$lang['invalid_search'] = 'Searched words must be grater than 3 characters and must not contain punctuation mark';
+$lang['search_mode_or'] = 'alespoò jedno ze slov';
+$lang['search_mode_and'] = 'vechny slova';
+$lang['search_comments'] = 'oddìlte odliná slova mezerami';
+$lang['upload_name'] = 'Název obrázku';
+$lang['upload_author'] = 'Autor (napø. "Pierrick LE GALL")';
+$lang['upload_creation_date'] = 'Datum vytvoøení (DD/MM/YYYY)';
+$lang['upload_comment'] = 'Komentáø';
+$lang['mail_hello'] = 'Ahoj,';
+$lang['mail_new_upload_subject'] = 'Nový obrázek v galerii';
+$lang['mail_new_upload_content'] = 'Do galerie byl uploadován nový obrázek. Èeká na Vae ovìøení. Pøihlate se jako administrátor a povolte nebo zamítnìte tento obrázek.';
+$lang['mail_new_comment_subject'] = 'V gelerii je nový komentáø.';
+$lang['mail_new_comment_content'] = '??? Do geleri pøibyl nový komentáø. Pokud zvolíte ovìøovat kadý komentáø, you first have to validate this comment in the administration panel to make it visible in the gallery.'."\n\n".'You can see last comments in the administration panel';
+$lang['connected_user'] = 'pøihláený uivatel';
+$lang['title_comments'] = 'Komentáøe uivatelù';
+$lang['stats_last_days'] = 'poslední dny';
+$lang['hint_comments'] = 'Zobraz nejnovìjí komentáøe uivatele';
+$lang['menu_login'] = 'pøihlásit';
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+  $lang['title_liste_users'] = 'Seznam uivatelù';
+  $lang['title_history'] = 'Historie';
+  $lang['title_update'] = 'Aktualizovat databázi';
+  $lang['title_configuration'] = 'Konfigurace PhpWebGallery';
+  $lang['title_instructions'] = 'Manuál';
+  $lang['title_categories'] = 'Správa kategorií';
+  $lang['title_edit_cat'] = 'Editovat kategorii';
+  $lang['title_info_images'] = 'Zmìnit informace kategorie tohoto obrázku';
+  $lang['title_thumbnails'] = 'Vytvoøit náhledy';
+  $lang['title_thumbnails_2'] = 'pro';
+  $lang['title_default'] = 'Administrace PhpWebGallery';
+  $lang['menu_title'] = 'Administrace';
+  $lang['menu_config'] = 'Konfigurace';
+  $lang['menu_users'] = 'Uivatelé';
+  $lang['menu_add_user'] = 'pøidat';
+  $lang['menu_list_user'] = 'seznam';
+  $lang['menu_categories'] = 'Kategorie';
+  $lang['menu_update'] = 'Aktualizovat databázi';
+  $lang['menu_thumbnails'] = 'Náhledy';
+  $lang['menu_history'] = 'Historie';
+  $lang['menu_instructions'] = 'Manuál';
+  $lang['menu_back'] = 'Zpìt do galerie';
+  $lang['title_waiting'] = 'Obrázky èekající na ovìøení';
+  $lang['menu_waiting'] = 'Ovìøení uploadù';
+  $lang['default_message'] = 'PhpWebGallery administration panel';
+  $lang['conf_err_prefixe'] = 'thumbnail\'s prefix mustn\'t contain any accentued character';
+  $lang['conf_err_mail'] = 'e-mail address refused, it must be like name@server.com';
+  $lang['conf_err_sid_size'] = 'the session identifier size must be an integer value between 4 and 50';
+  $lang['conf_err_sid_time'] = 'the session time must be an integer value between 5 and 60';
+  $lang['conf_err_max_user_listbox'] = 'the max user listbox number must be an integer value between 0 and 255';
+  $lang['conf_confirmation'] = 'Information data registered in database';
+  $lang['conf_general_title'] = 'Hlavní konfigurace';
+  $lang['conf_general_webmaster'] = 'pøihláení webmastera';
+  $lang['conf_general_webmaster_info'] = 'Bude zobrazeno vem. Je dùleité pro administraci.';
+  $lang['conf_general_mail'] = 'e-mail adresa webmastera';
+  $lang['conf_general_mail_info'] = 'Hosté budou moci pouít tento kontakt';
+  $lang['conf_general_prefix'] = 'prefix náhledu';
+  $lang['conf_general_prefix_info'] = 'náhledy obrázkù pouívají tuto pøedponu. Pokud si nejste jisti, nevyplòujte.';
+  $lang['conf_general_access'] = 'typ pøístupu';
+  $lang['conf_general_access_1'] = 'volný';
+  $lang['conf_general_access_2'] = 'omezený';
+  $lang['conf_general_access_info'] = '- volný : kdokoli mùe vstoupit na stránky, kdokoli mùe vytvoøit úèet s právy mìnit vzhled stránek<br />- omezený : úèty vytváøí webmaster. Pouze registrovaní uivatelé mohou vstupovat na stránky';
+  $lang['conf_general_max_user_listbox'] = 'poèet uivatelù v listboxu pøihláení';
+  $lang['conf_general_max_user_listbox_info'] = '- poèet uivatelù zobrazených v listboxu na pøihlaovaí stránce. Pokud je uivatelù stránek více, zobrazí se pouze textové zadávání. <br />- zadejte èíslo mezí 0 a 255, 0 znamená, e chcete zobrazit listbox';
+  $lang['conf_comments'] = 'komentáøe uivatelù';
+  $lang['conf_comments_title'] = 'Konfigurace: '.$lang['conf_comments'];
+  $lang['conf_comments_show_comments'] = $lang['conf_comments'];
+  $lang['conf_comments_show_comments_info'] = 'display the users comments under each picture ?';
+  $lang['conf_comments_comments_number'] = 'number of comments per page';
+  $lang['conf_comments_comments_number_info'] = 'number of comments to display on each page. This number is unlimited for a picture. Enter a number between 5 and 50.';
+  $lang['conf_err_comment_number'] = 'The number of comments a page must be between 5 and 50 included.';
+  $lang['conf_remote_site_delete_info'] = 'Deleting a remote server will delete all the image and the categories in relation with this server.';
+  $lang['conf_upload_title'] = 'Konfigurace uploadù';
+  $lang['conf_upload_available'] = 'povolit upload obrázkù';
+  $lang['conf_upload_maxfilesize'] = 'maximílní velikost souboru s obrázkem';
+  $lang['conf_upload_maxfilesize_info'] = 'Maximílní velikost uploadovaného souboru s obrázkem. Musí být èíslo mezi 10 a 1000 KB.';
+  $lang['conf_err_upload_maxfilesize'] = 'Maximílní velikost uploadovaného souboru s obrázkem musí být èíslo mezi 10 a 1000 KB.';
+  $lang['conf_upload_maxwidth'] = 'maximílní íøka';
+  $lang['conf_upload_maxwidth_info'] = 'Maximílní íøka uploadovaných obrázkù. Musí být èíslo vìtí ne 10 pixelù.';
+  $lang['conf_err_upload_maxwidth'] = 'maximílní íøka uploadovaných obrázkù musí být èíslo vìtí ne 10 pixelù.';
+  $lang['conf_upload_maxheight'] = 'maximílní výka';
+  $lang['conf_upload_maxheight_info'] = 'Maximílní výka uploadovaných obrázkù. Musí být èíslo vìtí ne 10 pixelù.';
+  $lang['conf_err_upload_maxwidth'] = 'maximílní výka uploadovaných obrázkù musí být èíslo vìtí ne 10 pixelù.';
+  $lang['conf_upload_maxwidth_thumbnail'] = 'maximální íøka náhledu';
+  $lang['conf_upload_maxwidth_thumbnail_info'] = 'Maximální íøka náhledu. Musí být vìtí ne 10 pixelù.';
+  $lang['conf_err_upload_maxwidth_thumbnail'] = 'Maximální íøka náhledu musí být vìtí ne 10 pixelù.';
+  $lang['conf_upload_maxheight_thumbnail'] = 'maximální výka náhledu';
+  $lang['conf_upload_maxheight_thumbnail_info'] = 'Maximální výka náhledu. Musí být vìtí ne 10 pixelù.';
+  $lang['conf_err_upload_maxheight_thumbnail'] = 'Maximální výka náhledu musí být vìtí ne 10 pixelù.';
+  $lang['conf_default_title'] = 'Implicitní nastavení zobrazení pro neregistrované uivatele a nové uivatele';
+  $lang['conf_default_language_info'] = 'default language';
+  $lang['conf_default_theme_info'] = 'implicitní téma';
+  $lang['conf_session_title'] = 'Konfigurace session';
+  $lang['conf_session_size'] = 'délka identifikátoru';
+  $lang['conf_session_size_info'] = '- èím delí je identifikátor, tím bezpeènìjí je aplikace<br />- zadejte èíslo mezi 4 a 50';
+  $lang['conf_session_time'] = 'období platnosti';
+  $lang['conf_session_time_info'] = '- kratí období = vyí bezpeènost<br />- zadejte èíslo mezi 5 a 60, v minutách';
+  $lang['conf_session_key'] = 'klíèové slovo';
+  $lang['conf_session_key_info'] = '- klíèové slovo sezení zlepuje zakódování identifikátoru<br />- zadejte jakoukoli vìtu kratí ne 255 znakù';
+  $lang['conf_session_delete'] = 'mazat neplatné session';
+  $lang['conf_session_delete_info'] = 'je doporuèeno smazat tabulku session v databázi';
+  $lang['user_err_modify'] = 'Tento uivatel nemùe být modifikován nebo smazán';
+  $lang['user_err_unknown'] = 'Tento uivatel v databázi neexistuje';
+  $lang['adduser_info_message'] = 'Registraèní údaje uivatele ';
+  $lang['adduser_info_password_updated'] = '(heslo aktualizováno)';
+  $lang['adduser_info_back'] = 'zpìt na seznam';
+  $lang['adduser_fill_form'] = 'Prosím, vyplòte následující formuláø';
+  $lang['adduser_unmodify'] = 'nemodifikovaný';
+  $lang['adduser_status'] = 'stav';
+  $lang['adduser_status_admin'] = 'administátoøi';
+  $lang['adduser_status_guest'] = 'hosté';
+  $lang['permuser_info_message'] = 'Registrovaná práva';
+  $lang['permuser_title'] = 'Omezení uivatele';
+  $lang['permuser_warning'] = 'Varovaní : "<span style="font-weight:bold;">pøístup odmítnut</span>" do koøene kategorie chrání pøed pøístupem do celé kategorie';
+  $lang['permuser_authorized'] = 'oprávnìný';
+  $lang['permuser_forbidden'] = 'odmítnut';
+  $lang['permuser_parent_forbidden'] = 'nadøazená kategorie nepøístupna';
+  $lang['listuser_confirm'] = 'Opravdu chcete smazat tohoto uivatele';
+  $lang['listuser_info_deletion'] = 'byl(a) odstranìn(a) z databáze';
+  $lang['listuser_user_group'] = 'Uivatelské skupiny';
+  $lang['listuser_modify'] = 'zmìnit';
+  $lang['listuser_modify_hint'] = 'zmìnit informace';
+  $lang['listuser_permission'] = 'práva';
+  $lang['listuser_permission_hint'] = 'modify permissions of';
+  $lang['listuser_delete'] = 'delete';
+  $lang['listuser_delete_hint'] = 'delete user';
+  $lang['listuser_button_all'] = 'all';
+  $lang['listuser_button_invert'] = 'invert';
+  $lang['listuser_button_create_address'] = 'create mail address';
+  $lang['cat_invisible'] = 'invisible';
+  $lang['cat_edit'] = 'Editovat';
+  $lang['cat_up'] = 'Nahoru';
+  $lang['cat_down'] = 'Dolù';
+  $lang['cat_image_info'] = 'Obrázky->info';
+  $lang['cat_total'] = 'celkem';
+  $lang['editcat_confirm'] = 'Informace byly uloeny v databázi';
+  $lang['editcat_back'] = 'seznam kategorií';
+  $lang['editcat_title1'] = 'Editace';
+  $lang['editcat_name'] = 'Název';
+  $lang['editcat_comment'] = 'Komentáø';
+  $lang['editcat_status'] = 'Stav';
+  $lang['infoimage_general'] = 'Obecné nastavní pro kategorii';
+  $lang['infoimage_useforall'] = 'pouít pro vechny obrázky?';
+  $lang['infoimage_creation_date'] = 'datum vytvoøení';
+  $lang['infoimage_detailed'] = 'Nastavení pro jednotlivé obrázky';
+  $lang['infoimage_title'] = 'nadpis';
+  $lang['infoimage_comment'] = 'komentáø';
+  $lang['update_missing_tn'] = 'chybí náhled pro';
+  $lang['update_disappeared_tn'] = 'náhled the thumbnail zmizel';
+  $lang['update_disappeared'] = 'neexistuje';
+  $lang['update_part_deletion'] = 'Smazání obrázkù, které nemají náhled nebo které neexistují';
+  $lang['update_deletion_conclusion'] = 'obrázky byly odstranìny z databáze';
+  $lang['update_part_research'] = 'Hledat nové obrázky v adresáøích';
+  $lang['update_research_added'] = 'pøidán';
+  $lang['update_research_tn_ext'] = 'náhled v';
+  $lang['update_research_conclusion'] = 'obrázky byly vloeny do databáze';
+  $lang['update_default_title'] = 'Zvolte';
+  $lang['update_only_cat'] = 'aktualizovat kategorie, ne obrazky';
+  $lang['update_all'] = 'aktualizovat ve';
+  $lang['tn_width'] = 'íøka';
+  $lang['tn_height'] = 'výka';
+  $lang['tn_no_support'] = 'Obrázek je nedosaitelný nebo nepodporovaný';
+  $lang['tn_format'] = 'pro formát souboru';
+  $lang['tn_thisformat'] = 'pro tento formát souboru';
+  $lang['tn_err_width'] = 'íøka musí být èíslo vyí ne';
+  $lang['tn_err_height'] = 'výka musí být èíslo vyí ne';
+  $lang['tn_results_title'] = 'Výsledek miniaturizace';
+  $lang['tn_picture'] = 'obrázek';
+  $lang['tn_results_gen_time'] = 'vygenerováno bìhem';
+  $lang['tn_stats'] = 'Hlavní statistiky';
+  $lang['tn_stats_nb'] = 'poèet zmenených obrázkù';
+  $lang['tn_stats_total'] = 'celkový èas';
+  $lang['tn_stats_max'] = 'maximální èas';
+  $lang['tn_stats_min'] = 'minimální èas';
+  $lang['tn_stats_mean'] = 'prùmìrný èas';
+  $lang['tn_err'] = 'Udìlali jste chybu';
+  $lang['tn_params_title'] = 'Parametry pro miniaturizaci';
+  $lang['tn_params_GD'] = 'GD verze';
+  $lang['tn_params_GD_info'] = '- GD je knihovna pro práci s obrázky pro jazyk PHP<br />-zvolte verzi, která je nainstalována na Vaem serveru. Pokud zvolíte patnì, zobrazí se pouze chybové hláky, vrate se zpìt a zkuste to s výbìrem jiné verze. Pokud nefunguje ani jedna verze, znamená to, e na Vaem serveru není nainstalována knihovna GD.';
+  $lang['tn_params_width_info'] = 'maximální íøka, kterou náhled mùe mít';
+  $lang['tn_params_height_info'] = 'maximální výka, kterou náhled mùe mít';
+  $lang['tn_params_create'] = 'vytvoøit';
+  $lang['tn_params_create_info'] = 'Nezkouejte zmenovat pøíli mnoho obrázkù najednou.<br />Zpracování spotøebuje hodnì èasu procesoru. Pokud máte nainstalovanou PhpWebGallery na free hostingu, pøíli velké zatíení procesoru mùe vést ke zruení Vaeho hostingového úètu.';
+  $lang['tn_params_format'] = 'formát souboru';
+  $lang['tn_params_format_info'] = 'pro vytváøení náhledu je podporován pouze formát jpeg';
+  $lang['tn_alone_title'] = 'obrázek bez náhledu (pouze jpeg a png)';
+  $lang['tn_dirs_title'] = 'Seznam adresáøù';
+  $lang['tn_dirs_alone'] = 'obrázky bez náhledù';
+  $lang['help_images_title'] = 'Pøidávání obrázkù';
+  $lang['help_images_intro'] = 'Jak umístit obrázky ve Vaich adresáøích';
+  $lang['help_images'][0] = 'v adresáøi "galleries", vytvoøte podadresáøe, které budou reprezentovat Vae kategorie';
+  $lang['help_images'][1] = 'v kadém adresáøi mùete vytvoøit dalí podadresáøe. Jejich poèet není omezen.';
+  $lang['help_images'][2] = 'you can create as many categories and sub-categories for each category as you wish';
+  $lang['help_images'][3] = 'picture files must have jpeg format (extension jpg or JPG), gif format (extension gif or GIF) or png format (extension png or PNG).';
+  $lang['help_images'][4] = 'try not to use blank space " " or hyphen "-" in picture files, I advise you to use underscore "_" character which is managed by PhpWebGallery and will provide better results';
+  $lang['help_thumbnails_title'] = 'Thumbnails';
+  $lang['help_thumbnails'][0] = 'in each directory containing picture to display on your site, there is a sub-directory nammed "thumbnail", if it doesn\'t exist, create it to place your thumbnails into it.';
+  $lang['help_thumbnails'][1] = 'thumbnails don\'t need to have the same extension as their associated picture (a picture with .jpg extension can have a thumbnail in .GIF extention for instance).';
+  $lang['help_thumbnails'][2] = 'the thumbnail associated to a picture must be prefixed with the prefix given on the configuration page(image.jpg -> TN_image.GIF for instance).';
+  $lang['help_thumbnails'][3] = 'I advise you to use the module for windows downloadable on the presentation site of PhpWebGallery for thumbnails management.';
+  $lang['help_thumbnails'][4] = 'you can use the thumbnail creation page integrated in PhpWebGallery, but I don\'t advice you so, because thumbnail quality may be poor and it uses a high CPU load which can be a problem if you use free web hosting.';
+  $lang['help_thumbnails'][5] = 'if you choose to use your hosting provider to create thumbnails, you must give 775 rights on "galleries" folder and all its sub-folders.';
+  $lang['help_database_title'] = 'Updating database';
+  $lang['help_database'][0] = 'once pictures files and thumbnails correctly placed in the directories, clic on "database update" in the menu of the administration panel.';
+  $lang['help_infos_title'] = 'Miscellanous informations';
+  $lang['help_infos'][1] = 'As soon as you created your gallery, go in the user list and modify permissions for user "visiteur". Indeed, every new registered users will have by default the same permissions as "visiteur" user.';
+  $lang['help_remote_title'] = 'Remote site';
+  $lang['help_remote'][0] = 'PhpWebGallery offers the possibility to use several servers to store the images which will compose your gallery. It can be useful if your gallery is installed on one limited space and that you have a big quantity of images to be shown. Please , follow this procedure : ';
+  $lang['help_remote'][1] = '1. edit file "create_listing_file.php" (you will find it in the directory "admin"), by modifying the line "$prefix_thumbnail = "TN-";" if the prefix for your thumbnails is not "TN-".';
+  $lang['help_remote'][2] = '2. place file "create_listing_file.php" modified on your distant website, in the root directory of your directories of images  (as the directory "galleries" of this website) by ftp.';
+  $lang['help_remote'][3] = '3. launch script using the url http://domaineDistant/repGalerie/create_listing_file.php, a file listing.xml has just been created.';
+  $lang['help_remote'][4] = '4. get back file listing.xml from your distant website to place it in directory "admin" of this website.';
+  $lang['help_remote'][5] = '5. please , launch an update of the data of images by the interface of administration, once the listing.xml used file, kill it from the directory "admin".';
+  $lang['help_remote'][6] = 'You can update the contents of a distant website by redoing the described manipulation. You can also kill a distant website by choosing the option in the configuration section of the administration panel.';
+  $lang['help_upload_title'] = 'Added images by users';
+  $lang['help_upload'][0] = 'PhpWebGallery offers the possibility for users to upload images. in order to do it :';
+  $lang['help_upload'][1] = '1. authorize the option in the configuration zone of the administration panel';
+  $lang['help_upload'][2] = '2. authorize the rights in writing in the images directories';
+  $lang['install_message'] = 'Message';
+  $lang['step1_confirmation'] = 'Parameters are correct';
+  $lang['step1_err_db'] = 'Pøipojení k serveru bylo úspìné, ale nebylo moné pøipojit se k databázi';
+  $lang['step1_err_server'] = 'Can\'t connect to server';
+  $lang['step1_err_copy_2'] = 'The next step of the installation is now possible';
+  $lang['step1_err_copy_next'] = 'next step';
+  $lang['step1_title'] = 'Krok 1/2';
+  $lang['step1_host'] = 'MySQL host';
+  $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
+  $lang['step1_user'] = 'Uivatel';
+  $lang['step1_user_info'] = 'uivatelské jméno pøidìlené poskytovatelem hostingu';
+  $lang['step1_pass'] = 'Heslo';
+  $lang['step1_pass_info'] = 'heslo pøidìlené poskytovatelem hostingu';
+  $lang['step1_database'] = 'Jméno databáze';
+  $lang['step1_database_info'] = 'jméno databáze pøidìlené poskytovatelem hostingu';
+  $lang['step1_prefix'] = 'Pøedpona databázových tabulek';
+  $lang['step1_prefix_info'] = 'tabulky v databázi budou mít pøed jménem tuto pøedponu (správa db je pak pøehlednìjí)';
+  $lang['step2_err_login1'] = 'zadejte jméno pro vytvoøení administrátorského úètu';
+  $lang['step2_err_login3'] = 'administrátorský úèet nesmí obsahovat znaky \' a "';
+  $lang['step2_err_pass'] = 'prosím zadejte Vae heslo znovu';
+  $lang['step2_err_mail'] = $lang['conf_err_mail'];
+  $lang['install_end_title'] = 'Instalace dokonèena';
+  $lang['install_end_message'] = 'Konfigurace byla dokonèena, následuje dalí krok.<br /><br />
+Z bezpeènostních dùvodù, prosím smate soubor "install.php" v adresáøi "admin"<br />
+Jakmile je smazán, pokraèujte podle následujících instrukcí :
+<ul>
+  <li>pøejdìte na pøihlaovací stránku : [ <a href="../identification.php">pøihláení</a> ] a pouijte uivatelské jméno/heslo webmastera</li>
+  <li>takto pøihláeni budete moci pøejít do [ <a href="admin.php">administrátorské sekce</a> ] a k návodu jak umístit obrázky v adresáøích</li>
+</ul>';
+  $lang['step2_title'] = 'Krok 2/2';
+  $lang['step2_pwd'] = 'heslo webmastera';
+  $lang['step2_pwd_info'] = 'Dobøe uschovejte, umoní Vám pøístup do administrace';
+  $lang['step2_pwd_conf'] = 'potvrdit heslo';
+  $lang['step2_pwd_conf_info'] = 'Potvrzení';
+  // new or modified in release 1.3
+  $lang['remote_site'] = 'Vzdálená sí';
+  $lang['title_add'] = 'Pøidat uivatele';
+  $lang['title_modify'] = 'Modifikovat uivatele';
+  $lang['title_groups'] = 'Správa skupin';
+  $lang['title_user_perm'] = 'Zmìnit práva uivatele';
+  $lang['title_cat_perm'] = 'Zmìnit práva kategorie';
+  $lang['title_group_perm'] = 'Zmìnit práva skupiny';
+  $lang['title_picmod'] = 'Zmìnit informace o obrázku';
+  $lang['menu_groups'] = 'Skupiny';
+  $lang['menu_comments'] = 'Komentáøe';
+  $lang['conf_general_log'] = 'historie';
+  $lang['conf_general_log_info'] = 'Vytváøet histirii pøístupù na stránkách? Pøístupy budou zobrazeny v administraci v sekci historie';
+  $lang['conf_general_mail_notification'] = 'upozornìní e-mailem';
+  $lang['conf_general_mail_notification_info'] = 'Automatické upozornìní e-mailem (jen pro administrátory), kdy uivatel pøidá komentáø nebo uploadne obrázek.';
+  $lang['conf_comments_validation'] = 'ovìøení';
+  $lang['conf_comments_validation_info'] = 'Administrátor ovìøí komentáøe zadané uivateli pøedtím, ne budou viditelné na stránkách';
+  $lang['conf_comments_forall'] = 'vichni uivatelé?';
+  $lang['conf_comments_forall_info'] = 'Také hosté (bez uivatelského úètu) mohou zadávat komentáøe';
+  $lang['conf_default_nb_image_per_row_info'] = 'poèet obrázkù na øádek, implicitnì';
+  $lang['conf_default_nb_row_per_page_info'] = 'poèet øádkù na stránce, implicitnì';
+  $lang['conf_default_short_period_info'] = 'Ve dnech. Období, ve kterém jsou obrázky zobrazeny s èervenou znaèkou. Krátké období musí být vìtí ne 1 den.';
+  $lang['conf_default_long_period_info'] = 'Ve dnech. Období, ve kterém jsou obrázky zobrazeny s zelenou znaèkou. Dlouhé období musí být vìtí ne hodnota krátkého období.';
+  $lang['conf_default_expand_info'] = 'Rozbalit vechny kategorie v menu?';
+  $lang['conf_default_show_nb_comments_info'] = 'Zobrazit poèet komentáøù pro kadý obrázek na stránce s náhledy.';
+  $lang['conf_default_maxwidth_info'] = 'Maximální íøka pro zobrazení obrázku: obrázek bude mít novou íøku (jen pro zobrazení), soubor s obrázkem se nijak nezmìní. Ponechte prázdné pokud nechcete mít ádný limit.';
+  $lang['conf_default_maxheight_info'] = 'Stejné jako pøedchozí, ale pro výku.';
+  $lang['conf_session_cookie'] = 'autorizaèní cookie';
+  $lang['conf_session_cookie_info'] = 'uivatelé se nemusí pokadé pøihlaovat, www prohlíeè si uloí cookie. Je to ménì bezpeèné.';
+  $lang['adduser_associate'] = 'Pøiøadit ke skupinì';
+  $lang['group_add'] = 'Pøidat skupinu';
+  $lang['group_add_error1'] = 'Jméno skupiny nesmí obsahovat znaky " nebo \'';
+  $lang['group_add_error2'] = 'Jméno skupiny ji existuje';
+  $lang['group_confirm'] = 'Opravdu chcete smazat tuto skupinu?';
+  $lang['group_list_title'] = 'Seznam existujících skupin';
+  $lang['group_err_unknown'] = 'Tato skupina v databázi neexistuje';
+  $lang['cat_permission'] = 'práva';
+  $lang['cat_update'] = 'aktualizovat';
+  $lang['cat_add'] = 'Pøidat virtuílní kategorii';
+  $lang['cat_parent'] = 'nadøazená kategorie';
+  $lang['cat_error_name'] = 'Jméno skupiny nesmí být prázdné';
+  $lang['cat_virtual'] = 'virtuální';
+  $lang['cat_first'] = 'Na zaèátek';
+  $lang['cat_last'] = 'Na konec';
+  $lang['editcat_visible_info'] = '(viditelné jen pro administrátora)';
+  $lang['editcat_visible'] = 'Viditelná';
+  $lang['editcat_uploadable'] = 'Upload povolen';
+  $lang['infoimage_keyword_separation'] = '(separate with coma ",")';
+  $lang['infoimage_addtoall'] = 'pøidat do vech';
+  $lang['infoimage_removefromall'] = 'odstranit ze vech';
+  $lang['infoimage_associate'] = 'Pøipojit ke kategorii';
+  $lang['update_wrong_dirname'] = 'Jména adresáøù a souborù se musejí skládat z písmen, èíslic, znakù "-", "_" nebo "."';
+  $lang['stats_pages_seen'] = 'navtívených stránek';
+  $lang['stats_visitors'] = 'hosté';
+  $lang['stats_empty'] = 'vyprázdnit historii';
+  $lang['stats_pages_seen_graph_title'] = 'Zobrazených stránek za den';
+  $lang['stats_visitors_graph_title'] = 'Poèet hostù za den';
+  $lang['comments_last_title'] = 'Poslední komentáøe';
+  $lang['comments_non_validated_title'] = 'Komentáøe èekající na ovìøení';
+  $lang['help_database'][1] = 'In order to avoid the update of too many pictures in a single update, I advise to start by updating only categories, then on the categories section of the administration panel, update each category thanks to the link "update"';
+  $lang['help_upload'][3] = 'The category must have upload available itself for upload.';
+  $lang['help_upload'][4] = 'Uploaded images by the users are not directly visible on the website, they must be validated by an administrator.  For that purpose, an administrator must go on the page "en attente" of the administration panel, to validate or to refuse the images proposed, then launch an update of the images data.';
+  $lang['help_virtual_title'] = 'Links between pictures and categories and virtual categories';
+  $lang['help_virtual'][0] = 'PhpWebGallery is able to dissociate categories where pictures are stored and categories where pictures are shown.';
+  $lang['help_virtual'][1] = 'By default, pictures are shown only in their real categories : the ones corresponding to directories on the web server.';
+  $lang['help_virtual'][2] = 'To link a picture to a category, you just have to make the association on the page of picture informations or on the informations of all pictures of a category.';
+  $lang['help_virtual'][3] = 'Using this principle, it is possible to create virtual categories in PhpWebGallery : no real directory coresponds to this category. You just have to create this category on the section "categories" of the admin panel.';
+  $lang['help_groups_title'] = 'Users Groups';
+  $lang['help_groups'][0] = 'PhpWebGallery is able to manage groups of users. It can be very useful to have common permission access for private categories.';
+  $lang['help_groups'][1] = '1. Create the group "family" on the section "Groups" of admin panel.';
+  $lang['help_groups'][2] = '2. On the section "Users", edit on of them and associate him to the group "family".';
+  $lang['help_groups'][3] = '3. By modifying the permissions for a category or for a group, you\'ll see that all categories accessible for a group are accessible for its members.';
+  $lang['help_groups'][4] = 'A user can belong to several groups. The authorization is stronger than prohibition : if a user "jack" belongs to the group "family" and "friends", and that only group "family" can see category "Christmas 2003", "jack" will be able to see "Christmas 2003".';
+  $lang['help_access_title'] = 'Access authorization';
+  $lang['help_access'][0] = 'PhpWebGallery is able to forbid access to categories. Categories can be "public" or "private". In order to forbid access to a category :';
+  $lang['help_access'][1] = '1. Modify category informations (from the "categories" section in tha admin panel) and make it "private".';
+  $lang['help_access'][2] = '2. On the page of permissions (for a group or a user) the private category will be shown and you\'ll be able to authorize access or not.';
+  $lang['help_infos'][2] = 'If you have any question, do not hesitate to take a look at the forum or ask a question there. The <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> (message board) is available on the presentation site of PhpWebGallery.';
+  $lang['step1_err_copy'] = 'Copy the text between hyphens and paste it into the file "include/mysql.inc.php"(Warning : mysql.inc.php must only contain what is in blue, no line return or space character)';
+  $lang['permuser_only_private'] = 'Jsou zobrazeny jen soukromé kategorie';
+  $lang['waiting_update'] = 'Ovìøené obrázky se zobrazí a po aktualizaci databáze';
+  $lang['conf_upload_available_info'] = 'Authorizing the upload of pictures by users on the categories of the website (not on a remote server). This is general parameter, it is needed to authorize upload category by category, by default, no category is "uploadable".';
+  $lang['install_help'] = 'Potøebujete pomoc ? Ptejte se v <a href="http://forum.phpwebgallery.net">PhpWebGallery</a>.';
+  $lang['install_warning'] = 'Soubor "admin/install.php" je stále pøítomen. Prosím smate jej z Vaeho serveru.  Nechávat jej na serveru není bezpeèné.';
+
+   // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'This category is unknown in the database';
+
+}
+?>
Index: /branches/1.3/language/deutsch.php
===================================================================
--- /branches/1.3/language/deutsch.php	(revision 3252)
+++ /branches/1.3/language/deutsch.php	(revision 3252)
@@ -0,0 +1,560 @@
+<?php
+/***************************************************************************
+ *                                deutsch.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   Deutsche Übersetzung von SPriTTeR!                                    *
+ *   Firstname     : Alexander                                             *
+ *   Lastname      : Meinecke                                              *
+ *   Nick          : alex, spritter, Hans ;-)                              *
+ *   e-Mail        : spritter@gmx.de                                       *
+ *                                                                         *
+ ***************************************************************************/
+
+$lang['only_members'] = 'Nur Mitglieder k&ouml;nnen diese Seite betreten';
+$lang['invalid_pwd'] = 'Falsches Passwort!';
+$lang['access_forbiden'] = 'Du bist nicht autorisiert diese Seite zu betreten';
+$lang['submit'] = 'Senden';
+$lang['login'] = 'Login';
+$lang['password'] = 'Passwort';
+$lang['new'] = 'Neu';
+$lang['delete'] = 'L&ouml;schen';
+$lang['category'] = 'Ordner';
+$lang['thumbnail'] = 'Thumbnail';
+$lang['date'] = 'Datum';
+$lang['diapo_default_page_title'] = 'Kein Ordner ausgew&auml;hlt';
+$lang['thumbnails'] = 'Thumbnails';
+$lang['categories'] = 'Ordner';
+$lang['hint_category'] = 'Zeigt Bilder auf unterster Ebene dieses Ordners';
+$lang['total_images'] = 'Gesamt';
+$lang['title_menu'] = 'Men&uuml;';
+$lang['change_login'] = 'Login &auml;ndern';
+$lang['login'] = 'Login';
+$lang['hint_login'] = 'Mit einer Anmeldung ist es m&ouml;glich das Aussehen der Seite anzupassen';
+$lang['logout'] = 'Logout';
+$lang['customize'] = 'Einstellungen';
+$lang['hint_customize'] = 'Layout, Bildgr&ouml;sse, etc. anpassen';
+$lang['hint_search'] = 'Suche nach einem Bild';
+$lang['search'] = 'Suchen';
+$lang['favorite_cat'] = 'Favoriten';
+$lang['favorite_cat_hint'] = 'pers&ouml;nlliche Favoriten ansehen';
+$lang['about'] = '&Uuml;ber';
+$lang['hint_about'] = 'Informationen zu PhpWebGallery...';
+$lang['admin'] = 'Admin';
+$lang['hint_admin'] = 'Nur f6uuml;r Administratoren';
+$lang['no_category'] = 'W&auml;hle links einen Ordner aus.<br />Die Bilder kannst Du dann auch kommentieren...';
+$lang['page_number'] = 'Seite';
+$lang['previous_page'] = 'zur&uuml;ck';
+$lang['next_page'] = 'vor';
+$lang['nb_image_category'] = 'Anzahl Bilder im Ordner';
+$lang['recent_image'] = 'Bilder neuer als';
+$lang['days'] = 'Tage';
+$lang['send_mail'] = 'Anmerkungen? Sende mir eine e-mail';
+$lang['title_send_mail'] = '[PhpWebGallery] Anmerkung zur Seite';
+$lang['sub-cat'] = 'Unterordner';
+$lang['images_available'] = 'Bilder in diesem Ordner';
+$lang['total'] = 'Bilder';
+$lang['upload_picture'] = 'F&uuml;ge ein Bild ein';
+$lang['registration_date'] = 'eingef&uuml;gt am';
+$lang['creation_date'] = 'erstellt am';
+$lang['comment'] = 'Kommentar';
+$lang['author'] = 'Autor';
+$lang['size'] = 'Gr&ouml;sse';
+$lang['filesize'] = 'Dateigr&ouml;sse';
+$lang['file'] = 'Dateiname';
+$lang['generation_time'] = 'Seite erstellt in';
+$lang['favorites'] = 'Favoriten';
+$lang['search_result'] = 'Suchergebnisse';
+$lang['about_page_title'] = '&Uuml;ber PhpWebGallery';
+$lang['about_title'] = '&Uuml;ber...';
+$lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Informationen zu PhpWebGallery</div>
+<ul>
+  <li>Diese Website basiert auf <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> Version '.$conf['version'].'. PhpWebGallery ist eine einfach zu benutzende online-Bildergallerie.</li>
+  <li>PhpWebGallery ist komplett in PHP erstellt (the elePHPant) und nutzt eine MySQL Datenbank (the SQuirreL).</li>
+  <li>Wenn Du Vorschl&auml;ge oder Anmerkungen hast, besuche bitte die offizielle Website von <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> und das dazugeh&ouml;hrende <a href="'.$conf['forum_url'].'" style="text-decoration:underline">Forum</a>.</li>
+</ul>';
+$lang['about_return'] = 'zur&uuml;ck';
+$lang['ident_page_title'] = 'Anmeldung';
+$lang['ident_title'] = 'Anmeldung';
+$lang['ident_register'] = 'Anmeldung';
+$lang['ident_forgotten_password'] = 'Passwort vergessen?';
+$lang['ident_guest_visit'] = 'Als Besucher anmelden';
+$lang['customize_page_title'] = 'Einstellungen';
+$lang['customize_title'] = 'Einstellungen';
+$lang['customize_nb_image_per_row'] = 'Anzahl Bilder pro Reihe';
+$lang['customize_nb_row_per_page'] = 'Anzahl Bilder pro Seite';
+$lang['customize_language'] = 'Sprache';
+$lang['maxwidth'] = 'maximale Anzeigebreite der Bilder';
+$lang['maxheight'] = 'maximale Anzeigeh&ouml;he der Bilder';
+$lang['err_maxwidth'] = 'maximale Anzeigebreite muss eine Zahl gr&ouml;sser 50 sein';
+$lang['err_maxheight'] = 'maximale Anzeigeh&ouml;he muss eine Zahl gr&ouml;sser 50 sein';
+$lang['previous_image'] = 'zur&uuml;ck';
+$lang['next_image'] = 'vor';
+$lang['back'] = 'Klicke in das Bild um auf die &Uuml;bersicht zur&uuml;ck zu gelangen';
+$lang['info_image_title'] = 'Bildinformation';
+$lang['link_info_image'] = 'Bildinformation &auml;ndern';
+$lang['true_size'] = 'Originalgr&ouml;sse';
+$lang['comments_title'] = 'Kommentare von Besuchern dieser Seite';
+$lang['comments_del'] = 'Kommentar l&ouml;schen';
+$lang['comments_add'] = 'Kommentar hinzuf&uuml;gen';
+$lang['month'][1] = 'Januar';
+$lang['month'][2] = 'Februar';
+$lang['month'][3] = 'M&auml;rz';
+$lang['month'][4] = 'April';
+$lang['month'][5] = 'Mai';
+$lang['month'][6] = 'Juni';
+$lang['month'][7] = 'Juli';
+$lang['month'][8] = 'August';
+$lang['month'][9] = 'September';
+$lang['month'][10] = 'Oktober';
+$lang['month'][11] = 'November';
+$lang['month'][12] = 'Dezember';
+$lang['day'][0] = 'Sonntag';
+$lang['day'][1] = 'Montag';
+$lang['day'][2] = 'Dienstag';
+$lang['day'][3] = 'Mittwoch';
+$lang['day'][4] = 'Donnerstag';
+$lang['day'][5] = 'Freitag';
+$lang['day'][6] = 'Samstag';
+$lang['add_favorites_alt'] = 'in den Favoriten-Ornder legen';
+$lang['add_favorites_hint'] = 'fuuml;ge dieses Bild deinem Favoriten-Ordner hinzu';
+$lang['del_favorites_alt'] = 'aus dem Favoriten-Ordner entfernen';
+$lang['del_favorites_hint'] = 'l&ouml;sche dieses Bild aus deinem Favoriten-Ordner';
+$lang['register_page_title'] = 'Anmeldung';
+$lang['register_title'] = 'Anmeldung';
+$lang['reg_err_login1'] = 'Gib bitte einen Benutzernamen ein';
+$lang['reg_err_login2'] = 'Der Benutzername darf nicht mit einem Leerzeichen enden';
+$lang['reg_err_login3'] = 'Der benutzername darf nicht mir einem Leerzeichen beginnen';
+$lang['reg_err_login4'] = 'Der Benutzername darf die Zeichen " and \' nicht enthalten';
+$lang['reg_err_login5'] = 'Der Benutzername ist schon vorhanden';
+$lang['reg_err_pass'] = 'Bitte Passwort wiederholen';
+$lang['reg_confirm'] = 'best&auml;tigen';
+$lang['reg_err_mail_address'] = 'Die e-mail Adeesse muss die Form xxx@yyy.eee haben (Beispiel : jack@altern.org)';
+$lang['search_title'] = 'Suche';
+$lang['invalid_search'] = 'Die Suche muss aus mindestens 3 Zeichen bestehen';
+$lang['search_field_search'] = 'Suche';
+$lang['search_return_main_page'] = 'Zur&uuml;ck zur Ordner&uuml;bersicht';
+$lang['upload_forbidden'] = 'In diesem Ordner kann man keine Bilder hochladen';
+$lang['upload_file_exists'] = 'Es gibt schon ein Bild mit diesem Namen';
+$lang['upload_filenotfound'] = 'Du musst eine Datei f&uuml;r das Bild ausw&auml;hlen';
+$lang['upload_cannot_upload'] = 'Das Bild kann nicht auf den Server geladen werden';
+$lang['upload_title'] = 'F&uuml;ge ein Bild hinzu';
+$lang['upload_advise'] = 'Suche ein Bild aus, dass du plazieren m&ouml;chtest im Ordner: ';
+$lang['upload_advise_thumbnail'] = 'Optional, aber Empfohlen: W&auml;hle ein Thumbnail ein f&uu;r ';
+$lang['upload_advise_filesize'] = 'Die Datei darf nicht gr&ouml;sser sein als: ';
+$lang['upload_advise_width'] = 'Die Bildbreite darf nicht gr&ouml;sser sein als: ';
+$lang['upload_advise_height'] = 'Die Bildh&ouml;he darf nicht gr&ouml;sser sein als: ';
+$lang['upload_advise_filetype'] = 'Das Bild muss im Format jpg, gif oder png sein';
+$lang['upload_err_username'] = 'Der Benutzername muss angegeben werden';
+$lang['upload_username'] = 'Benutzername';
+$lang['upload_successful'] = 'Das Bild wurde erfolgreich upgeloaded, ein Administrator wird das Bild bald freischalten.';
+// new or modified in release 1.3
+$lang['charset'] = 'iso-8859-1';
+$lang['no'] = 'Nein';
+$lang['yes'] = 'Ja';
+$lang['guest'] = 'Gast';
+$lang['mail_address'] = 'e-Mail';
+$lang['public'] = '&ouml;ffentlich';
+$lang['private'] = 'privat';
+$lang['add'] = 'hinzuf&uuml;gen';
+$lang['dissociate'] = 'trennen';
+$lang['mandatory'] = 'obligatorisch';
+$lang['err_date'] = 'falsches Datum';
+$lang['picture'] = 'Bild';
+$lang['IP'] = 'IP';
+$lang['close'] = 'Schliessen';
+$lang['open'] = '&Ouml;ffnen';
+$lang['keywords'] = 'Keywords';
+$lang['errors_title'] = 'Fehler';
+$lang['infos_title'] = 'Informationen';
+$lang['default'] = 'Default';
+$lang['comments'] = 'Kommentare';
+$lang['category_representative'] = 'Vertreter';
+$lang['stats'] = 'Statistik';
+$lang['most_visited_cat_hint'] = 'zeigt die meist gesehenen Bilder';
+$lang['most_visited_cat'] = 'Most Visited';
+$lang['best_rated_cat_hint'] = 'zeigt die am Besten bewerteten Bilder';
+$lang['best_rated_cat'] = 'Beste Bilder';
+$lang['recent_cat_hint'] = 'zeigt die neuesten Bilder';
+$lang['recent_cat'] = 'Neueste Bilder';
+$lang['recent_cat_title'] = 'Letzte Bilder';
+$lang['visited'] = 'Gesehen';
+$lang['times'] = 'Mal';
+$lang['customize_theme'] = 'Thema &auml;nern';
+$lang['customize_expand'] = 'Alle Ordner aufklappen';
+$lang['customize_show_nb_comments'] = 'Zeige die Anzahl an Kommentaren';
+$lang['customize_short_period'] = 'langer Zeitraum';
+$lang['customize_long_period'] = 'kurzer Zeitraum';
+$lang['customize_template'] = 'Template';
+$lang['err_periods'] = 'Zeitraum in ganzen Zahlen (Integer) eingeben';
+$lang['err_periods_2'] = 'Zeitraum muss gr&ouml;sser 0 sein. Der lange Zeitraum muss gr&ouml;sser als der kurze Zeitraum sein.';
+$lang['create_cookie'] = 'Cookie erzeugen';
+$lang['customize_day'] = 'Tag';
+$lang['customize_week'] = 'Woche';
+$lang['customize_month'] = 'Monat';
+$lang['customize_year'] = 'Jahr';
+$lang['slideshow'] = 'Slideshow';
+$lang['period_seconds'] = 'Sekunden pro Bild';
+$lang['slideshow_stop'] = 'Slideshow anhalten';
+$lang['comment_added'] = 'Dein Kommentar wurde aufgenommen';
+$lang['comment_to_validate'] = 'Ein Administrator muss den Kommentar autorisieren bevor dieser angezeigt wird.';
+$lang['comment_anti-flood'] = 'Anti-flood System: Bitte warte einen Moment bevor Du einen weiteren Kommentar sendest';
+$lang['comment_user_exists'] = 'Dieser Benutzername wird schon von einem anderen User genutzt';
+$lang['invalid_search'] = 'Suchw&ouml;rter m&uuml;ssen l&auml;nger als 3 Zeichen sein und d&uuml;rfen keine Satzzeichen enthalten';
+$lang['search_mode_or'] = 'mindestens ein Wort';
+$lang['search_mode_and'] = 'alle W&ouml;rter';
+$lang['search_comments'] = 'Suchw&ouml;rter mit Leerzeichen trennen';
+$lang['upload_name'] = 'Name des Bildes';
+$lang['upload_author'] = 'Autor (z.B. "Hans Wurst")';
+$lang['upload_creation_date'] = 'Datum der Aufnahme (DD/MM/YYYY)';
+$lang['upload_comment'] = 'Kommentar';
+$lang['mail_hello'] = 'Hi,';
+$lang['mail_new_upload_subject'] = 'Neue Bilder auf der Website';
+$lang['mail_new_upload_content'] = 'Es wurde ein neues Bild in die Bildergallerie eingestellt. Dieses muss validiert werden. Gehe in die Admin-Sektion und schalte das Bild frei oder lehne das Bild ab.';
+$lang['mail_new_comment_subject'] = 'Neuer Kommentar auf der Website';
+$lang['mail_new_comment_content'] = 'Es wurde ein neuer Kommentar in der Bildergallerie eingestellt. Wenn konfiguriert ist, jeden Kommentar zu validieren, dann musst du den Kommentar erst freischalten bevor dieser sichtbar wird.';
+$lang['connected_user'] = 'angemeldeter Benutzer';
+$lang['title_comments'] = 'Kommentare';
+$lang['stats_last_days'] = 'letzte Tage';
+$lang['hint_comments'] = 'sehe die letzten Kommentare von Benutzern an';
+$lang['menu_login'] = 'Login';
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+  $lang['title_liste_users'] = 'Benutzerliste';
+  $lang['title_history'] = 'Zugriffe';
+  $lang['title_update'] = 'Aktualisiere Datenbank';
+  $lang['title_configuration'] = 'Konfiguration';
+  $lang['title_instructions'] = 'Hilfe';
+  $lang['title_categories'] = 'Ordner - Einstellungen';
+  $lang['title_edit_cat'] = 'Ordner bearbeiten';
+  $lang['title_info_images'] = 'Bildinformationen eines Ordners &auml;ndern';
+  $lang['title_thumbnails'] = 'Thumbnail erstellen';
+  $lang['title_thumbnails_2'] = 'f&uuml;r';
+  $lang['title_default'] = 'Administration';
+  $lang['menu_title'] = 'PhpWebGallery - Administration';
+  $lang['menu_config'] = 'Konfiguration';
+  $lang['menu_users'] = 'Benutzer';
+  $lang['menu_add_user'] = 'hinzuf&uuml;gen';
+  $lang['menu_list_user'] = 'auflisten';
+  $lang['menu_categories'] = 'Ordner';
+  $lang['menu_update'] = 'Datenbank aktualisieren';
+  $lang['menu_thumbnails'] = 'Thumbnails';
+  $lang['menu_history'] = 'Zugriffe';
+  $lang['menu_instructions'] = 'Hilfe';
+  $lang['menu_back'] = 'Zur&uuml;ck zu den Ordnern';
+  $lang['title_waiting'] = 'Wartende Bilder';
+  $lang['menu_waiting'] = 'Wartende Bilder';
+  $lang['default_message'] = 'Administration von PhpWebGallery' ;
+  $lang['conf_err_prefixe'] = 'Der Pr&auml;fix der Thumbnails darf keine Akzente enthalten';
+  $lang['conf_err_mail'] = 'Die e-mail Adresse ist fehlerhaft, bitte im Format name@server.com angeben';
+  $lang['conf_err_sid_size'] = 'die L&auml;ge des Session Identifier muss ein ganzzahliger Wert zwischen 4 und 50 sein';
+  $lang['conf_err_sid_time'] = 'die G&uuml;ltigkeitsdauer einer Session muss ein integer Wert zwischen 5 und 60 sein';
+  $lang['conf_err_max_user_listbox'] = 'die Anzahl der maximalen Benutzer, die noch in einer Listbox angezeigt werden, muss ein ganzzahliger Wert zwischen 0 und 255 sein';
+  $lang['conf_confirmation'] = 'Informationen wurden in die Datenbank &uuml;bernommen';
+  $lang['conf_general_title'] = 'Hauptkonfiguration';
+  $lang['conf_general_webmaster'] = 'Webmaster Login';
+  $lang['conf_general_webmaster_info'] = '...wird den Besuchern angezeigt. Wichtig auch f&uuml;r die Administration der Website';
+  $lang['conf_general_mail'] = 'Webmaster e-mail Adresse';
+  $lang['conf_general_mail_info'] = 'Besucher k&ouml;nnen Dich unter dieser e-mail Adresse kontaktieren';
+  $lang['conf_general_prefix'] = 'Thumbnail Pr&auml;fix';
+  $lang['conf_general_prefix_info'] = 'Die Dateien der Thumbnails erhalten diesen Pr&auml;fix. Wenn Du nicht sicher bist, dann lass das so!';
+  $lang['conf_general_access'] = 'Art des Zugangs';
+  $lang['conf_general_access_1'] = 'frei';
+  $lang['conf_general_access_2'] = 'eingeschr&auml;nkt';
+  $lang['conf_general_access_info'] = '- frei: Jeder kann auf die Website zugreifen, jeder kann einen Account anlegen um das Erscheinungsbild der Website anzupassen.<br/>- eingeschr&auml;nkt : Der Webmaster erstellt die Benutzerkontens. Nur angemeldete Benutzer d&uuml;rfen auf die Website zugreifen';
+  $lang['conf_general_max_user_listbox'] = 'maximale Anzahl Benutzer, die in einer Listbox erscheinen';
+  $lang['conf_general_max_user_listbox_info'] = '- das ist die maximale Anzahl der angemeldeten Benutzer, die mittels einer Listbox anstatt einer einfachen Textbox auf der Anmeldeseite angezeigt werden.<br/>- Gib eine Zahl zwischen 0 und 255 ein, 0 bedeuted "immer Listbox" ';
+  $lang['conf_comments'] = 'Benutzerkommentare';
+  $lang['conf_comments_title'] = 'Konfiguration der Benutzerkommentare';
+  $lang['conf_comments_show_comments'] = $lang['conf_comments'];
+  $lang['conf_comments_show_comments_info'] = 'zeige die Kommentare unter jedem Bild an?';
+  $lang['conf_comments_comments_number'] = 'Anzahl der Kommentare pro Seite';
+  $lang['conf_comments_comments_number_info'] = 'Anzahl der Kommentare, die auf einer Seite angezeigt werden. Gib einen Wert zwischen 5 and 50 ein.';
+  $lang['conf_err_comment_number'] = 'Die Anzahl der Benutzerkommentare pro Seite muss zwischen 5 und 50 liegen.';
+  $lang['conf_remote_site_delete_info'] = 'Wird ein remote server entfernt, so werden auch alle Bilder und Ordner, die in Verbindung mit dem Server stehen, gel&oumlr;scht.';
+  $lang['conf_upload_title'] = 'Konfiguration f&uuml;r den Bilder Upload durch Benutzer';
+  $lang['conf_upload_available'] = 'erlaube Upload von Bildern';
+  $lang['conf_upload_maxfilesize'] = 'maximale Dateigr&ouml;sse';
+  $lang['conf_upload_maxfilesize_info'] = 'Maximale Dateigr&ouml;sse die die Bilder haben d&uuml;rfen. Muss eine Zahl zwischen 10 und 1000 KB sein.';
+  $lang['conf_err_upload_maxfilesize'] = 'Die Dateigr&ouml;sse f&uuml;r die Bilder muss zwischen 10 and 1000 KB liegen.';
+  $lang['conf_upload_maxwidth'] = 'maximale Breite';
+  $lang['conf_upload_maxwidth_info'] = 'Maximale Breite die die Bilder haben k&ouml;nnen. Die Breite muss mindestens 10 Pixel betragen';
+  $lang['conf_err_upload_maxwidth'] = 'Die maximale Breite muss mindestens 10 Pixel betragen.';
+  $lang['conf_upload_maxheight'] = 'maximale H&ouml;he';
+  $lang['conf_upload_maxheight_info'] = '"Maximale H&ouml;he die die Bilder haben k&ouml;nnen. Die H&ouml;he muss mindestens 10 Pixel betragen';
+  $lang['conf_err_upload_maxwidth'] = 'Die maximale H&ouml;he muss mindestens 10 Pixel betragen';
+  $lang['conf_upload_maxwidth_thumbnail'] = 'maximale Breite der Thumbnails';
+  $lang['conf_upload_maxwidth_thumbnail_info'] = 'Maximale Breite die die Thumbnails haben k&ouml;nnen. Die Breite muss mindestens 10 Pixel betragen';
+  $lang['conf_err_upload_maxwidth_thumbnail'] = 'Die maximale H&ouml;he muss mindestens 10 Pixel betragen';
+  $lang['conf_upload_maxheight_thumbnail'] = 'maximale H&ouml;he der Thumbnails';
+  $lang['conf_upload_maxheight_thumbnail_info'] = 'Maximale H&ouml;he die die Thumbnails haben k&ouml;nnen. Die H&ouml;he muss mindestens 10 Pixel betragen';
+  $lang['conf_err_upload_maxheight_thumbnail'] = 'Die maximale H&ouml;he muss mindestens 10 Pixel betragen.';
+  $lang['conf_default_title'] = 'Standard Display Einstellungen f&uuml;r nicht registrierte Besucher und neue Accounts';
+  $lang['conf_default_language_info'] = 'Standardeinstellung Sprache';
+  $lang['conf_default_theme_info'] = 'Standard Farbschema';
+  $lang['conf_session_title'] = 'Session-Konfiguration';
+  $lang['conf_session_size'] = 'L&auml;nge des Identifier';
+  $lang['conf_session_size_info'] = '- je l&auml;nger der Identifier, desto sicherer ist Deine Website<br/>- gib\' eine Nummer zwischen 4 und 50 ein';
+  $lang['conf_session_time'] = 'G&uuml;ltigkeitsdauer';
+  $lang['conf_session_time_info'] = '- je k&uuml;rzer die G&uuml;tigkeitsdauer, desto sicherer ist Deine Website<br />- gib\' eine Nummer zwischen 5 und 60 ein (Minuten)';
+  $lang['conf_session_key'] = 'keyword';
+  $lang['conf_session_key_info'] = '- das session keyword verbessert die Verschl&uuml;sselung des Session Identifier<br/>- gib einen beliebigen Satz mit einer maximalen L&auml;nge von 255 Zeichen ein';
+  $lang['conf_session_delete'] = 'l&ouml;sche abgelaufene Sessions';
+  $lang['conf_session_delete_info'] = 'es wird empfohlen die Session-Tabelle in der Datenbank zu l&ouml;schen, da abgelaufene Sessions in der Datenbank verbleiben. (Dies ist aber keine sicherheitsrelevante Option)';
+  $lang['user_err_modify'] = 'Der Benutzer kann nicht ge&auml;ndert oder gel&ouml;scht werden';
+  $lang['user_err_unknown'] = 'Der Benutzer ist nicht in der Datenbank vorhanden';
+  $lang['adduser_info_message'] = 'Informations sind in die Datenbank &uuml;bertragen worden f&uuml;r Benutzer ';
+  $lang['adduser_info_password_updated'] = '(Passwort ge&auml;ndert)';
+  $lang['adduser_info_back'] = 'zur&uuml;ck zur Benutzerliste';
+  $lang['adduser_fill_form'] = 'Bitte mache folgende Angaben';
+  $lang['adduser_unmodify'] = 'nicht &auml;nderbar';
+  $lang['adduser_status'] = 'Status';
+  $lang['adduser_status_admin'] = 'Administrator';
+  $lang['adduser_status_guest'] = 'Gast';
+  $lang['permuser_info_message'] = 'Zugriffsart gesetzt';
+  $lang['permuser_title'] = 'Restriktionen f&uuml;r Benutzer';
+  $lang['permuser_warning'] = 'Warnung: "<span style="font-weight:bold;">verboten</span>" im Root eines Ordners verhindert auch das Aufrufen aller Unterordner';
+  $lang['permuser_authorized'] = 'erlaubt';
+  $lang['permuser_forbidden'] = 'verboten';
+  $lang['permuser_parent_forbidden'] = 'Oberordner verboten';
+  $lang['listuser_confirm'] = 'Soll der User wirklich gel&ouml;scht werden?';
+  $lang['listuser_info_deletion'] = 'wurde aus der Datenbank entfernt';
+  $lang['listuser_user_group'] = 'Benutzergruppe';
+  $lang['listuser_modify'] = '&Auml;ndern';
+  $lang['listuser_modify_hint'] = '&auml;ndere Informationen von';
+  $lang['listuser_permission'] = 'Restriktionen';
+  $lang['listuser_permission_hint'] = '&auml;ndere Restriktionen f&uuml;r';
+  $lang['listuser_delete'] = 'L&ouml;schen';
+  $lang['listuser_delete_hint'] = 'l&ouml;sche Benutzer';
+  $lang['listuser_button_all'] = 'alle';
+  $lang['listuser_button_invert'] = 'umkehren';
+  $lang['listuser_button_create_address'] = 'erstelle e-mail Addresse';
+  $lang['cat_invisible'] = 'nicht sichtbar';
+  $lang['cat_edit'] = 'Bearbeiten';
+  $lang['cat_up'] = 'hoch';
+  $lang['cat_down'] = 'runter';
+  $lang['cat_image_info'] = 'Bilder-Info';
+  $lang['cat_total'] = 'gesamt';
+  $lang['editcat_confirm'] = 'Informationen in der Datenbank gespeichert';
+  $lang['editcat_back'] = 'Ordner';
+  $lang['editcat_title1'] = 'Optionen f&uuml;r';
+  $lang['editcat_name'] = 'Name';
+  $lang['editcat_comment'] = 'Kommentar';
+  $lang['editcat_status'] = 'Status';
+  $lang['infoimage_general'] = 'Globale Optionen f&uuml;r den Ordner';
+  $lang['infoimage_useforall'] = 'auf alle Bilder anwenden?';
+  $lang['infoimage_creation_date'] = 'Erstellungs-Datum';
+  $lang['infoimage_detailed'] = 'Optionen f&uuml;r jedes Bild';
+  $lang['infoimage_title'] = 'Title';
+  $lang['infoimage_comment'] = 'Kommentar';
+  $lang['update_missing_tn'] = 'ein Thumbnail fehlt bei';
+  $lang['update_disappeared_tn'] = 'das Thumbnail wurde entfernt';
+  $lang['update_disappeared'] = 'exisitiert nicht';
+  $lang['update_part_deletion'] = 'Entferne Bilder, f&uuml;r die kein Thumbnail oder keine Bilddatei vorhanden ist';
+  $lang['update_deletion_conclusion'] = 'Bilder aus der Datenbank entfernt';
+  $lang['update_part_research'] = 'Suche nach neuen Bildern in den Verzeichnissen';
+  $lang['update_research_added'] = 'hinzugef&uuml;gt';
+  $lang['update_research_tn_ext'] = 'Thumbnail in';
+  $lang['update_research_conclusion'] = 'Bilder wurden der Datenbank hinzugef&uuml;gt';
+  $lang['update_default_title'] = 'W&auml;hle eine Option';
+  $lang['update_only_cat'] = 'Update der Ordner, ohne Bilder';
+  $lang['update_all'] = 'Update alles';
+  $lang['tn_width'] = 'Breite';
+  $lang['tn_height'] = 'H&ouml;he';
+  $lang['tn_no_support'] = 'Bild nicht vorhanden, oder das Format wird nicht unterst&uuml;tzt';
+  $lang['tn_format'] = 'f&uuml;r das Dateiformat';
+  $lang['tn_thisformat'] = 'f&uuml;r dieses Dateiformat';
+  $lang['tn_err_width'] = 'Breite muss eine Zahl gr&ouml;sser sein als';
+  $lang['tn_err_height'] = 'H&ouml;he mzss eine Zahl gr&ouml;sser sein als';
+  $lang['tn_results_title'] = 'Ergebnisse der Thumbnail-Erstellung';
+  $lang['tn_picture'] = 'Bilder';
+  $lang['tn_results_gen_time'] = 'berechnet in';
+  $lang['tn_stats'] = 'Generelle Statistik';
+  $lang['tn_stats_nb'] = 'Anzahl erstellter Thumbnails';
+  $lang['tn_stats_total'] = 'Gesamtzeit';
+  $lang['tn_stats_max'] = 'l&auml;ngste Zeit';
+  $lang['tn_stats_min'] = 'k&uuml;rzeste Zeit';
+  $lang['tn_stats_mean'] = 'Durchschnittszeit';
+  $lang['tn_err'] = 'Du hast Fehler gemacht';
+  $lang['tn_params_title'] = 'Thumbnail Parameter';
+  $lang['tn_params_GD'] = 'GD Version';
+  $lang['tn_params_GD_info'] = '- GD ist die Bibliothek f&uuml;r PHP zum manipulieren von Bildern<br />- w&auml;hle die Version, die auf Deinem Server installiert ist. Wenn Du die falsche Version ausw&auml;hlst wirst du lediglich Fehlermeldungen sehen. In diesem Fall w&auml;hlst Du beim n&auml;chsten Mal die andere Version aus. Funktioniert gar keine Version, so wird GD auf Deinem Server nicht unterst&uuml;tzt.';
+  $lang['tn_params_width_info'] = 'maximale Breite die ein Thumbnail haben soll';
+  $lang['tn_params_height_info'] = 'maximale H&ouml;he die ein Thumbnail haben soll';
+  $lang['tn_params_create'] = 'erstellen';
+  $lang['tn_params_create_info'] = 'Versuche nicht zu viele Bilder gleichzeitig zu verarbeiten.<br />Das Verkleinern der Bilder kostet eine Menge Rechenzeit. Wenn Du PhpWebGallery bei einem freien Provider installiert hast, k&ouml;nnte eventuell Dein account gel&ouml;scht werden, wenn Du &uuml;berm&auml;ssig viel Leistung beanspruchst.';
+  $lang['tn_params_format'] = 'Dateiformat';
+  $lang['tn_params_format_info'] = 'F&uuml;r die Thumbnails wird nur das jpeg Dateiformat unterst&uuml;tzt.';
+  $lang['tn_alone_title'] = 'Bilder ohne Thumbnail (nur jpeg und png)';
+  $lang['tn_dirs_title'] = 'Ordnerliste';
+  $lang['tn_dirs_alone'] = 'Bilder ohne Thumbnail';
+  $lang['help_images_title'] = 'Hinzuf&uuml;gen von Bildern';
+  $lang['help_images_intro'] = 'So m&uuml;ssen Bilder in den Verzeichnissen abgelegt werden';
+  $lang['help_images'][0] = 'Erstelle im Verzeichnis "galleries" Unterverzeichnisse. Diese repr&auml;sentieren Deine Bilderordner';
+  $lang['help_images'][1] = 'In jedem Verzeichnis kannst Du beliebig viele Ebenen an Unterordnern anlegen.';
+  $lang['help_images'][2] = 'In jeden Ordner kannst Du beliebig viele Unterordner erstellen.';
+  $lang['help_images'][3] = 'Bilddateien m&uuml;ssen eines der folgenden Formate haben: jpeg (Erweiterung jpg oder JPG), gif (Erweiterung gif or GIF) oder png (Erweiterung png or PNG).';
+  $lang['help_images'][4] = 'Es d&uuml;rfen keine Leerstellen " " in den Dateinamen verwendet werden. Besser ist der Unterstrich "_", da dieser von PhpWebGallery gesondert behandelt wird und so bessere Ergebnisse erzielt.';
+  $lang['help_thumbnails_title'] = 'Thumbnails';
+  $lang['help_thumbnails'][0] = 'In jeden Verzeichnis das Bilder enth&auml;lt, existiert ein Unterverzeichnis "thumbnail". Falls nicht, erstelle eines und setze die Thumbnails dort hinein.';
+  $lang['help_thumbnails'][1] = 'Thumbnails m&uuml;ssen nicht die gleiche Dateiendung haben wie das dazugeh&ouml;rige Bild. (zum Beispiel kann ein Bild mit .jpg Endung ein Thumbnail mit einer .GIF Endung haben).';
+  $lang['help_thumbnails'][2] = 'Das Thumbnail eines Bildes muss den gleichen Prefix haben wie auf der Konfigurationsseite angegeben wurde (image.jpg -> TN_image.GIF).';
+  $lang['help_thumbnails'][3] = 'F&uuml;r die Erstellung der Thumbnails rate ich Dir das Modul f&uuml;r Windows zu nutzen. Dieses gibt es zum Download auf der Pr&auml;sentationsseite von PhpWebGallery.';
+  $lang['help_thumbnails'][4] = 'Du kannst Thumbnails auch mit der in PhpWebGallery integrierten Funktion erstellen. Allerdings rate ich davon ab, da die Qualit&auml;t der Thumbnails nicht gut ist und eine hohe CPU Belastung verursacht.';
+  $lang['help_thumbnails'][5] = 'Falls Du Deinen Provider-Account dazu nutzt die Thumbnails zu erstellen, musst Du entsprechende Rechte auf das Verzeichnis "galleries" und dessen Unterverzeichnisse geben (777).';
+  $lang['help_database_title'] = 'Datenbank aktualisieren';
+  $lang['help_database'][0] = 'Sind die Bilder und Thumbnails korrekt in den Verzeichnissen plaziert, dann klicke auf "Datenbank aktualisieren" im Administrations-Men&uuml;.';
+  $lang['help_infos_title'] = 'zus&auml;tzliche Informationen';
+  $lang['help_infos'][1] = 'Sobald Du die Site zum Laufen gebracht hast solltest Du die Einstellungen f&uuml;r den Benutzer "Gast" vornehmen. Jeder neu registrierte Benutzer &uuml;bernimmt vom Benutzer "Gast" zun&auml;chst die Einstellungen.';
+  $lang['help_remote_title'] = 'Remote Site';
+  $lang['help_remote'][0] = 'PhpWebGallery  bietet die M&ouml;glichkeit mehrere Server zur Ablage der Bilder zu nutzen. Dies kann sehr n&uuml;tzlich sein, wenn Deine Galerie bei einem Provider l&auml;ft, der zu wenig Platz f&uuml;r alle Deine Bilder bietet. Lies Dir dazu bitte folgende Anleitung durch: ';
+  $lang['help_remote'][1] = '1. editiere die Datei "create_listing_file.php" (diese findest Du im Verzeichnis  "admin"), und &auml;ndere die Zeile in "$prefixe_thumbnail = "TN-";" falls Dein f&uuml;r die Thumbnails gew&auml;hlter Pr&auml;fix noch nicht "TN-" ist.';
+  $lang['help_remote'][2] = '2. kopiere die ge&auml;nderte Datei "create_listing_file.php" ins Root Deines Bilderverzeichnisses (wie das Verzeichnis "galleries" dieser Website) per FTP';
+  $lang['help_remote'][3] = '3. starte ein Skript, indem Du folgende Adresse aufrufst: http://entfernteDomain/repGalerie/create_listing_file.php. Die Datei "listing.xml" wird dann erstellt.';
+  $lang['help_remote'][4] = '4. hole die Datei "listing.xml" von der entfernten Website zur&uuml;ck, und kopiere diese in das Verzeichnis "admin" dieser Website.';
+  $lang['help_remote'][5] = '5. please , launch an update of the data of images by the interface of administration, once the listing.xml used file, kill it from the directory "admin".';
+  $lang['help_remote'][6] = 'Die Inhalte einer entfernt liegenden Website kannst Du updaten, indem Du die eben beschriebenen Schritte wiederholst. Du kannst eine entfernt liegende Website auch entfernen indem Du die entsprechende Option im Administrationsmen&uuml; (Punkt Konfiguration) ausw&auml;hlst.';
+  $lang['help_upload_title'] = 'Bilder Upload f&uuml;r Benutzer';
+  $lang['help_upload'][0] = 'PhpWebGallery bietet Benutzern die M&ouml;glichkeit Bilder in einem Ordner hinzuzuf&uuml;gen. Und so funktioniert das:';
+  $lang['help_upload'][1] = '1. aktiviere die entsprechende Option im Administrationsmen&uuml;';
+  $lang['help_upload'][2] = '2. setze entsprechende Schreibrechte auf die Verzeichnisse zu denen Bilder hinzugef&uuml;gt werden.';
+  $lang['help_upload'][3] = 'Hochgeladene Bilder sind nicht direkt auf der Website sichtbar, da sie erst durch einen Administrator validiert werden m&uuml;ssen. Daf&uuml;r w&auml;hlt der Administrator "Bilder-Uploads" aus dem Administrationsmen&uuml; aus und entscheidet dann, ob das Bild eingestellt oder verworfen wird. Danach m&uuml;ssen die Bilddaten auf der Datenbank aktualisiert werden.';
+  $lang['install_message'] = 'Nachricht';
+  $lang['step1_confirmation'] = 'Parameter sind richtig';
+  $lang['step1_err_db'] = 'Verbindung zum Server klappte, aber die Datenbank konnte nicht konnektiert werden.';
+  $lang['step1_err_server'] = 'Server nicht erreichbar.';
+  $lang['step1_err_copy_2'] = 'Der n&auml;chste Installationschritt kann nun durchgef&uuml;hrt werden.';
+  $lang['step1_err_copy_next'] = 'n&auml;chster Schritt';
+  $lang['step1_title'] = 'Schritt 1/2';
+  $lang['step1_host'] = 'MySQL Host';
+  $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
+  $lang['step1_user'] = 'Benutzer';
+  $lang['step1_user_info'] = 'Benutzername bei Deinem Provider';
+  $lang['step1_pass'] = 'Passwort';
+  $lang['step1_pass_info'] = 'Benutzerpasswort bei Deinem Provider';
+  $lang['step1_database'] = 'Name der Datenbank';
+  $lang['step1_database_info'] = 'auch von Deinem Provider';
+  $lang['step1_prefix'] = 'Datenbank Tabellen-Pr&auml;fix';
+  $lang['step1_prefix_info'] = 'die Tabellennamen werden mit dem Pr&auml;fix beginnen (das schafft mehr &Uuml;bersicht in Deiner Datenbank)';
+  $lang['step2_err_login1'] = 'erstelle einen Login f&uuml;r den Webmaster';
+  $lang['step2_err_login3'] = 'der Login darf keine \' oder " Zeichen enthalten.';
+  $lang['step2_err_pass'] = 'bitte wiederhole Dein Passwort';
+  $lang['step2_err_mail'] = $lang['conf_err_mail'];
+  $lang['install_end_title'] = 'Installation beendet';
+  $lang['install_end_message'] = 'Die Konfiguration von PhpWebGallery ist beendet, hier der n&auml;chste Schritt<br /><br /><br />
+Aus Gr&uuml;nden der Sicherheit solltest Du die Datei "install.php" im Verzeichnis "admin" l&ouml;schen<br />
+ Sobald diese gel&ouml;scht ist, geht es so weiter:
+<ul>
+  <li>gehe auf die Anmeldeseite: [ <a href="../identification.php">Anmeldung</a> ] und benutze dort das Login/Passwort Paar, das Du zuvor f&uuml;r den Webmaster vergeben hast</li>
+ <li>Mit diesem Login kannst Du das [ <a href="admin.php">Administrations-Men&uuml;</a> ] aufrufen und den dortigen Anweisungen folgen um Bilder einzustellen</li>
+</ul>';
+  $lang['step2_title'] = 'Schritt 2/2';
+  $lang['step2_pwd'] = 'Webmaster Password';
+  $lang['step2_pwd_info'] = 'Halte es vertraulich! Es ist der Zugang zum Administrations-Men&uuml;';
+  $lang['step2_pwd_conf'] = 'best&auml;tige Passwort';
+  $lang['step2_pwd_conf_info'] = 'Best&auml;tigung';
+  // new or modified in release 1.3
+  $lang['remote_site'] = 'Remote Site';
+  $lang['title_add'] = 'Benutzer hinzuf&uuml;gen/&auml;ndern';
+  $lang['title_modify'] = 'Benutzer bearbeiten';
+  $lang['title_groups'] = 'Benutzergruppen bearbeiten';
+  $lang['title_user_perm'] = 'Benutzerrechte bearbeiten';
+  $lang['title_cat_perm'] = 'Zugriffsrechte auf einen Ordner &auml;ndern';
+  $lang['title_group_perm'] = 'Gruppenrechte bearbeiten';
+  $lang['title_picmod'] = 'Bildinformationen bearbeiten';
+  $lang['menu_groups'] = 'Gruppen';
+  $lang['menu_comments'] = 'Kommentare';
+  $lang['conf_general_log'] = 'History';
+  $lang['conf_general_log_info'] = 'Sollen die Besuche Deiner Seite gelogged werden? Zugriffe werden in der History in der Admin Sektion angezeigt';
+  $lang['conf_general_mail_notification'] = 'Mail Benachrichtigung';
+  $lang['conf_general_mail_notification_info'] = 'Automatische Mail Benachrichtigung f&uuml;r Administratoren (nur f&uuml;r diese) wenn ein Benutzer einen Kommentar oder ein Bild hinzugef&uuml;gt hat.';
+  $lang['conf_comments_validation'] = 'Pr&uuml;fung';
+  $lang['conf_comments_validation_info'] = 'Ein Administrator muss jeden Kommentar zun&auml;chst freischalten bevor dieser angezeigt wird.';
+  $lang['conf_comments_forall'] = 'Alle?';
+  $lang['conf_comments_forall_info'] = 'Auch nicht registrierte Benutzer d&uuml;rfen Kommentare eingeben.';
+  $lang['conf_default_nb_image_per_row_info'] = 'Standardvorgabe Anzahl Bilder pro Reihe';
+  $lang['conf_default_nb_row_per_page_info'] = 'Standardvorgabe Anzahl Reihen pro Seite';
+  $lang['conf_default_short_period_info'] = 'In Tagen. Zeitraum, in dem ein Bild mit einem roten Punkt markiert wird. Der kurze Zeitraum muss grösser als 1 Tag sein.';
+  $lang['conf_default_long_period_info'] = 'In Tagen. Zeitraum, in dem ein Bild mit einem grünen Punkt markiert wird. Der lange Zeitraum muss grösser als der kurze Zeitraum sein.';
+  $lang['conf_default_expand_info'] = 'Alle Ordner im Men&uuml; aufgeklappt anzeigen?';
+  $lang['conf_default_show_nb_comments_info'] = 'Zeige die Anzahl der Kommentare f&uuml;r jedes Bild in der Ordner&uuml;bersicht?';
+  $lang['conf_default_maxwidth_info'] = 'Maximale Breite in der die Bilder angezeigt werden. (Das Bild wird nicht ge&auml;ndert). Lass das Feld leer, um keine Vorgabe zu machen.';
+  $lang['conf_default_maxheight_info'] = 'Genau wie die Einstellung zur Anzeigebreite der Bilder.';
+  $lang['conf_session_cookie'] = 'Cookies erlauben?';
+  $lang['conf_session_cookie_info'] = 'Benutzer m&uuml;ssen sich nicht jedes Mal neu anmelden. Geringere Sicherheit.';
+  $lang['adduser_associate'] = 'F&uuml;ge ein in Gruppe';
+  $lang['group_add'] = 'Neue Gruppe erstellen';
+  $lang['group_add_error1'] = 'Der Name der Gruppe darf kein " oder \' enthalten';
+  $lang['group_add_error2'] = 'Dieser Gruppenname ist schon vorhanden';
+  $lang['group_confirm'] = 'Soll diese Gruppe wirklich gel&ouml;scht werden?';
+  $lang['group_list_title'] = 'Liste aller vorhandenen Gruppen';
+  $lang['group_err_unknown'] = 'Diese Gruppe ist nicht in der Datenbank vorhanden';
+  $lang['cat_permission'] = 'Restriktionen';
+  $lang['cat_update'] = 'Update';
+  $lang['cat_add'] = 'Erstelle einen virtuellen Ordner';
+  $lang['cat_parent'] = 'Basis-Ordner';
+  $lang['cat_error_name'] = 'Es muss ein Name f&uuml;r den Ordner angegeben werden';
+  $lang['cat_virtual'] = 'Virtuell';
+  $lang['cat_first'] = 'an erste Stelle';
+  $lang['cat_last'] = 'an letzte Stelle';
+  $lang['editcat_visible_info'] = '(nicht sichtbar f&uuml;r alle ausser Administratoren)';
+  $lang['editcat_visible'] = 'Sichtbar';
+  $lang['editcat_uploadable'] = 'Upload m&ouml;glich';
+  $lang['infoimage_keyword_separation'] = '(trenne mit Komma ",")';
+  $lang['infoimage_addtoall'] = 'jedem Bild hinzuf&uuml;gen';
+  $lang['infoimage_removefromall'] = 'bei jedem Bild l&ouml;schen';
+  $lang['infoimage_associate'] = 'F&uuml;ge ein in den Ordner';
+  $lang['update_wrong_dirname'] = 'Die Verzeichnisnamen und die Dateinamen m&uuml;ssen aus Buchstaben, "-", "_" or "." bestehen. Leerzeichen sind nicht erlaubt.';
+  $lang['stats_pages_seen'] = 'aufgerufene Seiten';
+  $lang['stats_visitors'] = 'Gast';
+  $lang['stats_empty'] = 'leere History';
+  $lang['stats_pages_seen_graph_title'] = 'Anzahl Seitenaufrufe pro Tag';
+  $lang['stats_visitors_graph_title'] = 'Anzahl G&auml;ste pro Tag';
+  $lang['comments_last_title'] = 'neue Kommentare';
+  $lang['comments_non_validated_title'] = 'zu pr&uuml;fende Kommentare';
+  $lang['help_database'][1] = 'Um zu verhindern, dass zu viele Bilder in einem einzigen Updatevorgang aktualisiert werden empfiehlt es sich, zun&auml;chst nur die Ordner zu aktualisieren. Danach kann man im Administrations-Men&uuml; jeden Unter-Ordner einzeln mit der Funktion "Update" aktualisieren.';
+  $lang['help_upload'][3] = 'Der Ordner muss ebenfalls f&uuml;r die Upload-Funktionalit&auml;t freigeschaltet sein.';
+  $lang['help_upload'][4] = 'Bilder, die von Benutzern hochgeladen werden, sind nicht direkt auf der Website sichtbar. Ein Administrator muss diese erst pr&uuml;fen und dann freischalten. Dazu geht ein Administrator auf "Wartende Bilder" im Administrations-Men&uuml;, gibt das Bild frei und f&uuml;hrt ein Update f&uuml;r die Bilddaten durch.';
+  $lang['help_virtual_title'] = 'Links zwischen Bildern, Bilderordnern und virtuellen Bilderordnern';
+  $lang['help_virtual'][0] = 'PhpWebGallery kann zwischen dem realen Bilderordner (in dem die Bilder liegen) und virtuellen Bilderordnern (in denen die Bilder angezeigt werden) unterscheiden.';
+  $lang['help_virtual'][1] = 'Normalerweise werden die Bilder in ihren urspr&uuml;nglichen Ordnern angezeigt, n&auml;mlich in denen, die der Verzeichnisstruktur auf dem Webserver entsprechen.';
+  $lang['help_virtual'][2] = 'Um ein Bild mit einem Ordner zu verlinken, wird auf der Seite Bildinformationen ein Haken vor die entsprechenden Bilder gesetzt, die mit einem Ordner verlinkt werden sollen.';
+  $lang['help_virtual'][3] = 'Nach diesem Prinzip ist es m&ouml;glich, virtuelle Ordner in PhpWebGallery zu erstellen. Gehe dazu ins Administrations-Men&uuml; und w&auml;hle die Sektion "Ordner" aus.';
+  $lang['help_groups_title'] = 'Benutzergruppen';
+  $lang['help_groups'][0] = 'PhpWebGallery kann Benutzer in verschiedenen Gruppen zusammenfassen. Das ist sehr hilfreich, um schnell und einfach die Zugriffsrechte f&uuml;r mehrere gleichartige Benutzer einzustellen.';
+  $lang['help_groups'][1] = '1. Erstelle im Men&uuml;punkt "Gruppen" die Gruppe "Family".';
+  $lang['help_groups'][2] = '2. Unter dem Men&uuml;punkt "Benutzer" kann man Benutzer dann der Gruppe "Family" zuweisen.';
+  $lang['help_groups'][3] = '3. Beim Bearbeiten der Zugriffsrechte eines Ordners oder einer Benutzergruppe wird ersichtlich, dass alle Zugriffsrehte f&uuml;r die Benutzergruppe automatisch auch f&uuml;r die Mitglieder dieser Gruppe gelten.';
+  $lang['help_groups'][4] = 'Ein Benutzer kann mehreren Benutzergruppen angeh&ouml;ren. Darf eine dieser Gruppen einen Ordner ansehen, so sind die Verbote der anderen Gruppen unwirksam: Falls der Benutzer "Jack" den Gruppen "Family" und "Friends" angeh&ouml;rt, und nur die Gruppe "Family" den Ordner "Weihnachten 2003" betrachten darf, so kann "Jack" den Ordner "Weihnachten 2003" betrachten.';
+  $lang['help_access_title'] = 'Zugriffssteuerung';
+  $lang['help_access'][0] = 'PhpWebGallery kann den Zugriff auf verschiedene Ordner verbieten. Ordner k&ouml;nnen "&ouml;ffentlich" oder "privat" sein. Um den Zugriff auf einen Ordner zu verbieten, muss folgendes getan werden:';
+  $lang['help_access'][1] = '1. Stelle den Ordner auf "privat" (Unter "Ordner" im Administrations-Men&uuml;).';
+  $lang['help_access'][2] = '2. Unter dem Punkt "Gruppen" oder "Benutzer" werden die privaten Ordner angezeigt. Dort kann man den Zugriff nun erlauben oder verbieten.';
+  $lang['help_infos'][2] = 'Falls noch Fragen bleiben, besuche einmal das Forum und stelle die Fragen dort. Das <a href="'.$conf['forum_url'].'" style="text-decoration:underline">Forum</a> (Message Board) ist auf der Website von PhpWebGallery zu finden.';
+  $lang['step1_err_copy'] = 'Kopiere den Text zwischen den Trennstrichen und f&uuml;ge diesen in die Datei "include/mysql.inc.php" ein (Warnung: mysql.inc.php darf NUR den blau markierten Text enthalten. Steuerzeichen und Leerzeichen d&uuml;rfen nicht darin auftauchen!';
+  $lang['permuser_only_private'] = 'Nur private Ordner werden angezeigt.';
+  $lang['waiting_update'] = 'Freigegebene Bilder k&ouml;nnen erst nach einem Update der Datenbank angezeigt werden';
+  $lang['conf_upload_available_info'] = 'Gestatte den Bild-Upload f&uuml;r die Benutzer auf der &Uuml;bersichtsseite eines Ordners. (nicht m&ouml;glich bei einem Remote Server) Diese Einstellung ist notwendig, da standardm&auml;ssig in jedem Ordner diese Funktion deaktiviert ist.';
+  $lang['install_help'] = 'Brauchst Du Hilfe? Stelle deine Frage im <a href="http://forum.phpwebgallery.net">PhpWebGallery Message Board</a>.';
+  $lang['install_warning'] = 'Die Datei "admin/install.php" ist noch auf dem Server vorhanden. Bitte l&ouml;sche diese Datei, da ein weiterer Aufruf eine neue Installation ausl&ouml;st.';
+  // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'This category is unknown in the database';
+}
+?>
Index: /branches/1.3/language/dutch.php
===================================================================
--- /branches/1.3/language/dutch.php	(revision 3252)
+++ /branches/1.3/language/dutch.php	(revision 3252)
@@ -0,0 +1,562 @@
+<?php
+/***************************************************************************
+ *                                dutch.php                                *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3.1 <http://phpwebgallery.net>        *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *   translation   : Eelko Pel <http://www.epel.nl> Rev 1.3.2-3            *
+ *                                                                         *
+ *   $Id$
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+// Speciaal voor nederland "For easy editing naam Category"
+// Benaming category
+$lang['lang_category_sev'] = 'map';
+$lang['lang_category_smv'] = 'mappen';
+$lang['lang_category_bev'] = 'Map';
+$lang['lang_category_bmv'] = 'Mappen';
+// Benaming picture "For easy editing naam picture"
+$lang['lang_picture_sev'] = 'foto of afbeelding';
+$lang['lang_picture_smv'] = 'foto\'s of afbeeldingen';
+$lang['lang_picture_bev'] = 'Foto of afbeelding';
+$lang['lang_picture_bmv'] = 'Foto\'s of afbeeldingen';
+
+// Officeel
+$lang['only_members'] = 'Alleen leden hebben hier toegang';
+$lang['invalid_pwd'] = 'Fout wachtwoord!';
+$lang['access_forbiden'] = 'U heeft geen toegang tot deze pagina';
+$lang['submit'] = 'Bevestig';
+$lang['login'] = 'login';
+$lang['password'] = 'Wachtwoord';
+$lang['new'] = 'Nieuw';
+$lang['delete'] = 'Verwijder';
+$lang['category'] = $lang['lang_category_sev'];
+$lang['thumbnail'] = 'Indexfoto';
+$lang['date'] = 'Datum';
+$lang['diapo_default_page_title'] = 'Er is geen '.$lang['lang_category_sev'].' geselecteerd';
+$lang['thumbnails'] = 'Indexfoto\'s';
+$lang['categories'] = 'De '.$lang['lang_category_smv'];
+$lang['hint_category'] = 'laat '.$lang['lang_picture_smv'].' zien in de root van deze '.$lang['lang_category_sev'];
+$lang['total_images'] = 'totaal';
+$lang['title_menu'] = 'Menu';
+$lang['change_login'] = 'Verander gebruiker';
+$lang['login'] = 'Gebruiker';
+$lang['hint_login'] = 'inloggen maakt het mogelijk om instellingen te wijzigen';
+$lang['logout'] = 'Afmelden';
+$lang['customize'] = 'Persoonlijke instellingen';
+$lang['hint_customize'] = 'het uiterlijk van gallery aanpassen';
+$lang['hint_search'] = 'Zoeken';
+$lang['search'] = 'Zoeken';
+$lang['favorite_cat'] = 'Favorieten';
+$lang['favorite_cat_hint'] = 'Toon je favorieten';
+$lang['about'] = 'Over PhpWebGallery';
+$lang['hint_about'] = 'Meer informatie over PhpWebGallery...';
+$lang['admin'] = 'Beheer';
+$lang['hint_admin'] = 'Alleen voor beheerders';
+$lang['no_category'] = 'Er is geen '.$lang['lang_category_sev'].' geselecteerd<br />maak een keuze in het menu';
+$lang['page_number'] = 'pagina nummer';
+$lang['previous_page'] = 'Vorige';
+$lang['next_page'] = 'Volgende';
+$lang['nb_image_category'] = 'Aantal '.$lang['lang_picture_smv'].' in deze '.$lang['lang_category_sev'];
+$lang['recent_image'] = $lang['lang_picture_bmv'].' geplaatst in de laatste';
+$lang['days'] = 'dagen';
+$lang['send_mail'] = 'Tips of commentaar, verstuur dan een e-mail aan:';
+$lang['title_send_mail'] = 'Een opmerking over uw site';
+$lang['sub-cat'] = 'subcategoriën';
+$lang['images_available'] = $lang['lang_picture_bmv'].' in deze '.$lang['lang_category_sev'];
+$lang['total'] = $lang['lang_picture_bmv'];
+$lang['upload_picture'] = 'Upload een '.$lang['lang_picture_sev'];
+$lang['registration_date'] = 'Geregistreerd op';
+$lang['creation_date'] = 'Gemaakt op';
+$lang['comment'] = 'Commentaar';
+$lang['author'] = 'Auteur';
+$lang['size'] = 'Formaat';
+$lang['filesize'] = 'Bestandsgrootte';
+$lang['file'] = 'Bestand';
+$lang['generation_time'] = 'Pagina is gegenereerd in';
+$lang['favorites'] = 'Favorieten';
+$lang['search_result'] = 'Zoek resultaten';
+$lang['about_page_title'] = 'Over PhpWebGallery';
+$lang['about_title'] = 'Over...';
+$lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Informatie over PhpWebGallery</div>
+<ul>
+  <li>Deze website maakt gebruik van <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> versie '.$conf['version'].'. PhpWebGallery geeft je de mogelijkheid om online albums te creëren.</li>
+  <li>PhpWebGallery is technische geheel ontwikkeld in PHP in combinatie met MYSQL.</li>
+  <li>Als u opmerkingen heeft of sugesties, bezoek dan officiële <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> website en het daarvoor bestemde <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a>.</li>
+</ul>';
+$lang['about_return'] = 'Terug';
+$lang['ident_page_title'] = 'Aanmelden';
+$lang['ident_title'] = 'Aanmelden';
+$lang['ident_register'] = 'Registreer een nieuwe gebruiker';
+$lang['ident_forgotten_password'] = 'Je wachtwoord vergeten ?';
+$lang['ident_guest_visit'] = 'Ga door als gast';
+$lang['customize_page_title'] = 'Persoonlijke instellingen';
+$lang['customize_title'] = 'Persoonlijke instellingen';
+$lang['customize_nb_image_per_row'] = 'Aantal '.$lang['lang_picture_smv'].' per regel';
+$lang['customize_nb_row_per_page'] = 'Aantal regels per pagina';
+$lang['customize_language'] = 'Taal';
+$lang['maxwidth'] = 'Maximale breedte van de '.$lang['lang_picture_bmv'];
+$lang['maxheight'] = 'Maximale hoogte van de '.$lang['lang_picture_bmv'];
+$lang['err_maxwidth'] = 'Maximale breedte moet minimaal 50 zijn';
+$lang['err_maxheight'] = 'Maximale hoogte moet minimaal 50 zijn';
+$lang['previous_image'] = 'Vorige';
+$lang['next_image'] = 'Volgende';
+$lang['back'] = 'Klik op de '.$lang['lang_picture_sev'].' om terug te gaan naar de index';
+$lang['info_image_title'] = 'Informatie van '.$lang['lang_picture_sev'];
+$lang['link_info_image'] = 'Wijzig informatie';
+$lang['true_size'] = 'Ware grootte';
+$lang['comments_title'] = 'Opmerkingen van de kijkers op de site';
+$lang['comments_del'] = 'verwijder deze opmerking';
+$lang['comments_add'] = 'Voeg opmerking toe';
+$lang['month'][1] = 'januari';
+$lang['month'][2] = 'februari';
+$lang['month'][3] = 'maart';
+$lang['month'][4] = 'april';
+$lang['month'][5] = 'mei';
+$lang['month'][6] = 'juni';
+$lang['month'][7] = 'juli';
+$lang['month'][8] = 'augustus';
+$lang['month'][9] = 'september';
+$lang['month'][10] = 'oktober';
+$lang['month'][11] = 'november';
+$lang['month'][12] = 'december';
+$lang['day'][0] = 'zondag';
+$lang['day'][1] = 'maandag';
+$lang['day'][2] = 'dinsdag';
+$lang['day'][3] = 'woensdag';
+$lang['day'][4] = 'donderdag';
+$lang['day'][5] = 'vrijdag';
+$lang['day'][6] = 'zaterdag';
+$lang['add_favorites_alt'] = 'Voeg toe aan favorieten';
+$lang['add_favorites_hint'] = 'Voeg deze '.$lang['lang_picture_sev'].' toe aan je favorieten';
+$lang['del_favorites_alt'] = 'Verwijder uit favorieten';
+$lang['del_favorites_hint'] = 'Verwijder deze '.$lang['lang_picture_sev'].' uit je favorieten';
+$lang['register_page_title'] = 'Nieuwe gebruiker';
+$lang['register_title'] = 'Nieuwe gebruiker';
+$lang['reg_err_login1'] = 'Kies een usernaam a.u.b.';
+$lang['reg_err_login2'] = 'Er mag geen spatie in de usernaam zitten';
+$lang['reg_err_login3'] = $lang['reg_err_login2'];
+$lang['reg_err_login4'] = 'De usernaam mag geen " en \' karakters bevatten';
+$lang['reg_err_login5'] = 'Deze usernaam is al in gebruik';
+$lang['reg_err_pass'] = 'Geef uw opnieuw uw wachtwoord a.u.b.';
+$lang['reg_confirm'] = 'Nogmaals het nieuwe wachtwoord';
+$lang['reg_err_mail_address'] = 'Het e-mail adres moet er minimaal uitzien als xxx@yyy.eee (voorbeeld : login@domein.nl)';
+$lang['search_title'] = 'Zoeken';
+$lang['invalid_search'] = 'Gebruik minimaal 3 karakters om op te zoeken';
+$lang['search_field_search'] = 'Zoeken';
+$lang['search_return_main_page'] = 'Terug naar index';
+$lang['upload_forbidden'] = 'U kan in deze '.$lang['lang_category_sev'].' geen '.$lang['lang_picture_smv'].' plaatsen';
+$lang['upload_file_exists'] = 'Deze naam wordt reeds gebruikt';
+$lang['upload_filenotfound'] = 'U moet een bestand met een extentie jpg, gif of png kiezen';
+$lang['upload_cannot_upload'] = 'kan deze '.$lang['lang_picture_sev'].' niet uploaden';
+$lang['upload_title'] = 'Upload een '.$lang['lang_picture_sev'];
+$lang['upload_advise'] = 'Kies een '.$lang['lang_picture_sev'].' om deze te plaatsen in de '.$lang['lang_category_sev'].' : ';
+$lang['upload_advise_thumbnail'] = 'Niet verplicht, maar wel aanbevolen : upload een indexfoto voor ';
+$lang['upload_advise_filesize'] = 'De bestandsgrootte mag niet groter zijn dan : ';
+$lang['upload_advise_width'] = 'De breedte mag niet groter zijn dan : ';
+$lang['upload_advise_height'] = 'De hoogte mag niet groter zijn dan : ';
+$lang['upload_advise_filetype'] = 'De '.$lang['lang_picture_sev'].' moet voldoen aan de extenties jpg, gif of png';
+$lang['upload_err_username'] = 'De gebruiker moet is verplicht en moet dus worden ingevuld';
+$lang['upload_username'] = 'Gebruiker ';
+$lang['upload_successful'] = 'De '.$lang['lang_picture_sev'].' is met succes geplaatst, deze zal nog door een beheerder gevalideerd moeten worden. Tot die tijd is deze niet zichtbaar.';
+// new or modified in release 1.3
+$lang['charset'] = 'iso-8859-1';
+$lang['no'] = 'nee';
+$lang['yes'] = 'ja';
+$lang['guest'] = 'gast';
+$lang['mail_address'] = 'E-mail adres';
+$lang['public'] = 'publiek';
+$lang['private'] = 'privé';
+$lang['add'] = 'ok';
+$lang['dissociate'] = 'Verwijder groep';
+$lang['mandatory'] = 'verplicht';
+$lang['err_date'] = 'foutieve datum';
+$lang['picture'] = $lang['lang_picture_bev'];
+$lang['IP'] = 'IP';
+$lang['close'] = 'sluit';
+$lang['open'] = 'open';
+$lang['keywords'] = 'Sleutelwoorden';
+$lang['errors_title'] = 'Fout:';
+$lang['infos_title'] = 'Informatie';
+$lang['default'] = 'Standaard';
+$lang['comments'] = 'Opmerkingen';
+$lang['category_representative'] = 'Categorie'.$lang['lang_picture_sev'];
+$lang['stats'] = 'Statistieken';
+$lang['most_visited_cat_hint'] = 'toon meest opgevraagde '.$lang['lang_picture_bmv'];
+$lang['most_visited_cat'] = 'meest getoond';
+$lang['best_rated_cat_hint'] = 'Toon de '.$lang['lang_picture_smv'].' met de hoogste beoordeling';
+$lang['best_rated_cat'] = 'als beste beoordeeld';
+$lang['recent_cat_hint'] = 'Pas geplaatste '.$lang['lang_picture_bmv'];
+$lang['recent_cat'] = 'Pas geplaatst';
+$lang['recent_cat_title'] = 'Pas geplaatst';
+$lang['visited'] = 'Bekeken';
+$lang['times'] = 'maal';
+$lang['customize_theme'] = 'Opmaakthema';
+$lang['customize_expand'] = 'Toon alle '.$lang['lang_category_smv'];
+$lang['customize_show_nb_comments'] = 'Toon aantal opmerkingen';
+$lang['customize_short_period'] = 'Korte periode';
+$lang['customize_long_period'] = 'Lange periode';
+$lang['customize_template'] = 'Sjabloon';
+$lang['err_periods'] = 'Perode\'s dienen gehele getallen te zijn';
+$lang['err_periods_2'] = 'De periode mag niet 0 zijn. De lange periode moet groter dan de korte periode zijn.';
+$lang['create_cookie'] = 'Maak een cookiebestand';
+$lang['customize_day'] = 'dag';
+$lang['customize_week'] = 'week';
+$lang['customize_month'] = 'maand';
+$lang['customize_year'] = 'jaar';
+$lang['slideshow'] = 'Diashow';
+$lang['period_seconds'] = 'seconden pauze per '.$lang['lang_picture_sev'];
+$lang['slideshow_stop'] = 'Stop de diashow';
+$lang['comment_added'] = 'Uw opmerking is geregistreerd';
+$lang['comment_to_validate'] = 'Een beheerder moet uw opmerking nog bevestigen voordat deze zichtbaar word.';
+$lang['comment_anti-flood'] = 'Beveiliging : Wacht even voor het plaatsten van de volgende opmerking';
+$lang['comment_user_exists'] = 'Deze gebruiker bestaat reeds, probeer een andere';
+$lang['invalid_search'] = 'Zoektermen moeten minimaal 3 karakters groot zijn en geen leestekens bevatten';
+$lang['search_mode_or'] = 'Minimaal één woord';
+$lang['search_mode_and'] = 'Alle woorden';
+$lang['search_comments'] = 'Woorden gescheiden door spaties';
+$lang['upload_name'] = 'Naam van de '.$lang['lang_picture_sev'];
+$lang['upload_author'] = 'Auteur (alla "Voornaam Achternaam")';
+$lang['upload_creation_date'] = 'Genomen op (DD/MM/YYYY)';
+$lang['upload_comment'] = 'Commentaar';
+$lang['mail_hello'] = 'Beheerder,';
+$lang['mail_new_upload_subject'] = 'Er is een nieuwe '.$lang['lang_picture_sev'].' geupload';
+$lang['mail_new_upload_content'] = 'Er is een nieuwe '.$lang['lang_picture_sev'].' geupload, deze wacht op validatie middels het beheer paneel/n/n.';
+$lang['mail_new_comment_subject'] = 'Er is een nieuwe opmerking geplaatst';
+$lang['mail_new_comment_content'] = 'Er is een nieuwe opmerking geplaatst, deze wacht op validatie middels het beheer paneel/n/n';
+$lang['connected_user'] = 'Aangemeld als';
+$lang['title_comments'] = 'Opmerkingen';
+$lang['stats_last_days'] = 'dagen terug';
+$lang['hint_comments'] = 'Toon de laatste opmerkingen';
+$lang['menu_login'] = 'Inloggen';
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+  $lang['title_liste_users'] = 'Gebruikers beheer';
+  $lang['title_history'] = 'Logging';
+  $lang['title_update'] = 'Database verversen';
+  $lang['title_configuration'] = 'PhpWebGallery configuratie';
+  $lang['title_instructions'] = 'Handleiding';
+  $lang['title_categories'] = $lang['lang_category_bmv'].' beheer';
+  $lang['title_edit_cat'] = 'Wijzig een '.$lang['lang_category_sev'];
+  $lang['title_info_images'] = 'Wijzig de '.$lang['lang_category_sev'].' informatie';
+  $lang['title_thumbnails'] = 'Maak indexfoto';
+  $lang['title_thumbnails_2'] = 'voor';
+  $lang['title_default'] = 'PhpWebGallery beheer';
+  $lang['menu_title'] = 'Beheer';
+  $lang['menu_config'] = 'Configuratie';
+  $lang['menu_users'] = 'Gebruikers';
+  $lang['menu_add_user'] = 'toevoegen';
+  $lang['menu_list_user'] = 'lijst';
+  $lang['menu_categories'] = $lang['lang_category_bmv'];
+  $lang['menu_update'] = 'Database verversen';
+  $lang['menu_thumbnails'] = 'Maak indexfoto\'s';
+  $lang['menu_history'] = 'Logging';
+  $lang['menu_instructions'] = 'Instructie';
+  $lang['menu_back'] = 'Terug naar gallery';
+  $lang['title_waiting'] = 'Te valideren '.$lang['lang_picture_smv'];
+  $lang['menu_waiting'] = 'Te valideren';
+  $lang['default_message'] = 'PhpWebGallery beheer paneel';
+  $lang['conf_err_prefixe'] = 'Voorvoegsels van indexfoto\'s mogen geen vreemde karakters bevatten';
+  $lang['conf_err_mail'] = 'het e-mail address is gewijgerd en moet minimaal voldoen aan name@server.com';
+  $lang['conf_err_sid_size'] = 'the session identifier size must be an integer value between 4 and 50';
+  $lang['conf_err_sid_time'] = 'the session time must be an integer value between 5 and 60';
+  $lang['conf_err_max_user_listbox'] = 'het aantal users in de aanmeldlijst moet minimaal 0 en maximaal 255 zijn';
+  $lang['conf_confirmation'] = 'De configuratie is verwerkt in de database';
+  $lang['conf_general_title'] = 'Basis configuratie';
+  $lang['conf_general_webmaster'] = 'Beheerders account';
+  $lang['conf_general_webmaster_info'] = 'Is zichtbaar voor de bezoekers en is nodig voor het beheer';
+  $lang['conf_general_mail'] = 'Beheerder e-mailadres';
+  $lang['conf_general_mail_info'] = 'Bezoekers kunnen hier een e-mail bericht aan sturen';
+  $lang['conf_general_prefix'] = 'Indexfoto voorvoegsel';
+  $lang['conf_general_prefix_info'] = 'Indexfoto\'s gebruiken dit voorvoegsel in de naam, standaard is dit TN-, bij twijfel hier niets invullen';
+  $lang['conf_general_access'] = 'Toegangs type';
+  $lang['conf_general_access_1'] = 'vrij';
+  $lang['conf_general_access_2'] = 'beperkt';
+  $lang['conf_general_access_info'] = '- Vrij: de website is vrij toegangkelijk, iedereen kan een account aanmaken. De rechten kunnen later wel door de beheerder worden aangepast<br />- Beperkt: het album is alleen toegangkelijk middels een door de beheerder aangemaakt account';
+  $lang['conf_general_max_user_listbox'] = 'Maximale lijst met users';
+  $lang['conf_general_max_user_listbox_info'] = '- Dit is een getal van 0 t/m 255 en geeft aan hoeveel users er in de lijst zichtbaar zijn van het aanmelden<br />- Bij 0 word er geen lijst getoond';
+  $lang['conf_comments'] = 'opmerkingen';
+  $lang['conf_comments_title'] = 'Configuratie van '.$lang['conf_comments'];
+  $lang['conf_comments_show_comments'] = 'Opmerkingen';
+  $lang['conf_comments_show_comments_info'] = 'Toon de opmerkingen onder elke '.$lang['lang_picture_sev'].'?';
+  $lang['conf_comments_comments_number'] = 'Aantal opmerkingen per pagina';
+  $lang['conf_comments_comments_number_info'] = 'Aantal opmerkingen per pagina. Het aantal opmerkingen is onbeperkt. Voer een getal in tussen de 5 en 50.';
+  $lang['conf_err_comment_number'] = 'Het aantal opmerkingen per pagina moet minimaal een getal zijn tussen de 5 en 50';
+  $lang['conf_remote_site_delete_info'] = 'Het verwijderen van een remote server, heeft als consequentie dat alle afbeeldingen en categoriën uit de database wordne verwijderd';
+  $lang['conf_upload_title'] = 'Configuratie van user upload';
+  $lang['conf_upload_available'] = 'Sta het uploaden van bestanden toe';
+  $lang['conf_upload_maxfilesize'] = 'Maximale bestandsgrootte';
+  $lang['conf_upload_maxfilesize_info'] = 'In KB een getal tussen 10 en 1000.';
+  $lang['conf_err_upload_maxfilesize'] = $lang['conf_upload_maxfilesize_info'];
+  $lang['conf_upload_maxwidth'] = 'Maximale breedte';
+  $lang['conf_upload_maxwidth_info'] = 'In pixels met een minimale grootte van 10';
+  $lang['conf_err_upload_maxwidth'] = $lang['conf_upload_maxwidth_info'];
+  $lang['conf_upload_maxheight'] = 'Maximale hoogte';
+  $lang['conf_upload_maxheight_info'] = 'In pixels met een minimale grootte van 10';
+  $lang['conf_err_upload_maxwidth'] = $lang['conf_upload_maxheight_info'];
+  $lang['conf_upload_maxwidth_thumbnail'] = 'Maximale breedte van de indexfoto';
+  $lang['conf_upload_maxwidth_thumbnail_info'] = 'In pixels met een minimale grootte van 10';
+  $lang['conf_err_upload_maxwidth_thumbnail'] = $lang['conf_upload_maxwidth_thumbnail_info'];
+  $lang['conf_upload_maxheight_thumbnail'] = 'Maximale hoogte van de indexfoto';
+  $lang['conf_upload_maxheight_thumbnail_info'] = 'In pixels met een minimale grootte van 10';
+  $lang['conf_err_upload_maxheight_thumbnail'] = $lang['conf_upload_maxheight_thumbnail_info'];
+  $lang['conf_default_title'] = 'Standaard instellingen voor gasten, deze worden overruled door de persoonlijke instellingen';
+  $lang['conf_default_language_info'] = 'Standaard taal';
+  $lang['conf_default_theme_info'] = 'Standaard opmaakthema';
+  $lang['conf_session_title'] = 'Configuratie van de sessie';
+  $lang['conf_session_size'] = 'identifier size';
+  $lang['conf_session_size_info'] = '- the longer your identifier is, the more secure your site is<br />- enter a number between 4 and 50';
+  $lang['conf_session_time'] = 'validity period';
+  $lang['conf_session_time_info'] = '- the shorter the validity period is, the more secure your site is<br />- enter a number between 5 and 60, in minutes';
+  $lang['conf_session_key'] = 'keyword';
+  $lang['conf_session_key_info'] = '- the session keyword improve the encoding of the session identifier<br />- enter any sentence shorter than 255 caracters';
+  $lang['conf_session_delete'] = 'Verwijder verlopen sessies';
+  $lang['conf_session_delete_info'] = 'het is aan te raden om de verlopen sessies te verwijderen, omdat deze in de database achterblijven (voor de beveiliging maakt het niet uit)';
+  $lang['user_err_modify'] = 'Deze gebruiker kan niet worden gewijzigd of verwijderd';
+  $lang['user_err_unknown'] = 'Deze gebruiker bestaat niet in de database';
+  $lang['adduser_info_message'] = 'De infromatie is in de database verwerkt voor user: ';
+  $lang['adduser_info_password_updated'] = '(wachtwoord gewijzigd)';
+  $lang['adduser_info_back'] = 'Terug naar de lijst';
+  $lang['adduser_fill_form'] = 'Gebruik dit formulier a.u.b.';
+  $lang['adduser_unmodify'] = 'niet te wijzigen';
+  $lang['adduser_status'] = 'Status';
+  $lang['adduser_status_admin'] = 'beheer';
+  $lang['adduser_status_guest'] = 'gebruiker';
+  $lang['permuser_info_message'] = 'Rechten zijn aangepast';
+  $lang['permuser_title'] = 'Rechten voor gebruiker';
+  $lang['permuser_warning'] = 'Waarschuwing : Een "<span style="font-weight:bold;">verboden toegang</span>" tot de root van een categorie voorkomt toegang tot de rest van die categorie';
+  $lang['permuser_authorized'] = 'gemachtigd';
+  $lang['permuser_forbidden'] = 'verboden';
+  $lang['permuser_parent_forbidden'] = 'bovenliggende categorie is verboden';
+  $lang['listuser_confirm'] = 'Wilt u deze gebruiker echt verwijderen';
+  $lang['listuser_info_deletion'] = 'is uit database verwijderd';
+  $lang['listuser_user_group'] = 'Gebruikersgroep';
+  $lang['listuser_modify'] = 'Wijzig';
+  $lang['listuser_modify_hint'] = 'wijzig gebruiker';
+  $lang['listuser_permission'] = 'Rechten';
+  $lang['listuser_permission_hint'] = 'wijzig rechten van';
+  $lang['listuser_delete'] = 'Verwijder';
+  $lang['listuser_delete_hint'] = 'verwijder gebruiker';
+  $lang['listuser_button_all'] = 'allemaal';
+  $lang['listuser_button_invert'] = 'inverteer';
+  $lang['listuser_button_create_address'] = 'creeer e-mail adressen';
+  $lang['cat_invisible'] = 'onzichtbaar';
+  $lang['cat_edit'] = 'Wijzig';
+  $lang['cat_up'] = 'Omhoog';
+  $lang['cat_down'] = 'Omlaag';
+  $lang['cat_image_info'] = 'Wijzig informatie';
+  $lang['cat_total'] = 'total';
+  $lang['editcat_confirm'] = 'De informatie is verwerkt in de database';
+  $lang['editcat_back'] = $lang['lang_category_bmv'];
+  $lang['editcat_title1'] = 'Opties voor de '.$lang['lang_category_sev'];
+  $lang['editcat_name'] = 'Naam';
+  $lang['editcat_comment'] = 'Opmerking';
+  $lang['editcat_status'] = 'Status';
+  $lang['infoimage_general'] = 'Basis opties voor '.$lang['lang_category_sev'].' ';
+  $lang['infoimage_useforall'] = 'gebruik voor alle '.$lang['lang_picture_smv'].'?';
+  $lang['infoimage_creation_date'] = 'Datum van de opname/creatie';
+  $lang['infoimage_detailed'] = 'Optie voor elk afzonderlijke '.$lang['lang_picture_sev'];
+  $lang['infoimage_title'] = 'Titel';
+  $lang['infoimage_comment'] = 'Commentaar';
+  $lang['update_missing_tn'] = 'er is geen indexfoto aanwezig voor';
+  $lang['update_disappeared_tn'] = 'de indexfoto is verdwenen';
+  $lang['update_disappeared'] = 'bestaat niet';
+  $lang['update_part_deletion'] = 'Deletion of images that have no thumbnail or that doesn\'t exist';
+  $lang['update_deletion_conclusion'] = 'foto of afbeelding is uit de database verwijderd';
+  $lang['update_part_research'] = 'Zoeken naar nieuwe foto\'s of afbeeldingen';
+  $lang['update_research_added'] = 'toegevoegd';
+  $lang['update_research_tn_ext'] = 'indexfoto in';
+  $lang['update_research_conclusion'] = 'foto\'s of afbeeldingen zijn toegevoegd aan de database';
+  $lang['update_default_title'] = 'Kies een optie';
+  $lang['update_only_cat'] = 'Ververs '.$lang['lang_category_smv'].', maar geen '.$lang['lang_picture_bmv'];
+  $lang['update_all'] = 'Ververs alles';
+  $lang['tn_width'] = 'breette';
+  $lang['tn_height'] = 'hoogte';
+  $lang['tn_no_support'] = 'Afbeelding niet bereikbaar';
+  $lang['tn_format'] = 'voor het bestandsformaat';
+  $lang['tn_thisformat'] = 'voor dit bestandsformaat';
+  $lang['tn_err_width'] = 'de breedte moet groter zijn dan';
+  $lang['tn_err_height'] = 'de hoogte moet groter zijn dan';
+  $lang['tn_results_title'] = 'Resultaat van het genereren van de indexafbeeldingen';
+  $lang['tn_picture'] = 'afbeelding';
+  $lang['tn_results_gen_time'] = 'gegenereerd in';
+  $lang['tn_stats'] = 'Algemene statistieken';
+  $lang['tn_stats_nb'] = 'aantal gemaakte indexfoto\'s';
+  $lang['tn_stats_total'] = 'totale tijd';
+  $lang['tn_stats_max'] = 'max tijd';
+  $lang['tn_stats_min'] = 'min tijd';
+  $lang['tn_stats_mean'] = 'gemiddelde tijd';
+  $lang['tn_err'] = 'U maakt fouten';
+  $lang['tn_params_title'] = 'Instellingen voor de indexafbeeldingen';
+  $lang['tn_params_GD'] = 'GD versie';
+  $lang['tn_params_GD_info'] = '- GD is the picture manipulating library for PHP<br />-choose the version installed on your server. If you choose the wrong, you\'ll just have errors messages, come back with your browser and choose the other version. If no version works, it means your server doesn\'t support GD.';
+  $lang['tn_params_width_info'] = 'de maximale breedte die een indexafbeelding mag zijn';
+  $lang['tn_params_height_info'] = 'de maximale hoogte die een indexafbeelding mag zijn';
+  $lang['tn_params_create'] = 'genereer';
+  $lang['tn_params_create_info'] = 'Do not try to miniaturize too many pictures in the same time.<br />Indeed, miniaturization uses a lot of CPU. If you installed PhpWebGallery on a free provider, a too high CPU load can sometime lead to the deletion of your website.';
+  $lang['tn_params_format'] = 'bestandsformaat';
+  $lang['tn_params_format_info'] = 'alleen JPG wordt ondersteund voor indexafbeeldingen';
+  $lang['tn_alone_title'] = 'afbeeldingen zonder indexafbeelding (alleen jpeg en png)';
+  $lang['tn_dirs_title'] = 'Lijst met mappen/directories';
+  $lang['tn_dirs_alone'] = 'afbeeldingen zonder indexafbeelding';
+  $lang['help_images_title'] = 'Afbeeldingen toevoegen';
+  $lang['help_images_intro'] = 'Hoe plaats ik afbeeldingen in de mappen/directories';
+  $lang['help_images'][0] = 'in the directory "galleries", create directories that will represent your categories';
+  $lang['help_images'][1] = 'in each directory, you can create as many sub-level directories as you wish.';
+  $lang['help_images'][2] = 'you can create as many categories and sub-categories for each category as you wish';
+  $lang['help_images'][3] = 'picture files must have jpeg format (extension jpg or JPG), gif format (extension gif or GIF) or png format (extension png or PNG).';
+  $lang['help_images'][4] = 'try not to use blank space " " or hyphen "-" in picture files, I advise you to use underscore "_" character which is managed by PhpWebGallery and will provide better results';
+  $lang['help_thumbnails_title'] = 'Indexafbeeldingen';
+  $lang['help_thumbnails'][0] = 'in each directory containing picture to display on your site, there is a sub-directory nammed "thumbnail", if it doesn\'t exist, create it to place your thumbnails into it.';
+  $lang['help_thumbnails'][1] = 'thumbnails don\'t need to have the same extension as their associated picture (a picture with .jpg extension can have a thumbnail in .GIF extention for instance).';
+  $lang['help_thumbnails'][2] = 'the thumbnail associated to a picture must be prefixed with the prefix given on the configuration page(image.jpg -> TN_image.GIF for instance).';
+  $lang['help_thumbnails'][3] = 'I advise you to use the module for windows downloadable on the presentation site of PhpWebGallery for thumbnails management.';
+  $lang['help_thumbnails'][4] = 'you can use the thumbnail creation page integrated in PhpWebGallery, but I don\'t advice you so, because thumbnail quality may be poor and it uses a high CPU load which can be a problem if you use free web hosting.';
+  $lang['help_thumbnails'][5] = 'if you choose to use your hosting provider to create thumbnails, you must give 775 rights on "galleries" folder and all its sub-folders.';
+  $lang['help_database_title'] = 'Ververs Database';
+  $lang['help_database'][0] = 'once pictures files and thumbnails correctly placed in the directories, clic on "database update" in the menu of the administration panel.';
+  $lang['help_infos_title'] = 'Miscellanous informations';
+  $lang['help_infos'][1] = 'As soon as you created your gallery, go in the user list and modify permissions for user "visiteur". Indeed, every new registered users will have by default the same permissions as "visiteur" user.';
+  $lang['help_remote_title'] = 'Remote site';
+  $lang['help_remote'][0] = 'PhpWebGallery offers the possibility to use several servers to store the images which will compose your gallery. It can be useful if your gallery is installed on one limited space and that you have a big quantity of images to be shown. Please , follow this procedure : ';
+  $lang['help_remote'][1] = '1. edit file "create_listing_file.php" (you will find it in the directory "admin"), by modifying the line "$prefix_thumbnail = "TN-";" if the prefix for your thumbnails is not "TN-".';
+  $lang['help_remote'][2] = '2. place file "create_listing_file.php" modified on your distant website, in the root directory of your directories of images  (as the directory "galleries" of this website) by ftp.';
+  $lang['help_remote'][3] = '3. launch script using the url http://domaineDistant/repGalerie/create_listing_file.php, a file listing.xml has just been created.';
+  $lang['help_remote'][4] = '4. get back file listing.xml from your distant website to place it in directory "admin" of this website.';
+  $lang['help_remote'][5] = '5. please , launch an update of the data of images by the interface of administration, once the listing.xml used file, kill it from the directory "admin".';
+  $lang['help_remote'][6] = 'You can update the contents of a distant website by redoing the described manipulation. You can also kill a distant website by choosing the option in the configuration section of the administration panel.';
+  $lang['help_upload_title'] = 'Added images by users';
+  $lang['help_upload'][0] = 'PhpWebGallery offers the possibility for users to upload images. in order to do it :';
+  $lang['help_upload'][1] = '1. authorize the option in the configuration zone of the administration panel';
+  $lang['help_upload'][2] = '2. authorize the rights in writing in the images directories';
+  $lang['install_message'] = 'Bericht';
+  $lang['step1_confirmation'] = 'Parameters are correct';
+  $lang['step1_err_db'] = 'Connection to server succeed, but it was impossible to connect to database';
+  $lang['step1_err_server'] = 'Can\'t connect to server';
+  $lang['step1_err_copy_2'] = 'De volgende stap van de installatie is nu mogelijk';
+  $lang['step1_err_copy_next'] = 'volgende stap';
+  $lang['step1_title'] = 'Stap 1/2';
+  $lang['step1_host'] = 'MySQL host';
+  $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
+  $lang['step1_user'] = 'Database user';
+  $lang['step1_user_info'] = 'Dez gebruiker krijgt u van uw provider';
+  $lang['step1_pass'] = 'Password';
+  $lang['step1_pass_info'] = 'Het password krijgt u van uw provider';
+  $lang['step1_database'] = 'Database naam';
+  $lang['step1_database_info'] = 'Ook de naam van de database krijgt u via uw provider';
+  $lang['step1_prefix'] = 'Database tabel voorvoegsel';
+  $lang['step1_prefix_info'] = 'database tables names will be prefixed with it (enables you to manage better your tables)';
+  $lang['step2_err_login1'] = 'voer een usernaam in van de beheerder';
+  $lang['step2_err_login3'] = 'de usernaam mag geen \' of " karakters bevatten';
+  $lang['step2_err_pass'] = 'voer nogmaals het wachtwoord in';
+  $lang['step2_err_mail'] = $lang['conf_err_mail'];
+  $lang['install_end_title'] = 'De installatie is nu klaar';
+  $lang['install_end_message'] = 'De configuratie van PhpWebGallery is klaar<br /><br />
+Om veiligheidsredenen is het verstandig het bestand "install.php" in de directory "admin" te verwijderen<br />
+Als dit is uitgevoerd, kunt u de volgende acties uitvoeren :
+<ul>
+  <li>Ga dan via het menu naar '.$lang['ident_page_title'].' : [ <a href="../identification.php">'.$lang['ident_page_title'].'</a> ] en gebruik hier dan de gebruiker die u net heeft aangemaakt</li>
+  <li>Deze gebruiker geeft u dan toegang tot de [ <a href="admin.php">beheer module</a> ] en naar de verdere instructies</li>
+</ul>';
+  $lang['step2_title'] = 'Stap 2/2';
+  $lang['step2_pwd'] = 'Beheerders wachtwoord';
+  $lang['step2_pwd_info'] = 'Hou dit geheim, dit account geeft toegang tot de beheer module';
+  $lang['step2_pwd_conf'] = 'Bevestig wachtwoord';
+  $lang['step2_pwd_conf_info'] = 'Nogmaals ter controle';
+  // new or modified in release 1.3
+  $lang['remote_site'] = 'Andere website';
+  $lang['title_add'] = 'Nieuwe gebruiker';
+  $lang['title_modify'] = 'Wijzig een gebruiker';
+  $lang['title_groups'] = 'Groepen beheer';
+  $lang['title_user_perm'] = 'Wijzig rechten voor gebruiker';
+  $lang['title_cat_perm'] = 'Wijzig rechten voor '.$lang['lang_category_sev'];
+  $lang['title_group_perm'] = 'Wijzig rechten voor groep';
+  $lang['title_picmod'] = 'Wijzig informatie van een '.$lang['lang_picture_sev'];
+  $lang['menu_groups'] = 'Groepen';
+  $lang['menu_comments'] = 'Opmerkingen';
+  $lang['conf_general_log'] = 'Logging';
+  $lang['conf_general_log_info'] = 'Bij ja wordt de logging aangezet, dit is op te vragen in het beheer paneel. Note: Er wordt wel meer gevraagd van de database';
+  $lang['conf_general_mail_notification'] = 'E-mail notficatie';
+  $lang['conf_general_mail_notification_info'] = 'De beheerders krijgen een e-mail bericht als er een opmerking wordt geplaatst of als er een '.$lang['lang_picture_sev'].' wordt geupload.';
+  $lang['conf_comments_validation'] = 'Opmerkingen eerst valideren';
+  $lang['conf_comments_validation_info'] = 'Bij ja zal een beheerder de opmerkingen eerst moeten valideren';
+  $lang['conf_comments_forall'] = 'Zichtbaar voor iedereen';
+  $lang['conf_comments_forall_info'] = 'Bij ja zijn de opmerkingen ook voor gasten zichtbaar';
+  $lang['conf_default_nb_image_per_row_info'] = 'Aantal indexfoto\'s dat zichtbaar is per regel';
+  $lang['conf_default_nb_row_per_page_info'] = 'Aantal regels met indexfoto\'s';
+  $lang['conf_default_short_period_info'] = 'Dit is de korte periode waarin de '.$lang['lang_picture_smv'].' de status van pas geplaatst hebben (met rood gemarkeerd). Deze moet minimaal een waarde 1 hebben';
+  $lang['conf_default_long_period_info'] = 'Dit is de lange periode waarin de '.$lang['lang_picture_smv'].' de status van pas geplaatst hebben (met groen gemarkeerd). Deze moet minimaal een hogere waarde hebben dan de korte periode';
+  $lang['conf_default_expand_info'] = 'Laat standaard in het menu alle '.$lang['lang_category_smv'].' zien ?';
+  $lang['conf_default_show_nb_comments_info'] = 'Toon het aantal opmerkingen onder afbeelding op de indexpagina';
+  $lang['conf_default_maxwidth_info'] = 'De afbeelding wordt getoond in een venster dat niet breeder is dan deze waarde in pixels.';
+  $lang['conf_default_maxheight_info'] = 'De afbeelding wordt getoond in een venster dat niet hoger is dan deze waarde in pixels';
+  $lang['conf_session_cookie'] = 'authorize cookies';
+  $lang['conf_session_cookie_info'] = 'users won\'t have to log on each visit any more. Less secure.';
+  $lang['adduser_associate'] = 'Beschikbare groep(en)';
+  $lang['group_add'] = 'Toevoegen van groep';
+  $lang['group_add_error1'] = 'The name of a group must not contain " or \'';
+  $lang['group_add_error2'] = 'Deze naam wordt al gebruikt voor een andere groep';
+  $lang['group_confirm'] = 'Wilt u deze groep echt verwijderen?';
+  $lang['group_list_title'] = 'Lijst van bestaande groepen';
+  $lang['group_err_unknown'] = 'Deze groep bestaat niet in de database';
+  $lang['cat_permission'] = 'Rechten';
+  $lang['cat_update'] = 'Ververs database';
+  $lang['cat_add'] = 'Voeg een virtuele '.$lang['lang_category_sev'].' toe';
+  $lang['cat_parent'] = 'Onder '.$lang['lang_category_sev'];
+  $lang['cat_error_name'] = 'The name of a category mustn\'t be empty';
+  $lang['cat_virtual'] = 'virtueel';
+  $lang['cat_first'] = 'Move first';
+  $lang['cat_last'] = 'Move last';
+  $lang['editcat_visible_info'] = '(onzichtbaar uitgezonderd beheerders)';
+  $lang['editcat_visible'] = 'Zichtbaar';
+  $lang['editcat_uploadable'] = 'Upload beschikbaar';
+  $lang['infoimage_keyword_separation'] = '(Gescheiden door een ",")';
+  $lang['infoimage_addtoall'] = 'bestemd voor allemaal';
+  $lang['infoimage_removefromall'] = 'verwijder van allemaal';
+  $lang['infoimage_associate'] = 'Koppel aan de '.$lang['lang_category_sev'];
+  $lang['update_wrong_dirname'] = 'The name of directories and files must be composed of letters, figures, "-", "_" or "."';
+  $lang['stats_pages_seen'] = 'pagina\'s gezien';
+  $lang['stats_visitors'] = 'gast(en)';
+  $lang['stats_empty'] = 'Leeg logging';
+  $lang['stats_pages_seen_graph_title'] = 'Aantal bezocht pagina\'s per dag';
+  $lang['stats_visitors_graph_title'] = 'Aantal gasten per dag';
+  $lang['comments_last_title'] = 'Alle opmerkingen';
+  $lang['comments_non_validated_title'] = 'Opmerkingen is status te valideren';
+  $lang['help_database'][1] = 'In order to avoid the update of too many pictures in a single update, I advise to start by updating only categories, then on the categories section of the administration panel, update each category thanks to the link "update"';
+  $lang['help_upload'][3] = 'The category must have upload available itself for upload.';
+  $lang['help_upload'][4] = 'Uploaded images by the users are not directly visible on the website, they must be validated by an administrator.  For that purpose, an administrator must go on the page "en attente" of the administration panel, to validate or to refuse the images proposed, then launch an update of the images data.';
+  $lang['help_virtual_title'] = 'Links between pictures and categories and virtual categories';
+  $lang['help_virtual'][0] = 'PhpWebGallery is able to dissociate categories where pictures are stored and categories where pictures are shown.';
+  $lang['help_virtual'][1] = 'By default, pictures are shown only in their real categories : the ones corresponding to directories on the web server.';
+  $lang['help_virtual'][2] = 'To link a picture to a category, you just have to make the association on the page of picture informations or on the informations of all pictures of a category.';
+  $lang['help_virtual'][3] = 'Using this principle, it is possible to create virtual categories in PhpWebGallery : no real directory coresponds to this category. You just have to create this category on the section "categories" of the admin panel.';
+  $lang['help_groups_title'] = 'Users Groups';
+  $lang['help_groups'][0] = 'PhpWebGallery is able to manage groups of users. It can be very useful to have common permission access for private categories.';
+  $lang['help_groups'][1] = '1. Create the group "family" on the section "Groups" of admin panel.';
+  $lang['help_groups'][2] = '2. On the section "Users", edit on of them and associate him to the group "family".';
+  $lang['help_groups'][3] = '3. By modifying the permissions for a category or for a group, you\'ll see that all categories accessible for a group are accessible for its members.';
+  $lang['help_groups'][4] = 'A user can belong to several groups. The authorization is stronger than prohibition : if a user "jack" belongs to the group "family" and "friends", and that only group "family" can see category "Christmas 2003", "jack" will be able to see "Christmas 2003".';
+  $lang['help_access_title'] = 'Access authorization';
+  $lang['help_access'][0] = 'PhpWebGallery is able to forbid access to categories. Categories can be "public" or "private". In order to forbid access to a category :';
+  $lang['help_access'][1] = '1. Modify category informations (from the "categories" section in tha admin panel) and make it "private".';
+  $lang['help_access'][2] = '2. On the page of permissions (for a group or a user) the private category will be shown and you\'ll be able to authorize access or not.';
+  $lang['help_infos'][2] = 'If you have any question, do not hesitate to take a look at the forum or ask a question there. The <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> (message board) is available on the presentation site of PhpWebGallery.';
+  $lang['step1_err_copy'] = 'Copy the text between hyphens and paste it into the file "include/mysql.inc.php"(Warning : mysql.inc.php must only contain what is in blue, no line return or space character)';
+  $lang['permuser_only_private'] = 'Alleen privé '.$lang['lang_category_smv'].' zijn zichtbaar';
+  $lang['waiting_update'] = 'Gevalideerde foto\'s en afbeeldingen worden pas getoond nadat de database is ververst';
+  $lang['conf_upload_available_info'] = 'Sta het uploaden van bestanden toe, dit moet wel per '.$lang['lang_category_sev'].' worden ingesteld, standaard staat deze optie uit.';
+  $lang['install_help'] = 'Hulp nodig ? Stel je vraag op het <a href="http://forum.phpwebgallery.net">PhpWebGallery forum</a>. (Engels of Frans)';
+  $lang['install_warning'] = 'Het bestand "admin/install.php" is nog niet verwijderd. Zolang deze na de installatie nog aanwezig is, is phpweggallery niet veilig.';
+    // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'Deze '.$lang['lang_category_sev'].' is niet in de database bekend';
+}
+?>
Index: /branches/1.3/language/english.php
===================================================================
--- /branches/1.3/language/english.php	(revision 3252)
+++ /branches/1.3/language/english.php	(revision 3252)
@@ -0,0 +1,549 @@
+<?php
+/***************************************************************************
+ *                                english.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+$lang['only_members'] = 'Only members can access this page';
+$lang['invalid_pwd'] = 'Invalid password!';
+$lang['access_forbiden'] = 'You are not authorized to access this page';
+$lang['submit'] = 'Submit';
+$lang['login'] = 'login';
+$lang['password'] = 'password';
+$lang['new'] = 'new';
+$lang['delete'] = 'delete';
+$lang['category'] = 'category';
+$lang['thumbnail'] = 'thumbnail';
+$lang['date'] = 'date';
+$lang['diapo_default_page_title'] = 'No category selected';
+$lang['thumbnails'] = 'Thumbnails';
+$lang['categories'] = 'Categories';
+$lang['hint_category'] = 'shows images at the root of this categry';
+$lang['total_images'] = 'total';
+$lang['title_menu'] = 'Menu';
+$lang['change_login'] = 'change login';
+$lang['login'] = 'login';
+$lang['hint_login'] = 'identification enables site\'s appareance customization';
+$lang['logout'] = 'logout';
+$lang['customize'] = 'customize';
+$lang['hint_customize'] = 'customize the appareance of the gallery';
+$lang['hint_search'] = 'search';
+$lang['search'] = 'search';
+$lang['favorite_cat'] = 'favorites';
+$lang['favorite_cat_hint'] = 'display your favorites';
+$lang['about'] = 'about';
+$lang['hint_about'] = 'more informations on PhpWebGallery...';
+$lang['admin'] = 'admin';
+$lang['hint_admin'] = 'available for administrators only';
+$lang['no_category'] = 'No category selected<br />please select it in the menu';
+$lang['page_number'] = 'page number';
+$lang['previous_page'] = 'Previous';
+$lang['next_page'] = 'Next';
+$lang['nb_image_category'] = 'number of images in this category';
+$lang['recent_image'] = 'image within the';
+$lang['days'] = 'days';
+$lang['send_mail'] = 'Any comment? Send me an e-mail';
+$lang['title_send_mail'] = 'A comment on your site';
+$lang['sub-cat'] = 'subcategories';
+$lang['images_available'] = 'images in this category';
+$lang['total'] = 'images';
+$lang['upload_picture'] = 'Upload a picture';
+$lang['registration_date'] = 'registered on';
+$lang['creation_date'] = 'created on';
+$lang['comment'] = 'comment';
+$lang['author'] = 'author';
+$lang['size'] = 'size';
+$lang['filesize'] = 'filesize';
+$lang['file'] = 'file';
+$lang['generation_time'] = 'Page generated in';
+$lang['favorites'] = 'Favorites';
+$lang['search_result'] = 'Search results';
+$lang['about_page_title'] = 'About PhpWebGallery';
+$lang['about_title'] = 'About...';
+$lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Information about PhpWebGallery</div>
+<ul>
+  <li>This website uses <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> release '.$conf['version'].'. PhpWebGallery is a web application giving you the possibility to create an online images gallery easily.</li>
+  <li>Technicaly, PhpWebGallery is fully developped with PHP (the elePHPant) with a MySQL database (the SQuirreL).</li>
+  <li>If you have any suggestions or comments, please visit <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> official site, and its dedicated <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a>.</li>
+</ul>';
+$lang['about_return'] = 'Back';
+$lang['ident_page_title'] = 'Identification';
+$lang['ident_title'] = 'Identification';
+$lang['ident_register'] = 'Register';
+$lang['ident_forgotten_password'] = 'Forget your password ?';
+$lang['ident_guest_visit'] = 'Go through the gallery as a visitor';
+$lang['customize_page_title'] = 'Customization';
+$lang['customize_title'] = 'Customization';
+$lang['customize_nb_image_per_row'] = 'number of images per row';
+$lang['customize_nb_row_per_page'] = 'number of rows per page';
+$lang['customize_language'] = 'language';
+$lang['maxwidth'] = 'maximum width of the pictures';
+$lang['maxheight'] = 'maximum height of the pictures';
+$lang['err_maxwidth'] = 'maximum width must be a number superior to 50';
+$lang['err_maxheight'] = 'maximum height must be a number superior to 50';
+$lang['previous_image'] = 'Previous';
+$lang['next_image'] = 'Next';
+$lang['back'] = 'Click on the image to go back to the thumbnails page';
+$lang['info_image_title'] = 'Image information';
+$lang['link_info_image'] = 'Modify information';
+$lang['true_size'] = 'Real size';
+$lang['comments_title'] = 'Comments from the users of the site';
+$lang['comments_del'] = 'delete this comment';
+$lang['comments_add'] = 'Add a comment';
+$lang['month'][1] = 'January';
+$lang['month'][2] = 'February';
+$lang['month'][3] = 'March';
+$lang['month'][4] = 'April';
+$lang['month'][5] = 'May';
+$lang['month'][6] = 'June';
+$lang['month'][7] = 'July';
+$lang['month'][8] = 'August';
+$lang['month'][9] = 'September';
+$lang['month'][10] = 'October';
+$lang['month'][11] = 'November';
+$lang['month'][12] = 'December';
+$lang['day'][0] = 'Sunday';
+$lang['day'][1] = 'Monday';
+$lang['day'][2] = 'Tuesday';
+$lang['day'][3] = 'Wednesday';
+$lang['day'][4] = 'Thursday';
+$lang['day'][5] = 'Friday';
+$lang['day'][6] = 'Saturday';
+$lang['add_favorites_alt'] = 'Add to favorites';
+$lang['add_favorites_hint'] = 'Add this picture to your favorites';
+$lang['del_favorites_alt'] = 'Delete from favorites';
+$lang['del_favorites_hint'] = 'Delete this picture from your favorites';
+$lang['register_page_title'] = 'Registration';
+$lang['register_title'] = 'Registration';
+$lang['reg_err_login1'] = 'Please, enter a login';
+$lang['reg_err_login2'] = 'login mustn\'t end with a space character';
+$lang['reg_err_login3'] = 'login mustn\'t start with a space character';
+$lang['reg_err_login4'] = 'login mustn\'t contain characters " and \'';
+$lang['reg_err_login5'] = 'this login is already used';
+$lang['reg_err_pass'] = 'please enter your password again';
+$lang['reg_confirm'] = 'confirm';
+$lang['reg_err_mail_address'] = 'mail address must be like xxx@yyy.eee (example : jack@altern.org)';
+$lang['search_title'] = 'Search';
+$lang['invalid_search'] = 'search must be done on 3 caracters or more';
+$lang['search_field_search'] = 'Search';
+$lang['search_return_main_page'] = 'Return to thumbnails page';
+$lang['upload_forbidden'] = 'You can\'t upload pictures in this category';
+$lang['upload_file_exists'] = 'A picture\'s name already used';
+$lang['upload_filenotfound'] = 'You must choose a picture fileformat for the image';
+$lang['upload_cannot_upload'] = 'can\'t upload the picture on the server';
+$lang['upload_title'] = 'Upload a picture';
+$lang['upload_advise'] = 'Choose an image to place in the category : ';
+$lang['upload_advise_thumbnail'] = 'Optional, but recommended : choose a thumbnail to associate to ';
+$lang['upload_advise_filesize'] = 'the filesize of the picture must not exceed : ';
+$lang['upload_advise_width'] = 'the width of the picture must not exceed : ';
+$lang['upload_advise_height'] = 'the height of the picture must not exceed : ';
+$lang['upload_advise_filetype'] = 'the picture must be to the fileformat jpg, gif or png';
+$lang['upload_err_username'] = 'the username must be given';
+$lang['upload_username'] = 'Username';
+$lang['upload_successful'] = 'Picture uploaded with success, an administrator will validate it as soon as possible';
+// new or modified in release 1.3
+$lang['charset'] = 'iso-8859-1';
+$lang['no'] = 'no';
+$lang['yes'] = 'yes';
+$lang['guest'] = 'guest';
+$lang['mail_address'] = 'mail address';
+$lang['public'] = 'public';
+$lang['private'] = 'private';
+$lang['add'] = 'add';
+$lang['dissociate'] = 'dissociate';
+$lang['mandatory'] = 'obligatory';
+$lang['err_date'] = 'wrong date';
+$lang['picture'] = 'picture';
+$lang['IP'] = 'IP';
+$lang['close'] = 'close';
+$lang['open'] = 'open';
+$lang['keywords'] = 'keywords';
+$lang['errors_title'] = 'Errors';
+$lang['infos_title'] = 'Informations';
+$lang['default'] = 'default';
+$lang['comments'] = 'comments';
+$lang['category_representative'] = 'representative';
+$lang['stats'] = 'statistics';
+$lang['most_visited_cat_hint'] = 'displays most visited pictures';
+$lang['most_visited_cat'] = 'most visited';
+$lang['best_rated_cat_hint'] = 'displays pictures best rated';
+$lang['best_rated_cat'] = 'best rated';
+$lang['recent_cat_hint'] = 'displays most recent pictures';
+$lang['recent_cat'] = 'most recent';
+$lang['recent_cat_title'] = 'Recent pictures';
+$lang['visited'] = 'visited';
+$lang['times'] = 'times';
+$lang['customize_theme'] = 'interface theme';
+$lang['customize_expand'] = 'expand all categories';
+$lang['customize_show_nb_comments'] = 'show number of comments';
+$lang['customize_short_period'] = 'short period';
+$lang['customize_long_period'] = 'long period';
+$lang['customize_template'] = 'template';
+$lang['err_periods'] = 'periods must be integer values';
+$lang['err_periods_2'] = 'periods must be superior to 0. The long period must be grater than the short period.';
+$lang['create_cookie'] = 'create a cookie';
+$lang['customize_day'] = 'day';
+$lang['customize_week'] = 'week';
+$lang['customize_month'] = 'month';
+$lang['customize_year'] = 'year';
+$lang['slideshow'] = 'slideshow';
+$lang['period_seconds'] = 'seconds per picture';
+$lang['slideshow_stop'] = 'stop the slideshow';
+$lang['comment_added'] = 'Your comment has been registered';
+$lang['comment_to_validate'] = 'An administrator must authorize your comment before it is visible.';
+$lang['comment_anti-flood'] = 'Anti-flood system : please wait for a moment before trying to post another comment';
+$lang['comment_user_exists'] = 'This login is already used by another user';
+$lang['invalid_search'] = 'Searched words must be grater than 3 characters and must not contain punctuation mark';
+$lang['search_mode_or'] = 'at least one word';
+$lang['search_mode_and'] = 'all the words';
+$lang['search_comments'] = 'separate different words with spaces';
+$lang['upload_name'] = 'Name of the picture';
+$lang['upload_author'] = 'Author (eg "Pierrick LE GALL")';
+$lang['upload_creation_date'] = 'Creation date (DD/MM/YYYY)';
+$lang['upload_comment'] = 'Comment';
+$lang['mail_hello'] = 'Hi,';
+$lang['mail_new_upload_subject'] = 'New picture on the website';
+$lang['mail_new_upload_content'] = 'A new picture has been uploaded on the gallery. It is waiting for your validation. Let\'s meet in the administration panel to authorize or refuse this picture.';
+$lang['mail_new_comment_subject'] = 'New comment on website';
+$lang['mail_new_comment_content'] = 'A new comment has been registered on the gallery. If you chose to validate each comment, you first have to validate this comment in the administration panel to make it visible in the gallery.'."\n\n".'You can see last comments in the administration panel';
+$lang['connected_user'] = 'connected user';
+$lang['title_comments'] = 'Users comments';
+$lang['stats_last_days'] = 'last days';
+$lang['hint_comments'] = 'See last users comments';
+$lang['menu_login'] = 'login';
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+  $lang['title_liste_users'] = 'Users list';
+  $lang['title_history'] = 'History';
+  $lang['title_update'] = 'Database update';
+  $lang['title_configuration'] = 'PhpWebGallery configuration';
+  $lang['title_instructions'] = 'Instructions';
+  $lang['title_categories'] = 'Categories management';
+  $lang['title_edit_cat'] = 'Edit a category';
+  $lang['title_info_images'] = 'Modify category\'s image information';
+  $lang['title_thumbnails'] = 'Thumbnail creation';
+  $lang['title_thumbnails_2'] = 'for';
+  $lang['title_default'] = 'PhpWebGallery administration';
+  $lang['menu_title'] = 'Administration';
+  $lang['menu_config'] = 'Configuration';
+  $lang['menu_users'] = 'Users';
+  $lang['menu_add_user'] = 'add';
+  $lang['menu_list_user'] = 'list';
+  $lang['menu_categories'] = 'Categories';
+  $lang['menu_update'] = 'Database update';
+  $lang['menu_thumbnails'] = 'Thumbnails';
+  $lang['menu_history'] = 'History';
+  $lang['menu_instructions'] = 'Instructions';
+  $lang['menu_back'] = 'Back to galleries';
+  $lang['title_waiting'] = 'Pictures waiting for validation';
+  $lang['menu_waiting'] = 'Waiting';
+  $lang['default_message'] = 'PhpWebGallery administration panel';
+  $lang['conf_err_prefixe'] = 'thumbnail\'s prefix mustn\'t contain any accentued character';
+  $lang['conf_err_mail'] = 'e-mail address refused, it must be like name@server.com';
+  $lang['conf_err_sid_size'] = 'the session identifier size must be an integer value between 4 and 50';
+  $lang['conf_err_sid_time'] = 'the session time must be an integer value between 5 and 60';
+  $lang['conf_err_max_user_listbox'] = 'the max user listbox number must be an integer value between 0 and 255';
+  $lang['conf_confirmation'] = 'Information data registered in database';
+  $lang['conf_general_title'] = 'Main configuration';
+  $lang['conf_general_webmaster'] = 'webmaster login';
+  $lang['conf_general_webmaster_info'] = 'It will be shown to the visitors. It is necessary for website administration';
+  $lang['conf_general_mail'] = 'webmaster mail adress';
+  $lang['conf_general_mail_info'] = 'Visitors will be able to contact by this mail';
+  $lang['conf_general_prefix'] = 'thumbnail prefix';
+  $lang['conf_general_prefix_info'] = 'Thumbnails use this prefix. Do not fill if your not sure.';
+  $lang['conf_general_access'] = 'access type';
+  $lang['conf_general_access_1'] = 'free';
+  $lang['conf_general_access_2'] = 'restricted';
+  $lang['conf_general_access_info'] = '- free : anyone can enter the site, any visitor can create an account in order to customize the appareance of the website<br />- restricted : the webmaster create accounts. Only registered users can enter the site';
+  $lang['conf_general_max_user_listbox'] = 'max listbox users number';
+  $lang['conf_general_max_user_listbox_info'] = '- this is the number maximum of users for which PhpWebGallery display a listbox instead of a simple text box on the identification page<br />- enter a number between 0 and 255, 0 means that you want to display the listbox';
+  $lang['conf_comments'] = 'users comments';
+  $lang['conf_comments_title'] = 'Configuration of '.$lang['conf_comments'];
+  $lang['conf_comments_show_comments'] = $lang['conf_comments'];
+  $lang['conf_comments_show_comments_info'] = 'display the users comments under each picture ?';
+  $lang['conf_comments_comments_number'] = 'number of comments per page';
+  $lang['conf_comments_comments_number_info'] = 'number of comments to display on each page. This number is unlimited for a picture. Enter a number between 5 and 50.';
+  $lang['conf_err_comment_number'] = 'The number of comments a page must be between 5 and 50 included.';
+  $lang['conf_remote_site_delete_info'] = 'Deleting a remote server will delete all the image and the categories in relation with this server.';
+  $lang['conf_upload_title'] = 'Configuration of the users upload';
+  $lang['conf_upload_available'] = 'authorized the upload of pictures';
+  $lang['conf_upload_maxfilesize'] = 'maximum filesize';
+  $lang['conf_upload_maxfilesize_info'] = 'Maximum filesize for the uploaded pictures. Must be a number between 10 and 1000 KB.';
+  $lang['conf_err_upload_maxfilesize'] = 'Maximum filesize for the uploaded pictures must be a number between 10 and 1000 KB.';
+  $lang['conf_upload_maxwidth'] = 'maximum width';
+  $lang['conf_upload_maxwidth_info'] = 'Maximum width authorized for the uploaded images. Must be a number superior to 10 pixels';
+  $lang['conf_err_upload_maxwidth'] = 'maximum width authorized for the uploaded images must be a number superior to 10 pixels.';
+  $lang['conf_upload_maxheight'] = 'maximum height';
+  $lang['conf_upload_maxheight_info'] = 'Maximum height authorized for the uploaded images. Must be a number superior to 10 pixels';
+  $lang['conf_err_upload_maxwidth'] = 'maximum height authorized for the uploaded images must be a number superior to 10 pixels.';
+  $lang['conf_upload_maxwidth_thumbnail'] = 'thumbnails maximum width';
+  $lang['conf_upload_maxwidth_thumbnail_info'] = 'Maximum width authorized for the uploaded thumbnails. Must be a number superior to 10 pixels';
+  $lang['conf_err_upload_maxwidth_thumbnail'] = 'Maximum width authorized for the uploaded thumbnails must be a number superior to 10 pixels.';
+  $lang['conf_upload_maxheight_thumbnail'] = 'thumbnails maximum height';
+  $lang['conf_upload_maxheight_thumbnail_info'] = 'Maximum height authorized for the uploaded thumbnails. Must be a number superior to 10 pixels';
+  $lang['conf_err_upload_maxheight_thumbnail'] = 'Maximum height authorized for the uploaded thumbnails must be a number superior to 10 pixels.';
+  $lang['conf_default_title'] = 'Default display properties for unregistered visitors and new accounts';
+  $lang['conf_default_language_info'] = 'default language';
+  $lang['conf_default_theme_info'] = 'default theme';
+  $lang['conf_session_title'] = 'Sessions configuration';
+  $lang['conf_session_size'] = 'identifier size';
+  $lang['conf_session_size_info'] = '- the longer your identifier is, the more secure your site is<br />- enter a number between 4 and 50';
+  $lang['conf_session_time'] = 'validity period';
+  $lang['conf_session_time_info'] = '- the shorter the validity period is, the more secure your site is<br />- enter a number between 5 and 60, in minutes';
+  $lang['conf_session_key'] = 'keyword';
+  $lang['conf_session_key_info'] = '- the session keyword improve the encoding of the session identifier<br />- enter any sentence shorter than 255 caracters';
+  $lang['conf_session_delete'] = 'delete out-of-date sessions';
+  $lang['conf_session_delete_info'] = 'it is recommanded to empty the database table of session, because out-of-date sessions remains in the database (but it doesn\'t make any security trouble)';
+  $lang['user_err_modify'] = 'This user can\'t be modified or deleted';
+  $lang['user_err_unknown'] = 'This user doesn\'t exist in the database';
+  $lang['adduser_info_message'] = 'Informations registered in the database for user ';
+  $lang['adduser_info_password_updated'] = '(password updated)';
+  $lang['adduser_info_back'] = 'back to the users list';
+  $lang['adduser_fill_form'] = 'Please fill the following form';
+  $lang['adduser_unmodify'] = 'unmodifiable';
+  $lang['adduser_status'] = 'status';
+  $lang['adduser_status_admin'] = 'admin';
+  $lang['adduser_status_guest'] = 'guest';
+  $lang['permuser_info_message'] = 'Permissions registered';
+  $lang['permuser_title'] = 'Restrictions for user';
+  $lang['permuser_warning'] = 'Warning : a "<span style="font-weight:bold;">forbidden access</span>" to the root of a category prevent from accessing the whole category';
+  $lang['permuser_authorized'] = 'authorized';
+  $lang['permuser_forbidden'] = 'forbidden';
+  $lang['permuser_parent_forbidden'] = 'parent category forbidden';
+  $lang['listuser_confirm'] = 'Do you really want to delete this user';
+  $lang['listuser_info_deletion'] = 'was removed from database';
+  $lang['listuser_user_group'] = 'Users group';
+  $lang['listuser_modify'] = 'modify';
+  $lang['listuser_modify_hint'] = 'modify informations of';
+  $lang['listuser_permission'] = 'permissions';
+  $lang['listuser_permission_hint'] = 'modify permissions of';
+  $lang['listuser_delete'] = 'delete';
+  $lang['listuser_delete_hint'] = 'delete user';
+  $lang['listuser_button_all'] = 'all';
+  $lang['listuser_button_invert'] = 'invert';
+  $lang['listuser_button_create_address'] = 'create mail address';
+  $lang['cat_invisible'] = 'invisible';
+  $lang['cat_edit'] = 'Edit';
+  $lang['cat_up'] = 'Move up';
+  $lang['cat_down'] = 'Move down';
+  $lang['cat_image_info'] = 'Images info';
+  $lang['cat_total'] = 'total';
+  $lang['editcat_confirm'] = 'Information registered in the database';
+  $lang['editcat_back'] = 'categories';
+  $lang['editcat_title1'] = 'Options for the';
+  $lang['editcat_name'] = 'Name';
+  $lang['editcat_comment'] = 'Comment';
+  $lang['editcat_status'] = 'Status';
+  $lang['infoimage_general'] = 'General options for the category';
+  $lang['infoimage_useforall'] = 'use for all pictures ?';
+  $lang['infoimage_creation_date'] = 'creation date';
+  $lang['infoimage_detailed'] = 'Option for each picture';
+  $lang['infoimage_title'] = 'title';
+  $lang['infoimage_comment'] = 'comment';
+  $lang['update_missing_tn'] = 'the thumbnail is missing for';
+  $lang['update_disappeared_tn'] = 'the thumbnail disapeared';
+  $lang['update_disappeared'] = 'doesn\'t exist';
+  $lang['update_part_deletion'] = 'Deletion of images that have no thumbnail or that doesn\'t exist';
+  $lang['update_deletion_conclusion'] = 'pictures removed from database';
+  $lang['update_part_research'] = 'Search for new images in the directories';
+  $lang['update_research_added'] = 'added';
+  $lang['update_research_tn_ext'] = 'thumbnail in';
+  $lang['update_research_conclusion'] = 'pictures added to the database';
+  $lang['update_default_title'] = 'Choose an option';
+  $lang['update_only_cat'] = 'update categories, not pictures';
+  $lang['update_all'] = 'update all';
+  $lang['tn_width'] = 'width';
+  $lang['tn_height'] = 'height';
+  $lang['tn_no_support'] = 'Picture unreachable or no support';
+  $lang['tn_format'] = 'for the file format';
+  $lang['tn_thisformat'] = 'for this file format';
+  $lang['tn_err_width'] = 'width must be a number superior to';
+  $lang['tn_err_height'] = 'height must be a number superior to';
+  $lang['tn_results_title'] = 'Results of miniaturization';
+  $lang['tn_picture'] = 'picture';
+  $lang['tn_results_gen_time'] = 'generated in';
+  $lang['tn_stats'] = 'General statistics';
+  $lang['tn_stats_nb'] = 'number of miniaturized pictures';
+  $lang['tn_stats_total'] = 'total time';
+  $lang['tn_stats_max'] = 'max time';
+  $lang['tn_stats_min'] = 'min time';
+  $lang['tn_stats_mean'] = 'average time';
+  $lang['tn_err'] = 'You made mistakes';
+  $lang['tn_params_title'] = 'Miniaturization parameters';
+  $lang['tn_params_GD'] = 'GD version';
+  $lang['tn_params_GD_info'] = '- GD is the picture manipulating library for PHP<br />-choose the version installed on your server. If you choose the wrong, you\'ll just have errors messages, come back with your browser and choose the other version. If no version works, it means your server doesn\'t support GD.';
+  $lang['tn_params_width_info'] = 'maximum width that thumbnails can take';
+  $lang['tn_params_height_info'] = 'maximum height that thumbnails can take';
+  $lang['tn_params_create'] = 'create';
+  $lang['tn_params_create_info'] = 'Do not try to miniaturize too many pictures in the same time.<br />Indeed, miniaturization uses a lot of CPU. If you installed PhpWebGallery on a free provider, a too high CPU load can sometime lead to the deletion of your website.';
+  $lang['tn_params_format'] = 'file format';
+  $lang['tn_params_format_info'] = 'only jpeg file format is supported for thumbnail creation';
+  $lang['tn_alone_title'] = 'pictures without thumbnail (jpeg and png only)';
+  $lang['tn_dirs_title'] = 'Directories list';
+  $lang['tn_dirs_alone'] = 'pictures without thumbnail';
+  $lang['help_images_title'] = 'Adding pictures';
+  $lang['help_images_intro'] = 'How to place pictures in your directories';
+  $lang['help_images'][0] = 'in the directory "galleries", create directories that will represent your categories';
+  $lang['help_images'][1] = 'in each directory, you can create as many sub-level directories as you wish.';
+  $lang['help_images'][2] = 'you can create as many categories and sub-categories for each category as you wish';
+  $lang['help_images'][3] = 'picture files must have jpeg format (extension jpg or JPG), gif format (extension gif or GIF) or png format (extension png or PNG).';
+  $lang['help_images'][4] = 'try not to use blank space " " or hyphen "-" in picture files, I advise you to use underscore "_" character which is managed by PhpWebGallery and will provide better results';
+  $lang['help_thumbnails_title'] = 'Thumbnails';
+  $lang['help_thumbnails'][0] = 'in each directory containing picture to display on your site, there is a sub-directory nammed "thumbnail", if it doesn\'t exist, create it to place your thumbnails into it.';
+  $lang['help_thumbnails'][1] = 'thumbnails don\'t need to have the same extension as their associated picture (a picture with .jpg extension can have a thumbnail in .GIF extention for instance).';
+  $lang['help_thumbnails'][2] = 'the thumbnail associated to a picture must be prefixed with the prefix given on the configuration page(image.jpg -> TN_image.GIF for instance).';
+  $lang['help_thumbnails'][3] = 'I advise you to use the module for windows downloadable on the presentation site of PhpWebGallery for thumbnails management.';
+  $lang['help_thumbnails'][4] = 'you can use the thumbnail creation page integrated in PhpWebGallery, but I don\'t advice you so, because thumbnail quality may be poor and it uses a high CPU load which can be a problem if you use free web hosting.';
+  $lang['help_thumbnails'][5] = 'if you choose to use your hosting provider to create thumbnails, you must give 775 rights on "galleries" folder and all its sub-folders.';
+  $lang['help_database_title'] = 'Updating database';
+  $lang['help_database'][0] = 'once pictures files and thumbnails correctly placed in the directories, clic on "database update" in the menu of the administration panel.';
+  $lang['help_infos_title'] = 'Miscellanous informations';
+  $lang['help_infos'][1] = 'As soon as you created your gallery, go in the user list and modify permissions for user "visiteur". Indeed, every new registered users will have by default the same permissions as "visiteur" user.';
+  $lang['help_remote_title'] = 'Remote site';
+  $lang['help_remote'][0] = 'PhpWebGallery offers the possibility to use several servers to store the images which will compose your gallery. It can be useful if your gallery is installed on one limited space and that you have a big quantity of images to be shown. Please , follow this procedure : ';
+  $lang['help_remote'][1] = '1. edit file "create_listing_file.php" (you will find it in the directory "admin"), by modifying the line "$prefix_thumbnail = "TN-";" if the prefix for your thumbnails is not "TN-".';
+  $lang['help_remote'][2] = '2. place file "create_listing_file.php" modified on your distant website, in the root directory of your directories of images  (as the directory "galleries" of this website) by ftp.';
+  $lang['help_remote'][3] = '3. launch script using the url http://domaineDistant/repGalerie/create_listing_file.php, a file listing.xml has just been created.';
+  $lang['help_remote'][4] = '4. get back file listing.xml from your distant website to place it in directory "admin" of this website.';
+  $lang['help_remote'][5] = '5. please , launch an update of the data of images by the interface of administration, once the listing.xml used file, kill it from the directory "admin".';
+  $lang['help_remote'][6] = 'You can update the contents of a distant website by redoing the described manipulation. You can also kill a distant website by choosing the option in the configuration section of the administration panel.';
+  $lang['help_upload_title'] = 'Added images by users';
+  $lang['help_upload'][0] = 'PhpWebGallery offers the possibility for users to upload images. in order to do it :';
+  $lang['help_upload'][1] = '1. authorize the option in the configuration zone of the administration panel';
+  $lang['help_upload'][2] = '2. authorize the rights in writing in the images directories';
+  $lang['install_message'] = 'Message';
+  $lang['step1_confirmation'] = 'Parameters are correct';
+  $lang['step1_err_db'] = 'Connection to server succeed, but it was impossible to connect to database';
+  $lang['step1_err_server'] = 'Can\'t connect to server';
+  $lang['step1_err_copy_2'] = 'The next step of the installation is now possible';
+  $lang['step1_err_copy_next'] = 'next step';
+  $lang['step1_title'] = 'Step 1/2';
+  $lang['step1_host'] = 'MySQL host';
+  $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
+  $lang['step1_user'] = 'user';
+  $lang['step1_user_info'] = 'user login given by your host provider';
+  $lang['step1_pass'] = 'Password';
+  $lang['step1_pass_info'] = 'user password given by your host provider';
+  $lang['step1_database'] = 'Database name';
+  $lang['step1_database_info'] = 'also given by your host provider';
+  $lang['step1_prefix'] = 'Database table prefix';
+  $lang['step1_prefix_info'] = 'database tables names will be prefixed with it (enables you to manage better your tables)';
+  $lang['step2_err_login1'] = 'enter a login for webmaster';
+  $lang['step2_err_login3'] = 'webmaster login can\'t contain characters \' or "';
+  $lang['step2_err_pass'] = 'please enter your password again';
+  $lang['step2_err_mail'] = $lang['conf_err_mail'];
+  $lang['install_end_title'] = 'Installation finished';
+  $lang['install_end_message'] = 'The configuration of PhpWebGallery is finished, here is the next step<br /><br />
+For security reason, please delete file "install.php" in the directory "admin"<br />
+Once this file deleted , follow this instructions :
+<ul>
+  <li>go to the identification page : [ <a href="../identification.php">identification</a> ] and use the login/password given for webmaster</li>
+  <li>this login will enable you to access to the [ <a href="admin.php">administration panel</a> ] and to the instructions in order to place pictures in your directories</li>
+</ul>';
+  $lang['step2_title'] = 'Step 2/2';
+  $lang['step2_pwd'] = 'webmaster password';
+  $lang['step2_pwd_info'] = 'Keep it confidential, it enables you to access administration panel';
+  $lang['step2_pwd_conf'] = 'confirm password';
+  $lang['step2_pwd_conf_info'] = 'verification';
+  // new or modified in release 1.3
+  $lang['remote_site'] = 'Remote site';
+  $lang['title_add'] = 'Add a user';
+  $lang['title_modify'] = 'Modify a user';
+  $lang['title_groups'] = 'Groups management';
+  $lang['title_user_perm'] = 'Modify permission for user';
+  $lang['title_cat_perm'] = 'Modify permissions for category';
+  $lang['title_group_perm'] = 'Modify permissions for group';
+  $lang['title_picmod'] = 'Modify informations about a picture';
+  $lang['menu_groups'] = 'Groups';
+  $lang['menu_comments'] = 'Comments';
+  $lang['conf_general_log'] = 'history';
+  $lang['conf_general_log_info'] = 'Keep an history of visits on your website ? Visits will be shown in the history section of the administration panel';
+  $lang['conf_general_mail_notification'] = 'Mail notification';
+  $lang['conf_general_mail_notification_info'] = 'Automated mail notification for adminsitrators (and only for them) when a user add a comment or upload a picture.';
+  $lang['conf_comments_validation'] = 'validation';
+  $lang['conf_comments_validation_info'] = 'An administrator validate users posted comments before the becom visible on the site';
+  $lang['conf_comments_forall'] = 'for all ?';
+  $lang['conf_comments_forall_info'] = 'Even guest not registered can post comments';
+  $lang['conf_default_nb_image_per_row_info'] = 'number of pictures for each row by default';
+  $lang['conf_default_nb_row_per_page_info'] = 'number of rows by page by default';
+  $lang['conf_default_short_period_info'] = 'By days. Period within a picture is shown with a red mark. The short period must be superior to 1 day.';
+  $lang['conf_default_long_period_info'] = 'By days. Period within a picture is shown with a green mark. The long period must be superior to the short period.';
+  $lang['conf_default_expand_info'] = 'expand all categories by default in the menu ?';
+  $lang['conf_default_show_nb_comments_info'] = 'show the number of comments for each picture on the thumbnails page';
+  $lang['conf_default_maxwidth_info'] = 'Maximum width for display pictures : picture will have a new width only for display, picture files won\'t be changed. Let empty if you don\'t wish to have a limit.';
+  $lang['conf_default_maxheight_info'] = 'Just as the maximum width, but for the height';
+  $lang['conf_session_cookie'] = 'authorize cookies';
+  $lang['conf_session_cookie_info'] = 'users won\'t have to log on each visit any more. Less secure.';
+  $lang['adduser_associate'] = 'Associate to group';
+  $lang['group_add'] = 'Add a group';
+  $lang['group_add_error1'] = 'The name of a group must not contain " or \'';
+  $lang['group_add_error2'] = 'This name is already used by another group';
+  $lang['group_confirm'] = 'Are you sure you want to remove this group ?';
+  $lang['group_list_title'] = 'List of existing groups';
+  $lang['group_err_unknown'] = 'This group doesn\'t exist in the database';
+  $lang['cat_permission'] = 'permissions';
+  $lang['cat_update'] = 'update';
+  $lang['cat_add'] = 'Add a virtual category';
+  $lang['cat_parent'] = 'parent category';
+  $lang['cat_error_name'] = 'The name of a category mustn\'t be empty';
+  $lang['cat_virtual'] = 'virtual';
+  $lang['cat_first'] = 'Move first';
+  $lang['cat_last'] = 'Move last';
+  $lang['editcat_visible_info'] = '(invisible but for administrators)';
+  $lang['editcat_visible'] = 'Visible';
+  $lang['editcat_uploadable'] = 'Upload available';
+  $lang['infoimage_keyword_separation'] = '(separate with coma ",")';
+  $lang['infoimage_addtoall'] = 'add to all';
+  $lang['infoimage_removefromall'] = 'remove from all';
+  $lang['infoimage_associate'] = 'Associate to the category';
+  $lang['update_wrong_dirname'] = 'The name of directories and files must be composed of letters, figures, "-", "_" or "."';
+  $lang['stats_pages_seen'] = 'pages seen';
+  $lang['stats_visitors'] = 'guests';
+  $lang['stats_empty'] = 'empty history';
+  $lang['stats_pages_seen_graph_title'] = 'Number of pages seen by day';
+  $lang['stats_visitors_graph_title'] = 'Number of guests by day';
+  $lang['comments_last_title'] = 'Last comments';
+  $lang['comments_non_validated_title'] = 'Comments waiting for validation';
+  $lang['help_database'][1] = 'In order to avoid the update of too many pictures in a single update, I advise to start by updating only categories, then on the categories section of the administration panel, update each category thanks to the link "update"';
+  $lang['help_upload'][3] = 'The category must have upload available itself for upload.';
+  $lang['help_upload'][4] = 'Uploaded images by the users are not directly visible on the website, they must be validated by an administrator.  For that purpose, an administrator must go on the page "en attente" of the administration panel, to validate or to refuse the images proposed, then launch an update of the images data.';
+  $lang['help_virtual_title'] = 'Links between pictures and categories and virtual categories';
+  $lang['help_virtual'][0] = 'PhpWebGallery is able to dissociate categories where pictures are stored and categories where pictures are shown.';
+  $lang['help_virtual'][1] = 'By default, pictures are shown only in their real categories : the ones corresponding to directories on the web server.';
+  $lang['help_virtual'][2] = 'To link a picture to a category, you just have to make the association on the page of picture informations or on the informations of all pictures of a category.';
+  $lang['help_virtual'][3] = 'Using this principle, it is possible to create virtual categories in PhpWebGallery : no real directory coresponds to this category. You just have to create this category on the section "categories" of the admin panel.';
+  $lang['help_groups_title'] = 'Users Groups';
+  $lang['help_groups'][0] = 'PhpWebGallery is able to manage groups of users. It can be very useful to have common permission access for private categories.';
+  $lang['help_groups'][1] = '1. Create the group "family" on the section "Groups" of admin panel.';
+  $lang['help_groups'][2] = '2. On the section "Users", edit on of them and associate him to the group "family".';
+  $lang['help_groups'][3] = '3. By modifying the permissions for a category or for a group, you\'ll see that all categories accessible for a group are accessible for its members.';
+  $lang['help_groups'][4] = 'A user can belong to several groups. The authorization is stronger than prohibition : if a user "jack" belongs to the group "family" and "friends", and that only group "family" can see category "Christmas 2003", "jack" will be able to see "Christmas 2003".';
+  $lang['help_access_title'] = 'Access authorization';
+  $lang['help_access'][0] = 'PhpWebGallery is able to forbid access to categories. Categories can be "public" or "private". In order to forbid access to a category :';
+  $lang['help_access'][1] = '1. Modify category informations (from the "categories" section in tha admin panel) and make it "private".';
+  $lang['help_access'][2] = '2. On the page of permissions (for a group or a user) the private category will be shown and you\'ll be able to authorize access or not.';
+  $lang['help_infos'][2] = 'If you have any question, do not hesitate to take a look at the forum or ask a question there. The <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> (message board) is available on the presentation site of PhpWebGallery.';
+  $lang['step1_err_copy'] = 'Copy the text between hyphens and paste it into the file "include/mysql.inc.php"(Warning : mysql.inc.php must only contain what is in blue, no line return or space character)';
+  $lang['permuser_only_private'] = 'Only private categories are shown';
+  $lang['waiting_update'] = 'Validated pictures will be displayed only once pictures database updated';
+  $lang['conf_upload_available_info'] = 'Authorizing the upload of pictures by users on the categories of the website (not on a remote server). This is general parameter, it is needed to authorize upload category by category, by default, no category is "uploadable".';
+  $lang['install_help'] = 'Need help ? Ask your question on <a href="http://forum.phpwebgallery.net">PhpWebGallery message board</a>.';
+  $lang['install_warning'] = 'The file "admin/install.php" is still present. Please remove it from your server. It is not secure to keep it.';
+  // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'This category is unknown in the database';
+}
+?>
Index: /branches/1.3/language/francais.php
===================================================================
--- /branches/1.3/language/francais.php	(revision 3252)
+++ /branches/1.3/language/francais.php	(revision 3252)
@@ -0,0 +1,551 @@
+<?php
+/***************************************************************************
+ *                                francais.php                             *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+$lang['only_members'] = 'Seuls les membres du site peuvent accéder à cette page';
+$lang['invalid_pwd'] = 'le mot de passe rentré n\'est pas valide';
+$lang['access_forbiden'] = 'Vous n\'êtes pas autorisé à aller dans cette section';
+$lang['submit'] = 'Valider';
+$lang['login'] = 'login';
+$lang['password'] = 'mot de passe';
+$lang['new'] = 'nouveau';
+$lang['delete'] = 'supprimer';
+$lang['category'] = 'catégorie';
+$lang['thumbnail'] = 'miniature';
+$lang['date'] = 'date';
+$lang['diapo_default_page_title'] = 'Aucune catégorie séléctionnée';
+$lang['thumbnails'] = 'Miniatures';
+$lang['categories'] = 'Rubriques';
+$lang['hint_category'] = 'affiche les images à la racine de cette catégorie';
+$lang['total_images'] = 'total';
+$lang['title_menu'] = 'Sommaire';
+$lang['change_login'] = 'changer de login';
+$lang['hint_login'] = 's&#039;identifier permet de personnaliser l&#039;apparence du site';
+$lang['logout'] = 'se déconnecter';
+$lang['customize'] = 'personnalisation';
+$lang['hint_customize'] = 'personnaliser votre affichage';
+$lang['hint_search'] = 'lancer une recherche';
+$lang['search'] = 'rechercher';
+$lang['favorite_cat'] = 'favoris';
+$lang['favorite_cat_hint'] = 'afficher vos favoris';
+$lang['about'] = 'à propos';
+$lang['hint_about'] = 'des infos sur PhpWebGallery...';
+$lang['admin'] = 'admin';
+$lang['hint_admin'] = 'accessible uniquement aux administrateurs';
+$lang['no_category'] = 'Aucune rubrique n\'est selectionnée,<br />veuillez en choisir une dans le menu.';
+$lang['page_number'] = 'numéro de page';
+$lang['previous_page'] = 'Précédente';
+$lang['next_page'] = 'Suivante';
+$lang['nb_image_category'] = 'nombre d\'images dans la catégorie';
+$lang['recent_image'] = 'image datant de moins de';
+$lang['days'] = 'jours';
+$lang['send_mail'] = 'Une remarque : mailez moi';
+$lang['title_send_mail'] = '[phpwebgallery] une remarque sur ton site';
+$lang['sub-cat'] = 'sous-catégories';
+$lang['images_available'] = 'images dans cette catégorie';
+$lang['total'] = 'images';
+$lang['upload_picture'] = 'Ajouter une image';
+$lang['registration_date'] = 'enregistré le';
+$lang['creation_date'] = 'créé le';
+$lang['comment'] = 'commentaire';
+$lang['author'] = 'auteur';
+$lang['size'] = 'dimensions';
+$lang['filesize'] = 'poids';
+$lang['file'] = 'fichier';
+$lang['generation_time'] = 'Page générée en';
+$lang['favorites'] = 'Favoris';
+$lang['search_result'] = 'Résultats de la recherche';
+$lang['about_page_title'] = 'A propos de PhpWebGallery';
+$lang['about_title'] = 'A propos...';
+$lang['about_return'] = 'Retour';
+$lang['ident_page_title'] = 'Identification';
+$lang['ident_title'] = 'Identification';
+$lang['ident_register'] = 'S\'enregistrer';
+$lang['ident_forgotten_password'] = 'Mot de passe oublié ?';
+$lang['ident_guest_visit'] = 'Parcourir la galerie en tant que visiteur';
+$lang['customize_page_title'] = 'Personnalisation';
+$lang['customize_title'] = 'Personnalisation';
+$lang['customize_nb_image_per_row'] = 'nombre d\'images par ligne';
+$lang['customize_nb_row_per_page'] = 'nombre de lignes par page';
+$lang['customize_language'] = 'langue';
+$lang['maxwidth'] = 'largeur maximum des images';
+$lang['maxheight'] = 'hauteur maximum des images';
+$lang['err_maxwidth'] = 'la largeur maximum des images doit être un entier supérieur à 50';
+$lang['err_maxheight'] = 'la hauteur maximum des images doit être un entier supérieur à 50';
+$lang['previous_image'] = 'Précédent';
+$lang['next_image'] = 'Suivant';
+$lang['back'] = 'Cliquez sur l\'image pour revenir à la page des miniatures';
+$lang['info_image_title'] = 'Informations';
+$lang['link_info_image'] = 'Modifier les informations de cette image';
+$lang['true_size'] = 'Taille réelle';
+$lang['comments_title'] = 'Commentaires des visiteurs du site';
+$lang['comments_del'] = 'supprimer ce message';
+$lang['comments_add'] = 'Ajouter un commentaire';
+$lang['month'][1] = 'Janvier';
+$lang['month'][2] = 'Février';
+$lang['month'][3] = 'Mars';
+$lang['month'][4] = 'Avril';
+$lang['month'][5] = 'Mai';
+$lang['month'][6] = 'Juin';
+$lang['month'][7] = 'Juillet';
+$lang['month'][8] = 'Août';
+$lang['month'][9] = 'Septembre';
+$lang['month'][10] = 'Octobre';
+$lang['month'][11] = 'Novembre';
+$lang['month'][12] = 'Décembre';
+$lang['day'][0] = 'Dimanche';
+$lang['day'][1] = 'Lundi';
+$lang['day'][2] = 'Mardi';
+$lang['day'][3] = 'Mercredi';
+$lang['day'][4] = 'Jeudi';
+$lang['day'][5] = 'Vendredi';
+$lang['day'][6] = 'Samedi';
+$lang['add_favorites_alt'] = 'Ajouter aux favoris';
+$lang['add_favorites_hint'] = 'ajouter cette image à vos favoris';
+$lang['del_favorites_alt'] = 'Retirer des favoris';
+$lang['del_favorites_hint'] = 'supprimer cette image de vos favoris';
+$lang['register_page_title'] = 'Enregistrement';
+$lang['register_title'] = 'Enregistrement';
+$lang['reg_err_login1'] = 'veuillez rentrer un pseudo';
+$lang['reg_err_login2'] = 'le pseudo ne doit pas se terminer par un espace';
+$lang['reg_err_login3'] = 'le pseudo ne doit pas commencer par un espace';
+$lang['reg_err_login4'] = 'le pseudo ne doit pas comporter les caractère " et \'';
+$lang['reg_err_login5'] = 'ce pseudo est déjà utilisé';
+$lang['reg_err_pass'] = 'veuillez retaper le mot de passe';
+$lang['reg_confirm'] = 'confirmer';
+$lang['reg_err_mail_address'] = 'l\'adresse mail doit être de la forme xxx@yyy.eee (exemple : jack@altern.org)';
+$lang['search_title'] = 'Recherche';
+$lang['search_field_search'] = 'Rechercher';
+$lang['search_return_main_page'] = 'Retour à la page des miniatures';
+$lang['upload_forbidden'] = 'On ne peut pas ajouter d\'image dans cette catégorie';
+$lang['upload_file_exists'] = 'Une image du même nom existe déjà';
+$lang['upload_filenotfound'] = 'vous devez choisir un fichier image pour la photo';
+$lang['upload_cannot_upload'] = 'impossible d\'uploader la photo sur le serveur';
+$lang['upload_title'] = 'Ajouter une image';
+$lang['upload_advise'] = 'Choisissez une image à placer dans la catégorie : ';
+$lang['upload_advise_thumbnail'] = 'Optionnel, mais recommandé : Choisissez la miniature à associer à ';
+$lang['upload_advise_filesize'] = 'le poids de l\'image ne doit pas dépasser : ';
+$lang['upload_advise_width'] = 'la largeur de l\'image ne doit pas dépasser : ';
+$lang['upload_advise_height'] = 'la hauteur de l\'image ne doit pas dépasser : ';
+$lang['upload_advise_filetype'] = 'l\'image doit être au format jpg, gif ou png';
+$lang['upload_err_username'] = 'le nom de l\'utilisateur doit être renseigné';
+$lang['upload_username'] = 'Nom d\'utilisateur';
+$lang['upload_successful'] = 'Image uploadée avec succès, un administrateur validera celle-ci dès que possible.';
+// new or modified in release 1.3
+$lang['charset'] = 'iso-8859-1';
+$lang['no'] = 'non';
+$lang['yes'] = 'oui';
+$lang['guest'] = 'visiteur';
+$lang['mail_address'] = 'adresse mail';
+$lang['public'] = 'publique';
+$lang['private'] = 'privée';
+$lang['add'] = 'ajouter';
+$lang['dissociate'] = 'dissocier';
+$lang['mandatory'] = 'obligatoire';
+$lang['err_date'] = 'date erronée';
+$lang['picture'] = 'image';
+$lang['IP'] = 'IP';
+$lang['close'] = 'fermer';
+$lang['open'] = 'ouvrir';
+$lang['keywords'] = 'mots-clefs';
+$lang['errors_title'] = 'Erreurs';
+$lang['infos_title'] = 'Informations';
+$lang['default'] = 'défaut';
+$lang['comments'] = 'commentaires';
+$lang['category_representative'] = 'représentant';
+$lang['title_comments'] = 'Commentaires des visiteurs';
+$lang['stats_last_days'] = 'derniers jours';
+$lang['menu_login'] = 'se connecter';
+$lang['connected_user'] = 'utilisateur connecté';
+$lang['hint_comments'] = 'Voir les derniers commentaires des visiteurs';
+$lang['stats'] = 'statistiques';
+$lang['most_visited_cat_hint'] = 'affiche les images les plus visitées';
+$lang['most_visited_cat'] = 'plus vues';
+$lang['best_rated_cat_hint'] = 'affiche les images les mieux notées';
+$lang['best_rated_cat'] = 'mieux notées';
+$lang['recent_cat_hint'] = 'affiche les images les plus récentes';
+$lang['recent_cat'] = 'plus récentes';
+$lang['recent_cat_title'] = 'Images récentes';
+$lang['visited'] = 'visité';
+$lang['times'] = 'fois';
+$lang['customize_expand'] = 'développer toutes les catégories';
+$lang['customize_show_nb_comments'] = 'montrer le nombre de commentaires';
+$lang['customize_short_period'] = 'période courte';
+$lang['customize_long_period'] = 'période longue';
+$lang['customize_template'] = 'template';
+$lang['err_periods'] = 'les périodes doivent être des entiers';
+$lang['err_periods_2'] = 'les périodes doivent être supérieures à 0, la période longue doit être plus grande que la période courte';
+$lang['create_cookie'] = 'créer un cookie';
+$lang['customize_day'] = 'jour';
+$lang['customize_week'] = 'semaine';
+$lang['customize_month'] = 'mois';
+$lang['customize_year'] = 'an';
+$lang['slideshow'] = 'diaporama';
+$lang['period_seconds'] = 'secondes par image';
+$lang['slideshow_stop'] = 'stopper le diaporama';
+$lang['comment_added'] = 'Votre commentaire a été enregistré';
+$lang['comment_to_validate'] = 'Un administrateur doit valider votre commentaire pour qu\'il soit visible';
+$lang['comment_anti-flood'] = 'Système anti-flood : attendez un moment avant de déposer un message';
+$lang['comment_user_exists'] = 'Ce pseudo appartient à un autre utilisateur';
+$lang['invalid_search'] = 'Les mots recherchés doivent comporter plus de 3 caractères et ne doivent pas inclure de caractères de ponctuation';
+$lang['search_mode_or'] = 'au moins un mot';
+$lang['search_mode_and'] = 'tous les mots';
+$lang['search_comments'] = 'séparer les différents mots avec un espace';
+$lang['upload_name'] = 'Nom de l\'image';
+$lang['upload_author'] = 'Auteur (eg "Pierrick LE GALL")';
+$lang['upload_creation_date'] = 'Date de création (JJ/MM/AAAA)';
+$lang['upload_comment'] = 'Commentaire';
+$lang['mail_hello'] = 'Bonjour,';
+$lang['mail_new_upload_subject'] = 'Nouvelle image sur le site';
+$lang['mail_new_upload_content'] = 'Une nouvelle image a été placée sur la galerie. Elle est en attente de validation. RDV dans la section d\'administration pour valider ou supprimer cette image.';
+$lang['mail_new_comment_subject'] = 'Nouveau commentaire sur le site';
+$lang['mail_new_comment_content'] = 'Un nouveau commentaire a été posté sur la galerie. Si vous avez activé la validation des commentaires, il faut d\'abord valider le commentaire dans la zone d\'administration pour le voir apparaître.'."\n\n".'Vous avez accès aux derniers commentaires dans la zone d\'administration.';
+if (isset($conf))
+$lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Informations sur le PhpWebGallery</div>
+<ul>
+  <li>Ce site utilise la version '.$conf['version'].' de <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a>. PhpWebGallery est une application web permettant de créer simplement une galerie d\'images en ligne.</li>
+  <li>D\'un point de vue technique, PhpWebGallery est entièrement développé en PHP (l\'elePHPant) avec une base de données MySQL(le mySQreuiL).</li>
+  <li>Si vous avez des suggestions ou des commentaires, n\'hésitez pas à visiter le site de <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> et son <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a>.</li>
+</ul>';
+$lang['customize_theme'] = 'theme de l\'interface';
+
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+  $lang['title_liste_users'] = 'Liste des utilisateurs';
+  $lang['title_history'] = 'Historique';
+  $lang['title_update'] = 'Mise à jour de la base de données';
+  $lang['title_configuration'] = 'Configuration de PhpWebGallery';
+  $lang['title_instructions'] = 'Instructions';
+  $lang['title_categories'] = 'Gestion des catégories';
+  $lang['title_edit_cat'] = 'Editer une catégorie';
+  $lang['title_info_images'] = 'Modifier les informations sur les images d\'une catégorie';
+  $lang['title_thumbnails'] = 'Création des miniatures';
+  $lang['title_thumbnails_2'] = 'pour';
+  $lang['title_default'] = 'Administration de PhpWebGallery';
+  $lang['menu_title'] = 'Administration';
+  $lang['menu_config'] = 'Configuration';
+  $lang['menu_users'] = 'Utilisateurs';
+  $lang['menu_add_user'] = 'ajout';
+  $lang['menu_list_user'] = 'liste';
+  $lang['menu_categories'] = 'Catégories';
+  $lang['menu_update'] = 'MaJ base d\'images';
+  $lang['menu_thumbnails'] = 'Miniatures';
+  $lang['menu_history'] = 'Historique';
+  $lang['menu_instructions'] = 'Instructions';
+  $lang['menu_back'] = 'Page diapo';
+  $lang['title_waiting'] = 'Images en attente de validation';
+  $lang['menu_waiting'] = 'En attente';
+  $lang['default_message'] = 'Zone d\'administration de PhpWebGallery';
+  $lang['conf_err_prefixe'] = 'le préfixe des thumbnails ne doit pas comporter d\'accent';
+  $lang['conf_err_mail'] = 'mail refusé, il doit être de la forme nom@serveur.com';
+  $lang['conf_err_sid_size'] = 'la taille de l\'identifiant de session doit être un entier supérieur ou égal à 4 et inférieur à 50';
+  $lang['conf_err_sid_time'] = 'la durée de la session doit être comprise entre 5 et 60 minutes';
+  $lang['conf_err_max_user_listbox'] = 'le nombre max utilisateur listbox doit être un entier compris entre 0 et 255';
+  $lang['conf_confirmation'] = 'Informations enregistrées dans la base de données';
+  $lang['conf_general_title'] = 'Configuration générale';
+  $lang['conf_general_webmaster'] = 'pseudo webmaster';
+  $lang['conf_general_webmaster_info'] = 'Il apparaîtra à tous vos visiteurs. Il vous sert pour administrer le site';
+  $lang['conf_general_mail'] = 'mail webmaster';
+  $lang['conf_general_mail_info'] = 'Les visiteurs pourront vous contacter par ce mail';
+  $lang['conf_general_prefix'] = 'préfixe thumbnail';
+  $lang['conf_general_prefix_info'] = 'Les noms des fichiers miniatures en sont préfixé. Laissez vide en cas de doute.';
+  $lang['conf_general_access'] = 'type d\'acces';
+  $lang['conf_general_access_1'] = 'libre';
+  $lang['conf_general_access_2'] = 'restreint';
+  $lang['conf_general_access_info'] = '- libre : n\'importe qui peut accéder à vos photos, tous les visiteurs peuvent se créer un compte pour pouvoir personnaliser l\'affichage<br />- restreint : l\'administrateur s\'occupe de créer des comptes, seuls les personnes membres peuvent accéder au site';
+  $lang['conf_general_max_user_listbox'] = 'nombre max utilisateur listbox';
+  $lang['conf_general_max_user_listbox_info'] = '- c\'est le nombre maximum d\'utilisateurs pour lequel on affiche une liste déroulante sur la page d\'identification<br />- mettez un nombre entier entre 0 et 255, 0 signifiant que vous ne voulez jamais qu\'on affiche de liste déroulante';
+  $lang['conf_comments'] = 'commentaires utilisateurs';
+  $lang['conf_comments_title'] = 'Configuration des '.$lang['conf_comments'];
+  $lang['conf_comments_show_comments'] = $lang['conf_comments'];
+  $lang['conf_comments_show_comments_info'] = 'afficher les commentaires utilisateurs sous chaque images ?';
+  $lang['conf_comments_comments_number'] = 'nombre de commentaires par page';
+  $lang['conf_comments_comments_number_info'] = 'nombre de commentaire à afficher sur chaque page. Le nombre de commentaires pour une image reste illimité. Entrer un nombre entre 5 et 50.';
+  $lang['conf_err_comment_number'] = 'le nombre de commentaires par page doit être compris entre 5 et 50 inclus.';
+  $lang['conf_remote_site_delete_info'] = 'Supprimer un site revient à supprimer toutes les images et les catégories en relation avec ce site.';
+  $lang['conf_upload_title'] = 'Configurer l\'upload des utilisateurs';
+  $lang['conf_upload_available'] = 'autoriser l\'ajout d\'images';
+  $lang['conf_upload_maxfilesize'] = 'poids maximum';
+  $lang['conf_upload_maxfilesize_info'] = 'Poids maximum autorisé pour les images uploadées. Celui-ci doit être un entier compris entre 10 et 1000, en Ko.';
+  $lang['conf_err_upload_maxfilesize'] = 'Le poids maximum pour les images uploadés doit être un entier compris entre 10 et 1000.';
+  $lang['conf_upload_maxwidth'] = 'largeur maximum';
+  $lang['conf_upload_maxwidth_info'] = 'Largeur maximum autorisée pour les images. Celle-ci doit être un entier supérieur à 10, en pixels.';
+  $lang['conf_err_upload_maxwidth'] = 'la largeur maximum des images uploadées doit être un entier supérieur à 10.';
+  $lang['conf_upload_maxheight'] = 'hauteur maximum';
+  $lang['conf_upload_maxheight_info'] = 'Hauteur maximum autorisée pour les images. Celle-ci doit être un entier supérieur à 10, en pixels.';
+  $lang['conf_err_upload_maxwidth'] = 'la hauteur maximum des images uploadées doit être un entier supérieur à 10.';
+  $lang['conf_upload_maxwidth_thumbnail'] = 'largeur maximum miniatures.';
+  $lang['conf_upload_maxwidth_thumbnail_info'] = 'Largeur maximum autorisée pour les miniatures. Celle-ci doit être un entier supérieur à 10, en pixels.';
+  $lang['conf_err_upload_maxwidth_thumbnail'] = 'la largeur maximum des miniatures uploadées doit être un entier supérieur à 10.';
+  $lang['conf_upload_maxheight_thumbnail'] = 'hauteur maximum miniatures';
+  $lang['conf_upload_maxheight_thumbnail_info'] = 'Hauteur maximum autorisée pour les miniatures. Celle-ci doit être un entier supérieur à 10, en pixels.';
+  $lang['conf_err_upload_maxheight_thumbnail'] = 'la hauteur maximum des miniatures uploadées doit être un entier supérieur à 10.';
+  $lang['conf_default_title'] = 'Affichage par défaut pour les visiteurs non enregistrés et les nouveaux comptes';
+  $lang['conf_default_language_info'] = 'langue par défaut';
+  $lang['conf_default_theme_info'] = 'thème par défaut';
+  $lang['conf_session_title'] = 'Configuration des sessions';
+  $lang['conf_session_size'] = 'taille de l\'identifiant';
+  $lang['conf_session_size_info'] = '- plus votre identifiant de session est grand, plus la sécurité est bonne<br />- mettez une valeur entre 4 et 50';
+  $lang['conf_session_time'] = 'durée de validité';
+  $lang['conf_session_time_info'] = '- plus votre durée de validité de la session est petite, plus la sécurité est bonne<br />- elle doit supérieur à 5 et inférieur à 60, en minutes';
+  $lang['conf_session_key'] = 'mot-clef';
+  $lang['conf_session_key_info'] = '- le mot-clef de session permet d\'améliorer le cryptage des identifiants de session.<br />- mettez n\'importe quelle chaîne de moins de 255 caractères.';
+  $lang['conf_session_delete'] = 'supprimer les sessions périmées';
+  $lang['conf_session_delete_info'] = 'il est recommandé de vider sa table de sessions car les sessions périmées restent enregistrées (mais ça ne pose pas de problème de sécurité)';
+  $lang['user_err_modify'] = 'Cet utilisateur ne peut pas être modifé ou supprimé';
+  $lang['user_err_unknown'] = 'Cet utilisateur n\'existe pas dans la base de données';
+  $lang['adduser_info_message'] = 'Informations enregistrées dans la base de données concernant ';
+  $lang['adduser_info_password_updated'] = '(mot de passe modifié)';
+  $lang['adduser_info_back'] = 'retour liste utilisateurs';
+  $lang['adduser_fill_form'] = 'Veuillez remplir les champs suivants';
+  $lang['adduser_unmodify'] = 'non modifiable';
+  $lang['adduser_status'] = 'status';
+  $lang['adduser_status_admin'] = 'admin';
+  $lang['adduser_status_guest'] = 'visiteur';
+  $lang['permuser_info_message'] = 'Permissions enregistrées';
+  $lang['permuser_title'] = 'Restrictions pour l\'utilisateur';
+  $lang['permuser_warning'] = 'Attention : un "<span style="font-weight:bold;">accès interdit</span>" à la racine d\'une catégorie empêche l\'accès à toute la catégorie';
+  $lang['permuser_authorized'] = 'autorisé';
+  $lang['permuser_forbidden'] = 'interdit';
+  $lang['permuser_parent_forbidden'] = 'catégorie parente interdite';
+  $lang['listuser_confirm'] = 'Etes-vous sûr de vouloir supprimer l\'utilisateur';
+  $lang['listuser_info_deletion'] = 'a été supprimé de la base de données';
+  $lang['listuser_user_group'] = 'Utilisateurs';
+  $lang['listuser_modify'] = 'modifier';
+  $lang['listuser_modify_hint'] = 'modifier les infos de';
+  $lang['listuser_permission'] = 'permissions';
+  $lang['listuser_permission_hint'] = 'modifier les permissions de';
+  $lang['listuser_delete'] = 'supprimer';
+  $lang['listuser_delete_hint'] = 'supprimer';
+  $lang['listuser_button_all'] = 'tous';
+  $lang['listuser_button_invert'] = 'inverser';
+  $lang['listuser_button_create_address'] = 'générer adresse mail';
+  $lang['cat_invisible'] = 'invisible';
+  $lang['cat_edit'] = 'Editer';
+  $lang['cat_up'] = 'Monter';
+  $lang['cat_down'] = 'Descendre';
+  $lang['cat_image_info'] = 'infos images';
+  $lang['cat_total'] = 'total';
+  $lang['editcat_confirm'] = 'Informations enregistrées dans la base de données';
+  $lang['editcat_back'] = 'catégories';
+  $lang['editcat_title1'] = 'Options pour la catégorie';
+  $lang['editcat_name'] = 'Nom';
+  $lang['editcat_comment'] = 'Commentaire';
+  $lang['editcat_status'] = 'Status';
+  $lang['infoimage_general'] = 'Options générale pour la catégorie';
+  $lang['infoimage_useforall'] = 'utiliser pour toutes les images ?';
+  $lang['infoimage_creation_date'] = 'date de création';
+  $lang['infoimage_detailed'] = 'Options pour chaque image / photo';
+  $lang['infoimage_title'] = 'titre';
+  $lang['infoimage_comment'] = 'commentaire';
+  $lang['update_missing_tn'] = 'il manque la miniature pour';
+  $lang['update_disappeared_tn'] = 'la miniature a disparu';
+  $lang['update_disappeared'] = 'a disparu';
+  $lang['update_part_deletion'] = 'Suppression des images de la base qui n\'ont pas de thumbnail ou qui n\'existent pas';
+  $lang['update_deletion_conclusion'] = 'images supprimées de la base de données';
+  $lang['update_part_research'] = 'Recherche des nouvelles images dans les répertoires';
+  $lang['update_research_added'] = 'ajouté';
+  $lang['update_research_tn_ext'] = 'miniature en';
+  $lang['update_research_conclusion'] = 'images ajoutées à la base de données';
+  $lang['update_default_title'] = 'Choisir une option';
+  $lang['update_only_cat'] = 'mettre à jour les catégories, mais pas les images';
+  $lang['update_all'] = 'mettre tout à jour';
+  $lang['tn_width'] = 'largeur';
+  $lang['tn_height'] = 'hauteur';
+  $lang['tn_no_support'] = 'Image inexistante ou aucun support';
+  $lang['tn_format'] = 'pour le format';
+  $lang['tn_thisformat'] = 'pour ce format de fichier';
+  $lang['tn_err_width'] = 'la largeur doit être un entier supérieur à';
+  $lang['tn_err_height'] = 'la hauteur doit être un entier supérieur à';
+  $lang['tn_results_title'] = 'Résultats de la miniaturisation';
+  $lang['tn_picture'] = 'image';
+  $lang['tn_results_gen_time'] = 'généré en';
+  $lang['tn_stats'] = 'Statistiques générales';
+  $lang['tn_stats_nb'] = 'nombre d\'images miniaturisées';
+  $lang['tn_stats_total'] = 'temps total';
+  $lang['tn_stats_max'] = 'temps max';
+  $lang['tn_stats_min'] = 'temps min';
+  $lang['tn_stats_mean'] = 'temps moyen';
+  $lang['tn_err'] = 'Vous avez commis des erreurs';
+  $lang['tn_params_title'] = 'Paramètres de miniaturisation';
+  $lang['tn_params_GD'] = 'version de GD';
+  $lang['tn_params_GD_info'] = '- GD est la bibliothèque de manipulation graphique pour PHP<br />- cochez la version de GD installée sur le serveur. Si vous choisissez l\'une et que vous obtenez ensuite des messages d\'erreur, choisissez l\'autre version. Si aucune version ne marche, cela signifie que GD n\'est pas installé sur le serveur.';
+  $lang['tn_params_width_info'] = 'largeur maximum que peut prendre les miniatures';
+  $lang['tn_params_height_info'] = 'hauteur maximum que peut prendre les miniatures';
+  $lang['tn_params_create'] = 'en créer';
+  $lang['tn_params_create_info'] = 'N\'essayez pas de lancer directement un grand nombre de miniaturisation.<br />En effet la miniaturisation est coûteuse en ressources processeur pour le serveur. Si vous êtes chez un hébergeur gratuit, une trop forte occupation processeur peut amener l\'hébergeur à supprimer votre compte.';
+  $lang['tn_params_format'] = 'format';
+  $lang['tn_params_format_info'] = 'seul le format jpeg est supporté pour la création des miniatures';
+  $lang['tn_alone_title'] = 'images sans miniatures (format jpg et png uniquement)';
+  $lang['tn_dirs_title'] = 'Liste des répertoires';
+  $lang['tn_dirs_alone'] = 'images sans miniatures';
+  $lang['help_images_title'] = 'Ajout d\'images';
+  $lang['help_images_intro'] = 'Voici comment il faut placer les images dans vos répertoires';
+  $lang['help_images'][0] = 'dans le répertoire "galleries" placer des repertoires qui vont représenter vos futures catégories';
+  $lang['help_images'][1] = 'dans chacun de ces répertoires, vous avez le droit de créer autant de niveau de sous-répertoire que vous le souhaitez';
+  $lang['help_images'][2] = 'vous avez le droit à un nombre illimité de catégories et de sous catégories pour chaque catégorie';	
+  $lang['help_images'][3] = 'les fichiers images doivent être au format jpg (extension jpg ou JPG), gif (GIF ou gif) ou encore png (PNG ou png)';
+  $lang['help_images'][4] = 'Evitez d\'utiliser des espaces " " ou des tirets "-" dans les noms de fichiers ou de catégorie, je conseille d\'utiliser le caractère underscore "_" qui est géré par l\'application et donnera des résultats plus appréciables';
+  $lang['help_thumbnails_title'] = 'Miniatures';
+  $lang['help_thumbnails'][0] = 'dans chaque répertoire contenant des images à afficher sur le site, il y a un sous-répertoire nommé "thumbnail", s\'il n\'existe pas, créez-le pour placer vos miniatures dedans';
+  $lang['help_thumbnails'][1] = 'les miniatures n\'ont pas besoin d\'avoir la même extension que les images associées (une image en .jpg peut avoir sa miniature en .GIF par exemple)';
+  $lang['help_thumbnails'][2] = 'la miniature associée à une image doit être préfixée par le préfixe donné sur la page de configuration générale (image.jpg -> TN_image.GIF par exemple).';
+  $lang['help_thumbnails'][3] = 'il est conseillé d\'utiliser le module pour windows téléchargeable sur le site de PhpWebGallery pour la création des miniatures.';
+  $lang['help_thumbnails'][4] = 'vous pouvez utilisez la gestion de création de miniatures, intégrée à PhpWebGallery, mais ce n\'est pas conseillé, car la qualité des miniatures sera moindre qu\'avec un véritable outil de manipulation d\'images et que cela consommera des ressources sur le serveur, ce qui peut se révéler gênant pour un hébergement gratuit.';
+  $lang['help_thumbnails'][5] = 'si vous choisissez d\'utiliser votre hébergeur pour créer les miniatures, il faut avant cela passer le répertoire "galleries" en 775 ainsi que tous ses sous-répertoires.';
+  $lang['help_database_title'] = 'Remplissage de la base de données';
+  $lang['help_database'][0] = 'Une fois les fichiers placés correctement et les miniatures placées ou créées, cliquez sur "MaJ base d\'images" dans le menu de la zone d\'administration.';
+  $lang['help_remote_title'] = 'Site distant';
+  $lang['help_remote'][0] = 'PhpWebGallery offre la possibilité d\'utiliser plusieurs serveurs pour stocker les images qui composeront votre galerie. Cela peut être utile si votre galerie est installée sur une espace limité et que vous avez une grande quantité d\'images à montrer. Suivez la procédure suivante :';
+  $lang['help_remote'][1] = '1. éditez le fichier "create_listing_file.php" (vous le trouverez dans le répertoire "admin"), en modifiant la ligne "$prefix_thumbnail = "TN-";" si le préfixe pour vos miniatures n\'est pas "TN-".';
+  $lang['help_remote'][2] = '2. placez le fichier "create_listing_file.php" modifié sur votre site distant, dans le répertoire racine de vos répertoires d\'images (comme le répertoire "galleries" du présent site) par ftp.';
+  $lang['help_remote'][3] = '3. lancez le script en allant à l\'url http://domaineDistant/repGalerie/create_listing_file.php, un fichier listing.xml vient de se créer.';
+  $lang['help_remote'][4] = '4. récupérez le fichier listing.xml de votre site distant pour le placer dans le répertoire "admin" du présent site.';
+  $lang['help_remote'][5] = '5. lancez une mise à jour de la base d\'images par l\'interface d\'administration, une fois le fichier listing.xml utilisé, supprimez le du répertoire "admin".';
+  $lang['help_remote'][6] = 'Vous pouvez mettre à jour le contenu d\'un site distant en refaisant la manipulation décrite. Vous pouvez également supprimer un site distant en choisissant l\'option dans la section configuration du panneau d\'administration.';
+  $lang['help_upload_title'] = 'Ajout d\'images par les utilisateurs';
+  $lang['help_upload'][0] = 'PhpWebGallery offre la possibilité aux visiteurs d\'uploader des images. Pour cela :';
+  $lang['help_upload'][1] = '1. autorisez l\'option dans la zone configuration du panneau d\'administration';
+  $lang['help_upload'][2] = '2. autorisez les droits en écriture sur les répertoires d\'images';
+  $lang['help_infos_title'] = 'Informations complémentaires';
+  $lang['help_infos'][1] = 'Dès que vous avez créé votre galerie, allez dans la gestion des utilisateurs et modifiez les permissions pour l\'utilisateur visiteur. En effet, tous les utilisateurs qui s\'enregistrent eux-même auront par défaut les mêmes permissions que l\'utilisateur "visiteur".';
+  $lang['install_message'] = 'Message';
+  $lang['step1_confirmation'] = 'Les paramètres rentrés sont corrects';
+  $lang['step1_err_db'] = 'La connexion au serveur est OK, mais impossible de se connecter à cette base de données';
+  $lang['step1_err_server'] = 'Impossible de se connecter au serveur';
+  $lang['step1_err_copy_2'] = 'La configuration du reste de l\'application est maintenant possible';
+  $lang['step1_err_copy_next'] = 'prochaine étape';
+  $lang['step1_title'] = 'Etape 1 sur 2';
+  $lang['step1_host'] = 'Hôte MySQL';
+  $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
+  $lang['step1_user'] = 'Utilisateur';
+  $lang['step1_user_info'] = 'nom d\'utilisateur pour votre hébergeur';
+  $lang['step1_pass'] = 'Password';
+  $lang['step1_pass_info'] = 'celui fourni par votre hébergeur';
+  $lang['step1_database'] = 'Nom de la base';
+  $lang['step1_database_info'] = 'celui fourni par votre hébergeur';
+  $lang['step1_prefix'] = 'Préfixe des noms de table';
+  $lang['step1_prefix_info'] = 'le nom des tables apparaîtra avec ce préfixe (permet de mieux gérer sa base de données)';
+  $lang['step2_err_login1'] = 'veuillez rentrer un pseudo pour le webmaster';
+  $lang['step2_err_login3'] = 'le pseudo du webmaster ne doit pas comporter les caractère " et \'';
+  $lang['step2_err_pass'] = 'veuillez retaper votre mot de passe';
+  $lang['step2_err_mail'] = $lang['conf_err_mail'];
+  $lang['install_end_title'] = 'Installation terminée';
+  $lang['install_end_message'] = 'La configuration de l\'application s\'est correctement déroulée, place à la prochaine étape<br /><br />
+Par mesure de sécurité, merci de supprimer le fichier "install.php" du repertoire "admin"<br />
+Un fois ce fichier supprimé, veuillez suivre ces indications :
+<ul>
+  <li>allez sur la page d\'identification : [ <a href="../identification.php">identification</a> ] et connectez-vous avec le pseudo donné pour le webmaster</li>
+  <li>celui-ci vous permet d\'accéder à la [ <a href="admin.php">partie administration</a> ] et aux instructions pour placer les images dans les répertoires.</li>
+</ul>';
+  $lang['step2_title'] = 'Etape 2 sur 2';
+  $lang['step2_pwd'] = 'password webmaster';
+  $lang['step2_pwd_info'] = 'Il doit rester confidentiel, il permet d\'accéder au panneau d\'administration.';
+  $lang['step2_pwd_conf'] = 'confirmer password';
+  $lang['step2_pwd_conf_info'] = 'Vérification';
+  // new or modified in release 1.3
+  $lang['remote_site'] = 'Site distant';
+  $lang['title_add'] = 'Ajouter un utilisateur';
+  $lang['title_modify'] = 'Modifier un utilisateur';
+  $lang['title_groups'] = 'Gestion des groupes';
+  $lang['title_user_perm'] = 'Modifier les permissions pour l\'utilisateur';
+  $lang['title_cat_perm'] = 'Modifier les permissions pour la catégorie';
+  $lang['title_group_perm'] = 'Modifier les permissions pour le groupe';
+  $lang['title_picmod'] = 'Modifier les informations d\'une image';
+  $lang['menu_groups'] = 'Groupes';
+  $lang['menu_comments'] = 'Commentaires';
+  $lang['waiting_update'] = 'Les images validées ne seront visibles qu\'après mise à jour de la base d\'images.';
+  $lang['conf_general_log'] = 'historique';
+  $lang['conf_general_log_info'] = 'historiser les visites sur le site ? Les visites seront visibles dans l\'historique de l\'administration';
+  $lang['conf_general_mail_notification'] = 'Notification par mail';
+  $lang['conf_general_mail_notification_info'] = 'Notification automatique par mail des administrateurs (seuls les administrateurs) lors de l\'ajout d\'un commentaire, ou lors de l\'ajout d\'une image.';
+  $lang['conf_comments_validation'] = 'validation';
+  $lang['conf_comments_validation_info'] = 'L\'administrateur valide les commentaires avant qu\'ils apparaissent sur le site';
+  $lang['conf_comments_forall'] = 'pour tous ?';
+  $lang['conf_comments_forall_info'] = 'Même les invités non enregistrés peuvent déposer les messages';
+  $lang['conf_default_nb_image_per_row_info'] = 'nombre d\'images par ligne par défaut';
+  $lang['conf_default_nb_row_per_page_info'] = 'nombre de lignes par page par défaut';
+  $lang['conf_default_short_period_info'] = 'En nombre de jours. Période pendant laquelle l\'image est notée avec une marque rouge. La période courte fait au minimum 1 jour.';
+  $lang['conf_default_long_period_info'] = 'En nombre de jours. Période pendant laquelle l\'image est notée avec une marque verte. La période longue doit être plus grande que la période courte.';
+  $lang['conf_default_expand_info'] = 'développer toutes les catégories par défaut dans le menu ?';
+  $lang['conf_default_show_nb_comments_info'] = 'montrer le nombre de commentaires pour chaque image sur la page des miniatures';
+  $lang['conf_default_maxwidth_info'] = 'Largeur maximum affichable pour les images : les images ne seront redimensionnées que pour l\'affichage, les fichiers images resteront intacts. Laisser vide si vous ne souhaitez pas mettre de limite.';
+  $lang['conf_default_maxheight_info'] = 'idem mais pour la hauteur des images';
+  $lang['conf_session_cookie'] = 'autoriser les cookies';
+  $lang['conf_session_cookie_info'] = 'les utilisateurs ne seront plus obligés de s\'identifier à chaque visite. Méthode moins sécurisée';
+  $lang['adduser_associate'] = 'Associer au groupe';
+  $lang['group_add'] = 'Ajouter un groupe';
+  $lang['group_add_error1'] = 'Le nom du groupe ne doit pas comporter de " ou de \'';
+  $lang['group_add_error2'] = 'Ce nom de groupe est déjà utilisé';
+  $lang['group_confirm'] = 'Etes-vous sûr de vouloir supprimer le groupe';
+  $lang['group_list_title'] = 'Liste des groupes existants';
+  $lang['group_err_unknown'] = 'Ce groupe n\'existe pas dans la base de données';
+  $lang['permuser_only_private'] = 'Seules les catégories privées sont représentées';
+  $lang['cat_permission'] = 'permissions';
+  $lang['cat_update'] = 'mettre à jour';
+  $lang['cat_add'] = 'Ajouter une catégorie virtuelle';
+  $lang['cat_parent'] = 'catégorie parente';
+  $lang['cat_error_name'] = 'Le nom d\'une catégorie ne doit pas être nul';
+  $lang['cat_virtual'] = 'virtuelle';
+  $lang['cat_first'] = 'Premier';
+  $lang['cat_last'] = 'Dernier';
+  $lang['editcat_visible_info'] = '(invisible sauf pour les administrateurs)';
+  $lang['editcat_visible'] = 'Visible';
+  $lang['editcat_uploadable'] = 'Ajout d\'images par les visiteurs';
+  $lang['infoimage_keyword_separation'] = '(séparer avec des ",")';
+  $lang['infoimage_addtoall'] = 'ajouter à tous';
+  $lang['infoimage_removefromall'] = 'retirer à tous';
+  $lang['infoimage_associate'] = 'Associer à la catégorie';
+  $lang['update_wrong_dirname'] = 'le nom des fichiers et répertoires ne doivent être composé que de lettres, de chiffres et "-", "_" ou ".".';
+  $lang['stats_pages_seen'] = 'pages vues';
+  $lang['stats_visitors'] = 'visiteurs';
+  $lang['stats_empty'] = 'vider l\'historique';
+  $lang['stats_pages_seen_graph_title'] = 'Nombre de pages vues par jour';
+  $lang['stats_visitors_graph_title'] = 'Nombre de visiteurs par jour';
+  $lang['comments_last_title'] = 'Derniers commentaires';
+  $lang['comments_non_validated_title'] = 'Commentaires non validés';
+  $lang['help_database'][1] = 'Afin d\'éviter la mise à jour d\'un trop grand nombre d\'images, commencez par mettre à jour uniquement les catégories, puis sur la page des catégories, mettre à jour chaque catégorie individuellement grâce au lien "mise à jour"';
+  $lang['help_upload'][3] = 'La catégorie doit elle-même être autorisée pour l\'upload.';
+  $lang['help_upload'][4] = 'Les images uploadées par les visiteurs ne sont pas directement visibles sur le site, elles doivent être validées par un administrateur. Pour cela, un administrateur doit se rendre sur la page "en attente" du panneau d\'administration, valider ou refuser les images proposée, puis lancer une mise à jour de la base d\'images.';
+  $lang['help_virtual_title'] = 'Liens images vers catégories et catégories virtuelles';
+  $lang['help_virtual'][0] = 'PhpWebGallery permet de dissocier les catégories où sont stockées les images et les catégories où les images apparaissent.';
+  $lang['help_virtual'][1] = 'Par défaut, les images apparaissent uniquement dans leurs catégories réelles : celles qui correspondent à des répertoires sur le serveur web.';
+  $lang['help_virtual'][2] = 'Pour lier une image à une catégorie, il suffit de l\'y associer via la page de modification d\'une image ou par lot sur la page de modification des images d\'une catégorie.';
+  $lang['help_virtual'][3] = 'En partant de ce principe, il est possible de créer des catégories virtuelles dans PhpWebGallery : aucun répertoire "réel" n\'y est rattaché sur le disque du serveur. Il suffit simplement de créer la catégorie sur la page de la liste des catégories existantes dans la zone d\'administration.';
+  $lang['help_groups_title'] = 'Groupes d\'utilisateurs';
+  $lang['help_groups'][0] = 'PhpWebGallery permet de gérer des groupes d\'utilisateurs, cela est très utile pour regrouper les autorisations d\'accès aux catégories privées.';
+  $lang['help_groups'][1] = '1. Créez un groupe "famille" sur la page des groupes de la zone d\'administration.';
+  $lang['help_groups'][2] = '2. Sur la page de la liste des utilisateurs, en éditer un, et l\'associer au groupe "famille".';
+  $lang['help_groups'][3] = '3. En modifiant les permissions pour une catégorie, ou pour un groupe, vous verrez que toutes les catégories autorisées à un groupe le sont pour les membres de ce groupe.';
+  $lang['help_groups'][4] = 'Un utilisateurs peut appartenir à plusieurs groupes. L\'autorisation est plus forte que l\'interdiction : si l\'utilisateur "paul" appartient au groupe "famille" et "amis", et que seule le groupe "famille" est autorisée à consulter la catégorie privée "Noël 2003", alors "paul" y aura accès.';
+  $lang['help_access_title'] = 'Autorisations d\'accès';
+  $lang['help_access'][0] = 'PhpWebGallery dispose d\'un système de restrictions d\'accès aux catégories souhaitées. Les catégories sont soit publiques, soit privées. Pour interdire l\'accès par défaut à une catégorie :';
+  $lang['help_access'][1] = '1. Editez la catégorie (depuis la page des catégories dans la zone d\'administration) et rendez la "privée".';
+  $lang['help_access'][2] = '2. Sur les pages des permissions (d\'un groupe, d\'utilisateur) la catégorie apparaîtra et vous pourrez autoriser l\'accès ou non.';
+  $lang['help_infos'][2] = 'Pour n\'importe quelle question, n\'hésitez pas à consulter le forum ou à y poser une question, sur le site';
+if (isset($conf))
+  $lang['help_infos'][2] = 'Pour n\'importe quelle question, n\'hésitez pas à consulter le <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> ou à y poser une question, sur le site';
+  $lang['step1_err_copy'] = 'Copiez le texte en bleu entre les tirets et collez-le dans le fichier mysql.inc.php qui se trouve dans le répertoire "include" à la base de l\'endroit où vous avez installé PhpWebGallery (le fichier mysql.inc.php ne doit comporter QUE ce qui est en bleu entre les tirets, aucun retour à la ligne ou espace n\'est autorisé)';
+  $lang['conf_upload_available_info'] = 'Autoriser l\'ajout d\'image par les utilisateurs dans les catégories du site (pas sur un site distant). Ceci est un paramètre général, il est nécessaire pour autoriser l\'upload catégorie par catégorie.';
+  $lang['install_help'] = 'Besoin d\'aide ? Posez votre question sur le <a href="http://forum.phpwebgallery.net">forum de PhpWebGallery</a>.';
+  $lang['install_warning'] = 'Le fichier "admin/install.php" est encore présent sur votre serveur. Merci de le supprimer. Il pourrait être utilisé par un tiers à des fins malveillantes.';
+  // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'Cette catégorie n\'existe pas dans la base de données';
+}
+?>
Index: /branches/1.3/language/index.htm
===================================================================
--- /branches/1.3/language/index.htm	(revision 3252)
+++ /branches/1.3/language/index.htm	(revision 3252)
@@ -0,0 +1,8 @@
+<html>
+    <head>
+        <title>PhpWebGallery</title>
+    </head>
+    <body>
+        No access authorized
+    </body>
+</html>
Index: /branches/1.3/language/italiano.php
===================================================================
--- /branches/1.3/language/italiano.php	(revision 3252)
+++ /branches/1.3/language/italiano.php	(revision 3252)
@@ -0,0 +1,542 @@
+<?php
+/***************************************************************************
+ *                               italiano.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   italian version by Ambrogio Corralloni, hamcor@softhome.net           *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+***************************************************************************/
+
+$lang['only_members'] = 'Accesso riservato agli utenti registrati';
+$lang['invalid_pwd'] = 'Password non valida!';
+$lang['access_forbiden'] = 'Non sei autorizzato ad accedere a questa pagina';
+$lang['submit'] = 'Submit';
+$lang['login'] = 'utente';
+$lang['password'] = 'password';
+$lang['new'] = 'nuovo';
+$lang['delete'] = 'elimina';
+$lang['category'] = 'categoria';
+$lang['thumbnail'] = 'miniatura';
+$lang['date'] = 'data';
+$lang['diapo_default_page_title'] = 'Nessuna categoria selezionata';
+$lang['thumbnails'] = 'Miniature';
+$lang['categories'] = 'Categorie';
+$lang['hint_category'] = 'Mostra le immagini nella root di questa categoria';
+$lang['total_images'] = 'totale';
+$lang['title_menu'] = 'Menu';
+$lang['change_login'] = 'cambia login';
+$lang['login'] = 'login';
+$lang['hint_login'] = 'identificarsi per essere abilitati alla personalizzazione del sito';
+$lang['logout'] = 'logout';
+$lang['customize'] = 'personalizza';
+$lang['hint_customize'] = 'personalizza la galleria';
+$lang['hint_search'] = 'cerca';
+$lang['search'] = 'cerca';
+$lang['favorite_cat'] = 'preferite';
+$lang['favorite_cat_hint'] = 'mostra le tue preferite';
+$lang['about'] = 'informazioni';
+$lang['hint_about'] = 'altre informazioni su PhpWebGallery...';
+$lang['admin'] = 'admin';
+$lang['hint_admin'] = 'disponibile solo per gli amministratori';
+$lang['no_category'] = 'Nessuna categoria selezionata<br />scegline una nel menu';
+$lang['page_number'] = 'pagina numero';
+$lang['previous_page'] = 'Precedente';
+$lang['next_page'] = 'Successiva';
+$lang['nb_image_category'] = 'numero delle immagini in questa categoria';
+$lang['recent_image'] = 'immagini con meno di';
+$lang['days'] = 'giorni';
+$lang['send_mail'] = 'Commenti? Inviami un e-mail';
+$lang['title_send_mail'] = 'Un commento sul tuo sito';
+$lang['sub-cat'] = 'sottocategorie';
+$lang['images_available'] = 'immagini in questa categoria';
+$lang['total'] = 'immagini';
+$lang['upload_picture'] = 'Carica una immagine';
+$lang['registration_date'] = 'registrato il';
+$lang['creation_date'] = 'creato il';
+$lang['comment'] = 'commento';
+$lang['author'] = 'autore';
+$lang['size'] = 'dimensioni';
+$lang['filesize'] = 'dimensioni file';
+$lang['file'] = 'file';
+$lang['generation_time'] = 'Pagina generata in';
+$lang['favorites'] = 'Preferite';
+$lang['search_result'] = 'Risultati ricerca';
+$lang['about_page_title'] = 'Info su PhpWebGallery';
+$lang['about_title'] = 'Informazioni...';
+$lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Informazioni su PhpWebGallery</div><ul><li>Questo sito web usa<a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> versione '.$conf['version'].'. PhpWebGallery consiste in una applicazione web che ti permette di creare facilmente una galleria di immagini online.</li> <li>Tecnicamente, PhpWebGallery viene sviluppato interamente in PHP (the elePHPant) con un database MySQL (the SQuirreL)(Un elefante e lo scoiattolo).</li> <li>Se hai commenti o suggerimenti, visit <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> sito ufficiale, e i <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> dedicati.</li>
+</ul>';
+$lang['about_return'] = 'Indietro';
+$lang['ident_page_title'] = 'Identificazione';
+$lang['ident_title'] = 'Identificazione';
+$lang['ident_register'] = 'Registrazione';
+$lang['ident_forgotten_password'] = 'Dimenticato la password ?';
+$lang['ident_guest_visit'] = 'Entra nella galleria come visitatore';
+$lang['customize_page_title'] = 'Personalizzazione';
+$lang['customize_title'] = 'Personalizzazione';
+$lang['customize_nb_image_per_row'] = 'immagini per riga';
+$lang['customize_nb_row_per_page'] = 'righe per pagina';
+$lang['customize_language'] = 'lingua';
+$lang['maxwidth'] = 'massima larghezza immagini';
+$lang['maxheight'] = 'massima altezza immagini';
+$lang['err_maxwidth'] = 'la larghezza massima deve essere superiore a 50';
+$lang['err_maxheight'] = 'la altezza massima deve essere superiore a 50';
+$lang['previous_image'] = 'Precedente';
+$lang['next_image'] = 'Successiva';
+$lang['back'] = 'Click sulla immagine per tornare alla pagina delle miniature';
+$lang['info_image_title'] = 'Informazioni immagine';
+$lang['link_info_image'] = 'Modifica informazioni';
+$lang['true_size'] = 'Dimensioni reali';
+$lang['comments_title'] = 'Commenti degli utenti';
+$lang['comments_del'] = 'elimina questo commento';
+$lang['comments_add'] = 'Aggiungi un commento';
+$lang['month'][1] = 'Gennaio';
+$lang['month'][2] = 'Febbraio';
+$lang['month'][3] = 'Marzo';
+$lang['month'][4] = 'Aprile';
+$lang['month'][5] = 'Maggio';
+$lang['month'][6] = 'Giugno';
+$lang['month'][7] = 'Luglio';
+$lang['month'][8] = 'Agosto';
+$lang['month'][9] = 'Settembre';
+$lang['month'][10] = 'Ottobre';
+$lang['month'][11] = 'Novembre';
+$lang['month'][12] = 'Dicembre';
+$lang['day'][0] = 'Domenica';
+$lang['day'][1] = 'Lunedi';
+$lang['day'][2] = 'Martedi';
+$lang['day'][3] = 'Mercoledi';
+$lang['day'][4] = 'Giovedi';
+$lang['day'][5] = 'Venerdi';
+$lang['day'][6] = 'Sabato';
+$lang['add_favorites_alt'] = 'Aggiungi alle preferite';
+$lang['add_favorites_hint'] = 'Aggiungi questa immagine alle tue preferite';
+$lang['del_favorites_alt'] = 'Elimina dalle preferite';
+$lang['del_favorites_hint'] = 'Elimina questa immagine dalle tue preferite';
+$lang['register_page_title'] = 'Registrazione';
+$lang['register_title'] = 'Registrazione';
+$lang['reg_err_login1'] = 'Nome utente';
+$lang['reg_err_login2'] = 'il nome utente non deve terminare con uno spazio';
+$lang['reg_err_login3'] = 'il nome utente non deve iniziare con uno spazio';
+$lang['reg_err_login4'] = 'il nome utente non deve contenere i caratteri " e \'';
+$lang['reg_err_login5'] = 'nome utente in uso - scegline un altro';
+$lang['reg_err_pass'] = 'inserire ancora la password';
+$lang['reg_confirm'] = 'conferma';
+$lang['reg_err_mail_address'] = 'l\'indirizzo e-mail deve essere nella forma xxx@yyy.eee (esempio : jack@altern.org)';
+$lang['search_title'] = 'Cerca';
+$lang['invalid_search'] = 'la ricerca va fatta con almeno 3 caratteri';
+$lang['search_field_search'] = 'Cerca';
+$lang['search_return_main_page'] = 'Torna alla pagina delle miniature';
+$lang['upload_forbidden'] = 'Non puoi aggiungere immagini in questa categoria';
+$lang['upload_file_exists'] = 'Nome immagine in uso - scegline un altro';
+$lang['upload_filenotfound'] = 'Devi scegliere un formato file per la immagine';
+$lang['upload_cannot_upload'] = 'Impossibile caricare immagine sul server';
+$lang['upload_title'] = 'Aggiungi immagine';
+$lang['upload_advise'] = 'Scegli una immagine da aggiungere nella categoria : ';
+$lang['upload_advise_thumbnail'] = 'Opzionale, ma raccomandato : scegli una miniatura da associare ';
+$lang['upload_advise_filesize'] = 'la dimensione del file non deve eccedere : ';
+$lang['upload_advise_width'] = 'la larghezza immagine non deve eccedere : ';
+$lang['upload_advise_height'] = 'la altezza immagine non deve eccedere : ';
+$lang['upload_advise_filetype'] = 'il file deve essere nel formato jpg, gif or png';
+$lang['upload_err_username'] = 'Inserire il nome utente';
+$lang['upload_username'] = 'Nome utente';
+$lang['upload_successful'] = 'Immagine caricata con successo, un amministratore la convalidera prima possibile';
+// new or modified in release 1.3
+$lang['charset'] = 'iso-8859-1';
+$lang['no'] = 'no';
+$lang['yes'] = 'si';
+$lang['guest'] = 'visitatore';
+$lang['mail_address'] = 'indirizzo mail';
+$lang['public'] = 'pubblico';
+$lang['private'] = 'privato';
+$lang['add'] = 'aggiungi';
+$lang['dissociate'] = 'dissocia';
+$lang['mandatory'] = 'obbligatorio';
+$lang['err_date'] = 'data errata';
+$lang['picture'] = 'immagine';
+$lang['IP'] = 'IP';
+$lang['close'] = 'chiudi';
+$lang['open'] = 'apri';
+$lang['keywords'] = 'parole-chiave';
+$lang['errors_title'] = 'Errori';
+$lang['infos_title'] = 'Informazioni';
+$lang['default'] = 'default';
+$lang['comments'] = 'commenti';
+$lang['category_representative'] = 'rappresentante';
+$lang['stats'] = 'statistiche';
+$lang['most_visited_cat_hint'] = 'mostra le immagini maggiormente richieste';
+$lang['most_visited_cat'] = 'maggiormente richieste';
+$lang['best_rated_cat_hint'] = 'mostra le immagini meglio votate';
+$lang['best_rated_cat'] = 'meglio votate';
+$lang['recent_cat_hint'] = 'mostra le immagini più recenti';
+$lang['recent_cat'] = 'più recenti';
+$lang['recent_cat_title'] = 'Immagini recenti';
+$lang['visited'] = 'visitate';
+$lang['times'] = 'volte';
+$lang['customize_theme'] = 'tema';
+$lang['customize_expand'] = 'espandi tutte le categorie';
+$lang['customize_show_nb_comments'] = 'mostra numero commenti';
+$lang['customize_short_period'] = 'breve periodo';
+$lang['customize_long_period'] = 'lungo periodo';
+$lang['customize_template'] = 'template';
+$lang['err_periods'] = 'il periodo deve essere un valore intero';
+$lang['err_periods_2'] = 'il periodo deve essere maggiore di 0. Il lungo periodo deve essere maggiore del breve periodo.';
+$lang['create_cookie'] = 'cre un cookie';
+$lang['customize_day'] = 'giorno';
+$lang['customize_week'] = 'settimana';
+$lang['customize_month'] = 'mese';
+$lang['customize_year'] = 'anno';
+$lang['slideshow'] = 'proiezione diapositive';
+$lang['period_seconds'] = 'secondi per immagine';
+$lang['slideshow_stop'] = 'arresta la proiezione';
+$lang['comment_added'] = 'Il tuo commento è stato registrato';
+$lang['comment_to_validate'] = 'Un amministratore deve autorizzare il tuo commento prima della pubblicazione.';
+$lang['comment_anti-flood'] = 'Sistema anti-flood : attendi un momento prima di inserire un altro comento';
+$lang['comment_user_exists'] = 'Questo nome utente è già in uso';
+$lang['invalid_search'] = 'I termini cercati devono contenere più di 3 caratteri e non devono contenere segni di punteggiatura';
+$lang['search_mode_or'] = 'almeno una parola';
+$lang['search_mode_and'] = 'tutte le parole';
+$lang['search_comments'] = 'separare le parole con uno spazio';
+$lang['upload_name'] = 'Nome immagine';
+$lang['upload_author'] = 'Autore (es "Pierrick LE GALL")';
+$lang['upload_creation_date'] = 'Data di creazione (DD/MM/YYYY)';
+$lang['upload_comment'] = 'Commento';
+$lang['mail_hello'] = 'Salve,';
+$lang['mail_new_upload_subject'] = 'Nuova immagine nel sito';
+$lang['mail_new_upload_content'] = 'Una nuova immagine aggiunta alla galleria, in attesa di convalida. Accedere alla sezioe Amministrazione per autorizzare o rifiutare l\'immagine.';
+$lang['mail_new_comment_subject'] = 'Nuovo commento nel sito';
+$lang['mail_new_comment_content'] = 'Nuovo commento registrato nella galleria. Se è attivata la convalida dei commenti, è necessario convalidare il commento nella sezione Amministrazioneto per renderlo pubblico.'."\n\n".'Puoi vedere gli ultimi commenti nella sezione Amministrazione';
+$lang['connected_user'] = 'utenti connessi';
+$lang['title_comments'] = 'Commenti degli utenti';
+$lang['stats_last_days'] = 'ultimi giorni';
+$lang['hint_comments'] = 'Leggi gli ultimi commenti';
+$lang['menu_login'] = 'login';
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+  $lang['title_liste_users'] = 'Lista utenti';
+  $lang['title_history'] = 'Storico';
+  $lang['title_update'] = 'Aggiornamento database';
+  $lang['title_configuration'] = 'Configurazione PhpWebGallery';
+  $lang['title_instructions'] = 'Istruzioni';
+  $lang['title_categories'] = 'Gestione categorie';
+  $lang['title_edit_cat'] = 'Edita categoria';
+  $lang['title_info_images'] = 'Modifica le informazioni sulle immagini di una categoria';
+  $lang['title_thumbnails'] = 'Creazione miniature';
+  $lang['title_thumbnails_2'] = 'per';
+  $lang['title_default'] = 'Amministrazione PhpWebGallery';
+  $lang['menu_title'] = 'Administrazione';
+  $lang['menu_config'] = 'Configurazione';
+  $lang['menu_users'] = 'Utenti';
+  $lang['menu_add_user'] = 'aggiungi';
+  $lang['menu_list_user'] = 'lista';
+  $lang['menu_categories'] = 'Categorie';
+  $lang['menu_update'] = 'Aggiorna database';
+  $lang['menu_thumbnails'] = 'Miniature';
+  $lang['menu_history'] = 'Storico';
+  $lang['menu_instructions'] = 'Istruzioni';
+  $lang['menu_back'] = 'Torna alle gallerie';
+  $lang['title_waiting'] = 'Immagini in attesa di convalida';
+  $lang['menu_waiting'] = 'In attesa';
+  $lang['default_message'] = 'Sezione Amministrazione PhpWebGallery';
+  $lang['conf_err_prefixe'] = 'il prefisso delle miniature non deve contenere caratteri accentati';
+  $lang['conf_err_mail'] = 'indirizzo e-mail rifiutato, deve essere nel formato name@server.com';
+  $lang['conf_err_sid_size'] = 'la taglia dell\'identificatore di sessione deve essere un intero compreso tra 4 e 50';
+  $lang['conf_err_sid_time'] = 'la durata della sessione deve essere compresa tra 5 e 60 minuti';
+  $lang['conf_err_max_user_listbox'] = 'il numero massimo di utilizzatori listbox deve essere un intero compreso tra 0 e 255';
+  $lang['conf_confirmation'] = 'Informazioni registrate nel database';
+  $lang['conf_general_title'] = 'Configurazione principale';
+  $lang['conf_general_webmaster'] = 'login webmaster';
+  $lang['conf_general_webmaster_info'] = 'Appare ai visitatori. Vi serve per amministrare il sito';
+  $lang['conf_general_mail'] = 'e-mail webmaster';
+  $lang['conf_general_mail_info'] = 'I visitatori potranno contattarvi a questo indirizzo ';
+  $lang['conf_general_prefix'] = 'prefisso miniature';
+  $lang['conf_general_prefix_info'] = 'Le miniature usano questo prefisso. Lasciare vuoto in caso di dubbio.';
+  $lang['conf_general_access'] = 'tipo di accesso';
+  $lang['conf_general_access_1'] = 'libero';
+  $lang['conf_general_access_2'] = 'ristretto';
+  $lang['conf_general_access_info'] = '- libero : tutti i visitatori possono creare un account per poter personalizzare l\'aspetto del sito<br />- ristretto : il webmaster crea gli accounts. Solo gli utenti registrati possono accedere al sito';
+  $lang['conf_general_max_user_listbox'] = 'numero massimo di utilizzatori listbox';
+  $lang['conf_general_max_user_listbox_info'] = '- questo è il numero massimo di utenti per i quali PhpWebGallery mostra un listbox nella pagina di identificazione<br />- inserire un numero compreso tra 0 e 255, 0 significa nessun listbox';
+  $lang['conf_comments'] = 'commenti degli utenti';
+  $lang['conf_comments_title'] = 'Configurazione dei '.$lang['conf_comments'];
+  $lang['conf_comments_show_comments'] = $lang['conf_comments'];
+  $lang['conf_comments_show_comments_info'] = 'mostra i commenti degli utenti sotto ciascuna immagine ?';
+  $lang['conf_comments_comments_number'] = 'numero di commenti per pagina';
+  $lang['conf_comments_comments_number_info'] = 'numero di commenti da mostrare in ciascuna pagina. Il numero di commenti per immagine rimane illimitato. Inserire un numero tra 5 e 50.';
+  $lang['conf_err_comment_number'] = 'Il numero di commenti per pagina deve essere compreso tra 5 e 50 inclusi.';
+  $lang['conf_remote_site_delete_info'] = 'Cancellando un sito remoto saranno cancellate tutte le relative immagini e categorie.';
+  $lang['conf_upload_title'] = 'Configurazione upload utenti';
+  $lang['conf_upload_available'] = 'autorizzato ad aggiungere immagini';
+  $lang['conf_upload_maxfilesize'] = 'dimensione massima file';
+  $lang['conf_upload_maxfilesize_info'] = 'Dimensione massima del file per le immagini da aggiungere. Deve essere un intero compreso tra 10 e 1000 KB.';
+  $lang['conf_err_upload_maxfilesize'] = 'La dimensione massima del file per le immagini da aggiungere deve essere un intero compreso tra 10 e 1000 KB.';
+  $lang['conf_upload_maxwidth'] = 'larghezza massima';
+  $lang['conf_upload_maxwidth_info'] = 'Larghezza massima delle immagini da aggiungere. Deve essere un intero maggiore di 10, in pixels';
+  $lang['conf_err_upload_maxwidth'] = 'la larghezza massima delle immagini da aggiungere deve essere un intero maggiore di 10, in pixels.';
+  $lang['conf_upload_maxheight'] = 'altezza massima';
+  $lang['conf_upload_maxheight_info'] = 'Altezza massima delle immagini da aggiungere. Deve essere un intero maggiore di 10, in pixels';
+  $lang['conf_err_upload_maxwidth'] = 'l\'altezza massima delle immagini da aggiungere deve essere un intero maggiore di 10, in pixels.';
+  $lang['conf_upload_maxwidth_thumbnail'] = 'larghezza massima delle miniature';
+  $lang['conf_upload_maxwidth_thumbnail_info'] = 'Larghezza massima delle miniature da aggiungere. Deve essere un numero maggiore di 10, in pixels';
+  $lang['conf_err_upload_maxwidth_thumbnail'] = 'La larghezza massima delle miniature da aggiungere deve essere un intero maggiore di 10, in pixels.';
+  $lang['conf_upload_maxheight_thumbnail'] = 'altezza massima delle miniature';
+  $lang['conf_upload_maxheight_thumbnail_info'] = 'Altezza massima delle miniature da aggiungere. Deve essere un numero maggiore di 10, in pixels';
+  $lang['conf_err_upload_maxheight_thumbnail'] = 'L\'altezza massima delle miniature da aggiungere deve essere un numero maggiore di 10, in pixels.';
+  $lang['conf_default_title'] = 'Schermo di default per visitatori non registrati e nuovi accounts';
+  $lang['conf_default_language_info'] = 'lingua di default';
+  $lang['conf_default_theme_info'] = 'tema di default';
+  $lang['conf_session_title'] = 'Configurazione sessione';
+  $lang['conf_session_size'] = 'dimensione identificatore';
+  $lang['conf_session_size_info'] = '- identificatore più grande significa maggior sicurezza<br />- inserire un valore tra 4 e 50';
+  $lang['conf_session_time'] = 'periodo di validità';
+  $lang['conf_session_time_info'] = '- periodo più breve significa maggior sicurezza<br />- inserire un valore tra 5 e 60, in minuti';
+  $lang['conf_session_key'] = 'parola chiave';
+  $lang['conf_session_key_info'] = '- la parola chiave di sessione migliora la criptazione dell\'identificatore di sessione<br />- inserire una combinazione che non superi i 255 caratteri';
+  $lang['conf_session_delete'] = 'cancella le sessioni scadute';
+  $lang['conf_session_delete_info'] = 'si raccomanda di vuotare la tabella database delle sessioni, perchè le sessioni scadute rimangono registrate (anche se questo non pone problemi di sicurezza)';
+  $lang['user_err_modify'] = 'Questo utente n on può essere cancellato o modificato';
+  $lang['user_err_unknown'] = 'Questo utente non esiste nel database';
+  $lang['adduser_info_message'] = 'Informazioni registrate nel database per l\'utente ';
+  $lang['adduser_info_password_updated'] = '(password modificata)';
+  $lang['adduser_info_back'] = 'torna alla lista utenti';
+  $lang['adduser_fill_form'] = 'Riempire il seguente formulario';
+  $lang['adduser_unmodify'] = 'non modificabile';
+  $lang['adduser_status'] = 'status';
+  $lang['adduser_status_admin'] = 'admin';
+  $lang['adduser_status_guest'] = 'guest';
+  $lang['permuser_info_message'] = 'Permessi registrati';
+  $lang['permuser_title'] = 'Restrizioni per l\'utente';
+  $lang['permuser_warning'] = 'Attenzione : un "<span style="font-weight:bold;">accesso vietato</span>" alla radice di una categoria impedisce l\'accesso a  tutta la categoria';
+  $lang['permuser_authorized'] = 'autorizzato';
+  $lang['permuser_forbidden'] = 'vietato';
+  $lang['permuser_parent_forbidden'] = 'categoria superiore vietata';
+  $lang['listuser_confirm'] = 'Si desidera realmente cancellare questo utente';
+  $lang['listuser_info_deletion'] = 'cancellato dal database';
+  $lang['listuser_user_group'] = 'Utenti';
+  $lang['listuser_modify'] = 'modifica';
+  $lang['listuser_modify_hint'] = 'modifica informazioni di';
+  $lang['listuser_permission'] = 'permessi';
+  $lang['listuser_permission_hint'] = 'modifica permissi di';
+  $lang['listuser_delete'] = 'cancella';
+  $lang['listuser_delete_hint'] = 'cancella utente';
+  $lang['listuser_button_all'] = 'tutti';
+  $lang['listuser_button_invert'] = 'invertire';
+  $lang['listuser_button_create_address'] = 'creare indirizzo e-mail';
+  $lang['cat_invisible'] = 'invisibile';
+  $lang['cat_edit'] = 'Edita';
+  $lang['cat_up'] = 'Su';
+  $lang['cat_down'] = 'Giù';
+  $lang['cat_image_info'] = 'Informazioni immagini';
+  $lang['cat_total'] = 'totale';
+  $lang['editcat_confirm'] = 'Informazioni registrate nel database';
+  $lang['editcat_back'] = 'categorie';
+  $lang['editcat_title1'] = 'Opzioni per la categoria';
+  $lang['editcat_name'] = 'Nome';
+  $lang['editcat_comment'] = 'Commento';
+  $lang['editcat_status'] = 'Status';
+  $lang['infoimage_general'] = 'Opzioni generali per la categoria';
+  $lang['infoimage_useforall'] = 'usare per tutte le immagini? ?';
+  $lang['infoimage_creation_date'] = 'data crazione';
+  $lang['infoimage_detailed'] = 'Opzioni per ciascuna immagine';
+  $lang['infoimage_title'] = 'titolo';
+  $lang['infoimage_comment'] = 'commento';
+  $lang['update_missing_tn'] = 'manca la miniatura per';
+  $lang['update_disappeared_tn'] = 'la miniatura è scomparsa';
+  $lang['update_disappeared'] = 'non esiste';
+  $lang['update_part_deletion'] = 'Cancellazione immagini prive di miniatura o che non esistono';
+  $lang['update_deletion_conclusion'] = 'immagine romossa dal database';
+  $lang['update_part_research'] = 'Ricerca nuove immagini nelle directories';
+  $lang['update_research_added'] = 'aggiunta';
+  $lang['update_research_tn_ext'] = 'miniatura in';
+  $lang['update_research_conclusion'] = 'immagini aggiunte al database';
+  $lang['update_default_title'] = 'Scegliere una opzione';
+  $lang['update_only_cat'] = 'aggiornare le categorie, non le immagini';
+  $lang['update_all'] = 'aggiornare tutto';
+  $lang['tn_width'] = 'larghezza';
+  $lang['tn_height'] = 'altezza';
+  $lang['tn_no_support'] = 'Immagine inesistente o senza supporto';
+  $lang['tn_format'] = 'per il formato file';
+  $lang['tn_thisformat'] = 'per questo formato file';
+  $lang['tn_err_width'] = 'la larghezza deve essere un intero maggiore di';
+  $lang['tn_err_height'] = 'l\'altezza deve essere un intero maggiore di';
+  $lang['tn_results_title'] = 'Risultati miniaturizzazione';
+  $lang['tn_picture'] = 'immagine';
+  $lang['tn_results_gen_time'] = 'generata in';
+  $lang['tn_stats'] = 'Statistiche generali';
+  $lang['tn_stats_nb'] = 'numero di immagini miniaturizzate';
+  $lang['tn_stats_total'] = 'tempo totale';
+  $lang['tn_stats_max'] = 'tempo massimo';
+  $lang['tn_stats_min'] = 'tempo minimo';
+  $lang['tn_stats_mean'] = 'tempo medio';
+  $lang['tn_err'] = 'hai commesso qualche errore';
+  $lang['tn_params_title'] = 'Parametri di miniaturizzazione';
+  $lang['tn_params_GD'] = 'Versione GD';
+  $lang['tn_params_GD_info'] = '- GD è la libreria di manipolazione grafica per PHP<br />-scegliere la versione installata nel vostro server. Se avete scelto una versione errata, ottenendo messaggi di errore, provate con un\'altra versione. Se nessuna versione funziona, significa che il vostro server non supporta GD.';
+  $lang['tn_params_width_info'] = 'larghezza massima che possono assumere le miniature';
+  $lang['tn_params_height_info'] = 'altezza massima che possono assumere le miniature';
+  $lang['tn_params_create'] = 'crea';
+  $lang['tn_params_create_info'] = 'Non tentare di miniaturizzare troppe immagini contemporaneamente.<br />La miniaturizzazione sovraccarica il processore del server. Se il vostro sito è ospitato gratuitamente, un eccessivo sfruttamento di risorse può comportare la cancellazione del sito.';
+  $lang['tn_params_format'] = 'formato file';
+  $lang['tn_params_format_info'] = 'la creazione di miniature supporta solo il formato jpeg';
+  $lang['tn_alone_title'] = 'immagini senza miniatura (solo jpeg e png)';
+  $lang['tn_dirs_title'] = 'Lista directories';
+  $lang['tn_dirs_alone'] = 'immagini senza miniatura';
+  $lang['help_images_title'] = 'Aggiunta immagini';
+  $lang['help_images_intro'] = 'Come collocare le immagini nelle directories';
+  $lang['help_images'][0] = 'nella directory "gallerie", creare directories che rappresentino le vostre categorie';
+  $lang['help_images'][1] = 'in ciascuna directory, potete creare quanti sottolivelli desiderate.';
+  $lang['help_images'][2] = 'per ciascuna categoria, potete creare quante categorie e sub-categorie desiderate';
+  $lang['help_images'][3] = 'i files immagine devono essere nel formato jpeg (estensione jpg or JPG), gif (estensione gif o GIF) o png (estensione png o PNG).';
+  $lang['help_images'][4] = 'non utilizzare spazi " " o trattini "-" nei nomi di file, è consigliabile usare underscore "_" che è generato dall\'applicativo e fornisce migliori risultati';
+  $lang['help_thumbnails_title'] = 'Miniature';
+  $lang['help_thumbnails'][0] = 'in ciascuna directory contenente immagini da mostrare nel sito, esiste una subdirectory chiamata "thumbnail", se non esiste, dovete crearla per inserivi le miniature.';
+  $lang['help_thumbnails'][1] = 'le miniature possono avere estensione diversa dalle immagini a cui sono associate (per esempio una immagine con estensione .JPG può avere una miniatura con estensione .GIF).';
+  $lang['help_thumbnails'][2] = 'le miniature associate a una immagine devono avere il prefisso stabilito nella pagina di configurazione generale (image.jpg -> TN_image.GIF per esempio).';
+  $lang['help_thumbnails'][3] = 'per la creazione di  miniature è consigliabile utilizzare il modulo per windows prelevabile sul sito di PhpWebGallery ';
+  $lang['help_thumbnails'][4] = 'è possibile usare la creazione di miniature integrata in PhpWebGallery, ma non è consigliabile, perchè le miniature risulteranno di scarsa qualità e saranno usate molte risorse sul server che ospita il vostro sito pregiudicando il servizio di host gratuito.';
+  $lang['help_thumbnails'][5] = 'usando il sever del vostro servizio host, dovrete configurare con 775 i diritti di accesso alla cartella "gallerie" e a tutte le sue sotto-cartelle.';
+  $lang['help_database_title'] = 'Riempimento database';
+  $lang['help_database'][0] = 'dopo aver collocato correttamente immagini e miniature nelle directories, cliccare su "aggiorna database" nel menu del pannello di amministrazione.';
+  $lang['help_infos_title'] = 'Informazioni supplementari';
+  $lang['help_infos'][1] = 'Appena avete creato le vostre gallerie, andate alla lista utenti e modificate i permessi per gli utenti "visitatori". In effetti, ogni nuovo utente registrato, avrà per default gli stessi permessi degli utenti "visitatori".';
+  $lang['help_remote_title'] = 'Sito remoto';
+  $lang['help_remote'][0] = 'PhpWebGallery offre la possibilità di usare diversi servers per immagazzinare le immagini cho compongono la vostra galleria. Ciò può rivelarsi utile se la vostra galleria gode di uno spazio limitato e avete una grande quantità di immagini da mostrare. Seguite questa procedura : ';
+  $lang['help_remote'][1] = '1. editare nel vostro computer il file "create_listing_file.php" (si trova nella directory "admin"), modificando la linea "$prefix_thumbnail = "TN-";" se il prefisso delle vostre miniature non è "TN-".';
+  $lang['help_remote'][2] = '2. caricare sul vostro sito remoto, tramite FTP, il file "create_listing_file.php" modificato , nella directory delle directories delle immagini  (come la directory galleries nel vostro computer).';
+  $lang['help_remote'][3] = '3. lanciare lo script via web usando l\'url http://vostrosito/repGalerie/create_listing_file.php, verrà creato un file listing.xml.';
+  $lang['help_remote'][4] = '4. scaricate file listing.xml dal vostro sito remoto e salvatelo nella directory "admin" nel vostro computer.';
+  $lang['help_remote'][5] = '5. lanciate un aggiornamento del database delle immagini tramite l\'nterfaccia di amministrazione, una volta utilizzato il file listing.xml, cancellatelo dalla directory "admin".';
+  $lang['help_remote'][6] = 'Potete aggiornare i contenuti del vostro sito remoto by rifacendo la procedura descritta.Potete anche eliminare il vostro sito remoto scegliendo l\'opzione nella sezione configurazione del pannello di amministrazione.';
+  $lang['help_upload_title'] = 'Aggiunta immagini da parte degli utenti';
+  $lang['help_upload'][0] = 'Per offrire agli utenti la possibilità di aggiungere immagini :';
+  $lang['help_upload'][1] = '1. autorizzare l\'opzione nella zona configurazione del pannello di amministrazione';
+  $lang['help_upload'][2] = '2. autorizzare i diritti di scrittura nelle cartelle immagini';
+  $lang['install_message'] = 'Messaggio';
+  $lang['step1_confirmation'] = 'I parametri sono corretti';
+  $lang['step1_err_db'] = 'Connessione al server riuscita, ma è impossibile connettere il database';
+  $lang['step1_err_server'] = 'Impossibile connettere il server';
+  $lang['step1_err_copy_2'] = 'Procedere al punto successivo';
+  $lang['step1_err_copy_next'] = 'punto successivo';
+  $lang['step1_title'] = 'Punto 1/2';
+  $lang['step1_host'] = 'MySQL host';
+  $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
+  $lang['step1_user'] = 'utente';
+  $lang['step1_user_info'] = 'user login del servizio che ospita il vostro sito web';
+  $lang['step1_pass'] = 'Password';
+  $lang['step1_pass_info'] = 'user password del servizio che ospita il vostro sito web';
+  $lang['step1_database'] = 'Nome database';
+  $lang['step1_database_info'] = 'assegnato dal servizio che ospita il vostro sito web';
+  $lang['step1_prefix'] = 'Prefisso dei nomi di tabella';
+  $lang['step1_prefix_info'] = 'i nomi delle tabelle del database avranno quel prefisso (vi permette di gestire meglio il database)';
+  $lang['step2_err_login1'] = 'inserire un login per il webmaster';
+  $lang['step2_err_login3'] = 'il login webmaster can\'t non deve contenere caratteri \' or "';
+  $lang['step2_err_pass'] = 'inserire di nuovo la password';
+  $lang['step2_err_mail'] = $lang['conf_err_mail'];
+  $lang['install_end_title'] = 'Installazione terminata';
+  $lang['install_end_message'] = 'La configurazione di PhpWebGallery è terminata, procedere al punto successivo<br /><br />Per ragioni di sicurezza, cancellare il file "install.php" nella directory "admin"<br /> Cancellato il file, seguire queste istruzioni :<ul>  <li>andare alla pagina di identificazione : [ 
+<a href="../identification.php">identification</a> ] ed effettuare il login come webmaster</li> <li>potrete così accedere al [ <a href="admin.php">pannello di amministrazione</a> ] ed alle istruzioni per collocare le immagini nelle vostre directories</li></ul>';
+  $lang['step2_title'] = 'Punto 2/2';
+  $lang['step2_pwd'] = 'password webmaster';
+  $lang['step2_pwd_info'] = 'Non divulgatela, permette di accedere al pannello di amministrazione';
+  $lang['step2_pwd_conf'] = 'confermare password';
+  $lang['step2_pwd_conf_info'] = 'verifica';
+  // new or modified in release 1.3
+  $lang['remote_site'] = 'Sito remoto';
+  $lang['title_add'] = 'Aggiungi un utente';
+  $lang['title_modify'] = 'Modifica un utente';
+  $lang['title_groups'] = 'Gestione gruppi';
+  $lang['title_user_perm'] = 'Modifica permessi utente';
+  $lang['title_cat_perm'] = 'Modifica permessi categoria';
+  $lang['title_group_perm'] = 'Modifica permessi gruppo';
+  $lang['title_picmod'] = 'Modifica informazioni immagine';
+  $lang['menu_groups'] = 'Gruppi';
+  $lang['menu_comments'] = 'Commenti';
+  $lang['conf_general_log'] = 'storico';
+  $lang['conf_general_log_info'] = 'Mantenere uno storico delle visite sul sito? ? Le visite saranno mostrate nella sezione storico del pannello di amministrazione';
+  $lang['conf_general_mail_notification'] = 'Notifica tramite e-mail';
+  $lang['conf_general_mail_notification_info'] = 'Notifica automatica per gli amministratori (solo per essi) quando un utente aggiunge un commento o una immagine.';
+  $lang['conf_comments_validation'] = 'convalida';
+  $lang['conf_comments_validation_info'] = 'Un amministratore convalida i commenti inviati dagli utenti prima della pubblicazione';
+  $lang['conf_comments_forall'] = 'per tutti ?';
+  $lang['conf_comments_forall_info'] = 'Anche gli ospiti non registrati possono aggiungere commenti';
+  $lang['conf_default_nb_image_per_row_info'] = 'Default immagini per riga';
+  $lang['conf_default_nb_row_per_page_info'] = 'Default righe per pagina';
+  $lang['conf_default_short_period_info'] = 'In giorni. Periodo durante il quale una immagine appare con un punto rosso. Il periodo breve deve essere superiore a 1 giorno.';
+  $lang['conf_default_long_period_info'] = 'In giorni. Periodo durante il quale una immagine appare con un punto verde. Il periodo lungo deve essere magigiore del periodo breve.';
+  $lang['conf_default_expand_info'] = 'espandi per default tutte le categorie nel menu ?';
+  $lang['conf_default_show_nb_comments_info'] = 'mostra il numero di commenti per ciascuna immagine nella pagina delle miniature';
+  $lang['conf_default_maxwidth_info'] = 'Massima larghezza immagini mostrate : viene modificata solo la dimensione sullo schermo, il file rimane intatto. Lasciare vuoto se non si desidera porre limiti.';
+  $lang['conf_default_maxheight_info'] = 'Massima altezza immagini mostrate, come per la larghezza';
+  $lang['conf_session_cookie'] = 'autorizzare cookies';
+  $lang['conf_session_cookie_info'] = 'Gli utenti non saranno obbligati ad identificarsi ad ogni visita. Metodo meno sicuro.';
+  $lang['adduser_associate'] = 'Associare al gruppo';
+  $lang['group_add'] = 'Aggiungere un gruppo';
+  $lang['group_add_error1'] = 'Il nome di un gruppo non deve contenere " or \'';
+  $lang['group_add_error2'] = 'Nome di gruppo già utilizzato';
+  $lang['group_confirm'] = 'Sicuro di voler rimuovere questo gruppo ?';
+  $lang['group_list_title'] = 'Lista gruppi esistenti';
+  $lang['group_err_unknown'] = 'Questo gruppo non esiste nel database';
+  $lang['cat_permission'] = 'permessi';
+  $lang['cat_update'] = 'aggiornamento';
+  $lang['cat_add'] = 'Aggiungere una categoria virtuale';
+  $lang['cat_parent'] = 'categoria superiore';
+  $lang['cat_error_name'] = 'Il nome di una categoria non può essere vuoto';
+  $lang['cat_virtual'] = 'virtuale';
+  $lang['cat_first'] = 'Primo';
+  $lang['cat_last'] = 'Ultimo';
+  $lang['editcat_visible_info'] = '(visibile solo agli amministratori)';
+  $lang['editcat_visible'] = 'Visibile';
+  $lang['editcat_uploadable'] = 'I visitatori possono aggiungere immagini';
+  $lang['infoimage_keyword_separation'] = '(separare con virgolette ",")';
+  $lang['infoimage_addtoall'] = 'aggiungere a tutti';
+  $lang['infoimage_removefromall'] = 'rimuovere da tutti';
+  $lang['infoimage_associate'] = 'Associare alla categoria';
+  $lang['update_wrong_dirname'] = 'I nomi di directories e files devono essero composti solo da lettere, numeri, figures, "-", "_" or "."';
+  $lang['stats_pages_seen'] = 'pagine visitate';
+  $lang['stats_visitors'] = 'visitatori';
+  $lang['stats_empty'] = 'vuota lo storico';
+  $lang['stats_pages_seen_graph_title'] = 'Pagine visitate per giorno';
+  $lang['stats_visitors_graph_title'] = 'Visitatori per giorno';
+  $lang['comments_last_title'] = 'Ultimi commenti';
+  $lang['comments_non_validated_title'] = 'Commenti in attesa di convalida';
+  $lang['help_database'][1] = 'Per evitare l\'aggiornamento simultaneo di un numero eccessivo di immagini, iniziare aggiornando prima le categorie, quindi nella sezione categorie, aggiornare ciascuna categoria con il link "aggiornamento"';
+  $lang['help_upload'][3] = 'Deve essere consentito l\'aggiornamento per la categoria.';
+  $lang['help_upload'][4] = 'Le immagini aggiunte dagli utenti non saranno immediatamente visibili sul sito, prima devono essere convalidate da un amministratore, che dalla pagina "in attesa" del pannello di amministrazione, convalidi o rifiuti le immagini proposte e quindi lanci un aggiornamento del database.';
+  $lang['help_virtual_title'] = 'Links tra immagini, categorie e categorie virtuali';
+  $lang['help_virtual'][0] = 'PhpWebGallery può dissociare le categorie in cui si trovano le immagini e le categorie in cui le immagini vengono mostrate.';
+  $lang['help_virtual'][1] = 'Per default, le immagini appaiono solo nelle loro categorie reali, corrispondenti alle directories sul server web.';
+  $lang['help_virtual'][2] = 'Per collegare un\'imagine a una categoria, eseguire l\'associazione nella pagina "modifica informazioni immagine" o nella pagina "modifica informazioni immagini di una categoria".';
+  $lang['help_virtual'][3] = 'Partendo da questo principio, si possono creare categorie virtuali in PhpWebGallery : nessuna nuova cartella reale sarà creata sul server. Sarà sufficiente creare la categoria sulla pagina della lista delle categorie esistenti nel pannello di amministrazione.';
+  $lang['help_groups_title'] = 'Gruppi utenti';
+  $lang['help_groups'][0] = 'PhpWebGallery può gestire gruppi di utenti, caratteristica molto utile per raggruppare le autorizzazioni d\'accesso alle categorie private.';
+  $lang['help_groups'][1] = '1. Creare un gruppo "famiglia" nella sezione "Gruppi" del pannello di amministrazione.';
+  $lang['help_groups'][2] = '2. Nella pagina "Utenti", editare un utente ed associarlo al gruppo "famiglia".';
+  $lang['help_groups'][3] = '3. Modificando i permessi per una categoria o per un gruppo, vedrete che tutte le categorie accessibili a un gruppo sono accessibili a tutti i membri di quel gruppo.';
+  $lang['help_groups'][4] = 'Un utente può appartenere a più gruppi. L\'autorizzazione è più forte dell\'interdizione : se l\'utente "tizio" appartiene ai gruppi "famiglia" e "amici", e solo il gruppo "famiglia" è autorizzato a consultare la categoria "Natale 2003", "tizio" avrà accesso a "Natale 2003".';
+  $lang['help_access_title'] = 'Autorizzazione all\'accesso';
+  $lang['help_access'][0] = 'PhpWebGallery è in grado di interdire l\'accesso alle categorie desiderate, sia pubbliche che private. Per interdire l\'accesso per default ad una categoria :';
+  $lang['help_access'][1] = '1. Modificare le informazioni di categoria (nella pagina "categories" del pannello di amministrazione) e renderla privata.';
+  $lang['help_access'][2] = '2. Nella pagina dei permessi (di gruppo o di utente) sarà mostrata la categoria e sarà possibile autorizzare od interdire l\'accesso.';
+  $lang['help_infos'][2] = 'Per qualsiasi domanda, non esitate a consultare il forum e a porre il vostro quesito sul sito. Il <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> is accessibile sul sito ufficiale di PhpWebGallery.';
+  $lang['step1_err_copy'] = 'Copiate il testo in blu tra virgolette e incollatelo nel file "include/mysql.inc.php" che si trova nella cartella "include" all\'indirizzo in cui avete installato PhpWebGallery (Attenzione : mysql.inc.php deve contenere solo ciò che è scritto in blu, non sono consentiti spazi e ritorni a capo)';
+  $lang['permuser_only_private'] = 'Sono mostrate solo le categorie private';
+  $lang['waiting_update'] = 'Le immagini convalidate appariranno solo dopo l\'aggiornamento del database';
+  $lang['conf_upload_available_info'] = 'Autorizzare gli utenti ad aggiungere immagini nelle categorie del sito (non su un server remoto). Questo è un parametro generale, serve per autorizzare l\'aggirnamento categoria per categoria. Per default, nessuna categoria è aggiornabile.';
+  $lang['install_help'] = 'Serve aiuto ? Poni il tuo quesito su <a href="http://forum.phpwebgallery.net">PhpWebGallery forum</a>.';
+  $lang['install_warning'] = 'Il file "admin/install.php" è ancora presente. Per motivi di sicurezza deve essere rimosso dal server. ';
+  // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'Questa categoria non esiste nel database';
+}
+?>
Index: /branches/1.3/language/japanese.php
===================================================================
--- /branches/1.3/language/japanese.php	(revision 3252)
+++ /branches/1.3/language/japanese.php	(revision 3252)
@@ -0,0 +1,565 @@
+<?php
+/***************************************************************************
+ *                                japanese.php                             *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$            *
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+*    Japanese version by Mitsuhiro Yoshida, http://mitstek.com/            *
+*    All files are written in shift_jis.                                   *
+*    Any suggestion for Japanese version, feel free to contact me.         *
+***************************************************************************/
+
+$lang['only_members'] = "±Ìy[WÉÍo[ÌÝªANZXÅ«Ü·";
+$lang['invalid_pwd'] = "pX[hªá¢Ü·!";
+$lang['access_forbiden'] = "±Ìy[WÉANZX·é Àª èÜ¹ñ";
+$lang['submit'] = "Às";
+$lang['login'] = "OC";
+$lang['password'] = "pX[h";
+$lang['new'] = "V";
+$lang['delete'] = "í";
+$lang['category'] = "JeS";
+$lang['thumbnail'] = "TlC";
+$lang['date'] = "út";
+$lang['diapo_default_page_title'] = "JeS¢Ið";
+$lang['thumbnails'] = "TlC";
+$lang['categories'] = "JeS";
+$lang['hint_category'] = "±ÌJeSÌC[Wð\¦µÜ·";
+$lang['total_images'] = "v";
+$lang['title_menu'] = "j
+[";
+$lang['change_login'] = "OCÌÏX";
+$lang['login'] = "OC¼";
+$lang['hint_login'] = "FØðs¤±ÆÉæèTCgÌfUCðJX^}CYoÜ·";
+$lang['logout'] = "OAEg";
+$lang['customize'] = "JX^}CY";
+$lang['hint_customize'] = "M[ÌfUCðJX^}CYµÜ·";
+$lang['hint_search'] = "õ";
+$lang['search'] = "õ";
+$lang['favorite_cat'] = "¨CÉüè";
+$lang['favorite_cat_hint'] = "¨CÉüèð\¦µÜ·";
+$lang['about'] = "about";
+$lang['hint_about'] = "PhpWebGalleryÉÖ·éÚ×îñ ...";
+$lang['admin'] = "Ç";
+$lang['hint_admin'] = "ÇÒÌÝgpÅ«Ü·";
+$lang['no_category'] = "JeSªIð³êÄ¢Ü¹ñ<br />j
+[æèIðµÄ­¾³¢";
+$lang['page_number'] = "y[W";
+$lang['previous_page'] = "OÖ";
+$lang['next_page'] = "Ö";
+$lang['nb_image_category'] = "JeSàÊ^";
+$lang['recent_image'] = "o^";
+$lang['days'] = "úÈàÌC[W";
+$lang['send_mail'] = "²Ó©²´zÍ±¿çÖ";
+$lang['title_send_mail'] = "Rgªe³êÜµ½";
+$lang['sub-cat'] = "TuJeS";
+$lang['images_available'] = "C[Wª±ÌJeSÉo^³êÄ¢Ü·";
+$lang['total'] = "C[W";
+$lang['upload_picture'] = "Ê^ÌAbv[h";
+$lang['registration_date'] = "o^ú";
+$lang['creation_date'] = "ì¬ú";
+$lang['comment'] = "Rg";
+$lang['author'] = "ìÒ";
+$lang['size'] = "TCY";
+$lang['filesize'] = "t@CTCY";
+$lang['file'] = "t@C";
+$lang['generation_time'] = "Page generated in";
+$lang['favorites'] = "¨CÉüè";
+$lang['search_result'] = "õÊ";
+$lang['about_page_title'] = "PhpWebGalleryÉÖµÄ";
+$lang['about_title'] = "About...";
+$lang['about_message'] = "<div style=\"text-align:center;font-weigh:bold;\">PhpWebGalleryÉÖ·éîñ</div>
+<ul>
+  <li>±ÌTCgÍ<a href=\"".$conf['site_url']."\" style=\"text-decoration:underline\">PhpWebGallery</a> version ".$conf['version']."ðgpµÄ¢Ü·B È½ÍPhpWebGalleryÉæèÈPÉICEC[WM[ðì¬·é±ÆªÂ\Å·B</li>
+  <li>ZpIÉÍAPhpWebGalleryÍSÄPHP(the elePHPant)ÆMySQLf[^x[X(the SQuirreL)ÅJ­³êÄ¢Ü·B</li>
+  <li>²Ó©²´zð¨¿ÌûÍA<a href=\"".$conf['site_url']."\" style=\"text-decoration:underline\">PhpWebGalleryö®TCg</a>yÑ<a href=\"".$conf['forum_url']."\" style=\"text-decoration:underline\">tH[</a>É¨zµ­¾³¢B</li>
+</ul>";
+$lang['about_return'] = "ßé";
+$lang['ident_page_title'] = "FØ";
+$lang['ident_title'] = "FØ";
+$lang['ident_register'] = "[Uo^";
+$lang['ident_forgotten_password'] = "pX[hðYêÜµ½ ?";
+$lang['ident_guest_visit'] = "rW^[ÆµÄM[ÖÚ®";
+$lang['customize_page_title'] = "JX^}CY";
+$lang['customize_title'] = "JX^}CY";
+$lang['customize_nb_image_per_row'] = "1ñ ½èÌÊ^";
+$lang['customize_nb_row_per_page'] = "1y[W ½èÌs";
+$lang['customize_language'] = "¾ê";
+$lang['maxwidth'] = "Ê^ÌÅå";
+$lang['maxheight'] = "Ê^ÌÅå";
+$lang['err_maxwidth'] = "ÅåÍ50ÈãÉµÄ­¾³¢";
+$lang['err_maxheight'] = "ÅåÍ50ÈãÉµÄ­¾³¢";
+$lang['previous_image'] = "OÖ";
+$lang['next_image'] = "Ö";
+$lang['back'] = "C[WÌNbNÉæèTlCy[WÉßèÜ·";
+$lang['info_image_title'] = "C[Wîñ";
+$lang['link_info_image'] = "C[WîñÌXV";
+$lang['true_size'] = "ATCY";
+$lang['comments_title'] = "[UÌRg";
+$lang['comments_del'] = "RgÌí";
+$lang['comments_add'] = "RgÌÇÁ";
+$lang['month'][1] = "1";
+$lang['month'][2] = "2";
+$lang['month'][3] = "3";
+$lang['month'][4] = "4";
+$lang['month'][5] = "5";
+$lang['month'][6] = "6";
+$lang['month'][7] = "7";
+$lang['month'][8] = "8";
+$lang['month'][9] = "9";
+$lang['month'][10] = "10";
+$lang['month'][11] = "11";
+$lang['month'][12] = "12";
+$lang['day'][0] = "új";
+$lang['day'][1] = "j";
+$lang['day'][2] = "Îj";
+$lang['day'][3] = "
+j";
+$lang['day'][4] = "Øj";
+$lang['day'][5] = "àj";
+$lang['day'][6] = "yj";
+$lang['add_favorites_alt'] = "¨CÉüèÉÇÁ";
+$lang['add_favorites_hint'] = "±ÌÊ^ð¨CÉüèÉÇÁµÜ·";
+$lang['del_favorites_alt'] = "¨CÉüè©çí";
+$lang['del_favorites_hint'] = "±ÌÊ^ð¨CÉüè©çíµÜ·";
+$lang['register_page_title'] = "[Uo^";
+$lang['register_title'] = "[Uo^";
+$lang['reg_err_login1'] = "OC¼ðüÍµÄ­¾³¢";
+$lang['reg_err_login2'] = "OC¼ÌöÉXy[XÍgpoÜ¹ñ";
+$lang['reg_err_login3'] = "OC¼ÌæªÉXy[XÍgpoÜ¹ñ";
+$lang['reg_err_login4'] = "OC¼É \" yÑ ' ÍgpoÜ¹ñ";
+$lang['reg_err_login5'] = "OC¼ªùÉo^³êÄ¢Ü·";
+$lang['reg_err_pass'] = "pX[hðà¤êxüÍµÄ­¾³¢";
+$lang['reg_confirm'] = "pX[hðà¤êx";
+$lang['reg_err_mail_address'] = "[AhXÍÌæ¤È`®ÉµÄ­¾³¢ xxx@yyy.eee (á : jack@altern.org)";
+$lang['search_title'] = "õ";
+$lang['invalid_search'] = "L[[hÍ¼p3¶ÈãÉµÄ­¾³¢";
+$lang['search_field_search'] = "õ";
+$lang['search_return_main_page'] = "TlCy[WÉßé";
+$lang['upload_forbidden'] = "±ÌJeSÉÍÊ^ðAbv[hÅ«Ü¹ñ";
+$lang['upload_file_exists'] = "Ê^¼ªùÉgp³êÄ¢Ü·";
+$lang['upload_filenotfound'] = "C[WÌt@C^CvðIðµÄ­¾³¢";
+$lang['upload_cannot_upload'] = "T[oÉÊ^ðAbv[hoÜ¹ñ";
+$lang['upload_title'] = "Ê^ÌAbv[h";
+$lang['upload_advise'] = "JeSÉAbv[h·éC[WðIðµÄ­¾³¢ : ";
+$lang['upload_advise_thumbnail'] = "IvV(§) : Abv[hµ½Ê^ÌTlCðIðµÄ­¾³¢ ";
+$lang['upload_advise_filesize'] = "Ê^ÌÅåTCY : ";
+$lang['upload_advise_width'] = "Ê^ÌÅå : ";
+$lang['upload_advise_height'] = "Ê^ÌÅå : ";
+$lang['upload_advise_filetype'] = "Abv[hÂ\Èt@C^Cv : jpg gif png";
+$lang['upload_err_username'] = "[U¼ðüÍµÄ­¾³¢";
+$lang['upload_username'] = "[U¼";
+$lang['upload_successful'] = "Ê^ª³íÉAbv[h³êÜµ½BÇÒª}ÉÊ^Ì³Fðs¢Ü·B";
+// new or modified in release 1.3
+$lang['charset'] = 'shift_jis';
+$lang['no'] = 'no';
+$lang['yes'] = 'yes';
+$lang['guest'] = 'QXg';
+$lang['mail_address'] = '[AhX';
+$lang['public'] = 'öJ';
+$lang['private'] = 'vCx[g';
+$lang['add'] = 'ÇÁ';
+$lang['dissociate'] = 'ª£';
+$lang['mandatory'] = 'K{';
+$lang['err_date'] = 'útªÔáÁÄ¢Ü·';
+$lang['picture'] = 'Ê^';
+$lang['IP'] = 'IP';
+$lang['close'] = 'Â¶é';
+$lang['open'] = 'J­';
+$lang['keywords'] = 'L[[h';
+$lang['errors_title'] = 'G[';
+$lang['infos_title'] = 'îñ';
+$lang['default'] = 'ftHg';
+$lang['comments'] = 'Rg';
+$lang['category_representative'] = 'ÖAt¯';
+$lang['stats'] = 'v';
+$lang['most_visited_cat_hint'] = 'Åà{³ê½Ê^ð\¦µÜ·';
+$lang['most_visited_cat'] = 'Å½{';
+$lang['best_rated_cat_hint'] = 'xXgNÌÊ^ð\¦µÜ·';
+$lang['best_rated_cat'] = 'xXgN';
+$lang['recent_cat_hint'] = 'ÅVÌÊ^ð\¦µÜ·';
+$lang['recent_cat'] = 'ÅVÊ^';
+$lang['recent_cat_title'] = 'ÅVÌÊ^';
+$lang['visited'] = 'Kâ';
+$lang['times'] = 'ñ';
+$lang['customize_theme'] = 'C^[tF[Xe[}';
+$lang['customize_expand'] = 'SJeSðWJ·é';
+$lang['customize_show_nb_comments'] = 'Rgð\¦·é';
+$lang['customize_short_period'] = 'Z¢úÔ';
+$lang['customize_long_period'] = '·¢úÔ';
+$lang['customize_template'] = 'ev[g';
+$lang['err_periods'] = 'úÔÍlðwèµÄ­¾³¢';
+$lang['err_periods_2'] = 'úÔÍ0ÈãÉµÄ­¾³¢B·¢úÔÍZ¢úÔæèå«­ÝèµÄ­¾³¢B';
+$lang['create_cookie'] = 'NbL[ðì¬·é';
+$lang['customize_day'] = 'ú';
+$lang['customize_week'] = 'T';
+$lang['customize_month'] = '';
+$lang['customize_year'] = 'N';
+$lang['slideshow'] = 'XChV[';
+$lang['period_seconds'] = 'b/Ê^';
+$lang['slideshow_stop'] = 'XChV[ðâ~·é';
+$lang['comment_added'] = 'Rgªo^³êÜµ½';
+$lang['comment_to_validate'] = 'ÇÒÌFØãÉRgªfÚ³êÜ·B';
+$lang['comment_anti-flood'] = 'Anti-flood system : ÌRgÌfÚÍà¤b­¨Ò¿­¾³¢';
+$lang['comment_user_exists'] = '±ÌOC¼Í¼Ì[UÉùÉgp³êÄ¢Ü·';
+$lang['invalid_search'] = 'õL[[hÍAåÇ_ðÜÜÈ¢3¶Èã(p¶·Z)ÉµÄ­¾³¢';
+$lang['search_mode_or'] = '­È­Æà1ÂÌPê';
+$lang['search_mode_and'] = 'SÄÌPê';
+$lang['search_comments'] = 'PêðXy[XÅæØÁÄ­¾³¢';
+$lang['upload_name'] = 'Ê^¼';
+$lang['upload_author'] = 'BeÒ (á "Pierrick LE GALL")';
+$lang['upload_creation_date'] = 'ì¬ú (DD/MM/YYYY)';
+$lang['upload_comment'] = 'Rg';
+$lang['mail_hello'] = 'Hi,';
+$lang['mail_new_upload_subject'] = 'ÅVÊ^';
+$lang['mail_new_upload_content'] = 'M[ÉVµ¢Ê^ªAbv[h³êÜµ½B»ÝAFØÒ¿óÔÅ·BÇplÅ±ÌÊ^ÌFØÍÛðsÁÄ­¾³¢B';
+$lang['mail_new_comment_subject'] = 'ÅVRg';
+$lang['mail_new_comment_content'] = 'M[ÉVµ¢ÎÊªe³êÜµ½B[URgÌ³FIvVðIðµ½êAM[ÉRgð\¦·é×ÉÇplÅRgÌ³FðsÁÄ­¾³¢B'."\n\n".'ÅVRgÍÇplÅ{oÜ·B';
+$lang['connected_user'] = 'OC[U';
+$lang['title_comments'] = '[URg';
+$lang['stats_last_days'] = 'úÈà';
+$lang['hint_comments'] = 'ÅVÌ[URgð\¦·é';
+$lang['menu_login'] = 'OC';
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+  $lang['title_liste_users'] = "[UXg";
+  $lang['title_history'] = "ð";
+  $lang['title_update'] = "f[^x[XÌXV";
+  $lang['title_configuration'] = "PhpWebGalleryÝè";
+  $lang['title_instructions'] = "à¾";
+  $lang['title_categories'] = "JeSÌÇ";
+  $lang['title_edit_cat'] = "JeSÌÒW";
+  $lang['title_info_images'] = "JeSC[WîñÌC³";
+  $lang['title_thumbnails'] = "TlCÌì¬";
+  $lang['title_thumbnails_2'] = ":";
+  $lang['title_default'] = "PhpWebGalleryÌÇ";
+  $lang['menu_title'] = "Ç";
+  $lang['menu_config'] = "Ýè";
+  $lang['menu_users'] = "[U";
+  $lang['menu_add_user'] = "ÇÁ/C³";
+  $lang['menu_list_user'] = "Xg";
+  $lang['menu_categories'] = "JeS";
+  $lang['menu_update'] = "f[^x[XÌXV";
+  $lang['menu_thumbnails'] = "TlC";
+  $lang['menu_history'] = "ð";
+  $lang['menu_instructions'] = "à¾";
+  $lang['menu_back'] = "M[Éßé";
+  $lang['title_waiting'] = "³FÒ¿ÌÊ^";
+  $lang['menu_waiting'] = "³FÒ¿";
+  $lang['default_message'] = "PhpWebGalleryÇpl";
+  $lang['conf_err_prefixe'] = "TlCÚª«ÉANZgLÍgpoÜ¹ñ";
+  $lang['conf_err_mail'] = "[AhXª³µ­ èÜ¹ñB[AhXÍÌæ¤ÉÝèµÄ­¾³¢ name@server.com";
+  $lang['conf_err_sid_size'] = "ZbVIDÌTCYÍ4`50ÌlðÝèµÄ­¾³¢";
+  $lang['conf_err_sid_time'] = "ZbV^CÍ5`60ÌlðÝèµÄ­¾³¢";
+  $lang['conf_err_max_user_listbox'] = "[UXg{bNXÌÅåÍ0`255ÌlÉµÄ­¾³¢";
+  $lang['conf_confirmation'] = "Ýèîñªf[^x[XÉo^³êÜµ½";
+  $lang['conf_general_title'] = "CÝè";
+  $lang['conf_general_webmaster'] = "ÇÒOC¼";
+  $lang['conf_general_webmaster_info'] = "rW^[É\¦³êÜ·BTCgÌÇÉKvÅ·B";
+  $lang['conf_general_mail'] = "ÇÒ[AhX";
+  $lang['conf_general_mail_info'] = "rW^[Í±Ì[AhX¶ÉAðæé±ÆªoÜ·B";
+  $lang['conf_general_prefix'] = "TlCÚª«";
+  $lang['conf_general_prefix_info'] = "TlCÉgpµÜ·Bª©çÈ¢êÍA±ÌÜÜÉµÄ­¾³¢B";
+  $lang['conf_general_access'] = "ANZX^Cv";
+  $lang['conf_general_access_1'] = "©R";
+  $lang['conf_general_access_2'] = "§Àt";
+  $lang['conf_general_access_info'] = "- ©R : NÅàTCgÉüé±ÆªoÜ·BrW^[ÍEFuTCgÌ\¦ðJX^}CY·é½ßÉAJEgðì¬·é±ÆªoÜ·B<br />- §Àt« : EFu}X^ªAJEgðì¬·é±ÆªoÜ·Bo^[UÌÝTCgÖüé±ÆªoÜ·B";
+  $lang['conf_general_max_user_listbox'] = "[UXg{bNXÌÅå";
+  $lang['conf_general_max_user_listbox_info'] = "- FØy[WÅeLXg{bNXÌãíèÉPhpWebGalleryªXg{bNXÉ\¦·é[UÌÅå<br />- 0`255ÌlðüÍµÄ­¾³¢B0ÌêAXg{bNXÍ\¦³êÜ¹ñB";
+  $lang['conf_comments'] = "[URg";
+  $lang['conf_comments_title'] = "Ýè ".$lang['conf_comments'];
+  $lang['conf_comments_show_comments'] = $lang['conf_comments'];
+  $lang['conf_comments_show_comments_info'] = "[URgðÊ^ÌºÉ\¦µÜ·© ?";
+  $lang['conf_comments_comments_number'] = "1y[W ½èÌRg";
+  $lang['conf_comments_comments_number_info'] = "1y[WÉ\¦·éRgBÊ^ÉÎ·éRgÍ³§ÀÅ·B5`50ÌÔÌlðÝèµÄ­¾³¢B";
+  $lang['conf_err_comment_number'] = "1y[W ½èÌRgÍ5`50ÌÔÉÝèµÄ­¾³¢B";
+  $lang['conf_remote_site_delete_info'] = "[gT[oÌíÉæèAÖA·éSÄÌC[WÆJeSÍí³êÜ·B";
+  $lang['conf_upload_title'] = "[UAbv[hÝè";
+  $lang['conf_upload_available'] = "Ê^ÌAbv[hÂ";
+  $lang['conf_upload_maxfilesize'] = "Ååt@CTCY";
+  $lang['conf_upload_maxfilesize_info'] = "Abv[hC[WÌÅåt@CTCYB10`1000kÌÔÉÝèµÄ­¾³¢B";
+  $lang['conf_err_upload_maxfilesize'] = "Abv[hC[WÌÅåt@CTCYÍA10`1000kÌÔÉÝèµÄ­¾³¢B";
+  $lang['conf_upload_maxwidth'] = "Åå";
+  $lang['conf_upload_maxwidth_info'] = "Abv[hC[WÌÅåB10sNZÈãÉÝèµÄ­¾³¢B";
+  $lang['conf_err_upload_maxwidth'] = "Abv[hC[WÌÅåÍA10sNZÈãÉÝèµÄ­¾³¢B";
+  $lang['conf_upload_maxheight'] = "Åå";
+  $lang['conf_upload_maxheight_info'] = "Abv[hC[WÌÅåB10sNZÈãÉÝèµÄ­¾³¢B";
+  $lang['conf_err_upload_maxwidth'] = "Abv[hC[WÌÅåÍA10sNZÈãÉÝèµÄ­¾³¢B";
+  $lang['conf_upload_maxwidth_thumbnail'] = "TlCÌÅå";
+  $lang['conf_upload_maxwidth_thumbnail_info'] = "TlCÌÅåB10sNZÈãÉÝèµÄ­¾³¢B";
+  $lang['conf_err_upload_maxwidth_thumbnail'] = "TlCÌÅåÍA10sNZÈãÉÝèµÄ­¾³¢B";
+  $lang['conf_upload_maxheight_thumbnail'] = "TlCÌÅå";
+  $lang['conf_upload_maxheight_thumbnail_info'] = "TlCÌÅåB10sNZÈãÉÝèµÄ­¾³¢B";
+  $lang['conf_err_upload_maxheight_thumbnail'] = "TlCÌÅåÍA10sNZÈãÉÝèµÄ­¾³¢B";
+  $lang['conf_default_title'] = "¢o^[UyÑVKAJEgÉÎ·éftHg\¦®«";
+  $lang['conf_default_language_info'] = "gp¾ê";
+  $lang['conf_default_theme_info'] = "ftHge[}";
+  $lang['conf_session_title'] = "ZbVÝè";
+  $lang['conf_session_size'] = "ZbVIDTCY";
+  $lang['conf_session_size_info'] = "- ZbVIDÌ·³ð·­·éÆTCgÌÀS«ªÜèÜ·B<br />- 4`50ÌÔÉÝèµÄ­¾³¢B";
+  $lang['conf_session_time'] = "LøúÀ";
+  $lang['conf_session_time_info'] = "- LøúÀðZ­·éÆTCgÌÀS«ªÜèÜ·B <br />- 5`60ªÌÔÉÝèµÄ­¾³¢B";
+  $lang['conf_session_key'] = "L[[h";
+  $lang['conf_session_key_info'] = "- ZbVL[[hÍZbVIDÌGR[hðüPµÜ·B<br />- ¼p255¶ÈàÌ¶ð©RÉüÍµÄ­¾³¢B";
+  $lang['conf_session_delete'] = "Ã¢ZbVðí";
+  $lang['conf_session_delete_info'] = "Ã¢f[^ªcèÜ·ÌÅAf[^x[XÌZbVe[uðí·é±Æð¨©ßµÜ·B(íµÈ¢êÅàZL
+eBãÌâèÍ èÜ¹ñ)";
+  $lang['user_err_modify'] = "±Ì[UÍC³ÍíoÜ¹ñ";
+  $lang['user_err_unknown'] = "±Ì[UÍf[^x[XÉo^³êÄ¢Ü¹ñ";
+  $lang['adduser_info_message'] = "f[^x[XÌ[UîñªXV³êÜµ½ ";
+  $lang['adduser_info_password_updated'] = "(pX[hªXV³êÜµ½)";
+  $lang['adduser_info_back'] = "[UXgÉßé";
+  $lang['adduser_fill_form'] = "ºLÌtH[ÉüÍµÄ­¾³¢";
+  $lang['adduser_unmodify'] = "ÏXsÂ";
+  $lang['adduser_status'] = "Xe[^X";
+  $lang['adduser_status_admin'] = "ÇÒ";
+  $lang['adduser_status_guest'] = "QXg";
+  $lang['permuser_info_message'] = "p[~bVªo^³êÜµ½";
+  $lang['permuser_title'] = "[UÌ§À: ";
+  $lang['permuser_warning'] = "x : [gJeSÖÌ \"<span style=\"font-weight:bold;\">ANZXÖ~</span>\" ÝèÉæèSÄÌJeSÉANZXoÈ­ÈèÜ·B";
+  $lang['permuser_authorized'] = "§Àt«";
+  $lang['permuser_forbidden'] = "ANZXÖ~";
+  $lang['permuser_parent_forbidden'] = "eJeSANZXÖ~";
+  $lang['listuser_confirm'] = "{É±Ì[UðíµÄàXµ¢Å·©";
+  $lang['listuser_info_deletion'] = "ªf[^x[X©çí³êÜµ½";
+  $lang['listuser_user_group'] = "[UO[v";
+  $lang['listuser_modify'] = "C³";
+  $lang['listuser_modify_hint'] = "îñÌXV";
+  $lang['listuser_permission'] = "p[~bV";
+  $lang['listuser_permission_hint'] = "p[~bVÌXV";
+  $lang['listuser_delete'] = "í";
+  $lang['listuser_delete_hint'] = "[UÌí";
+  $lang['listuser_button_all'] = "SÄIð";
+  $lang['listuser_button_invert'] = "Iðð";
+  $lang['listuser_button_create_address'] = "[AhXÌ\¦";
+  $lang['cat_invisible'] = 'B·';
+  $lang['cat_edit'] = "ÒW";
+  $lang['cat_up'] = "ãÖ";
+  $lang['cat_down'] = "ºÖ";
+  $lang['cat_image_info'] = "C[Wîñ";
+  $lang['cat_total'] = "v";
+  $lang['editcat_confirm'] = "Ýèªf[^x[XÉo^³êÜµ½";
+  $lang['editcat_back'] = "JeS";
+  $lang['editcat_title1'] = "IvV";
+  $lang['editcat_name'] = "JeS¼";
+  $lang['editcat_comment'] = "Rg";
+  $lang['editcat_status'] = "Xe[^X";
+  $lang['infoimage_general'] = "JeSÌêÊIvV";
+  $lang['infoimage_useforall'] = "SÄÌÊ^ÉKp ?";
+  $lang['infoimage_creation_date'] = "ì¬ú";
+  $lang['infoimage_detailed'] = "eÊ^ÌIvV";
+  $lang['infoimage_title'] = "^Cg";
+  $lang['infoimage_comment'] = "Rg";
+  $lang['update_missing_tn'] = "TlC³µÌC[W";
+  $lang['update_disappeared_tn'] = "TlCr¸";
+  $lang['update_disappeared'] = "ª¶ÝµÜ¹ñ";
+  $lang['update_part_deletion'] = "TlC³µÍ¶ÝµÈ¢C[WÌí";
+  $lang['update_deletion_conclusion'] = "ÌÊ^ªf[^x[X©çí³êÜµ½";
+  $lang['update_part_research'] = "fBNgàVKC[WÌõ";
+  $lang['update_research_added'] = "ªÇÁ³êÜµ½";
+  $lang['update_research_tn_ext'] = "TlCíÞ";
+  $lang['update_research_conclusion'] = "ÌÊ^ªf[^x[XÉo^³êÜµ½";
+  $lang['update_default_title'] = "IvVðIðµÄ­¾³¢";
+  $lang['update_only_cat'] = "JeSðXV·éBÊ^ÍXVµÈ¢B";
+  $lang['update_all'] = "SÄðXV·éB";
+  $lang['tn_width'] = "";
+  $lang['tn_height'] = "³";
+  $lang['tn_no_support'] = "Ê^ª©Â©çÈ¢©T|[gOÅ·:";
+  $lang['tn_format'] = "t@CtH[}bg";
+  $lang['tn_thisformat'] = "t@CtH[}bg";
+  $lang['tn_err_width'] = "Å¬:";
+  $lang['tn_err_height'] = "Å¬:";
+  $lang['tn_results_title'] = "Å¬»ÌÊ";
+  $lang['tn_picture'] = "Ê^";
+  $lang['tn_results_gen_time'] = "ì¬Ô";
+  $lang['tn_stats'] = "êÊv";
+  $lang['tn_stats_nb'] = "Å¬»³ê½Ê^";
+  $lang['tn_stats_total'] = "vÔ";
+  $lang['tn_stats_max'] = "ÅåÔ";
+  $lang['tn_stats_min'] = "Å¬Ô";
+  $lang['tn_stats_mean'] = "½ÏÔ";
+  $lang['tn_err'] = "G[";
+  $lang['tn_params_title'] = "Å¬»p[^";
+  $lang['tn_params_GD'] = "GDo[W";
+  $lang['tn_params_GD_info'] = "- GDÍæðì·éPHPÌCuÅ·B<br />- È½ÌT[oÉCXg[³êÄ¢éo[WðIðµÄ­¾³¢BÔáÁ½o[WðIðµ½êÍAG[bZ[Wª\¦³êÜ·ÌÅÙÈéo[WðIðµÄ­¾³¢BÇÌo[Wà®ìµÈ¢êÍA È½ÌT[oªGDðT|[gµÄ¢È¢±ÆðÓ¡µÜ·B";
+  $lang['tn_params_width_info'] = "TlCÌÅå";
+  $lang['tn_params_height_info'] = "TlCÌÅå";
+  $lang['tn_params_create'] = "ì¬";
+  $lang['tn_params_create_info'] = "TlCÌì¬ÍCPUÉßåÈ×ð©¯Ü·ÌÅA¯É½­ÌÊ^ÌTlCì¬ðsíÈ¢Å­¾³¢Bt[voC_ðgpµÄ¢éêACPUÉ¢×ð©¯éÆEFuTCgðí³êéêª èÜ·B";
+  $lang['tn_params_format'] = "t@CtH[}bg";
+  $lang['tn_params_format_info'] = "TlCÌì¬ÉÍjpegtH[}bgÌÝgpÅ«Ü·B";
+  $lang['tn_alone_title'] = "TlC³µÌÊ^ (jpegyÑpngÌÝ)";
+  $lang['tn_dirs_title'] = "fBNgXg";
+  $lang['tn_dirs_alone'] = "TlC³µÌÊ^";
+  $lang['help_images_title'] = "Ê^ÌÇÁ";
+  $lang['help_images_intro'] = "fBNgÖÌÊ^ÌÇÁû@";
+  $lang['help_images'][0] = "fBNg \"galleries\" àÉJeSð\·fBNgðì¬µÄ­¾³¢B";
+  $lang['help_images'][1] = "»ê¼êÌfBNgÉÍA¢­ÂÅàTufBNgðì¬oÜ·B";
+  $lang['help_images'][2] = "»ê¼êÌJeSÉÍA¢­ÂÅàTuJeSðì¬oÜ·B";
+  $lang['help_images'][3] = "Ê^t@CÍAjpegtH[}bg(g£qÍ jpg Í JPG)A giftH[}bg(g£qÍ gif Í GIF) Í pngtH[}bg(g£qÍ png Í PNG)ÉµÄ­¾³¢B";
+  $lang['help_images'][4] = "t@C¼ÉÍAó \" \" â nCt \"-\" ðgíÈ¢Å­¾³¢BPhpWebGalleryªÇoÄA³µ­³êéA_[XRA \"_\" ðgíêé±Æð¨©ßµÜ·B";
+  $lang['help_thumbnails_title'] = "TlC";
+  $lang['help_thumbnails'][0] = " È½ÌTCgàÉ éÊ^\¦Ì×ÌfBNgÉÍA»ê¼êÉ \"thumbnail\" Æ¢¤¼ÌÌfBNgª èÜ·Bàµ³¢êÍATlCðÇÁ·é×Éì¬µÄ­¾³¢B";
+  $lang['help_thumbnails'][1] = "TlCÌg£qÍÊ^t@CÆ¯¶É·éKvÍ èÜ¹ñB(á¦ÎA.jpgÆ¢¤g£qÌÊ^ª .GIFÆ¢¤g£qðÂ±ÆªoÜ·)B";
+  $lang['help_thumbnails'][2] = "Ýèy[WÅo^³ê½Úª«ðÊ^ÌTlCt@C¼ÌæªÉt¯éKvª èÜ· (á image.jpg -> TN_image.GIF)B";
+  $lang['help_thumbnails'][3] = "TlCÌÇpÉPhpWebGalleryÌy[WæèWindowspÌW
+[ð_E[h·é±Æð¨©ßµÜ·B";
+  $lang['help_thumbnails'][4] = "PhpWebGalleryÌTlCì¬y[WàpoÜ·ª¨©ßµÜ¹ñBTlCÌ¿ªÇ­ èÜ¹ñµACPUÌp[ð½åÉgpµÜ·ÌÅ³¿EFuzXeBOðpµÄ¢éêÍguÌ´öÆÈèÜ·B";
+  $lang['help_thumbnails'][5] = "zXeBOvoC_ÌT[oðpµÄTlCðì¬·éêA\"galleries\"tH_yÑSÄÌTutH_Ìp[~bVð775ÉÝèµÄ­¾³¢B";
+  $lang['help_database_title'] = "f[^x[XÌXV";
+  $lang['help_database'][0] = "Ê^t@CÆTlCª³µ­fBNgÉÇÁ³ê½ãAÇplÉ é \"f[^x[XÌXV\" ðNbNµÄ­¾³¢B";
+  $lang['help_infos_title'] = "»Ì¼Ìîñ";
+  $lang['help_infos'][1] = "M[Ìì¬ãAoé¾¯­[UXgÉANZXµÄ \"rW^[\" Ìp[~bVðÏXµÄ­¾³¢BSÄÌVKo^[UÍftHgÅ \"rW^[\" [UÆ¯¶p[~bVªÄçêÜ·B";
+  $lang['help_remote_title'] = "[gTCg";
+  $lang['help_remote'][0] = "PhpWebGalleryÅÍM[ðì¬·éÉ¢­Â©ÌT[oÉC[WðÛ¶·é±ÆªoÜ·B M[ªeÊ§À³ê½êÉCXg[³êÄ¢ÄA®ÂåÊÌC[WðfÚ·éêÉÖÅ·BºLÌèÉ]ÁÄ­¾³¢: ";
+  $lang['help_remote'][1] = "1. \"create_listing_file.php\"Æ¢¤¼ÌÌt@CðÒWµÜ· (\"admin\" fBNgÌÉ èÜ·)ATlCÌÚª«ª \"TN-\" Å³¢êÍA\"\$prefixe_thumbnail = \"TN-\";\" ÆÏXµÜ·B";
+  $lang['help_remote'][2] = "2. C³ÏÝÌ \"create_listing_file.php\" t@Cð[gTCgÉFTPÅu«Ü·B[gTCgÌC[Wði[·éfBNgÉu¢Ä­¾³¢(EFuTCgÌ \"galleries\" Æ¢¤¼ÌÌæ¤ÈfBNg)B";
+  $lang['help_remote'][3] = "3. URL( http://domaineDistant/repGalerie/create_listing_file.php )ðgpµÄXNvgðN®µÄ­¾³¢Blisting.xmlÆ¢¤¼ÌÌt@Cªì¬³êÜ·B";
+  $lang['help_remote'][4] = "4. [gTCgÉ élisting.xmlðA±ÌTCgÌ \"admin\" fBNgÉüêÄ­¾³¢B";
+  $lang['help_remote'][5] = "5. ÇplÅf[^x[XÌXVðsÁÄ­¾³¢Bf[^x[XÌXVÅlisting.xmlªgp³ê½ãÍA\"admin\" fBNgæèíµÄ­¾³¢B";
+  $lang['help_remote'][6] = "fBNgÖÌÊ^ÌÇÁðÄxs¤±ÆÉæè[gTCgÌRecðXV·é±ÆªoÜ·B ÇplÌÝèIvVðIð·é±ÆÉæèA[gTCgÌgpð~·é±ÆàoÜ·BIðIvVF".
+  $lang['help_upload_title'] = "Ê^ÌAbv[hÂ";
+  $lang['help_upload'][0] = "PhpWebGalleryÅÍ[UÉC[WðAbv[h³¹é±ÆªoÜ·B û@ÍºLÌÊèÅ· :";
+  $lang['help_upload'][1] = "1. ÇplÉOCµÄÝèðNbN·é";
+  $lang['help_upload'][2] = "2. Ê^ÌAbv[hÂðYesÉÝè·é";
+  $lang['install_message'] = "bZ[W";
+  $lang['step1_confirmation'] = "p[^Í³íÅ·";
+  $lang['step1_err_db'] = "T[oÖÌÚ±Í¬÷µÜµ½ªAf[^x[XÖÚ±Å«Ü¹ñ";
+  $lang['step1_err_server'] = "T[oÉÚ±oÜ¹ñ";
+  $lang['step1_err_copy_2'] = "CXg[ÌÌXebvÖißÜ·";
+  $lang['step1_err_copy_next'] = "ÌXebv";
+  $lang['step1_title'] = "Xebv 1/2";
+  $lang['step1_host'] = "MySQLzXg";
+  $lang['step1_host_info'] = "localhost, sql.multimania.com, toto.freesurf.fr";
+  $lang['step1_user'] = "[U";
+  $lang['step1_user_info'] = "MySQLzXgÌÚ±¼";
+  $lang['step1_pass'] = "pX[h";
+  $lang['step1_pass_info'] = "MySQLzXgÌÚ±pX[h";
+  $lang['step1_database'] = "f[^x[X¼";
+  $lang['step1_database_info'] = "MySQLzXgÌf[^x[X¼";
+  $lang['step1_prefix'] = "f[^x[Xe[uÚª«";
+  $lang['step1_prefix_info'] = "f[^x[Xe[u¼ÌæªÉÚª«ªÇÁ³êÜ· (e[uÇªµÕ­ÈèÜ·)";
+  $lang['step2_err_login1'] = "EFu}X^ÌOC¼ðüÍµÄ­¾³¢";
+  $lang['step2_err_login3'] = "EFu}X^ÌOC¼ÉÍ ' â \" ÍgpoÜ¹ñ";
+  $lang['step2_err_pass'] = "pX[hðà¤êxüÍµÄ­¾³¢";
+  $lang['step2_err_mail'] = $lang['conf_err_mail'];
+  $lang['install_end_title'] = "CXg[ª®¹µÜµ½";
+  $lang['install_end_message'] = "PhpWebGalleryÌÝèª®¹µÜµ½BÌXebvÉiñÅ­¾³¢B<br /><br />
+ZL
+eBãÌR©ç \"admin\" fBNgàÌ \"install.php\" ðíµÄ­¾³¢B<br />
+±Ìt@Cªí³ê½ãÉAÌw¦É]ÁÄ­¾³¢ :
+<ul>
+<li>FØy[WÉiñÅ­¾³¢ : [ <a href='../identification.php'>FØ</a> ] EFu}X^pÌOC¼/pX[hðgpµÄOCµÄ­¾³¢B</li>
+<li>OC·é±ÆÉæèA [ <a href='admin.php'>Çpl</a> ] yÑÊ^ÌAbv[hà¾ÖANZXoÜ·B</li>
+</ul>";
+  $lang['step2_title'] = "Xebv 2/2";
+  $lang['step2_pwd'] = "pX[h";
+  $lang['step2_pwd_info'] = "ÇplÉANZX·é½ßÌpX[hÅ·B";
+  $lang['step2_pwd_conf'] = "pX[hÌmF";
+  $lang['step2_pwd_conf_info'] = "mFµÄ­¾³¢B";
+  // new or modified in release 1.3
+  $lang['remote_site'] = '[gTCg';
+  $lang['title_add'] = '[UÌÇÁ';
+  $lang['title_modify'] = '[UÌXV';
+  $lang['title_groups'] = 'O[vÇ';
+  $lang['title_user_perm'] = '[UÌp[~bVðXV·é';
+  $lang['title_cat_perm'] = 'JeSÌp[~bVðXV·é';
+  $lang['title_group_perm'] = 'O[vÌp[~bVðXV·é';
+  $lang['title_picmod'] = 'Ê^îñðXV·é';
+  $lang['menu_groups'] = 'O[v';
+  $lang['menu_comments'] = 'Rg';
+  $lang['conf_general_log'] = 'ð';
+  $lang['conf_general_log_info'] = 'EFuTCgÌKâððÛ¶µÜ·©? KâðÍÇplÌðZNVÅ©é±ÆªoÜ·B';
+  $lang['conf_general_mail_notification'] = '[Êm';
+  $lang['conf_general_mail_notification_info'] = '[UªRgðÇÁÍÊ^ðAbv[hµ½Æ«É©®IÉÇÒÌÝÉ[ðMµÜ·B';
+  $lang['conf_comments_validation'] = '[URgÌ³F';
+  $lang['conf_comments_validation_info'] = 'ÇÒÌ³FãÉ[UÌRgð\¦·éB';
+  $lang['conf_comments_forall'] = 'SõÉÂ·é';
+  $lang['conf_comments_forall_info'] = '¢o^ÌQXgÉàRgÌeðÂ·éB';
+  $lang['conf_default_nb_image_per_row_info'] = '1ñ ½èÌÊ^(ftHg)';
+  $lang['conf_default_nb_row_per_page_info'] = '1y[W ½èÌs(ftHg)';
+  $lang['conf_default_short_period_info'] = 'úðwèBÊ^ªÔ¢}[NÆ¤É\¦³êéúÔBZ¢úÔÍ1úÈãÉÝèµÄ­¾³¢B';
+  $lang['conf_default_long_period_info'] = 'úðwèBÊ^ªÎÌ}[NÆ¤É\¦³êéúÔB·¢úÔÍZ¢úÔæè·­Ýè·éKvª èÜ·B';
+  $lang['conf_default_expand_info'] = 'j
+[àÅSÄÌJeSðftHgÅWJµÜ·© ?';
+  $lang['conf_default_show_nb_comments_info'] = 'TlCy[WÅeÊ^ÌRgð\¦·éB';
+  $lang['conf_default_maxwidth_info'] = '\¦Ê^ÌÅå : Ê^\¦ÌÝÌTCYªÏX³êÄAt@CÌÏXÍsíêÜ¹ñB§ÀðÝ¯½­È¢êÍóÉµÄ­¾³¢B';
+  $lang['conf_default_maxheight_info'] = 'Ê^ÌÅå';
+  $lang['conf_session_cookie'] = 'NbL[ÌÛ¶';
+  $lang['conf_session_cookie_info'] = 'ñÌKâÉ[UªOC·éKvªÈ­ÈèÜ·BZL
+eB[ãAÀSÅÍ èÜ¹ñB';
+  $lang['adduser_associate'] = 'O[vÉÁ¦é';
+  $lang['group_add'] = 'O[vÌÇÁ';
+  $lang['group_add_error1'] = 'O[v¼ÉÍ " â \' ðÜñÅÍ¢¯Ü¹ñB';
+  $lang['group_add_error2'] = '±ÌO[v¼ÍùÉgp³êÄ¢Ü·B';
+  $lang['group_confirm'] = '{É±ÌO[vðíµÄàXµ¢Å·© ?';
+  $lang['group_list_title'] = 'O[vXg';
+  $lang['group_err_unknown'] = '±ÌO[vÍf[^x[XÉ¶ÝµÄ¢Ü¹ñB';
+  $lang['cat_permission'] = 'p[~bV';
+  $lang['cat_update'] = 'XV';
+  $lang['cat_add'] = 'o[`JeSðÇÁ·é';
+  $lang['cat_parent'] = 'eJeS';
+  $lang['cat_error_name'] = 'JeS[¼ðüÍµÄ­¾³¢';
+  $lang['cat_virtual'] = 'o[`';
+  $lang['cat_first'] = 'æªÉÚ®';
+  $lang['cat_last'] = 'öÉÚ®';
+  $lang['editcat_visible_info'] = '(ÇÒÈOÉñ\¦)';
+  $lang['editcat_visible'] = '\¦';
+  $lang['editcat_uploadable'] = 'Ê^ÌAbv[h';
+  $lang['infoimage_keyword_separation'] = '(R}æØè ",")';
+  $lang['infoimage_addtoall'] = 'SÄÉÝè';
+  $lang['infoimage_removefromall'] = 'ÝèðæèÁ·';
+  $lang['infoimage_associate'] = 'Iðµ½JeSÉÖAt¯é';
+  $lang['update_wrong_dirname'] = 'fBNg¼yÑt@C¼Íp¶ÍL("-", "_" or ".")Å\¬³êéKvª èÜ·';
+  $lang['stats_pages_seen'] = 'y[Wª{³êÜµ½';
+  $lang['stats_visitors'] = 'QXg';
+  $lang['stats_empty'] = 'ððNA·é';
+  $lang['stats_pages_seen_graph_title'] = '1ú½èÌy[W{';
+  $lang['stats_visitors_graph_title'] = '1ú½èÌQXg{';
+  $lang['comments_last_title'] = 'ÅVÌRg';
+  $lang['comments_non_validated_title'] = '³FÒ¿ÌRg';
+  $lang['help_database'][1] = '1ñÌXVÅåÊÌÊ^ðXV·é±Æðð¯é×ÉAJeSÌXVÌÝð¨©ßµÜ·BJeSÌXVãAÇplÌJeSÅ»ê¼êÌJeSÌ¡É éuXVvðNbNµÄ­¾³¢B';
+  $lang['help_upload'][3] = 'Ê^ðAbv[h·éÉÍAJeSðAbv[hÂ\ÉÝè·éKvª èÜ·B';
+  $lang['help_upload'][4] = 'Abv[hµ½C[WÍEFuTCgÉ¼Ú\¦³êÜ¹ñB\¦³êé×ÉÍÇÒÌFØªKvÅ·BÇÒÍÇplÌu³FÒ¿vj
+[ÅC[WÌFØÍÛðs¤Kvª èÜ·B»ÌãAf[^x[XÌXVðs¢Ü·B';
+  $lang['help_virtual_title'] = 'Ê^AJeSAo[`JeSÔÌN';
+  $lang['help_virtual'][0] = 'PhpWebGalleryÍÊ^ªÛ¶³êÄ¢éJeSÆÊ^ª\¦³êÄ¢éJeSðª£·é±ÆªoÜ·B';
+  $lang['help_virtual'][1] = 'ftHgÅÍAÊ^ÍEFuT[oãÌfBNgÆêv·éJeSàÉ\¦³êÜ· : ';
+  $lang['help_virtual'][2] = 'Ê^ðJeSÉN·éÉÍAÊ^y[WÅ»ê¼êÖAt¯é©AÇplÌJeSÅSÄÌÊ^ðÖAt¯Ä­¾³¢B';
+  $lang['help_virtual'][3] = 'Ü½APhpWebGalleryàÉo[`JeSðì¬·é±ÆàoÜ·BJeSÍfBNgÆêv·éKvÍ èÜ¹ñB ÇplÌ"JeS"ZNVÅì¬µÄ­¾³¢B';
+  $lang['help_groups_title'] = '[U O[v';
+  $lang['help_groups'][0] = 'PhpWebGalleryÅÍ[UO[vÌÇðs¤±ÆªoÜ·B±êÍvCx[gJeSÉp[~bVðÝè·éÉÖÅ·B';
+  $lang['help_groups'][1] = '1. á¦ÎÇplÌ"O[v"ZNVÅ"family"Æ¢¤¼ÌÌO[vðì¬µÜ·B';
+  $lang['help_groups'][2] = '2. "[U"ZNVÅA[Uð"family"ÉÖAt¯Ü·B';
+  $lang['help_groups'][3] = '3. JeSÍO[vÌp[~bVðÏX·é±ÆÅAJeSÉÎ·éO[vÌANZX ðO[vo[ÉèÄé±ÆªoÜ·B';
+  $lang['help_groups'][4] = '[UÍôÂ©ÌO[vÉ®·é±ÆªoÜ·B ÀÍÛæèàDÊÉ èÜ·: á¦ÎA"jack"ª"family"yÑ"friends"Æ¢¤O[vÉ®µÄ¢éÆµÜ·B"family"O[vÌÝª"Christmas 2003"JeSð©é±ÆªoéêA"jack"Í"Christmas 2003"ÉANZX·é±ÆªoÜ·B';
+  $lang['help_access_title'] = 'ANZX ';
+  $lang['help_access'][0] = 'PhpWebGalleryÍJeSÖÌANZXðÖ~·é±ÆªoÜ·BJeSÍuöJvÜ½ÍuvCx[gvÉÝè·é±ÆªoÜ·BJeSÖÌANZXðÖ~·éÉÍ :';
+  $lang['help_access'][1] = '1. ÇplÌ"JeS"ZNVÅJeSîñð"vCx[g"ÉÏXµÜ·';
+  $lang['help_access'][2] = '2. O[vÍ[Uy[WÌp[~bVÉvCx[gJeSª\¦³êÜ·B»±Å§Àt«ANZXÍANZXÖ~ðÝè·é±ÆªoÜ·B';
+  $lang['help_infos'][2] = 'ª©çÈ¢±Æª éêÍA½ßçí¸ÉtH[ð{·é©¿âµÄ­¾³¢B <a href="'.$conf['forum_url'].'" style="text-decoration:underline">tH[</a> (f¦Â)ÍPhpWebGalleryz[y[WÅ²p¢½¾¯Ü·B';
+  $lang['step1_err_copy'] = 'nCtÌÔÌeLXgð"include/mysql.inc.php"ÉRs[µÄ­¾³¢B(x : mysql.inc.phpÉÍÂFÌªÌÝðRs[µÄ­¾³¢BüsR[hâXy[XðüêÈ¢Å­¾³¢B)';
+  $lang['permuser_only_private'] = 'vCx[gJeSÌÝ\¦³êÄ¢Ü·';
+  $lang['waiting_update'] = 'Ê^f[^x[XÌXVãÍA³íÈÊ^ÌÝ\¦³êÜ·';
+  $lang['conf_upload_available_info'] = 'EFuTCgÌJeSÉ[UªÊ^ðAbv[h·éêAÂªKv([gT[oÅÍ³­)B±êÍSÌÉÖW·ép[^Å·BftHgÅÍAbv[hÂ\ÈJeSÍ èÜ¹ñÌÅAJeSÉAbv[hðÂ·éKvª èÜ·B';
+  $lang['install_help'] = 'wvªKvÅ·©? <a href="http://forum.phpwebgallery.net">PhpWebGallerybZ[W{[h</a>Å¿âµÄ­¾³¢B';
+  $lang['install_warning'] = '"admin/install.php"ª¶ÝµÄ¢Ü·BZL
+eBãÀSÅÍ èÜ¹ñÌÅT[oæèíµÄ­¾³¢B';
+  // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'This category is unknown in the database';
+}
+?>
Index: /branches/1.3/language/magyar.php
===================================================================
--- /branches/1.3/language/magyar.php	(revision 3252)
+++ /branches/1.3/language/magyar.php	(revision 3252)
@@ -0,0 +1,556 @@
+<?php
+/***************************************************************************
+ *                                magyar.php                               *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Béla Márkus <mbl@freemail.hu>                         *
+ *   version       : 1.00                                                  *
+ *   date          : 25/10/2003                                            *
+ *                                                                         *
+ *   notes         : Hungarian language file                               *
+ *                 :                                                       *
+ *                 : Only messages are relevant to users are translated;   *
+ *                 : administrator texts are kept English for the moment   *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+$lang['only_members'] = 'Az oldal csak regisztrált tagok számára érhetõ el';
+$lang['invalid_pwd'] = 'Érvénytelen jelszó!';
+$lang['access_forbiden'] = 'Nem vagy jogosult ennek az oldalna a megtekintésére';
+$lang['submit'] = 'Küldés';
+$lang['login'] = 'bejelentkezés';
+$lang['password'] = 'jelszó';
+$lang['new'] = 'új';
+$lang['delete'] = 'töröl';
+$lang['category'] = 'kategória';
+$lang['thumbnail'] = 'bélyegkép';
+$lang['date'] = 'dátum';
+$lang['diapo_default_page_title'] = 'Nincs kiválasztott kategória';
+$lang['thumbnails'] = 'Bélyegképek';
+$lang['categories'] = 'Kategóriák';
+$lang['hint_category'] = 'a kategória gyökerében lévõ képek megtekintése';
+$lang['total_images'] = 'összes';
+$lang['title_menu'] = 'Menü';
+$lang['change_login'] = 'belépés más néven';
+$lang['login'] = 'bejelentkezés';
+$lang['hint_login'] = 'bejelentkezés után testreszabhatod a program megjelenését';
+$lang['logout'] = 'kilépés';
+$lang['customize'] = 'testreszabás';
+$lang['hint_customize'] = 'a képtár megjelenésének testreszabása';
+$lang['hint_search'] = 'keresés';
+$lang['search'] = 'keresés';
+$lang['favorite_cat'] = 'kedvencek';
+$lang['favorite_cat_hint'] = 'kedvencek listázása';
+$lang['about'] = 'a programról';
+$lang['hint_about'] = 'további információk a PhpWebGallery-rõl';
+$lang['admin'] = 'rendszergazda';
+$lang['hint_admin'] = 'csak rendszergazdák számára érhetõ el';
+$lang['no_category'] = 'Nincs kiválasztott kategória<br />válassz ki egyet a menüben';
+$lang['page_number'] = 'oldal';
+$lang['previous_page'] = 'Elõzõ';
+$lang['next_page'] = 'Következõ';
+$lang['nb_image_category'] = 'Képek száma ebben a kategóriában';
+$lang['recent_image'] = '';
+$lang['days'] = 'napnál frissebb kép';
+$lang['send_mail'] = 'Véleményed van? Küldj email-t';
+$lang['title_send_mail'] = 'A comment on your site';
+$lang['sub-cat'] = 'alkategóriák';
+$lang['images_available'] = 'kép ebben a kategóriában';
+$lang['total'] = 'kép';
+$lang['upload_picture'] = 'Kép feltöltés';
+$lang['registration_date'] = 'regisztrálva';
+$lang['creation_date'] = 'létrehozva';
+$lang['comment'] = 'megjegyzés';
+$lang['author'] = 'szerzõ';
+$lang['size'] = 'méret';
+$lang['filesize'] = 'hossz';
+$lang['file'] = 'fájl';
+$lang['generation_time'] = 'Lap létrehozás ideje';
+$lang['favorites'] = 'Kedvencek';
+$lang['search_result'] = 'A keresés eredménye';
+$lang['about_page_title'] = 'A PhpWebGallery-ról';
+$lang['about_title'] = 'A programról';
+$lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Információ a PhpWebGallery-rõl</div>
+<ul>
+  <li>Ez az oldal a <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> '.$conf['version'].'-as verziót használja. A PhpWebGallery egy olyan web-es alkalmazás, mely on-line képtárak egyszerû létrehozását teszi lehetõvé.</li>
+  <li>A PhpWebGallery teljesen PHP-ben (az elePHPant) íródott és a MySQL (SQuirreL) adatbázis kezelõt használja.</li>
+  <li>Ha bármilyen javaslatod vagy megjegyzésed van, látogasd meg a <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> címet, és a hozzá tartozó <a href="'.$conf['forum_url'].'" style="text-decoration:underline">fórum</a>-ot.</li>
+</ul>';
+$lang['about_return'] = 'Vissza';
+$lang['ident_page_title'] = 'Azonosítás';
+$lang['ident_title'] = 'Azonosítás';
+$lang['ident_register'] = 'Regisztrálás';
+$lang['ident_forgotten_password'] = 'Elfelejtetted a jelszót ?';
+$lang['ident_guest_visit'] = 'A képtár megtekintése vendégként';
+$lang['customize_page_title'] = 'Testreszabás';
+$lang['customize_title'] = 'Testreszabás';
+$lang['customize_nb_image_per_row'] = 'kép soronként';
+$lang['customize_nb_row_per_page'] = 'sor oldalanként';
+$lang['customize_language'] = 'nyelv';
+$lang['maxwidth'] = 'legnagyobb kép szélesség';
+$lang['maxheight'] = 'legnagyobb kép magasság';
+$lang['err_maxwidth'] = 'a legnagyobb szélességnek 50-nél többnek kell lennie';
+$lang['err_maxheight'] = 'a legnagyobb magasságnak 50-nél többnek kell lennie';
+$lang['previous_image'] = 'Elõzõ';
+$lang['next_image'] = 'Következõ';
+$lang['back'] = 'Kattints a képre, ha vissza akarsz térni a bélyegképekhez';
+$lang['info_image_title'] = 'Kép információ';
+$lang['link_info_image'] = 'Információ módosítása';
+$lang['true_size'] = 'Valódi méret';
+$lang['comments_title'] = 'megjegyzés a látogatóktól';
+$lang['comments_del'] = 'megjegyzés törlése';
+$lang['comments_add'] = 'Megjegyzés hozzáadása';
+$lang['month'][1] = 'Január';
+$lang['month'][2] = 'Február';
+$lang['month'][3] = 'Március';
+$lang['month'][4] = 'Április';
+$lang['month'][5] = 'Május';
+$lang['month'][6] = 'Június';
+$lang['month'][7] = 'Július';
+$lang['month'][8] = 'Augusztus';
+$lang['month'][9] = 'Szeptember';
+$lang['month'][10] = 'Október';
+$lang['month'][11] = 'November';
+$lang['month'][12] = 'December';
+$lang['day'][0] = 'Vasárnap';
+$lang['day'][1] = 'Hétfõ';
+$lang['day'][2] = 'Kedd';
+$lang['day'][3] = 'Szerda';
+$lang['day'][4] = 'Csütörtök';
+$lang['day'][5] = 'Péntek';
+$lang['day'][6] = 'Szombat';
+$lang['add_favorites_alt'] = 'Hozzáadás a kedvencekhez';
+$lang['add_favorites_hint'] = 'Ennek a képnek a hozzáadása a kedvencekhez';
+$lang['del_favorites_alt'] = 'Törlés a kedvencekbõl';
+$lang['del_favorites_hint'] = 'Ennek a képnek a törlése a kedvencek közül';
+$lang['register_page_title'] = 'Regisztrálás';
+$lang['register_title'] = 'Regisztrálás';
+$lang['reg_err_login1'] = 'Jelentkezz be';
+$lang['reg_err_login2'] = 'a név nem végzõdhet szóközzel';
+$lang['reg_err_login3'] = 'a név nem kezdõdhet szóközzel';
+$lang['reg_err_login4'] = 'a név nem tartalmazhat " és \' karaktereket';
+$lang['reg_err_login5'] = 'ez a név már foglalt';
+$lang['reg_err_pass'] = 'ismételd meg a jelszót';
+$lang['reg_confirm'] = 'megerõsítés';
+$lang['reg_err_mail_address'] = 'a levelezési cím xxx@yyy.eee formájú legyen(example : jack@altern.org)';
+$lang['search_title'] = 'Keresés';
+$lang['invalid_search'] = 'keresésnél legalább 3 karaktert kell megadni';
+$lang['search_field_search'] = 'Keresés';
+$lang['search_return_main_page'] = 'Visszatérés a bélyegképekhez';
+$lang['upload_forbidden'] = 'Nem tölthetõ fel kép ebbe a kategóriába';
+$lang['upload_file_exists'] = 'Ilyen néven már van kép';
+$lang['upload_filenotfound'] = 'Meg kell adni a fájl formátumot';
+$lang['upload_cannot_upload'] = 'nem tölthetõ fel a kép a szerverre';
+$lang['upload_title'] = 'Kép feltöltése';
+$lang['upload_advise'] = 'Válaszd ki a feltöltendõ képet ebbe a kategóriába: ';
+$lang['upload_advise_thumbnail'] = 'Nem kötelezõ, de javasolt : válaszd ki a bélyegképet ';
+$lang['upload_advise_filesize'] = 'a file legnagyobb megengedett mérete : ';
+$lang['upload_advise_width'] = 'a kép legnagyobb megengedett szélessége : ';
+$lang['upload_advise_height'] = 'a kép legnagyobb megengedett magassága : ';
+$lang['upload_advise_filetype'] = 'a képnek jpg, gif vagy png formátumúnak kell lennie';
+$lang['upload_err_username'] = 'meg kell adni a felhasználói nevet';
+$lang['upload_username'] = 'Felhasználói név';
+$lang['upload_successful'] = 'A kép feltöltésre került; a rendszergazda hamarosan engedélyezni fogja';
+// new or modified in release 1.3
+$lang['charset'] = 'iso-8859-2';
+$lang['no'] = 'nem';
+$lang['yes'] = 'igen';
+$lang['guest'] = 'vendég';
+$lang['mail_address'] = 'email cím';
+$lang['public'] = 'nyílvános';
+$lang['private'] = 'privát';
+$lang['add'] = 'hozzáadás';
+$lang['dissociate'] = 'szétválasztás';
+$lang['mandatory'] = 'kötelezõ';
+$lang['err_date'] = 'hibás dátum';
+$lang['picture'] = 'kép';
+$lang['IP'] = 'IP';
+$lang['close'] = 'bezárás';
+$lang['open'] = 'megnyitás';
+$lang['keywords'] = 'kulcsszavak';
+$lang['errors_title'] = 'Hiba';
+$lang['infos_title'] = 'Információk';
+$lang['default'] = 'alapértelmezett';
+$lang['comments'] = 'megjegyzés';
+$lang['category_representative'] = 'representative';
+$lang['stats'] = 'statisztikák';
+$lang['most_visited_cat_hint'] = 'legtöbbet nézett képek';
+$lang['most_visited_cat'] = 'legtöbbet nézett';
+$lang['best_rated_cat_hint'] = 'legjobbnak minõsített képek listázása';
+$lang['best_rated_cat'] = 'legjobbnak minõsített';
+$lang['recent_cat_hint'] = 'legújabb képek listázása';
+$lang['recent_cat'] = 'legújabbak';
+$lang['recent_cat_title'] = 'Legújabb képek';
+$lang['visited'] = 'megtekintve';
+$lang['times'] = 'alkalommal';
+$lang['customize_theme'] = 'téma';
+$lang['customize_expand'] = 'valamennyi kategória kibontása';
+$lang['customize_show_nb_comments'] = 'megjegyzés szám';
+$lang['customize_short_period'] = 'rövid periódus';
+$lang['customize_long_period'] = 'hosszú periódus';
+$lang['customize_template'] = 'téma';
+$lang['err_periods'] = 'a periódusnak egész számnak kell lennie';
+$lang['err_periods_2'] = 'a periódusnak nullánál nagyobbnak kell lennie. A hosszú periódusnak a rövidnél nagyobbnak kell lennie.';
+$lang['create_cookie'] = 'süti létrehozása';
+$lang['customize_day'] = 'nap';
+$lang['customize_week'] = 'hét';
+$lang['customize_month'] = 'hónap';
+$lang['customize_year'] = 'év';
+$lang['slideshow'] = 'diavetítés';
+$lang['period_seconds'] = 'másodperc képenként';
+$lang['slideshow_stop'] = 'diavetítés leállítása';
+$lang['comment_added'] = 'A megjegyzésed rögzítve lett';
+$lang['comment_to_validate'] = 'A rendszergazdának engedélyeznie kell, mielõtt megjelenik';
+$lang['comment_anti-flood'] = 'Várj egy kicsit az újabb megjegyzés beírásával';
+$lang['comment_user_exists'] = 'Ezt a nevet már valaki használja';
+$lang['invalid_search'] = 'A keresett szavaknak 3 karakternél hosszabbnak kell lenniük és nem tartalmazhatnak írásjeleket';
+$lang['search_mode_or'] = 'legalább egy szó';
+$lang['search_mode_and'] = 'összes szó';
+$lang['search_comments'] = 'válaszd el a szavakat szóközzel';
+$lang['upload_name'] = 'Kép neve';
+$lang['upload_author'] = 'Szerzõ (pl. "Pierrick LE GALL")';
+$lang['upload_creation_date'] = 'Létrehozás dátuma (NN/HH/ÉÉÉÉ)';
+$lang['upload_comment'] = 'Megjegyzés';
+$lang['mail_hello'] = 'Szia,';
+$lang['mail_new_upload_subject'] = 'Új kép van az oldalon.';
+$lang['mail_new_upload_content'] = 'Új kép került feltöltésre és a jóváhagyásodra vár. Engedélyezheted vagy törölheted a rendszergazdai menüben.';
+$lang['mail_new_comment_subject'] = 'Új megjegyzés van az oldalon.';
+$lang['mail_new_comment_content'] = 'Új megjegyzés került rögzítésre. Ahhoz, hogy látható legyen, elõször engedélyezned kell a rendszergazdai menüben';
+$lang['connected_user'] = 'felhasználó';
+$lang['title_comments'] = 'A felhasználók megjegyzései';
+$lang['stats_last_days'] = 'napon';
+$lang['hint_comments'] = 'Legutóbbi megjegyzések';
+$lang['menu_login'] = 'belépés';
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+  $lang['title_liste_users'] = 'Users list';
+  $lang['title_history'] = 'History';
+  $lang['title_update'] = 'Database update';
+  $lang['title_configuration'] = 'PhpWebGallery configuration';
+  $lang['title_instructions'] = 'Instructions';
+  $lang['title_categories'] = 'Categories management';
+  $lang['title_edit_cat'] = 'Edit a category';
+  $lang['title_info_images'] = 'Modify category\'s image information';
+  $lang['title_thumbnails'] = 'Thumbnail creation';
+  $lang['title_thumbnails_2'] = 'for';
+  $lang['title_default'] = 'PhpWebGallery administration';
+  $lang['menu_title'] = 'Administration';
+  $lang['menu_config'] = 'Configuration';
+  $lang['menu_users'] = 'Users';
+  $lang['menu_add_user'] = 'add';
+  $lang['menu_list_user'] = 'list';
+  $lang['menu_categories'] = 'Categories';
+  $lang['menu_update'] = 'Database update';
+  $lang['menu_thumbnails'] = 'Thumbnails';
+  $lang['menu_history'] = 'History';
+  $lang['menu_instructions'] = 'Instructions';
+  $lang['menu_back'] = 'Back to galleries';
+  $lang['title_waiting'] = 'Pictures waiting for validation';
+  $lang['menu_waiting'] = 'Waiting';
+  $lang['default_message'] = 'PhpWebGallery administration panel';
+  $lang['conf_err_prefixe'] = 'thumbnail\'s prefix mustn\'t contain any accentued character';
+  $lang['conf_err_mail'] = 'e-mail address refused, it must be like name@server.com';
+  $lang['conf_err_sid_size'] = 'the session identifier size must be an integer value between 4 and 50';
+  $lang['conf_err_sid_time'] = 'the session time must be an integer value between 5 and 60';
+  $lang['conf_err_max_user_listbox'] = 'the max user listbox number must be an integer value between 0 and 255';
+  $lang['conf_confirmation'] = 'Information data registered in database';
+  $lang['conf_general_title'] = 'Main configuration';
+  $lang['conf_general_webmaster'] = 'webmaster login';
+  $lang['conf_general_webmaster_info'] = 'It will be shown to the visitors. It is necessary for website administration';
+  $lang['conf_general_mail'] = 'webmaster mail adress';
+  $lang['conf_general_mail_info'] = 'Visitors will be able to contact by this mail';
+  $lang['conf_general_prefix'] = 'thumbnail prefix';
+  $lang['conf_general_prefix_info'] = 'Thumbnails use this prefix. Do not fill if your not sure.';
+  $lang['conf_general_access'] = 'access type';
+  $lang['conf_general_access_1'] = 'free';
+  $lang['conf_general_access_2'] = 'restricted';
+  $lang['conf_general_access_info'] = '- free : anyone can enter the site, any visitor can create an account in order to customize the appareance of the website<br />- restricted : the webmaster create accounts. Only registered users can enter the site';
+  $lang['conf_general_max_user_listbox'] = 'max listbox users number';
+  $lang['conf_general_max_user_listbox_info'] = '- this is the number maximum of users for which PhpWebGallery display a listbox instead of a simple text box on the identification page<br />- enter a number between 0 and 255, 0 means that you want to display the listbox';
+  $lang['conf_comments'] = 'users comments';
+  $lang['conf_comments_title'] = 'Configuration of '.$lang['conf_comments'];
+  $lang['conf_comments_show_comments'] = $lang['conf_comments'];
+  $lang['conf_comments_show_comments_info'] = 'display the users comments under each picture ?';
+  $lang['conf_comments_comments_number'] = 'number of comments per page';
+  $lang['conf_comments_comments_number_info'] = 'number of comments to display on each page. This number is unlimited for a picture. Enter a number between 5 and 50.';
+  $lang['conf_err_comment_number'] = 'The number of comments a page must be between 5 and 50 included.';
+  $lang['conf_remote_site_delete_info'] = 'Deleting a remote server will delete all the image and the categories in relation with this server.';
+  $lang['conf_upload_title'] = 'Configuration of the users upload';
+  $lang['conf_upload_available'] = 'authorized the upload of pictures';
+  $lang['conf_upload_maxfilesize'] = 'maximum filesize';
+  $lang['conf_upload_maxfilesize_info'] = 'Maximum filesize for the uploaded pictures. Must be a number between 10 and 1000 KB.';
+  $lang['conf_err_upload_maxfilesize'] = 'Maximum filesize for the uploaded pictures must be a number between 10 and 1000 KB.';
+  $lang['conf_upload_maxwidth'] = 'maximum width';
+  $lang['conf_upload_maxwidth_info'] = 'Maximum width authorized for the uploaded images. Must be a number superior to 10 pixels';
+  $lang['conf_err_upload_maxwidth'] = 'maximum width authorized for the uploaded images must be a number superior to 10 pixels.';
+  $lang['conf_upload_maxheight'] = 'maximum height';
+  $lang['conf_upload_maxheight_info'] = 'Maximum height authorized for the uploaded images. Must be a number superior to 10 pixels';
+  $lang['conf_err_upload_maxwidth'] = 'maximum height authorized for the uploaded images must be a number superior to 10 pixels.';
+  $lang['conf_upload_maxwidth_thumbnail'] = 'thumbnails maximum width';
+  $lang['conf_upload_maxwidth_thumbnail_info'] = 'Maximum width authorized for the uploaded thumbnails. Must be a number superior to 10 pixels';
+  $lang['conf_err_upload_maxwidth_thumbnail'] = 'Maximum width authorized for the uploaded thumbnails must be a number superior to 10 pixels.';
+  $lang['conf_upload_maxheight_thumbnail'] = 'thumbnails maximum height';
+  $lang['conf_upload_maxheight_thumbnail_info'] = 'Maximum height authorized for the uploaded thumbnails. Must be a number superior to 10 pixels';
+  $lang['conf_err_upload_maxheight_thumbnail'] = 'Maximum height authorized for the uploaded thumbnails must be a number superior to 10 pixels.';
+  $lang['conf_default_title'] = 'Default display properties for unregistered visitors and new accounts';
+  $lang['conf_default_language_info'] = 'default language';
+  $lang['conf_default_theme_info'] = 'default theme';
+  $lang['conf_session_title'] = 'Sessions configuration';
+  $lang['conf_session_size'] = 'identifier size';
+  $lang['conf_session_size_info'] = '- the longer your identifier is, the more secure your site is<br />- enter a number between 4 and 50';
+  $lang['conf_session_time'] = 'validity period';
+  $lang['conf_session_time_info'] = '- the shorter the validity period is, the more secure your site is<br />- enter a number between 5 and 60, in minutes';
+  $lang['conf_session_key'] = 'keyword';
+  $lang['conf_session_key_info'] = '- the session keyword improve the encoding of the session identifier<br />- enter any sentence shorter than 255 caracters';
+  $lang['conf_session_delete'] = 'delete out-of-date sessions';
+  $lang['conf_session_delete_info'] = 'it is recommanded to empty the database table of session, because out-of-date sessions remains in the database (but it doesn\'t make any security trouble)';
+  $lang['user_err_modify'] = 'This user can\'t be modified or deleted';
+  $lang['user_err_unknown'] = 'This user doesn\'t exist in the database';
+  $lang['adduser_info_message'] = 'Informations registered in the database for user ';
+  $lang['adduser_info_password_updated'] = '(password updated)';
+  $lang['adduser_info_back'] = 'back to the users list';
+  $lang['adduser_fill_form'] = 'Please fill the following form';
+  $lang['adduser_unmodify'] = 'unmodifiable';
+  $lang['adduser_status'] = 'status';
+  $lang['adduser_status_admin'] = 'admin';
+  $lang['adduser_status_guest'] = 'guest';
+  $lang['permuser_info_message'] = 'Permissions registered';
+  $lang['permuser_title'] = 'Restrictions for user';
+  $lang['permuser_warning'] = 'Warning : a "<span style="font-weight:bold;">forbidden access</span>" to the root of a category prevent from accessing the whole category';
+  $lang['permuser_authorized'] = 'authorized';
+  $lang['permuser_forbidden'] = 'forbidden';
+  $lang['permuser_parent_forbidden'] = 'parent category forbidden';
+  $lang['listuser_confirm'] = 'Do you really want to delete this user';
+  $lang['listuser_info_deletion'] = 'was removed from database';
+  $lang['listuser_user_group'] = 'Users group';
+  $lang['listuser_modify'] = 'modify';
+  $lang['listuser_modify_hint'] = 'modify informations of';
+  $lang['listuser_permission'] = 'permissions';
+  $lang['listuser_permission_hint'] = 'modify permissions of';
+  $lang['listuser_delete'] = 'delete';
+  $lang['listuser_delete_hint'] = 'delete user';
+  $lang['listuser_button_all'] = 'all';
+  $lang['listuser_button_invert'] = 'invert';
+  $lang['listuser_button_create_address'] = 'create mail address';
+  $lang['cat_invisible'] = 'invisible';
+  $lang['cat_edit'] = 'Edit';
+  $lang['cat_up'] = 'Move up';
+  $lang['cat_down'] = 'Move down';
+  $lang['cat_image_info'] = 'Images info';
+  $lang['cat_total'] = 'total';
+  $lang['editcat_confirm'] = 'Information registered in the database';
+  $lang['editcat_back'] = 'categories';
+  $lang['editcat_title1'] = 'Options for the';
+  $lang['editcat_name'] = 'Name';
+  $lang['editcat_comment'] = 'Comment';
+  $lang['editcat_status'] = 'Status';
+  $lang['infoimage_general'] = 'General options for the category';
+  $lang['infoimage_useforall'] = 'use for all pictures ?';
+  $lang['infoimage_creation_date'] = 'creation date';
+  $lang['infoimage_detailed'] = 'Option for each picture';
+  $lang['infoimage_title'] = 'title';
+  $lang['infoimage_comment'] = 'comment';
+  $lang['update_missing_tn'] = 'the thumbnail is missing for';
+  $lang['update_disappeared_tn'] = 'the thumbnail disapeared';
+  $lang['update_disappeared'] = 'doesn\'t exist';
+  $lang['update_part_deletion'] = 'Deletion of images that have no thumbnail or that doesn\'t exist';
+  $lang['update_deletion_conclusion'] = 'pictures removed from database';
+  $lang['update_part_research'] = 'Search for new images in the directories';
+  $lang['update_research_added'] = 'added';
+  $lang['update_research_tn_ext'] = 'thumbnail in';
+  $lang['update_research_conclusion'] = 'pictures added to the database';
+  $lang['update_default_title'] = 'Choose an option';
+  $lang['update_only_cat'] = 'update categories, not pictures';
+  $lang['update_all'] = 'update all';
+  $lang['tn_width'] = 'width';
+  $lang['tn_height'] = 'height';
+  $lang['tn_no_support'] = 'Picture unreachable or no support';
+  $lang['tn_format'] = 'for the file format';
+  $lang['tn_thisformat'] = 'for this file format';
+  $lang['tn_err_width'] = 'width must be a number superior to';
+  $lang['tn_err_height'] = 'height must be a number superior to';
+  $lang['tn_results_title'] = 'Results of miniaturization';
+  $lang['tn_picture'] = 'picture';
+  $lang['tn_results_gen_time'] = 'generated in';
+  $lang['tn_stats'] = 'General statistics';
+  $lang['tn_stats_nb'] = 'number of miniaturized pictures';
+  $lang['tn_stats_total'] = 'total time';
+  $lang['tn_stats_max'] = 'max time';
+  $lang['tn_stats_min'] = 'min time';
+  $lang['tn_stats_mean'] = 'average time';
+  $lang['tn_err'] = 'You made mistakes';
+  $lang['tn_params_title'] = 'Miniaturization parameters';
+  $lang['tn_params_GD'] = 'GD version';
+  $lang['tn_params_GD_info'] = '- GD is the picture manipulating library for PHP<br />-choose the version installed on your server. If you choose the wrong, you\'ll just have errors messages, come back with your browser and choose the other version. If no version works, it means your server doesn\'t support GD.';
+  $lang['tn_params_width_info'] = 'maximum width that thumbnails can take';
+  $lang['tn_params_height_info'] = 'maximum height that thumbnails can take';
+  $lang['tn_params_create'] = 'create';
+  $lang['tn_params_create_info'] = 'Do not try to miniaturize too many pictures in the same time.<br />Indeed, miniaturization uses a lot of CPU. If you installed PhpWebGallery on a free provider, a too high CPU load can sometime lead to the deletion of your website.';
+  $lang['tn_params_format'] = 'file format';
+  $lang['tn_params_format_info'] = 'only jpeg file format is supported for thumbnail creation';
+  $lang['tn_alone_title'] = 'pictures without thumbnail (jpeg and png only)';
+  $lang['tn_dirs_title'] = 'Directories list';
+  $lang['tn_dirs_alone'] = 'pictures without thumbnail';
+  $lang['help_images_title'] = 'Adding pictures';
+  $lang['help_images_intro'] = 'How to place pictures in your directories';
+  $lang['help_images'][0] = 'in the directory "galleries", create directories that will represent your categories';
+  $lang['help_images'][1] = 'in each directory, you can create as many sub-level directories as you wish.';
+  $lang['help_images'][2] = 'you can create as many categories and sub-categories for each category as you wish';
+  $lang['help_images'][3] = 'picture files must have jpeg format (extension jpg or JPG), gif format (extension gif or GIF) or png format (extension png or PNG).';
+  $lang['help_images'][4] = 'try not to use blank space " " or hyphen "-" in picture files, I advise you to use underscore "_" character which is managed by PhpWebGallery and will provide better results';
+  $lang['help_thumbnails_title'] = 'Thumbnails';
+  $lang['help_thumbnails'][0] = 'in each directory containing picture to display on your site, there is a sub-directory nammed "thumbnail", if it doesn\'t exist, create it to place your thumbnails into it.';
+  $lang['help_thumbnails'][1] = 'thumbnails don\'t need to have the same extension as their associated picture (a picture with .jpg extension can have a thumbnail in .GIF extention for instance).';
+  $lang['help_thumbnails'][2] = 'the thumbnail associated to a picture must be prefixed with the prefix given on the configuration page(image.jpg -> TN_image.GIF for instance).';
+  $lang['help_thumbnails'][3] = 'I advise you to use the module for windows downloadable on the presentation site of PhpWebGallery for thumbnails management.';
+  $lang['help_thumbnails'][4] = 'you can use the thumbnail creation page integrated in PhpWebGallery, but I don\'t advice you so, because thumbnail quality may be poor and it uses a high CPU load which can be a problem if you use free web hosting.';
+  $lang['help_thumbnails'][5] = 'if you choose to use your hosting provider to create thumbnails, you must give 775 rights on "galleries" folder and all its sub-folders.';
+  $lang['help_database_title'] = 'Updating database';
+  $lang['help_database'][0] = 'once pictures files and thumbnails correctly placed in the directories, clic on "database update" in the menu of the administration panel.';
+  $lang['help_infos_title'] = 'Miscellanous informations';
+  $lang['help_infos'][1] = 'As soon as you created your gallery, go in the user list and modify permissions for user "visiteur". Indeed, every new registered users will have by default the same permissions as "visiteur" user.';
+  $lang['help_remote_title'] = 'Remote site';
+  $lang['help_remote'][0] = 'PhpWebGallery offers the possibility to use several servers to store the images which will compose your gallery. It can be useful if your gallery is installed on one limited space and that you have a big quantity of images to be shown. Please , follow this procedure : ';
+  $lang['help_remote'][1] = '1. edit file "create_listing_file.php" (you will find it in the directory "admin"), by modifying the line "$prefix_thumbnail = "TN-";" if the prefix for your thumbnails is not "TN-".';
+  $lang['help_remote'][2] = '2. place file "create_listing_file.php" modified on your distant website, in the root directory of your directories of images  (as the directory "galleries" of this website) by ftp.';
+  $lang['help_remote'][3] = '3. launch script using the url http://domaineDistant/repGalerie/create_listing_file.php, a file listing.xml has just been created.';
+  $lang['help_remote'][4] = '4. get back file listing.xml from your distant website to place it in directory "admin" of this website.';
+  $lang['help_remote'][5] = '5. please , launch an update of the data of images by the interface of administration, once the listing.xml used file, kill it from the directory "admin".';
+  $lang['help_remote'][6] = 'You can update the contents of a distant website by redoing the described manipulation. You can also kill a distant website by choosing the option in the configuration section of the administration panel.';
+  $lang['help_upload_title'] = 'Added images by users';
+  $lang['help_upload'][0] = 'PhpWebGallery offers the possibility for users to upload images. in order to do it :';
+  $lang['help_upload'][1] = '1. authorize the option in the configuration zone of the administration panel';
+  $lang['help_upload'][2] = '2. authorize the rights in writing in the images directories';
+  $lang['install_message'] = 'Message';
+  $lang['step1_confirmation'] = 'Parameters are correct';
+  $lang['step1_err_db'] = 'Connection to server succeed, but it was impossible to connect to database';
+  $lang['step1_err_server'] = 'Can\'t connect to server';
+  $lang['step1_err_copy_2'] = 'The next step of the installation is now possible';
+  $lang['step1_err_copy_next'] = 'next step';
+  $lang['step1_title'] = 'Step 1/2';
+  $lang['step1_host'] = 'MySQL host';
+  $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
+  $lang['step1_user'] = 'user';
+  $lang['step1_user_info'] = 'user login given by your host provider';
+  $lang['step1_pass'] = 'Password';
+  $lang['step1_pass_info'] = 'user password given by your host provider';
+  $lang['step1_database'] = 'Database name';
+  $lang['step1_database_info'] = 'also given by your host provider';
+  $lang['step1_prefix'] = 'Database table prefix';
+  $lang['step1_prefix_info'] = 'database tables names will be prefixed with it (enables you to manage better your tables)';
+  $lang['step2_err_login1'] = 'enter a login for webmaster';
+  $lang['step2_err_login3'] = 'webmaster login can\'t contain characters \' or "';
+  $lang['step2_err_pass'] = 'please enter your password again';
+  $lang['step2_err_mail'] = $lang['conf_err_mail'];
+  $lang['install_end_title'] = 'Installation finished';
+  $lang['install_end_message'] = 'The configuration of PhpWebGallery is finished, here is the next step<br /><br />
+For security reason, please delete file "install.php" in the directory "admin"<br />
+Once this file deleted , follow this instructions :
+<ul>
+  <li>go to the identification page : [ <a href="../identification.php">identification</a> ] and use the login/password given for webmaster</li>
+  <li>this login will enable you to access to the [ <a href="admin.php">administration panel</a> ] and to the instructions in order to place pictures in your directories</li>
+</ul>';
+  $lang['step2_title'] = 'Step 2/2';
+  $lang['step2_pwd'] = 'webmaster password';
+  $lang['step2_pwd_info'] = 'Keep it confidential, it enables you to access administration panel';
+  $lang['step2_pwd_conf'] = 'confirm password';
+  $lang['step2_pwd_conf_info'] = 'verification';
+  // new or modified in release 1.3
+  $lang['remote_site'] = 'Remote site';
+  $lang['title_add'] = 'Add a user';
+  $lang['title_modify'] = 'Modify a user';
+  $lang['title_groups'] = 'Groups management';
+  $lang['title_user_perm'] = 'Modify permission for user';
+  $lang['title_cat_perm'] = 'Modify permissions for category';
+  $lang['title_group_perm'] = 'Modify permissions for group';
+  $lang['title_picmod'] = 'Modify informations about a picture';
+  $lang['menu_groups'] = 'Groups';
+  $lang['menu_comments'] = 'Comments';
+  $lang['conf_general_log'] = 'history';
+  $lang['conf_general_log_info'] = 'Keep an history of visits on your website ? Visits will be shown in the history section of the administration panel';
+  $lang['conf_general_mail_notification'] = 'Mail notification';
+  $lang['conf_general_mail_notification_info'] = 'Automated mail notification for adminsitrators (and only for them) when a user add a comment or upload a picture.';
+  $lang['conf_comments_validation'] = 'validation';
+  $lang['conf_comments_validation_info'] = 'An administrator validate users posted comments before the becom visible on the site';
+  $lang['conf_comments_forall'] = 'for all ?';
+  $lang['conf_comments_forall_info'] = 'Even guest not registered can post comments';
+  $lang['conf_default_nb_image_per_row_info'] = 'number of pictures for each row by default';
+  $lang['conf_default_nb_row_per_page_info'] = 'number of rows by page by default';
+  $lang['conf_default_short_period_info'] = 'By days. Period within a picture is shown with a red mark. The short period must be superior to 1 day.';
+  $lang['conf_default_long_period_info'] = 'By days. Period within a picture is shown with a green mark. The long period must be superior to the short period.';
+  $lang['conf_default_expand_info'] = 'expand all categories by default in the menu ?';
+  $lang['conf_default_show_nb_comments_info'] = 'show the number of comments for each picture on the thumbnails page';
+  $lang['conf_default_maxwidth_info'] = 'Maximum width for display pictures : picture will have a new width only for display, picture files won\'t be changed. Let empty if you don\'t wish to have a limit.';
+  $lang['conf_default_maxheight_info'] = 'Just as the maximum width, but for the height';
+  $lang['conf_session_cookie'] = 'authorize cookies';
+  $lang['conf_session_cookie_info'] = 'users won\'t have to log on each visit any more. Less secure.';
+  $lang['adduser_associate'] = 'Associate to group';
+  $lang['group_add'] = 'Add a group';
+  $lang['group_add_error1'] = 'The name of a group must not contain " or \'';
+  $lang['group_add_error2'] = 'This name is already used by another group';
+  $lang['group_confirm'] = 'Are you sure you want to remove this group ?';
+  $lang['group_list_title'] = 'List of existing groups';
+  $lang['group_err_unknown'] = 'This group doesn\'t exist in the database';
+  $lang['cat_permission'] = 'permissions';
+  $lang['cat_update'] = 'update';
+  $lang['cat_add'] = 'Add a virtual category';
+  $lang['cat_parent'] = 'parent category';
+  $lang['cat_error_name'] = 'The name of a category mustn\'t be empty';
+  $lang['cat_virtual'] = 'virtual';
+  $lang['cat_first'] = 'Move first';
+  $lang['cat_last'] = 'Move last';
+  $lang['editcat_visible_info'] = '(invisible but for administrators)';
+  $lang['editcat_visible'] = 'Visible';
+  $lang['editcat_uploadable'] = 'Upload available';
+  $lang['infoimage_keyword_separation'] = '(separate with coma ",")';
+  $lang['infoimage_addtoall'] = 'add to all';
+  $lang['infoimage_removefromall'] = 'remove from all';
+  $lang['infoimage_associate'] = 'Associate to the category';
+  $lang['update_wrong_dirname'] = 'The name of directories and files must be composed of letters, figures, "-", "_" or "."';
+  $lang['stats_pages_seen'] = 'pages seen';
+  $lang['stats_visitors'] = 'guests';
+  $lang['stats_empty'] = 'empty history';
+  $lang['stats_pages_seen_graph_title'] = 'Number of pages seen by day';
+  $lang['stats_visitors_graph_title'] = 'Number of guests by day';
+  $lang['comments_last_title'] = 'Last comments';
+  $lang['comments_non_validated_title'] = 'Comments waiting for validation';
+  $lang['help_database'][1] = 'In order to avoid the update of too many pictures in a single update, I advise to start by updating only categories, then on the categories section of the administration panel, update each category thanks to the link "update"';
+  $lang['help_upload'][3] = 'The category must have upload available itself for upload.';
+  $lang['help_upload'][4] = 'Uploaded images by the users are not directly visible on the website, they must be validated by an administrator.  For that purpose, an administrator must go on the page "en attente" of the administration panel, to validate or to refuse the images proposed, then launch an update of the images data.';
+  $lang['help_virtual_title'] = 'Links between pictures and categories and virtual categories';
+  $lang['help_virtual'][0] = 'PhpWebGallery is able to dissociate categories where pictures are stored and categories where pictures are shown.';
+  $lang['help_virtual'][1] = 'By default, pictures are shown only in their real categories : the ones corresponding to directories on the web server.';
+  $lang['help_virtual'][2] = 'To link a picture to a category, you just have to make the association on the page of picture informations or on the informations of all pictures of a category.';
+  $lang['help_virtual'][3] = 'Using this principle, it is possible to create virtual categories in PhpWebGallery : no real directory coresponds to this category. You just have to create this category on the section "categories" of the admin panel.';
+  $lang['help_groups_title'] = 'Users Groups';
+  $lang['help_groups'][0] = 'PhpWebGallery is able to manage groups of users. It can be very useful to have common permission access for private categories.';
+  $lang['help_groups'][1] = '1. Create the group "family" on the section "Groups" of admin panel.';
+  $lang['help_groups'][2] = '2. On the section "Users", edit on of them and associate him to the group "family".';
+  $lang['help_groups'][3] = '3. By modifying the permissions for a category or for a group, you\'ll see that all categories accessible for a group are accessible for its members.';
+  $lang['help_groups'][4] = 'A user can belong to several groups. The authorization is stronger than prohibition : if a user "jack" belongs to the group "family" and "friends", and that only group "family" can see category "Christmas 2003", "jack" will be able to see "Christmas 2003".';
+  $lang['help_access_title'] = 'Access authorization';
+  $lang['help_access'][0] = 'PhpWebGallery is able to forbid access to categories. Categories can be "public" or "private". In order to forbid access to a category :';
+  $lang['help_access'][1] = '1. Modify category informations (from the "categories" section in tha admin panel) and make it "private".';
+  $lang['help_access'][2] = '2. On the page of permissions (for a group or a user) the private category will be shown and you\'ll be able to authorize access or not.';
+  $lang['help_infos'][2] = 'If you have any question, do not hesitate to take a look at the forum or ask a question there. The <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> (message board) is available on the presentation site of PhpWebGallery.';
+  $lang['step1_err_copy'] = 'Copy the text between hyphens and paste it into the file "include/mysql.inc.php"(Warning : mysql.inc.php must only contain what is in blue, no line return or space character)';
+  $lang['permuser_only_private'] = 'Only private categories are shown';
+  $lang['waiting_update'] = 'Validated pictures will be displayed only once pictures database updated';
+  $lang['conf_upload_available_info'] = 'Authorizing the upload of pictures by users on the categories of the website (not on a remote server). This is general parameter, it is needed to authorize upload category by category, by default, no category is "uploadable".';
+  $lang['install_help'] = 'Need help ? Ask your question on <a href="http://forum.phpwebgallery.net">PhpWebGallery message board</a>.';
+  $lang['install_warning'] = 'The file "admin/install.php" is still present. Please remove it from your server. It is not secure to keep it.';
+  // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'This category is unknown in the database';
+}
+?>
Index: /branches/1.3/language/norsk.php
===================================================================
--- /branches/1.3/language/norsk.php	(revision 3252)
+++ /branches/1.3/language/norsk.php	(revision 3252)
@@ -0,0 +1,680 @@
+<?php
+/***************************************************************************
+ *                                 norsk.php                               *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *   translation   : Roy Hansen <roy.hansen@broadpark.no>                  *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+$lang['only_members'] = 'Bare medlemmer har adgang';
+$lang['invalid_pwd'] = 'Feil passord!';
+$lang['access_forbiden'] = 'Du har ikke adgang til denne siden';
+$lang['submit'] = 'Send';
+$lang['login'] = 'Bruker';
+$lang['password'] = 'Passord';
+$lang['new'] = 'Nytt';
+$lang['delete'] = 'Slett';
+$lang['category'] = 'Album';
+$lang['thumbnail'] = 'Miniatyrbilder';
+$lang['date'] = 'Dato';
+$lang['diapo_default_page_title'] = 'Velg et album';
+$lang['thumbnails'] = 'Miniatyrbilder';
+$lang['categories'] = 'Album';
+$lang['hint_category'] = 'Viser bilder i rota på dette album';
+$lang['total_images'] = 'Totalt';
+$lang['title_menu'] = 'Meny';
+$lang['change_login'] = 'Skift bruker';
+$lang['login'] = 'Bruker';
+$lang['hint_login'] = 'Hver bruker har sitt eget oppsett';
+$lang['logout'] = 'Logge ut';
+$lang['customize'] = 'Oppsett';
+$lang['hint_customize'] = 'Forandrer oppsett på utseendet';
+$lang['hint_search'] = 'Søke i databasen etter filnavn, beskrivelse etc.';
+$lang['search'] = 'Søke i databasen';
+$lang['favorite_cat'] = 'Favoritter';
+$lang['favorite_cat_hint'] = 'Vis dine favoritter';
+$lang['about'] = 'Om PhpWebGallery';
+$lang['hint_about'] = 'mer informasjon om PhpWebGallery...';
+$lang['admin'] = 'Admin';
+$lang['hint_admin'] = 'kun tilgjengelig for administratorer';
+$lang['no_category'] = 'Intet album er valgt<br />velg et i menyen';
+$lang['page_number'] = 'Side nummer';
+$lang['previous_page'] = 'Forrige';
+$lang['next_page'] = 'Neste';
+$lang['nb_image_category'] = 'Antall bilder i dette album: ';
+$lang['recent_image'] = 'Bilder nyere enn';
+$lang['days'] = 'dager';
+$lang['send_mail'] = 'Kommentarer, send en email til: ';
+$lang['title_send_mail'] = 'Kommentar til din side';
+$lang['sub-cat'] = 'Underalbum';
+$lang['images_available'] = 'bilder i dette album';
+$lang['total'] = 'Bilder';
+$lang['upload_picture'] = 'Legge inn et nytt bilde';
+$lang['registration_date'] = 'Registreringsdato';
+$lang['creation_date'] = 'Laget: ';
+$lang['comment'] = 'Kommentar';
+$lang['author'] = 'Opphavsmann';
+$lang['size'] = 'Størrelse';
+$lang['filesize'] = 'Filstørrelse';
+
+$lang['exif'] = 'Exifinfo';
+
+$lang['cExiflineMake'] = 'Kamera:';
+$lang['cExiflineModel'] = 'Model:';
+$lang['cExiflineSoftware'] = 'Program:';
+$lang['cExiflineExifVersion'] = 'ExifVersjon:';
+$lang['cExiflineISOSpeedRatings'] = 'ISOSpeedRatings:';
+$lang['cExiflineExposureTime'] = 'ExposureTime:';
+$lang['cExiflineApertureFNumber'] = 'ApertureFNumber:';
+$lang['cExiflineExposureProgram'] = 'ExposureProgram:';
+$lang['cExiflineExposureProgram0'] = 'Ikke definert';
+$lang['cExiflineExposureProgram1'] = 'Manual';
+$lang['cExiflineExposureProgram2'] = 'Normalt program';
+$lang['cExiflineExposureProgram3'] = 'Aperture priority';
+$lang['cExiflineExposureProgram4'] = 'Shutter priority';
+$lang['cExiflineExposureProgram5'] = 'Creative program (biased toward depth of field)';
+$lang['cExiflineExposureProgram6'] = 'Action program (biased toward fast shutter speed)';
+$lang['cExiflineExposureProgram7'] = 'Portrait mode (for closeup photos with the background out of focus)';
+$lang['cExiflineExposureProgram8'] = 'Landscape mode (for landscape photos with the background in focus)';
+$lang['cExiflineBrightnessValue'] = 'BrightnessValue:';
+$lang['cExiflineExposureBiasValue'] = 'ExposureBiasValue:';
+$lang['cExiflineMaxApertureValue'] = 'MaxApertureValue:';
+$lang['cExiflineMeteringMode'] = 'MeteringMode:';
+$lang['cExiflineMeteringMode0'] = 'Ukjent';
+$lang['cExiflineMeteringMode1'] = 'Average';
+$lang['cExiflineMeteringMode2'] = 'CenterWeightedAverage';
+$lang['cExiflineMeteringMode3'] = 'Spot';
+$lang['cExiflineMeteringMode4'] = 'MultiSpot';
+$lang['cExiflineMeteringMode5'] = 'Pattern';
+$lang['cExiflineMeteringMode6'] = 'Partial';
+$lang['cExiflineMeteringMode255'] = 'Annet';
+
+$lang['cExiflineLightSource'] = 'LightSource:';
+$lang['cExiflineLightSource0'] = 'unknown';
+$lang['cExiflineLightSource1'] = 'Daylight';
+$lang['cExiflineLightSource2'] = 'Fluorescent';
+$lang['cExiflineLightSource3'] = 'Tungsten (incandescent light)';
+$lang['cExiflineLightSource4'] = 'Flash';
+$lang['cExiflineLightSource9'] = 'Fine weather';
+$lang['cExiflineLightSource10'] = 'Cloudy weather';
+$lang['cExiflineLightSource11'] = 'Shade';
+$lang['cExiflineLightSource12'] = 'Daylight fluorescent (D 5700  7100K)';
+$lang['cExiflineLightSource13'] = 'Day white fluorescent (N 4600  5400K)';
+$lang['cExiflineLightSource14'] = 'Cool white fluorescent (W 3900  4500K)';
+$lang['cExiflineLightSource15'] = 'White fluorescent (WW 3200  3700K)';
+$lang['cExiflineLightSource17'] = 'Standard light A';
+$lang['cExiflineLightSource18'] = 'Standard light B';
+$lang['cExiflineLightSource19'] = 'Standard light C';
+$lang['cExiflineLightSource20'] = 'D55';
+$lang['cExiflineLightSource21'] = 'D65';
+$lang['cExiflineLightSource22'] = 'D75';
+$lang['cExiflineLightSource23'] = 'D50';
+$lang['cExiflineLightSource24'] = 'ISO studio tungsten';
+$lang['cExiflineLightSource255'] = 'other light source';
+
+$lang['cExiflineExposureMode'] = 'ExposureMode:';
+$lang['cExiflineExposureMode0'] = 'Auto exposure';
+$lang['cExiflineExposureMode1'] = 'Manual exposure';
+$lang['cExiflineExposureMode2'] = 'Auto bracket';
+
+$lang['cExiflineWhiteBalance'] = 'WhiteBalance:';
+$lang['cExiflineWhiteBalance0'] = 'Auto white balance';
+$lang['cExiflineWhiteBalance1'] = 'Manual Auto white balance';
+
+$lang['cExiflineSubjectDistance'] = 'SubjectDistance:';
+$lang['cExiflineFocalLength'] = 'FocalLength:';
+$lang['cExiflineFocalLengthIn35mmFilm'] = 'FocalLengthIn35mmFilm:';
+$lang['cExiflineDigitalZoomRatio'] = 'DigitalZoomRatio:';
+
+$lang['cExiflineSceneCaptureType'] = 'SceneCaptureType:';
+$lang['cExiflineSceneCaptureType0'] = 'Standard';
+$lang['cExiflineSceneCaptureType1'] = 'Landscape';
+$lang['cExiflineSceneCaptureType2'] = 'Portrait';
+$lang['cExiflineSceneCaptureType3'] = 'Night scene';
+
+$lang['cExiflineGainControl'] = 'GainControl:';
+$lang['cExiflineGainControl0'] = 'None';
+$lang['cExiflineGainControl1'] = 'Low gain up';
+$lang['cExiflineGainControl2'] = 'High gain up';
+$lang['cExiflineGainControl3'] = 'Low gain down';
+$lang['cExiflineGainControl4'] = 'High gain down';
+
+$lang['cExiflineContrast'] = 'Contrast:';
+$lang['cExiflineContrast0'] = 'Normal';
+$lang['cExiflineContrast1'] = 'Soft';
+$lang['cExiflineContrast2'] = 'Hard';
+
+$lang['cExiflineSaturation'] = 'Saturation:';
+$lang['cExiflineSaturation0'] = 'Normal';
+$lang['cExiflineSaturation1'] = 'Low saturation';
+$lang['cExiflineSaturation2'] = 'High saturation';
+
+$lang['cExiflineSharpness'] = 'Sharpness:';
+$lang['cExiflineSharpness0'] = 'Normal';
+$lang['cExiflineSharpness1'] = 'Soft';
+$lang['cExiflineSharpness2'] = 'Hard';
+
+$lang['cExiflineSubjectDistanceRange'] = 'SubjectDistanceRange:';
+$lang['cExiflineSubjectDistanceRange0'] = 'Unknown';
+$lang['cExiflineSubjectDistanceRange1'] = 'Macro';
+$lang['cExiflineSubjectDistanceRange2'] = 'Close view';
+$lang['cExiflineSubjectDistanceRange3'] = 'Distant view';
+
+$lang['cExiflineFlash'] = 'Flash:';
+$lang['cExiflineFlash00'] = 'Flash did not fire' ;
+$lang['cExiflineFlash01'] = 'Flash fired' ;
+$lang['cExiflineFlash05'] = 'Strobe return light not detected' ;
+$lang['cExiflineFlash07'] = 'Strobe return light detected' ;
+$lang['cExiflineFlash09'] = 'Flash fired, compulsory flash mode' ;
+$lang['cExiflineFlash0D'] = 'Flash fired, compulsory flash mode, return light not detected' ;
+$lang['cExiflineFlash0F'] = 'Flash fired, compulsory flash mode, return light detected' ;
+$lang['cExiflineFlash10'] = 'Flash did not fire, compulsory flash mode' ;
+$lang['cExiflineFlash18'] = 'Flash did not fire, auto mode' ;
+$lang['cExiflineFlash19'] = 'Flash fired, auto mode' ;
+$lang['cExiflineFlash1D'] = 'Flash fired, auto mode, return light not detected' ;
+$lang['cExiflineFlash1F'] = 'Flash fired, auto mode, return light detected' ;
+$lang['cExiflineFlash20'] = 'No flash function' ;
+$lang['cExiflineFlash41'] = 'Flash fired, red-eye reduction mode' ;
+$lang['cExiflineFlash45'] = 'Flash fired, red-eye reduction mode, return light not detected' ;
+$lang['cExiflineFlash47'] = 'Flash fired, red-eye reduction mode, return light detected' ;
+$lang['cExiflineFlash49'] = 'Flash fired, compulsory flash mode, red-eye reduction mode' ;
+$lang['cExiflineFlash4D'] = 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected' ;
+$lang['cExiflineFlash4F'] = 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected' ;
+$lang['cExiflineFlash59'] = 'Flash fired, auto mode, red-eye reduction mode' ;
+$lang['cExiflineFlash5D'] = 'Flash fired, auto mode, return light not detected, red-eye reduction mode' ;
+$lang['cExiflineFlash5F'] = 'Flash fired, auto mode, return light detected, red-eye reduction mode' ;
+$lang['cExiflineDateFormat'] = '%d %B %Y %H:%M:%S';
+
+$lang['file'] = 'Fil i bruk';
+$lang['generation_time'] = 'Siden ble laget på: ';
+$lang['favorites'] = 'Favoritter';
+$lang['search_result'] = 'Søkeresultat';
+$lang['about_page_title'] = 'Om PhpWebGallery';
+$lang['about_title'] = 'Info om PhpWebGallery';
+$lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Informasjon om  PhpWebGallery</div>
+<ul>
+  <li>Denne webside bruker  <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> release '.$conf['version'].'. PhpWebGallery er en webaplikasjon som gir deg muligheten til å lage et online galleri på en enkel måte. Galleriet kan ha flere brukernivå, og det er også mulig å legge inn mange forskjellige kommentarer til bildene. Både fra brukere og gjester som ser bildene. En MySql database sørger for å lagre dette.</li>
+  <li>Hvis du har spørsmål eller kommentarer har&nbsp;<a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> en offisiell webside, og eget  engelsk <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a>. <br>
+Du kan sende meg en epost også, så skal jeg se om jeg kan hjelpe deg. </li>
+</ul>';
+$lang['about_return'] = 'Tilbake';
+$lang['ident_page_title'] = 'Bruker pålogging';
+$lang['ident_title'] = 'Identifikasjon';
+$lang['ident_register'] = 'Registrering';
+$lang['ident_forgotten_password'] = 'Glemt passordet ditt ?';
+$lang['ident_guest_visit'] = 'Logg deg inn som gjest';
+$lang['customize_page_title'] = 'Oppsett';
+$lang['customize_title'] = 'Oppsett';
+$lang['customize_nb_image_per_row'] = 'Antall bilder pr. rad';
+$lang['customize_nb_row_per_page'] = 'Antall rader pr. side';
+$lang['customize_language'] = 'Språk';
+$lang['maxwidth'] = 'Maks bredde på bildet';
+$lang['maxheight'] = 'Maks høyde på bildet';
+$lang['err_maxwidth'] = 'Maksbredden må være over 50';
+$lang['err_maxheight'] = 'Makshøyden må være over 50';
+$lang['previous_image'] = 'Forrige';
+$lang['next_image'] = 'Neste';
+$lang['back'] = 'Trykk på bildet for tilbake til albumets miniatyrbilder.';
+$lang['info_image_title'] = 'Bildeinformasjon';
+$lang['link_info_image'] = 'Rette i informasjonen';
+$lang['true_size'] = 'Aktuell størrelse';
+$lang['comments_title'] = 'kommentarer fra brukerne av siden';
+$lang['comments_del'] = 'Slett denne kommentaren';
+$lang['comments_add'] = 'Legg til en kommentar';
+$lang['month'][1] = 'Januar';
+$lang['month'][2] = 'Februar';
+$lang['month'][3] = 'Mars';
+$lang['month'][4] = 'April';
+$lang['month'][5] = 'Mai';
+$lang['month'][6] = 'Juni';
+$lang['month'][7] = 'Juli';
+$lang['month'][8] = 'August';
+$lang['month'][9] = 'September';
+$lang['month'][10] = 'Oktober';
+$lang['month'][11] = 'November';
+$lang['month'][12] = 'Desember';
+$lang['day'][0] = 'søndag';
+$lang['day'][1] = 'mandag';
+$lang['day'][2] = 'tirsdag';
+$lang['day'][3] = 'onsdag';
+$lang['day'][4] = 'torsdag';
+$lang['day'][5] = 'fredag';
+$lang['day'][6] = 'lørdag';
+$lang['add_favorites_alt'] = 'Legge til favoritter';
+$lang['add_favorites_hint'] = 'Legge dette bildet til dine favoritter';
+$lang['del_favorites_alt'] = 'Slette fra favoritter';
+$lang['del_favorites_hint'] = 'Slette dette bildet fra dine favoritter';
+$lang['register_page_title'] = 'Registrering';
+$lang['register_title'] = 'Registrering';
+$lang['reg_err_login1'] = 'Skriv brukernavn';
+$lang['reg_err_login2'] = 'Brukernavnet må ikke ha mellomrom som siste bokstav';
+$lang['reg_err_login3'] = 'Brukernavnet må ikke ha mellomrom som første bokstav';
+$lang['reg_err_login4'] = 'Brukernavnet må ikke ha tegn slik som  \og"';
+$lang['reg_err_login5'] = 'Brukernavnet er allerede i bruk';
+$lang['reg_err_pass'] = 'Skriv ditt passord igjen';
+$lang['reg_confirm'] = 'Bekreft';
+$lang['reg_err_mail_address'] = 'mail adressen må være lik xxx@yyy.eee (eksempel : morten@mail.no)';
+$lang['search_title'] = 'Søke i bildedatabasen';
+$lang['invalid_search'] = 'Søkeordet må være mer en 3 tegn/bokstaver';
+$lang['search_field_search'] = 'Søkeord: ';
+$lang['search_return_main_page'] = 'Tilbake';
+$lang['upload_forbidden'] = 'Du kan ikke legge inn bilder i denne kategorien';
+$lang['upload_file_exists'] = 'Dette bildenavnet er allerede i bruk';
+$lang['upload_filenotfound'] = 'Du må velge filformat for bildet';
+$lang['upload_cannot_upload'] = 'Du kan ikke laste inn bilder til databasen';
+$lang['upload_title'] = 'Velg ett bilde å legge inn i databasen: ';
+$lang['upload_advise'] = 'Velg ett bilde å legge inn i albumet: ';
+$lang['upload_advise_thumbnail'] = 'Valgfritt, men anbefalt : Velg samme bilde i mindre format. ';
+$lang['upload_advise_filesize'] = 'Fil størrelsen må ikke overstige: ';
+$lang['upload_advise_width'] = 'Bredden på bilde må ikke overstige: ';
+$lang['upload_advise_height'] = 'Høyden på bilde må ikke overstige: ';
+$lang['upload_advise_filetype'] = 'Bilde må være en av disse filformatene : jpg, gif eller png';
+$lang['upload_err_username'] = 'Navnet ditt må skrives inn';
+$lang['upload_username'] = 'Brukernavn';
+$lang['upload_successful'] = 'Bilde ble lagt inn OK! , en administrator vil godkjenne bilde så snart som mulig';
+// new or modified in release 1.3
+$lang['charset'] = 'iso-8859-1';
+$lang['no'] = 'nei';
+$lang['yes'] = 'ja';
+$lang['guest'] = 'gjest';
+$lang['mail_address'] = 'epostadresse';
+$lang['public'] = 'offentlig';
+$lang['private'] = 'privat';
+$lang['add'] = 'Utfør';
+$lang['dissociate'] = 'dissociate';
+$lang['mandatory'] = 'nødvendig';
+$lang['err_date'] = 'gal dato';
+$lang['picture'] = 'Bildevalg';
+$lang['IP'] = 'IP-adresse';
+$lang['close'] = 'lukk';
+$lang['open'] = 'åpne';
+$lang['keywords'] = 'Nøkkelord';
+$lang['errors_title'] = 'Feil';
+$lang['infos_title'] = 'Informasjon';
+$lang['default'] = 'forhåndsvalgte';
+$lang['comments'] = 'kommentarer ';
+$lang['category_representative'] = 'representativ';
+$lang['stats'] = 'Statistikk';
+$lang['most_visited_cat_hint'] = 'viser det mest sette bildet';
+$lang['most_visited_cat'] = 'mest besøkte';
+$lang['best_rated_cat_hint'] = 'viser bilder med høyeste karakter';
+$lang['best_rated_cat'] = 'beste karakter';
+$lang['recent_cat_hint'] = 'viser de nyeste';
+$lang['recent_cat'] = 'Bilder sist lagt til';
+$lang['recent_cat_title'] = 'Bilder sist lagt til';
+$lang['visited'] = 'Vist';
+$lang['times'] = 'ganger';
+$lang['customize_theme'] = 'Velg tema på utseende';
+$lang['customize_expand'] = 'Utvid alle album';
+$lang['customize_show_nb_comments'] = 'Vise antall kommentarer';
+$lang['customize_short_period'] = 'Kort periode';
+$lang['customize_long_period'] = 'Lang priode';
+$lang['customize_template'] = 'Skjermutseende';
+$lang['err_periods'] = 'Perioden må være et tall';
+$lang['err_periods_2'] = 'perioden må være høyere enn 0, den lange perioden må være lengre enn den korte';
+$lang['create_cookie'] = 'Lage en informasjonskapsel';
+$lang['customize_day'] = 'dag';
+$lang['customize_week'] = 'uke';
+$lang['customize_month'] = 'måned';
+$lang['customize_year'] = 'år';
+$lang['slideshow'] = 'Automatisk visning';
+$lang['period_seconds'] = 'sekunder pr. bilde';
+$lang['slideshow_stop'] = 'Stopp automatisk visning';
+$lang['comment_added'] = 'Dine kommentarer har blitt registrert.';
+$lang['comment_to_validate'] = 'En administrator må godkjenne kommentarene før de vises.';
+$lang['comment_anti-flood'] = 'Anti-flood system : please wait for a moment before trying to post another comment';
+$lang['comment_user_exists'] = 'Brukernavnet er allerede i bruk';
+$lang['invalid_search'] = 'Søkeord må være større enn 3 tegn, og må ikke innholde punktum';
+$lang['search_mode_or'] = 'Søket må innholde et av ordene<br/><br/>';
+$lang['search_mode_and'] = 'Søket må innholde alle ordene';
+$lang['search_comments'] = 'Skill ordene med mellomrom';
+$lang['upload_name'] = 'Navn på bildet';
+$lang['upload_author'] = 'Fotograf';
+$lang['upload_creation_date'] = 'Laget den: ';
+$lang['upload_comment'] = 'Kommentar';
+$lang['mail_hello'] = 'Hei,';
+$lang['mail_new_upload_subject'] = 'Nytt bilde på websiden';
+$lang['mail_new_upload_content'] = 'Et nytt bilde som venter på godkjennelse er lagt inn. Husk å gå til administrasjonssiden og godkjenn/slette dette bildet.';
+$lang['mail_new_comment_subject'] = 'Ny kommentar er lagt inn';
+$lang['mail_new_comment_content'] = 'En ny kommentar er registrert i galleriet. Hvis du har valgt å godkjenne hver kommentar,  må du først godkjenne denne kommentaren på administrasjonssiden.'."\n\n".'Du kan se de siste kommentarene på administrasjonssiden';
+$lang['connected_user'] = 'Tilkoblet bruker: ';
+$lang['title_comments'] = 'Kommentarer fra brukere';
+$lang['stats_last_days'] = 'siste dager';
+$lang['hint_comments'] = 'Se siste brukeres kommentarer';
+$lang['menu_sucr'] = 'Registrering';
+$lang['menu_login'] = 'Logge inn';
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+  $lang['title_liste_users'] = 'Brukerliste';
+  $lang['title_history'] = 'Historie';
+  $lang['title_update'] = 'Oppdater database';
+  $lang['title_configuration'] = 'Oppsett av PhpWebGallery';
+  $lang['title_instructions'] = 'Instruksjoner';
+  $lang['title_categories'] = 'Lage, rette/endre i dine album';
+  $lang['title_edit_cat'] = 'Albumrettigheter';
+  $lang['title_info_images'] = 'Endre et albums bildeinformasjon';
+  $lang['title_thumbnails'] = 'Lage miniatyrbilder';
+  $lang['title_thumbnails_2'] = 'for';
+  $lang['title_default'] = 'Administrasjonspanel';
+  $lang['menu_title'] = 'Administrasjon';
+  $lang['menu_config'] = 'Oppsett av galleri';
+  $lang['menu_users'] = 'Brukere';
+  $lang['menu_add_user'] = 'Legg til';
+  $lang['menu_list_user'] = 'list';
+  $lang['menu_categories'] = 'Oppsett av album';
+  $lang['menu_update'] = 'Oppdater database';
+  $lang['menu_thumbnails'] = 'Lage miniatyrbilder';
+  $lang['menu_history'] = 'Historie (logg)';
+  $lang['menu_instructions'] = 'Brukerveiledning';
+  $lang['menu_back'] = 'Tilbake til galleri';
+  $lang['title_waiting'] = 'Bilder for godkjenning';
+  $lang['menu_waiting'] = 'Bildegodkjenning';
+  $lang['default_message'] = 'PhpWebGallery administrasjonspanel';
+  $lang['conf_err_prefixe'] = 'Småbildenes prefiks må ikke inneholde symboler';
+  $lang['conf_err_mail'] = 'Ikke godkjent epostadresse, må være som navn@server.com';
+  $lang['conf_err_sid_size'] = 'TidsID må være et tall mellom 4 og 50';
+  $lang['conf_err_sid_time'] = 'Tiden må være et tall mellom 5 og 60';
+  $lang['conf_err_max_user_listbox'] = 'Maks brukere listeboks må være et tall mellom 0 og 255';
+  $lang['conf_confirmation'] = 'Informasjonen er registrert i databasen';
+  $lang['conf_general_title'] = 'Hovedoppsett';
+  $lang['conf_general_webmaster'] = 'Webmaster innlogging';
+  $lang['conf_general_webmaster_info'] = 'Det vil bli vist til brukerene, det er nødvendig for administrasjon av siden';
+  $lang['conf_general_mail'] = 'Webmasters epostadresse';
+  $lang['conf_general_mail_info'] = 'Brukerene vil kunne kontakte via denne mail';
+  $lang['conf_general_prefix'] = 'Miniatyrbilde prefiks';
+  $lang['conf_general_prefix_info'] = 'Miniatyrbildene bruker denne prefiks. Ikke forandre hvis du ikke er sikker.';
+  $lang['conf_general_access'] = 'Tilgang';
+  $lang['conf_general_access_1'] = 'Fri';
+  $lang['conf_general_access_2'] = 'Båndlagt';
+  $lang['conf_general_access_info'] = '- fri : -alle kan komme inn på sidene, alle besøkende kan opprette en konto og tilpasse utseende på sidene<br />- båndlagt : - administrator oppretter kontoer. Bare registrerte bruker kan komme inn på sidene';
+  $lang['conf_general_max_user_listbox'] = 'Maks opplistede brukere';
+  $lang['conf_general_max_user_listbox_info'] = '- dette tallet er maks opplistede brukere i listeboksen som PhpWebGallery viser istedenfor en vanlig tekstboks på Identifikasjonssiden.<br />- skriv et tall mellom 0 og 255, med 0 menes at du vil vise listeboksen.';
+  $lang['conf_comments'] = 'Bruker kommentarer';
+  $lang['conf_comments_title'] = 'Konfigurasjon av '.$lang['conf_comments'];
+  $lang['conf_comments_show_comments'] = $lang['conf_comments'];
+  $lang['conf_comments_show_comments_info'] = 'Vise brukerkommentarer under hvert bilde?';
+  $lang['conf_comments_comments_number'] = 'Antall kommentarer pr. side.';
+  $lang['conf_comments_comments_number_info'] = 'Antall kommentarer pr. side. Dette tallet er ubegrenset for et bilde. Skriv et tall mellom 5 og 50';
+  $lang['conf_err_comment_number'] = 'Antallet kommentarer per side må være mellom 5 og 50.';
+  $lang['conf_remote_site_delete_info'] = 'Ved å slette en remote server vil alle bilder og album i tilknytning til denne serverenogså bli slettet.';
+  $lang['conf_upload_title'] = 'Oppsett av brukeropplasting av bilder';
+  $lang['conf_upload_available'] = 'Godkjenne bilder som er lastet opp?';
+  $lang['conf_upload_maxfilesize'] = 'Maks filstørrelse';
+  $lang['conf_upload_maxfilesize_info'] = 'Maks filstørrelse for de opplastede bilder. Må være et tall mellom 10 og 1000 KB.';
+  $lang['conf_err_upload_maxfilesize'] = 'Maks filstørrelse for de opplastede bilder. Må være et tall mellom 10 og 1000 KB.';
+  $lang['conf_upload_maxwidth'] = 'Maks bredde';
+  $lang['conf_upload_maxwidth_info'] = 'Maks bredde for bildet. Maks bredde må være mer enn 10 piksels';
+  $lang['conf_err_upload_maxwidth'] = 'Maks bredde for bildet. Maks bredde må være mer enn 10 piksels.';
+  $lang['conf_upload_maxheight'] = 'Maks høyde';
+  $lang['conf_upload_maxheight_info'] = 'Maks høyde for det opplastede bildet. Maks høyde må være mer enn 10 piksels.';
+  $lang['conf_err_upload_maxwidth'] = 'Maks høyde for det opplastede bildet. Maks høyde må være mer enn 10 piksels.';
+  $lang['conf_upload_maxwidth_thumbnail'] = 'Maks bredde på miniatyrbilder';
+  $lang['conf_upload_maxwidth_thumbnail_info'] = 'Maks bredde for det opplastede småbildet. Maks bredde må være mer enn 10 piksels.';
+  $lang['conf_err_upload_maxwidth_thumbnail'] = 'Maks bredde for opplastede småbildet. Maks bredde må være mer enn 10 piksels.';
+  $lang['conf_upload_maxheight_thumbnail'] = 'Maks høyde på miniatyrbilder';
+  $lang['conf_upload_maxheight_thumbnail_info'] = 'Maks høyde for det opplastede småbildet. Maks høyde må være mer enn 10 piksels.';
+  $lang['conf_err_upload_maxheight_thumbnail'] = 'Maks høyde for det opplastede småbildet. Maks høyde må være mer enn 10 piksels.';
+  $lang['conf_default_title'] = 'Det normale skjermoppsettet for uregistrerte besøkende og nye kontoer';
+  $lang['conf_default_language_info'] = 'Forhåndsvalgt språk';
+  $lang['conf_default_theme_info'] = 'Forhåndsvalgt tema (utseende)';
+  $lang['conf_session_title'] = 'Konfigurere periode - informasjonskapsler (Cookies)';
+  $lang['conf_session_size'] = 'ID størrelse';
+  $lang['conf_session_size_info'] = '- ID lengde gjør  sikkerheten større, høyere tall bedre sikkerhet<br />- skriv et tall mellom 4 og 50';
+  $lang['conf_session_time'] = 'Gyldig periode';
+  $lang['conf_session_time_info'] = '- Kortere periode gjør sikkerheten større,<br />- skriv inn et tall mellom 5 og 60, i minutter';
+  $lang['conf_session_key'] = 'Nøkkelord';
+  $lang['conf_session_key_info'] = '- Periode nøkkelordet forbedrer kodingen til periode ID <br />- tast en setning mindre enn 255 tegn';
+  $lang['conf_session_delete'] = 'Slett utgåtte perioder';
+  $lang['conf_session_delete_info'] = 'Du bør slette utgåtte perioder, de blir i databasen (men er ingen sikkerhetsrisiko)';
+  $lang['user_err_modify'] = 'Denne bruker kan ikke endres eller slettes';
+  $lang['user_err_unknown'] = 'Denne bruker finnes ikke i databasen';
+  $lang['adduser_info_message'] = 'Registrert info i database for bruker ';
+  $lang['adduser_info_password_updated'] = '(passord endret)';
+  $lang['adduser_info_back'] = 'Tilbake til brukerliste';
+  $lang['adduser_fill_form'] = 'Fyll inn følgende form';
+  $lang['adduser_unmodify'] = 'Kan ikke endres';
+  $lang['adduser_status'] = 'Status';
+  $lang['adduser_status_admin'] = 'admin';
+  $lang['adduser_status_guest'] = 'gjest';
+  $lang['permuser_info_message'] = 'Tillatelse er registrert';
+  $lang['permuser_title'] = 'Regler for bruker';
+  $lang['permuser_warning'] = 'Advarsel : a "<span style="font-weight:bold;">ingen tilgang</span>" til root av albumet';
+  $lang['permuser_authorized'] = 'Autorisert';
+  $lang['permuser_forbidden'] = 'Ingen tilgang';
+  $lang['permuser_parent_forbidden'] = 'Ingen tilgang';
+  $lang['listuser_confirm'] = 'Er du sikker på at du vil slette bruker?';
+  $lang['listuser_info_deletion'] = 'er blitt fjernet';
+  $lang['listuser_user_group'] = 'Brukergruppe: ';
+  $lang['listuser_modify'] = 'Endre';
+  $lang['listuser_modify_hint'] = 'Endre informasjonen til ';
+  $lang['listuser_permission'] = 'Tilgang';
+  $lang['listuser_permission_hint'] = 'Endre rettigheter til ';
+  $lang['listuser_delete'] = 'Slett';
+  $lang['listuser_delete_hint'] = 'Slett bruker';
+  $lang['listuser_button_all'] = 'Merk alle';
+  $lang['listuser_button_invert'] = 'Merk/slett';
+  $lang['listuser_button_create_address'] = 'Lag epostadresser';
+  $lang['cat_invisible'] = 'Usynlig';
+  $lang['cat_edit'] = 'Rette';
+  $lang['cat_up'] = 'Flytte opp';
+  $lang['cat_down'] = 'Flytte ned';
+  $lang['cat_image_info'] = 'Bildeinfo';
+  $lang['cat_total'] = 'Total';
+  $lang['editcat_confirm'] = 'Informasjon er registrert i databasen';
+  $lang['editcat_back'] = 'Album';
+  $lang['editcat_title1'] = 'Rettigheter for: ';
+  $lang['editcat_name'] = 'Navn';
+  $lang['editcat_comment'] = 'Kommentar';
+  $lang['editcat_status'] = 'Status';
+  $lang['infoimage_general'] = 'Generelle opplysninger for albumet.';
+  $lang['infoimage_useforall'] = 'Brukes for alle bilder?';
+  $lang['infoimage_creation_date'] = 'Fotografert den: ';
+  $lang['infoimage_detailed'] = 'Generelle opplysninger for hvert enkelt bilde.';
+  $lang['infoimage_title'] = 'Tittel';
+  $lang['infoimage_comment'] = 'Kommentarer';
+  $lang['update_missing_tn'] = 'Miniatyrbilde mangler for';
+  $lang['update_disappeared_tn'] = 'Miniatyrbilde er forsvunnet';
+  $lang['update_disappeared'] = 'Finnes ikke';
+  $lang['update_part_deletion'] = 'Sletter bilder som ikke har noe miniatyrbilde, eller ikke finnes';
+  $lang['update_deletion_conclusion'] = 'bilder slettet fra databasen';
+  $lang['update_part_research'] = 'Søker etter nye bilder i mappene';
+  $lang['update_research_added'] = 'lagt til';
+  $lang['update_research_tn_ext'] = 'miniatyrbilde i';
+  $lang['update_research_conclusion'] = 'bilder lagt til databasen';
+  $lang['update_default_title'] = 'Gjør ditt valg';
+  $lang['update_only_cat'] = 'Oppdater album, ikke bilder';
+  $lang['update_all'] = 'Oppdater alt';
+  $lang['tn_width'] = 'Bredde';
+  $lang['tn_height'] = 'Høyde';
+  $lang['tn_no_support'] = 'Bilde finnes ikke eller ingen støtte';
+  $lang['tn_format'] = 'for filformatet';
+  $lang['tn_thisformat'] = 'for dette filformatet';
+  $lang['tn_err_width'] = 'width must be a number superior to';
+  $lang['tn_err_height'] = 'height must be a number superior to';
+  $lang['tn_results_title'] = 'Results of miniaturization';
+  $lang['tn_picture'] = 'bilde';
+  $lang['tn_results_gen_time'] = 'generated in';
+  $lang['tn_stats'] = 'General statistics';
+  $lang['tn_stats_nb'] = 'number of miniaturized pictures';
+  $lang['tn_stats_total'] = 'total time';
+  $lang['tn_stats_max'] = 'max time';
+  $lang['tn_stats_min'] = 'min time';
+  $lang['tn_stats_mean'] = 'average time';
+  $lang['tn_err'] = 'You made mistakes';
+  $lang['tn_params_title'] = 'Miniaturization parameters';
+  $lang['tn_params_GD'] = 'GD versjon';
+  $lang['tn_params_GD_info'] = '- GD is the picture manipulating library for PHP<br />-choose the version installed on your server. If you choose the wrong, you\'ll just have errors messages, come back with your browser and choose the other version. If no version works, it means your server doesn\'t support GD.';
+  $lang['tn_params_width_info'] = 'maximum width that thumbnails can take';
+  $lang['tn_params_height_info'] = 'maximum height that thumbnails can take';
+  $lang['tn_params_create'] = 'create';
+  $lang['tn_params_create_info'] = 'Do not try to miniaturize too many pictures in the same time.<br />Indeed, miniaturization uses a lot of CPU. If you installed PhpWebGallery on a free provider, a too high CPU load can sometime lead to the deletion of your website.';
+  $lang['tn_params_format'] = 'filformat';
+  $lang['tn_params_format_info'] = 'only jpeg file format is supported for thumbnail creation';
+  $lang['tn_alone_title'] = 'Bilder uten miniatyrbilde ( bare jpeg og png )';
+  $lang['tn_dirs_title'] = 'Liste over mapper';
+  $lang['tn_dirs_alone'] = 'Bilder uten miniatyrbilde';
+  $lang['help_images_title'] = 'Legge til bilder';
+  $lang['help_images_intro'] = 'Hvordan plassere dine bilder i mapper.';
+  $lang['help_images'][0] = 'I mappen "galleries", lag mapper som representerer dine album (mapper)';
+  $lang['help_images'][1] = 'I hvert album (mappe) kan du lage så mange underalbum (mapper) du vil';
+  $lang['help_images'][2] = 'Du kan lage så mange album og underalbum du bare vil';
+  $lang['help_images'][3] = 'Bildefiler må ha  jpeg format (filendelse  jpg eller JPG), gif format (filendelse gif eller GIF), eller png format (filendelse png eller PNG).';
+  $lang['help_images'][4] = 'Prøv å ikke bruke mellomrom " "  eller bindestrek "-" i bildefiler, bruk heller understrek "_" som gir et bedre resultat med PhpWebGallery ';
+  $lang['help_thumbnails_title'] = 'Miniatyrbilder';
+  $lang['help_thumbnails'][0] = 'I hver mappe som skal vise bilder på din webside, er det en undermappe ved navn "thumbnail", hvis den ikke er der, lag og plasser miniatyrbildene for hovedmappen i den.';
+  $lang['help_thumbnails'][1] = 'Minatyrbildet trenger ikke ha samme filendelse som det tilhørende store bildet. (Et bilde med endelse .jpg kan ha et miniatyrbilde med endelse .gif for eksempel).';
+  $lang['help_thumbnails'][2] = 'Miniatyrbildet må i tillegg ha prefikset som er satt i kongigurasjonspanelet ( f. eks. image.jpg -> TN_image.GIF).';
+  $lang['help_thumbnails'][3] = 'Bruk programmet ThumbClic (Windowsversjon)  på presentasjonsiden til PhpWebGallery <a href="http://www.phpwebgallery.net/eng/index.php?rub=download"><b>(hent det her)</b></a> for å lage miniatyrbilder ';
+  $lang['help_thumbnails'][4] = 'Du kan bruke funsjonen som er i PhpWebGallery, men bildekvaliteten kan bli dårlig, og funsjonen belaster CPU hardt, så du kan få problemer hvis du bruker er gratissted for dine websider.';
+  $lang['help_thumbnails'][5] = 'Hvis du bruker din ISP for å lage bilder, må du gi 775 rettigheter på "galleries" mappen, og alle dens undermapper.';
+  $lang['help_database_title'] = 'Oppdatere databasen';
+  $lang['help_database'][0] = 'Når filer og minibilder er plassert riktig i sine mapper, kan du klikke på "Oppdater database"  eller gå til "Oppsett av album" og oppdatere albumet der (hvis det er et eksisterende album).';
+  $lang['help_infos_title'] = 'Forskjellig informasjon';
+  $lang['help_infos'][1] = 'Når du er ferdig med å opprette ditt galleri, gå til brukere i administrasjonspanelet og endre rettighetene for "gjest". Hver ny registrert bruker vil som forhåndvalg ha samme rettigheter som "gjest".';
+  $lang['help_remote_title'] = 'Fjern side';
+  $lang['help_remote'][0] = 'Du har muligheten til å bruke flere servere til å bygge opp ditt galleri. Dette er brukbart hvis du har begrenset plass og mange bilder du gjerne vil vise. Du må gjøre følgende : ';
+  $lang['help_remote'][1] = '1. Rett i filen "create_listing_file.php" (du finner den i mappen "admin"), ved å endre linjen "$prefix_thumbnail = "TN-";" hvis prefiks for dineminiatyrbilder ikke er "TN-".';
+  $lang['help_remote'][2] = '2. Plasser den endrede filen "create_listing_file.php" ved hjelp av ftp overføring  på den(de) andre serveren(e), i root mappen av dine mapper av bilder (som mappen "galleries" på denne websiden) .';
+  $lang['help_remote'][3] = '3. Kjør filen med url http://domaineDistant/repGalerie/create_listing_file.php, en fil "listing.xml" har nå blitt laget';
+  $lang['help_remote'][4] = '4. Hent tilbake "listing.xml" fra webstedet og plasser den i mappen "admin" på dette webstedet.';
+  $lang['help_remote'][5] = '5. Oppdater så databasen osv. ved hjelp av administrasjonspanelet. Når dette er gjort, slettes filen fra mappen "admin".';
+ $lang['help_remote'][6] = 'You can update the contents of a distant website by redoing the described manipulation. You can also kill a distant website by choosing the option in the configuration section of the administration panel.';
+  $lang['help_upload_title'] = 'Added images by users';
+  $lang['help_upload'][0] = 'PhpWebGallery offers the possibility for users to upload images. in order to do it :';
+  $lang['help_upload'][1] = '1. authorize the option in the configuration zone of the administration panel';
+  $lang['help_upload'][2] = '2. authorize the rights in writing in the images directories';
+  $lang['install_message'] = 'Message';
+  $lang['step1_confirmation'] = 'Parameters are correct';
+  $lang['step1_err_db'] = 'Connection to server succeed, but it was impossible to connect to database';
+  $lang['step1_err_server'] = 'Can\'t connect to server';
+  $lang['step1_err_copy_2'] = 'The next step of the installation is now possible';
+  $lang['step1_err_copy_next'] = 'next step';
+  $lang['step1_title'] = 'Step 1/2';
+  $lang['step1_host'] = 'MySQL host';
+  $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
+  $lang['step1_user'] = 'user';
+  $lang['step1_user_info'] = 'user login given by your host provider';
+  $lang['step1_pass'] = 'Password';
+  $lang['step1_pass_info'] = 'user password given by your host provider';
+  $lang['step1_database'] = 'Database name';
+  $lang['step1_database_info'] = 'also given by your host provider';
+  $lang['step1_prefix'] = 'Database table prefix';
+  $lang['step1_prefix_info'] = 'database tables names will be prefixed with it (enables you to manage better your tables)';
+  $lang['step2_err_login1'] = 'enter a login for webmaster';
+  $lang['step2_err_login3'] = 'webmaster login can\'t contain characters \' or "';
+  $lang['step2_err_pass'] = 'please enter your password again';
+  $lang['step2_err_mail'] = $lang['conf_err_mail'];
+  $lang['install_end_title'] = 'Installation finished';
+  $lang['install_end_message'] = 'The configuration of PhpWebGallery is finished, here is the next step<br /><br />
+For security reason, please delete file "install.php" in the directory "admin"<br />
+Once this file deleted , follow this instructions :
+<ul>
+  <li>go to the identification page : [ <a href="../identification.php">identification</a> ] and use the login/password given for webmaster</li>
+  <li>this login will enable you to access to the [ <a href="admin.php">administration panel</a> ] and to the instructions in order to place pictures in your directories</li>
+</ul>';
+  $lang['step2_title'] = 'Step 2/2';
+  $lang['step2_pwd'] = 'webmaster password';
+  $lang['step2_pwd_info'] = 'Keep it confidential, it enables you to access administration panel';
+  $lang['step2_pwd_conf'] = 'confirm password';
+  $lang['step2_pwd_conf_info'] = 'verification';
+  // new or modified in release 1.3
+  $lang['remote_site'] = 'Remote site';
+  $lang['title_add'] = 'Legge inn en ny bruker';
+  $lang['title_modify'] = 'Endre en bruker';
+  $lang['title_groups'] = 'Administrere grupper';
+  $lang['title_user_perm'] = 'Endre rettigheter for bruker ';
+  $lang['title_cat_perm'] = 'Endre rettigheter for album ';
+  $lang['title_group_perm'] = 'Endre rettigheter for gruppe';
+  $lang['title_picmod'] = 'Endre informasjonen for bilde ';
+  $lang['menu_groups'] = 'Brukergrupper';
+  $lang['menu_comments'] = 'Kommentarer';
+  $lang['conf_general_log'] = 'Historie (logg)';
+  $lang['conf_general_log_info'] = 'Skal besøk loggføres? Besøk blir vist i  Historie(Logg) seksjonen i Administrasjonspanelet';
+  $lang['conf_general_mail_notification'] = 'Beskjed med epost';
+  $lang['conf_general_mail_notification_info'] = 'Administratorer vil få beskjed med epost hvis besøkende laster opp bilder, eller gir kommentar til bildene';
+  $lang['conf_comments_validation'] = 'Godkjenne';
+  $lang['conf_comments_validation_info'] = 'En administrator godkjenner først kommentarer, før de blir synlige på siden.';
+  $lang['conf_comments_forall'] = 'For alle?';
+  $lang['conf_comments_forall_info'] = 'Selv besøkende som ikke er registrert, kan legge inn kommentarer.';
+  $lang['conf_default_nb_image_per_row_info'] = 'Forhåndsvalgt bilder pr. rad';
+  $lang['conf_default_nb_row_per_page_info'] = 'Forhåndsvalgte rader pr. side';
+  $lang['conf_default_short_period_info'] = 'Antall dager et bilde skal vises med rød markering (kort periode). Må være mer enn 1 dag.';
+  $lang['conf_default_long_period_info'] = 'Antall dager et bilde skal vises med grønn markering (lang periode). Må være lengre enn den korte perioden.';
+  $lang['conf_default_expand_info'] = 'Vise undermapper som forhåndsvalg i menyen ?';
+  $lang['conf_default_show_nb_comments_info'] = 'Vise antall kommentarer på miniatyrbildesiden';
+  $lang['conf_default_maxwidth_info'] = 'Maks bredde for å vise bildene: Bildenes nye bredde er bare ved visning, Bildefilene forblir uendret. Hvis du ikke ønsker begrensning, la feltet være blankt.';
+  $lang['conf_default_maxheight_info'] = 'Samme som for bredden, men gjelder for høyden av bildet.';
+  $lang['conf_session_cookie'] = 'Godkjenne informasjonskapsler';
+  $lang['conf_session_cookie_info'] = 'Brukerne behøver ikke logge på hver gang lenger, mindre sikkert.';
+  $lang['adduser_associate'] = 'Tilknyt gruppe';
+  $lang['group_add'] = 'Legg til en gruppe';
+  $lang['group_add_error1'] = 'Gruppenavn må ikke innholde " eller \'';
+  $lang['group_add_error2'] = 'Navnet i bruk av en annen gruppe.';
+  $lang['group_confirm'] = 'Vil du slette denne gruppen?';
+  $lang['group_list_title'] = 'Eksisterende grupper';
+  $lang['group_err_unknown'] = 'Denne gruppen finnes ikke i databasen';
+  $lang['cat_permission'] = 'Tilgang';
+  $lang['cat_update'] = 'Oppdater';
+  $lang['cat_add'] = 'Tilknyt et virtuelt album ';
+  $lang['cat_parent'] = 'til hovedalbum';
+  $lang['cat_error_name'] = 'Albumnavn må fylles ut';
+  $lang['cat_virtual'] = 'Virtuell';
+  $lang['cat_first'] = 'Flytt først';
+  $lang['cat_last'] = 'Flytt sist';
+  $lang['editcat_visible_info'] = '(Usynlig,  men for administratorer).';
+  $lang['editcat_visible'] = 'Synlig';
+  $lang['editcat_uploadable'] = 'Opplasting tilgjengelig';
+  $lang['infoimage_keyword_separation'] = '(Skill med komma ",")';
+  $lang['infoimage_addtoall'] = 'Legg til alle';
+  $lang['infoimage_removefromall'] = 'Slett fra alle';
+  $lang['infoimage_associate'] = 'Tilknyt album: ';
+  $lang['update_wrong_dirname'] = 'Navn på mapper og filer må være sammensatt av bokstaver og tegnene  "-", "_" eller "."';
+  $lang['stats_pages_seen'] = 'sider sett';
+  $lang['stats_visitors'] = 'besøkende';
+  $lang['stats_empty'] = 'Slett historie/logg';
+  $lang['stats_pages_seen_graph_title'] = 'Antall sider sett denne dagen.';
+  $lang['stats_visitors_graph_title'] = 'Antall besøkende denne dagen.';
+  $lang['comments_last_title'] = 'Siste kommentarer.';
+  $lang['comments_non_validated_title'] = 'Kommentarer for godkjennelse.';
+  $lang['help_database'][1] = 'For å hindre at for mange bilder blir oppdatert av gangen, gå til "Oppsett av album" i administrasjonspanelet, og oppdater et og et album av gangen. Bruk linken "Oppdater"';
+  $lang['help_upload'][3] = 'Albumet må ha "Opplasting tilgjengelig"  for å brukes til å laste opp bilder.';
+  $lang['help_upload'][4] = 'Opplastede bilder av brukere, blir ikke gjort synlig direkte, men må godkjennes av en administrator.  Administratoren må gå til "Bildegodkjenning" i administrasjonspanelet og godkjenne /forkaste bildet der. Deretter må albumet oppdateres.';
+  $lang['help_virtual_title'] = 'Linker mellom bilder og album og virtuelle album.';
+  $lang['help_virtual'][0] = 'PhpWebGallery is able to dissociate categories where pictures are stored and categories where pictures are shown.';
+  $lang['help_virtual'][1] = 'By default, pictures are shown only in their real categories : the ones corresponding to directories on the web server.';
+  $lang['help_virtual'][2] = 'To link a picture to a category, you just have to make the association on the page of picture informations or on the informations of all pictures of a category.';
+  $lang['help_virtual'][3] = 'Using this principle, it is possible to create virtual categories in PhpWebGallery : no real directory coresponds to this category. You just have to create this category on the section "categories" of the admin panel.';
+  $lang['help_groups_title'] = 'Users Groups';
+  $lang['help_groups'][0] = 'PhpWebGallery mestrer grupper av brukere. It can be very useful to have common permission access for private categories.';
+  $lang['help_groups'][1] = '1. Create the group "family" on the section "Groups" of admin panel.';
+  $lang['help_groups'][2] = '2. On the section "Users", edit on of them and associate him to the group "family".';
+  $lang['help_groups'][3] = '3. By modifying the permissions for a category or for a group, you\'ll see that all categories accessible for a group are accessible for its members.';
+  $lang['help_groups'][4] = 'A user can belong to several groups. The authorization is stronger than prohibition : if a user "jack" belongs to the group "family" and "friends", and that only group "family" can see category "Christmas 2003", "jack" will be able to see "Christmas 2003".';
+  $lang['help_access_title'] = 'Access authorization';
+  $lang['help_access'][0] = 'PhpWebGallery is able to forbid access to categories. Categories can be "public" or "private". In order to forbid access to a category :';
+  $lang['help_access'][1] = '1. Modify category informations (from the "categories" section in tha admin panel) and make it "private".';
+  $lang['help_access'][2] = '2. On the page of permissions (for a group or a user) the private category will be shown and you\'ll be able to authorize access or not.';
+  $lang['help_infos'][2] = 'If you have any question, do not hesitate to take a look at the forum or ask a question there. The <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> (message board) is available on the presentation site of PhpWebGallery.';
+  $lang['step1_err_copy'] = 'Copy the text between hyphens and paste it into the file "include/mysql.inc.php"(Warning : mysql.inc.php must only contain what is in blue, no line return or space character)';
+  $lang['permuser_only_private'] = 'Bare pivate album blir vist';
+  $lang['waiting_update'] = 'Godkjente bilder blir bare vist når databasen er oppdatert.';
+  $lang['conf_upload_available_info'] = 'Godkjenne brukerenes opplasting av bilder(ikke på en fjernserver). Dette er et generelt valg, det er fremdeles nødvendig å godkjenne opplasting for hvert enkelt album. Som forhåndsvalg er ingen album åpnet for opplasting av bilder.';
+  $lang['install_help'] = 'Need help ? Ask your question on <a href="http://forum.phpwebgallery.net">PhpWebGallery message board</a>.';
+  $lang['install_warning'] = 'The file "admin/install.php" is still present. Please remove it from your server. It is not secure to keep it.';
+  // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'This category is unknown in the database';
+}
+?>
Index: /branches/1.3/language/portuguese-br.php
===================================================================
--- /branches/1.3/language/portuguese-br.php	(revision 3252)
+++ /branches/1.3/language/portuguese-br.php	(revision 3252)
@@ -0,0 +1,548 @@
+<?php
+/***************************************************************************
+ *                                português.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Alexandre Weffort Thenorio		                   *
+ *                                                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+$lang['only_members'] = 'Acesso Restrito a membros';
+$lang['invalid_pwd'] = 'Password inválido!';
+$lang['access_forbiden'] = 'Você não está autorizado a acessar está pagina';
+$lang['submit'] = 'Modificar';
+$lang['login'] = 'login';
+$lang['password'] = 'senha';
+$lang['new'] = 'nova';
+$lang['delete'] = 'deletar';
+$lang['category'] = 'categoria';
+$lang['thumbnail'] = 'miniatura';
+$lang['date'] = 'data';
+$lang['diapo_default_page_title'] = 'Nenhuma categoria selecionada';
+$lang['thumbnails'] = 'Miniaturas';
+$lang['categories'] = 'Categorias';
+$lang['hint_category'] = 'mostrar imagens na raíz dessa categoria';
+$lang['total_images'] = 'total';
+$lang['title_menu'] = 'Menu';
+$lang['change_login'] = 'mudar usuário';
+$lang['login'] = 'login';
+$lang['hint_login'] = 'identifição permite personalizar a aparencia deste site';
+$lang['logout'] = 'sair';
+$lang['customize'] = 'personalizar';
+$lang['hint_customize'] = 'personalizar a aparencia da galeria';
+$lang['hint_search'] = 'procurar';
+$lang['search'] = 'procurar';
+$lang['favorite_cat'] = 'favoritos';
+$lang['favorite_cat_hint'] = 'mostrar favoritos';
+$lang['about'] = 'sobre';
+$lang['hint_about'] = 'mais informação em PhpWebGallery...';
+$lang['admin'] = 'administrador';
+$lang['hint_admin'] = 'disponível somente para adiministradores';
+$lang['no_category'] = 'Nenhuma categoria selecionada<br />por favor selecione uma categoria no menu';
+$lang['page_number'] = 'número da página';
+$lang['previous_page'] = 'Anterior';
+$lang['next_page'] = 'Próximo';
+$lang['nb_image_category'] = 'número de imagens nesta categoria';
+$lang['recent_image'] = 'imagem nos últimos';
+$lang['days'] = 'dias';
+$lang['send_mail'] = 'Algum comentário? Me mande um e-mail';
+$lang['title_send_mail'] = 'Um comentário no seu site';
+$lang['sub-cat'] = 'subcategorias';
+$lang['images_available'] = 'imagens nesta categoria';
+$lang['total'] = 'imagens';
+$lang['upload_picture'] = 'Adicionar uma imagem';
+$lang['registration_date'] = 'registrado em';
+$lang['creation_date'] = 'criado em';
+$lang['comment'] = 'comentário';
+$lang['author'] = 'autor';
+$lang['size'] = 'tamanho';
+$lang['filesize'] = 'tamanho do arquivo';
+$lang['file'] = 'arquivo';
+$lang['generation_time'] = 'Página gerada em';
+$lang['favorites'] = 'Favoritos';
+$lang['search_result'] = 'Resultados da procura';
+$lang['about_page_title'] = 'Sobre PhpWebGallery';
+$lang['about_title'] = 'Sobre...';
+$lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Informação sobre PhpWebGallery</div>
+<ul>
+  <li>Esse website usa <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> release '.$conf['version'].'. PhpWebGallery é uma aplicação da web que te dá a possibilidade de facilmente criar uma galeria de imagens online.</li>
+  <li>Técnicamente, PhpWebGallery é completamente desenvolvida com PHP (the elePHPant) com uma base de dados MySQL (the SQuirreL).</li>
+  <li>Se vc tem alguma sugestão ou comentários, por favor visitar o site oficial da <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> , e o <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> dedicado.</li>
+</ul>';
+$lang['about_return'] = 'Voltar';
+$lang['ident_page_title'] = 'Identificação';
+$lang['ident_title'] = 'Identificação';
+$lang['ident_register'] = 'Registrar-se';
+$lang['ident_forgotten_password'] = 'Esqueceu sua senha ?';
+$lang['ident_guest_visit'] = 'Ir para a galeria como um visitante';
+$lang['customize_page_title'] = 'Personalização';
+$lang['customize_title'] = 'Personalização';
+$lang['customize_nb_image_per_row'] = 'número de imagens por linha';
+$lang['customize_nb_row_per_page'] = 'número de linhas por página';
+$lang['customize_language'] = 'língua';
+$lang['maxwidth'] = 'comprimento máximo das imagens';
+$lang['maxheight'] = 'altura máxima das imagens';
+$lang['err_maxwidth'] = 'comprimento máximo deve ser um número superior a 50';
+$lang['err_maxheight'] = 'altura máxima deve ser um númeor superior a 50';
+$lang['previous_image'] = 'Anterior';
+$lang['next_image'] = 'Próximo';
+$lang['back'] = 'Clique na imagem para voltar para a página de miniaturas';
+$lang['info_image_title'] = 'Informação da imagem';
+$lang['link_info_image'] = 'Modificar informação';
+$lang['true_size'] = 'Tamanho real';
+$lang['comments_title'] = 'Comentários dos usuário do site';
+$lang['comments_del'] = 'deletar este comentário';
+$lang['comments_add'] = 'Adicionar um comentário';
+$lang['month'][1] = 'Janeiro';
+$lang['month'][2] = 'Fevereiro';
+$lang['month'][3] = 'Março';
+$lang['month'][4] = 'Abril';
+$lang['month'][5] = 'Maio';
+$lang['month'][6] = 'Junho';
+$lang['month'][7] = 'Julho';
+$lang['month'][8] = 'Augosto';
+$lang['month'][9] = 'Setembro';
+$lang['month'][10] = 'Outubro';
+$lang['month'][11] = 'Novembro';
+$lang['month'][12] = 'Dezembro';
+$lang['day'][0] = 'Domingo';
+$lang['day'][1] = 'Segunda-Feira';
+$lang['day'][2] = 'Terça-Feira';
+$lang['day'][3] = 'Quarta-Feira';
+$lang['day'][4] = 'Quinta-Feira';
+$lang['day'][5] = 'Sexta-Feira';
+$lang['day'][6] = 'Sábado';
+$lang['add_favorites_alt'] = 'Adicionar aos favoritos';
+$lang['add_favorites_hint'] = 'Adicione essa imagem ao seus favoritos';
+$lang['del_favorites_alt'] = 'Deletar dos favoritos';
+$lang['del_favorites_hint'] = 'Deletar essa imagem do seus favoritos';
+$lang['register_page_title'] = 'Registro';
+$lang['register_title'] = 'Registro';
+$lang['reg_err_login1'] = 'Por favor, digite um nome de usuário';
+$lang['reg_err_login2'] = 'nome de usuário não pode terminar com um espaço';
+$lang['reg_err_login3'] = 'nome de usuário não pode começar com um espaço';
+$lang['reg_err_login4'] = 'nome de usuário não podem conter caracteres " e \'';
+$lang['reg_err_login5'] = 'esse nome de usuário ja está sendo usado';
+$lang['reg_err_pass'] = 'por favor, digite a sua senha de novo';
+$lang['reg_confirm'] = 'confirmar';
+$lang['reg_err_mail_address'] = 'endereço de email deve ser do tipo xxx@yyy.eee (exemplo : jack@altern.org)';
+$lang['search_title'] = 'Procurar';
+$lang['invalid_search'] = 'a busca deve ser feita com 3 caracteres ou mais';
+$lang['search_field_search'] = 'Procurar';
+$lang['search_return_main_page'] = 'Retornar a página de miniaturas';
+$lang['upload_forbidden'] = 'Você não pode adicionar imagens a essa categoria';
+$lang['upload_file_exists'] = 'O nome da imagem já está sendo usado';
+$lang['upload_filenotfound'] = 'Você tem que escolher um formato para o arquivo da imagem';
+$lang['upload_cannot_upload'] = 'não é possível adicionar a foto no servidor';
+$lang['upload_title'] = 'Adicionar uma imagem';
+$lang['upload_advise'] = 'Escolha uma imagem para colocar na categoria : ';
+$lang['upload_advise_thumbnail'] = 'Opcional, mas recomendado : escolha uma miniatura para associar a esta imagem ';
+$lang['upload_advise_filesize'] = 'o tamanho do arquivo não pode exceder : ';
+$lang['upload_advise_width'] = 'o comprimento da imagem não pode exceder : ';
+$lang['upload_advise_height'] = 'a altura da imagem não pode exceder : ';
+$lang['upload_advise_filetype'] = 'a imagem deve ser no formato jpg, gif or png';
+$lang['upload_err_username'] = 'o nome do usuário deve ser provido';
+$lang['upload_username'] = 'Nome do usuário';
+$lang['upload_successful'] = 'Imagem adicionada com sucesso, um administrador irá validá-la assim que possível';
+// new or modified in release 1.3
+$lang['charset'] = 'iso-8859-1';
+$lang['no'] = 'não';
+$lang['yes'] = 'sim';
+$lang['guest'] = 'convidado';
+$lang['mail_address'] = 'endereço de email';
+$lang['public'] = 'público';
+$lang['private'] = 'privado';
+$lang['add'] = 'adicionar';
+$lang['dissociate'] = 'dissociate';
+$lang['mandatory'] = 'obrigatório';
+$lang['err_date'] = 'data errada';
+$lang['picture'] = 'imagem';
+$lang['IP'] = 'IP';
+$lang['close'] = 'fechar';
+$lang['open'] = 'abrir';
+$lang['keywords'] = 'palavras chave';
+$lang['errors_title'] = 'Erros';
+$lang['infos_title'] = 'Informações';
+$lang['default'] = 'default';
+$lang['comments'] = 'comentários';
+$lang['category_representative'] = 'representante';
+$lang['stats'] = 'statísticas';
+$lang['most_visited_cat_hint'] = 'mostrar imagens mais visitadas';
+$lang['most_visited_cat'] = 'mais visitadas';
+$lang['best_rated_cat_hint'] = 'mostrar imagens com melhores notas';
+$lang['best_rated_cat'] = 'imagens com melhores notas';
+$lang['recent_cat_hint'] = 'mostrar imagens mais recentes';
+$lang['recent_cat'] = 'mais recentes';
+$lang['recent_cat_title'] = 'Imagens recentes';
+$lang['visited'] = 'visitada';
+$lang['times'] = 'vezes';
+$lang['customize_theme'] = 'tema da interface';
+$lang['customize_expand'] = 'expandir todas as categorias';
+$lang['customize_show_nb_comments'] = 'mostrar número de comentários';
+$lang['customize_short_period'] = 'período curto';
+$lang['customize_long_period'] = 'período longo';
+$lang['customize_template'] = 'moldes';
+$lang['err_periods'] = 'períodos devem ser valores integrais';
+$lang['err_periods_2'] = 'períodos devem ser superior a 0. O período longo deve ser maior do que o período curto.';
+$lang['create_cookie'] = 'criar um cookie';
+$lang['customize_day'] = 'dia';
+$lang['customize_week'] = 'semana';
+$lang['customize_month'] = 'mês';
+$lang['customize_year'] = 'ano';
+$lang['slideshow'] = 'slideshow';
+$lang['period_seconds'] = 'segundos por foto';
+$lang['slideshow_stop'] = 'parar slideshow';
+$lang['comment_added'] = 'Seu comentário foi registrado';
+$lang['comment_to_validate'] = 'Um adiministrador deve autorizar o seu comentário antes que ele seja feito visível.';
+$lang['comment_anti-flood'] = 'Sistema Anti-flood : por favor espera um momento antes de tentar colocar outro comentário';
+$lang['comment_user_exists'] = 'Esse nome de usuário já está sendo usado';
+$lang['invalid_search'] = 'Palavras procuradas devem ser maiores do que 3 caracteres e não devem conter sinais de pontuação';
+$lang['search_mode_or'] = 'pelo menos uma palavra';
+$lang['search_mode_and'] = 'todas as palavras';
+$lang['search_comments'] = 'separar palavras diferentes com espaços';
+$lang['upload_name'] = 'Nome da imagem';
+$lang['upload_author'] = 'Autor (ex "Pierrick LE GALL")';
+$lang['upload_creation_date'] = 'Data de criação (DD/MM/YYYY)';
+$lang['upload_comment'] = 'Comentário';
+$lang['mail_hello'] = 'Olá,';
+$lang['mail_new_upload_subject'] = 'Nova imagem no website';
+$lang['mail_new_upload_content'] = 'Uma nova imagem foi adicionada na galeria. Está esperando pela sua validação. Vá ao painel de administração paa autorizar ou recusar essa imagem.';
+$lang['mail_new_comment_subject'] = 'Novo comentário no website';
+$lang['mail_new_comment_content'] = 'Um novo comentário foi registrado na galeria. Se você escolheu validar cada comentário, você tem que validar primeiro esse comentário no painel de administração para torná-lo visível na galeria.'."\n\n".'Você pode ver os últimos comentários no painel de administração';
+$lang['connected_user'] = 'usuário conectado';
+$lang['title_comments'] = 'Comentários do usuários';
+$lang['stats_last_days'] = 'últimos dias';
+$lang['hint_comments'] = 'Ver últimos comentários';
+$lang['menu_login'] = 'usuário';
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+  $lang['title_liste_users'] = 'Lista de usuários';
+  $lang['title_history'] = 'Histórico';
+  $lang['title_update'] = 'Atualizar base de dados';
+  $lang['title_configuration'] = 'Configuração da PhpWebGallery';
+  $lang['title_instructions'] = 'Instruções';
+  $lang['title_categories'] = 'Administraçãode categorias';
+  $lang['title_edit_cat'] = 'Editar uma categoria';
+  $lang['title_info_images'] = 'Modificar informação de uma imagem de uma categoria';
+  $lang['title_thumbnails'] = 'Criação de miniatura';
+  $lang['title_thumbnails_2'] = 'para';
+  $lang['title_default'] = 'Administração PhpWebGallery';
+  $lang['menu_title'] = 'Administração';
+  $lang['menu_config'] = 'Configuração';
+  $lang['menu_users'] = 'Usuários';
+  $lang['menu_add_user'] = 'adicionar';
+  $lang['menu_list_user'] = 'lista';
+  $lang['menu_categories'] = 'Categorias';
+  $lang['menu_update'] = 'Update base de dados';
+  $lang['menu_thumbnails'] = 'Miniaturas';
+  $lang['menu_history'] = 'Histórico';
+  $lang['menu_instructions'] = 'Instruções';
+  $lang['menu_back'] = 'Voltar as galerias';
+  $lang['title_waiting'] = 'Imagens esperando por validação';
+  $lang['menu_waiting'] = 'Espera';
+  $lang['default_message'] = 'Painel de administração PhpWebGallery';
+  $lang['conf_err_prefixe'] = 'o prefixo da miniatura não deve conter nenhum caractere acentuado';
+  $lang['conf_err_mail'] = 'endereço de e-mail recusado, deve ser do tipo name@server.com';
+  $lang['conf_err_sid_size'] = 'O tamanho do identificador da sessão deve ser um valor integral entre 4 e 50';
+  $lang['conf_err_sid_time'] = 'o tempo da sessão deve ser um valor integral entre 5 e 60';
+  $lang['conf_err_max_user_listbox'] = 'o lista do máximo de usuários deve ser um valor integral entre 0 e 255';
+  $lang['conf_confirmation'] = 'Dado de informação registrado na base de dados';
+  $lang['conf_general_title'] = 'Configuração principal';
+  $lang['conf_general_webmaster'] = 'login do webmaster';
+  $lang['conf_general_webmaster_info'] = 'Será mostrado aos visitantes. É necessário para a administração do website';
+  $lang['conf_general_mail'] = 'endereço de email do webmaster';
+  $lang['conf_general_mail_info'] = 'Visitantes podem contatar nesse endereço';
+  $lang['conf_general_prefix'] = 'prefixo da miniatura';
+  $lang['conf_general_prefix_info'] = 'Miniaturas usam esse prefixo. Não preencha se você está incerto.';
+  $lang['conf_general_access'] = 'tipo de acesso';
+  $lang['conf_general_access_1'] = 'livre';
+  $lang['conf_general_access_2'] = 'restrito';
+  $lang['conf_general_access_info'] = '- livre : qualquer um pode entrar no site, qualquer visitante pode criar uma conta para poder personalizar a aparencia do website<br />- restrito : o webmaster cria as contas. Somenete usuários registrados podem entrar no site';
+  $lang['conf_general_max_user_listbox'] = 'lista do número máximo de usuários';
+  $lang['conf_general_max_user_listbox_info'] = '- esse é o númeor máximo de usuário que a PhpWebGallery mostra na lista em vez de uma simples caixa de texto na página de identificação<br />- entre com um númeor entre 0 e 255, 0 significa que você quer mostrar a lista';
+  $lang['conf_comments'] = 'comentários dos usuários';
+  $lang['conf_comments_title'] = 'Configuração dos '.$lang['conf_comments'];
+  $lang['conf_comments_show_comments'] = $lang['conf_comments'];
+  $lang['conf_comments_show_comments_info'] = 'mostrar os comentários dos usuários embaixo de cada imagem ?';
+  $lang['conf_comments_comments_number'] = 'número de comentários por página';
+  $lang['conf_comments_comments_number_info'] = 'número de comentários para mostrar em cada página. Esse número é ilimitado para uma imagem. Digite um número entre 5 e 50.';
+  $lang['conf_err_comment_number'] = 'O número de comentários de uma página deve ser entre 5 e 50 incluso.';
+  $lang['conf_remote_site_delete_info'] = 'Deletar um servidor remoto irá deletar todas as imagens e categorias relacionadas com esse servidor.';
+  $lang['conf_upload_title'] = 'Configuração do upload dos usuários';
+  $lang['conf_upload_available'] = 'autorizou a adição de imagens';
+  $lang['conf_upload_maxfilesize'] = 'tamanho do arquivo máximo';
+  $lang['conf_upload_maxfilesize_info'] = 'Tamanho do arquivo máximo para imagens adicionadas. Deve ser um número entre 10 e 1000 KB.';
+  $lang['conf_err_upload_maxfilesize'] = 'O tamanha de arquivo máximo para as imagens adicionadas deve ser um número entre 10 e 1000 KB.';
+  $lang['conf_upload_maxwidth'] = 'comprimento máximo';
+  $lang['conf_upload_maxwidth_info'] = 'Comprimento máximo autorizado para as imagens adicionadas. Deve ser um número maior que 10 pixels';
+  $lang['conf_err_upload_maxwidth'] = 'o comprimento máximo autorizado para as imagens adicionadas deve ser um número maior que 10 pixels.';
+  $lang['conf_upload_maxheight'] = 'altura máxima';
+  $lang['conf_upload_maxheight_info'] = 'Altura máximo autorizada para as imagens adicionadas. Deve ser um número maior que 10 pixels';
+  $lang['conf_err_upload_maxwidth'] = 'altura máxima autorizada para as imagens adicionadas deve ser um númeor maior que 10 pixels.';
+  $lang['conf_upload_maxwidth_thumbnail'] = 'comprimento máximo das miniaturas';
+  $lang['conf_upload_maxwidth_thumbnail_info'] = 'Comprimento máximo autorizado para as miniaturas adicionas. Deve ser um número maior que 10 pixels';
+  $lang['conf_err_upload_maxwidth_thumbnail'] = 'O comprimento máximo autorizado para as minituras adicionadas deve ser maior que 10 pixels.';
+  $lang['conf_upload_maxheight_thumbnail'] = 'altura máxima das miniaturas';
+  $lang['conf_upload_maxheight_thumbnail_info'] = 'Altura máxima autorizada para as miniaturas adicionadas. Deve ser um número maior que 10 pixels';
+  $lang['conf_err_upload_maxheight_thumbnail'] = 'A altura máxima autorizada para as miniaturas adicionadas deve ser um número maior que 10 pixels.';
+  $lang['conf_default_title'] = 'Configuração de display padrão para visitantes não registrados e novas contas';
+  $lang['conf_default_language_info'] = 'língua padrão';
+  $lang['conf_default_theme_info'] = 'tema padrão';
+  $lang['conf_session_title'] = 'Configuração das sessões';
+  $lang['conf_session_size'] = 'tamanho do identificador';
+  $lang['conf_session_size_info'] = '- quanto maior o identificador, mais seguro é o seu site<br />- digite um número entre 4 e 50';
+  $lang['conf_session_time'] = 'período de validade';
+  $lang['conf_session_time_info'] = '- quanto mais curto o período de validade, mais seguro é o seu site<br />- digite um número entre 5 e 60, em minutos';
+  $lang['conf_session_key'] = 'palavra-chave';
+  $lang['conf_session_key_info'] = '- a palavra-chave da sessão melhora a codificação do identificador da sessão<br />- digite qualquer sentença menor que 255 caracteres';
+  $lang['conf_session_delete'] = 'deletar sessões vencidas';
+  $lang['conf_session_delete_info'] = 'é recomendado esvaziar a tabela da base de dados da sessão, porque sessões vencidas continuam na base de dados (mas não causa nenhum problema de segurança)';
+  $lang['user_err_modify'] = 'Esse usuário não pode ser modificado ou deletado';
+  $lang['user_err_unknown'] = 'Esse usuário não existe na base de dados';
+  $lang['adduser_info_message'] = 'Informações registradas na base de dados para o usuário';
+  $lang['adduser_info_password_updated'] = '(senha atualizada)';
+  $lang['adduser_info_back'] = 'voltar para lista de usuários';
+  $lang['adduser_fill_form'] = 'Por favor preencha o seguinte formulário';
+  $lang['adduser_unmodify'] = 'não modificável';
+  $lang['adduser_status'] = 'status';
+  $lang['adduser_status_admin'] = 'admin';
+  $lang['adduser_status_guest'] = 'visitante';
+  $lang['permuser_info_message'] = 'Permissões registradas';
+  $lang['permuser_title'] = 'Restrições para usuário';
+  $lang['permuser_warning'] = 'Aviso : um "<span style="font-weight:bold;">acesso proibido</span>" a raíz de uma categoria previne o acesso de toda a categoria';
+  $lang['permuser_authorized'] = 'autorizado';
+  $lang['permuser_forbidden'] = 'proibido';
+  $lang['permuser_parent_forbidden'] = 'categoria mãe proibida';
+  $lang['listuser_confirm'] = 'Você quer realmente deletar este usuário';
+  $lang['listuser_info_deletion'] = 'foi removido da base de dados';
+  $lang['listuser_user_group'] = 'Grupo de usuários';
+  $lang['listuser_modify'] = 'modificar';
+  $lang['listuser_modify_hint'] = 'modificar informação de';
+  $lang['listuser_permission'] = 'permissões';
+  $lang['listuser_permission_hint'] = 'modificar permissões de';
+  $lang['listuser_delete'] = 'deletar';
+  $lang['listuser_delete_hint'] = 'deletar usuário';
+  $lang['listuser_button_all'] = 'todos';
+  $lang['listuser_button_invert'] = 'inverter';
+  $lang['listuser_button_create_address'] = 'criar endereço de email';
+  $lang['cat_invisible'] = 'invisível';
+  $lang['cat_edit'] = 'Editar';
+  $lang['cat_up'] = 'Subir';
+  $lang['cat_down'] = 'Descer';
+  $lang['cat_image_info'] = 'Informação das imagens';
+  $lang['cat_total'] = 'total';
+  $lang['editcat_confirm'] = 'Informação registrada na base de dados';
+  $lang['editcat_back'] = 'categorias';
+  $lang['editcat_title1'] = 'Opções para';
+  $lang['editcat_name'] = 'Nome';
+  $lang['editcat_comment'] = 'Comentário';
+  $lang['editcat_status'] = 'Status';
+  $lang['infoimage_general'] = 'Opções gerais para a categoria';
+  $lang['infoimage_useforall'] = 'usar em todas as imagens ?';
+  $lang['infoimage_creation_date'] = 'data de criação';
+  $lang['infoimage_detailed'] = 'Opção para cada imagem';
+  $lang['infoimage_title'] = 'título';
+  $lang['infoimage_comment'] = 'comentário';
+  $lang['update_missing_tn'] = 'a miniatura está faltando para';
+  $lang['update_disappeared_tn'] = 'a miniatura desapareceu';
+  $lang['update_disappeared'] = 'não existe';
+  $lang['update_part_deletion'] = 'Deleção de imagens que não tem miniatura ou que não existem';
+  $lang['update_deletion_conclusion'] = 'imagens removidas da base de dados';
+  $lang['update_part_research'] = 'Procurar por novas imagens nos diretórios';
+  $lang['update_research_added'] = 'adicionada';
+  $lang['update_research_tn_ext'] = 'miniatura em';
+  $lang['update_research_conclusion'] = 'imagens adicionadas a base de dados';
+  $lang['update_default_title'] = 'Escolha um opção';
+  $lang['update_only_cat'] = 'atualizar categorias e não as imagens';
+  $lang['update_all'] = 'atualizar tudo';
+  $lang['tn_width'] = 'comprimento';
+  $lang['tn_height'] = 'altura';
+  $lang['tn_no_support'] = 'Imagem fora de alcance ou sem suporte';
+  $lang['tn_format'] = 'para o formato do arquivo';
+  $lang['tn_thisformat'] = 'para esse formato de arquivo';
+  $lang['tn_err_width'] = 'comprimento deve ser um número maior que';
+  $lang['tn_err_height'] = 'altura deve ser um númeor maior que';
+  $lang['tn_results_title'] = 'Resultados da miniaturização';
+  $lang['tn_picture'] = 'imagem';
+  $lang['tn_results_gen_time'] = 'gerada em';
+  $lang['tn_stats'] = 'Estatísticas gerais';
+  $lang['tn_stats_nb'] = 'número de imagens miniaturizadas';
+  $lang['tn_stats_total'] = 'tempo total';
+  $lang['tn_stats_max'] = 'tempo máximo';
+  $lang['tn_stats_min'] = 'tempo mínimo';
+  $lang['tn_stats_mean'] = 'tempo médio';
+  $lang['tn_err'] = 'Você cometeu erros';
+  $lang['tn_params_title'] = 'Parâmetros da miniaturização';
+  $lang['tn_params_GD'] = 'Versão da GD';
+  $lang['tn_params_GD_info'] = '- GD é a biblioteca de manipulação de imagens para PHP<br />-escolha a versão instalada no seu servidor. Se você escolher a versão errada, você apenas terá mensagens de erro, volte com o seu navegador e escolha a outra versão. Se nenhuma das versões funciona, significa que o seu servidor não suporta GD.';
+  $lang['tn_params_width_info'] = 'comprimento máximo que as miniaturas podem tomar';
+  $lang['tn_params_height_info'] = 'altura máxima que as miniaturas podem tomar';
+  $lang['tn_params_create'] = 'criar';
+  $lang['tn_params_create_info'] = 'Não tenta miniaturizar muitas imagens ao mesmo tempo.<br />Realmente, a miniaturização consume muito do CPU. Se você instalou PhpWebGallery num provedor de graça, uma carga muito pesada do CPU pode, algumas vezes, levar a deleção do seu website.';
+  $lang['tn_params_format'] = 'formato do arquivo';
+  $lang['tn_params_format_info'] = 'somente o formato jpeg é suportado para a criação de miniaturas';
+  $lang['tn_alone_title'] = 'imagens sem miniatura (jpeg e png sommente)';
+  $lang['tn_dirs_title'] = 'Lista de diretórios';
+  $lang['tn_dirs_alone'] = 'imagens sem miniatura';
+  $lang['help_images_title'] = 'Adicionando imagens';
+  $lang['help_images_intro'] = 'Como colocar imagens no seus diretórios';
+  $lang['help_images'][0] = 'no diretório "galleries", crie diretórios que irão representar as suas categorias';
+  $lang['help_images'][1] = 'em cada diretório, você pode criar quantos sub-diretórios você quiser.';
+  $lang['help_images'][2] = 'você pode criar quantas categorias e sub-categorias para cada categoria que você quiser';
+  $lang['help_images'][3] = 'arquivos das imagens deve ser no fomrato jpeg (extensões jpg ou JPG), formato gif (extensões gif ou GIF) ou formato png (extensões png ou PNG).';
+  $lang['help_images'][4] = 'tente não usar espaços em branco " " ou hífen "-" nos arquivos das imagens, Eu recomendo você usar o caractere de sublinhado "_" que é suportado pela PhpWebGallery e irá prover melhores resultados';
+  $lang['help_thumbnails_title'] = 'Miniaturas';
+  $lang['help_thumbnails'][0] = 'em cada diretório contendo imagens que serão mostradas no seu site, existe um sub-diretório chamado "thumbnail", se não existe, crie-o para por suas miniaturas dentro dele.';
+  $lang['help_thumbnails'][1] = 'miniaturas não precisam ter a mesma extensão a imagem que associam (uma imagem com extensão .jpg pode ter uma miniatura em extensão .GIF por exemplo).';
+  $lang['help_thumbnails'][2] = 'a miniatura associada a uma imagem deve ter um prefixo de acordo com o prefixo dado na página de configuração(image.jpg -> TN_image.GIF por exemplo).';
+  $lang['help_thumbnails'][3] = 'Eu recomendo que você use o módulo para Windows que pode ser pego no site de apresentação da PhpWebGallery para a administração e criação de miniaturas.';
+  $lang['help_thumbnails'][4] = 'você pode usar a página de criação de miniaturas integrada na PhpWebGallery, mas eu não recomendo você a fazer isso porque a qualidade das miniaturas poderão sair ruins e usa uma carga de CPU alta que pode ser um problema se você usa um servidor de graça.';
+  $lang['help_thumbnails'][5] = 'se você decidir usar o seu provedor para criar miniaturas, você deve dar permissão 775 no diretório "galleries" e todos os seus sub-diretórios.';
+  $lang['help_database_title'] = 'Atualizando a base de dados';
+  $lang['help_database'][0] = 'uma vez que arquivos de imagens e miniaturas forem corretamente colocadas nos diretórios, clique em "Atualizar base de dados" no menu do painel de administração.';
+  $lang['help_infos_title'] = 'Informações em geral';
+  $lang['help_infos'][1] = 'Assim que você criar sua galeria, vá na lista de usuários e modifique as permissões para o usuário "convidado". Realmente, cada usuário novo registrado terá por padrão as mesmas permissões que o usuário "convidado".';
+  $lang['help_remote_title'] = 'Site remoto';
+  $lang['help_remote'][0] = 'PhpWebGallery oferece a possibilidade de usar vários servidores para guardar as imagens que farão a sua galeria. Pode ser útil se a sua galeria está instalada num lugar com espaço limitado e você tem uma grande quantidade de imagens para serem mostradas. Por favor, siga esse procedimento : ';
+  $lang['help_remote'][1] = '1. edite o arquivo "create_listing_file.php" (você irá encontra-lo no diretório "admin"), modificando a linha "$prefix_thumbnail = "TN-";" se o prefixo das suas miniaturas não é "TN-".';
+  $lang['help_remote'][2] = '2. coloque o arquivo "create_listing_file.php" modificado no seu website com imagens, no diretório raíz do seu diretórios de imagens  (como o diretório "galleries" desse website) por ftp.';
+  $lang['help_remote'][3] = '3. rode o script usando a url http://seuSiteComFotos/DiretórioDasImagens/create_listing_file.php, e o arquivo listing.xml irá ser criado.';
+  $lang['help_remote'][4] = '4. pegue o arquivo listing.xml do site e coloque no diretório "admin" desse website.';
+  $lang['help_remote'][5] = '5. por favor, de uma atualização dos dados das imagen pela interface de administração, uma vez usado o arquivo listing.xml, delete-o do diretório "admin".';
+  $lang['help_remote'][6] = 'Você pode atualizar o conteúdo de um website distante apenas refazendo os passos acima. Você também pode retirar um website distante escolhendo a opção na seção de configuração do painel de administração.';
+  $lang['help_upload_title'] = 'Imagens adicionadas por usuários';
+  $lang['help_upload'][0] = 'PhpWebGallery oferece a possibilidade para usuários adicionarem imagens. para faze-lo :';
+  $lang['help_upload'][1] = '1. autorize a opção na zona de configuração do painel de administração';
+  $lang['help_upload'][2] = '2. autoriza os direitos de escrita nos diretórios das imagens';
+  $lang['install_message'] = 'Mensagem';
+  $lang['step1_confirmation'] = 'Parametros estão corretos';
+  $lang['step1_err_db'] = 'Conexão ao servidor feita com sucesso, mas foi impossível conectar a base de dados';
+  $lang['step1_err_server'] = 'Não foi possível conectar ao servidor';
+  $lang['step1_err_copy_2'] = 'O próximo passo da instalação está disponível';
+  $lang['step1_err_copy_next'] = 'próximo passo';
+  $lang['step1_title'] = 'Passo 1/2';
+  $lang['step1_host'] = 'MySQL host';
+  $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
+  $lang['step1_user'] = 'usuário';
+  $lang['step1_user_info'] = 'login do usuário provido pelo seu servidor';
+  $lang['step1_pass'] = 'Senha';
+  $lang['step1_pass_info'] = 'senha do usuário provido pelo seu servidor';
+  $lang['step1_database'] = 'Nome da base de dados';
+  $lang['step1_database_info'] = 'também provido pelo seu servidor';
+  $lang['step1_prefix'] = 'Prefixo da tabela na base de dados';
+  $lang['step1_prefix_info'] = 'os nomes das tabelas na base de dados terão esse prefixo (possibilita uma melhor administração de suas tabelas)';
+  $lang['step2_err_login1'] = 'digite um nome de usuário para o webmaster';
+  $lang['step2_err_login3'] = 'nome de usuário do webmaster não pode conter caracteres como \' or "';
+  $lang['step2_err_pass'] = 'por favor digite sua senha de novo';
+  $lang['step2_err_mail'] = $lang['conf_err_mail'];
+  $lang['install_end_title'] = 'Instalação completa';
+  $lang['install_end_message'] = 'A configuração da PhpWebGallery terminou, aqui está o próximo passo<br /><br />
+Por razões de segurança, por favor delete o arquivo "install.php" no diretório "admin"<br />
+Feito isso, siga essas instruções :
+<ul>
+  <li>vá para a página de identificação : [ <a href="../identification.php">identificação</a> ] e use o nome de usuário/senha dada para o webmaster</li>
+  <li>esse nome de usuário irá possibilitar você acessar o [ <a href="admin.php">painel de administração</a> ] e as instruções para por as imagens nos seus diretórios</li>
+</ul>';
+  $lang['step2_title'] = 'Passo 2/2';
+  $lang['step2_pwd'] = 'senha do webmaster';
+  $lang['step2_pwd_info'] = 'Mantenha confidencial, permite você acessar o painel de administração';
+  $lang['step2_pwd_conf'] = 'confirmar senha';
+  $lang['step2_pwd_conf_info'] = 'verificação';
+  // new or modified in release 1.3
+  $lang['remote_site'] = 'Site remoto';
+  $lang['title_add'] = 'Adicionar usuário';
+  $lang['title_modify'] = 'Modificar um usuário';
+  $lang['title_groups'] = 'Administração de grupos';
+  $lang['title_user_perm'] = 'Modificar permissões para usuário';
+  $lang['title_cat_perm'] = 'Modificar permissões para categoria';
+  $lang['title_group_perm'] = 'Modificar permissões para grupo';
+  $lang['title_picmod'] = 'Modificar informações sobre uma imagem';
+  $lang['menu_groups'] = 'Grupos';
+  $lang['menu_comments'] = 'Comentários';
+  $lang['conf_general_log'] = 'histórico';
+  $lang['conf_general_log_info'] = 'Manter um histórico de visitas no seu website ? As visitas serão mostradas na seção do histórico no painel de administração';
+  $lang['conf_general_mail_notification'] = 'Notificação por email';
+  $lang['conf_general_mail_notification_info'] = 'Notificação automática por email para administradores (e somente para eles) quando um usuário adiciona um comentário ou uma imagem.';
+  $lang['conf_comments_validation'] = 'validação';
+  $lang['conf_comments_validation_info'] = 'Um administrador valida os comentários adicionados por usuários antes de eles serem tornado visíveis no site';
+  $lang['conf_comments_forall'] = 'para todos ?';
+  $lang['conf_comments_forall_info'] = 'Até mesmo convidados não registrados podem colocar comentários';
+  $lang['conf_default_nb_image_per_row_info'] = 'número de imagens por cada linha como padrão';
+  $lang['conf_default_nb_row_per_page_info'] = 'número de linhas por página como padrão';
+  $lang['conf_default_short_period_info'] = 'Por dias. Período com que uma figura é mostrada com uma marca vermelha. O período curto deve ser superior a 1 dia.';
+  $lang['conf_default_long_period_info'] = 'Por dias. Período com que uma figura é mostrada com uma marca verde. O longo período deve ser superior ao curto período.';
+  $lang['conf_default_expand_info'] = 'expandir todas as categorias como padrão no menu ?';
+  $lang['conf_default_show_nb_comments_info'] = 'mostra o número de comentários para cada imagem na página de f comments for each picture on the thumbnails page';
+  $lang['conf_default_maxwidth_info'] = 'Comprimento máximo para a mostra das imagens : a imagem terá um novo comprimento somente para mostra, o arquivo da imagem não será modificado. Deixe em branco se você não deseja um limite.';
+  $lang['conf_default_maxheight_info'] = 'Assim como o comprimento máximo, mas para a altura';
+  $lang['conf_session_cookie'] = 'autorizar cookies';
+  $lang['conf_session_cookie_info'] = 'usuários não terão que fazer login em cada visita. Menos seguro.';
+  $lang['adduser_associate'] = 'Associar ao group';
+  $lang['group_add'] = 'Adicionar um grupo';
+  $lang['group_add_error1'] = 'O nome de um grupo não pode conter " ou \'';
+  $lang['group_add_error2'] = 'Esse nome já está sendo usado por outro grupo';
+  $lang['group_confirm'] = 'Você tem certeza que deseja remover esse grupo ?';
+  $lang['group_list_title'] = 'Lista de grupos existentes';
+  $lang['group_err_unknown'] = 'Esse grupo não existe na base de dados';
+  $lang['cat_permission'] = 'permissões';
+  $lang['cat_update'] = 'atualizar';
+  $lang['cat_add'] = 'Adicionar uma categoria virtual';
+  $lang['cat_parent'] = 'categoria mãe';
+  $lang['cat_error_name'] = 'O nome da categoria não pode ficar vazio';
+  $lang['cat_virtual'] = 'virtual';
+  $lang['cat_first'] = 'Mover pro topo';
+  $lang['cat_last'] = 'Mover pro fim';
+  $lang['editcat_visible_info'] = '(invisível exceto para administradores)';
+  $lang['editcat_visible'] = 'Visível';
+  $lang['editcat_uploadable'] = 'Upload disponível';
+  $lang['infoimage_keyword_separation'] = '(separe com uma vírgula ",")';
+  $lang['infoimage_addtoall'] = 'adicionar a todos';
+  $lang['infoimage_removefromall'] = 'remover de todos';
+  $lang['infoimage_associate'] = 'Associar a categoria';
+  $lang['update_wrong_dirname'] = 'O nome dos diretórios e arquivos deve ser composto de letras, símbolos, "-", "_" ou "."';
+  $lang['stats_pages_seen'] = 'páginas visitadas';
+  $lang['stats_visitors'] = 'convidados';
+  $lang['stats_empty'] = 'limpar histórico';
+  $lang['stats_pages_seen_graph_title'] = 'Númeor de páginas visitadas por dia';
+  $lang['stats_visitors_graph_title'] = 'Número de visitantes por dia';
+  $lang['comments_last_title'] = 'Últimos comentários';
+  $lang['comments_non_validated_title'] = 'Comentários esperando por validação';
+  $lang['help_database'][1] = 'Para evitar a atualização de muitas imagens em uma só atualização, Eu recomendo começar atualizando somente categorias, daí na seção de categorias do painel de administração, atualize cada categoria graças ao link "atualizar"';
+  $lang['help_upload'][3] = 'A categoria deve ter a adição de imagens disponível para adicionar imagens.';
+  $lang['help_upload'][4] = 'Imagens adicionadas por usuários não são diretamente visíveis no website, elas tem que ser validadas por um administrador.  Para isso, um administrador deve ir na página "Espera" no painel de administração, para validar ou recusar a imagem proposta, daí atuzalizar os dados da imagem.';
+  $lang['help_virtual_title'] = 'Links entre imagens, categorias e categorias virtuais';
+  $lang['help_virtual'][0] = 'PhpWebGallery pode disassociar categorias aonde imagens estão guardadas e categorias aonde imagens são mostradas.';
+  $lang['help_virtual'][1] = 'Por padrão, as imagens são mostradas somente na suas categorias reais : aquelas correspondente aos diretórios no servidor de internet.';
+  $lang['help_virtual'][2] = 'Para criar um link entre uma foto e uma categoria, você tem que somente fazer a associação na página de informações da imagems ou na informação de todas as imagens de uma categoria.';
+  $lang['help_virtual'][3] = 'Usando esse princípio, é possível criar categorias virtuais nas PhpWebGallery : nenhum diretório real corresponde a essa categoria. Você só tem que criar essa categoria na seção "categorias" no painel de administração.';
+  $lang['help_groups_title'] = 'Grupos de usuários';
+  $lang['help_groups'][0] = 'PhpWebGallery pode administrar grupos de usuários. Pode ser muito útil ter permissão de acesso comun para categorias privadas.';
+  $lang['help_groups'][1] = '1. Crie o grupo "familia" na seção "Grupos" do painel de admiistração.';
+  $lang['help_groups'][2] = '2. Na seção "Usuários", edite um deles e associe ao grupo "familia".';
+  $lang['help_groups'][3] = '3. Modificando as permissões para uma categoria ou para um grupo, você pode ver que todas as categorias acessiveis por um grupo serão acessiveis por seus membros.';
+  $lang['help_groups'][4] = 'Um usuário pode pertencer a vários grupos. A autorização é mais forte que a proibição : se um usuário "jõao" pertence ao grupo "familia" e "amigos", e se somente o grupo "familia" pode ver a categoria "Natal 2003", "jõao" poderá ver "Natal 2003".';
+  $lang['help_access_title'] = 'Autorização de acesso';
+  $lang['help_access'][0] = 'PhpWebGallery pode proibir o acesso a categorias. Categorias podem ser "pública" ou "privada". Para proibir acesso a uma categoria :';
+  $lang['help_access'][1] = '1. Modifique as informações da categoria (da seção "categorias" no painel de administração) e faça-o "privado".';
+  $lang['help_access'][2] = '2. Na página de permissões (para um grupo ou usuário) a categoria privada será mostrada e você poderá autorizar o acesso ou não.';
+  $lang['help_infos'][2] = 'Se você tem alguma pergunta, não pense duas vezes para dar uma olhada no forum ou perguntar aqui. O <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> (board de mensagens) está disponível no site de apresentação do PhpWebGallery.';
+  $lang['step1_err_copy'] = 'Copie o texto entre hífens e cole no arquivo "include/mysql.inc.php"(Aviso : mysql.inc.php deve conter somente o que está em azul, nenhum pulo de linha ou espaço)';
+  $lang['permuser_only_private'] = 'Somente categorias privadas são mostradas';
+  $lang['waiting_update'] = 'Imagens validadas serão mostradas somente depois de atualizar a base de dados';
+  $lang['conf_upload_available_info'] = 'Autorizar a adição de imagens por usuários na categorias do website (não em um servidor remoto). Esse é um parametro geral, é preciso para autorizar a adição de categoria por categoria, por padrão, nenhuma categoria é "adicionável".';
+  $lang['install_help'] = 'Precisa de ajuda ? Faça a sua pergunta em <a href="http://forum.phpwebgallery.net">Board de mensagens do PhpWebGallery</a>.';
+  $lang['install_warning'] = 'O arquivo "admin/install.php" ainda está presente. Por favor remova-o do seu servidor. Não é seguro mante-lo.';
+  // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'Essa categoria é desconhecida na base de dados';
+}
+?>
Index: /branches/1.3/language/russian.php
===================================================================
--- /branches/1.3/language/russian.php	(revision 3252)
+++ /branches/1.3/language/russian.php	(revision 3252)
@@ -0,0 +1,614 @@
+<?php
+/***************************************************************************
+ *                                russian.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+	$lang['only_members'] = "Òîëüêî çàðåãèñòðèðîâàííûå ïîëüçîâàòåëè ìîãóò îáðàòèòüñÿ ê ýòîé ñòðàíèöå";
+	$lang['invalid_pwd'] = "Íåäîïóñòèìûé ïàðîëü!";
+	$lang['access_forbiden'] = "Âû íå óïîëíîìî÷åíû îáðàòèòüñÿ ê ýòîé ñòðàíèöå";
+	$lang['submit'] = "Submit";
+	$lang['login'] = "âõîä â ñèñòåìó";
+	$lang['password'] = "ïàðîëü";
+	$lang['new'] = "íîâûé";
+	$lang['delete'] = "óäàëèòü";
+	$lang['category'] = "êàòåãîðèÿ";
+	$lang['thumbnail'] = "ýñêèç";
+	$lang['date'] = "äàòà";
+
+	$lang['diapo_default_page_title'] = "Êàòåãîðèÿ íå âûäåëåíà";
+	$lang['thumbnails'] = "Ýñêèçû";
+	$lang['categories'] = "Êàòåãîðèè";
+	$lang['hint_category'] = "ïðîñìîòðåòü èçîáðàæåíèÿ èç êîðíÿ ýòîé êàòåãîðèè";
+	$lang['total_images'] = "îáùåå êîëè÷åñòâî";
+	$lang['title_menu'] = "Ìåíþ";
+	$lang['change_login'] = "ñìåíèòü èìÿ âõîäà â ñèñòåìó";
+	$lang['login'] = "âõîä â ñèñòåìó";
+	$lang['hint_login'] = "èäåíòèôèêàöèÿ äîïóñêàåò íàñòðîéêó âèäà ñàéòà";
+	$lang['logout'] = "âûõîä èç ñèñòåìû";
+	$lang['customize'] = "íàñòðîèòü";
+	$lang['hint_customize'] = "íàñòðîéêà âèäà ãàëåðåè";
+	$lang['hint_search'] = "ïîèñê";
+	$lang['search'] = "ïîèñê";
+	$lang['favorite_cat'] = "èçáðàííîå";
+	$lang['favorite_cat_hint'] = "îòîáðàçèòü èçáðàííîå";
+	$lang['about'] = "î äâèæêå";
+	$lang['hint_about'] = "ïîäðîáíàÿ èíôîðìàöèÿ îòíîñèòåëüíî PhpWebGallery...";
+	$lang['admin'] = "admin";
+	$lang['hint_admin'] = "äîñòóïíî òîëüêî äëÿ àäìèíèñòðàòîðîâ";
+	$lang['no_category'] = "Êàòåãîðèÿ íå âûáðàíà.<br />Ïîæàëóéñòà âûáåðèòå åå â ìåíþ.";
+	$lang['page_number'] = "íîìåð ñòðàíèöû";
+	$lang['previous_page'] = "Ïðåäûäóùåå";
+	$lang['next_page'] = "Ñëåäóþùåå";
+	$lang['nb_image_category'] = "êîëè÷åñòâî èçîáðàæåíèé â ýòîé êàòåãîðèè";
+
+	$lang['recent_image'] = "Âûëîæåíî íå áîëåå";
+	$lang['days'] = "äíåé íàçàä";
+	$lang['send_mail'] = "Êîììåíòàðèè øëèòå íà ýë. ïî÷òó  ";
+	$lang['title_send_mail'] = "Êîììåíòàðèé îòíîñèòåëüíî ôîòîãàëåðåè íà âàøåì ñàéòå";
+	$lang['sub-cat'] = "ïîäêàòåãîðèè";
+	$lang['images_available'] = "èçîáðàæåíèé â ýòîé êàòåãîðèè";
+	$lang['total'] = "èçîáðàæåíèé";
+	$lang['upload_picture'] = "Çàãðóçèòü èçîáðàæåíèå";
+
+	$lang['registration_date'] = "çàðåãèñòðèðîâàíî";
+	$lang['creation_date'] = "ñîçäàíî";
+	$lang['comment'] = "êîììåíòàðèé";
+	$lang['author'] = "àâòîð";
+	$lang['size'] = "ðàçìåð";
+	$lang['filesize'] = "ðàçìåð ôàéëà";
+	$lang['file'] = "ôàéë";
+	$lang['generation_time'] = "Ñòðàíèöà ñîçäàíà";
+	$lang['favorites'] = "Èçáðàííîå";
+	$lang['search_result'] = "Ðåçóëüòàòû ïîèñêà";
+
+	// about page
+	$lang['about_page_title'] = "Ïðî PhpWebGallery";
+	$lang['about_title'] = "Î äâèæêå ãàëåðåè...";
+	$lang['about_message'] = "<div style=\"text-align:center;font-weigh:bold;\">Èíôîðìàöèÿ î PhpWebGallery</div>
+<ul>
+<li>Ýòî ðàçðàáîòêà âåáñàéòà <a href=\"".$conf['site_url']."\" style=\"text-decoration:underline\">PhpWebGallery</a> version ".$conf['version'].". PhpWebGallery ÿâëÿåòñÿ ñåòåâûì ïðèëîæåíèåì ïðåäîñòàâëÿþùèì Âàì âîçìîæíîñòü ëåãêî ñîçäàòü ñåòåâóþ ãàëåðåþ èçîáðàæåíèé.</li>
+<li>Òåõíè÷åñêè, PhpWebGallery ïîëíîñòüþ ðàçðàáîòàí íà áàçå PHP (elePHPant) ñ èñïîëüçîàíèåì MySQL ñåðâåðà áàç äàííûõ (the SQuirreL).</li>
+<li>Åñëè Âû èìååòå êàêèå-òî ïðåäëîæåíèÿ èëè êîììåíòàðèè, ïîæàëóéñòà ïîñåòèòå <a href=\"".$conf['site_url']."\" style=\"text-decoration:underline\">PhpWebGallery</a> îôèöèàëüíûé ñàéò, è åãî ñïåöèàëèçèðîâàííûé <a href=\"".$conf['forum_url']."\" style=\"text-decoration:underline\">ôîðóì</a>.</li>
+
+</ul>";
+	$lang['about_return'] = "íàçàä";
+
+	// identification page
+	$lang['ident_page_title'] = "Èäåíòèôèêàöèÿ";
+	$lang['ident_title'] = "Èäåíòèôèêàöèÿ";
+
+	$lang['ident_register'] = "Ðåãèñòðàöèÿ";
+	$lang['ident_forgotten_password'] = "Çàáûëè âàø ïàðîëü?";
+	$lang['ident_guest_visit'] = "Çàéäèòå íà ãàëåðåþ êàê ïîñåòèòåëü";
+
+	// page personnalisation
+	$lang['customize_page_title'] = "Íàñòðîéêà";
+	$lang['customize_title'] = "Íàñòðîéêà";
+	$lang['customize_nb_image_per_row'] = "Êîëè÷åñòâî èçîáðàæåíèé â ñòðîêå";
+	$lang['customize_nb_row_per_page'] = " Êîëè÷åñòâî ñòðîê íà ñòðàíèöå";
+
+	$lang['customize_language'] = "ßçûê";
+
+	$lang['maxwidth'] = "Ìàêñèìàëüíàÿ øèðèíà èçîáðàæåíèé";
+	$lang['maxheight'] = "Ìàêñèìàëüíàÿ âûñîòà èçîáðàæåíèé";
+	$lang['err_maxwidth'] = "ìàêñèìàëüíîé øèðèíîé äîëæíî áûòü ÷èñëî, ïðåâîñõîäÿùåå 50";
+	$lang['err_maxheight'] = " ìàêñèìàëüíîé âûñîòîé äîëæíî áûòü ÷èñëî, ïðåâîñõîäÿùåå 50";
+
+	// photo page
+	$lang['previous_image'] = "Ïðåäûäóùåå";
+	$lang['next_image'] = "Ñëåäóþùåå";
+	$lang['back'] = "Íàæìèòå íà èçîáðàæåíèå, ÷òîáû âîçâðàòèòüñÿ ê ñòðàíèöå ýñêèçîâ";
+	$lang['info_image_title'] = "Èíôîðìàöèÿ èçîáðàæåíèÿ";
+	$lang['link_info_image'] = "Èçìåíèòü èíôîðìàöèþ";
+	$lang['true_size'] = "Ðåàëüíûé ðàçìåð";
+	$lang['comments_title'] = "Êîììåíòàðèè îò ïîëüçîâàòåëåé ñàéòà";
+	$lang['comments_del'] = "óäàëèòü ýòîò êîììåíòàðèé";
+	$lang['comments_add'] = "Äîáàâèòü êîììåíòàðèé";
+	$lang['month'][1] = "ßíâàðü";
+	$lang['month'][2] = "Ôåâðàëü";
+	$lang['month'][3] = "Ìàðò";
+	$lang['month'][4] = "Àïðåëü";
+	$lang['month'][5] = "Ìàé";
+	$lang['month'][6] = "Èþíü";
+	$lang['month'][7] = "Èþëü";
+	$lang['month'][8] = "Àâãóñò";
+	$lang['month'][9] = "Ñåíòÿáðü";
+	$lang['month'][10] = "Îêòÿáðü";
+	$lang['month'][11] = "Íîÿáðü";
+	$lang['month'][12] = "Äåêàáðü";
+	$lang['day'][0] = "Âîñêðåñåíüå";
+	$lang['day'][1] = "Ïîíåäåëüíèê";
+	$lang['day'][2] = "Âòîðíèê";
+	$lang['day'][3] = "Ñðåäà";
+	$lang['day'][4] = "×åòâåðã";
+	$lang['day'][5] = "Ïÿòíèöà";
+	$lang['day'][6] = "Ñóááîòà";
+
+	$lang['add_favorites_alt'] = "Äîáàâèòü ê èçáðàííîìó";
+	$lang['add_favorites_hint'] = "Äîáàâèòü ýòî èçîáðàæåíèå ê âàøåìó èçáðàííîìó";
+	$lang['del_favorites_alt'] = "Óäàëèòü èç èçáðàííîãî";
+	$lang['del_favorites_hint'] = "Óäàëèòü ýòî èçîáðàæåíèå èç èçáðàííîãî";
+	
+	// page register
+	$lang['register_page_title'] = "Ðåãèñòðàöèÿ";
+	$lang['register_title'] = " Ðåãèñòðàöèÿ";
+	$lang['reg_err_login1'] = "Ïîæàëóéñòà, ââåäèòå èìÿ âõîäà â ñèñòåìó";
+	$lang['reg_err_login2'] = "èìÿ âõîäà â ñèñòåìó íå äîëæíî çàêîí÷èòüñÿ ïðîáåëîì";
+	$lang['reg_err_login3'] = "èìÿ âõîäà â ñèñòåìó íå äîëæíî íà÷àòüñÿ ñ ïðîáåëà";
+	$lang['reg_err_login4'] = "èìÿ âõîäà â ñèñòåìó íå äîëæíî ñîäåðæàòü ñèìâîëû \" è '";
+	$lang['reg_err_login5'] = "ýòî èìÿ âõîäà â ñèñòåìó óæå èñïîëüçóåòñÿ";
+	$lang['reg_err_pass'] = "ïîæàëóéñòà ââåäèòå âàø ïàðîëü åùå ðàç";
+	$lang['reg_confirm'] = "åùå ðàç";
+	$lang['reg_mail_address'] = "àäðåñ ýëåêòðîííîé ïî÷òû";
+	$lang['reg_err_mail_address'] = " àäðåñ ýëåêòðîííîé ïî÷òû äîëæåí áûòü ïîõîæ íà xxx@yyy.eee (ïðèìåð: jack@altern.org)";
+	
+	// page search
+	$lang['search_title'] = "Ïîèñê";
+	$lang['invalid_search'] = "ïîèñê âåäåòñÿ ïî 3 ñèìâîëàì è áîëüøå";
+	$lang['search_field_search'] = "Ïîèñê";
+	$lang['search_return_main_page'] = "Âîçâðàòèòüñÿ ê ñòðàíèöå ýñêèçîâ";
+
+	// page upload
+	$lang['upload_forbidden'] = "Âû íå ìîæåòå çàãðóçèòü èçîáðàæåíèÿ â ýòó êàòåãîðèè";
+	$lang['upload_file_exists'] = "Èìÿ èçîáðàæåíèÿ, óæå èñïîëüçóåòñÿ";
+	$lang['upload_filenotfound'] = "Âû äîëæíû âûáðàòü ôîðìàò ôàéëà äëÿ èçîáðàæåíèÿ";
+	$lang['upload_cannot_upload'] = "íå ìîæåò ïåðåäàòü èçîáðàæåíèå íà ñåðâåð";
+	$lang['upload_title'] = "Èçîáðàæåíèå çàãðóæåíî";
+	$lang['upload_advise'] = "Âûáåðèòå èçîáðàæåíèå, ÷òîáû ðàçìåñòèòü â êàòåãîðèþ : ";
+	$lang['upload_advise_thumbnail'] = "Äîïîëíèòåëüíî ðåêîìåíäóåòñÿ: âûáåðèòå ýñêèç, ÷òîáû ñâÿçàòü åãî ñ ";
+	$lang['upload_advise_filesize'] = "ðàçìåð ôàéëà èçîáðàæåíèÿ íå äîëæåí ïðåâûøàòü : ";
+	$lang['upload_advise_width'] = "øèðèíà èçîáðàæåíèÿ íå äîëæíà ïðåâûøàòü : ";
+	$lang['upload_advise_height'] = "âûñîòà èçîáðàæåíèÿ íå äîëæíà ïðåâûøàòü : ";
+	$lang['upload_advise_filetype'] = "èçîáðàæåíèå äîëæíî áûòü ôîðìàòîâ jpg, gif èëè png";
+	$lang['upload_err_username'] = "íåîáõîäèìî çàäàòü èìÿ ïîëüçîâàòåëÿ ";
+	$lang['upload_username'] = "Èìÿ ïîëüçîâàòåëÿ";
+	$lang['upload_successful'] = "Èçîáðàæåíèå ïåðåäàíî óñïåøíî. Àäìèíèñòðàòîð ïðîâåðèò ïðàâèëüíîñòü ýòîãî êàê ìîæíî ñêîðåå";
+
+// new or modified in release 1.3
+$lang['charset'] = 'windows-1251';
+$lang['no'] = 'íåò';
+$lang['yes'] = 'äà';
+$lang['guest'] = 'ãîñòü';
+$lang['mail_address'] = 'àäðåñ ýëåêòðîííîé ïî÷òû';
+$lang['public'] = 'îáùåå';
+$lang['private'] = '÷àñòíîå';
+$lang['add'] = 'ñîçäàòü';
+$lang['dissociate'] = 'îòäåëèòü';
+$lang['mandatory'] = 'îáÿçàòåëüíûé';
+$lang['err_date'] = 'íåïðàâèëüíàÿ äàòà';
+$lang['picture'] = 'èçîáðàæåíèå';
+$lang['IP'] = 'IP';
+$lang['close'] = 'çàêðûòü';
+$lang['open'] = 'îòêðûòü';
+$lang['keywords'] = 'êëþ÷åâîå ñëîâî';
+$lang['errors_title'] = 'Îøèáêà';
+$lang['infos_title'] = 'Èíôîðìàöèÿ';
+$lang['default'] = 'ïî óìîë÷àíèþ';
+$lang['comments'] = 'êîììåíòàðèè';
+$lang['category_representative'] = 'ïðåäñòàâèòü';
+$lang['stats'] = 'ñòàòèñòèêà';
+$lang['most_visited_cat_hint'] = 'ïîêàçàòü ïîñëåäíèå ïîñåùåííûå èçîáðàæåíèÿ';
+$lang['most_visited_cat'] = 'ïîñëåäíèõ ïîñåùåíèé';
+$lang['best_rated_cat_hint'] = 'ïîêàçàòü èçîáðàæåíèÿ ñ ëó÷øèì ðåéòèíãîì';
+$lang['best_rated_cat'] = 'ëó÷øèé ðåéòèíã';
+$lang['recent_cat_hint'] = 'ïîêàçàòü íàèáîëåå ïîñåùàåìûå èçîáðàæåíèÿ';
+$lang['recent_cat'] = 'íàèáîëåå ïîñåùàåìûå';
+$lang['recent_cat_title'] = 'Ïîñëåäíèå èçîáðàæåíèÿ';
+$lang['visited'] = 'ïîñåùåíèé';
+$lang['times'] = 'âðåìÿ';
+$lang['customize_theme'] = 'Òåìà èíòåðôåéñà';
+  $lang['conf_default_theme_info'] = 'òåìà îôîðìëåíèÿ ïî óìîë÷àíèþ';
+
+$lang['customize_expand'] = 'Ðàçâåðíóòü âñå êàòåãîðèè';
+$lang['customize_show_nb_comments'] = 'Ïîêàçûâàòü êîëè÷åñòâî êîììåíòàðèåâ';
+$lang['customize_short_period'] = 'Êîðîòêèé ïåðèîä';
+$lang['customize_long_period'] = 'Äëèòåëüíûé ïåðèîä';
+$lang['customize_template'] = 'òåìà îôîðìëåíèÿ';
+$lang['err_periods'] = 'ïåðèîä äîëæåí áûòü öåëûì ÷èñëîì';
+$lang['err_periods_2'] = 'ïåðèîä äîëæåí áûòü áîëüøå 0. Äëèòåëüíûé ïåðèîä äîëæåí áûòü áîëüøå êîðîòêîãî ïåðèîäà.';
+$lang['create_cookie'] = 'ñîçäàòü cookie';
+$lang['customize_day'] = 'äåíü';
+$lang['customize_week'] = 'íåäåëÿ';
+$lang['customize_month'] = 'ìåñÿö';
+$lang['customize_year'] = 'ãîä';
+$lang['slideshow'] = 'ñëàéäøîó';
+$lang['period_seconds'] = '(çàäåðæêà)';
+$lang['slideshow_stop'] = 'îñòàíîâèòü ñëàéäøîó';
+$lang['comment_added'] = 'Âàø êîììåíòàðèé áûë çàðåãèñòðèðîâàí';
+$lang['comment_to_validate'] = 'Àäìèíèñòðàòîð äîëæåí àâòîðèçîâàòü âàøè êîììåíòàðèè ïðåæäå ÷åì îíè ñòàíóò âèäíû.';
+$lang['comment_anti-flood'] = 'Àíòè-ôëóäèíãîâàÿ ñèñòåìà: ïîæàëóéñòà ïîäîæäèòå ïåðåä ââîäîì ñëåäóþùåãî êîììåíòàðèÿ';
+$lang['comment_user_exists'] = 'Ýòî ÈÌß óæå èñïîëüçóåòñÿ äðóãèì ïîëüçîâàòåëåì';
+$lang['invalid_search'] = 'Èñêîìûå ñëîâà äîëæíû ñîäåðæàòü áîëåå 3-õ ñèìâîëîâè íå ñîäåðæàòü çíàêîâ ïóíêòóàöèè';
+$lang['search_mode_or'] = 'îäíî èç ñëîâ';
+$lang['search_mode_and'] = 'âñå ñëîâà';
+$lang['search_comments'] = 'separate different words with spaces';
+$lang['upload_name'] = 'Èìÿ èçîáðàæåíèÿ';
+$lang['upload_author'] = 'Àâòîð';
+$lang['upload_creation_date'] = 'Äàòà ñîçäàíèÿ (DD/MM/YYYY)';
+$lang['upload_comment'] = 'Êîììåíòàðèé';
+$lang['mail_hello'] = 'Ïðèâåò,';
+$lang['mail_new_upload_subject'] = 'Íîâûå èçîáðàæåíèÿ íà ñàéòå';
+$lang['mail_new_upload_content'] = 'A new picture has been uploaded on the gallery. It is waiting for your validation. Let\'s meet in the administration panel to authorize or refuse this picture.';
+$lang['mail_new_comment_subject'] = 'Íîâûå êîììåíòàðèè íà ñàéòå';
+$lang['mail_new_comment_content'] = 'Çàðåãèñòðèðîâàíû íîâûå êîììåíòàðèè â ãàëåðåå. If you chose to validate each comment, you first have to validate this comment in the administration panel to make it visible in the gallery.'."\n\n".'Âû ìîæåòå ïîñìîòðåòü íîâûå êîììåíòàðèè â ïàíåëè àäìèíèñòðàòîðà';
+$lang['connected_user'] = 'Ïîäêëþ÷åí ïîëüçîâàòåëü -';
+$lang['title_comments'] = 'Ïîëüçîâàòåëüñêèå êîììåíòàðèè';
+$lang['stats_last_days'] = 'ïîñëåäíèõ äíåé';
+$lang['hint_comments'] = 'Ïîñìîòðåòü ïîñëåäíèå êîììåíòàðèè ïîëüçîâàòåëåé';
+$lang['menu_login'] = 'èäåíòèôèêàöèÿ';
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+		$lang['title_add'] = "Äîáàâèòü/Èçìåíèòü èìÿ ïîëüçîâàòåëÿ";
+		$lang['title_liste_users'] = "Ñïèñîê ïîëüçîâàòåëåé";
+		$lang['title_history'] = "Èñòîðèÿ";
+		$lang['title_update'] = "Îáíîâèòü áàçó äàííûõ";
+		$lang['title_configuration'] = "Ïàðàìåòðû PhpWebGallery";
+		$lang['title_instructions'] = "Èíñòðóêöèè";
+		$lang['title_categories'] = "Óïðàâëåíèå êàòåãîðèÿìè";
+		$lang['title_edit_cat'] = "Ðåäàêòèðîâàíèå êàòåãîðèè";
+		$lang['title_info_images'] = "Èçìåíèòü èíôîðìàöèþ èçîáðàæåíèÿ êàòåãîðèè";
+		$lang['title_thumbnails'] = "Ñîçäàòü ýñêèçû";
+		$lang['title_thumbnails_2'] = "äëÿ";
+		$lang['title_default'] = "Àäìèíèñòðèðîâàíèå PhpWebGallery";
+
+		$lang['menu_title'] = "Àäìèíèñòðèðîâàíèå";
+		$lang['menu_config'] = "Ïàðàìåòðû";
+		$lang['menu_users'] = "Ïîëüçîâàòåëè";
+		$lang['menu_add_user'] = "äîáàâèòü";
+		$lang['menu_list_user'] = "ñïèñîê";
+		$lang['menu_categories'] = "Êàòåãîðèè";
+		$lang['menu_update'] = "Îáíîâëåíèå áàçû äàííûõ";
+		$lang['menu_thumbnails'] = "Ýñêèçû";
+		$lang['menu_history'] = "Èñòîðèÿ";
+		$lang['menu_instructions'] = "Èíñòðóêöèè";
+		$lang['menu_back'] = "Íàçàä íà ôîòîàëüáîì";
+		$lang['title_waiting'] = "Èçîáðàæåíèÿ, îæèäàþùèå ïðîâåðêè";
+		$lang['menu_waiting'] = "Îæèäàíèå";
+
+		$lang['default_message'] = "Ïàíåëü àäìèíèñòðàòîðà PhpWebGallery";
+
+		// page de configuration  
+		$lang['conf_err_prefixe'] = "ïðåôèêñ ýñêèçà íå äîëæåí ñîäåðæàòü ñèìâîëîâ ñ äèàêðèòè÷åñêèìè çíàêàìè";
+		$lang['conf_err_mail'] = "àäðåñ ýëåêòðîííîé ïî÷òû íåêîððåêòåí. Äîëæåí áûòü ïîõîæ íà name@server.com";
+
+		$lang['conf_err_sid_size'] = "ðàçìåð èäåíòèôèêàòîðà ñåàíñà äîëæåí áûòü öåëî÷èñëåííûì çíà÷åíèåì ìåæäó 4 è 50";
+		$lang['conf_err_sid_time'] = "âðåìÿ ñåàíñà äîëæíî áûòü öåëî÷èñëåííûì çíà÷åíèåì ìåæäó 5 è 60";
+		$lang['conf_err_max_user_listbox'] = "ìàêñèìàëüíîå êîëè÷åñòâî ïîëüçîâàòåëåé äîëæíî áûòü öåëî÷èñëåííûì çíà÷åíèåì ìåæäó 0 è 255";
+		$lang['conf_confirmation'] = "Èíôîðìàöèÿ çàðåãèñòðèðîâàíà â áàçå äàííûõ";
+
+		$lang['conf_general_title'] = "Îñíîâíàÿ êîíôèãóðàöèÿ";
+		$lang['conf_general_webmaster'] = "Ëîãèí âåáìàñòåðà";
+		$lang['conf_general_webmaster_info'] = "ýòî áóäåò ïîêàçàíî ïîñåòèòåëÿì. Íåîáõîäèìî äëÿ àäìèíèñòðèðîâàíèÿ âåáñàéòà";
+		$lang['conf_general_mail'] = "Àäðåñ ïî÷òû âåáìàñòåðà";
+		$lang['conf_general_mail_info'] = "ïîñåòèòåëè ìîãóò êîíòàêòèðîâàòü ïîñðåäñòâîì ýòîé ýëåêòðîííîé ïî÷òû";
+		$lang['conf_general_prefix'] = "Ïðåôèêñ èìåí ôàéëîâ ýñêèçîâ";
+		$lang['conf_general_prefix_info'] = "ýñêèçû èñïîëüçóþò ýòîò ïðåôèêñ (íå èçìåíÿéòå åñëè íå óâåðåííû).";
+
+		$lang['conf_general_access'] = "Òèï äîñòóïà";
+		$lang['conf_general_access_1'] = "ñâîáîäíî";
+		$lang['conf_general_access_2'] = "îãðàíè÷åíî";
+		$lang['conf_general_access_info'] = "- ñâîáîäíî: ëþáîé ìîæåò âåñòè ñàéò, ëþáîé ïîñåòèòåëü ìîæåò ñîçäàòü ó÷åòíóþ çàïèñü, ÷òîáû íàñòðîèòü âèä âåáñàéòà<br />- îãðàíè÷åíî: web-ìàñòåð ñîçäàåò ó÷åòíûå çàïèñè. Òîëüêî çàðåãèñòðèðîâàííûå ïîëüçîâàòåëè ìîãóò âåñòè ñàéò";
+		$lang['conf_general_max_user_listbox'] = "Ìàêñèìàëüíûé ðàçìåð îêíà ñïèñêà ïîëüçîâàòåëåé";
+		$lang['conf_general_max_user_listbox_info'] = "- ýòî - ìàêñèìàëüíîå ÷èñëî ïîëüçîâàòåëåé, êîòîðûõ PhpWebGallery îòîáðàæàþò â îêíå ñïèñêà âìåñòî ïðîñòîãî òåêñòîâîãî ïîëÿ íà èäåíòèôèöèðóþùåé ñòðàíèöå<br />- ââåäèòå ÷èñëî ìåæäó 0 è 255, 0 èñïîëüçóåòñÿ, åñëè  Âû õîòèòå îòîáðàæàòü òîëüêî îêíî ñïèñêà";
+
+		$lang['conf_comments'] = "Êîììåíòàðèè ïîëüçîâàòåëåé";
+		$lang['conf_comments_title'] = "Êîíôèãóðàöèÿ ".$lang['conf_comments'];
+		$lang['conf_comments_show_comments'] = $lang['conf_comments'];
+		$lang['conf_comments_show_comments_info'] = "îòîáðàæàòü êîììåíòàðèè ïîëüçîâàòåëåé ïîä êàæäûì èçîáðàæåíèåì ?";
+		$lang['conf_comments_comments_number'] = "Êîëè÷åñòâî êîììåíòàðèåâ íà ñòðàíèöå";
+		$lang['conf_comments_comments_number_info'] = "êîëè÷åñòâî êîììåíòàðèåâ, îòîáðàæàåìûõ íà êàæäîé ñòðàíèöå. Ýòî ÷èñëî íåîãðàíè÷åííî äëÿ èçîáðàæåíèÿ. Ââåäèòå ÷èñëî ìåæäó 5 è 50.";
+		$lang['conf_err_comment_number'] = "Êîëè÷åñòâî êîììåíòàðèåâ íà ñòðàíèöå äîëæíî áûòü ìåæäó 5 è 50.";
+
+		$lang['conf_remote_site_delete_info'] = "Óäàëåíèå îòäàëåííîãî ñåðâåðà óäàëèò âñå èçîáðàæåíèå è êàòåãîðèè, îòíîñÿùèåñÿ ê ýòîìó ñåðâåðó.";
+		$lang['conf_upload_title'] = "Ïàðàìåòðû ïîëüçîâàòåëüñêîé çàãðóçêè ôàéëîâ";
+		$lang['conf_upload_available'] = "Àâòîðèçîâàòü äëÿ çàãðóçêè èçîáðàæåíèé";
+		$lang['conf_upload_available_info'] = "àâòîðèçàöèÿ çàãðóçêè èçîáðàæåíèé ïîëüçîâàòåëÿìè â êàòåãîðèè âåáñàéòà (íå íà îòäàëåííîì ñåðâåðå).";
+		$lang['conf_upload_maxfilesize'] = "Ìàêñèìàëüíûé ðàçìåð ôàéëà";
+		$lang['conf_upload_maxfilesize_info'] = "ìàêñèìàëüíûé ðàçìåð ôàéëà äëÿ ïåðåäàâàåìûõ èçîáðàæåíèé. Äîëæíî áûòü ÷èñëîì îò 10 äî 1000 Kb.";
+		$lang['conf_err_upload_maxfilesize'] = "Ìàêñèìàëüíûé ðàçìåð ôàéëà äëÿ ïåðåäàâàåìûõ èçîáðàæåíèé äîëæåí áûòü ÷èñëîì îò 10 äî 1000 Kb.";
+
+
+		$lang['conf_upload_maxwidth'] = "Ìàêñèìàëüíàÿ øèðèíà";
+		$lang['conf_upload_maxwidth_info'] = "ìàêñèìàëüíàÿ øèðèíà, ðàçðåøåííàÿ äëÿ ïåðåäàííûõ èçîáðàæåíèé. Äîëæíà áûòü ÷èñëîì, ïðåâîñõîäÿùèì 10 ïèêñåëåé";
+		$lang['conf_err_upload_maxwidth'] = "Ìàêñèìàëüíàÿ øèðèíà, ðàçðåøåííàÿ äëÿ ïåðåäàííûõ èçîáðàæåíèé, äîëæíà áûòü ÷èñëîì, ïðåâîñõîäÿùèì 10 ïèêñåëåé ";
+		$lang['conf_upload_maxheight'] = "Ìàêñèìàëüíàÿ âûñîòà";
+		$lang['conf_upload_maxheight_info'] = "ìàêñèìàëüíàÿ âûñîòà, ðàçðåøåííàÿ äëÿ ïåðåäàííûõ èçîáðàæåíèé. Äîëæíà áûòü ÷èñëîì, ïðåâîñõîäÿùèì 10 ïèêñåëåé";
+		$lang['conf_err_upload_maxwidth'] = "Ìàêñèìàëüíàÿ âûñîòà, ðàçðåøåííàÿ äëÿ ïåðåäàííûõ èçîáðàæåíèé, äîëæíà áûòü ÷èñëîì, ïðåâîñõîäÿùèì 10 ïèêñåëåé ";
+		$lang['conf_upload_maxwidth_thumbnail'] = "Ìàêñèìàëüíàÿ øèðèíà ýñêèçîâ";
+		$lang['conf_upload_maxwidth_thumbnail_info'] = "ìàêñèìàëüíàÿ øèðèíà, ðàçðåøåííàÿ äëÿ ïåðåäàííûõ ýñêèçîâ. Äîëæíà áûòü ÷èñëîì, ïðåâîñõîäÿùèì 10 ïèêñåëåé";
+		$lang['conf_err_upload_maxwidth_thumbnail'] = "Ìàêñèìàëüíàÿ øèðèíà, ðàçðåøåííàÿ äëÿ ïåðåäàííûõ ýñêèçîâ, äîëæíà áûòü ÷èñëîì, ïðåâîñõîäÿùèì 10 ïèêñåëåé";
+		$lang['conf_upload_maxheight_thumbnail'] = "Ìàêñèìàëüíàÿ âûñîòà ýñêèçîâ";
+		$lang['conf_upload_maxheight_thumbnail_info'] = "ìàêñèìàëüíàÿ âûñîòà, ðàçðåøåííàÿ äëÿ ïåðåäàííûõ ýñêèçîâ. Äîëæíà áûòü ÷èñëîì, ïðåâîñõîäÿùèì 10 ïèêñåëåé ";
+		$lang['conf_err_upload_maxheight_thumbnail'] = "Ìàêñèìàëüíàÿ âûñîòà, ðàçðåøåííàÿ äëÿ ïåðåäàííûõ ýñêèçîâ, äîëæíà áûòü ÷èñëîì, ïðåâîñõîäÿùèì 10 ïèêñåëåé";
+ 
+		$lang['conf_default_title'] = "Çàäàííûå ïî óìîë÷àíèþ ñâîéñòâà äèñïëåÿ äëÿ íåçàðåãèñòðèðîâàííûõ ïîñåòèòåëåé è íîâûõ ó÷åòíûõ çàïèñåé";
+		$lang['conf_default_language_info'] = "çàäàííûé ïî óìîë÷àíèþ ÿçûê";
+
+		$lang['conf_session_title'] = "Ñåññèîííûå íàñòðîéêè";
+		$lang['conf_session_size'] = "Ðàçìåð èäåíòèôèêàòîðà";
+		$lang['conf_session_size_info'] = "- ÷åì äëèííåå âàø èäåíòèôèêàòîð, òåì áîëåå áåçîïàñåí âàø ñàéò - <br /> - ââåñòè ÷èñëî ìåæäó 4 è 50";
+		$lang['conf_session_time'] = "Âðåìÿ æèçíè ñåññèè";
+		$lang['conf_session_time_info'] = "- ÷åì êîðî÷å âðåìÿ æèçíè ñåññèè, òåì áîëåå áåçîïàñíûé âàø ñàéò - <br /> ââåñòè ÷èñëî ìåæäó 5 è 60, â ìèíóòàõ";
+		$lang['conf_session_key'] = "Êëþ÷åâîå ñëîâî";
+
+	        $lang['conf_session_key_info'] = "- êëþ÷åâîå ñëîâî ñåàíñà óëó÷øàåò êîäèðîâàíèå èäåíòèôèêàòîðà ñåàíñà - <br /> ââåñòè ëþáîå ïðåäëîæåíèå äî 255 ñèìâîëîâ";
+		$lang['conf_session_delete'] = "Óäàëÿòü óñòàðåâøèå ñåàíñû";
+		$lang['conf_session_delete_info'] = "ðåêîìåíäóåòñÿ îñâîáîæäàòü òàáëèöó áàçû äàííûõ ñåàíñà, ïîòîìó ÷òî óñòàðåâøèå ñåàíñû îñòàþòñÿ â áàçå äàííûõ (ýòî áåçîïàñíî äëÿ çàùèòû)";
+
+		$lang['user_err_modify'] = "Ýòîò ïîëüçîâàòåëü íå ìîæåò áûòü èçìåíåí èëè óäàëåí";
+		$lang['user_err_unknown'] = "Ýòîò ïîëüçîâàòåëü íå ñóùåñòâóåò â áàçå äàííûõ";
+
+		$lang['adduser_info_message'] = "Èíôîðìàöèÿ çàðåãèñòðèðîâàíà â áàçå äàííûõ äëÿ ïîëüçîâàòåëÿ ";
+		$lang['adduser_info_password_updated'] = "(ïàðîëü ìîäèôèöèðîâàí)";
+		$lang['adduser_info_back'] = "íàçàä ê ñïèñêó ïîëüçîâàòåëåé";
+		$lang['adduser_fill_form'] = "Ïîæàëóéñòà çàïîëíèòå ñëåäóþùóþ ôîðìó";
+		$lang['adduser_unmodify'] = "íåèçìåíÿåìî";
+		$lang['adduser_status'] = "ñòàòóñ";
+		$lang['adduser_status_admin'] = "àäìèíèñòðàòîð";
+		$lang['adduser_status_member'] = "ó÷àñòíèê";
+		$lang['adduser_status_guest'] = "ãîñòü";
+
+		$lang['permuser_info_message'] = "Íå ðàçðåøåíî";
+		$lang['permuser_title'] = "Ðàçðåøåíèÿ äëÿ ïîëüçîâàòåëÿ.";
+		$lang['permuser_warning'] = "Âíèìàíèå: \"<span style=\"font-weight:bold;\">íåäîñòóïíî</span>\" ê êîðíþ êàòåãîðèè ïðåïÿòñòâóþò îáðàùåíèþ ê öåëîé êàòåãîðèè";
+		$lang['permuser_authorized'] = "äîñòóïíî";
+		$lang['permuser_forbidden'] = "íåäîñòóïíî";
+		$lang['permuser_parent_forbidden'] = "ðîäèòåëüñêàÿ êàòåãîðèÿ çàïðåùåíà";
+
+		$lang['listuser_confirm'] = "Âû äåéñòâèòåëüíî õîòèòå óäàëèòü ýòîãî ïîëüçîâàòåëÿ";
+		$lang['listuser_info_deletion'] = "óäàëåíî èç áàçû äàííûõ";
+		$lang['listuser_user_group'] = "Ãðóïïà ïîëüçîâàòåëåé - ";
+		$lang['listuser_modify'] = "èçìåíèòü";
+		$lang['listuser_modify_hint'] = "èçìåíèòü èíôîðìàöèþ ";
+		$lang['listuser_permission'] = "ðàçðåøåíèÿ";
+		$lang['listuser_permission_hint'] = "èçìåíèòü ðàçðåøåíèÿ";
+		$lang['listuser_delete'] = "óäàëèòü";
+		$lang['listuser_delete_hint'] = "óäàëèòü ïîëüçîâàòåëÿ";
+		$lang['listuser_button_all'] = "âñå";
+		$lang['listuser_button_invert'] = "îáðàòèòü";
+		$lang['listuser_button_create_address'] = "ñîçäàòü àäðåñ ýëåêòðîííîé ïî÷òû";
+ 
+		$lang['cat_invisible'] = "íåâèäèìî";
+		$lang['cat_edit'] = "Ðåäàêòèðîâàòü";
+		$lang['cat_up'] = "Ââåðõ";
+		$lang['cat_down'] = "Âíèç";
+		$lang['cat_image_info'] = "Èíôîðìàöèÿ îá èçîáðàæåíèè";
+		$lang['cat_total'] = "îáùåå êîëè÷åñòâî";
+
+		$lang['editcat_confirm'] = "Èíôîðìàöèÿ çàðåãèñòðèðîâàíà â áàçå äàííûõ";
+		$lang['editcat_back'] = "êàòåãîðèè";
+		$lang['editcat_title1'] = "Ïàðàìåòðû äëÿ";
+		$lang['editcat_name'] = "Èìÿ";
+		$lang['editcat_comment'] = "Êîìåíòàðèé";
+
+  $lang['editcat_status'] = 'Ñòàòóñ';
+
+		$lang['infoimage_general'] = "Îáùèå ïàðàìåòðû äëÿ êàòåãîðèè";
+		$lang['infoimage_useforall'] = "èñïîëüçîâàòü äëÿ âñåõ èçîáðàæåíèé?";
+		$lang['infoimage_creation_date'] = "äàòà ñîçäàíèÿ";
+		$lang['infoimage_detailed'] = "Ïàðàìåòðû äëÿ êàæäîãî èçîáðàæåíèÿ";
+		$lang['infoimage_title'] = "çàãîëîâîê";
+		$lang['infoimage_comment'] = "êîìåíòàðèé";
+
+ 		$lang['update_missing_tn'] = "ýñêèç îòñóòñòâóåò äëÿ";
+		$lang['update_disappeared_tn'] = "ýñêèç èñ÷åç";
+		$lang['update_disappeared'] = "íå ñóùåñòâóåò";
+		$lang['update_part_deletion'] = "Óäàëåíèå èçîáðàæåíèé, êîòîðûå íå èìåþò íèêàêîãî ýñêèçà èëè êîòîðûåíå ñóùåñòâóþò";
+		$lang['update_deletion_conclusion'] = "èçîáðàæåíèé, óäàëåíî èç áàçû äàííûõ";
+		$lang['update_part_research'] = "Ïîèñê íîâûõ èçîáðàæåíèé â êàòàëîãàõ";
+		$lang['update_research_added'] = "äîáàâèòü";
+		$lang['update_research_tn_ext'] = "ýñêèç â";
+		$lang['update_research_conclusion'] = "èçîáðàæåíèé, äîáàâëåíî â áàçó äàííûõ";
+		$lang['update_default_title'] = "Âûáåðèòå îïöèè";
+		$lang['update_only_cat'] = "ìîäèôèöèðîâàòü êàòåãîðèè (áåç èçîáðàæåíèé)";
+		$lang['update_all'] = "ìîäèôèöèðîâàòü âñå";
+
+  $lang['tn_width'] = 'øèðèíà';
+  $lang['tn_height'] = 'âûñîòà';
+
+		$lang['tn_no_support'] = "Èçîáðàæåíèÿ íåäîñòóïíû èëè íå ïîääåðæèâàþòñÿ";
+		$lang['tn_format'] = "äëÿ ôîðìàòà ôàéëà";
+		$lang['tn_thisformat'] = "äëÿ ýòîãî ôîðìàòà ôàéëà";
+		$lang['tn_err_width'] = "øèðèíîé äîëæíî áûòü ÷èñëî, ïðåâîñõîäÿùåå";
+		$lang['tn_err_height'] = "âûñîòîé äîëæíî áûòü ÷èñëî, ïðåâîñõîäÿùåå";
+		$lang['tn_results_title'] = "Ðåçóëüòàòû ìèíèàòþðèçàöèè";
+		$lang['tn_picture'] = "èçîáðàæåíèå";
+		$lang['tn_results_gen_time'] = "ñîçäàíî";
+
+		$lang['tn_stats'] = "Îñíîâíîé ñòàòóñ";
+		$lang['tn_stats_nb'] = "÷èñëî ìèíèàòþðèçèðîâàííûõ èçîáðàæåíèé";
+		$lang['tn_stats_total'] = "îáùåå âðåìÿ";
+		$lang['tn_stats_max'] = "ìàêñèìàëüíîå âðåìÿ";
+		$lang['tn_stats_min'] = "ìèíèìàëüíîå âðåìÿ";
+		$lang['tn_stats_mean'] = "ñðåäíåå âðåìÿ";
+
+		$lang['tn_err'] = "Âû ñäåëàëè îøèáêè";
+		$lang['tn_params_title'] = "Ïàðàìåòðû ìèíèàòþðèçàöèè";
+		$lang['tn_params_GD'] = "âåðñèÿ GD-áèáëèîòåêè";
+		$lang['tn_params_GD_info'] = "- GD - áèáëèîòåêà óïðàâëåíèÿ èçîáðàæåíèÿ äëÿ PHP <br /> - âûáðàòü âåðñèþ, óñòàíîâëåííóþ íà âàøåì ñåðâåðå. Åñëè Âû âûáèðàåòå íåïðàâèëüíî, Âû áóäåòå âèäåòü òîëüêî ñîîáùåíèÿ îá îøèáêàõ. Âîçâðàòèòåñü è âûáåðèòå äðóãóþ âåðñèþ. Åñëè íèêàêèå âåðñèè íå ðàáîòàþò, ýòî îçíà÷àåò, ÷òî âàø ñåðâåð íå ïîääåðæèâàåò GD.";
+		$lang['tn_params_width_info'] = "ìàêñèìàëüíàÿ øèðèíà, êîòîðóþ ýñêèçû ìîãóò çàíÿòü";
+		$lang['tn_params_height_info'] = "ìàêñèìàëüíàÿ âûñîòà, êîòîðóþ ýñêèçû ìîãóò çàíÿòü";
+		$lang['tn_params_create'] = "ñîçäàòü";
+		$lang['tn_params_create_info'] = "Íå ïðîáóéòå ìèíèàòþðèçèðîâàòü ñëèøêîì ìíîãî èçîáðàæåíèé çà îäèí ðàç. <br /> Äåéñòâèòåëüíî, ìèíèàòþðèçàöèÿ èñïîëüçóåò ìíîãî ðåñóðñîâ öåíòðàëüíîãî ïðîöåññîðà. Åñëè Âû óñòàíàâëèâàëè PhpWebGallery íà áåñïëàòíîì ïðîâàéäåðå, ñëèøêîì âûñîêàÿ çàãðóçêà öåíòðàëüíîãî ïðîöåññîðà ìîæåò ïðèâåñòè ê óäàëåíèþ âàøåãî âåáñàéòà.";
+		$lang['tn_params_format'] = "ôîðìàò ôàéëà";
+		$lang['tn_params_format_info'] = "òîëüêî ôîðìàò jpeg ïîääåðæèâàåòñÿ äëÿ ñîçäàíèÿ ýñêèçà";
+		$lang['tn_alone_title'] = "èçîáðàæåíèÿ áåç ýñêèçîâ (òîëüêî jpeg è png)";
+		$lang['tn_dirs_title'] = "Ñïèñîê êàòàëîãîâ";
+		$lang['tn_dirs_alone'] = "èçîáðàæåíèÿ áåç ýñêèçîâ";
+
+		$lang['help_images_title'] = "Äîáàâèòü èçîáðàæåíèÿ";
+		$lang['help_images_intro'] = "Êàê ðàçìåùàòü èçîáðàæåíèÿ â âàøè êàòåãîðèè:";
+		$lang['help_images'][0] = "â êàòàëîãå \"galleries\", ñîçäàéòå êàòàëîãè, êîòîðûå áóäóò ïðåäñòàâëÿòü âàøè êàòåãîðèè.";
+		$lang['help_images'][1] = "â êàæäîì êàòàëîãå, Âû ìîæåòå ñîçäàòü òàê ìíîãî ïîäêàòàëîãîâ, ñêîëüêî Âû ïîæåëàåòå.";
+		$lang['help_images'][2] = "âû ìîæåòå ñîçäàòü òàê ìíîãî êàòåãîðèé è ðóáðèê äëÿ êàæäîé êàòåãîðèè, ñêîëüêî Âû ïîæåëàåòå.";
+		$lang['help_images'][3] = "ôàéëû èçîáðàæåíèé äîëæíû èìåòü ôîðìàò jpeg (ðàñøèðåíèå jpg èëè JPG), ôîðìàò gif (ðàñøèðåíèå gif èëè GIF) èëè ôîðìàò png (ðàñøèðåíèå png èëè PNG).";
+		$lang['help_images'][4] = "ïîñòàðàéòåñü íå èñïîëüçîâàòü ïðîáåëû \" \" èëè äåôèñ \"-\" â ôàéëàõ èçîáðàæåíèé. ß ñîâåòóþ Âàì èñïîëüçîâàòü ñèìâîë ïîä÷åðêèâàíèÿ \"_\", êîòîðûé îáðàáàòûâàåòñÿ PhpWebGallery è îáåñïå÷èò íîðìàëüíûå ðåçóëüòàòû.";
+
+		$lang['help_thumbnails_title'] = "Ýñêèçû";
+		$lang['help_thumbnails'][0] = "â êàæäîì êàòàëîãå, ñîäåðæàùåì èçîáðàæåíèå, îòîáðàæàåìûå íà âàøåì ñàéòå, åñòü ïîäêàòàëîã, íàçâàííûé \"thumbnail\". Åñëè òàêîãî íåò, ñîçäàéòå åãî, ÷òîáû ðàçìåñòèòü òàì âàøè ýñêèçû.";
+		$lang['help_thumbnails'][1] = "ýñêèçû ìîãóò íå èìåòü òî æå ñàìîå ðàñøèðåíèå, êàê èõ ñâÿçàííîå èçîáðàæåíèå (íàïðèìåð èçîáðàæåíèå ñ .jpg ðàñøèðåíèåì ìîæåò èìåòü ýñêèç ñ .GIF ðàñøèðåíèåì).";
+		$lang['help_thumbnails'][2] = "ýñêèç, ñâÿçàííûé ñ èçîáðàæåíèåì äîëæåí áûòü ïðåäóñòàíîâëåí ñ ïðåôèêñîì, çàäàííûì íà ñòðàíèöå êîíôèãóðàöèè (image.jpg-> TN-image.GIF íàïðèìåð).";
+		$lang['help_thumbnails'][3] = "ÿ ñîâåòóþ Âàì èñïîëüçîâàòü ìîäóëü äëÿ Windows, çàãðóæàåìûé ñ ñàéòà PhpWebGallery äëÿ óïðàâëåíèÿ è ñîçäàíèÿ ýñêèçîâ.";
+		$lang['help_thumbnails'][4] = "âû ìîæåòå èñïîëüçîâàòü ñòðàíèöó ñîçäàíèÿ ýñêèçà, èíòåãðèðîâàííóþ â PhpWebGallery, íî ÿ íå ñîâåòóþ Âàì ýòî äåëàòü, ïîòîìó ÷òî êà÷åñòâî ýñêèçà ìîæåò áûòü íåâûñîêèì, ïëþñ ýòî ïðåäïîëàãàåò âûñîêóþ çàãðóçêó öåíòðàëüíîãî ïðîöåññîðà, ÷òî ìîæåò ñòàòü ïðîáëåìîé, åñëè Âû èñïîëüçóåòå áåñïëàòíûé õîñòèíã.";
+		$lang['help_thumbnails'][5] = "åñëè Âû õîòèòå ñîçäàâàòü ýñêèçû íà õîñòèíã-ïðîâàéäåðå, Âû äîëæíû çàäàòü chmod 775 íà êàòàëîã \"galleries\" è âñå åãî ïîäêàòàëîãè.";
+
+		$lang['help_database_title'] = "Îáíîâëåíèå áàçû äàííûõ";
+		$lang['help_database'][0] = "ïîñëå òîãî, êàê ôàéëû èçîáðàæåíèé è ýñêèçû, ïðàâèëüíî ïîìåùåíû â êàòàëîãè, íàæìèòå íà \"îáíîâëåíèå áàçû äàííûõ\" â ìåíþ ïàíåëè àäìèíèñòðèðîâàíèÿ.";
+
+		$lang['help_infos_title'] = "Ðàçíàÿ èíôîðìàöèÿ";
+		$lang['help_infos'][0] = "Êàê òîëüêî Âû ñîçäàëè âàøó ãàëåðåþ, âîéäèòå â ñïèñîê ïîëüçîâàòåëåé è èçìåíèòå ðàçðåøåíèÿ äëÿ ïîëüçîâàòåëÿ \"ïîñåòèòåëü\". Âñå íîâûå çàðåãèñòðèðîâàííûå ïîëüçîâàòåëè áóäóò èìåòü ïî óìîë÷àíèþ òå æå ñàìûå ðàçðåøåíèÿ êàê è  ïîëüçîâàòåëü \"ïîñåòèòåëü\".";
+		$lang['help_infos'][1] = "Åñëè ó Âàñ åñòü âîïðîñû, íå ñìóùàéòåñü ñìîòðåòü íà ôîðóìå è çàäàâàòü òàì âîïðîñû. Ôîðóì (äîñêà îáúÿâëåíèé) äîñòóïåí íà ñàéòå PhpWebGallery.";
+
+		$lang['help_remote_title'] = "Óäàëåííûé ñàéò";
+		$lang['help_remote'][0] = "PhpWebGallery ïðåäëàãàåò âîçìîæíîñòü èñïîëüçîâàòü íåñêîëüêî ñåðâåðîâ, ÷òîáû ñîõðàíèòü èçîáðàæåíèÿ, êîòîðûå ñîñòàâÿò âàøó ãàëåðåþ. Ýòî ìîæåò áûòü ïîëåçíî, åñëè âàøà ãàëåðåÿ óñòàíîâëåíà íà ñåðâåðå ñ îãðàíè÷åííûì ïðîñòðàíñòâîì è åñëè ó Âàñ áîëüøîå êîëè÷åñòâî èçîáðàæåíèé, êîòîðûå äîëæíû áûòü ïîêàçàíû. Ïîæàëóéñòà, ñëåäóéòå ýòîé ïðîöåäóðå: ";
+		$lang['help_remote'][1] = "1. îòðåäàêòèðóéòå ôàéë \"create_listing_file.php\" (Âû íàéäåòå åãî â êàòàëîãå \"admin\"), èçìåíèòå ñòðîêó \"$prefixe_thumbnail = \"TN-\";\" åñëè ïðåôèêñ äëÿ âàøèõ ýñêèçîâ - íå \" TN-\".";
+		$lang['help_remote'][2] = "2. ðàçìåñòèòå èçìåíåííûé ôàéë \"create_listing_file.php\" íà âàøåì îòäàëåííîì âåáñàéòå, â êîðíåâîì êàòàëîãå âàøèõ êàòàëîãîâ image (â êàòàëîãå \"galleries\" ýòîãî âåáñàéòà) ïîñðåäñòâîì ftp.";
+		$lang['help_remote'][3] = "3. çàïóñòèòå ñöåíàðèé, èñïîëüçóÿ url http://domaineDistant/repGalerie/create_listing_file.php, êîòîðûé ñîçäàñò ôàéë listing.";
+		$lang['help_remote'][4] = "4. âåðíèòå ôàéë listing.xml ñ âàøåãî îòäàëåííîãî âåáñàéòà, è ïîëîæèòå åãî â êàòàëîã \"admin\" òåêóùåãî âåáñàéòà.";
+		$lang['help_remote'][5] = "5. ïîæàëóéñòà, çàïóñòèòå îáíîâëåíèå äàííûõ èçîáðàæåíèé ñ ïîìîùüþ èíòåðôåéñà àäìèíèñòðèðîâàíèÿ ñ èñïîëüçîâàíèåì ôàéëà listing.xml, ïîñëå ÷åãî óäàëèòå åãî èç êàòàëîãà \"admin\".";
+		$lang['help_remote'][6] = "Âû ìîæåòå ìîäèôèöèðîâàòü ñîäåðæàíèå îòäàëåííîãî âåáñàéòà, ïîâòîðÿÿ îïèñàííóþ ìàíèïóëÿöèþ. Âû ìîæåòå òàêæå óíè÷òîæèòü îòäàëåííûé âåáñàéò, âûáèðàÿ îïöèþ â ðàçäåëå êîíôèãóðàöèè ïàíåëè àäìèíèñòðèðîâàíèÿ. ".
+
+		$lang['help_upload_title'] = "Äîáàâëåííèå èçîáðàæåíèé ïîëüçîâàòåëÿìè.";
+		$lang['help_upload'][0] = "PhpWebGallery ïðåäîñòàâëÿåò âîçìîæíîñòü ïåðåäà÷è èçîáðàæåíèé äëÿ ïîëüçîâàòåëåé. ×òîáû ñäåëàòü ýòî:";
+		$lang['help_upload'][1] = "1. ðàçðåøèòå îïöèþ â ðàçäåëå êîíôèãóðàöèè ïàíåëè àäìèíèñòðèðîâàíèÿ.";
+		$lang['help_upload'][2] = "2. óñòàíîâèòå ïðàâà íà çàïèñü â êàòàëîãàõ èçîáðàæåíèé.";
+
+		$lang['install_message'] = "Ñîîáùåíèå";
+		
+		$lang['step1_confirmation'] = "Ïàðàìåòðû ïðàâèëüíû";
+		$lang['step1_err_db'] = "Ïîäêëþ÷åíèå ê ñåðâåðó óñïåøíî, íî áûëî íåâîçìîæíî ïîäêëþ÷èòüñÿ ê áàçå äàííûõ";
+		$lang['step1_err_server'] = "Íåâîçìîæíî ïîäêëþ÷èòüñÿ ê ñåðâåðó";
+		$lang['step1_err_copy'] = "Ñêîïèðóéòå òåêñò ìåæäó äåôèñàìè è âñòàâüòå åãî â ôàéë \"include/mysql.inc.php\"(Âíèìàíèå : mysql.inc.php äîëæåí ñîäåðæàòü òîëüêî òî, ÷òî íàõîäèòñÿ â ñèíåì)";
+		$lang['step1_err_copy_2'] = "Ñëåäóþùèé øàã èíñòàëëÿöèè òåïåðü âîçìîæåí";
+		$lang['step1_err_copy_next'] = "ñëåäóþùèé øàã";
+		$lang['step1_title'] = "Øàã 1/2";
+		$lang['step1_host'] = "MySQL host";
+
+		$lang['step1_user'] = "Ïîëüçîâàòåëü";
+		$lang['step1_user_info'] = "ïîëüçîâàòåëüñêèé âõîä â ñèñòåìó, äàííûé âàøèì õîñò-ïðîâàéäåðîì";
+		$lang['step1_pass'] = "Ïàðîëü";
+		$lang['step1_pass_info'] = "ïîëüçîâàòåëüñêèé ïàðîëü, äàííûé âàøèì õîñò-ïðîâàéäåðîì";
+		$lang['step1_database'] = " Èìÿ áàçû äàííûõ";
+		$lang['step1_database_info'] = "òàêæå äàííûé âàøèì õîñò-ïðîâàéäåðîì";
+		$lang['step1_prefix'] = "Ïðåôèêñ òàáëèö áàçû äàííûõ";
+		$lang['step1_prefix_info'] = "èìåíà òàáëèö áàçû äàííûõ áóäóò ïðåäóñòàíîâëåííû ñ ýòèì ïðåôèêñîì (÷òî äàñò âîçìîæíîñòü Âàì ëó÷øå óïðàâëÿòü âàøèìè òàáëèöàìè)";
+		
+		$lang['step2_err_login1'] = "ââåäèòå èìÿ âõîäà â ñèñòåìó äëÿ web-ìàñòåðà";
+		$lang['step2_err_login3'] = "èìÿ âõîäà â ñèñòåìó web-ìàñòåðà íå ìîæåò ñîäåðæàòü ñèìâîëû ' èëè \"";
+		$lang['step2_err_pass'] = "ïîæàëóéñòà ââåäèòå âàø ïàðîëü ñíîâà";
+		$lang['step2_err_mail'] = $lang['conf_err_mail'];
+
+		$lang['install_end_title'] = "Èíñòàëëÿöèÿ çàêîí÷èëàñü";
+		$lang['install_end_message'] = "Êîíôèãóðàöèÿ PhpWebGallery çàêîí÷åíà, âîò - ñëåäóþùèé øàã<br /><br />
+									Äëÿ ñîîáðàæåíèÿ áåçîïàñíîñòè, ïîæàëóéñòà óäàëèòå ôàéë \"install.php\" èç êàòàëîãà \"admin\"<br />
+									Ïîñëå òîãî êàê ýòîò ôàéë áóäåò óäàëåí, ñëåäóéòå çà ñëåäóþùèì èíñòðóêöèÿì:
+									<ul>
+										<li>èäèòå íà ñòðàíèöó èäåíòèôèêàöèè: [ <a href='../identification.php'>ñþäà</a> ] è âîñïîëüçóéòåñü âõîäîì â ñèñòåìó web-ìàñòåðà</li>
+										<li>ýòîò âõîä â ñèñòåìó äàñò âîçìîæíîñòü Âàì îáðàòèòüñÿ ê [ <a href='admin.php'>ïàíåëè àäìèíèñòðèðîâàíèÿ</a> ] è ê êîìàíäàì, ÷òîáû ðàçìåùàòü èçîáðàæåíèÿ â âàøè êàòàëîãè</li>
+									</ul>";
+		$lang['step2_title'] = "Øàã 2/2";
+		$lang['step2_pwd'] = "ïàðîëü âåáìàñòåðà";
+		$lang['step2_pwd_info'] = "Ñîõðàíèòå ýòî (êîíôèäåíöèàëüíî), ýòî äàñò âîçìîæíîñòü Âàì îáðàòèòüñÿ ê ïàíåëè àäìèíèñòðèðîâàíèÿ";
+		$lang['step2_pwd_conf'] = "ïîäòâåðæäåíèå ïàðîëÿ";
+		$lang['step2_pwd_conf_info'] = "âåðèôèêàöèÿ";
+  // new or modified in release 1.3
+  $lang['remote_site'] = 'Remote site';
+  $lang['title_add'] = 'Ñîçäàòü ïîëüçîâàòåëÿ';
+  $lang['title_modify'] = 'Èçìåíèòü ïîëüçîâàòåëÿ';
+  $lang['title_groups'] = 'Ìåíåäæåð ãðóïï';
+  $lang['title_user_perm'] = 'Èçìåíèòü íàñòðîéêè ïîëüçîâàòåëÿ';
+  $lang['title_cat_perm'] = 'Èçìåíèòü íàñòðîéêè êàòåãîðèé';
+  $lang['title_group_perm'] = 'Èçìåíèòü íàñòðîéêè ãðóïï';
+  $lang['title_picmod'] = 'Èçìåíèòü èíôîðìàöèþ ïî èçîáðàæåíèþ';
+  $lang['menu_groups'] = 'Ãðóïïû';
+  $lang['menu_comments'] = 'Êîììåíòàðèè';
+  $lang['conf_general_log'] = 'Èñòîðèÿ';
+  $lang['conf_general_log_info'] = 'õðàíèòü èñòîðèþ ïîñåùåíèé ñàéòà? Èñòîðèÿ ïîñåùåíèé áóäåò äîñòóïíà â ïàíåëè àäìèíèñòðàòîðà';
+  $lang['conf_general_mail_notification'] = 'Îïîâåùåíèå ïî ïî÷òå';
+  $lang['conf_general_mail_notification_info'] = 'àâòîìàòè÷åñêîå îïîâåùåíèå ïî ïî÷òå àäìèíèñòðàòîðà (è òîëüêî åãî) êîãäà ïîëüçîâàòåëü ñîçäàåò êîììåíòàðèé èëè äîáàâëÿåò èçîáðàæåíèå.';
+  $lang['conf_comments_validation'] = 'Ïðîâåðêà';
+  $lang['conf_comments_validation_info'] = 'àäìèíèñòðàòîð ïðîâåðÿåò êîììåíòàðèè ïîëüçîâàòåëåé ïðåæäå ÷åì îíè ñòàíóò äîñòóïíû íà ñàéòå';
+  $lang['conf_comments_forall'] = 'Äëÿ âñåõ?';
+  $lang['conf_comments_forall_info'] = 'âñå ïîñåòèòåëè ìîãóò äàâàòü êîììåíòàðèè';
+  $lang['conf_default_nb_image_per_row_info'] = 'çàäàííîå ïî óìîë÷àíèþ êîëè÷åñòâî èçîáðàæåíèé â ñòðîêå';
+  $lang['conf_default_nb_row_per_page_info'] = 'êîëè÷åñòâî ñòðîê íà ñòðàíèöå';
+  $lang['conf_default_short_period_info'] = 'ïî äíÿì. Ïåðèîä, â òå÷åíèè êîòîðîãî  èçîáðàæåíèÿ ïîêàçûâàþòñÿ ñ êðàñíîé ìåòêîé. Êîðîòêèé ïåðèîä äîëæåí ïðåâîñõîäèòü 1 äåíü.';
+  $lang['conf_default_long_period_info'] = 'ïî äíÿì. Ïåðèîä, â òå÷åíèè êîòîðîãî  èçîáðàæåíèÿ ïîêàçûâàþòñÿ ñ çåëåíîé ìåòêîé. Äëèòåëüíûé ïåðèîä äîëæåí ïðåâîñõîäèòü êîðîòêèé ïåðèîä.';
+
+  $lang['conf_default_expand_info'] = 'ðàñêðûòü âñå êàòåãîðèè â ìåíþ ïî óìîë÷àíèþ?';
+  $lang['conf_default_show_nb_comments_info'] = 'ïîêàçûâàòü êîëè÷åñòâî êîììåíòàðèåâ äëÿ êàæäîãî èçîáðàæåíèÿ íà ñòðàíèöå ýñêèçîâ';
+  $lang['conf_default_maxwidth_info'] = 'Ìàêñèìàëüíàÿ øèðèíà äëÿ ïîêàçà èçîáðàæåíèé: èçîáðàæåíèÿ áóäóò èìåòü äàííóþ øèðèíó òîëüêî ïðè ïîêàçå, ôàéë èçîáðàæåíèÿ íå èçìåíÿåòñÿ. Îñòàâüòå ïóñòûì, ÷òîáû íå ìåíÿòü èñõîäíûå ðàçìåðû.';
+  $lang['conf_default_maxheight_info'] = 'Òî æå, ÷òî è Ìàêñèìàëüíàÿ øèðèíà, òîëüêî äëÿ âûñîòû';
+  $lang['conf_session_cookie'] = 'Àâòîðèçàöèÿ cookies';
+  $lang['conf_session_cookie_info'] = 'ïîëüçîâàòåëÿì íå íóæíî ðåãèñòðèðîâàòüñÿ ïðè êàæäîì ïîñåùåíèè. Ìåíåå áåçîïàñíûé.';
+  $lang['adduser_associate'] = 'Àññîöèèðîâàòü ãðóïïó';
+  $lang['group_add'] = 'Ñîçäàòü ãðóïïó';
+  $lang['group_add_error1'] = 'Èìÿ ãðóïïû íå äîëæíî ñîäåðæàòü " èëè \'';
+  $lang['group_add_error2'] = 'Ýòî èìÿ óæå èñïîëüçóåòñÿ äðóãîé ãðóïïîé';
+  $lang['group_confirm'] = 'Âû äåéñòâèòåëüíî õîòèòå óäàëèòü ýòó ãðóïïó?';
+  $lang['group_list_title'] = 'Ñïèñîê ñóùåñòâóþùèõ ãðóïï';
+  $lang['group_err_unknown'] = 'Ýòîé ãðóïïû íåò â áàçå äàííûõ';
+  $lang['cat_permission'] = 'ñâîéñòâà';
+  $lang['cat_update'] = 'îáíîâèòü';
+  $lang['cat_add'] = 'Ñîçäàòü âèðòóàëüíóþ êàòåãîðèþ';
+  $lang['cat_parent'] = 'ðîäèòåëüñêàÿ êàòåãîðèÿ';
+  $lang['cat_error_name'] = 'Èìÿ êàòåãîðèè íå äîëæíî áûòü ïóñòûì';
+  $lang['cat_virtual'] = 'âèðòóàëüíûé';
+  $lang['cat_first'] = 'Äâèãàòü ââåðõ';
+  $lang['cat_last'] = 'Äâèãàòü âíèç';
+  $lang['editcat_visible_info'] = '(íåâèäèìà, êðîìå àäìèíèñòðàòîðà)';
+  $lang['editcat_visible'] = 'Âèäèìûõ';
+  $lang['editcat_uploadable'] = 'Îáíîâèòü äîñòóïíûå';
+  $lang['infoimage_keyword_separation'] = '(separate with coma ",")';
+  $lang['infoimage_addtoall'] = 'ñîçäàòü âñå';
+  $lang['infoimage_removefromall'] = 'óäàëèòü èç âñåõ';
+  $lang['infoimage_associate'] = 'Àññîöèèðîâàòü ñ êàòåãîðèåé';
+  $lang['update_wrong_dirname'] = 'Èìåíà äèðåêòîðèåâ è ôàéëîâ äîëæíû ñîñòîÿòü èç áóêâ è ñèìâîëîâ "-", "_" èëè "."';
+  $lang['stats_pages_seen'] = 'ñòðàíèö ïðîñìîòðåíî';
+  $lang['stats_visitors'] = 'ãîñòü';
+  $lang['stats_empty'] = 'î÷èñòèòü èñòîðèþ';
+  $lang['stats_pages_seen_graph_title'] = 'Êîëè÷åñòâî ïðîñìîòðåííûõ ñòðàíèö â äåíü';
+  $lang['stats_visitors_graph_title'] = 'Êîëè÷åñòâî ïîñåòèòåëåé â äåíü';
+  $lang['comments_last_title'] = 'Ïîñëåäíèå êîììåíòàðèè';
+  $lang['comments_non_validated_title'] = 'Êîììåíòàðèè îæèäàþùèå ïðîâåðêè';
+  $lang['help_database'][1] = '÷òîáû èçáåæàòü ìîäèôèêàöèè ñëèøêîì ìíîãèõ èçîáðàæåíèé ïðè îäèíî÷íîì îáíîâëåíèè, ðåêîìåíäóåòñÿ ïðîâîäèòü îáíîâëåíèå òîëüêî íóæíîé êàòåãîðèè èñïîëüçóÿ ññûëêó "îáíîâèòü" â ðàçäåëå "Êàòåãîðèè".';
+  $lang['help_upload'][3] = "Êàòåãîðèè äîëæíû áûòü äîñòóïíû äëÿ îáíîâëåíèÿ.";
+  $lang['help_upload'][4] = "Ïåðåäàííûå èçîáðàæåíèÿ ïîëüçîâàòåëÿìè íå âèäèìû ñðàçó íà âåáñàéòå, îíè äîëæíû áûòü óòâåðæäåíû àäìèíèñòðàòîðîì. Äëÿ ýòîãî àäìèíèñòðàòîð äîëæåí çàéòè íà ñòðàíèöó \"îæèäàíèå\" ïàíåëè àäìèíèñòðèðîâàíèÿ, ïðîâåðèòü ïðàâèëüíîñòü èëè îòêàçàòüñÿ îò ïðåäëîæåííûõ èçîáðàæåíèé, ïîñëå ÷åãî çàïóñòèòü îáíîâëåíèå äàííûõ èçîáðàæåíèé.";
+
+  $lang['help_virtual_title'] = 'Ñâÿçü ìåæäó èçîáðàæåíèÿìè è êàòåãîðèÿìè ñ âèðòóàëüíûìè êàòåãîðèÿìè';
+  $lang['help_virtual'][0] = 'PhpWebGallery ðàçäåëÿåò êàòåãîðèè, ãäå èçîáðàæåíèÿ ñîõðàíåíû è êàòåãîðèè, ãäå èçîáðàæåíèÿ áóäóò ïîêàçàíû..';
+  $lang['help_virtual'][1] = 'Ïî óìîë÷àíèþ, èçîáðàæåíèÿ ïîêàçûâàþòñÿ òîëüêî â èõ ðåàëüíûõ êàòåãîðèÿõ: ò.å. â ñîîòâåòñòâèè ñ êàòàëîãàìè íà ñåðâåðå.';
+  $lang['help_virtual'][2] = '×òîáû ñâÿçàòü èçîáðàæåíèå ñ êàòåãîðèåé, Âû äîëæíû àññîöèàöèèðîâàòü å¸ íà ñòðàíèöå èíôîðìàöèè îá èçîáðàæåíèè èëè íà èíôîðìàöèè î âñåõ èçîáðàæåíèÿõ êàòåãîðèè.';
+  $lang['help_virtual'][3] = 'Èñïîëüçóÿ ýòîò ïðèíöèï, ìîæíî ñîçäàâàòü âèðòóàëüíûå êàòåãîðèè â PhpWebGallery áåç ðåàëüíûõ êàòàëîãîâ ñîîòâåòñòâóþùèõ ýòîé êàòåãîðèè. Âû òîëüêî äîëæíû ñîçäàòü ýòó êàòåãîðèþ â ðàçäåëå "Êàòåãîðèè" ïàíåëè àäìèíèñòðàòîðà.';
+
+  $lang['help_groups_title'] = 'Ãðóïïû ïîëüçîâàòåëåé';
+  $lang['help_groups'][0] = 'PhpWebGallery ìîæåò óïðàâëÿòü ãðóïïàìè ïîëüçîâàòåëåé. Ìîæåò áûòü î÷åíü ïîëåçíî èìåòü îáùèå ðàçðåøåíèÿ äëÿ ÷àñòíûõ êàòåãîðèé.';
+  $lang['help_groups'][1] = '1. Ñîçäàéòå ãðóïïó "Ñåìüÿ" â ìåíþ "Ãðóïïû" ïàíåëè àäìèíèñòðàòîðà.';
+  $lang['help_groups'][2] = '2. Â ìåíþ "Ïîëüçîâàòåëè", îòðåäàêòèðóéòå è çàòåì àññîöèèðóéòå èõ ñ ãðóïïîé "Ñåìüÿ".';
+  $lang['help_groups'][3] = '3. Èçìåíÿÿ ðàçðåøåíèÿ äëÿ êàòåãîðèè èëè äëÿ ãðóïïû, Âû áóäåòå âèäåòü, ÷òî âñå êàòåãîðèè, äîñòóïíûå äëÿ ãðóïïû, äîñòóïíû è äëÿ åå ÷ëåíîâ.';
+  $lang['help_groups'][4] = 'Ïîëüçîâàòåëè ìîãóò âõîäèòü â íåñêîëüêî ãðóïï. Ðàçðåøåíèÿ ïðèîðåòåòíåå çàïðåùåíèé: åñëè ïîëüçîâàòåëü "ÃÏÑ" âõîäèò â ãðóïïó "êîëëåãè" è "äðóçüÿ", è òîëüêî ãðóïïà "êîëëåãè" ìîãóò âèäåòü êàòåãîðèþ "Ðîæäåñòâî 2003", ïîëüçîâàòåëü "ÃÏÑ" áóäåò âèäåòü "Ðîæäåñòâî 2003".';
+  $lang['help_access_title'] = 'Àâòîðèçàöèÿ äîñòóïà';
+  $lang['help_access'][0] = 'PhpWebGallery ìîæåò çàïðåòèòü äîñòóï ê êàòåãîðèÿì. Êàòåãîðèè ìîãóò áûòü "îáùèìè" èëè "÷àñòíûìè". ×òîáû çàïðåòèòü äîñòóï ê êàòåãîðèè: ';
+  $lang['help_access'][1] = '1. Èçìåíèòü èíôîðìàöèþ î êàòåãîðèè (â ðàçäåëå "êàòåãîðèè" ïàíåëè àäìèíèñòðàòîðà), è ñäåëàòü å¸ "÷àñòíîé".';
+  $lang['help_access'][2] = '2. Íà ñòðàíèöå ðàçðåøåíèé (äëÿ ãðóïïû èëè ïîëüçîâàòåëÿ) ìîæíî ðàçðåøèòü äîñòóï èëè íåò ê ÷àñòíûì êàòåãîðèÿì.';
+  $lang['permuser_only_private'] = 'Áóäóò ïîêàçàíû òîëüêî ëè÷íûå êàòåãîðèè';
+  $lang['waiting_update'] = 'Validated pictures will be displayed only once pictures database updated';
+  $lang['conf_upload_available_info'] = 'àâòîðèçàöèÿ çàãðóçêè èçîáðàæåíèé ïîëüçîâàòåëÿìè â êàòåãîðèè âåáñàéòà (íå íà óäàëåííîì ñåðâåðå). Ýòîò ïàðàìåòð íåîáõîäèì, ÷òîáû ðàçðåøèòü îáíîâëåíèå êàòåãîðèé (ïî óìîë÷àíèþ âñå êàòåãîðèè "íåîáíîâëÿåìûå").';
+  $lang['install_help'] = 'Íóæíà ïîìîùü ? Çàäàéòå Âàø âîïðîñ íà <a href="http://forum.phpwebgallery.net">PhpWebGallery ôîðóìå</a>.';
+  $lang['install_warning'] = 'Ôàéë "admin/install.php" åùå ñóùåñòâóåò. Ïîæàëóéñòà óäàëèòå åãî ñ ñåðâåðà, â èíòåðåñàõ áåçîïàñíîñòè.';
+  // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'Ýòîé êàòåãîðèè íåò â áàçå äàííûõ';
+}
+?>
Index: /branches/1.3/language/spanish.php
===================================================================
--- /branches/1.3/language/spanish.php	(revision 3252)
+++ /branches/1.3/language/spanish.php	(revision 3252)
@@ -0,0 +1,550 @@
+<?php
+/***************************************************************************
+ *                                spanish.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *   translation   : Xolda <xolda@hotmail.com>                             *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+$lang['only_members'] = 'Acceso restringido a miembros';
+$lang['invalid_pwd'] = '¡Contraseña errónea!';
+$lang['access_forbiden'] = 'No está autorizado a acceder a esta página';
+$lang['submit'] = 'Validar';
+$lang['login'] = 'usuario';
+$lang['password'] = 'contraseña';
+$lang['new'] = 'nueva';
+$lang['delete'] = 'borrar';
+$lang['category'] = 'categoría';
+$lang['thumbnail'] = 'miniatura';
+$lang['date'] = 'fecha';
+$lang['diapo_default_page_title'] = 'No hay ninguna categoría seleccionada';
+$lang['thumbnails'] = 'Miniaturas';
+$lang['categories'] = 'Categorías';
+$lang['hint_category'] = 'muestra imágenes en la raíz de esta categoría';
+$lang['total_images'] = 'total';
+$lang['title_menu'] = 'Menú';
+$lang['change_login'] = 'cambiar usuario';
+$lang['login'] = 'usuario';
+$lang['hint_login'] = 'identificarse le permite modificar la apariencia del site';
+$lang['logout'] = 'salir';
+$lang['customize'] = 'personalizar';
+$lang['hint_customize'] = 'personalizar el aspecto de la galería';
+$lang['hint_search'] = 'buscar';
+$lang['search'] = 'buscar';
+$lang['favorite_cat'] = 'favoritos';
+$lang['favorite_cat_hint'] = 'mostrar sus favoritos';
+$lang['about'] = 'acerca de';
+$lang['hint_about'] = 'más información en PhpWebGallery...';
+$lang['admin'] = 'admin';
+$lang['hint_admin'] = 'disponible sólo para administradores';
+$lang['no_category'] = 'No hay una categoría seleccionada,<br>por favor, seleccione una en el menú';
+$lang['page_number'] = 'página número';
+$lang['previous_page'] = 'Anterior';
+$lang['next_page'] = 'Siguiente';
+$lang['nb_image_category'] = 'número de imágenes en esta categoría';
+$lang['recent_image'] = 'imagen de los últimos';
+$lang['days'] = 'días';
+$lang['send_mail'] = 'Si tiene algún comentario o desea adquirir<br>alguna imagen, envíe un correo electrónico';
+$lang['title_send_mail'] = 'Comentario del site o adquirir imagen';
+$lang['sub-cat'] = 'subcategorías';
+$lang['images_available'] = 'imágenes en esta categoría';
+$lang['total'] = 'imágenes';
+$lang['upload_picture'] = 'Subir una imagen';
+$lang['registration_date'] = 'registrada el';
+$lang['creation_date'] = 'creada el';
+$lang['comment'] = 'comentario';
+$lang['author'] = 'autor';
+$lang['size'] = 'tamaño';
+$lang['filesize'] = 'tamaño del archivo';
+$lang['file'] = 'archivo';
+$lang['generation_time'] = 'Página creada en';
+$lang['favorites'] = 'Favoritos';
+$lang['search_result'] = 'Resultados de la búsqueda';
+$lang['about_page_title'] = 'Acerca de PhpWebGallery';
+$lang['about_title'] = 'Acerca de...';
+$lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Información acerca de PhpWebGallery</div>
+<ul>
+  <li>Esta sitio web usa  <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> versión '.$conf['version'].'. PhpWebGallery es una aplicación web que le ofrece la posibilidad de crear fácilmente una galería de imágenes on-line.</li>
+  <li>Técnicamente, PhpWebGallery está totalmente desarrollado en PHP (the elePHPant) en combinación con la base de datos MySQL (the SQuirreL).</li>
+  <li>Si tiene cualquier sugerencia o comentario, por favor, visite el site oficial de <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> y su <a href="'.$conf['forum_url'].'" style="text-decoration:underline">foro de discusión</a>.</li>
+</ul>';
+$lang['about_return'] = 'Atrás';
+$lang['ident_page_title'] = 'Identificación';
+$lang['ident_title'] = 'Identificación';
+$lang['ident_register'] = 'Registrar';
+$lang['ident_forgotten_password'] = '¿Ha olvidado su contraseña?';
+$lang['ident_guest_visit'] = 'Entre en la Galería como visitante';
+$lang['customize_page_title'] = 'Personalización';
+$lang['customize_title'] = 'Personalización';
+$lang['customize_nb_image_per_row'] = 'número de imágenes por fila';
+$lang['customize_nb_row_per_page'] = 'número de imágenes por página';
+$lang['customize_language'] = 'idioma';
+$lang['maxwidth'] = 'anchura máxima de las imágenes';
+$lang['maxheight'] = 'altura máxima de las imágenes';
+$lang['err_maxwidth'] = 'la anchura máxima debe ser un número superior a 50';
+$lang['err_maxheight'] = 'la altura máxima debe ser un número superior a 50';
+$lang['previous_image'] = 'Anterior';
+$lang['next_image'] = 'Siguiente';
+$lang['back'] = 'Pulse en la imagen para regresar a la página de miniaturas';
+$lang['info_image_title'] = 'Información de la imagen';
+$lang['link_info_image'] = 'Modificar información';
+$lang['true_size'] = 'Tamaño real';
+$lang['comments_title'] = 'Comentarios de los usuarios del sitio web';
+$lang['comments_del'] = 'borrar este comentario';
+$lang['comments_add'] = 'Añadir un comentario';
+$lang['month'][1] = 'Enero';
+$lang['month'][2] = 'Febrero';
+$lang['month'][3] = 'Marzo';
+$lang['month'][4] = 'Abril';
+$lang['month'][5] = 'Mayo';
+$lang['month'][6] = 'Junio';
+$lang['month'][7] = 'Julio';
+$lang['month'][8] = 'Agosto';
+$lang['month'][9] = 'Septiembre';
+$lang['month'][10] = 'Octubre';
+$lang['month'][11] = 'Noviembre';
+$lang['month'][12] = 'Diciembre';
+$lang['day'][0] = 'Domingo';
+$lang['day'][1] = 'Lunes';
+$lang['day'][2] = 'Martes';
+$lang['day'][3] = 'Miércoles';
+$lang['day'][4] = 'Jueves';
+$lang['day'][5] = 'Viernes';
+$lang['day'][6] = 'Sábado';
+$lang['add_favorites_alt'] = 'Añadir a favoritos';
+$lang['add_favorites_hint'] = 'Añadir imagen a favoritos';
+$lang['del_favorites_alt'] = 'Eliminar imagen de favoritos';
+$lang['del_favorites_hint'] = 'Eliminar imagen de favoritos';
+$lang['register_page_title'] = 'Registro';
+$lang['register_title'] = 'Registro';
+$lang['reg_err_login1'] = 'Por favor, introduzca un nombre de usuario';
+$lang['reg_err_login2'] = 'el nombre de usuario no puede acabar en espacio';
+$lang['reg_err_login3'] = 'el nombre de usuario no puede empezar con espacio';
+$lang['reg_err_login4'] = 'el nombre de usuario no puede contener " ni \'';
+$lang['reg_err_login5'] = 'el nombre de usuario ya existe';
+$lang['reg_err_pass'] = 'por favor, introduzca su contraseña de nuevo';
+$lang['reg_confirm'] = 'confirmar';
+$lang['reg_err_mail_address'] = 'la dirección de correo debe ser del tipo xxx@yyy.eee (p.ej.: usuario@proveedor.com)';
+$lang['search_title'] = 'Buscar';
+$lang['invalid_search'] = 'la búsqueda debe contener 3 carácteres o más';
+$lang['search_field_search'] = 'Buscar';
+$lang['search_return_main_page'] = 'Volver a la página de miniaturas';
+$lang['upload_forbidden'] = 'No puede subir imágenes en esta categoría';
+$lang['upload_file_exists'] = 'El nombre de alguna imagen ya existe';
+$lang['upload_filenotfound'] = 'Debe escoger un formato de imagen para el archivo';
+$lang['upload_cannot_upload'] = 'no se puede subir la imagen al servidor';
+$lang['upload_title'] = 'Subir una imagen';
+$lang['upload_advise'] = 'Escoja una imagen para ponerla en la categoría: ';
+$lang['upload_advise_thumbnail'] = 'Opcional, pero recomendable: escoja una miniatura para asociarla a ';
+$lang['upload_advise_filesize'] = 'el tamaño del archivo de la imagen no debe sobrepasar: ';
+$lang['upload_advise_width'] = 'la anchura de la imagen no debe sobrepasar: ';
+$lang['upload_advise_height'] = 'la altura de la imagen no debe sobrepasar: ';
+$lang['upload_advise_filetype'] = 'la imagen debe estar en formato JPG, GIF ó PNG';
+$lang['upload_err_username'] = 'debe dar el nombre de usuario';
+$lang['upload_username'] = 'Usuario';
+$lang['upload_successful'] = 'Imagen subida correctamente, un administrador la validará tan pronto como sea posible';
+// new or modified in release 1.3
+$lang['charset'] = 'iso-8859-1';
+$lang['no'] = 'no';
+$lang['yes'] = 'si';
+$lang['guest'] = 'invitado';
+$lang['mail_address'] = 'dirección de correo';
+$lang['public'] = 'público';
+$lang['private'] = 'privado';
+$lang['add'] = 'añadir';
+$lang['dissociate'] = 'diferenciar';
+$lang['mandatory'] = 'obligatorio';
+$lang['err_date'] = 'fecha errónea';
+$lang['picture'] = 'imagen';
+$lang['IP'] = 'IP';
+$lang['close'] = 'cerrar';
+$lang['open'] = 'abrir';
+$lang['keywords'] = 'palabras clave';
+$lang['errors_title'] = 'Errores';
+$lang['infos_title'] = 'Informaciones';
+$lang['default'] = 'por defecto';
+$lang['comments'] = 'comentarios';
+$lang['category_representative'] = 'representativa';
+$lang['stats'] = 'estadísticas';
+$lang['most_visited_cat_hint'] = 'muestra las imágenes más visitadas';
+$lang['most_visited_cat'] = 'más visitadas';
+$lang['best_rated_cat_hint'] = 'muestra las imágenes mejor valoradas';
+$lang['best_rated_cat'] = 'mejor valoradas';
+$lang['recent_cat_hint'] = 'muestra las imágenes más recientes';
+$lang['recent_cat'] = 'más recientes';
+$lang['recent_cat_title'] = 'Imágenes recientes';
+$lang['visited'] = 'visitada';
+$lang['times'] = 'veces';
+$lang['customize_theme'] = 'tema del interface';
+$lang['customize_expand'] = 'expandir todas las categorías';
+$lang['customize_show_nb_comments'] = 'mostrar el número de comentarios';
+$lang['customize_short_period'] = 'período corto';
+$lang['customize_long_period'] = 'período largo';
+$lang['customize_template'] = 'plantilla';
+$lang['err_periods'] = 'los períodos deben ser valores enteros';
+$lang['err_periods_2'] = 'los períodos deben ser superiores a 0. El período largo debe ser mayor que el período corto.';
+$lang['create_cookie'] = 'crear una cookie';
+$lang['customize_day'] = 'día';
+$lang['customize_week'] = 'semana';
+$lang['customize_month'] = 'mes';
+$lang['customize_year'] = 'año';
+$lang['slideshow'] = 'slideshow';
+$lang['period_seconds'] = 'segundos por imagen';
+$lang['slideshow_stop'] = 'parar el slideshow';
+$lang['comment_added'] = 'Su comentario ha sido registrado';
+$lang['comment_to_validate'] = 'Un administrador debe autorizar el comentario antes de que sea visible.';
+$lang['comment_anti-flood'] = 'Sistema Anti-flood: por favor, espere un momento antes de intentar enviar otro comentario';
+$lang['comment_user_exists'] = 'El nombre de usuario ya esta en uso';
+$lang['invalid_search'] = 'Las palabras buscadas deben ser de más de 3 carácteres y no deben contener signos de puntuación';
+$lang['search_mode_or'] = 'al menos una palabra';
+$lang['search_mode_and'] = 'todas las palabras';
+$lang['search_comments'] = 'separar las diferentes palabras con espacios';
+$lang['upload_name'] = 'Nombre de la imagen';
+$lang['upload_author'] = 'Autor (ej "Pierrick LE GALL")';
+$lang['upload_creation_date'] = 'Fecha de creación (DD/MM/AAAA)';
+$lang['upload_comment'] = 'Comentario';
+$lang['mail_hello'] = 'Hola,';
+$lang['mail_new_upload_subject'] = 'Nueva imagen en el sitio web';
+$lang['mail_new_upload_content'] = 'Se ha subido una nueva imagen a la galería. Está esperando a su validación. Vaya al panel de administración para autorizar o rechazar la imagen.';
+$lang['mail_new_comment_subject'] = 'Nuevo comentario del sito web';
+$lang['mail_new_comment_content'] = 'Se ha registrado un nuevo comentario en la galería. Si escoge validar cada comentario, primero tendrá que validar este comentario en el panel de administración para hacerlo visible en la galería.'."\n\n".'Puede ver los últimos comentarios en el panel de administración';
+$lang['connected_user'] = 'usuario conectado';
+$lang['title_comments'] = 'Comentarios de los usuarios';
+$lang['stats_last_days'] = 'últimos días';
+$lang['hint_comments'] = 'Ver los últimos comentarios de los usuarios';
+$lang['menu_login'] = 'usuario';
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+  $lang['title_liste_users'] = 'Lista de usuarios';
+  $lang['title_history'] = 'Historial';
+  $lang['title_update'] = 'Actualizar base de datos';
+  $lang['title_configuration'] = 'Configuración de PhpWebGallery';
+  $lang['title_instructions'] = 'Instrucciones';
+  $lang['title_categories'] = 'Administración de categorías';
+  $lang['title_edit_cat'] = 'Editar una categoría';
+  $lang['title_info_images'] = 'Modificar información de la categoría de imágenes';
+  $lang['title_thumbnails'] = 'Creación de miniaturas';
+  $lang['title_thumbnails_2'] = 'para';
+  $lang['title_default'] = 'Administración de PhpWebGallery';
+  $lang['menu_title'] = 'Administración';
+  $lang['menu_config'] = 'Configuración';
+  $lang['menu_users'] = 'Usuarios';
+  $lang['menu_add_user'] = 'añadir';
+  $lang['menu_list_user'] = 'listar';
+  $lang['menu_categories'] = 'Categorías';
+  $lang['menu_update'] = 'Actualizar base de datos';
+  $lang['menu_thumbnails'] = 'Miniaturas';
+  $lang['menu_history'] = 'Historial';
+  $lang['menu_instructions'] = 'Instrucciones';
+  $lang['menu_back'] = 'Volver a las galerías';
+  $lang['title_waiting'] = 'Imágenes pendientes de validación';
+  $lang['menu_waiting'] = 'En espera';
+  $lang['default_message'] = 'Panel de administración de PhpWebGallery';
+  $lang['conf_err_prefixe'] = 'el prefijo de la miniatura no debe contener carácteres acentuados';
+  $lang['conf_err_mail'] = 'dirección de E-mail rechazada, debe ser del tipo usuario@servidor.com';
+  $lang['conf_err_sid_size'] = 'el tamaño de identificador de sesión debe ser un valor entero entre 4 y 50';
+  $lang['conf_err_sid_time'] = 'el tiempo de sesión debe ser un valor entero entre 5 y 60';
+  $lang['conf_err_max_user_listbox'] = 'el número máximo de usuarios en la lista debe ser un valor entero entre 0 y 255';
+  $lang['conf_confirmation'] = 'Información registrada en la base de datos';
+  $lang['conf_general_title'] = 'Configuración principal';
+  $lang['conf_general_webmaster'] = 'login del webmaster';
+  $lang['conf_general_webmaster_info'] = 'Será mostrado a los visitantes. Es necesario para la administración del sitio web';
+  $lang['conf_general_mail'] = 'E-mail del Webmaster';
+  $lang['conf_general_mail_info'] = 'Los visitantes podrán contactar a través de este E-mail';
+  $lang['conf_general_prefix'] = 'prefijo de las miniaturas';
+  $lang['conf_general_prefix_info'] = 'Las miniaturas usarán este prefijo. Dejar en blanco en caso de duda.';
+  $lang['conf_general_access'] = 'tipo de acceso';
+  $lang['conf_general_access_1'] = 'libre';
+  $lang['conf_general_access_2'] = 'restringido';
+  $lang['conf_general_access_info'] = '- libre: cualquiera puede entrar en el site y crear una cuenta para personalizar la apariencia del sitio web<br />- restringido: el webmaster crea las cuentas. Sólo los usuarios registrados pueden entrar al sitio web';
+  $lang['conf_general_max_user_listbox'] = 'máximo número de usuarios en la lista';
+  $lang['conf_general_max_user_listbox_info'] = '- este es el número máx. de usuarios que PhpWebGallery mostrará en la lista en lugar de una simple caja de texto en la página de identificación<br />- introduzca un número entre 0 y 255, 0 hará que se muestre la lista';
+  $lang['conf_comments'] = 'comentarios de los usuarios';
+  $lang['conf_comments_title'] = 'Configuración de los '.$lang['conf_comments'];
+  $lang['conf_comments_show_comments'] = $lang['conf_comments'];
+  $lang['conf_comments_show_comments_info'] = '¿mostrar comentarios de los usuarios debajo de cada imagen?';
+  $lang['conf_comments_comments_number'] = 'número de comentarios por página';
+  $lang['conf_comments_comments_number_info'] = 'número de comentarios a mostrar en cada página. Este número es ilimitado para cada imagen. Introduzca un número entre 5 y 50.';
+  $lang['conf_err_comment_number'] = 'El número de comentarios por página debe estar entre 5 y 50 (inclusive).';
+  $lang['conf_remote_site_delete_info'] = 'Si elimina un servidor remoto, borrará todas las imágenes y categorías relacionadas con el servidor.';
+  $lang['conf_upload_title'] = 'Configuración de los envíos de los usuarios';
+  $lang['conf_upload_available'] = 'autorizada la subida de imágenes';
+  $lang['conf_upload_maxfilesize'] = 'tamaño máximo del archivo';
+  $lang['conf_upload_maxfilesize_info'] = 'Tamaño máximo de los archivos a subir. Debe ser un entero entre 10 y 1000 (Kb).';
+  $lang['conf_err_upload_maxfilesize'] = 'tamaño máximo de los archivos a subir. Debe ser un entero entre 10 y 1000 (Kb).';
+  $lang['conf_upload_maxwidth'] = 'anchura máxima';
+  $lang['conf_upload_maxwidth_info'] = 'Anchura máxima de las imágenes a subir. Debe ser un número superior a 10 (píxeles).';
+  $lang['conf_err_upload_maxwidth'] = 'anchura máxima de las imágenes a subir. Debe ser un número superior a 10 (píxeles).';
+  $lang['conf_upload_maxheight'] = 'altura máxima';
+  $lang['conf_upload_maxheight_info'] = 'Altura máxima de las imágenes a subir. Debe ser un número superior a 10 (píxeles).';
+  $lang['conf_err_upload_maxwidth'] = 'altura máxima de las imágenes a subir. Debe ser un número superior a 10 (píxeles).';
+  $lang['conf_upload_maxwidth_thumbnail'] = 'anchura máxima de las miniaturas';
+  $lang['conf_upload_maxwidth_thumbnail_info'] = 'Anchura máxima de las miniaturas a subir. Debe ser un número superior a 10 (píxeles).';
+  $lang['conf_err_upload_maxwidth_thumbnail'] = 'anchura máxima de las miniaturas a subir. Debe ser un número superior a 10 (píxeles).';
+  $lang['conf_upload_maxheight_thumbnail'] = 'altura máxima de las miniaturas';
+  $lang['conf_upload_maxheight_thumbnail_info'] = 'Altura máxima de las miniaturas a subir. Debe ser un número superior a 10 (píxeles).';
+  $lang['conf_err_upload_maxheight_thumbnail'] = 'altura máxima de las miniaturas a subir. Debe ser un número superior a 10 (píxeles).';
+  $lang['conf_default_title'] = 'Propiedades de visualización por defecto para usuarios no registrados y nuevas cuentas';
+  $lang['conf_default_language_info'] = 'idioma por defecto';
+  $lang['conf_default_theme_info'] = 'tema por defecto';
+  $lang['conf_session_title'] = 'Configuración de las sesiones';
+  $lang['conf_session_size'] = 'tamaño del identificador';
+  $lang['conf_session_size_info'] = '- cuanto más largo sea el identificador, más seguro será el site<br />- introduzca un número entre 4 y 50';
+  $lang['conf_session_time'] = 'período de validez';
+  $lang['conf_session_time_info'] = '- cuanto más corto sea el período de validez más seguro será el site<br />- introduzca un número entre 5 y 60, en minutos';
+  $lang['conf_session_key'] = 'palabra clave';
+  $lang['conf_session_key_info'] = '- la palabra clave de la sesión mejora la codificación del identificador de sesión<br />- introduzca una frase que no sobrepase los  255 carácteres';
+  $lang['conf_session_delete'] = 'borrar sesiones caducadas';
+  $lang['conf_session_delete_info'] = 'es recomendable vaciar la tabla de sesiones de la base de datos, porque las sesiones caducadas permanecen en la base de datos (aunque no representan un problema de seguridad)';
+  $lang['user_err_modify'] = 'Este usuario no puede ser modificado ni borrado';
+  $lang['user_err_unknown'] = 'Este usuario no existe en la base de datos';
+  $lang['adduser_info_message'] = 'Información registrada en la base de datos para el usuario ';
+  $lang['adduser_info_password_updated'] = '(contraseña actualizada)';
+  $lang['adduser_info_back'] = 'volver a la lista de usuarios';
+  $lang['adduser_fill_form'] = 'Por favor, rellene el siguiente formulario';
+  $lang['adduser_unmodify'] = 'no-modificable';
+  $lang['adduser_status'] = 'estado';
+  $lang['adduser_status_admin'] = 'admin';
+  $lang['adduser_status_guest'] = 'invitado';
+  $lang['permuser_info_message'] = 'Permisos registrados';
+  $lang['permuser_title'] = 'Restricciones para el usuario';
+  $lang['permuser_warning'] = 'Atención : un "<span style="font-weight:bold;">acceso prohibido</span>" a la raíz de una categoría deniega el acceso a la categoría entera';
+  $lang['permuser_authorized'] = 'autorizado';
+  $lang['permuser_forbidden'] = 'prohibido';
+  $lang['permuser_parent_forbidden'] = 'categoría superior prohibida';
+  $lang['listuser_confirm'] = '¿Realmente desea borrar este usuario?';
+  $lang['listuser_info_deletion'] = 'borrado de la base de datos';
+  $lang['listuser_user_group'] = 'Grupo de usuarios';
+  $lang['listuser_modify'] = 'modificar';
+  $lang['listuser_modify_hint'] = 'modificar la información de';
+  $lang['listuser_permission'] = 'permisos';
+  $lang['listuser_permission_hint'] = 'modifica los permisos de';
+  $lang['listuser_delete'] = 'borrar';
+  $lang['listuser_delete_hint'] = 'borrar usuario';
+  $lang['listuser_button_all'] = 'todos';
+  $lang['listuser_button_invert'] = 'invertir';
+  $lang['listuser_button_create_address'] = 'crear dirección de correo';
+  $lang['cat_invisible'] = 'invisible';
+  $lang['cat_edit'] = 'Editar';
+  $lang['cat_up'] = 'Subir';
+  $lang['cat_down'] = 'Bajar';
+  $lang['cat_image_info'] = 'Información de las imágenes';
+  $lang['cat_total'] = 'total';
+  $lang['editcat_confirm'] = 'Información registrada en la base de datos';
+  $lang['editcat_back'] = 'categorías';
+  $lang['editcat_title1'] = 'Opciones para el';
+  $lang['editcat_name'] = 'Nombre';
+  $lang['editcat_comment'] = 'Comentario';
+  $lang['editcat_status'] = 'Estado';
+  $lang['infoimage_general'] = 'Opciones generales para la categoría';
+  $lang['infoimage_useforall'] = '¿utilizar para todas las imágenes?';
+  $lang['infoimage_creation_date'] = 'fecha de creación';
+  $lang['infoimage_detailed'] = 'Opción para cada imagen';
+  $lang['infoimage_title'] = 'título';
+  $lang['infoimage_comment'] = 'comentario';
+  $lang['update_missing_tn'] = 'no hay miniatura para';
+  $lang['update_disappeared_tn'] = 'la miniatura no existe';
+  $lang['update_disappeared'] = 'no existe';
+  $lang['update_part_deletion'] = 'Borrado de imágenes que no tienen miniatura o que no existen';
+  $lang['update_deletion_conclusion'] = 'imágenes borradas de la base de datos';
+  $lang['update_part_research'] = 'Buscar nuevas imágenes en directorios';
+  $lang['update_research_added'] = 'añadidas';
+  $lang['update_research_tn_ext'] = 'miniaturas en';
+  $lang['update_research_conclusion'] = 'imágenes añadidas a la base de datos';
+  $lang['update_default_title'] = 'Escoja una opción';
+  $lang['update_only_cat'] = 'actualizar categorías, no imágenes';
+  $lang['update_all'] = 'actualizar todas';
+  $lang['tn_width'] = 'anchura';
+  $lang['tn_height'] = 'altura';
+  $lang['tn_no_support'] = 'Imagen inaccesible o sin soporte';
+  $lang['tn_format'] = 'para el formato de archivo';
+  $lang['tn_thisformat'] = 'para este formato de archivo';
+  $lang['tn_err_width'] = 'la anchura debe ser un número superior a';
+  $lang['tn_err_height'] = 'la altura debe ser un número superior a';
+  $lang['tn_results_title'] = 'Resultados de la miniaturización';
+  $lang['tn_picture'] = 'imagen';
+  $lang['tn_results_gen_time'] = 'generada en';
+  $lang['tn_stats'] = 'Estadísticas generales';
+  $lang['tn_stats_nb'] = 'número de imágenes miniaturizadas';
+  $lang['tn_stats_total'] = 'tiempo total';
+  $lang['tn_stats_max'] = 'tiempo máx.';
+  $lang['tn_stats_min'] = 'tiempo mín.';
+  $lang['tn_stats_mean'] = 'tiempo medio';
+  $lang['tn_err'] = 'Ha cometido errores';
+  $lang['tn_params_title'] = 'Parámetros de la miniaturización';
+  $lang['tn_params_GD'] = 'Versión de GD';
+  $lang['tn_params_GD_info'] = '- GD es la librería de manipulación de miniaturas para PHP<br />-escoja la versión instalada en su servidor. Si escoge una incorrecta, obtendrá mensajes de error, vuelva atrás con su navegador y escoja otra versión. Si no funciona, es que su servidor no soporta GD.';
+  $lang['tn_params_width_info'] = 'máxima anchura de las miniaturas';
+  $lang['tn_params_height_info'] = 'máxima altura de las miniaturas';
+  $lang['tn_params_create'] = 'crear';
+  $lang['tn_params_create_info'] = 'No intente miniaturizar demasiadas imágenes a la vez.<br />De hecho, la miniaturización utiliza muchos recursos de la CPU. Si instaló PhpWebGallery en un proveedor gratuito, una sobrecarga de CPU puede derivar en la eliminación de su sitio web.';
+  $lang['tn_params_format'] = 'formato de archivo';
+  $lang['tn_params_format_info'] = 'únicamente se permite el formato JPG para la creación de miniaturas.';
+  $lang['tn_alone_title'] = 'imágenes sin miniatura (sólo JPG y PNG)';
+  $lang['tn_dirs_title'] = 'Lista de directorios';
+  $lang['tn_dirs_alone'] = 'imágenes sin miniatura';
+  $lang['help_images_title'] = 'Añadir imágenes';
+  $lang['help_images_intro'] = 'Cómo poner las imágenes en sus directorios';
+  $lang['help_images'][0] = 'en el directorio "galleries", cree directorios que representen a sus categorías.';
+  $lang['help_images'][1] = 'en cada directorio, puede crear tantos subdirectorios como desee.';
+  $lang['help_images'][2] = 'puede crear tantas categorías y subcategorías como desee.';
+  $lang['help_images'][3] = 'las imágenes deben ser del formato JPG (extensión jpg ó JPG), formato GIF (extensión gif ó GIF) o formato PNG (extensión png ó PNG).';
+  $lang['help_images'][4] = 'intente NO usar espacios en blanco " " ni guiones "-" en los nombres de imagen, le recomendamos usar el carácter "_" de subrayado soportado por PhpWebGallery y obtendrá mejores resultados.';
+  $lang['help_thumbnails_title'] = 'Miniaturas';
+  $lang['help_thumbnails'][0] = 'en cada directorio que contenga imágenes a mostrar, debe haber un subdirectorio llamado "thumbnail", si no existe, créelo y sitúe en él las miniaturas.';
+  $lang['help_thumbnails'][1] = 'las miniaturas no necesitan tener la misma extensión que su imagen asociada (una imagen en formato .JPG puede tener asociada una miniatura en formato .GIF).';
+  $lang['help_thumbnails'][2] = 'la miniatura asociada a la imagen debe tener el prefijo que se indicó en la página de configuración (imagen.jpg -> TN_imagen.GIF, por ejemplo).';
+  $lang['help_thumbnails'][3] = 'le recomendamos usar el módulo para Windows, descargable en el site de presentación de PhpWebGallery, para la gestión de las miniaturas.';
+  $lang['help_thumbnails'][4] = 'puede usar la página de creación de miniaturas integrada en PhpWebGallery, pero no es aconsejable, ya que la calidad puede ser bastante pobre y carga bastante la CPU, lo cual puede ser un problema si utiliza un servidor gratuito.';
+  $lang['help_thumbnails'][5] = 'si elige usar a su proveedor de hosting para crear las miniaturas, debe dar los derechos 775 a la carpeta "galleries" y a todas sus subcarpetas.';
+  $lang['help_database_title'] = 'Actualizando la base de datos';
+  $lang['help_database'][0] = 'una vez ubicadas correctamente las imágenes y miniaturas en los directorios, pulse en "database update" en el menú del panel de administración.';
+  $lang['help_infos_title'] = 'Información diversa';
+  $lang['help_infos'][1] = 'Una vez haya creado su galería, vaya a la lista de usuarios y modifique los permisos para el "visiteur". De hecho, cada nuevo usuario tendrá por defecto los mismos permisos que el usuario "visiteur".';
+  $lang['help_remote_title'] = 'Site remoto';
+  $lang['help_remote'][0] = 'PhpWebGallery ofrece la posibilidad de usar varios servidores para almacenar las imágenes que componen su galería. Puede ser útil si su galería está instalada en un espacio web reducido y tiene gran cantidad de imágenes que mostrar. Por favor, siga el siguiente procedimiento: ';
+  $lang['help_remote'][1] = '1. Edite el fichero "create_listing_file.php" (lo encontrará en el directorio "admin"), y modifique la línea "$prefix_thumbnail = "TN-";" si el prefijo de sus miniaturas no es "TN-".';
+  $lang['help_remote'][2] = '2. Ponga el archivo "create_listing_file.php" modificado en su website remoto, en el directorio raíz de sus directorios de imágenes (como el directorio "galleries" de este website), a través de ftp.';
+  $lang['help_remote'][3] = '3. Ejecute el script usando la url http://DominioRemoto/Galería/create_listing_file.php, y se creará el archivo listing.xml.';
+  $lang['help_remote'][4] = '4. Recupere el fichero listing.xml de su website remoto y póngalo en el directorio "admin" de este website.';
+  $lang['help_remote'][5] = '5. Por favor, realice una actualización de los datos de las imágenes mediante el interface de administración, y una vez usado el fichero listing.xml, bórrelo del directorio "admin".';
+  $lang['help_remote'][6] = 'Puede actualizar los contenidos del site remoto repitiendo los pasos descritos. También puede eliminar el site remoto escogiendo la opción en la sección de configuración del panel de administración.';
+  $lang['help_upload_title'] = 'Imágenes añadidas por los usuarios';
+  $lang['help_upload'][0] = 'PhpWebGallery ofrece la posibilidad a los usuarios de subir imágenes. Para hacerlo:';
+  $lang['help_upload'][1] = '1. Autorice la opción en la zona de configuración del panel de administración';
+  $lang['help_upload'][2] = '2. Autorice los derechos de escritura en los directorios de imágenes';
+  $lang['install_message'] = 'Mensaje';
+  $lang['step1_confirmation'] = 'Parámetros correctos';
+  $lang['step1_err_db'] = 'Conexión al servidor realizada, pero imposible conectar con la base de datos';
+  $lang['step1_err_server'] = 'No se puede conectar al servidor';
+  $lang['step1_err_copy_2'] = 'Se puede proceder al siguiente paso de la instalación';
+  $lang['step1_err_copy_next'] = 'siguiente paso';
+  $lang['step1_title'] = 'Paso 1/2';
+  $lang['step1_host'] = 'Servidor MySQL';
+  $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
+  $lang['step1_user'] = 'usuario';
+  $lang['step1_user_info'] = 'nombre de usuario proporcionado por su proveedor';
+  $lang['step1_pass'] = 'Contraseña';
+  $lang['step1_pass_info'] = 'contraseña de usuario proporcionada por su proveedor';
+  $lang['step1_database'] = 'Nombre de la base de datos';
+  $lang['step1_database_info'] = 'también proporcionado por su proveedor';
+  $lang['step1_prefix'] = 'Prefijo para las tablas en la base de datos';
+  $lang['step1_prefix_info'] = 'los nombres de las tablas de la base de datos deberán llevar un prefijo (facilita el manejo de las tablas)';
+  $lang['step2_err_login1'] = 'introduzca un nombre de usuario para el webmaster';
+  $lang['step2_err_login3'] = 'el nombre del Webmaster no puede contener carácteres como \' o "';
+  $lang['step2_err_pass'] = 'por favor, confirme su contraseña';
+  $lang['step2_err_mail'] = $lang['conf_err_mail'];
+  $lang['install_end_title'] = 'Instalación finalizada';
+  $lang['install_end_message'] = 'La configuración de PhpWebGallery ha terminado, este es el siguiente paso<br /><br />
+Por razones de seguridad, por favor borre el fichero "install.php" del directorio "admin"<br />
+Una vez borrado, siga estas instrucciones:
+<ul>
+  <li>vaya a la página de identificación: [ <a href="../identification.php">identificación</a> ] e introduzca el usuario/contraseña asignados al webmaster</li>
+  <li>Esta identificación le dará acceso al [ <a href="admin.php">panel de administración</a> ] y a las instrucciones necesarias para poner imágenes en sus directorios</li>
+</ul>';
+  $lang['step2_title'] = 'Paso 2/2';
+  $lang['step2_pwd'] = 'contraseña del webmaster';
+  $lang['step2_pwd_info'] = 'Manténgala confidencial, ya que le da acceso al panel de administración';
+  $lang['step2_pwd_conf'] = 'confirmar contraseña';
+  $lang['step2_pwd_conf_info'] = 'verificación';
+  // new or modified in release 1.3
+  $lang['remote_site'] = 'Site remoto';
+  $lang['title_add'] = 'Añadir usuario';
+  $lang['title_modify'] = 'Modificar usuario';
+  $lang['title_groups'] = 'Gestión de grupos';
+  $lang['title_user_perm'] = 'Modificar permisos para el usuario';
+  $lang['title_cat_perm'] = 'Modificar permisos para la categoría';
+  $lang['title_group_perm'] = 'Modificar permisos para el grupo';
+  $lang['title_picmod'] = 'Modificar información de la imagen';
+  $lang['menu_groups'] = 'Grupos';
+  $lang['menu_comments'] = 'Comentarios';
+  $lang['conf_general_log'] = 'historial';
+  $lang['conf_general_log_info'] = '¿Mantener historial de visitas de su sitio web? Las visitas se mostrarán en la sección de historial del panel de administración';
+  $lang['conf_general_mail_notification'] = 'Notificación por correo';
+  $lang['conf_general_mail_notification_info'] = 'Notificación automática de correo para los administradores (y sólo para ellos) cuando un usuario añada un comentario o suba una imagen.';
+  $lang['conf_comments_validation'] = 'validación';
+  $lang['conf_comments_validation_info'] = 'Un administrador valida los comentarios enviados por los usuarios antes de que estos sean visibles en el sitio web.';
+  $lang['conf_comments_forall'] = '¿para todos?';
+  $lang['conf_comments_forall_info'] = 'Los usuarios no registrados pueden enviar comentarios';
+  $lang['conf_default_nb_image_per_row_info'] = 'número de imágenes por fila por defecto';
+  $lang['conf_default_nb_row_per_page_info'] = 'número de filas por página por defecto';
+  $lang['conf_default_short_period_info'] = 'Por días. Período durante el cual una imagen se muestra con la marca roja. El período corto debe ser superior a 1 día.';
+  $lang['conf_default_long_period_info'] = 'Por días. Período durante el cual una imagen se muestra con la marca verde. El período largo debe ser superior al período corto.';
+  $lang['conf_default_expand_info'] = '¿expandir todas las categorías por defecto en el menú?';
+  $lang['conf_default_show_nb_comments_info'] = 'mostrar el número de comentarios para cada imagen en la página de miniaturas';
+  $lang['conf_default_maxwidth_info'] = 'Máxima anchura para la visualización de imágenes: la imagen tendrá una nueva anchura sólo para la visualización, los archivos de imagen no se cambiarán. Déjelo vacío si no quiere poner límite.';
+  $lang['conf_default_maxheight_info'] = 'Sólo como la máxima anchura, excepto para la altura';
+  $lang['conf_session_cookie'] = 'autorizar cookies';
+  $lang['conf_session_cookie_info'] = 'los usuarios no deberán identificarse en cada visita. Menos seguro.';
+  $lang['adduser_associate'] = 'Asociar al grupo';
+  $lang['group_add'] = 'Añadir un grupo';
+  $lang['group_add_error1'] = 'El nombre del grupo no debe contener " o \'';
+  $lang['group_add_error2'] = 'El nombre ya está usado por otro grupo';
+  $lang['group_confirm'] = '¿Está seguro de que quiere borrar este grupo?';
+  $lang['group_list_title'] = 'Lista de grupos existentes';
+  $lang['group_err_unknown'] = 'Este grupo no existe en la base de datos';
+  $lang['cat_permission'] = 'permisos';
+  $lang['cat_update'] = 'actualizar';
+  $lang['cat_add'] = 'Añadir una categoría virtual';
+  $lang['cat_parent'] = 'categoría padre';
+  $lang['cat_error_name'] = 'El nombre de la categoría no debe estar vacío';
+  $lang['cat_virtual'] = 'virtual';
+  $lang['cat_first'] = 'Poner primera';
+  $lang['cat_last'] = 'Poner última';
+  $lang['editcat_visible_info'] = '(invisible excepto para los administradores)';
+  $lang['editcat_visible'] = 'Visible';
+  $lang['editcat_uploadable'] = 'Subida disponible';
+  $lang['infoimage_keyword_separation'] = '(separar con coma ",")';
+  $lang['infoimage_addtoall'] = 'añadir a todas';
+  $lang['infoimage_removefromall'] = 'borrar de todas';
+  $lang['infoimage_associate'] = 'Asociar a la categoría';
+  $lang['update_wrong_dirname'] = 'El nombre de los directorios y de los archivos debe estar compuesto de letras, cifras,  "-", "_" o "."';
+  $lang['stats_pages_seen'] = 'páginas visitadas';
+  $lang['stats_visitors'] = 'invitados';
+  $lang['stats_empty'] = 'borrar historial';
+  $lang['stats_pages_seen_graph_title'] = 'Número de páginas visitadas por día';
+  $lang['stats_visitors_graph_title'] = 'Número de invitados por día';
+  $lang['comments_last_title'] = 'Últimos comentarios';
+  $lang['comments_non_validated_title'] = 'Comentarios en espera de validación';
+  $lang['help_database'][1] = 'Para evitar la actualización de demasiadas imágenes en una actualización simple, le recomendamos que empiece actualizando sólo las categorías, y entonces en la sección de categorías del panel de administración, actualice cada categoría desde el enlace "actualizar"';
+  $lang['help_upload'][3] = 'La categoría debe tener habilitado "subir" para poder hacerlo.';
+  $lang['help_upload'][4] = 'Las imágenes subidas por los usuarios no están directamente visibles en el sitio web, deben ser validadas por el administrador. Para ello, un administrador debe entrar en la página "en attente" del panel de administración, para validar o rechazar las imágenes propuestas, y entonces realizar una actualización de los datos de las imágenes.';
+  $lang['help_virtual_title'] = 'Enlaces entre las imágenes y las categorías y las categorías virtuales';
+  $lang['help_virtual'][0] = 'PhpWebGallery es capaz de diferenciar las categorías donde las imágenes están guardadas y las categorías donde las imágenes se muestran.';
+  $lang['help_virtual'][1] = 'Por defecto, las imágenes sólo se muestran en sus categorías reales: las que se correspondan a los directorios en el servidor web.';
+  $lang['help_virtual'][2] = 'Para enlazar una imagen a una categoría, sólo tiene que hacer la asociación en la página de información de la imagen o en las informaciones de todas las imágenes de una categoría.';
+  $lang['help_virtual'][3] = 'Usando este principio, es posible crear categorías virtuales en PhpWebGallery: ningún directorio real corresponde a esta categoría. Sólo tiene que crear esta categoría en la sección de "categorías" del panel de administración.';
+  $lang['help_groups_title'] = 'Grupos de Usuarios';
+  $lang['help_groups'][0] = 'PhpWebGallery puede gestionar grupos de usuarios. Puede ser muy útil tener un permiso de acceso común para las categorías privadas.';
+  $lang['help_groups'][1] = '1. Crear el grupo "familia" en la sección "Grupos" del panel de administración.';
+  $lang['help_groups'][2] = '2. En la sección de "Usuarios", edite uno de ellos y asócielo al grupo "familia".';
+  $lang['help_groups'][3] = '3. Modificando los permisos de una categoría o grupo, verá que todas las categorías accesibles para un grupo son accesibles para sus miembros.';
+  $lang['help_groups'][4] = 'Un usuario puede pertenecer a varios grupos. La autorización tiene más peso que la prohibición: si el usuario "pepe" pertenece al grupo "familia" y "amigos", y sólo el grupo "familia" puede ver la categoría "Navidad 2003", "pepe" podrá ver "Navidad 2003".';
+  $lang['help_access_title'] = 'Autorización de acceso';
+  $lang['help_access'][0] = 'PhpWebGallery puede prohibir el acceso a las categorías. Las categorías pueden ser "públicas" o "privadas". Para prohibir el acceso a una categoría:';
+  $lang['help_access'][1] = '1. Modifique las informaciones de la categoría (desde la sección de "categorías" en el panel de administración) y hágala "privada".';
+  $lang['help_access'][2] = '2. En la página de permisos (para un grupo o un usuario) la categoría privada se mostrará y podrá autorizar el acceso o no.';
+  $lang['help_infos'][2] = 'Si tiene alguna pregunta, no dude en entrar al foro o realice una consulta desde allí. El <a href="'.$conf['forum_url'].'" style="text-decoration:underline">foro</a> (tablón de mensajes) está disponible en el site de presentación de PhpWebGallery.';
+  $lang['step1_err_copy'] = 'Copie el texto entre paréntesis y péguelo en el archivo "include/mysql.inc.php"(Atención: mysql.inc.php sólo debe contener lo que está en azul, sin ningún salto de línea ni espacio)';
+  $lang['permuser_only_private'] = 'Sólo se muestran las categorías privadas';
+  $lang['waiting_update'] = 'Las imágenes validadas serán mostradas cuando se actualice la base de datos de las imágenes';
+  $lang['conf_upload_available_info'] = 'Autorizando la subida de imágenes por los usuarios en las categorías del sitio web (no en un servidor remoto). Este es un parámetro general, es necesario autorizar la subida categoría por categoría, ya que por defecto no se pueden subir imágenes en las categorías.';
+  $lang['install_help'] = '¿Necesita ayuda? Realice su consulta en el <a href="http://forum.phpwebgallery.net">Tablón de mensajes de PhpWebGallery</a>.';
+  $lang['install_warning'] = 'El archivo "admin/install.php" aún está presente. Por favor, elimínelo de su servidor. No es seguro mantenerlo.';
+  // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'This category is unknown in the database';
+}
+?>
Index: /branches/1.3/language/svenska.php
===================================================================
--- /branches/1.3/language/svenska.php	(revision 3252)
+++ /branches/1.3/language/svenska.php	(revision 3252)
@@ -0,0 +1,551 @@
+<?php
+/***************************************************************************
+ *                                swedish.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *   translation   : Jimi Wester <webmaster@westers.se>                    *
+ *                   Patrik Johansson <patjoh@itstud.chalmers.se>          *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+$lang['only_members'] = 'Endast medlemmar kan komma åt denna sidan';
+$lang['invalid_pwd'] = 'Felaktigt lösenord!';
+$lang['access_forbiden'] = 'Du är inte berättigad att nå denna sida';
+$lang['submit'] = 'Skicka';
+$lang['login'] = 'användarnamn';
+$lang['password'] = 'lösenord';
+$lang['new'] = 'ny';
+$lang['delete'] = 'ta bort';
+$lang['category'] = 'kategori';
+$lang['thumbnail'] = 'miniatyr';
+$lang['date'] = 'datum';
+$lang['diapo_default_page_title'] = 'Ingen kategori är vald';
+$lang['thumbnails'] = 'Miniatyrer';
+$lang['categories'] = 'Kategorier';
+$lang['hint_category'] = 'visar bilder i roten av denna kategori';
+$lang['total_images'] = 'totalt';
+$lang['title_menu'] = 'Meny';
+$lang['change_login'] = 'byt inloggning';
+$lang['login'] = 'logga in';
+$lang['hint_login'] = 'identifikation möjliggör sidans skräddarsydda inställningar';
+$lang['logout'] = 'logga ut';
+$lang['customize'] = 'skräddarsy';
+$lang['hint_customize'] = 'skräddarsy utseendet av galleriet';
+$lang['hint_search'] = 'söka';
+$lang['search'] = 'sök';
+$lang['favorite_cat'] = 'favoriter';
+$lang['favorite_cat_hint'] = 'visa dina favoriter';
+$lang['about'] = 'om';
+$lang['hint_about'] = 'mer information om PhpWebGallery...';
+$lang['admin'] = 'administratör';
+$lang['hint_admin'] = 'endast för administratörer';
+$lang['no_category'] = 'Ingen kategori vald<br />välj det i menyn';
+$lang['page_number'] = 'sidnummer';
+$lang['previous_page'] = 'Fördgående';
+$lang['next_page'] = 'Nästa';
+$lang['nb_image_category'] = 'antal bilder i denna kategorin';
+$lang['recent_image'] = 'bild inom';
+$lang['days'] = 'dagar';
+$lang['send_mail'] = 'Kommentarer? Skicka ett e-postmeddelande';
+$lang['title_send_mail'] = 'En kommentar på din hemsida';
+$lang['sub-cat'] = 'underkategorier';
+$lang['images_available'] = 'bilder i denna kategori';
+$lang['total'] = 'bilder';
+$lang['upload_picture'] = 'Skicka upp en bild';
+$lang['registration_date'] = 'registrerad';
+$lang['creation_date'] = 'skapad den';
+$lang['comment'] = 'kommentar';
+$lang['author'] = 'upphovsman';
+$lang['size'] = 'storlek';
+$lang['filesize'] = 'filstorlek';
+$lang['file'] = 'filnamn';
+$lang['generation_time'] = 'Sidan laddades på';
+$lang['favorites'] = 'Favoriter';
+$lang['search_result'] = 'Sökresultat';
+$lang['about_page_title'] = 'Om PhpWebGallery';
+$lang['about_title'] = 'Om...';
+$lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Information om PhpWebGallery</div>
+<ul>
+  <li>Denna webbsida använder <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallery</a> version '.$conf['version'].'. PhpWebGallery är ett webbsideprogram som ger dig möjligheten att skapa ett webbaserat bildgalleri på ett enkelt sätt.</li>
+  <li>Tekniskt sett, så är PhpWebGallery skapat med PHP ("the elePHPant") med en MySQL databas ("the SQuirreL").</li>
+  <li>Om du har några förslag eller kommentarer, besök då gärna <a href="'.$conf['site_url'].'" style="text-decoration:underline">PhpWebGallerys</a> officiella webbsida, och det <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> som behandlar detta program.</li>
+</ul>';
+$lang['about_return'] = 'Tillbaka';
+$lang['ident_page_title'] = 'Identifikation';
+$lang['ident_title'] = 'Identifikation';
+$lang['ident_register'] = 'Registrera';
+$lang['ident_forgotten_password'] = 'Glömt ditt lösenord?';
+$lang['ident_guest_visit'] = 'Gå igenom galleriet som en besökare';
+$lang['customize_page_title'] = 'Skräddarsy';
+$lang['customize_title'] = 'Skräddarsy';
+$lang['customize_nb_image_per_row'] = 'antal bilder per rad';
+$lang['customize_nb_row_per_page'] = 'antal rader per sida';
+$lang['customize_language'] = 'språk';
+$lang['maxwidth'] = 'maximal bredd på bilderna';
+$lang['maxheight'] = 'maximal höjd på bilderna';
+$lang['err_maxwidth'] = 'maximal bredd måste vara ett nummer högre än 50';
+$lang['err_maxheight'] = 'maximal höjd måste vara ett nummer högre än 50';
+$lang['previous_image'] = 'Förgående';
+$lang['next_image'] = 'Nästa';
+$lang['back'] = 'Klicka på bilden för att gå tillbaka till miniatyrsidan';
+$lang['info_image_title'] = 'Bildinformation';
+$lang['link_info_image'] = 'Ändra information';
+$lang['true_size'] = 'Verklig storlek';
+$lang['comments_title'] = 'Kommentarer från användare på webbsidan';
+$lang['comments_del'] = 'ta bort denna kommentar';
+$lang['comments_add'] = 'Lägg till kommentar';
+$lang['month'][1] = 'Januari';
+$lang['month'][2] = 'Februari';
+$lang['month'][3] = 'Mars';
+$lang['month'][4] = 'April';
+$lang['month'][5] = 'Maj';
+$lang['month'][6] = 'Juni';
+$lang['month'][7] = 'Juli';
+$lang['month'][8] = 'Augusti';
+$lang['month'][9] = 'September';
+$lang['month'][10] = 'Oktober';
+$lang['month'][11] = 'November';
+$lang['month'][12] = 'December';
+$lang['day'][0] = 'Söndag';
+$lang['day'][1] = 'Måndag';
+$lang['day'][2] = 'Tisdag';
+$lang['day'][3] = 'Onsdag';
+$lang['day'][4] = 'Torsdag';
+$lang['day'][5] = 'Fredag';
+$lang['day'][6] = 'Lördag';
+$lang['add_favorites_alt'] = 'Lägg till i favoriter';
+$lang['add_favorites_hint'] = 'Lägg till denna bild i dina favoriter';
+$lang['del_favorites_alt'] = 'Ta bort från favoriter';
+$lang['del_favorites_hint'] = 'Ta bort denna bild från dina favoriter';
+$lang['register_page_title'] = 'Registrering';
+$lang['register_title'] = 'Registrering';
+$lang['reg_err_login1'] = 'Var god ange användarnamn';
+$lang['reg_err_login2'] = 'användarnamn får inte sluta med blanksteg';
+$lang['reg_err_login3'] = 'användarnamn får inte börja med blanksteg';
+$lang['reg_err_login4'] = 'användarnamn får inte innehålla " och \'';
+$lang['reg_err_login5'] = 'detta användarnamn är upptaget';
+$lang['reg_err_pass'] = 'Var god ange lösenordet igen';
+$lang['reg_confirm'] = 'bekräfta lösenord';
+$lang['reg_err_mail_address'] = 'E-postadress måste se ut så här: xxx@yyy.eee (exempel : jack@altern.org)';
+$lang['search_title'] = 'Sök';
+$lang['invalid_search'] = 'sökning måste vara på 3 eller fler tecken';
+$lang['search_field_search'] = 'Sök';
+$lang['search_return_main_page'] = 'Återvänd till miniatyrsidan';
+$lang['upload_forbidden'] = 'Du kan inte skicka upp bilder i denna kategori';
+$lang['upload_file_exists'] = 'Filnamnet är upptaget';
+$lang['upload_filenotfound'] = 'Du måste välja ett bildformat för bilden';
+$lang['upload_cannot_upload'] = 'kan inte skicka upp bilden till servern';
+$lang['upload_title'] = 'Skicka upp bild';
+$lang['upload_advise'] = 'Välj en bild att lägga i kategori : ';
+$lang['upload_advise_thumbnail'] = 'Valfritt, men rekommenderat : välj miniatyr att knyta till ';
+$lang['upload_advise_filesize'] = 'filstorleken får inte vara större än : ';
+$lang['upload_advise_width'] = 'bredden av bilden får inte vara större än : ';
+$lang['upload_advise_height'] = 'höjden av bilden får inte vara större än  : ';
+$lang['upload_advise_filetype'] = 'bilden måste vara av formaten jpg, gif eller png';
+$lang['upload_err_username'] = 'ett användarnamn måste anges';
+$lang['upload_username'] = 'Användarnamn';
+$lang['upload_successful'] = 'Bilden skickades utan problem, en administratör kommer att godkänna den så fort som möjligt';
+// new or modified in release 1.3
+$lang['charset'] = 'iso-8859-1';
+$lang['no'] = 'nej';
+$lang['yes'] = 'ja';
+$lang['guest'] = 'gäst';
+$lang['mail_address'] = 'e-postadress';
+$lang['public'] = 'publik';
+$lang['private'] = 'privat';
+$lang['add'] = 'lägg till';
+$lang['dissociate'] = 'separera';
+$lang['mandatory'] = 'obligatorisk';
+$lang['err_date'] = 'fel datum';
+$lang['picture'] = 'bild';
+$lang['IP'] = 'IP';
+$lang['close'] = 'stäng';
+$lang['open'] = 'öppna';
+$lang['keywords'] = 'nyckelord';
+$lang['errors_title'] = 'Fel';
+$lang['infos_title'] = 'Information';
+$lang['default'] = 'standard';
+$lang['comments'] = 'kommentarer';
+$lang['category_representative'] = 'representativ';
+$lang['stats'] = 'statistik';
+$lang['most_visited_cat_hint'] = 'visar de mest besökta bilderna';
+$lang['most_visited_cat'] = 'mest besökta';
+$lang['best_rated_cat_hint'] = 'visar de högst värderade bilderna';
+$lang['best_rated_cat'] = 'högst värderade';
+$lang['recent_cat_hint'] = 'visar de senaste visade bilderna';
+$lang['recent_cat'] = 'de senast visade';
+$lang['recent_cat_title'] = 'Senaste visade bilder';
+$lang['visited'] = 'besökta';
+$lang['times'] = 'gånger';
+$lang['customize_theme'] = 'gränssnitttema';
+$lang['customize_expand'] = 'veckla ut alla kategorier';
+$lang['customize_show_nb_comments'] = 'visa antal kommentarer';
+$lang['customize_short_period'] = 'kort period';
+$lang['customize_long_period'] = 'lång period';
+$lang['customize_template'] = 'utseende';
+$lang['err_periods'] = 'period måste bara ett heltal';
+$lang['err_periods_2'] = 'period måste vara högre än 0. Den långa perioden måste vara längre än den korta.';
+$lang['create_cookie'] = 'skapa en kaka';
+$lang['customize_day'] = 'dag';
+$lang['customize_week'] = 'vecka';
+$lang['customize_month'] = 'månad';
+$lang['customize_year'] = 'år';
+$lang['slideshow'] = 'bildspel';
+$lang['period_seconds'] = 'sekunder per bild';
+$lang['slideshow_stop'] = 'stoppa bildspel';
+$lang['comment_added'] = 'Din kommentar har blivit registrerad';
+$lang['comment_to_validate'] = 'En administratör måste godkänna din kommentar innan den visas.';
+$lang['comment_anti-flood'] = 'Översvämmningssystemet : var god vänta en stund innan du postar en ny kommentar';
+$lang['comment_user_exists'] = 'Användarnamnet används redan av annan användare';
+$lang['invalid_search'] = 'Ord i sökningen måste vara större än 3 tecken och får inte innehålla punkt';
+$lang['search_mode_or'] = 'minst ett ord';
+$lang['search_mode_and'] = 'alla ord';
+$lang['search_comments'] = 'separera olika ord med blanksteg';
+$lang['upload_name'] = 'Namn på bilden';
+$lang['upload_author'] = 'Upphovsman (typ "Pierrick LE GALL")';
+$lang['upload_creation_date'] = 'Skapad datum (DD/MM/YYYY)';
+$lang['upload_comment'] = 'Kommentar';
+$lang['mail_hello'] = 'Hej,';
+$lang['mail_new_upload_subject'] = 'Ny bild på webbsidan';
+$lang['mail_new_upload_content'] = 'En ny bild har skickats upp till galleriet. Det väntar på att du ska godkänna det. Gå till admin-panelen för att godkänna eller avvisa bilden.';
+$lang['mail_new_comment_subject'] = 'Ny kommentar på webbsida';
+$lang['mail_new_comment_content'] = 'En ny kommentar har registrerats på webbsidan. Om du väljer att godkänna varje kommentar, så måste du först godkänna denna kommentar i admin-panelen för att den ska synas i galleriet.'."\n\n".'Du kan se senaste kommentaren i admin-panelen';
+$lang['connected_user'] = 'ansluten användare';
+$lang['title_comments'] = 'Användarkommentar';
+$lang['stats_last_days'] = 'senaste dagarna';
+$lang['hint_comments'] = 'Se senaste användararnas kommentarer';
+$lang['menu_login'] = 'logga in';
+//-------------------------------------------------------------- administration
+if ( $isadmin )
+{
+  $lang['title_liste_users'] = 'Användarlista';
+  $lang['title_history'] = 'Historik';
+  $lang['title_update'] = 'Uppdatera databas';
+  $lang['title_configuration'] = 'Konfiguration för PhpWebGallery';
+  $lang['title_instructions'] = 'Instruktioner';
+  $lang['title_categories'] = 'Kategorihantering';
+  $lang['title_edit_cat'] = 'Ändra en kategori';
+  $lang['title_info_images'] = 'Ändra kategorins bildinformation';
+  $lang['title_thumbnails'] = 'Skapa miniatyrer';
+  $lang['title_thumbnails_2'] = 'för';
+  $lang['title_default'] = 'Administration för PhpWebGallery';
+  $lang['menu_title'] = 'Administration';
+  $lang['menu_config'] = 'Konfiguration';
+  $lang['menu_users'] = 'Användare';
+  $lang['menu_add_user'] = 'Lägg till';
+  $lang['menu_list_user'] = 'lista';
+  $lang['menu_categories'] = 'Kategorier';
+  $lang['menu_update'] = 'Uppdatera databas';
+  $lang['menu_thumbnails'] = 'Miniatyrer';
+  $lang['menu_history'] = 'Historik';
+  $lang['menu_instructions'] = 'Instruktioner';
+  $lang['menu_back'] = 'Tillbaka till gallerier';
+  $lang['title_waiting'] = 'Bilder som väntar på godkännande';
+  $lang['menu_waiting'] = 'Väntar på godkännande';
+  $lang['default_message'] = 'PhpWebGallery administrationspanel';
+  $lang['conf_err_prefixe'] = 'miniatyrens prefix får inte innehålla några accenttecken';
+  $lang['conf_err_mail'] = 'e-postadress avvisad, ska se ut som: name@server.com';
+  $lang['conf_err_sid_size'] = 'sessionens identifikationsstorlek måste vara ett heltal mellan 4 och 50';
+  $lang['conf_err_sid_time'] = 'sessionens tid måste vara ett heltal mellan 5 och 60';
+  $lang['conf_err_max_user_listbox'] = 'max antal användare i listboxen måste vara ett heltal mellan 0 och 255';
+  $lang['conf_confirmation'] = 'Information registrerad i databasen';
+  $lang['conf_general_title'] = 'Huvudkonfiguration';
+  $lang['conf_general_webmaster'] = 'webmaster användare';
+  $lang['conf_general_webmaster_info'] = 'Det kommer att visas för besökare. Det är nödvändigt för webbsidans administration';
+  $lang['conf_general_mail'] = 'webmasters mailadress';
+  $lang['conf_general_mail_info'] = 'Besökare kommer att kunna kontakta via denna epostadress';
+  $lang['conf_general_prefix'] = 'miniatyrens prefix';
+  $lang['conf_general_prefix_info'] = 'Minityren använder detta prefix. Ändra inte om du är osäker.';
+  $lang['conf_general_access'] = 'Typ av åtkomst';
+  $lang['conf_general_access_1'] = 'fri';
+  $lang['conf_general_access_2'] = 'begränsad';
+  $lang['conf_general_access_info'] = '- fri : vem som helst kan komma in på webbsidan, vilken besökare som helst ett konto för att ändra utseendet på webbsidan.<br />- begränsad : webmastern skapar användarkonton. Endast registrerade användare kan komma in på webbsidan';
+  $lang['conf_general_max_user_listbox'] = 'maximalt antal användare i användarlistan';
+  $lang['conf_general_max_user_listbox_info'] = '- detta är maximala antalet av användare som PhpWebGallery visar i en användarlista istället för en enkel textruta på identifieringssidan<br />- skriv in ett nummer mellan 0 och 255, 0 betyder att du inte vill visa användarlistan';
+  $lang['conf_comments'] = 'användarkommentarer';
+  $lang['conf_comments_title'] = 'Konfiguration av '.$lang['conf_comments'];
+  $lang['conf_comments_show_comments'] = $lang['conf_comments'];
+  $lang['conf_comments_show_comments_info'] = 'visa användarnas kommentarer under varje bild ?';
+  $lang['conf_comments_comments_number'] = 'antal kommentarer per sida';
+  $lang['conf_comments_comments_number_info'] = 'antal kommentarer som visas på varje sida. Detta antal är obegränsat för bilder. Skriv in ett nummer mellan 5 och 50.';
+  $lang['conf_err_comment_number'] = 'Antalet kommentarer per sida måste vara mellan 5 och 50.';
+  $lang['conf_remote_site_delete_info'] = 'Tar du bort en fjärrserver så tar du även bort alla bilder och kategorier som den är relaterad till.';
+  $lang['conf_upload_title'] = 'Konfiguration av uppladdning av bilder för användare';
+  $lang['conf_upload_available'] = 'godkänn uppladdningen av bilder';
+  $lang['conf_upload_maxfilesize'] = 'max filstorlek';
+  $lang['conf_upload_maxfilesize_info'] = 'Maximal filstorlek för uppladdade bilder. Måste vara ett nummer mellan 10 och 1000 KB.';
+  $lang['conf_err_upload_maxfilesize'] = 'Maximal filstorlek för de uppladdade bilderna måste vara ett nummer mellan 10 och 1000 KB.';
+  $lang['conf_upload_maxwidth'] = 'maximal bredd';
+  $lang['conf_upload_maxwidth_info'] = 'Maximal bredd godkännd för uppladdade bilder. Måste vara högre än 10 pixlar';
+  $lang['conf_err_upload_maxwidth'] = 'Maximal bredd godkännd för de uppladdade bilderna måste vara ett nummer högre än 10 pixlar.';
+  $lang['conf_upload_maxheight'] = 'maximal höjd';
+  $lang['conf_upload_maxheight_info'] = 'Maximal höjd godkännd för uppladdade bilder. Måste vara högre än 10 pixlar';
+  $lang['conf_err_upload_maxwidth'] = 'Maximal höjd godkännd för de uppladdade bilderna måste vara ett nummer högre än 10 pixlar.';
+  $lang['conf_upload_maxwidth_thumbnail'] = 'miniatyrers maximala bredd';
+  $lang['conf_upload_maxwidth_thumbnail_info'] = 'Maximal bredd godkännd för uppladdade miniatyrer.  Måste vara högre än 10 pixlar';
+  $lang['conf_err_upload_maxwidth_thumbnail'] = 'Maximal bredd godkännd för de uppladdade miniatyrerna måste vara ett nummer högre än 10 pixlar.';
+  $lang['conf_upload_maxheight_thumbnail'] = 'miniatyrers maximala höjd';
+  $lang['conf_upload_maxheight_thumbnail_info'] = 'Maximal höjd godkännd för uppladdade miniatyrer.  Måste vara högre än 10 pixlar';
+  $lang['conf_err_upload_maxheight_thumbnail'] = 'Maximal höjd godkännd för de uppladdade miniatyrerna måste vara ett nummer högre än 10 pixlar.';
+  $lang['conf_default_title'] = 'Visningsinställningar för oregistrerade besökare och nya konton';
+  $lang['conf_default_language_info'] = 'standardspråk';
+  $lang['conf_default_theme_info'] = 'standardtema';
+  $lang['conf_session_title'] = 'Sessionskonfiguration';
+  $lang['conf_session_size'] = 'identifikationsstorlek';
+  $lang['conf_session_size_info'] = '- desto längre din identifikation är, desto säkrare blir din webbsida<br />- skriv ett tal mellan 4 och 50';
+  $lang['conf_session_time'] = 'giltlighetstid';
+  $lang['conf_session_time_info'] = '- desto kortare giltlighetstiden är, desto säkrare är webbsidan.<br />- skriv ett tal mellan 5 och 60 minuter';
+  $lang['conf_session_key'] = 'nyckelord';
+  $lang['conf_session_key_info'] = '- sessionens nyckelord förbättrar kodningen av sessionsindentifieringen<br />- skriv en mening kortare än 255 tecken';
+  $lang['conf_session_delete'] = 'tabort ut-daterade sessioner';
+  $lang['conf_session_delete_info'] = 'det är rekommenderat att tömma databasen med listan över sessioner, för annars ligger utgångna sessioner kvar i databasen(men det är inget säkerhetsproblem)';
+  $lang['user_err_modify'] = 'Denna användare kan inte ändras eller tas bort';
+  $lang['user_err_unknown'] = 'Denna användare finns inte i databasen';
+  $lang['adduser_info_message'] = 'Information registrerad i databasen för användaren ';
+  $lang['adduser_info_password_updated'] = '(lösenordet uppdaterat)';
+  $lang['adduser_info_back'] = 'tillbaka till användarlistan';
+  $lang['adduser_fill_form'] = 'Var god fyll i följande sida';
+  $lang['adduser_unmodify'] = 'ej förändringsbar';
+  $lang['adduser_status'] = 'status';
+  $lang['adduser_status_admin'] = 'administratör';
+  $lang['adduser_status_guest'] = 'gäst';
+  $lang['permuser_info_message'] = 'Rättigheter registrerade';
+  $lang['permuser_title'] = 'Rättigheter för användare';
+  $lang['permuser_warning'] = 'Varning : en "<span style="font-weight:bold;">förbjuden åtkomst</span>" till roten av kategorin för att hindra åtkomst till hela kategorin';
+  $lang['permuser_authorized'] = 'berättigad';
+  $lang['permuser_forbidden'] = 'förbjuden';
+  $lang['permuser_parent_forbidden'] = 'föräldrakategori förbjuden';
+  $lang['listuser_confirm'] = 'Vill du verkligen ta bort denna användare';
+  $lang['listuser_info_deletion'] = 'togs bort från databasen';
+  $lang['listuser_user_group'] = 'Användargrupp';
+  $lang['listuser_modify'] = 'ändra';
+  $lang['listuser_modify_hint'] = 'ändra information på';
+  $lang['listuser_permission'] = 'rättigheter';
+  $lang['listuser_permission_hint'] = 'ändra rättigheter på';
+  $lang['listuser_delete'] = 'ta bort';
+  $lang['listuser_delete_hint'] = 'ta bort användare';
+  $lang['listuser_button_all'] = 'allt';
+  $lang['listuser_button_invert'] = 'inverterat';
+  $lang['listuser_button_create_address'] = 'skapa e-postadress';
+  $lang['cat_invisible'] = 'osynlig';
+  $lang['cat_edit'] = 'Redigera';
+  $lang['cat_up'] = 'Flytta upp';
+  $lang['cat_down'] = 'Flytta ner';
+  $lang['cat_image_info'] = 'Bildinfo';
+  $lang['cat_total'] = 'totalt';
+  $lang['editcat_confirm'] = 'Information registerad i databasen';
+  $lang['editcat_back'] = 'kategorier';
+  $lang['editcat_title1'] = 'Valmöjligheter för';
+  $lang['editcat_name'] = 'Namn';
+  $lang['editcat_comment'] = 'Kommentar';
+  $lang['editcat_status'] = 'Status';
+  $lang['infoimage_general'] = 'Generella val för denna kategorin';
+  $lang['infoimage_useforall'] = 'använda detta för alla bilder ?';
+  $lang['infoimage_creation_date'] = 'skapad den';
+  $lang['infoimage_detailed'] = 'Inställningar för varje bild';
+  $lang['infoimage_title'] = 'titel';
+  $lang['infoimage_comment'] = 'kommentar';
+  $lang['update_missing_tn'] = 'miniatyren saknas för';
+  $lang['update_disappeared_tn'] = 'miniatyren försvann';
+  $lang['update_disappeared'] = 'finns inte';
+  $lang['update_part_deletion'] = 'Borttagning av bild som saknar miniatyr eller som inte finns';
+  $lang['update_deletion_conclusion'] = 'bild borttagen från databasen';
+  $lang['update_part_research'] = 'Söka efter nya bilder i kategorierna';
+  $lang['update_research_added'] = 'tillagd';
+  $lang['update_research_tn_ext'] = 'miniatyr i';
+  $lang['update_research_conclusion'] = 'bild tillagd i databasen';
+  $lang['update_default_title'] = 'Välj något av följande';
+  $lang['update_only_cat'] = 'uppdatera kategorier, inte bilder';
+  $lang['update_all'] = 'uppdatera allt';
+  $lang['tn_width'] = 'bredd';
+  $lang['tn_height'] = 'höjd';
+  $lang['tn_no_support'] = 'Bilden kan ej nås eller så stöds den inte';
+  $lang['tn_format'] = 'för filens format';
+  $lang['tn_thisformat'] = 'för denna fils format';
+  $lang['tn_err_width'] = 'bredd måste vara ett tal högre än';
+  $lang['tn_err_height'] = 'höjd msåte vare ett tal högre än';
+  $lang['tn_results_title'] = 'Resultat av miniatyrtillverkning';
+  $lang['tn_picture'] = 'bild';
+  $lang['tn_results_gen_time'] = 'genererades på';
+  $lang['tn_stats'] = 'Generell statistik';
+  $lang['tn_stats_nb'] = 'antal miniatyrbilder';
+  $lang['tn_stats_total'] = 'total tid';
+  $lang['tn_stats_max'] = 'maximala tid';
+  $lang['tn_stats_min'] = 'minimala tid';
+  $lang['tn_stats_mean'] = 'genomsnittlig tid';
+  $lang['tn_err'] = 'Du gjorde misstag';
+  $lang['tn_params_title'] = 'Miniatyr-parametrar';
+  $lang['tn_params_GD'] = 'GD-version';
+  $lang['tn_params_GD_info'] = '- GD är bibliotek för bildmanipulering med PHP<br />- välj en version som är installerad på din server. Om du väljer fel, så får du bara felmeddelanden, kom tillbaka och välj en annan version. Om ingen version fungerar, så stödjer inte din server GD.';
+  $lang['tn_params_width_info'] = 'maximal bredd som miniatyren kan ha';
+  $lang['tn_params_height_info'] = 'maximal höjd som miniatyren kan ha';
+  $lang['tn_params_create'] = 'skapa';
+  $lang['tn_params_create_info'] = 'Gör inte miniatyrer av för många bilder samtidigt.<br />Miniatyr-skapandet använder mycket processorkraft. Om du installerat PhpWebGallery på ett gratis webbhotell, kan en alldeles för hög processorbelastning kan ibland leda till att webbhotellet tar bort ditt konto.';
+  $lang['tn_params_format'] = 'filformat';
+  $lang['tn_params_format_info'] = 'endast filformatet jpeg fungerar med minityr-skapandet';
+  $lang['tn_alone_title'] = 'bilder utan miniatyrer (endast jpeg och png)';
+  $lang['tn_dirs_title'] = 'Kataloglista';
+  $lang['tn_dirs_alone'] = 'bilder utan miniatyrer';
+  $lang['help_images_title'] = 'Lägga till bilder';
+  $lang['help_images_intro'] = 'Hur man placerar bilder i kataloger';
+  $lang['help_images'][0] = 'i katalogen "gallerier", skapar du kataloger som ska bli dina kategorier';
+  $lang['help_images'][1] = 'i varje katalog, kan du skapa hur många underkataloger som du önskar.';
+  $lang['help_images'][2] = 'du kan skapa hur många kategorier och underkategorier som du önskar';
+  $lang['help_images'][3] = 'bildfilerna måste vara av jpeg-format (ändelse jpg eller JPG), gif-format (ändelse gif eller GIF) eller png-format (ändelse png eller PNG).';
+  $lang['help_images'][4] = 'försök att inte använda blanksteg " " eller bindesträck "-" i bildfilerna, jag råder dig att använda underscore "_" tecknet som PhpWebGallery klarar av och det kommer ge bättre resultat';
+  $lang['help_thumbnails_title'] = 'Miniatyrer';
+  $lang['help_thumbnails'][0] = 'i varje katalog som innehåller bilder som ska visas på din webbsida, så finns det en underkatalog som heter "thumbnail", om det inte finns, skapa en och lägg dina miniatyrer i den.';
+  $lang['help_thumbnails'][1] = 'miniatyrer kan inte ha samma ändelse som deras associerade bild (en bild med .jpg ändelse kan ha en miniatyr i .GIF ändelse som exempel).';
+  $lang['help_thumbnails'][2] = 'miniatyren som är associerad med en bild måste ha prefixet som anges på konfigurationssidan (exempelvis image.jpg -> TN_image.GIF).';
+  $lang['help_thumbnails'][3] = 'Jag råder dig att använda den nerladdningsbara modulen för Windows som finns på PhpWebGallerys sidor för miniatyrhanteringen.';
+  $lang['help_thumbnails'][4] = 'du kan använda dig av miniatyr-skaparsidan som finns i PhpWebGallery, men mitt råd är att inte göra det, för att miniatyrernas kvalite kan bli dålig och tar mycket processorkraft och det kan bli ett problem om du använder ett gratis webbhotell.';
+  $lang['help_thumbnails'][5] = 'om du väljer att ditt webbhotell ska skapa miniatyrerna, så måste du ändra skrivrättigheterna på "galleries" katalogen till 775 och det gäller även för dina underkataloger.';
+  $lang['help_database_title'] = 'Uppdaterar databasen';
+  $lang['help_database'][0] = 'när bilderna och miniatyrerna är placerade i katalogerna, klicka på "uppdatera databas" i menyn för administrationspanelen.';
+  $lang['help_infos_title'] = 'Övrig information';
+  $lang['help_infos'][1] = 'Så fort du har skapat ditt galleri, gå in i användarlistan och ändra rättigheterna för "gäst". Varje ny registrerad användare kommer få samma rättigheter som "gästanvändaren".';
+  $lang['help_remote_title'] = 'Fjärrsida';
+  $lang['help_remote'][0] = 'PhpWebGallery erbjuder möjligheten att använda flera olika servrar att spara bilderna på som kommer utgöra ditt galleri. Det kan vara användbart om ditt galleri är installerad på en server med begränsad yta och du har många bilder som ska visas. Följ denna anvisning tack : ';
+  $lang['help_remote'][1] = '1. ändra filen "create_listing_file.php" (du kommer hitta den i katalogen "admin"), genom att ändra raden "$prefix_thumbnail = "TN-";" om prefixet för dina miniatyrer inte är "TN-".';
+  $lang['help_remote'][2] = '2. lägg filen "create_listing_file.php" ändrad på din andra webbsida, lägg den i rot-katalogen för dina kataloger med bilder i (som katalogen "galleries" på denna webbsidan) via ftp.';
+  $lang['help_remote'][3] = '3. starta scriptet genom att gå till http://andraServern/andraGalleriet/create_listing_file.php, en listing.xml fil har precis skapats.';
+  $lang['help_remote'][4] = '4. hämta tillbaka filen listing.xml från din andra webbsida och placera den i katalogen "admin" på denna webbsidan.';
+  $lang['help_remote'][5] = '5. starta nu en updatering av alla data i administrationspanelen, så fort du använt listing.xml, stäng ner det från katalogen "admin".';
+  $lang['help_remote'][6] = 'Du kan uppdatera innehållet på den andra webbsidan genom att göra om denna åtgärden. Du kan också stänga ner den andra webbsidan genom att välja det i administrationspanelen..';
+  $lang['help_upload_title'] = 'Tillagda bilder av användare';
+  $lang['help_upload'][0] = 'PhpWebGallery erbjuder möjligheten för användare att skicka upp bilder. För att det ska vara möjligt :';
+  $lang['help_upload'][1] = '1. Se till att det är tillåtet i konfigurationsdelen i administrationspanelen';
+  $lang['help_upload'][2] = '2. Se till att rättigheterna för att skriva i katalogerna är rätt';
+  $lang['install_message'] = 'Meddelande';
+  $lang['step1_confirmation'] = 'Parametrarna är korrekta';
+  $lang['step1_err_db'] = 'Anslutning till servern lyckades, men kunde inte komma åt databasen';
+  $lang['step1_err_server'] = 'Kan inte nå servern';
+  $lang['step1_err_copy_2'] = 'Nästa steg i installationen är nu möjlig';
+  $lang['step1_err_copy_next'] = 'nästa steg';
+  $lang['step1_title'] = 'Steg 1/2';
+  $lang['step1_host'] = 'MySQL-värd';
+  $lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
+  $lang['step1_user'] = 'Användarnamn';
+  $lang['step1_user_info'] = 'användarnamn som du fått av din servervärd';
+  $lang['step1_pass'] = 'Lösenord';
+  $lang['step1_pass_info'] = 'användarnamnets lösenord som du fått av din servervärd';
+  $lang['step1_database'] = 'Databasens namn';
+  $lang['step1_database_info'] = 'också tillhandagetts av din servervärd';
+  $lang['step1_prefix'] = 'Databasens prefix';
+  $lang['step1_prefix_info'] = 'databasens namn som kommer bli märkt med detta prefix (gör att du enklare kan hantera din databas)';
+  $lang['step2_err_login1'] = 'skriv användarnamn för din webmaster';
+  $lang['step2_err_login3'] = 'webmaster användarnamn kan inte innehålla tecknen \' eller "';
+  $lang['step2_err_pass'] = 'var god ange ditt lösenord igen';
+  $lang['step2_err_mail'] = $lang['conf_err_mail'];
+  $lang['install_end_title'] = 'Installationen klar';
+  $lang['install_end_message'] = 'Konfigurationen av PhpWebGallery är klar, här kommer nästa steg<br /><br />
+För säkerhets skull, tavbort filen "install.php" som ligger i "admin"-katalogen<br />
+Så fort filen är bortagen, följ dessa instruktioner :
+<ul>
+  <li>gå till identifieringssidan : [ <a href="../identification.php">identifiering</a> ] och använd användarnamnet och lösenordet som du angav för din webmaster</li>
+  <li>detta användarnamn kommer ge dig tillträde till [ <a href="admin.php">administrationspanelen</a> ] och till instruktionerna för att kunna placera bilderna i dina kataloger</li>
+</ul>s';
+  $lang['step2_title'] = 'Steg 2/2';
+  $lang['step2_pwd'] = 'webmaster lösenord';
+  $lang['step2_pwd_info'] = 'Håll detta hemligt, det ger tillträde till administrationspanelen';
+  $lang['step2_pwd_conf'] = 'verifiera lösenord';
+  $lang['step2_pwd_conf_info'] = 'verifiering';
+  // new or modified in release 1.3
+  $lang['remote_site'] = 'Fjärrsida';
+  $lang['title_add'] = 'Lägg till användare';
+  $lang['title_modify'] = 'Ändra användare';
+  $lang['title_groups'] = 'Grupphantering';
+  $lang['title_user_perm'] = 'Ändra rättigheter för användare';
+  $lang['title_cat_perm'] = 'Ändra rättigheter för kategori';
+  $lang['title_group_perm'] = 'Ändra rättigheter för grupp';
+  $lang['title_picmod'] = 'Ändra information om en bild';
+  $lang['menu_groups'] = 'Grupper';
+  $lang['menu_comments'] = 'Kommentarer';
+  $lang['conf_general_log'] = 'historik';
+  $lang['conf_general_log_info'] = 'För en historik över besök på webbsidan ? Besökare kommer visas i historiksektionen i administrationspanelen';
+  $lang['conf_general_mail_notification'] = 'E-postnotifikation';
+  $lang['conf_general_mail_notification_info'] = 'Automatiserad e-postnotifikation för administratörer (och endast dem) när användare lägger till en kommentar eller skickar upp en bild.';
+  $lang['conf_comments_validation'] = 'validering';
+  $lang['conf_comments_validation_info'] = 'En administratör validerar användarnas postade kommentarer innan de visas offentligt på webbsidan';
+  $lang['conf_comments_forall'] = 'för alla ?';
+  $lang['conf_comments_forall_info'] = 'Även gäster som inte är registrerade kan posta kommentarer';
+  $lang['conf_default_nb_image_per_row_info'] = 'antal bilder för varje rad som ska vara standard';
+  $lang['conf_default_nb_row_per_page_info'] = 'antal rader per sida som ska vara standard';
+  $lang['conf_default_short_period_info'] = 'I dagar. Period inom vilken bilder ska markeras med ett rött märke. Den korta perioden måste vara längre än 1 dag.';
+  $lang['conf_default_long_period_info'] = 'I dagar. Period inom vilken bilder ska markeras med ett grönt märke. Den långa perioden måste vara längre än den korta perioden.';
+  $lang['conf_default_expand_info'] = 'veckla ut alla kategorier i menyn som standard ?';
+  $lang['conf_default_show_nb_comments_info'] = 'visa antalet kommentarer för varje bild på miniatyrsidan';
+  $lang['conf_default_maxwidth_info'] = 'Maximal bredd för visning av bilder : bilden kommer bara visas i en ny storlek, bilden kommer inte att ändras på. Låt vara tom om du inte önskar ha en gräns.';
+  $lang['conf_default_maxheight_info'] = 'Precis som den maximala bredden, men för höjden';
+  $lang['conf_session_cookie'] = 'tillåt kakor';
+  $lang['conf_session_cookie_info'] = 'användare behöver inte logga in för varje besök. Mindre säkerhet.';
+  $lang['adduser_associate'] = 'Lägg till i grupp';
+  $lang['group_add'] = 'Lägg till grupp';
+  $lang['group_add_error1'] = 'Namnet i gruppen får inte innehålla  " eller \'';
+  $lang['group_add_error2'] = 'Detta namn finns redan på en annan grupp';
+  $lang['group_confirm'] = 'Är du säker på att du vill ta bort denna grupp ?';
+  $lang['group_list_title'] = 'Lista på befintliga grupper';
+  $lang['group_err_unknown'] = 'Denna grupp finns inte i databasen';
+  $lang['cat_permission'] = 'rättigheter';
+  $lang['cat_update'] = 'uppdatera';
+  $lang['cat_add'] = 'Lägg till virtuell kategori';
+  $lang['cat_parent'] = 'föregående kategori';
+  $lang['cat_error_name'] = 'Namnet på denna kategori får inte vara tom';
+  $lang['cat_virtual'] = 'virtuell';
+  $lang['cat_first'] = 'Flytta längst upp';
+  $lang['cat_last'] = 'Flytta längst ner';
+  $lang['editcat_visible_info'] = '(osynlig för alla utom administratörer)';
+  $lang['editcat_visible'] = 'Synlig';
+  $lang['editcat_uploadable'] = 'Uppladdning tillgänglig';
+  $lang['infoimage_keyword_separation'] = '(separera med komma ",")';
+  $lang['infoimage_addtoall'] = 'lägg till i alla';
+  $lang['infoimage_removefromall'] = 'ta bort ifrån alla';
+  $lang['infoimage_associate'] = 'Associera med kategori';
+  $lang['update_wrong_dirname'] = 'Namnet på kataloger och filer måste skrivas med bokstäver, siffror, "-", "_" eller "."';
+  $lang['stats_pages_seen'] = 'sidor visade';
+  $lang['stats_visitors'] = 'besökare';
+  $lang['stats_empty'] = 'töm historik';
+  $lang['stats_pages_seen_graph_title'] = 'Antal sidor visade per dag';
+  $lang['stats_visitors_graph_title'] = 'Antal besökare per dag';
+  $lang['comments_last_title'] = 'Senaste kommentarer';
+  $lang['comments_non_validated_title'] = 'Kommentarer i väntan på validering';
+  $lang['help_database'][1] = 'För att komma från problemet med att uppdatera för många bilder i en enda uppdatering, råder jag till att börja med att bara uppdatera kategorier, sedan i kategorisektionen av administrationspanelen, uppdatera varje kategori tack vare länken "uppdatera"';
+  $lang['help_upload'][3] = 'Kategorin måste ha uppladdning tillgängligt för att kunna laddas upp till.';
+  $lang['help_upload'][4] = 'Uppladdning av bilder från användarna visas inte direkt på webbsidan, de måste bli godkända först av en administratör. För att kunna göra detta, måste en administratör gå till sidan "Väntar på godkännande" i administrationspanelen, för att godkänna eller förkasta uppskickade bilder, för att sedan starta en uppdatering av databasen.';
+  $lang['help_virtual_title'] = 'Länkar mellan bilder, kategorier och virtuella kategorier';
+  $lang['help_virtual'][0] = 'PhpWebGallery har möjligheten att ta bort associationer där bilder sparas i kategorier och kategorier där bilder visas.';
+  $lang['help_virtual'][1] = 'Enligt standard, så visas bilder i deras riktiga kategorier : de som stämmer överrens med katalogerna på webbservern.';
+  $lang['help_virtual'][2] = 'För att länka en bild till en kategori, så måste du göra en associering på sidan för bildens information eller i informationen för alla bilderna i kategorin.';
+  $lang['help_virtual'][3] = 'Genom att använda denna princip, så blir de möjligt att skapa virtuella kategorier i PhpWebGallery : ingen riktig katalog finns till denna kategori. Du måste skapa denna kategori på sektionen "Kategorier" under administratörspanelen.';
+  $lang['help_groups_title'] = 'Användargrupper';
+  $lang['help_groups'][0] = 'PhpWebGallery kan hantera grupper av användare. Det kan vara väldigt användbart att ha allmänna rättigheter för privata kategorier.';
+  $lang['help_groups'][1] = '1. Skapa en grupp som heter "familj" under sektionen "Grupper" i administratörspanelen.';
+  $lang['help_groups'][2] = '2. I sektionen "Användare", ändra en av dem och lägg till den i gruppen "familj".';
+  $lang['help_groups'][3] = '3. Genom att ändra rättigheterna för kategorin eller för en grupp, så kommer du se att alla kategorier som är tillåtna för en grupp är också tillåtna för dess medlemmar.';
+  $lang['help_groups'][4] = 'En användare kan tillhöra många grupper. Berättigandet är starkare än förbudet : om en användare "jack" tillhör grupperna "familj" och "vänner", och endast gruppen "familj" kan se kategorin "Julen 2004", så kommer "jack" att kunna se "Julen 2004".';
+  $lang['help_access_title'] = 'Berättigande av åtkomst';
+  $lang['help_access'][0] = 'PhpWebGallery kan förbjuda åtkomsten till en kategori. Kategorier kan vara "publika" eller "privata". För att hindra åtkomsten till kategorier :';
+  $lang['help_access'][1] = '1. Ändra kategoriinformationen (från "kategori" sektionen i administratörspanelen) och gör den "privat".';
+  $lang['help_access'][2] = '2. På sidan för rättigheter (för en grupp eller användare) kommer den privata kategorin visas och du kan ge åtkomst eller neka åtkomst.';
+  $lang['help_infos'][2] = 'Om du har några frågor, tveka inte att se efter på forumet eller ställa frågor där. <a href="'.$conf['forum_url'].'" style="text-decoration:underline">Forumet</a> (anslagstavlan) är tillgänglig på PhpWebGallery\'s webbsida.';
+  $lang['step1_err_copy'] = 'Kopiera texten mellan bindesträcken och klistra in det i filen "include/mysql.inc.php"(Varning : mysql.inc.php får endast innehålla det som är i blått, inget radbyte eller blanksteg)';
+  $lang['permuser_only_private'] = 'Endast privata kategorier kommer visas';
+  $lang['waiting_update'] = 'Validerade bilder kommer visas endast efter en uppdatering av databasen';
+  $lang['conf_upload_available_info'] = 'Godkännandet av uppladdade bilder från användare i kategorier på webbsidan (ej en fjärrserver). Detta är en generell parameter, det är nödvändigt att godkänna kategori för kategori, standard, så är ingen kategori "uppladdningsbar".';
+  $lang['install_help'] = 'Behöver du hjälp ? Ställ frågor på <a href="http://forum.phpwebgallery.net">PhpWebGallery\'s anslagstavla</a>.';
+  $lang['install_warning'] = 'Filen "admin/install.php" finns fortfarande kvar. Var vänlig och ta bort den från din server. Det är inte säkert att behålla den.';
+  // new or modified in release 1.3.1
+  $lang['cat_unknown_id'] = 'Denna kategori är okänd i databasen';
+}
+?>
Index: /branches/1.3/picture.php
===================================================================
--- /branches/1.3/picture.php	(revision 3252)
+++ /branches/1.3/picture.php	(revision 3252)
@@ -0,0 +1,763 @@
+<?php
+/***************************************************************************
+ *                                picture.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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 page shows the image full size
+//----------------------------------------------------------- personnal include
+include_once( './include/init.inc.php' );       
+//-------------------------------------------------- access authorization check
+check_cat_id( $_GET['cat'] );
+check_login_authorization();
+if ( isset( $page['cat'] ) and is_numeric( $page['cat'] ) )
+{
+  check_restrictions( $page['cat'] );
+}
+//---------------------------------------- incrementation of the number of hits
+$query = 'UPDATE '.PREFIX_TABLE.'images';
+$query.= ' SET hit=hit+1';
+$query.= ' WHERE id='.$_GET['image_id'];
+$query.= ';';
+@mysql_query( $query );
+//-------------------------------------------------------------- initialization
+initialize_category( 'picture' );
+//------------------------------------- main picture information initialization
+$infos = array( 'id','date_available','comment','hit','keywords','author'
+                ,'name','file','date_creation','filesize','width','height'
+                ,'storage_category_id' );
+
+$query = 'SELECT '.implode( ',', $infos );
+if ( is_numeric( $page['cat'] ) ) $query.= ',category_id';
+$query.= ' FROM '.PREFIX_TABLE.'images';
+$query.= ' INNER JOIN '.PREFIX_TABLE.'image_category AS ic';
+$query.= ' ON id = ic.image_id';
+$query.= $page['where'];
+$query.= ' AND id = '.$_GET['image_id'];
+$query.= $conf['order_by'];
+$query.= ';';
+$result = mysql_query( $query );
+// if this image_id doesn't correspond to this category, an error message is
+// displayed, and execution is stopped
+if ( mysql_num_rows( $result ) == 0 )
+{
+  echo '<div style="text-align:center;">'.$lang['access_forbiden'].'<br />';
+  echo '<a href="'.add_session_id( './category.php' ).'">';
+  echo $lang['thumbnails'].'</a></div>';
+  exit();
+}
+$row = mysql_fetch_array( $result );
+
+foreach ( $infos as $info ) {
+  if ( isset( $row[$info] ) ) $page[$info] = $row[$info];
+  else                        $page[$info] = '';
+}
+if ( is_numeric( $page['cat'] ) ) $page['category_id'] = $row['category_id'];
+// retrieving the number of the picture in its category (in order)
+$query = 'SELECT DISTINCT(id)';
+$query.= ' FROM '.PREFIX_TABLE.'images';
+$query.= ' INNER JOIN '.PREFIX_TABLE.'image_category AS ic';
+$query.= ' ON id = ic.image_id';
+$query.= $page['where'];
+$query.= $conf['order_by'];
+$query.= ';';
+$result = mysql_query( $query );
+$page['num'] = 0;
+$row = mysql_fetch_array( $result );
+while ( $row['id'] != $page['id'] )
+{
+  $page['num']++;
+  $row = mysql_fetch_array( $result );
+}
+//--------------------------------------------------------- favorite management
+if ( isset( $_GET['add_fav'] ) )
+{
+  if ( $_GET['add_fav'] == 1 )
+  {
+    // verify if the picture is already in the favorite of the user
+    $query = 'SELECT COUNT(*) AS nb_fav';
+    $query.= ' FROM '.PREFIX_TABLE.'favorites';
+    $query.= ' WHERE image_id = '.$page['id'];
+    $query.= ' AND user_id = '.$user['id'];
+    $query.= ';';
+    $result = mysql_query( $query );
+    $row = mysql_fetch_array( $result );
+    if ( $row['nb_fav'] == 0 )
+    {
+      $query = 'INSERT INTO '.PREFIX_TABLE.'favorites';
+      $query.= ' (image_id,user_id) VALUES';
+      $query.= ' ('.$page['id'].','.$user['id'].')';
+      $query.= ';';
+      $result = mysql_query( $query );
+    }
+  }
+  if ( $_GET['add_fav'] == 0 )
+  {
+    $query = 'DELETE FROM '.PREFIX_TABLE.'favorites';
+    $query.= ' WHERE user_id = '.$user['id'];
+    $query.= ' AND image_id = '.$page['id'];
+    $query.= ';';
+    $result = mysql_query( $query );
+    
+    $page['cat_nb_images'] = $page['cat_nb_images'] - 1;
+    if ( $page['cat_nb_images'] <= 0 )
+    {
+      // there is no favorite picture anymore
+      // we redirect the user to the category page
+      $url = add_session_id( 'category.php' );
+      header( 'Request-URI: '.$url );
+      header( 'Content-Location: '.$url );  
+      header( 'Location: '.$url );
+      exit();
+    }
+    // redirection of the user to the picture.php page
+    // with the right picture
+    $page['num'] = $page['num'] - 1;
+    if ( $page['num'] == -1 )
+    {
+      $page['num'] = 0;
+    }
+    $query = 'SELECT id';
+    $query.= ' FROM '.PREFIX_TABLE.'images';
+    $query.= ' INNER JOIN '.PREFIX_TABLE.'image_category AS ic';
+    $query.= ' ON id = ic.image_id';
+    $query.= $page['where'];
+    $query.= $conf['order_by'];
+    $query.= ' LIMIT '.$page['num'].',1';
+    $query.= ';';
+    $result = mysql_query( $query );
+    $row = mysql_fetch_array( $result );
+    $redirect = './picture.php?image_id='.$row['id'].'&cat='.$page['cat'];
+    $redirect.= '&expand='.$_GET['expand'];
+    if ( $page['cat'] == 'search' )
+    {
+      $redirect.= '&search='.$_GET['search'].'&amp;mode='.$_GET['mode'];
+    }
+    $url = add_session_id( $redirect, true );
+    header( 'Request-URI: '.$url );
+    header( 'Content-Location: '.$url );  
+    header( 'Location: '.$url );
+    exit();
+  }
+}
+
+//---------------------------------------------- next picture thumbnail display
+$next = 0;
+if ( $page['num'] < $page['cat_nb_images']-1 )
+{
+  $next = $page['num'] + 1;
+  $query = 'SELECT DISTINCT(id),name,file,tn_ext,storage_category_id';
+  $query.= ' FROM '.PREFIX_TABLE.'images';
+  $query.= ' INNER JOIN '.PREFIX_TABLE.'image_category AS ic';
+  $query.= ' ON id=ic.image_id';
+  $query.= $page['where'];
+  $query.= $conf['order_by'];
+  $query.= ' LIMIT '.$next.',1';
+  $query.= ';';
+  $result = mysql_query( $query );
+  $row = mysql_fetch_array( $result );
+
+  if ( !isset($array_cat_directories[$row['storage_category_id']]))
+  {
+    $array_cat_directories[$row['storage_category_id']] =
+      get_complete_dir( $row['storage_category_id'] );
+  }
+  $cat_directory = $array_cat_directories[$row['storage_category_id']];
+
+  $file = substr ( $row['file'], 0, strrpos ( $row['file'], ".") );
+  $next_lien_thumbnail = $cat_directory.'thumbnail/';
+  $next_lien_thumbnail.= $conf['prefix_thumbnail'].$file.".".$row['tn_ext'];
+  
+  if ( isset( $row['name'] ) and $row['name'] != '' )
+  {
+    $next_alt_thumbnail = $row['name'];
+  }
+  else
+  {
+    $next_alt_thumbnail = $file;
+  }
+  $next_title = $lang['next_image']." : ".$next_alt_thumbnail;
+
+  $next_url_link = './picture.php?image_id='.$row['id'];
+  $next_url_link.= '&amp;cat='.$page['cat'];
+  if ( isset( $_GET['expand'] ) )
+    $next_url_link.= '&amp;expand='.$_GET['expand'];
+  if ( $page['cat'] == 'search' )
+  {
+    $next_url_link.= "&amp;search=".$_GET['search'].'&amp;mode='.$_GET['mode'];
+  }
+}
+//----------------------------------------------------- template initialization
+//
+// Start output of page
+//
+//------------------------------------------------------------------ page title
+$title = $page['name']; 
+if ( $title == '')
+{
+  $title = str_replace("_"," ",get_filename_wo_extension($page['file']));
+}
+$refresh = 0;
+if ( isset( $_GET['slideshow'] ) && isset($next_url_link)) 
+{
+	$refresh= $_GET['slideshow'];
+	$url_link = $next_url_link;
+}
+include('include/page_header.php');
+
+$handle = $vtp->Open( './template/'.$user['template'].'/picture.vtp' );
+initialize_template();
+$vtp->setGlobalVar( $handle, 'user_template', $user['template'] );
+
+$tpl = array( 'back','submit','comments_title','comments_del','delete',
+              'comments_add','author','slideshow','slideshow_stop',
+              'period_seconds' );
+templatize_array( $tpl, 'lang', $handle );
+//-------------------------------------------------------- slideshow management
+if ( isset( $_GET['slideshow'] ) )
+{
+  if ( !is_numeric( $_GET['slideshow'] ) )
+    $_GET['slideshow'] = $conf['slideshow_period'][0];
+  $vtp->addSession( $handle, 'stop_slideshow' );
+  $url = './picture.php';
+  $url.= '?image_id='.$page['id'];
+  $url.= '&amp;cat='.$page['cat'];
+  $url.= '&amp;expand='.$_GET['expand'];
+  if ( $page['cat'] == 'search' )
+  {
+    $url.= '&amp;search='.$_GET['search'];
+    $url.= '&amp;mode='.$_GET['mode'];
+  }
+  $vtp->setVar( $handle, 'stop_slideshow.url', add_session_id( $url ) );
+  $vtp->closeSession( $handle, 'stop_slideshow' );
+}
+else
+{
+  $vtp->addSession( $handle, 'start_slideshow' );
+  foreach ( $conf['slideshow_period'] as $option ) {
+    $vtp->addSession( $handle, 'second' );
+    $vtp->setVar( $handle, 'second.option', $option );
+    $url = './picture.php';
+    $url.= '?image_id='.$page['id'];
+    $url.= '&amp;cat='.$page['cat'];
+	if (isset($_GET['expand']))
+	    $url.= '&amp;expand='.$_GET['expand'];
+    if ( $page['cat'] == 'search' )
+    {
+      $url.= '&amp;search='.$_GET['search'];
+      $url.= '&amp;mode='.$_GET['mode'];
+    }
+    $url.= '&amp;slideshow='.$option;
+    $vtp->setVar( $handle, 'second.url', add_session_id( $url ) );
+    $vtp->closeSession( $handle, 'second' );
+  }
+  $vtp->closeSession( $handle, 'start_slideshow' );
+}
+
+//-------------------------------------------------- previous picture thumbnail
+if ( $page['num'] >= 1 )
+{
+  $prev = $page['num'] - 1;
+  $query = 'SELECT DISTINCT(id),name,file,tn_ext,storage_category_id';
+  $query.= ' FROM '.PREFIX_TABLE.'images';
+  $query.= ' INNER JOIN '.PREFIX_TABLE.'image_category AS ic';
+  $query.= ' ON id=ic.image_id';
+  $query.= $page['where'];
+  $query.= $conf['order_by'];
+  $query.= ' LIMIT '.$prev.',1';
+  $query.= ';';
+  $result = mysql_query( $query );
+  $row = mysql_fetch_array( $result );
+
+  if ( !isset($array_cat_directories[$row['storage_category_id']]) )
+  {
+    $array_cat_directories[$row['storage_category_id']] =
+      get_complete_dir( $row['storage_category_id'] );
+  }
+  $cat_directory = $array_cat_directories[$row['storage_category_id']];
+
+  $file = substr( $row['file'], 0, strrpos ( $row['file'], '.' ) );
+  $lien_thumbnail = $cat_directory.'thumbnail/';
+  $lien_thumbnail.= $conf['prefix_thumbnail'].$file.".".$row['tn_ext'];
+
+  $prev_title = $lang['previous_image'].' : ';
+
+  if ( isset( $row['name'] ) and $row['name'] != '' )
+    $alt_thumbnail = $row['name'];
+  else
+    $alt_thumbnail = $file;
+
+  $prev_title.= $alt_thumbnail;
+  
+  $url_link = './picture.php?image_id='.$row['id'].'&amp;cat='.$page['cat'];
+  if ( isset( $_GET['expand'] ) ) $url_link.= '&amp;expand='.$_GET['expand'];
+  if ( $page['cat'] == 'search' )
+  {
+    $url_link.= '&amp;search='.$_GET['search'].'&amp;mode='.$_GET['mode'];
+  }
+  // sending vars for display
+  $vtp->addSession( $handle, 'previous' );
+  $vtp->setGlobalVar( $handle, 'previous.url', add_session_id( $url_link ) );
+  $vtp->setGlobalVar( $handle, 'previous.title', $prev_title );
+  $vtp->setGlobalVar( $handle, 'previous.src', $lien_thumbnail );
+  $vtp->setGlobalVar( $handle, 'previous.alt', $alt_thumbnail );
+  $vtp->closeSession( $handle, 'previous' );
+}
+else
+{
+  $vtp->addSession( $handle, 'previous_empty' );
+  $vtp->closeSession( $handle, 'previous_empty' );
+}
+//-------------------------------------------------------- main picture display
+if ( is_numeric( $page['cat'] ) )
+{
+  $intitule_cat = get_cat_display_name( $page['cat_name'], " - ",
+                                        "font-style:italic;" );
+}
+else
+{
+  $intitule_cat = $page['title'];
+}
+
+if ( !isset($array_cat_directories[$page['storage_category_id']]) )
+{
+  $array_cat_directories[$page['storage_category_id']] =
+    get_complete_dir( $page['storage_category_id'] );
+}
+$cat_directory = $array_cat_directories[$page['storage_category_id']];
+
+$n = $page['num'] + 1;
+$intitule_titre = replace_space( $intitule_cat." - " ).$n.'/';
+$intitule_titre.= $page['cat_nb_images']."<br />";
+if ( $page['name'] != "" )
+{
+  $intitule_file = $page['name'];
+}
+else
+{
+  $intitule_file = str_replace( "_", " ",
+                                substr( $page['file'], 0,
+                                        strrpos ( $page['file'], ".") ) );
+}
+if ( $page['cat'] == 'search' )
+{
+  $intitule_file = replace_search( $intitule_file, $_GET['search'] );
+}
+$vtp->setGlobalVar( $handle, 'title', $intitule_titre.$intitule_file );
+
+$lien_image = $cat_directory.$page['file'];
+
+// calculation of width and height
+if ( $page['width'] == "" )
+{
+  $taille_image = @getimagesize( $lien_image );
+  $original_width = $taille_image[0];
+  $original_height = $taille_image[1];
+}
+else
+{
+  $original_width = $page['width'];
+  $original_height = $page['height'];
+}
+
+$picture_size = get_picture_size( $original_width, $original_height,
+				  $user['maxwidth'], $user['maxheight'] );
+$final_width  = $picture_size[0];
+$final_height = $picture_size[1];
+        
+$url_link = './category.php?cat='.$page['cat'].'&amp;';
+$url_link.= 'num='.$page['num']; 
+if (isset($_GET['expand']))
+	$url_link.='&amp;expand='.$_GET['expand'];
+if ( $page['cat'] == 'search' )
+{
+  $url_link.= "&amp;search=".$_GET['search'].'&amp;mode='.$_GET['mode'];
+}
+$vtp->setGlobalVar( $handle, 'picture_link', add_session_id( $url_link ) );
+$vtp->setGlobalVar( $handle, 'picture_width', $final_width );
+$vtp->setGlobalVar( $handle, 'picture_height', $final_height );
+$vtp->setGlobalVar( $handle, 'picture_src', $lien_image );
+$vtp->setGlobalVar( $handle, 'picture_alt', $page['file'] );
+
+if ( $page['comment'] != '' )
+{
+  if ( $page['cat'] == 'search' )
+  {
+    $picture_comment = replace_search( $page['comment'], $_GET['search'] );
+    $vtp->setGlobalVar( $handle, 'picture_comment', $picture_comment );
+  }
+  else
+  {
+    $vtp->setGlobalVar( $handle, 'picture_comment', $page['comment'] );
+  }
+}
+//--------------------------------------------------------- picture information
+// author
+if ( $page['author'] != "" )
+{
+  $vtp->addSession( $handle, 'info_line' );
+  $vtp->setVar( $handle, 'info_line.name', $lang['author'].' : ' );
+  $vtp->setVar( $handle, 'info_line.content', $page['author'] );
+  $vtp->closeSession( $handle, 'info_line' );
+}
+// creation date
+if ( $page['date_creation'] != "" )
+{
+  $vtp->addSession( $handle, 'info_line' );
+  $vtp->setVar( $handle, 'info_line.name', $lang['creation_date'].' : ' );
+  $vtp->setVar( $handle, 'info_line.content',
+                format_date( $page['date_creation'] ) );
+  $vtp->closeSession( $handle, 'info_line' );
+}
+// date of availability
+$vtp->addSession( $handle, 'info_line' );
+$vtp->setVar( $handle, 'info_line.name', $lang['registration_date'].' : ' );
+list( $year,$month,$day ) = explode( '-', $page['date_available'] );
+$vtp->setVar( $handle, 'info_line.content',
+              format_date( $page['date_available'] ) );
+$vtp->closeSession( $handle, 'info_line' );
+// size in pixels
+$vtp->addSession( $handle, 'info_line' );
+$vtp->setVar( $handle, 'info_line.name', $lang['size'].' : ' );
+if ( $original_width != $final_width or $original_height != $final_height )
+{
+  $content = '[ <a href="'.$lien_image.'" title="'.$lang['true_size'].'">';
+  $content.= $original_width.'*'.$original_height.'</a> ]';
+  $vtp->setVar( $handle, 'info_line.content', $content );
+}
+else
+{
+  $content = $original_width.'*'.$original_height;
+  $vtp->setVar( $handle, 'info_line.content', $content );
+}
+$vtp->closeSession( $handle, 'info_line' );
+// file
+$vtp->addSession( $handle, 'info_line' );
+$vtp->setVar( $handle, 'info_line.name', $lang['file'].' : ' );
+if ( $page['cat'] == 'search' )
+{
+  $content = replace_search( $page['file'], $_GET['search'] );
+  $vtp->setVar( $handle, 'info_line.content', $content );
+}
+else
+{
+  $vtp->setVar( $handle, 'info_line.content', $page['file'] );
+}
+$vtp->closeSession( $handle, 'info_line' );
+// filesize
+if ( $page['filesize'] == "" )
+{
+  $poids = floor ( filesize( $lien_image ) / 1024 );
+}
+else
+{
+  $poids = $page['filesize'];
+}
+$vtp->addSession( $handle, 'info_line' );
+$vtp->setVar( $handle, 'info_line.name', $lang['filesize'].' : ' );
+$vtp->setVar( $handle, 'info_line.content', $poids.' KB' );
+$vtp->closeSession( $handle, 'info_line' );
+// keywords
+if ( $page['keywords'] != '' )
+{
+  $vtp->addSession( $handle, 'info_line' );
+  $vtp->setVar( $handle, 'info_line.name', $lang['keywords'].' : ' );
+  $keywords = explode( ',', $page['keywords'] );
+  $content = '';
+  $url = './category.php?cat=search';
+  if ( isset( $_GET['expand'] ) ) $url.= '&amp;expand='.$_GET['expand'];
+  $url.= '&amp;mode=OR&amp;search=';
+  foreach ( $keywords as $i => $keyword ) {
+    $local_url = add_session_id( $url.$keyword );
+    if ( $i > 0 ) $content.= ',';
+    $content.= '<a href="'.$local_url.'">'.$keyword.'</a>';
+  }
+  $vtp->setVar( $handle, 'info_line.content', $content );
+  $vtp->closeSession( $handle, 'info_line' );
+}
+// number of visits
+$vtp->addSession( $handle, 'info_line' );
+$vtp->setVar( $handle, 'info_line.name', $lang['visited'].' : ' );
+$vtp->setVar( $handle, 'info_line.content', $page['hit'].' '.$lang['times'] );
+$vtp->closeSession( $handle, 'info_line' );
+//------------------------------------------------------- favorite manipulation
+if ( !$user['is_the_guest'] )
+{
+  // verify if the picture is already in the favorite of the user
+  $query = 'SELECT COUNT(*) AS nb_fav';
+  $query.= ' FROM '.PREFIX_TABLE.'favorites';
+  $query.= ' WHERE image_id = '.$page['id'];
+  $query.= ' AND user_id = '.$user['id'].';';
+  $result = mysql_query( $query );
+  $row = mysql_fetch_array( $result );
+  if (!$row['nb_fav'])
+  {
+    $url = './picture.php?cat='.$page['cat'].'&amp;image_id='.$page['id'];
+    if (isset($_GET['expand']))
+      $url.= '&amp;expand='.$_GET['expand'];
+    $url.='&amp;add_fav=1';
+    if ( $page['cat'] == 'search' )
+    {
+      $url.= '&amp;search='.$_GET['search'].'&amp;mode='.$_GET['mode'];
+    }
+    $vtp->addSession( $handle, 'favorite' );
+    $vtp->setVar( $handle, 'favorite.link', add_session_id( $url ) );
+    $vtp->setVar( $handle, 'favorite.title', $lang['add_favorites_hint'] );
+    $vtp->setVar( $handle, 'favorite.src',
+                  './template/'.$user['template'].'/theme/favorite.gif' );
+    $vtp->setVar($handle,'favorite.alt','[ '.$lang['add_favorites_alt'].' ]');
+    $vtp->closeSession( $handle, 'favorite' );
+  }
+  else
+  {
+    $url = './picture.php?cat='.$page['cat'].'&amp;image_id='.$page['id'];
+    $url.= '&amp;expand='.$_GET['expand'].'&amp;add_fav=0';
+    $vtp->addSession( $handle, 'favorite' );
+    $vtp->setVar( $handle, 'favorite.link', add_session_id( $url ) );
+    $vtp->setVar( $handle, 'favorite.title', $lang['del_favorites_hint'] );
+    $vtp->setVar( $handle, 'favorite.src',
+                  './template/'.$user['template'].'/theme/del_favorite.gif' );
+    $vtp->setVar($handle,'favorite.alt','[ '.$lang['del_favorites_alt'].' ]');
+    $vtp->closeSession( $handle, 'favorite' );
+  }
+}
+//------------------------------------ admin link for information modifications
+if ( $user['status'] == 'admin' )
+{
+  $vtp->addSession( $handle, 'modification' );
+  $url = './admin/admin.php?page=picture_modify&amp;cat_id='.$page['cat'];
+  $url.= '&amp;image_id='.$page['id'];
+  $vtp->setVar( $handle, 'modification.link', add_session_id( $url ) );
+  $vtp->setVar( $handle, 'modification.name', $lang['link_info_image'] );
+}
+
+if ( $next )
+{
+  // sending vars for display
+  $vtp->addSession( $handle,   'next' );
+  $vtp->setGlobalVar( $handle, 'next.url', add_session_id( $next_url_link ) );
+  $vtp->setGlobalVar( $handle, 'next.title', $next_title );
+  $vtp->setGlobalVar( $handle, 'next.src', $next_lien_thumbnail );
+  $vtp->setGlobalVar( $handle, 'next.alt', $next_alt_thumbnail );
+  $vtp->closeSession( $handle, 'next' );
+}
+else
+{
+  $vtp->addSession( $handle, 'next_empty' );
+  $vtp->closeSession( $handle, 'next_empty' );
+}
+//---------------------------------------------------- users's comments display
+if ( $conf['show_comments'] )
+{
+  $vtp->addSession( $handle, 'comments' );
+  // comment registeration
+  if ( isset( $_POST['content'] ) and $_POST['content'] != '' )
+  {
+    $register_comment = true;
+
+    if ( !$user['is_the_guest'] ) $author = $user['username'];
+    if ( $_POST['author'] != '' ) $author = $_POST['author'];
+    // if a guest try to use the name of an already existing user, he must
+    // be rejected
+    if ( isset( $author ) and $author != $user['username'] )
+    {
+      $query = 'SELECT COUNT(*) AS user_exists';
+      $query.= ' FROM '.PREFIX_TABLE.'users';
+      $query.= " WHERE username = '".$author."'";
+      $query.= ';';
+      $row = mysql_fetch_array( mysql_query( $query ) );
+      if ( $row['user_exists'] == 1 )
+      {
+        $vtp->addSession( $handle, 'information' );
+        $message = $lang['comment_user_exists'];
+        $vtp->setVar( $handle, 'information.content', $message );
+        $vtp->closeSession( $handle, 'information' );
+        $register_comment = false;
+      }
+    }
+
+    if ( $register_comment )
+    {
+      // anti-flood system
+      $reference_date = time() - $conf['anti-flood_time'];
+      $query = 'SELECT id';
+      $query.= ' FROM '.PREFIX_TABLE.'comments';
+      $query.= ' WHERE date > '.$reference_date;
+      $query.= " AND author = '".$author."'";
+      $query.= ';';
+      if ( mysql_num_rows( mysql_query( $query ) ) == 0
+           or $conf['anti-flood_time'] == 0 )
+      {
+        $query = 'INSERT INTO '.PREFIX_TABLE.'comments';
+        $query.= ' (author,date,image_id,content,validated) VALUES';
+        $query.= ' (';
+        if ( !isset( $author ) ) $query.= 'NULL';
+        else                     $query.= "'".$author."'";
+        $query.= ','.time().','.$page['id'];
+        $query.= ",'".htmlspecialchars( $_POST['content'], ENT_QUOTES)."'";
+        if ( !$conf['comments_validation'] or $user['status'] == 'admin' )
+          $query.= ",'true'";
+        else
+          $query.= ",'false'";
+        $query.= ');';
+        mysql_query( $query );
+        // information message
+        $vtp->addSession( $handle, 'information' );
+        $message = $lang['comment_added'];
+        if ( $conf['comments_validation'] and $user['status'] != 'admin' )
+        {
+          $message.= '<br />'.$lang['comment_to_validate'];
+        }
+        $vtp->setVar( $handle, 'information.content', $message );
+        $vtp->closeSession( $handle, 'information' );
+        // notification to the administrators
+        if ( $conf['mail_notification'] )
+        {
+          $cat_name = get_cat_display_name( $page['cat_name'], ' > ', '' );
+          $cat_name = strip_tags( $cat_name );
+          if ( $page['name'] == '' ) $picture = $page['file'];
+          else                       $picture = $page['name'];
+          notify( 'comment', $cat_name.' > '.$picture );
+        }
+      }
+      else
+      {
+        // information message
+        $vtp->addSession( $handle, 'information' );
+        $message = $lang['comment_anti-flood'];
+        $vtp->setVar( $handle, 'information.content', $message );
+        $vtp->closeSession( $handle, 'information' );
+      }
+    }
+  }
+  // comment deletion
+  if ( isset( $_GET['del'] )
+       and is_numeric( $_GET['del'] )
+       and $user['status'] == 'admin' )
+  {
+    $query = 'DELETE FROM '.PREFIX_TABLE.'comments';
+    $query.= ' WHERE id = '.$_GET['del'].';';
+    mysql_query( $query );
+  }
+  // number of comment for this picture
+  $query = 'SELECT COUNT(*) AS nb_comments';
+  $query.= ' FROM '.PREFIX_TABLE.'comments';
+  $query.= ' WHERE image_id = '.$page['id'];
+  $query.= " AND validated = 'true'";
+  $query.= ';';
+  $row = mysql_fetch_array( mysql_query( $query ) );
+  $page['nb_comments'] = $row['nb_comments'];
+  // navigation bar creation
+  $url = './picture.php?cat='.$page['cat'].'&amp;image_id='.$page['id'];
+  if (isset($_GET['expand']))
+  	$url.= '&amp;expand='.$_GET['expand'];
+  if ( $page['cat'] == 'search' )
+  {
+    $url.= '&amp;search='.$_GET['search'].'&amp;mode='.$_GET['mode'];
+  }
+  if( !isset( $_GET['start'] )
+      or !is_numeric( $_GET['start'] )
+      or ( is_numeric( $_GET['start'] ) and $_GET['start'] < 0 ) )
+  {
+    $page['start'] = 0;
+  }
+  else
+  {
+    $page['start'] = $_GET['start'];
+  }
+  $page['navigation_bar'] = create_navigation_bar( $url, $page['nb_comments'],
+                                                   $page['start'],
+                                                   $conf['nb_comment_page'],
+                                                   '' );
+  // sending vars for display
+  $vtp->setGlobalVar( $handle, 'navigation_bar', $page['navigation_bar'] );
+  $vtp->setGlobalVar( $handle, 'nb_comments', $page['nb_comments'] );
+
+  $query = 'SELECT id,author,date,image_id,content';
+  $query.= ' FROM '.PREFIX_TABLE.'comments';
+  $query.= ' WHERE image_id = '.$page['id'];
+  $query.= " AND validated = 'true'";
+  $query.= ' ORDER BY date ASC';
+  $query.= ' LIMIT '.$page['start'].', '.$conf['nb_comment_page'].';';
+  $result = mysql_query( $query );
+                
+  while ( $row = mysql_fetch_array( $result ) )
+  {
+    $vtp->addSession( $handle, 'comment' );
+    $author = $row['author'];
+    if ( $row['author'] == '' ) $author = $lang['guest'];
+    $vtp->setVar( $handle, 'comment.author', $author );
+    $vtp->setVar( $handle, 'comment.date',
+                  format_date( $row['date'], 'unix', true ) );
+    $content = nl2br( $row['content'] );
+
+    // replace _word_ by an underlined word
+    $pattern = '/_([^\s]*)_/';
+    $replacement = '<span style="text-decoration:underline;">\1</span>';
+    $content = preg_replace( $pattern, $replacement, $content );
+
+    // replace *word* by a bolded word
+    $pattern = '/\*([^\s]*)\*/';
+    $replacement = '<span style="font-weight:bold;">\1</span>';
+    $content = preg_replace( $pattern, $replacement, $content );
+
+    // replace /word/ by an italic word
+    $pattern = '/\/([^\s]*)\//';
+    $replacement = '<span style="font-style:italic;">\1</span>';
+    $content = preg_replace( $pattern, $replacement, $content );
+    
+    $vtp->setVar( $handle, 'comment.content', $content );
+    if ( $user['status'] == 'admin' )
+    {
+      $vtp->addSession( $handle, 'delete' );
+      $vtp->setVar( $handle, 'delete.link',
+                    add_session_id( $url.'&amp;del='.$row['id'] ) );
+      $vtp->closeSession( $handle, 'delete' );
+    }
+    $vtp->closeSession( $handle, 'comment' );
+  }
+
+  if ( !$user['is_the_guest']
+       or ( $user['is_the_guest'] and $conf['comments_forall'] ) )
+  {
+    $vtp->addSession( $handle, 'add_comment' );
+    // form action
+    $action = str_replace( '&', '&amp;', $_SERVER['REQUEST_URI'] );
+    $vtp->setGlobalVar( $handle, 'form_action', $action );
+    // display author field if the user is not logged in
+    if ( !$user['is_the_guest'] )
+    {
+      $vtp->addSession( $handle, 'author_known' );
+	  if (isset($user['pseudo']))
+	      $vtp->setVar( $handle, 'author_known.value', $user['pseudo'] );
+      $vtp->closeSession( $handle, 'author_known' );
+    }
+    else
+    {
+      $vtp->addSession( $handle, 'author_field' );
+      $vtp->closeSession( $handle, 'author_field' );
+    }
+    $vtp->closeSession( $handle, 'add_comment' );
+  }
+  $vtp->closeSession( $handle, 'comments' );
+}
+//------------------------------------------------------------ log informations
+pwg_log( 'picture', $intitule_cat, $page['file'] );
+mysql_close();
+//----------------------------------------------------------- html code display
+$output.= $vtp->Display( $handle, 0 );
+
+include('include/page_tail.php');
+?>
Index: /branches/1.3/profile.php
===================================================================
--- /branches/1.3/profile.php	(revision 3252)
+++ /branches/1.3/profile.php	(revision 3252)
@@ -0,0 +1,369 @@
+<?php
+/***************************************************************************
+ *                                profile.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+// customize appearance of the site for a user
+//----------------------------------------------------------- personnal include
+include_once( './include/init.inc.php' );
+//-------------------------------------------------- access authorization check
+check_login_authorization();
+if ( $user['is_the_guest'] )
+{
+  echo '<div style="text-align:center;">'.$lang['only_members'].'<br />';
+  echo '<a href="./identification.php">'.$lang['ident_title'].'</a></div>';
+  exit();
+}
+//------------------------------------------------------ update & customization
+$infos = array( 'nb_image_line', 'nb_line_page', 'language',
+                'maxwidth', 'maxheight', 'expand', 'show_nb_comments',
+                'short_period', 'long_period', 'template', 'mail_address' );
+// mise à jour dans la base de données des valeurs
+// des paramètres pour l'utilisateur courant
+//    - on teste si chacune des variables est passée en argument à la page
+//    - ce qui signifie que l'on doit venir de la page de personnalisation
+$errors = array();
+if ( isset( $_POST['submit'] ) )
+{
+  $int_pattern = '/^\d+$/';
+  if ( $_POST['maxwidth'] != ''
+       and ( !preg_match( $int_pattern, $_POST['maxwidth'] )
+             or $_POST['maxwidth'] < 50 ) )
+  {
+    array_push( $errors, $lang['err_maxwidth'] );
+  }
+  if ( $_POST['maxheight']
+       and ( !preg_match( $int_pattern, $_POST['maxheight'] )
+             or $_POST['maxheight'] < 50 ) )
+  {
+    array_push( $errors, $lang['err_maxheight'] );
+  }
+  // periods must be integer values, they represents number of days
+  if ( !preg_match( $int_pattern, $_POST['short_period'] )
+       or !preg_match( $int_pattern, $_POST['long_period'] ) )
+  {
+    array_push( $errors, $lang['err_periods'] );
+  }
+  else
+  {
+    // long period must be longer than short period
+    if ( $_POST['long_period'] <= $_POST['short_period']
+         or $_POST['short_period'] <= 0 )
+    {
+      array_push( $errors, $lang['err_periods_2'] );
+    }
+  }
+  $mail_error = validate_mail_address( $_POST['mail_address'] );
+  if ( $mail_error != '' ) array_push( $errors, $mail_error );
+  // password must be the same as its confirmation
+  if ( isset( $_POST['use_new_pwd'] )
+       and $_POST['password'] != $_POST['passwordConf'] )
+    array_push( $errors, $lang['reg_err_pass'] );
+  
+  if ( count( $errors ) == 0 )
+  {
+    $query = 'UPDATE '.PREFIX_TABLE.'users';
+    $query.= ' SET ';
+    foreach ( $infos as $i => $info ) {
+      if ( $i > 0 ) $query.= ',';
+      $query.= $info;
+      $query.= ' = ';
+      if ( $_POST[$info] == '' ) $query.= 'NULL';
+      else                       $query.= "'".$_POST[$info]."'";
+    }
+    $query.= ' WHERE id = '.$user['id'];
+    $query.= ';';
+    mysql_query( $query );
+
+    if ( isset( $_POST['use_new_pwd'] ) )
+    {
+      $query = 'UPDATE '.PREFIX_TABLE.'users';
+      $query.= " SET password = '".md5( $_POST['password'] )."'";
+      $query.= ' WHERE id = '.$user['id'];
+      $query.= ';';
+      mysql_query( $query );
+    }
+    if ( isset( $_POST['create_cookie'] ) )
+    {
+      setcookie( 'id',$page['session_id'],$_POST['cookie_expiration'],
+                 cookie_path() );
+      // update the expiration date of the session
+      $query = 'UPDATE '.PREFIX_TABLE.'sessions';
+      $query.= ' SET expiration = '.$_POST['cookie_expiration'];
+      $query.= " WHERE id = '".$page['session_id']."'";
+      $query.= ';';
+      mysql_query( $query );
+    }
+    // redirection
+    $url = 'category.php';
+    if ( !isset($_POST['create_cookie']) ) $url = add_session_id( $url,true );
+    header( 'Request-URI: '.$url );  
+    header( 'Content-Location: '.$url );  
+    header( 'Location: '.$url );
+    exit();
+  }
+}
+//----------------------------------------------------- template initialization
+//
+// Start output of page
+//
+$title = $lang['customize_page_title'];
+include('include/page_header.php');
+
+$handle = $vtp->Open( './template/'.$user['template'].'/profile.vtp' );
+initialize_template();
+$tpl = array( 'customize_title','password','new',
+              'reg_confirm','submit','create_cookie' );
+templatize_array( $tpl, 'lang', $handle );
+//----------------------------------------------------------------- form action
+$url = './profile.php';
+$vtp->setGlobalVar( $handle, 'form_action', add_session_id( $url ) );
+//-------------------------------------------------------------- errors display
+if ( count( $errors ) != 0 )
+{
+  $vtp->addSession( $handle, 'errors' );
+  foreach ( $errors as $error ) {
+    $vtp->addSession( $handle, 'li' );
+    $vtp->setVar( $handle, 'li.li', $error );
+    $vtp->closeSession( $handle, 'li' );
+  }
+  $vtp->closeSession( $handle, 'errors' );
+}
+//---------------------------------------------------- number of images per row
+if ( in_array( 'nb_image_line', $infos ) )
+{
+  $vtp->addSession( $handle, 'line' );
+  $vtp->setVar( $handle, 'line.name', $lang['customize_nb_image_per_row'] );
+  $vtp->addSession( $handle, 'select' );
+  $vtp->setVar( $handle, 'select.name', 'nb_image_line' );
+  for ( $i = 0; $i < sizeof( $conf['nb_image_row'] ); $i++ )
+  {
+    $vtp->addSession( $handle, 'option' );
+    $vtp->setVar( $handle, 'option.option', $conf['nb_image_row'][$i] );
+    if ( $conf['nb_image_row'][$i] == $user['nb_image_line'] )
+    {
+      $vtp->setVar( $handle, 'option.selected', ' selected="selected"' );
+    }
+    $vtp->closeSession( $handle, 'option' );
+  }
+  $vtp->closeSession( $handle, 'select' );
+  $vtp->closeSession( $handle, 'line' );
+}
+//------------------------------------------------------ number of row per page
+if ( in_array( 'nb_line_page', $infos ) )
+{
+  $vtp->addSession( $handle, 'line' );
+  $vtp->setVar( $handle, 'line.name', $lang['customize_nb_row_per_page'] );
+  $vtp->addSession( $handle, 'select' );
+  $vtp->setVar( $handle, 'select.name', 'nb_line_page' );
+  for ( $i = 0; $i < sizeof( $conf['nb_row_page'] ); $i++ )
+  {
+    $vtp->addSession( $handle, 'option' );
+    $vtp->setVar( $handle, 'option.option', $conf['nb_row_page'][$i] );
+    if ( $conf['nb_row_page'][$i] == $user['nb_line_page'] )
+    {
+      $vtp->setVar( $handle, 'option.selected', ' selected="selected"' );
+    }
+    $vtp->closeSession( $handle, 'option' );
+  }
+  $vtp->closeSession( $handle, 'select' );
+  $vtp->closeSession( $handle, 'line' );
+}
+//-------------------------------------------------------------------- template
+if ( in_array( 'template', $infos ) )
+{
+  $vtp->addSession( $handle, 'line' );
+  $vtp->setVar( $handle, 'line.name', $lang['customize_template'] );
+  $vtp->addSession( $handle, 'select' );
+  $vtp->setVar( $handle, 'select.name', 'template' );
+  $option = get_dirs( './template' );
+  for ( $i = 0; $i < sizeof( $option ); $i++ )
+  {
+    $vtp->addSession( $handle, 'option' );
+    $vtp->setVar( $handle, 'option.option', $option[$i] );
+    if ( $option[$i] == $user['template'] )
+    {
+      $vtp->setVar( $handle, 'option.selected', ' selected="selected"' );
+    }
+    $vtp->closeSession( $handle, 'option' );
+  }
+  $vtp->closeSession( $handle, 'select' );
+  $vtp->closeSession( $handle, 'line' );
+}
+//-------------------------------------------------------------------- language
+if ( in_array( 'language', $infos ) )
+{
+  $vtp->addSession( $handle, 'line' );
+  $vtp->setVar( $handle, 'line.name', $lang['customize_language'] );
+  $vtp->addSession( $handle, 'select' );
+  $vtp->setVar( $handle, 'select.name', 'language' );
+  $option = get_languages( './language/' );
+  for ( $i = 0; $i < sizeof( $option ); $i++ )
+  {
+    $vtp->addSession( $handle, 'option' );
+    $vtp->setVar( $handle, 'option.option', $option[$i] );
+    if( $option[$i] == $user['language'] )
+    {
+      $vtp->setVar( $handle, 'option.selected', ' selected="selected"' );
+    }
+    $vtp->closeSession( $handle, 'option' );
+  }
+  $vtp->closeSession( $handle, 'select' );
+  $vtp->closeSession( $handle, 'line' );
+}
+//---------------------------------------------------------------- short period
+if ( in_array( 'short_period', $infos ) )
+{
+  $vtp->addSession( $handle, 'line' );
+  $vtp->setVar( $handle, 'line.name', $lang['customize_short_period'] );
+  $vtp->addSession( $handle, 'text' );
+  $vtp->setVar( $handle, 'text.name', 'short_period' );
+  $vtp->setVar( $handle, 'text.value', $user['short_period'] );
+  $vtp->closeSession( $handle, 'text' );
+  $vtp->closeSession( $handle, 'line' );
+}
+//----------------------------------------------------------------- long period
+if ( in_array( 'long_period', $infos ) )
+{
+  $vtp->addSession( $handle, 'line' );
+  $vtp->setVar( $handle, 'line.name', $lang['customize_long_period'] );
+  $vtp->addSession( $handle, 'text' );
+  $vtp->setVar( $handle, 'text.name', 'long_period' );
+  $vtp->setVar( $handle, 'text.value', $user['long_period'] );
+  $vtp->closeSession( $handle, 'text' );
+  $vtp->closeSession( $handle, 'line' );
+}
+//--------------------------------------------------------- max displayed width
+if ( in_array( 'maxwidth', $infos ) )
+{
+  $vtp->addSession( $handle, 'line' );
+  $vtp->setVar( $handle, 'line.name', $lang['maxwidth'] );
+  $vtp->addSession( $handle, 'text' );
+  $vtp->setVar( $handle, 'text.name', 'maxwidth' );
+  $vtp->setVar( $handle, 'text.value', $user['maxwidth'] );
+  $vtp->closeSession( $handle, 'text' );
+  $vtp->closeSession( $handle, 'line' );
+}
+//-------------------------------------------------------- max displayed height
+if ( in_array( 'maxheight', $infos ) )
+{
+  $vtp->addSession( $handle, 'line' );
+  $vtp->setVar( $handle, 'line.name', $lang['maxheight'] );
+  $vtp->addSession( $handle, 'text' );
+  $vtp->setVar( $handle, 'text.name', 'maxheight' );
+  $vtp->setVar( $handle, 'text.value', $user['maxheight'] );
+  $vtp->closeSession( $handle, 'text' );
+  $vtp->closeSession( $handle, 'line' );
+}
+//---------------------------------------------------------------- mail address
+if ( in_array( 'mail_address', $infos ) )
+{
+  $vtp->addSession( $handle, 'line' );
+  $vtp->setVar( $handle, 'line.name', $lang['mail_address'] );
+  $vtp->addSession( $handle, 'text' );
+  $vtp->setVar( $handle, 'text.name', 'mail_address' );
+  $vtp->setVar( $handle, 'text.value', $user['mail_address'] );
+  $vtp->closeSession( $handle, 'text' );
+  $vtp->closeSession( $handle, 'line' );
+}
+//----------------------------------------------------- expand all categories ?
+if ( in_array( 'expand', $infos ) )
+{
+  $vtp->addSession( $handle, 'line' );
+  $vtp->setVar( $handle, 'line.name', $lang['customize_expand'] );
+  $vtp->addSession( $handle, 'group' );
+  $vtp->addSession( $handle, 'radio' );
+  $vtp->setVar( $handle, 'radio.name', 'expand' );
+  $vtp->setVar( $handle, 'radio.value', 'true' );
+  $checked = '';
+  if ( $user['expand'] )
+  {
+    $checked = ' checked="checked"';
+  }
+  $vtp->setVar( $handle, 'radio.checked', $checked );
+  $vtp->setVar( $handle, 'radio.option', $lang['yes'] );
+  $vtp->closeSession( $handle, 'radio' );
+  $vtp->addSession( $handle, 'radio' );
+  $vtp->setVar( $handle, 'radio.name', 'expand' );
+  $vtp->setVar( $handle, 'radio.value', 'false' );
+  $checked = '';
+  if ( !$user['expand'] )
+  {
+    $checked = ' checked="checked"';
+  }
+  $vtp->setVar( $handle, 'radio.checked', $checked );
+  $vtp->setVar( $handle, 'radio.option', $lang['no'] );
+  $vtp->closeSession( $handle, 'radio' );
+  $vtp->closeSession( $handle, 'group' );
+  $vtp->closeSession( $handle, 'line' );
+}
+//---------------------------------- show number of comments on thumbnails page
+if ( in_array( 'show_nb_comments', $infos ) )
+{
+  $vtp->addSession( $handle, 'line' );
+  $vtp->setVar( $handle, 'line.name', $lang['customize_show_nb_comments'] );
+  $vtp->addSession( $handle, 'group' );
+  $vtp->addSession( $handle, 'radio' );
+  $vtp->setVar( $handle, 'radio.name', 'show_nb_comments' );
+  $vtp->setVar( $handle, 'radio.value', 'true' );
+  $checked = '';
+  if ( $user['show_nb_comments'] )
+  {
+    $checked = ' checked="checked"';
+  }
+  $vtp->setVar( $handle, 'radio.checked', $checked );
+  $vtp->setVar( $handle, 'radio.option', $lang['yes'] );
+  $vtp->closeSession( $handle, 'radio' );
+  $vtp->addSession( $handle, 'radio' );
+  $vtp->setVar( $handle, 'radio.name', 'show_nb_comments' );
+  $vtp->setVar( $handle, 'radio.value', 'false' );
+  $checked = '';
+  if ( !$user['show_nb_comments'] )
+  {
+    $checked = ' checked="checked"';
+  }
+  $vtp->setVar( $handle, 'radio.checked', $checked );
+  $vtp->setVar( $handle, 'radio.option', $lang['no'] );
+  $vtp->closeSession( $handle, 'radio' );
+  $vtp->closeSession( $handle, 'group' );
+  $vtp->closeSession( $handle, 'line' );
+}
+//--------------------------------------------------------------- create cookie
+if ( $conf['authorize_cookies'] )
+{
+  $vtp->addSession( $handle, 'cookie' );
+  $options = array(
+    array( 'message' => '1 '.$lang['customize_day'],
+           'value' => time() + 24*60*60 ),
+    array( 'message' => '1 '.$lang['customize_week'],
+           'value' => time() + 7*24*60*60 ),
+    array( 'message' => '1 '.$lang['customize_month'],
+           'value' => time() + 30*24*60*60 ),
+    array( 'message' => '1 '.$lang['customize_year'],
+           'value' => time() + 365*24*60*60 )
+    );
+  foreach ( $options as $option ) {
+    $vtp->addSession( $handle, 'expiration_option' );
+    $vtp->setVar( $handle, 'expiration_option.option', $option['message'] );
+    $vtp->setVar( $handle, 'expiration_option.value', $option['value'] );
+    $vtp->closeSession( $handle, 'expiration_option' );
+  }
+  $vtp->closeSession( $handle, 'cookie' );
+}
+//----------------------------------------------------------- html code display
+$output.= $vtp->Display( $handle, 0 );
+include('include/page_tail.php');
+?>
Index: /branches/1.3/readme.txt
===================================================================
--- /branches/1.3/readme.txt	(revision 3252)
+++ /branches/1.3/readme.txt	(revision 3252)
@@ -0,0 +1,31 @@
+                    PhpWebGallery version 1.3 (12/10/2003)
+                          http://phpwebgallery.net
+                       http://forum.phpwebgallery.net
+
+English -----------------------------------------------------------------------
+                  Installation instructions for PhpWebGallery
+
+1. extract files from the downloaded file (using tar or unzip command, or
+   softwares like powerarchiver or winzip)
+
+2. place de source files on your website in the directory of your choice
+   ("gallery" for example), it is useless to place "readme.txt" file on your
+   website
+
+3. go to the URL http://your.domain/gallery/admin/install.php
+
+4. follow the instructions of installation
+
+Francais ----------------------------------------------------------------------
+                 Instructions d'installation de PhpWebGallery
+
+1. décompresser à l'aide de winzip par exemple (winrar, winace et beaucoup
+   d'autres le permettent également) le fichier téléchargé.
+
+2. placer les fichiers décompressés sur votre serveur web dans le répertoire
+   de votre choix ("galerie" par exemple), il est inutile de placer le
+   fichier "readme.txt" sur votre serveur web
+
+3. aller à l'URL http://votre.domaine/galerie/admin/install.php
+
+4. suivre les instructions d'installation
Index: /branches/1.3/register.php
===================================================================
--- /branches/1.3/register.php	(revision 3252)
+++ /branches/1.3/register.php	(revision 3252)
@@ -0,0 +1,108 @@
+<?php
+/***************************************************************************
+ *                                register.php                             *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+//----------------------------------------------------------- personnal include
+include_once( './include/init.inc.php' );
+//-------------------------------------------------- access authorization check
+if ( $conf['access'] == "restricted" )
+{
+  echo $lang['only_members'];
+  exit();
+}
+//----------------------------------------------------------- user registration
+$error = array();
+if ( isset( $_POST['submit'] ) )
+{
+  $error = register_user( $_POST['login'], $_POST['password'],
+                          $_POST['password_conf'], $_POST['mail_address'] );
+  if ( sizeof( $error ) == 0 )
+  {
+    $session_id = session_create( $_POST['login'] );
+    $url = 'category.php?id='.$session_id;
+    header( 'Request-URI: '.$url );
+    header( 'Content-Location: '.$url );  
+    header( 'Location: '.$url );
+    exit();
+  }
+}
+//----------------------------------------------------- template initialization
+//
+// Start output of page
+//
+$title= $lang['register_page_title'];
+include('include/page_header.php');
+
+$handle = $vtp->Open( './template/'.$user['template'].'/register.vtp' );
+// language
+$vtp->setGlobalVar( $handle, 'register_title',   $lang['register_title'] );
+$vtp->setGlobalVar( $handle, 'ident_guest_visit',$lang['ident_guest_visit'] );
+$vtp->setGlobalVar( $handle, 'submit',           $lang['submit'] );
+initialize_template();
+//----------------------------------------------------------------- form action
+$vtp->setGlobalVar( $handle, 'form_action', './register.php' );
+//-------------------------------------------------------------- errors display
+if ( sizeof( $error ) != 0 )
+{
+  $vtp->addSession( $handle, 'errors' );
+  for ( $i = 0; $i < sizeof( $error ); $i++ )
+  {
+    $vtp->addSession( $handle, 'li' );
+    $vtp->setVar( $handle, 'li.li', $error[$i] );
+    $vtp->closeSession( $handle, 'li' );
+  }
+  $vtp->closeSession( $handle, 'errors' );
+}
+//----------------------------------------------------------------------- login
+$vtp->addSession( $handle, 'line' );
+$vtp->setVar( $handle, 'line.name', $lang['login'] );
+$vtp->addSession( $handle, 'text' );
+$vtp->setVar( $handle, 'text.name', 'login' );
+if (isset( $_POST['login']))
+	$vtp->setVar( $handle, 'text.value', $_POST['login'] );
+$vtp->closeSession( $handle, 'text' );
+$vtp->closeSession( $handle, 'line' );
+//-------------------------------------------------------------------- password
+$vtp->addSession( $handle, 'line' );
+$vtp->setVar( $handle, 'line.name', $lang['password'] );
+$vtp->addSession( $handle, 'password' );
+$vtp->setVar( $handle, 'password.name', 'password' );
+$vtp->setVar( $handle, 'password.value', '' );
+$vtp->closeSession( $handle, 'password' );
+$vtp->closeSession( $handle, 'line' );
+//------------------------------------------------------- password confirmation
+$vtp->addSession( $handle, 'line' );
+$vtp->setVar( $handle, 'line.name', $lang['reg_confirm'] );
+$vtp->addSession( $handle, 'password' );
+$vtp->setVar( $handle, 'password.name', 'password_conf' );
+$vtp->setVar( $handle, 'password.value', '' );
+$vtp->closeSession( $handle, 'password' );
+$vtp->closeSession( $handle, 'line' );
+//---------------------------------------------------------------- mail address
+$vtp->addSession( $handle, 'line' );
+$vtp->setVar( $handle, 'line.name', $lang['mail_address'] );
+$vtp->addSession( $handle, 'text' );
+$vtp->setVar( $handle, 'text.name', 'mail_address' );
+if (isset( $_POST['mail_address']))
+	$vtp->setVar( $handle, 'text.value', $_POST['mail_address'] );
+$vtp->closeSession( $handle, 'text' );
+$vtp->closeSession( $handle, 'line' );
+//----------------------------------------------------------- html code display
+$output.= $vtp->Display( $handle, 0 );
+include('include/page_tail.php');
+?>
Index: /branches/1.3/search.php
===================================================================
--- /branches/1.3/search.php	(revision 3252)
+++ /branches/1.3/search.php	(revision 3252)
@@ -0,0 +1,126 @@
+<?php
+/***************************************************************************
+ *                                 search.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+//----------------------------------------------------------- personnal include
+include_once( './include/init.inc.php' );
+//-------------------------------------------------- access authorization check
+check_login_authorization();
+//----------------------------------------------------------------- redirection
+$error = array();
+if ( isset( $_POST['search'] ) )
+{
+  $redirect = true;
+  $search = array();
+  $words = preg_split( '/\s+/', $_POST['search'] );
+  foreach ( $words as $i => $word ) {
+    if ( strlen( $word ) > 2 and !preg_match( '/[,;:\']/', $word ) )
+    {
+      array_push( $search, $word );
+    }
+    else
+    {
+      $redirect = false;
+      array_push( $error, $lang['invalid_search'] );
+      break;
+    }
+  }
+  $search = array_unique( $search );
+  $search = implode( ',', $search );
+  if ( $redirect )
+  {
+    $url = 'category.php?cat=search&search='.$search.'&mode='.$_POST['mode'];
+    $url = add_session_id( $url, true );
+    header( 'Request-URI: '.$url );
+    header( 'Content-Location: '.$url );  
+    header( 'Location: '.$url );
+    exit();
+  }
+}
+//----------------------------------------------------- template initialization
+//
+// Start output of page
+//
+$title= $lang['search_title'];
+include('include/page_header.php');
+
+$handle = $vtp->Open( './template/'.$user['template'].'/search.vtp' );
+initialize_template();
+$tpl = array( 'search_title','search_return_main_page','submit',
+              'search_comments' );
+templatize_array( $tpl, 'lang', $handle );
+//----------------------------------------------------------------- form action
+$vtp->setGlobalVar( $handle, 'form_action', add_session_id( './search.php' ) );
+//-------------------------------------------------------------- errors display
+if ( sizeof( $error ) != 0 )
+{
+  $vtp->addSession( $handle, 'errors' );
+  for ( $i = 0; $i < sizeof( $error ); $i++ )
+  {
+    $vtp->addSession( $handle, 'li' );
+    $vtp->setVar( $handle, 'li.li', $error[$i] );
+    $vtp->closeSession( $handle, 'li' );
+  }
+  $vtp->closeSession( $handle, 'errors' );
+}
+//------------------------------------------------------------------------ form
+// search field
+$vtp->addSession( $handle, 'line' );
+$vtp->setVar( $handle, 'line.name', $lang['search_field_search'].' *' );
+$vtp->addSession( $handle, 'text' );
+$vtp->setVar( $handle, 'text.size', '40' );
+$vtp->setVar( $handle, 'text.name', 'search' );
+if (isset($_POST['search']))
+$vtp->setVar( $handle, 'text.value', $_POST['search'] );
+$vtp->closeSession( $handle, 'text' );
+$vtp->closeSession( $handle, 'line' );
+// mode of search : match all words or at least one of this words
+$vtp->addSession( $handle, 'line' );
+$vtp->addSession( $handle, 'group' );
+
+$vtp->addSession( $handle, 'radio' );
+$vtp->setVar( $handle, 'radio.name', 'mode' );
+$vtp->setVar( $handle, 'radio.value', 'OR' );
+$vtp->setVar( $handle, 'radio.option', $lang['search_mode_or'] );
+if (!isset($_POST['mode']) || $_POST['mode'] == 'OR' )
+{
+  $vtp->setVar( $handle, 'radio.checked', ' checked="checked"' );
+}
+$vtp->closeSession( $handle, 'radio' );
+
+$vtp->addSession( $handle, 'radio' );
+$vtp->setVar( $handle, 'radio.name', 'mode' );
+$vtp->setVar( $handle, 'radio.value', 'AND' );
+$vtp->setVar( $handle, 'radio.option', $lang['search_mode_and'] );
+if ( isset($_POST['mode']) && $_POST['mode'] == 'AND' )
+{
+  $vtp->setVar( $handle, 'radio.checked', ' checked="checked"' );
+}
+$vtp->closeSession( $handle, 'radio' );
+
+$vtp->closeSession( $handle, 'group' );
+$vtp->closeSession( $handle, 'line' );
+//---------------------------------------------------- return to main page link
+$vtp->setGlobalVar( $handle, 'back_url', add_session_id( './category.php' ) );
+//----------------------------------------------------------- html code display
+$output.= $vtp->Display( $handle, 0 );
+//------------------------------------------------------------ log informations
+pwg_log( 'search', $title );
+mysql_close();
+include('include/page_tail.php');
+?>
Index: /branches/1.3/template/default/about.vtp
===================================================================
--- /branches/1.3/template/default/about.vtp	(revision 3252)
+++ /branches/1.3/template/default/about.vtp	(revision 3252)
@@ -0,0 +1,21 @@
+    <table style="width:100%;height:100%">
+      <tr align="center" valign="middle">
+        <td>
+          {#frame_start}1px{#frame_begin}
+            <div class="titrePage">{#about_title}</div>
+          {#frame_end}
+          <div style="margin-bottom:5px;">&nbsp;</div>
+          {#frame_start}50%{#frame_begin}
+            <div class="menu" style="white-space:normal;margin:10px;">
+              {#about_message}
+            </div>
+          {#frame_end}
+          <div style="text-align:center;margin:5px;">
+            <a href="{#back_url}">{#about_return}</a>
+          </div>
+          <div style="text-align:center;margin:5px;">
+            <img src="./template/{#user_template}/images/php_sqreuil_artistes.gif" alt="php logo" />
+          </div>
+        </td>
+      </tr>
+    </table>
Index: /branches/1.3/template/default/admin/admin.vtp
===================================================================
--- /branches/1.3/template/default/admin/admin.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/admin.vtp	(revision 3252)
@@ -0,0 +1,75 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset={#charset}" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+    <title>{#title_default}</title>
+	<link rel="stylesheet" href="{#style}" type="text/css" />
+    <script language="javascript">
+      function SelectAll( formulaire )
+      {
+        len = formulaire.elements.length;
+        var i=0;
+        for( i = 0; i < len; i++)
+        {
+          if ( formulaire.elements[i].type=='checkbox'
+               && formulaire.elements[i].name != 'copie')
+          {
+            formulaire.elements[i].checked = true;
+          }
+        }
+      }
+
+      function Inverser( formulaire )
+      {
+        len = formulaire.elements.length;
+        var i=0;
+        for( i=0; i<len; i++)
+        {
+          if ( formulaire.elements[i].type=='checkbox'
+               && formulaire.elements[i].name != 'copie')
+          {
+            formulaire.elements[i].checked = !formulaire.elements[i].checked;
+          }
+        }
+      }
+    </script>
+
+  </head>
+  <body>
+    <!--VTP_install_warning--><div class="install_warning">{#install_warning}</div><!--/VTP_install_warning-->
+    <table>
+      <tr>
+        <td width="1%" valign="top">
+          <table class="table1">
+            <tr>
+              <td class="titretable1">{#menu_title}</td>
+            </tr>
+            <tr>
+              <td class="contenucellule">
+                <div class="plan">
+                  <!--VTP_summary-->
+                  {#indent}<img src="../template/{#user_template}/admin/images/puce.gif" alt=""><a href="{#link}" class="cat_plan">{#name}</a><br />
+                  <!--/VTP_summary-->
+                </div>
+              </td>
+            </tr>
+          </table>
+        </td>
+        <td align="center" valign="top">
+          <div class="grostitre">{#title}</div>
+          <br />
+          <center>
+            <table width="95%" class="table1">
+              <tr>
+                <td class="contenucellule">
+                  {#sub}
+                </td>
+              </tr>
+            </table>
+          </center>
+        </td>
+      </tr>
+    </table>
+  </body>
+</html>
Index: /branches/1.3/template/default/admin/cat_list.vtp
===================================================================
--- /branches/1.3/template/default/admin/cat_list.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/cat_list.vtp	(revision 3252)
@@ -0,0 +1,110 @@
+<!--VTP_errors-->
+<div class="errors">
+  <div class="errors_title">{#errors_title}</div>
+  <ul>
+    <!--VTP_li-->
+    <li>{#content}</li>
+    <!--/VTP_li-->
+  </ul>
+</div>
+<!--/VTP_errors-->
+<div style="text-align:center;padding-top:10px;padding-bottom:5px;">
+  <form action="" method="post">
+    {#cat_add} <input type="text" name="virtual_name" />
+    {#cat_parent}
+    <!--VTP_associate_LOV-->
+    <select name="associate">
+      <!--VTP_associate_cat-->
+      <option value="{#value}">{#content}</option>
+      <!--/VTP_associate_cat-->
+    </select>
+    <!--/VTP_associate_LOV-->
+    <!--VTP_associate_text-->
+      <input type="text" name="associate" />
+    <!--/VTP_associate_text-->
+   <input type="submit" value="{#submit}" name="submit" />
+  </form>
+</div>
+<table style="width:100%;">
+<!--VTP_cat-->
+<tr>
+  <{#td} style="width:50%;text-align:left;">
+    <a name="{#id}"></a>
+    {#indent}
+    <!--VTP_bullet_collapsed--><a href="{#link}"><img src="../template/{#user_template}/admin/images/collapsed.gif" style="border:none;" alt="&gt;" /></a><!--/VTP_bullet_collapsed-->
+    <!--VTP_bullet_expanded--><a href="{#link}"><img src="../template/{#user_template}/admin/images/expanded.gif" style="border:none;" alt="&gt;" /></a><!--/VTP_bullet_expanded-->
+    <!--VTP_bullet_wo_link--><img src="../template/{#user_template}/admin/images/collapsed.gif" style="border:none;" alt="&gt;" /><!--/VTP_bullet_wo_link-->
+    &nbsp;{#name} [
+    <!--VTP_storage-->
+    dir : {#dir}
+    <!--/VTP_storage-->
+    <!--VTP_virtual-->
+    <span style="color:blue;">{#cat_virtual}</span>
+    <!--/VTP_virtual-->
+    ]
+    <span style="color:red;font-weight:normal;"> {#invisible} <span style="font-weight:bold;">{#private}</span></span>
+  </{#td}>
+  <{#td} class="{#class}"
+         style="width:1px;white-space:nowrap;text-align:center;">
+    <!--VTP_up-->
+    <a href="{#up_url}"><img src="../template/{#user_template}/admin/images/arrow_up.gif" alt="{#cat_up}" title="{#cat_up}" style="border:none;" /></a>
+    <!--/VTP_up-->
+    <!--VTP_no_up-->
+    <a href="{#last_url}"><img src="../template/{#user_template}/admin/images/arrow_last.gif" alt="{#cat_last}" title="{#cat_last}" style="border:none;" /></a>
+    <!--/VTP_no_up-->
+  </{#td}>
+  <{#td} class="{#class}"
+         style="width:1px;white-space:nowrap;text-align:center;">
+    <!--VTP_down-->
+    <a href="{#down_url}"><img src="../template/{#user_template}/admin/images/arrow_down.gif" alt="{#cat_down}" title="{#cat_down}" style="border:none;" /></a>
+    <!--/VTP_down-->
+    <!--VTP_no_down-->
+    <a href="{#first_url}"><img src="../template/{#user_template}/admin/images/arrow_first.gif" alt="{#cat_first}" title="{#cat_first}" style="border:none;" /></a>
+    <!--/VTP_no_down-->
+  </{#td}>
+  <{#td} class="{#class}" style="width:1px;text-align:center;">
+    <div style="margin-left:3px;margin-right:3px;">{#nb_picture}</div>
+  </{#td}>
+  <{#td} class="{#class}"
+         style="width:10%;white-space:nowrap;text-align:center;">
+    <a href="{#edit_url}">{#cat_edit}</a>
+  </{#td}>
+  <{#td} class="{#class}"
+         style="width:10%;white-space:nowrap;text-align:center;">
+    <!--VTP_image_info-->
+    <a href="{#image_info_url}">{#cat_image_info}</a>
+    <!--/VTP_image_info-->
+    <!--VTP_no_image_info-->
+    <span style="color:darkgray;">{#cat_image_info}</span>
+    <!--/VTP_no_image_info-->
+  </{#td}>
+  <{#td} class="{#class}"
+         style="width:10%;white-space:nowrap;text-align:center;">
+    <!--VTP_permission-->
+    <a href="{#url}">{#cat_permission}</a>
+    <!--/VTP_permission-->
+    <!--VTP_no_permission-->
+    <span style="color:darkgray;">{#cat_permission}</span>
+    <!--/VTP_no_permission-->
+  </{#td}>
+  <{#td} class="{#class}"
+         style="width:10%;white-space:nowrap;text-align:center;">
+    <!--VTP_update-->
+    <a href="{#update_url}">{#cat_update}</a>
+    <!--/VTP_update-->
+    <!--VTP_no_update-->
+    <span style="color:darkgray;">{#cat_update}</span>
+    <!--/VTP_no_update-->
+  </{#td}>
+  <{#td} class="{#class}"
+         style="width:10%;white-space:nowrap;text-align:center;">
+    <!--VTP_delete-->
+    <a href="{#delete_url}">{#delete}</a>
+    <!--/VTP_delete-->
+    <!--VTP_no_delete-->
+    <span style="color:darkgray;">{#delete}</span>
+    <!--/VTP_no_delete-->
+  </{#td}>
+<tr>
+<!--/VTP_cat-->
+</table>
Index: /branches/1.3/template/default/admin/cat_modify.vtp
===================================================================
--- /branches/1.3/template/default/admin/cat_modify.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/cat_modify.vtp	(revision 3252)
@@ -0,0 +1,92 @@
+<!--VTP_confirmation-->
+<div style="color:red;text-align:center;">
+  {#editcat_confirm} [ <a href="{#back_url}">{#editcat_back}</a> ]</div>
+<!--/VTP_confirmation-->
+<form action="{#form_action}" method="post">
+  <table style="width:100%;">
+    <tr>
+      <th colspan="2">{#editcat_title1} "{#cat:name}" [
+        <!--VTP_storage-->
+        dir : {#dir}
+        <!--/VTP_storage-->
+        <!--VTP_virtual-->
+        <span style="color:blue;">{#cat_virtual}</span>
+        <!--/VTP_virtual-->
+        ]
+      </th>
+    </tr>
+    <!--VTP_server-->
+    <tr>
+      <td style="width:20%;">{#remote_site}</td>
+      <td class="row2">{#url}</td>
+    </tr>
+    <!--/VTP_server-->
+    <tr>
+      <td style="width:20%;">{#editcat_name}</td>
+      <td class="row2">
+        <input type="text" name="name" value="{#name}" maxlength="255"/>
+      </td>
+    </tr>
+    <tr>
+      <td>{#editcat_comment}</td>
+      <td class="row2">
+        <textarea name="comment" rows="5" cols="50" style="overflow:auto">{#comment}</textarea>
+      </td>
+    </tr>
+    <tr>
+      <td>{#editcat_status}</td>
+      <td class="row2">
+        <!--VTP_status_option-->
+        <input type="radio" name="status" value="{#value}"{#checked} />{#option}
+        <!--/VTP_status_option-->
+      </td>
+    </tr>
+<!--
+    <tr>
+      <td>{#editcat_visible}</td>
+      <td class="row2">
+        <!--VTP_visible_option-->
+        <input type="radio" name="visible" value="{#value}"{#checked} />{#option}
+        <!--/VTP_visible_option-->
+	{#editcat_visible_info}
+      </td>
+    </tr>
+-->
+    <input type="hidden" name="visible" value="true"/>
+    <!--VTP_uploadable-->
+    <tr>
+      <td>{#editcat_uploadable}</td>
+      <td class="row2">
+        <!--VTP_uploadable_option-->
+        <input type="radio" name="uploadable" value="{#value}"{#checked} />{#option}
+        <!--/VTP_uploadable_option-->
+      </td>
+    </tr>
+    <!--/VTP_uploadable-->
+    <!--VTP_parent-->
+    <tr>
+      <td>{#cat_parent}</td>
+      <td class="row2">
+        <!--VTP_associate_LOV-->
+        <select name="associate">
+          <!--VTP_associate_cat-->
+          <option value="{#value}" {#selected}>{#content}</option>
+          <!--/VTP_associate_cat-->
+        </select>
+        <!--/VTP_associate_LOV-->
+        <!--VTP_associate_text-->
+        <input type="text" name="associate" value="{#value}" />
+        <!--/VTP_associate_text-->
+      </td>
+    </tr>
+    <!--/VTP_parent-->
+    <tr>
+      <td colspan="2">&nbsp;</td>
+    </tr>
+    <tr>
+      <td colspan="2" align="center">
+        <input type="submit" name="submit" value="{#submit}" />
+      </td>
+    </tr>
+  </table>
+</form>
Index: /branches/1.3/template/default/admin/cat_perm.vtp
===================================================================
--- /branches/1.3/template/default/admin/cat_perm.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/cat_perm.vtp	(revision 3252)
@@ -0,0 +1,48 @@
+<form action="{#action}" method="post">
+  <!--VTP_groups-->
+  <table style="width:100%;">
+    <tr>
+      <th colspan="2">{#menu_groups}</th>
+    </tr>
+    <!--VTP_group-->
+    <tr>
+      <td><img src="../template/{#user_template}/admin/images/puce.gif" alt="&gt;" /><a href="{#group_perm_link}"><span style="color:{#color}">{#groupname}</span></a></td>
+      <td style="text-align:right;">
+        <input type="radio" name="groupaccess-{#id}" value="0"{#authorized_checked}/>{#permuser_authorized}
+        <input type="radio" name="groupaccess-{#id}" value="1"{#forbidden_checked}/>{#permuser_forbidden}
+      </td>
+    </tr>
+    <!--/VTP_group-->
+  </table>
+  <!--/VTP_groups-->
+  <table style="width:100%;">
+    <tr>
+      <th colspan="2">{#menu_users}</th>
+    </tr>
+    <!--VTP_user-->
+    <tr>
+      <td>
+        <img src="../template/{#user_template}/admin/images/puce.gif" alt="&gt;" />
+        <a href="{#user_perm_link}"><span style="color:{#color}">{#username}</span></a>
+        <!--VTP_usergroups-->
+        [
+        <!--VTP_usergroup-->
+        <span style="color:{#color};">{#name}</span>{#separation}
+        <!--/VTP_usergroup-->
+        ]
+        <!--/VTP_usergroups-->
+      </td>
+      <td style="text-align:right;">
+        <!--VTP_parent_forbidden-->
+        <a href="{#url}">{#permuser_parent_forbidden}</a>
+        <!--/VTP_parent_forbidden-->
+        <input type="radio" name="useraccess-{#id}" value="0"{#authorized_checked}/>{#permuser_authorized}
+        <input type="radio" name="useraccess-{#id}" value="1"{#forbidden_checked}/>{#permuser_forbidden}
+      </td>
+    </tr>
+    <!--/VTP_user-->
+    <tr>
+      <td colspan="2" align="center"><input type="submit" name="submit" value="{#submit}"/></td>
+    </tr>
+  </table>
+</form>
Index: /branches/1.3/template/default/admin/comments.vtp
===================================================================
--- /branches/1.3/template/default/admin/comments.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/comments.vtp	(revision 3252)
@@ -0,0 +1,81 @@
+<!--VTP_section-->
+<table style="width:100%;">
+  <tr>
+    <th>
+      {#title}
+      <!--VTP_last_days-->
+      [
+      <!--VTP_last_day_option-->
+      <a href="{#link}" style="{#style}">{#option}</a>{#separation}
+      <!--/VTP_last_day_option-->
+      {#stats_last_days}
+      ]
+      <!--/VTP_last_days-->
+      <!--VTP_open-->
+      [ <a href="{#url}">{#open}</a> ]
+      <!--/VTP_open-->
+      <!--VTP_close-->
+      [ <a href="{#url}">{#close}</a> ]
+      <!--/VTP_close-->
+    </th>
+  </tr>
+</table>
+<!--VTP_start_form-->
+<form action="{#action}" method="post">
+<!--/VTP_start_form-->
+<!--VTP_picture-->
+<div style="border:2px solid #D3DCE3;margin:3px;">
+  <table style="width:100%;">
+    <tr>
+     <td valign="top" width="1px">
+       <!-- the thumbnail of the picture, linked to the full size page -->
+       <a href="{#thumb_url}" title="{#thumb_title}">
+         <img src="{#thumb_src}" class="imgLink" alt="{#thumb_alt}"/>
+       </a>
+     </td>
+     <td>
+       <div style="font-weight:bold;">{#title}</div>
+       <!--VTP_comment-->
+       <table style="width:100%;">
+         <tr>
+           <td>
+             <table class="tableComment">
+               <tr>
+                 <td rowspan="2" valign="top" class="cellAuthor">
+                   <div class="commentsAuthor">{#author}</div>
+                 </td>
+                 <td class="cellInfo">
+                   <div class="commentsInfos">
+                     {#date}<!--VTP_delete--><a href="{#link}" title="{#comments_del}"><img src="../template/{#user_template}/admin/images/delete.gif" style="border:none;margin-left:5px;" alt="[{#delete}]"/></a><!--/VTP_delete-->
+                   </div>
+                 </td>
+               </tr>
+               <tr>
+                 <td>
+                   <div class="commentsContent">{#content}</div>
+                 </td>
+               </tr>
+             </table>
+           </td>
+           <!--VTP_validation-->
+           <td style="width:1px;">
+             <input type="checkbox" name="validate-{#id}" value="true" />
+           </td>
+           <!--/VTP_validation-->
+         </tr>
+       </table>
+       <!--/VTP_comment-->
+     </td>
+    </tr>
+  </table>
+</div>
+<!--/VTP_picture-->
+<!--VTP_submit-->
+<div style="text-align:center;margin:10px;">
+  <input type="submit" name="submit" value="{#submit}" />
+</div>
+<!--/VTP_submit-->
+<!--VTP_end_form-->
+</form>
+<!--/VTP_end_form-->
+<!--/VTP_section-->
Index: /branches/1.3/template/default/admin/configuration.vtp
===================================================================
--- /branches/1.3/template/default/admin/configuration.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/configuration.vtp	(revision 3252)
@@ -0,0 +1,88 @@
+<!--VTP_errors-->
+<div class="errors">
+  <div class="errors_title">{#errors_title}</div>
+  <ul>
+    <!--VTP_li-->
+    <li>{#li}</li>
+    <!--/VTP_li-->
+  </ul>
+</div>
+<!--/VTP_errors-->
+<!--VTP_confirmation-->
+  <div class="info">{#conf_confirmation}</div>
+<!--/VTP_confirmation-->
+<form method="post" action="{#form_action}">
+  <table width="100%">
+    <!--VTP_line-->
+    <!--VTP_param_line-->
+    <tr>
+      <td>{#name}</td>
+      <td align="center">
+        <!--VTP_select-->
+        <select name="{#name}">
+          <!--VTP_option-->
+          <option{#selected}>{#option}</option>
+          <!--/VTP_option-->
+        </select>
+        <!--/VTP_select-->
+        <!--VTP_hidden-->
+        {#text}<input type="hidden" name="{#name}" value="{#value}" />
+        <!--/VTP_hidden-->
+        <!--VTP_text-->
+        <input type="text" name="{#name}" value="{#value}" />
+        <!--/VTP_text-->
+        <!--VTP_group-->
+          <!--VTP_radio-->
+          <input type="radio" name="{#name}" value="{#value}"{#checked}/>{#option}
+          <!--/VTP_radio-->
+        <!--/VTP_group-->
+        <!--VTP_check-->
+          <!--VTP_box-->
+          <input type="checkbox" name="{#name}" value="{#value}"{#checked}/>{#option}
+          <!--/VTP_box-->
+        <!--/VTP_check-->
+      </td>
+      <td width="50%" class="row2">{#def}</td>
+    </tr>
+    <!--/VTP_param_line-->
+    <!--VTP_title_line-->
+    <tr>
+      <th colspan="3">{#title}</th>
+    </tr>
+    <!--/VTP_title_line-->
+    <!--VTP_space_line-->
+    <tr>
+      <td colspan="3"><div style="margin-bottom:0px">&nbsp;</div></td>
+    </tr>
+    <!--/VTP_space_line-->
+    <!--/VTP_line-->
+    <!--VTP_remote_sites-->
+    <tr>
+      <th colspan="3" align="center">{#remote_site}</th>
+    </tr>
+    <tr>
+      <td colspan=3><div style='margin-bottom:0px'>&nbsp;</div></td>
+    </tr>
+    <tr>
+      <td>&nbsp;</td>
+      <td align="center">{#delete}</td>
+      <td>&nbsp;</td>
+    </tr>
+    <!--VTP_site-->
+    <tr>
+      <td>{#url}</td>
+      <td align="center"><input type="checkbox" name="delete_site_{#id}" value="1" /></td>
+      <!--VTP_rowspan--><td class="row2" rowspan="{#nb_sites}">{#conf_remote_site_delete_info}</td><!--/VTP_rowspan-->
+    </tr>
+    <!--/VTP_site-->
+    <tr>
+      <td colspan=3><div style='margin-bottom:0px'>&nbsp;</div></td>
+    </tr>
+    <!--/VTP_remote_sites-->
+    <tr>
+      <td colspan="3" align="center">
+        <input type="submit" name="submit" value="{#submit}">
+      </td>
+    </tr>
+  </table>
+</form>
Index: /branches/1.3/template/default/admin/group_list.vtp
===================================================================
--- /branches/1.3/template/default/admin/group_list.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/group_list.vtp	(revision 3252)
@@ -0,0 +1,53 @@
+<!--VTP_errors-->
+<div class="errors">
+  <ul>
+    <!--VTP_li-->
+    <li>{#li}</li>
+    <!--/VTP_li-->
+  </ul>
+</div>
+<!--/VTP_errors-->
+
+<!--VTP_deletion-->
+<table style="width:100%;">
+  <tr>
+    <th colspan="2">{#group_confirm} "{#name}"</th>
+  </tr>
+  <tr>
+    <td align="center"><a href="{#yes_url}">{#yes}</a></td>
+    <td align="center" class="row2"><a href="{#no_url}">{#no}</a></td>
+  </tr>
+</table>
+<!--/VTP_deletion-->
+
+<!--VTP_confirmation-->
+<div class="{#class}">{#info}</div>
+<!--/VTP_confirmation-->
+
+<form method="post" action="{#form_action}">
+  <div style="text-align:center;margin:10px;">
+    {#group_add} <input type="text" name="name" />
+    <input type="submit" value="{#add}" name="submit" />
+  </div>
+</form>
+
+<!--VTP_groups-->
+<table width="100%">
+  <tr>
+    <th colspan="3">{#group_list_title}</th>
+  </tr>
+  <!--VTP_group-->
+  <tr>
+    <td style="width:25%;">
+      <div style="margin-left:10px;color:{#color}"><img src="../template/{#user_template}/admin/images/puce.gif" alt="&gt;" /> {#name}</div>
+    </td>
+    <td class="row2" style="text-align:center;width:25%;">
+      <a href="{#permission_url}">{#listuser_permission}</a>
+    </td>
+    <td class="row2" style="text-align:center;width:25%;">
+      <a href="{#deletion_url}">{#delete}</a>
+    </td>
+  </tr>
+  <!--/VTP_group-->
+</table>
+<!--/VTP_groups-->
Index: /branches/1.3/template/default/admin/group_perm.vtp
===================================================================
--- /branches/1.3/template/default/admin/group_perm.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/group_perm.vtp	(revision 3252)
@@ -0,0 +1,27 @@
+<!--VTP_confirmation-->
+<div class="info">{#permuser_info_message} [ <a href="{#back_url}">{#adduser_info_back}</a> ]</div>
+<!--/VTP_confirmation-->
+
+<div class="info">{#permuser_only_private}</div>
+
+<form action="{#action}" method="post">
+  <table style="width:100%;">
+    <!--VTP_category-->
+    <tr>
+      <td>
+        <img src="../template/{#user_template}/admin/images/puce.gif" alt="&gt;" /> <a href="{#cat_perm_link}"><span style="color:{#color}">{#name}</span></a>
+      </td>
+      <td style="text-align:right;">
+        <!--VTP_parent_forbidden-->
+        {#permuser_parent_forbidden}
+        <!--/VTP_parent_forbidden-->
+        <input type="radio" name="access-{#id}" value="0"{#authorized_checked}/>{#permuser_authorized}
+        <input type="radio" name="access-{#id}" value="1"{#forbidden_checked}/>{#permuser_forbidden}
+      </td>
+    </tr>
+    <!--/VTP_category-->
+    <tr>
+      <td colspan="2" align="center"><input type="submit" name="submit" value="{#submit}"/></td>
+    </tr>
+  </table>
+</form>
Index: /branches/1.3/template/default/admin/help.vtp
===================================================================
--- /branches/1.3/template/default/admin/help.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/help.vtp	(revision 3252)
@@ -0,0 +1,26 @@
+<table style="width:100%;">
+  <!--VTP_cat-->
+  <tr>
+    <th>{#name}</th>
+  </tr>
+  <tr>
+    <td>&nbsp;</td>
+  </tr>
+  <tr>
+    <td>
+      <!--VTP_illustration-->
+      <div style="text-align:center;margin:auto;margin-bottom:10px;"><img src="{#pic_src}" style="border:1px solid black;" alt="{#pic_alt}"/></div>
+      {#caption}
+      <!--/VTP_illustration-->
+      <ul style="margin-right:10px;">
+        <!--VTP_item-->
+        <li>{#content}</li>
+        <!--/VTP_item-->
+      </ul>
+    </td>
+  </tr>
+  <tr>
+    <td>&nbsp;</td>
+  </tr>
+  <!--/VTP_cat-->
+</table>
Index: /branches/1.3/template/default/admin/infos_image.vtp
===================================================================
--- /branches/1.3/template/default/admin/infos_image.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/infos_image.vtp	(revision 3252)
@@ -0,0 +1,106 @@
+<!--VTP_errors-->
+<div class="errors">
+  <div class="errors_title">{#errors_title}</div>
+  <ul>
+    <!--VTP_li-->
+    <li>{#content}</li>
+    <!--/VTP_li-->
+  </ul>
+</div>
+<!--/VTP_errors-->
+<form method="post" action="{#form_action}">
+  <table width="100%">
+    <tr>
+      <th colspan="3">{#infoimage_general} &quot;{#cat_name}&quot;</th>
+    </tr>
+    <tr>
+      <td><div style="margin-left:50px;">{#author}</div></td>
+      <td style="text-align:center;">
+        <input type="text" name="author_cat" value="" maxlength="255" />
+      </td>
+      <td style="text-align:left;">
+        <input type="checkbox" name="use_common_author" value="1" />
+        {#infoimage_useforall}
+      </td>
+    </tr>
+    <tr>
+      <td>
+        <div style="margin-left:50px;">{#infoimage_creation_date} [DD/MM/YYYY]</div>
+      </td>
+      <td style="text-align:center;">
+        <input type="text" name="date_creation_cat" value="" size="12" maxlength="10"/>
+      </td>
+      <td style="text-align:left;">
+        <input type="checkbox" name="use_common_date_creation" value="1" />
+        {#infoimage_useforall}
+      </td>
+    </tr>
+    <tr>
+      <td>
+        <div style="margin-left:50px;">{#keywords} {#infoimage_keyword_separation}</div>
+      </td>
+      <td style="text-align:center;">
+        <input type="text" name="keywords_cat" value="" maxlength="255" />
+      </td>
+      <td style="text-align:left;">
+        <input type="radio" name="common_keywords" value="add" />
+        {#infoimage_addtoall}
+        <input type="radio" name="common_keywords" value="remove" />
+        {#infoimage_removefromall}
+      </td>
+    </tr>
+  </table>
+  <table width="100%">
+    <tr>
+      <th colspan="7">{#infoimage_detailed}</th>
+    </tr>
+    <tr>
+      <td colspan="7" align="center">{#navigation_bar}</td>
+    </tr>
+    <tr>
+      <td style="width:0px;">&nbsp;</td>
+      <td class="row2" style="text-align:center;">{#thumbnail}</td>
+      <td class="row2" style="text-align:center;">{#infoimage_title}</td>
+      <td class="row2" style="text-align:center;">{#author}</td>
+      <td class="row2" style="text-align:center;">{#infoimage_comment}</td>
+      <td class="row2" style="text-align:center;">{#infoimage_creation_date}</td>
+      <td class="row2" style="text-align:center;">{#keywords}</td>
+    </tr>
+    <!--VTP_picture-->
+    <tr>
+      <td style="width:0px;">
+        <div style="margin-left:2px;margin-right:2px;">
+          <input type="checkbox" name="check-{#id}" value="1" />
+        </div>
+      </td>
+      <td style="text-align:center;"><a name="{#link}" href="{#url}"><img src="{#thumbnail_url}" alt="" class="miniature" title="{#filename}" /></td>
+      <td style="text-align:center;">{#default_name}<br /><input type="text" name="name-{#id}" value="{#name}" maxlength="255"/></td>
+      <td style="text-align:center;"><input type="text" name="author-{#id}" value="{#author}" maxlength="255" size="12" /></td>
+      <td style="text-align:center;"><textarea name="comment-{#id}" rows="5" cols="30" style="overflow:auto">{#comment}</textarea></td>
+      <td style="text-align:center;"><input type="text" name="date_creation-{#id}" value="{#date_creation}" maxlength="10" size="10" /></td>
+      <td style="text-align:center;"><input type="text" name="keywords-{#id}" value="{#keywords}" length="255" /></td>
+    </tr>
+    <!--/VTP_picture-->
+    <tr>
+      <td colspan="6">
+        <img src="../template/{#user_template}/admin/images/arrow_select.gif" alt="&lt;" />
+        {#infoimage_associate}
+        <!--VTP_associate_LOV-->
+        <select name="associate">
+          <!--VTP_associate_cat-->
+          <option value="{#value}">{#content}</option>
+          <!--/VTP_associate_cat-->
+        </select>
+        <!--/VTP_associate_LOV-->
+        <!--VTP_associate_text-->
+        <input type="text" name="associate" />
+        <!--/VTP_associate_text-->
+      </td>
+    </tr>
+    <tr>
+      <td colspan="6" style="text-align:center;">
+        <input type="submit" value="{#submit}" name="submit" />
+      </td>
+    </tr>
+  </table>
+</form>
Index: /branches/1.3/template/default/admin/install.vtp
===================================================================
--- /branches/1.3/template/default/admin/install.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/install.vtp	(revision 3252)
@@ -0,0 +1,254 @@
+<html>
+  <head>
+    <title>PhpWebGallery {#release}</title>
+    <style>
+      a {
+        text-decoration : none;
+        color : #006699;
+      }
+      a:hover {
+        text-decoration : underline;
+      }
+      body,table,input,form,select,textarea {
+        font-family : Arial, Verdana, Sans-Serif;
+        font-size : 12px;
+      }
+      .miniature {
+        border : solid 1px black;
+      }
+      body {
+        background-color :  #E5E5E5;
+      }
+      .titretable1 {
+        color : black;
+        background-color : #D3DCE3;
+        text-align : center;
+        border : 2px solid #006699;
+      }
+      .grostitre {
+        text-align : center;
+        font-size : 20px;
+        margin-bottom : 20px;
+      }
+      .plan {
+        margin : 10px 10px 10px 2px;
+        white-space : nowrap;
+      }
+      .table1 {
+        border-collapse:collapse;
+        background-color:#FFFFFF;
+        width:700px;
+        margin:auto;
+      }
+      .contenucellule {
+        background-color : #EEEEEE;
+        border : 2px solid #006699;
+      }
+      .style1 {
+        margin-top : 20px;
+      }
+      th {
+        font-weight : bold;
+        background-color : #D3DCE3;
+      }
+      td.row1 {
+        background-color : #DDDDDD;
+      }
+      td.row2 {
+        background-color : #E8E8E8;
+      }
+      .cat_plan {
+        font-weight : bold;
+      }
+      .retrait {
+        margin : 10px;
+        margin-left : 30px;
+        margin-top : 2px;
+      }
+      input,textarea {
+        border-width : 1;
+        border-color : #000000;
+        background : #ffffff;
+        color: #000000;
+      }
+      .errors,.infos {
+        margin:10px;
+      }
+      .errors {
+        border:1px solid red;
+        background-color:#ffe1e1;
+      }
+      .infos {
+        background-color:#eff4fa;
+        border:1px solid #9cb4ce;
+      }
+      .errors_title,.infos_title {
+        margin:5px;
+        font-weight:bold;
+        font-size:120%;
+        text-align:center;
+      }
+      .errors_title {
+        color:red;
+      }
+      .infos_title {
+        color:#9cb4ce;
+      }
+    </style>
+  </head>
+  <body>
+    <table style="width:100%;height:100%">
+      <tr align="center" valign="middle">
+        <td>
+	  <div class="grostitre">PhpWebGallery {#release}</div>
+          <table class="table1">
+            <tr>
+              <td class="contenucellule">
+<!--VTP_errors-->
+<div class="errors">
+  <div class="errors_title">{#errors_title}</div>
+  <ul>
+    <!--VTP_error-->
+    <li>{#content}</li>
+    <!--/VTP_error-->
+  </ul>
+</div>
+<!--/VTP_errors-->
+
+<!--VTP_infos-->
+<div class="infos">
+  <div class="infos_title">{#infos_title}</div>
+  <ul>
+    <!--VTP_info-->
+    <li>{#content}</li>
+    <!--/VTP_info-->
+  </ul>
+</div>
+<!--/VTP_infos-->
+
+<!--VTP_error_copy-->
+{#step1_err_copy} :
+<br />-----------------------------------------------------<br />
+<div style="color:blue;">{#file_content}</div>
+-----------------------------------------------------<br />
+<div style="text-align:center;">{#step1_err_copy_2}<br />
+<a href="./install.php?step=2&amp;language={#language}">{#step1_err_copy_next}</a></div>
+<!--/VTP_error_copy-->
+
+<!--VTP_step0-->
+<form method="get" action="install.php">
+  <input type="hidden" name="step" value="1" />
+  <table width="100%">
+    <tr>
+      <td align="center">
+        <select name="language">
+          <!--VTP_language-->
+          <option>{#name}</option>
+          <!--/VTP_language-->
+        </select>
+        <input name="submit" type="submit" value="Submit" />
+      </td>
+    </tr>
+  </table>
+</form>
+<!--/VTP_step0-->
+
+<!--VTP_step1-->
+<form method="post" action="install.php?step=1&amp;language={#language}">
+  <table width="100%">
+    <tr>
+      <th colspan="3">{#step1_title}</th>
+    </tr>
+    <tr>
+      <td colspan="3">&nbsp;</td>
+    </tr>
+    <tr>
+      <td>{#step1_host}</td>
+      <td align=center><input type="text" name="cfgHote" value="{#f_host}" /></td>
+      <td class="row2">{#step1_host_info}</td>
+    </tr>
+    <tr>
+      <td>{#step1_user}</td>
+      <td align=center><input type="text" name="cfgUser" value="{#f_user}" /></td>
+      <td class="row2">{#step1_user_info}</td>
+    </tr>
+    <tr>
+      <td>{#step1_pass}</td>
+      <td align=center><input type="password" name="cfgPassword" value="" /></td>
+      <td class="row2">{#step1_pass_info}</td>
+    </tr>
+    <tr>
+      <td>{#step1_database}</td>
+      <td align=center><input type="text" name="cfgBase" value="{#f_base}" /></td>
+      <td class="row2">{#step1_database_info}</td>
+    </tr>
+    <tr>
+      <td>{#step1_prefix}</td>
+      <td align=center><input type="text" name="prefixeTable" value="{#f_prefixeTable}" /></td>
+      <td class="row2">{#step1_prefix_info}</td>
+    </tr>
+    <tr>
+     <td colspan="3">&nbsp;</td>
+    </tr>
+    <tr>
+      <td colspan="3" align="center"><input type="submit" name="submit" value="{#submit}" /></td>
+    </tr>
+  </table>
+</form>
+<!--/VTP_step1-->
+
+<!--VTP_step2-->
+<form method="post" action="install.php?step=2&amp;language={#language}">
+  <table width=100%>
+    <tr>
+      <th colspan="3">{#step2_title}</th>
+    </tr>
+    <tr>
+      <td colspan="3">&nbsp;</td>
+    </tr>
+    <tr>
+      <td>{#conf_general_webmaster}</td>
+      <td align="center"><input type="text" name="webmaster" value="{#f_webmaster}" /></td>
+      <td class="row2">{#conf_general_webmaster_info}</td>
+    </tr>
+    <tr>
+      <td>{#step2_pwd}</td>
+      <td align="center"><input type="password" name="pwdWebmaster" value="" /></td>
+      <td class="row2">{#step2_pwd_info}</td>
+    </tr>
+    <tr>
+      <td>{#step2_pwd_conf}</td>
+      <td align="center"><input type="password" name="pwdWebmasterConf" value="" /></td>
+      <td class="row2">{#step2_pwd_conf_info}</td>
+    </tr>
+    <tr>
+      <td>{#conf_general_mail}</td>
+      <td align="center"><input type="text" name="mail_webmaster" value="{#f_mail_webmaster}" /></td>
+      <td class="row2">{#conf_general_mail_info}</td>
+    </tr>
+    <tr>
+      <td colspan="3">&nbsp;</th>
+    </tr>
+    <tr>
+      <td colspan="3" align="center">
+        <input type="submit" name="submit" value="{#submit}" />
+      </td>
+    </tr>
+  </table>
+</form>
+<!--/VTP_step2-->
+
+<!--VTP_install_end-->
+<div class="infos_title">{#install_end_title}</div>
+<div style="padding:5px;">{#install_end_message}</div>
+<!--/VTP_install_end-->
+
+              </td>
+            </tr>
+          </table>
+          <div style="text-align:center;margin:20px;">{#install_help}</div>
+        </td>
+      </tr>
+    </table>
+  </body>
+</html>
Index: /branches/1.3/template/default/admin/picture_modify.vtp
===================================================================
--- /branches/1.3/template/default/admin/picture_modify.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/picture_modify.vtp	(revision 3252)
@@ -0,0 +1,107 @@
+<!--VTP_errors-->
+<div class="errors">
+  <div class="errors_title">{#errors_title}</div>
+  <ul>
+    <!--VTP_li-->
+    <li>{#content}</li>
+    <!--/VTP_li-->
+  </ul>
+</div>
+<!--/VTP_errors-->
+<!--VTP_confirmation-->
+<div class="info">
+  {#picmod_update} [ <a href="{#url}">{#picmod_back}</a> ]
+</div>
+<!--/VTP_confirmation-->
+<form method="post" action="{#form_action}">
+  <table style="width:100%;">
+    <tr><th colspan="2">{#title} [ {#dir} &gt; {#f_file} ]</th></tr>
+    <tr>
+      <td colspan="2"><div style="margin-bottom:0px">&nbsp;</div></td>
+    </tr>
+    <tr valign="top">
+      <td style="width:1px;"><img src="{#thumbnail_url}" alt="" class="miniature" /></td>
+      <td>
+        <table>
+          <tr>
+            <td>{#upload_name} :</td>
+            <td><input type="text" name="name" value="{#f_name}" /> [ {#default} : {#default_name} ]</td>
+          </tr>
+          <tr>
+            <td>{#file} :</td>
+            <td>{#f_file}</td>
+          </tr>
+          <tr>
+            <td>{#size} :</td>
+            <td>{#f_size}</td>
+          </tr>
+          <tr>
+            <td>{#filesize} :</td>
+            <td>{#f_filesize}</td>
+          </tr>
+          <tr>
+            <td>{#registration_date} :</td>
+            <td>{#f_registration_date}</td>
+          </tr>
+          <tr>
+            <td>{#author} :</td>
+            <td><input type="text" name="author" value="{#f_author}" /></td>
+          </tr>
+          <tr>
+            <td>{#creation_date} :</td>
+            <td><input type="text" name="creation_date" value="{#f_creation_date}" /></td>
+          </tr>
+          <tr>
+            <td>{#keywords} :</td>
+            <td><input type="text" name="keywords" value="{#f_keywords}" size="50" /></td>
+          </tr>
+          <tr>
+            <td>{#comment} :</td>
+            <td><textarea name="comment" rows="5" cols="50" style="overflow:auto">{#f_comment}</textarea></td>
+          </tr>
+          <tr>
+            <td valign="top">{#categories} :</td>
+            <td>
+              <table>
+                <!--VTP_linked_category-->
+                <tr>
+                  <td><!--VTP_checkbox--><input type="checkbox" name="dissociate-{#id}" value="1" /><!--/VTP_checkbox--><a href="{#url}">{#name}</a> [ <a href="{#infos_images_link}">{#cat_image_info}</a> ] {#private} {#invisible} [ <input type="checkbox" name="representative-{#id}" value="1"{#representative_checked} /> {#category_representative} ]
+                </tr>
+                <!--/VTP_linked_category-->
+                <!--VTP_dissociate-->
+                <tr>
+                  <td colspan="2"><img src="../template/{#user_template}/admin/images/arrow_select.gif" alt="&lt;" /> {#dissociate}</td>
+                </tr>
+                <!--/VTP_dissociate-->
+                <tr><td colspan="2">&nbsp;</td></tr>
+                <tr>
+                  <td>{#infoimage_associate}
+                    <!--VTP_associate_LOV-->
+                    <select name="associate">
+                      <!--VTP_associate_cat-->
+                      <option value="{#value}">{#content}</option>
+                      <!--/VTP_associate_cat-->
+                    </select>
+                    <!--/VTP_associate_LOV-->
+                    <!--VTP_associate_text-->
+                    <input type="text" name="associate" />
+                    <!--/VTP_associate_text-->
+                    </select>
+                  </td>
+                </tr>
+              </table>
+            </td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+    <tr>
+      <td colspan="2"><div style="margin-bottom:0px">&nbsp;</div></td>
+    </tr>
+    <tr>
+      <td colspan="2" align="center">
+        <input type="submit" name="submit" value="{#submit}">
+      </td>
+    </tr>
+  </table>
+</form>
Index: /branches/1.3/template/default/admin/stats.vtp
===================================================================
--- /branches/1.3/template/default/admin/stats.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/stats.vtp	(revision 3252)
@@ -0,0 +1,83 @@
+<div style="text-align:center;margin-top:5px;">
+  <!--VTP_last_day_option-->
+  <a href="{#link}" style="{#style}">{#option}</a>{#separation}
+  <!--/VTP_last_day_option-->
+  {#stats_last_days}
+</div>
+
+<table width="100%">
+  <tr>
+    <th width="1%">{#date}</th>
+    <th>{#login}</th>
+    <th>{#IP}</th>
+    <th>{#file}</th>
+    <th>{#category}</th>
+    <th>{#picture}</th>
+  </tr>
+  <tr>
+    <td colspan="6" style="text-align:center;"><a href="{#emply_url}">{#stats_empty}</a></td>
+  </tr>
+  <!--VTP_day-->
+  <tr>
+    <td colspan="6">
+      <a href="{#url}"><!--VTP_collapsed--><img src="../template/{#user_template}/admin/images/collapsed.gif" style="border:none;" /><!--/VTP_collapsed--><!--VTP_expanded--><img src="../template/{#user_template}/admin/images/expanded.gif" style="border:none;" /><!--/VTP_expanded--></a>
+      <span style="font-weight:bold;">{#name}</span> [ {#nb_pages} {#stats_pages_seen} - {#nb_visitors} {#stats_visitors} ]
+      [ <a href="{#url}">{#open_or_close}</a> ]
+    </td>
+  </tr>
+  <!--VTP_line-->
+  <tr>
+    <td>{#date}</td>
+    <td style="text-align:center;">{#login}</td>
+    <td>{#IP}</td>
+    <td>{#file}</td>
+    <td>{#category}</td>
+    <td>{#picture}</td>
+  </tr>
+  <!--/VTP_line-->
+  <!--/VTP_day-->
+</table>
+
+<!-- Graph with the number of pages seen per day -->
+<table style="margin:auto;margin-top:10px;margin-bottom:10px;border:1px solid black;">
+<tr>
+  <td colspan="3" style="text-align:center;font-weight:bold">{#stats_pages_seen_graph_title}</td>
+</tr>
+<!--VTP_pages_day-->
+<tr>
+  <td>{#date}</td>
+  <td>
+    <table style="border-collapse:collapse;">
+      <tr>
+        <td style="padding:0;"><img src="../template/{#user_template}/admin/images/stat_left.gif" width="4" height="12" /></td>
+        <td style="padding:0;"><img src="../template/{#user_template}/admin/images/stat_middle.gif" width="{#width}" height="12" /></td>
+        <td style="padding:0;"><img src="../template/{#user_template}/admin/images/stat_right.gif" width="4" height="12" /></td>
+      </tr>
+    </table>
+  </td>
+  <td align="center">[ {#nb_pages} ]</td>
+</tr>
+<!--/VTP_pages_day-->
+</table>
+
+<!-- Graph with the number of visitors per day -->
+<table style="margin:auto;margin-top:10px;margin-bottom:10px;border:1px solid black;">
+<tr>
+  <td colspan="3" style="text-align:center;font-weight:bold">{#stats_visitors_graph_title}</td>
+</tr>
+<!--VTP_visitors_day-->
+<tr>
+  <td>{#date}</td>
+  <td>
+    <table style="border-collapse:collapse;">
+      <tr>
+        <td style="padding:0;"><img src="../template/{#user_template}/admin/images/stat_left.gif" width="4" height="12" /></td>
+        <td style="padding:0;"><img src="../template/{#user_template}/admin/images/stat_middle.gif" width="{#width}" height="12" /></td>
+        <td style="padding:0;"><img src="../template/{#user_template}/admin/images/stat_right.gif" width="4" height="12" /></td>
+      </tr>
+    </table>
+  </td>
+  <td align="center">[ {#nb_visitors} ]</td>
+</tr>
+<!--/VTP_visitors_day-->
+</table>
Index: /branches/1.3/template/default/admin/thumbnail.vtp
===================================================================
--- /branches/1.3/template/default/admin/thumbnail.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/thumbnail.vtp	(revision 3252)
@@ -0,0 +1,188 @@
+<!--VTP_directory_list-->
+<table style="width:100%;">
+  <tr>
+    <th>{#tn_dirs_title}</th>
+  </tr>
+  <tr>
+    <td>
+      <div style="text-indent:30px;">
+        <img src="../template/{#user_template}/admin/images/puce.gif" alt="&gt;" style="border:none;" />
+        galleries
+      </div>
+      <!--VTP_dir-->
+      <div style="text-indent:{#indent}px;">
+        <img src="../template/{#user_template}/admin/images/puce.gif" alt="&gt;" style="border:none;" />
+        <!--VTP_linked-->
+        <a href="{#url}">{#name}</a> [ {#nb_pic} {#tn_dirs_alone} ]
+        <!--/VTP_linked-->
+        <!--VTP_unlinked-->
+        {#name}
+        <!--/VTP_unlinked-->
+      </div>
+      <!--/VTP_dir-->
+    </td>
+  </tr>
+</table>
+<!--/VTP_directory_list-->
+
+<!--VTP_warning-->
+<div style="text-align:center;font-weight:bold;margin:10px;"> [ 0 {#tn_dirs_alone} ]</div>
+<!--/VTP_warning-->
+
+<!--VTP_errors-->
+<div class="errors">
+  <ul>
+    <!--VTP_li-->
+    <li>{#li}</li>
+    <!--/VTP_li-->
+  </ul>
+</div>
+<!--/VTP_errors-->
+
+<!--VTP_results-->
+<table style="width:100%;">
+  <tr>
+    <th colspan="10">{#tn_results_title}</th>
+  </tr>
+  <tr>
+    <td class="throw2">&nbsp;</td>
+    <td class="throw2">{#tn_picture}</td>
+    <td class="throw2">{#filesize}</td>
+    <td class="throw2">{#tn_width}</td>
+    <td class="throw2">{#tn_height}</td>
+    <th>{#tn_results_gen_time}</th>
+    <td class="throw2">{#thumbnail}</td>
+    <td class="throw2">{#filesize}</td>
+    <td class="throw2">{#tn_width}</td>
+    <td class="throw2">{#tn_height}</td>
+  </tr>
+  <!--VTP_picture-->
+  <tr>
+    <td class="row2">{#num}</td>
+    <td class="{#class}">{#file}</td>
+    <td class="{#class}" style="text-align:right;">{#filesize}</td>
+    <td class="{#class}" style="text-align:right;">{#width}</td>
+    <td class="{#class}" style="text-align:right;">{#height}</td>
+    <th>
+      <div style="text-align:right;margin-right:5px;color:{#color};">{#time}</div>
+    </th>
+    <td class="{#class}">{#thumb_file}</td>
+    <td class="{#class}" style="text-align:right;">{#thumb_filesize}</td>
+    <td class="{#class}" style="text-align:right;">{#thumb_width}</td>
+    <td class="{#class}" style="text-align:right;">{#thumb_height}</td>
+  </tr>
+  <!--/VTP_picture-->
+  <tr>
+    <td colspan="10">&nbsp;</td>
+  </tr>
+</table>
+<table style="margin:auto;border:1px solid black;">
+  <tr>
+    <td colspan="2" style="text-align:center;font-weight:bold;" class="row2">{#tn_stats}</td>
+  </tr>
+  <tr>
+    <td>{#tn_stats_nb}</td>
+    <td style="text-align:center;">{#stats_nb}</td>
+  </tr>
+  <tr>
+    <td>{#tn_stats_total}</td>
+    <td style="text-align:right;">{#stats_total}</td>
+  </tr>
+  <tr>
+    <td>{#tn_stats_max}</td>
+    <td style="text-align:right;color:red;">{#stats_max}</td>
+  </tr>
+  <tr>
+    <td>{#tn_stats_min}</td>
+    <td style="text-align:right;color:green;">{#stats_min}</td>
+  </tr>
+  <tr>
+    <td>{#tn_stats_mean}</td>
+    <td style="text-align:right;">{#stats_mean}</td>
+  </tr>
+</table>
+<table>
+  <tr>
+    <td>&nbsp;</td>
+  </tr>
+</table>
+<!--/VTP_results-->
+
+<!--VTP_params-->
+<form method="post" action="{#action}">
+  <table style="width:100%;">
+    <tr>
+      <th colspan="3">{#tn_params_title}</th>
+    </tr>
+    <tr><td colspan="3">&nbsp;</td></tr>
+    <tr>
+      <td><div class="key">{#tn_params_GD}</div></td>
+      <td class="choice">
+        <input type="radio" name="gd" value="2"{#gd2_checked} />2.x
+        <input type="radio" name="gd" value="1"{#gd1_checked} />1.x
+      </td>
+      <td style="width:50%;" class="row2">{#tn_params_GD_info}</td>
+    </tr>
+    <tr>
+      <td><div class="key">{#tn_width}</div></td>
+      <td class="choice">
+        <input type="text" name="width" value="{#width_value}"/>
+      </td>
+      <td class="row2">{#tn_params_width_info}</td>
+    </tr>
+    <tr>
+      <td><div class="key">{#tn_height}</div></td>
+      <td class="choice">
+        <input type="text" name="height" value="{#height_value}"/>
+      </td>
+      <td class="row2">{#tn_params_height_info}</td>
+    </tr>
+    <tr>
+      <td><div class="key">{#tn_params_create}</div></td>
+      <td class="choice">
+        <select name="n">
+          <!--VTP_n_option-->
+          <option{#selected}>{#option}</option>
+          <!--/VTP_n_option-->
+        </select>
+      </td>
+      <td class="row2">{#tn_params_create_info}</td>
+    </tr>
+    <tr>
+      <td><div class="key">{#tn_params_format}</div></td>
+      <td class="choice"><span style="font-weight:bold;">jpeg</span></td>
+      <td class="row2">{#tn_params_format_info}</td>
+    </tr>
+    <tr><td colspan="3">&nbsp;</td></tr>
+    <tr>
+      <td colspan="3" style="text-align:center;">
+        <input type="submit" name="submit" value="{#submit}"/>
+      </td>
+    </tr>
+  </table>
+</form>
+<!--/VTP_params-->
+
+<!--VTP_remainings-->
+<table style="width:100%;">
+  <tr>
+    <th colspan="5"><span style="color:#006699;">{#total}</span> {#tn_alone_title}</th>
+  </tr>
+  <tr>
+    <td class="throw2">&nbsp;</td>
+    <td class="throw2" style="width:50%;">{#tn_picture}</td>
+    <td class="throw2" style="width:17%;">{#filesize}</td>
+    <td class="throw2" style="width:17%;">{#tn_width}</td>
+    <td class="throw2" style="width:16%;">{#tn_height}</td>
+  </tr>
+  <!--VTP_remaining-->
+  <tr>
+    <td class="row2">{#num}</td>
+    <td class="{#class}"><div style="margin-left:10px;">{#file}</div></td>
+    <td class="{#class}"><div style="margin-left:10px;">{#filesize}</div></td>
+    <td class="{#class}"><div style="margin-left:10px;">{#width}</div></td>
+    <td class="{#class}"><div style="margin-left:10px;">{#height}</div></td>
+  </tr>
+  <!--/VTP_remaining-->
+</table>
+<!--/VTP_remainings-->
Index: /branches/1.3/template/default/admin/update.vtp
===================================================================
--- /branches/1.3/template/default/admin/update.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/update.vtp	(revision 3252)
@@ -0,0 +1,49 @@
+<table style="width:100%;">
+  <!--VTP_introduction-->
+  <tr>
+    <th>{#update_default_title}</th>
+  </tr>
+  <tr>
+    <td>
+      <div class="retrait">
+        <img src="../template/{#user_template}/admin/images/puce.gif" alt="&gt;" />
+        <a href="{#only_cat:url}">{#update_only_cat}</a>
+        <br /><img src="../template/{#user_template}/admin/images/puce.gif" alt="&gt;" />
+        <a href="{#all:url}">{#update_all}</a>
+      </div>
+    </td>
+  </tr>
+  <!--/VTP_introduction-->
+  <!--VTP_local_update-->
+  <tr>
+    <th>{#update_part_research}</th>
+  </tr>
+  <tr>
+    <td>
+      <div class="retrait">
+        <span style="font-weight:bold;color:navy;">{#url}</span><br /><br />
+        <!-- update.php generates itself HTML code for categories -->
+        {#categories}
+        <br /><span style="color:blue;">{#count_new} {#update_research_conclusion}</span>
+        <br /><span style="color:red;">{#count_deleted} {#update_deletion_conclusion}</span>
+      </div>
+    </td>
+  </tr>
+  <!--/VTP_local_update-->
+  <!--VTP_remote_update-->
+  <tr>
+    <th>{#remote_site}</th>
+  </tr>
+  <tr>
+    <td>
+      <div class="retrait">
+        <span style="font-weight:bold;color:navy;">{#url}</span><br /><br />
+        <!-- update.php generates itself HTML code for categories -->
+        {#categories}
+        <br /><span style="color:blue;">{#count_new} {#update_research_conclusion}</span>
+        <br /><span style="color:red;">{#count_deleted} {#update_deletion_conclusion}</span>
+      </div>
+    </td>
+  </tr>
+  <!--/VTP_remote_update-->
+</table>
Index: /branches/1.3/template/default/admin/user_list.vtp
===================================================================
--- /branches/1.3/template/default/admin/user_list.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/user_list.vtp	(revision 3252)
@@ -0,0 +1,101 @@
+<!--VTP_deletion-->
+<table style="width:100%;">
+  <tr>
+    <th colspan="2">{#listuser_confirm} "{#login}" ?</th>
+  </tr>
+  <tr>
+    <td align="center"><a href="{#yes_url}">{#yes}</a></td>
+    <td align="center" class="row2"><a href="{#no_url}">{#no}</a></td>
+  </tr>
+</table>
+<!--/VTP_deletion-->
+
+<!--VTP_confirmation-->
+<div class="{#class}">{#info}</div>
+<!--/VTP_confirmation-->
+
+<!--VTP_errors-->
+<div class="errors">
+  <div class="errors_title">{#errors_title}</div>
+  <ul>
+    <!--VTP_li-->
+    <li>{#li}</li>
+    <!--/VTP_li-->
+  </ul>
+</div>
+<!--/VTP_errors-->
+
+<!--VTP_add_user-->
+<form method="post" action="{#form_action}">
+  <div style="text-align:center;margin:10px;">
+    <span style="font-weight:bold;">{#title_add}</span> -&gt;
+    {#login} : <input type="text" name="username" value="{#f_username}" />
+    {#password} : <input type="text" name="password" value="{#f_password}" />
+    <input type="submit" value="{#add}" name="submit_add_user" />
+  </div>
+</form>
+<!--/VTP_add_user-->
+
+<!--VTP_users-->
+<form method="post" action="{#form_action}">
+<table width="100%">
+  <!--VTP_category-->
+  <tr>
+    <th colspan="5">{#title}</th>
+  </tr>
+  <!--VTP_user-->
+  <tr>
+    <td style="width:0px;">
+      <div style="margin-left:2px;margin-right:2px;">
+      <!--VTP_checkbox-->
+        <input type="checkbox" name="{#name}" value="1" />
+      <!--/VTP_checkbox-->
+      </div>
+    </td>
+    <td style="width:25%;">
+      <div style="margin-left:10px;color:{#color}">{#login}</div>
+    </td>
+    <td class="row2" style="text-align:center;width:25%;">
+      <!--VTP_modify-->
+      <a href="{#url}" title="{#listuser_modify_hint} {#login}">{#listuser_modify}</a>
+      <!--/VTP_modify-->
+      <!--VTP_not_modify-->
+      <span style="color:darkgray;">{#listuser_modify}</span>
+      <!--/VTP_not_modify-->
+    </td>
+    <td class="row2" style="text-align:center;width:25%;">
+      <!--VTP_permission-->
+      <a href="{#url}" title="{#listuser_permission_hint} {#login}">{#listuser_permission}</a>
+      <!--/VTP_permission-->
+      <!--VTP_not_permission-->
+      <span style="color:darkgray;">{#listuser_permission}</span>
+      <!--/VTP_not_permission-->
+    </td>
+    <td class="row2" style="text-align:center;width:25%;">
+      <!--VTP_delete-->
+      <a href="{#url}" title="{#listuser_delete_hint} {#login}">{#listuser_delete}</a>
+      <!--/VTP_delete-->
+      <!--VTP_not_delete-->
+      <span style="color:darkgray;">{#listuser_delete}</span>
+      <!--/VTP_not_delete-->
+    </td>
+  </tr>
+  <!--/VTP_user-->
+  <!--/VTP_category-->
+  <tr>
+    <td colspan="5">&nbsp;</td>
+  </tr>
+  <tr>
+    <td colspan="5">
+      <img src="../template/{#user_template}/admin/images/arrow_select.gif" alt="&lt;" />
+      <input type="button" value="{#listuser_button_all}" onClick="SelectAll(this.form)" style="margin-left:5px;margin-right:5px;" />
+      <input type="button" value="{#listuser_button_invert}" onClick="Inverser(this.form)" style="margin-left:5px;margin-right:5px;" />
+      <input type="submit" value="{#listuser_button_create_address}" name="submit_generate_mail" style="margin-left:5px;margin-right:5px;" />
+      <!--VTP_mail_link-->
+      <a href="mailto:{#mailto}">mailto:{#mail_address_start}...</a>
+      <!--/VTP_mail_link-->
+    </td>
+  </tr>
+</table>
+</form>
+<!--/VTP_users-->
Index: /branches/1.3/template/default/admin/user_modify.vtp
===================================================================
--- /branches/1.3/template/default/admin/user_modify.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/user_modify.vtp	(revision 3252)
@@ -0,0 +1,95 @@
+<!--VTP_errors-->
+<div class="errors">
+  <ul>
+    <!--VTP_li-->
+    <li>{#li}</li>
+    <!--/VTP_li-->
+  </ul>
+</div>
+<!--/VTP_errors-->
+<!--VTP_confirmation-->
+<div class="info">
+  {#adduser_info_message} "{#username}"
+  <!--VTP_password_updated-->
+  {#adduser_info_password_updated}
+  <!--/VTP_password_updated-->
+  [ <a href="{#url}">{#adduser_info_back}</a> ]
+</div>
+<!--/VTP_confirmation-->
+<!--VTP_form-->
+<form method="post" action="{#form_action}">
+  <table style="width:100%;">
+    <tr align="center" valign="middle">
+      <td>
+        <table style="margin-left:auto;margin-right:auto;">
+          <tr>
+            <th colspan="2">{#adduser_fill_form}</th>
+          </tr>
+          <tr>
+            <td colspan="2"><div style="margin-bottom:0px;">&nbsp;</div></td>
+          </tr>
+          <tr>
+            <td>{#login}</td>
+            <td style="color:red;text-align:center;">{#user:username}</td>
+          </tr>
+          <tr>
+            <td>{#new} {#password}<input type="checkbox" name="use_new_pwd" value="1" /></td>
+            <td><input type="text" name="password" value="" /></td>
+          </tr>
+          <tr>
+            <td>{#mail_address}</td>
+            <td><input type="text" name="mail_address" value="{#user:mail_address}" /></td>
+          </tr>
+
+          <!--VTP_status-->
+          <tr>
+            <td>{#adduser_status}</td>
+            <td>
+              <select name="status">
+                <!--VTP_status_option-->
+                <option value="{#value}"{#selected}>{#option}</option>
+                <!--/VTP_status_option-->
+              </select>
+            </td>
+          </tr>
+          <!--/VTP_status-->
+
+          <!--VTP_groups-->
+          <tr>
+            <td valign="top">{#menu_groups}</td>
+            <td>
+              <table>
+                <!--VTP_group-->
+                <tr>
+                  <td>{#name}</td>
+                  <td><input type="checkbox" name="dissociate-{#dissociate_id}" value="1" /> {#dissociate}</td>
+                </tr>
+                <!--/VTP_group-->
+              </table>
+            </td>
+          </tr>
+          <!--/VTP_groups-->
+          <tr>
+            <td>{#adduser_associate}</td>
+            <td>
+              <select name="associate">
+                <!--VTP_associate_group-->
+                <option value="{#value}">{#option}</option>
+                <!--/VTP_associate_group-->
+              </select>
+            </td>
+          </tr>
+          <tr>
+            <td colspan="2" align="center">
+              <input type="submit" name="submit" value="{#submit}" />
+            </td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+  </table>
+</form>
+<div class="info">
+  [ <a href="{#url_back}">{#adduser_info_back}</a> ]
+</div>
+<!--/VTP_form-->
Index: /branches/1.3/template/default/admin/user_perm.vtp
===================================================================
--- /branches/1.3/template/default/admin/user_perm.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/user_perm.vtp	(revision 3252)
@@ -0,0 +1,34 @@
+<!--VTP_confirmation-->
+<div class="info">{#permuser_info_message} [ <a href="{#back_url}">{#adduser_info_back}</a> ]</div>
+<!--/VTP_confirmation-->
+
+<div class="info">{#permuser_only_private}</div>
+
+<form action="{#action}" method="post">
+  <table style="width:100%;">
+    <!--VTP_category-->
+    <tr>
+      <td>
+        <img src="../template/{#user_template}/admin/images/puce.gif" alt="&gt;" /> <a href="{#cat_perm_link}"><span style="color:{#color}">{#name}</span></a>
+        <!--VTP_usergroups-->
+        [
+        <!--VTP_usergroup-->
+        <a href="{#url}" style="color:{#color};">{#name}</a>{#separation}
+        <!--/VTP_usergroup-->
+        ]
+        <!--/VTP_usergroups-->
+      </td>
+      <td style="text-align:right;">
+        <!--VTP_parent_forbidden-->
+        {#permuser_parent_forbidden}
+        <!--/VTP_parent_forbidden-->
+        <input type="radio" name="access-{#id}" value="0"{#authorized_checked}/>{#permuser_authorized}
+        <input type="radio" name="access-{#id}" value="1"{#forbidden_checked}/>{#permuser_forbidden}
+      </td>
+    </tr>
+    <!--/VTP_category-->
+    <tr>
+      <td colspan="2" align="center"><input type="submit" name="submit" value="{#submit}"/></td>
+    </tr>
+  </table>
+</form>
Index: /branches/1.3/template/default/admin/waiting.vtp
===================================================================
--- /branches/1.3/template/default/admin/waiting.vtp	(revision 3252)
+++ /branches/1.3/template/default/admin/waiting.vtp	(revision 3252)
@@ -0,0 +1,42 @@
+<form action="{#action}" method="post">
+  <!--VTP_confirmation-->
+  <div class="info">{#waiting_update}</div>
+  <!--/VTP_confirmation-->
+  <table style="width:100%;">
+    <tr>
+      <th style="width:20%;">{#category}</th>
+      <th style="width:20%;">{#date}</th>
+      <th style="width:20%;">{#file}</th>
+      <th style="width:20%;">{#thumbnail}</th>
+      <th style="width:20%;">{#author}</th>
+      <th style="width:1px;">&nbsp;</th>
+    </tr>
+    <!--VTP_picture-->
+    <tr>
+      <td class="{#class}" style="white-space:nowrap;">{#cat_name}</td>
+      <td class="{#class}" style="white-space:nowrap;">{#date}</td>
+      <td class="{#class}" style="white-space:nowrap;">
+        <a target="_blank" href="{#preview_url}">{#file}</a>
+      </td>
+      <td class="{#class}" style="white-space:nowrap;">
+        <!--VTP_thumbnail-->
+        <a target="_blank" href="{#preview_url}">{#file}</a>
+        <!--/VTP_thumbnail-->
+        <!--VTP_no_thumbnail-->
+        &nbsp;
+        <!--/VTP_no_thumbnail-->
+      </td>
+      <td class="{#class}" style="white-space:nowrap;">
+        <a href="mailto:{#mail_address}">{#username}</a>
+      </td>
+      <td class="{#class}" style="white-space:nowrap;">
+        <input type="radio" name="validate-{#id}" value="true" />{#submit}
+        <input type="radio" name="validate-{#id}" value="false" />{#delete}
+      </td>
+    </tr>
+    <!--/VTP_picture-->
+    <tr>
+      <td colspan="5" align="center"><input type="submit" name="submit" value="{#submit}" style="margin:5px;" /></td>
+    </tr>
+  </table>
+</form>
Index: /branches/1.3/template/default/category.vtp
===================================================================
--- /branches/1.3/template/default/category.vtp	(revision 3252)
+++ /branches/1.3/template/default/category.vtp	(revision 3252)
@@ -0,0 +1,98 @@
+    <table style="width:100%;">
+      <tr>
+        <td valign="top" style="width:1%;padding:10px;">
+          {#frame_start}100%{#frame_begin}
+            <div class="titreMenu">
+              <a href="{#home_url}">{#categories}</a>
+            </div>
+            <div class="menu">
+              <!--VTP_category-->{#indent}<!--VTP_bullet_w_link--><a href="{#bullet_link}"><img src="{#bullet_url}" style="border:none;" alt="&gt;" /></a><!--/VTP_bullet_w_link--><!--VTP_bullet_wo_link--><img src="{#bullet_url}" style="border:none;" alt="&gt;" /><!--/VTP_bullet_wo_link-->&nbsp;<a href="{#link_url}"><span title="{#hint_category}" style="{#name_style}">{#link_name}</span>&nbsp;<span class="menuInfoCat">[&nbsp;<!--VTP_subcat--><span title="{#nb_subcats} {#sub-cat}">{#nb_subcats}</span>&nbsp;-&nbsp;<!--/VTP_subcat--><span title="{#total_cat} {#images_available}">{#total_cat}</span>&nbsp;]</span></a>{#cat_icon}<br />
+              <!--/VTP_category-->
+              <div class="totalImages">[&nbsp;{#nb_total_pictures}&nbsp;{#total}&nbsp;]</div>
+              <!--VTP_favorites-->
+              <br />&nbsp;<img src="{#lien_collapsed}" alt="&gt;" />&nbsp;<a href="{#url}"><span title="{#favorite_cat_hint}" style="font-weight:bold;">{#favorite_cat}</span></a>&nbsp;<span class="menuInfoCat">[&nbsp;{#nb_favorites}&nbsp;]</span>
+              <!--/VTP_favorites-->
+              <br />&nbsp;<img src="{#lien_collapsed}" alt="&gt;" />&nbsp;<span style="font-weight:bold;">{#stats}</span>
+              <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="{#lien_collapsed}" alt="&gt;" />&nbsp;<a href="{#most_visited_url}"><span title="{#most_visited_cat_hint}" style="font-weight:bold;">{#top_number}&nbsp;{#most_visited_cat}</span></a>
+              <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="{#lien_collapsed}" alt="&gt;" />&nbsp;<a href="{#recent_url}"><span title="{#recent_cat_hint}" style="font-weight:bold;">{#recent_cat}</span></a> {#icon_short}
+            </div>
+          {#frame_end}
+          <div style="margin-bottom:5px;">&nbsp;</div>
+          {#frame_start}100%{#frame_begin}
+            <div class="titreMenu">{#title_menu}</div>
+            <div class="menu">
+              <!--VTP_summary-->
+              &nbsp;<img src="{#lien_collapsed}" alt="&gt;"/>&nbsp;<a href="{#url}" title="{#title}">{#name}</a><br />
+              <!--/VTP_summary-->
+              <!--VTP_upload-->
+              <br />&nbsp;<img src="{#lien_collapsed}" alt="&gt;"/>&nbsp;<a href="{#url}">{#upload_picture}</a>
+              <!--/VTP_upload-->
+            </div>
+          {#frame_end}
+        </td>
+        <td style="padding:5px;width:99%;" valign="top">
+          <table style="width:100%;">
+            <tr>
+              <td align="center">
+                {#frame_start}1%{#frame_begin}
+                  <div class="titrePage">{#cat_title}</div>
+                {#frame_end}
+                <div style="margin-bottom:5px;">&nbsp;</div>
+                <!--VTP_thumbnails-->
+                <table class="thumbnail">
+                  <!--VTP_line-->
+                  <tr>
+                    <!--VTP_thumbnail-->
+                    <td valign="bottom" class="thumbnail">
+                      <a href="{#url}" class="back">
+                      <img src="{#src}"
+                           alt="{#alt}"
+                           title="{#title}"
+                           class="imgLink"/></a>
+                      <br />
+                      <a href="{#url}" class="back">{#name}</a>
+                      {#icon}
+                      <!--VTP_nb_comments-->
+                      <br />{#nb} {#comments}
+                      <!--/VTP_nb_comments-->
+                    </td>
+                    <!--/VTP_thumbnail-->
+                  </tr>
+                  <!--/VTP_line-->
+                </table>
+                <!--/VTP_thumbnails-->
+              </td>
+            </tr>
+            <tr>
+              <td align="left">
+                <!--VTP_cat_infos-->
+                  <!--VTP_navigation-->
+                  <div class="navigationBar">{#navigation_bar}</div>
+                  <!--/VTP_navigation-->
+                  <!--VTP_comment-->
+                  <div class="comments">{#cat_comment}</div>
+                  <!--/VTP_comment-->
+                  <div class="infoCat">
+                  {#nb_image_category} "{#cat_name}" : {#cat_nb_images}
+                  </div>
+                <!--/VTP_cat_infos-->
+              </td>
+            </tr>
+            <tr>
+              <td align="right">
+                {#frame_start}1%{#frame_begin}
+                  <div class="info">
+                    {#connected_user}&nbsp;{#username}<br />
+                    {#recent_image}&nbsp;{#short_period}&nbsp;{#days}
+                      {#icon_short}<br />
+                    {#recent_image}&nbsp;{#long_period}&nbsp;{#days}
+                      {#icon_long}<br />
+                    {#send_mail}&nbsp;<a href="mailto:{#mail_webmaster}?subject={#title_send_mail}"><span style="font-weight:bold;">{#webmaster}</span></a>
+                  </div>
+                {#frame_end}
+              </td>
+            </tr>
+          </table>
+        </td>
+      </tr>
+    </table>
Index: /branches/1.3/template/default/comments.vtp
===================================================================
--- /branches/1.3/template/default/comments.vtp	(revision 3252)
+++ /branches/1.3/template/default/comments.vtp	(revision 3252)
@@ -0,0 +1,61 @@
+    <table style="width:100%;">
+      <tr align="center" valign="middle">
+        <td>
+          {#frame_start}1px{#frame_begin}
+            <div class="titrePage">{#title_comments}</div>
+          {#frame_end}
+          <div style="margin-bottom:20px"></div>
+          {#frame_start}90%{#frame_begin}
+<table style="width:100%;">
+  <tr>
+    <th>
+      [
+      <!--VTP_last_day_option-->
+      <a href="{#link}" style="{#style}">{#option}</a>{#separation}
+      <!--/VTP_last_day_option-->
+      {#stats_last_days}
+      ]
+      [ <a href="{#back_url}">{#search_return_main_page}</a> ]
+    </th>
+  </tr>
+</table>
+<!--VTP_picture-->
+<div style="border:2px solid gray;margin:2px;padding:2px;">
+  <table style="width:100%;">
+    <tr>
+     <td valign="top" style="width:15%;">
+       <!-- the thumbnail of the picture, linked to the full size page -->
+       <a href="{#thumb_url}" title="{#thumb_title}">
+         <img src="{#thumb_src}" class="imgLink" alt="{#thumb_alt}"/>
+       </a>
+     </td>
+     <td style="padding:10px;width:85%;">
+       <div style="font-weight:bold;padding-left:10px;text-align:left;">{#title}</div>
+       <!--VTP_comment-->
+             <table class="tableComment">
+               <tr>
+                 <td rowspan="2" valign="top" class="cellAuthor">
+                   <div class="commentsAuthor">{#author}</div>
+                 </td>
+                 <td class="cellInfo">
+                   <div class="commentsInfos">
+                     {#date}<!--VTP_delete--><a href="{#link}" title="{#comments_del}"><img src="../template/{#user_template}/admin/images/delete.gif" style="border:none;margin-left:5px;" alt="[{#delete}]"/></a><!--/VTP_delete-->
+                   </div>
+                 </td>
+               </tr>
+               <tr>
+                 <td>
+                   <div class="commentsContent">{#content}</div>
+                 </td>
+               </tr>
+             </table>
+       <!--/VTP_comment-->
+     </td>
+    </tr>
+  </table>
+</div>
+<!--/VTP_picture-->
+          {#frame_end}
+        </td>
+      </tr>
+    </table>
Index: /branches/1.3/template/default/default-admin.css
===================================================================
--- /branches/1.3/template/default/default-admin.css	(revision 3252)
+++ /branches/1.3/template/default/default-admin.css	(revision 3252)
@@ -0,0 +1,93 @@
+@import url("default.css");
+
+a, a:hover {
+color:#006699;
+}
+
+body,font,table,input,form,select,textarea {
+font-family:arial,verdana,sans-serif;
+font-size:12px;
+color:#000000;
+text-align:left;
+}
+table 
+{
+border-collapse:separate;
+}
+body {
+background-color:#E5E5E5;
+margin:5px;
+}
+
+.table1 {
+border-collapse:collapse;
+background-color:#FFFFFF;
+}
+.contenucellule {
+background-color:#EEEEEE;
+border:2px solid #006699;
+}
+.style1 {
+margin-top:20px;
+}
+th {
+font-weight:bold;
+background-color:#D3DCE3;
+margin-bottom:10px;
+text-align: center;
+}
+td.row1 {
+background-color:#E6E4E4;
+}
+td.row2,td.throw2 {
+background-color:#E8E8E8;
+}
+td.throw2 {
+text-align:center;
+font-weight:bold;
+}
+td.row3 {
+background-color:#eeeeee;
+}
+td.row4 {
+background-color:#cccccc;
+}
+.info {
+color:darkblue;
+text-align:center;
+}
+div.key {
+margin-left : 10px;
+}
+td.choice {
+text-align : center;
+}
+div.install_warning {
+text-align:center;
+color:red;
+margin:20px;
+font-weight:bold;
+}
+
+.tableComment,.cellAuthor,.cellInfo {  
+color:#000000; 
+border-color:#006699;
+}
+.commentsAuthor,.commentsTitle,.commentsInfos,.commentsContent
+{
+color:#000000;
+}
+.errors {
+  text-align:left;
+  margin:25px;
+  background-color:#ffe1e1;
+  border:1px solid red;
+  color:black;
+}
+.errors_title {
+  margin:5px;
+  font-weight:bold;
+  font-size:120%;
+  text-align:center;
+  color:red;
+}
Index: /branches/1.3/template/default/default.css
===================================================================
--- /branches/1.3/template/default/default.css	(revision 3252)
+++ /branches/1.3/template/default/default.css	(revision 3252)
@@ -0,0 +1,220 @@
+a {
+  text-decoration:none;
+  color:#E0E0E0;
+}
+a:hover {
+  text-decoration:underline;
+  color:#E0E0E0;
+}
+
+a.back,body {
+  color:#E0E0E0;
+}
+body {
+  font-family:arial, sans-serif;
+  font-size:12px;
+  background-color:#444444;
+  margin:5px;
+}
+table, input {
+  font-family:arial, sans-serif;
+  font-size:12px;
+}
+.imgLink {
+  border:1px solid #E0E0E0;
+}
+.imgLink:hover {
+  text-decoration:none;
+}
+.titrePage,.titreMenu,.menu,.info,.commentsAuthor,.commentsTitle,.commentsInfos,.commentsContent,.commentsNavigationBar {
+  color:lightgray;
+}
+.titreMenu, .menu, .info {
+  margin-bottom:5px;
+  white-space:nowrap;
+}
+.menu, .titrePage, .info {
+  margin-left:2px;
+  margin-right:2px;
+}
+.menuInfoCat {
+  font-family:sans-serif;
+  font-size:11px;
+}
+.totalImages {
+  text-align:center;
+  margin-top:5px;
+  font-family:sans-serif;
+  font-size:11px;
+}
+.titreMenu {
+  font-weight:600;
+  text-align:center;
+}
+.info {
+  text-align:right;
+}
+.titrePage {
+  white-space:nowrap;
+  font-weight:500;
+  font-size:18px;
+  text-align:center;
+}
+.comments, .infoCat, .navigationBar {
+  margin-top:10px;
+  margin-bottom:10px;
+}
+.comments {
+  text-align:justify;
+  font-style:italic;
+}
+.navigationBar {
+  text-align:center;
+}
+.infoCat {
+  text-align:left;
+}
+.thumbnail {
+  font-size:11px;
+  text-align:center;
+}
+.copyright {
+  font-size:11px;
+  text-align:center;
+  font-family:sans-serif;
+  letter-spacing:0.3mm;
+}
+.commentImage {
+  font-weight:bold;
+  text-align:center;
+  font-size:17px;
+}
+.bouton {
+  background:lightgray;
+}
+textarea,input {
+  color:black;
+}
+table {
+  border-collapse:collapse;
+}
+table.thumbnail {
+  border-collapse:separate;
+}
+td {
+  font-family:sans-serif;
+  padding:0px;
+}
+.errors {
+  text-align:left;
+  margin-top:5px;
+  margin-bottom:5px;
+  background-color:red;
+  font-weight:bold;
+  border:1px solid black;
+  color:white;
+}
+div.information {
+  text-align:center;
+  border:2px solid #E0E0E0;
+  margin:10px;
+  padding:5px;
+}
+.commentsAuthor, .commentsTitle, .commentsInfos, .commentsContent, .commentsNavigationBar {
+	
+  font-family:arial, sans-Serif;
+  font-size:12px;
+}
+.commentsTitle, .commentsAuthor {
+  text-align:center;
+  font-weight:bold;
+}
+.commentsInfos {
+  padding:3px 3px 3px 10px;
+  font-size:11px;
+  text-align:right;
+}
+.commentsContent {
+  margin:10px;
+}
+.commentsTitle {
+  margin-top:15px;
+}
+.commentsAuthor {
+  margin:5px;
+}
+.commentsNavigationBar {
+  margin:10px;
+}
+.tableComment,.cellAuthor,.cellInfo {
+  border-color:#E0E0E0;
+  border-style:solid;
+}
+.tableComment {
+  width:100%;
+  border-width:2px;
+  text-align:left;
+  padding: 10px;
+}
+.cellAuthor {
+  border-width:0px;
+  border-right-width:1px;
+  width:20%;
+}
+.cellInfo {
+  border-width:0px;
+  border-bottom-width:1px;
+}
+
+      .miniature {
+        border:solid 1px black;
+      }
+	        .titretable1 {
+        color:black;
+        background-color:#D3DCE3;
+        text-align:center;
+        border:2px solid #006699;
+        font-weight:bold;
+        border-bottom:0px;
+      }
+      .grostitre {
+        text-align:center;
+        margin:10px 50px 10px 50px;
+        font-size:20px;
+        width:300px;
+      }
+      .plan {
+        margin:10px 10px 10px 2px;
+        white-space:nowrap;
+      }
+	        .cat_plan {
+        font-weight:bold;
+      }
+      .retrait {
+        margin:10px;
+        margin-left:30px;
+        margin-top:2px;
+      }
+	        .erreur {
+        color:red;
+        text-align:center;
+      }
+      .errors_title {
+        margin:5px;
+        font-weight:bold;
+        font-size:120%;
+        text-align:center;
+        color:red;
+      }
+.thumbnail {
+  font-size:11px;
+  text-align:center;
+  vertical-align: baseline;
+  white-space: nowrap;
+}
+
+table.thumbnail {
+  border-collapse:separate;
+  display:inline-table;
+}
+
Index: /branches/1.3/template/default/footer.htm
===================================================================
--- /branches/1.3/template/default/footer.htm	(revision 3252)
+++ /branches/1.3/template/default/footer.htm	(revision 3252)
@@ -0,0 +1,1 @@
+<!-- footer -->
Index: /branches/1.3/template/default/footer.vtp
===================================================================
--- /branches/1.3/template/default/footer.vtp	(revision 3252)
+++ /branches/1.3/template/default/footer.vtp	(revision 3252)
@@ -0,0 +1,8 @@
+    <div class="copyright">{#generation_time} {#time}</div>
+    <!-- Please, do not remove this copyright. If you really want to,
+         contact me pierrick@z0rglub.com to find a solution on how
+         to show the origin of the script...-->
+    <div class="copyright">Powered by <a href="{#site_url}" class="back">PhpWebGallery</a> {#version}</div>
+    {#footer}
+  </body>
+</html>
Index: /branches/1.3/template/default/header.htm
===================================================================
--- /branches/1.3/template/default/header.htm	(revision 3252)
+++ /branches/1.3/template/default/header.htm	(revision 3252)
@@ -0,0 +1,1 @@
+<!-- header -->
Index: /branches/1.3/template/default/header.vtp
===================================================================
--- /branches/1.3/template/default/header.vtp	(revision 3252)
+++ /branches/1.3/template/default/header.vtp	(revision 3252)
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset={#charset}"  />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<!--VTP_refresh-->
+<meta http-equiv="refresh" content="{#time};url={#url}">
+<!--/VTP_refresh-->
+<title>{#title}</title>
+<link rel="stylesheet" href="{#style}" type="text/css" />
+</head>
+<body>
+{#header}
Index: /branches/1.3/template/default/htmlfunctions.inc.php
===================================================================
--- /branches/1.3/template/default/htmlfunctions.inc.php	(revision 3252)
+++ /branches/1.3/template/default/htmlfunctions.inc.php	(revision 3252)
@@ -0,0 +1,253 @@
+<?php
+/***************************************************************************
+ *                           htmlfunctions.inc.php                         *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************
+
+ ***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+//include( PREFIX_INCLUDE.'./template/'.$user['template'].'/theme/conf.php' );
+$user['lien_expanded']='./template/'.$user['template'].'/theme/expanded.gif';
+$user['lien_collapsed']='./template/'.$user['template'].'/theme/collapsed.gif';
+//include_once( PREFIX_INCLUDE.'./template/'.$user['template'].'/style.inc.php');
+
+function get_icon( $date_comparaison )
+{
+  global $user, $conf;
+
+  if ( !is_numeric( $date_comparaison ) )
+  {
+    return '';
+  }
+  
+  $difference = time() - $date_comparaison;
+  $jours = 24*60*60;
+  $output = '';
+  if ( $difference < $user['long_period'] * $jours )
+  {
+    $icon_url = './template/'.$user['template'].'/theme/';
+    if ( $difference < $user['short_period'] * $jours )
+    {
+      $icon_url.= 'new_short.gif';
+    }
+    else
+    {
+      $icon_url.= 'new_long.gif';
+    }
+    $size = getimagesize( $icon_url );
+    $output = '<img src="'.$icon_url.'" style="border:0;';
+    $output.= 'height:'.$size[1].'px;width:'.$size[0].'px" alt="" />';
+  }
+  return $output;
+}
+
+function create_navigation_bar( $url, $nb_element, $start,
+                                $nb_element_page, $link_class )
+{
+  global $lang;
+  $navigation_bar = "";
+  // 0. détection de la page en cours
+  if( !isset( $start )
+      || !is_numeric( $start )
+      || ( is_numeric( $start ) && $start < 0 ) )
+  {
+    $start = 0;
+  }
+  // on n'affiche la bare de navigation que si on plus de 1 page
+  if ( $nb_element > $nb_element_page )
+  {
+    // 1.une page précédente ?
+    if ( $start != 0 )
+    {
+      $previous = $start - $nb_element_page;
+      $navigation_bar.= '<a href="';
+      $navigation_bar.= add_session_id( $url.'&amp;start='.$previous );
+      $navigation_bar.= '" class="'.$link_class.'">'.$lang['previous_page'];
+      $navigation_bar.= '</a>';
+      $navigation_bar.= ' | ';
+    }
+    // 2.liste des numéros de page
+    $maximum = ceil ( $nb_element / $nb_element_page );
+    for ( $i = 1; $i <= $maximum; $i++ )
+    {
+      $temp_start = ( $i - 1 ) * $nb_element_page;
+      if ( $temp_start == $start )
+      {
+        $navigation_bar.= ' <span style="font-weight:bold;">'.$i.'</span> ';
+      }
+      else
+      {
+        $navigation_bar.= ' <a href="';
+        $navigation_bar.= add_session_id( $url.'&amp;start='.$temp_start );
+        $navigation_bar.= '" class="'.$link_class.'">'.$i.'</a> ';
+      }
+    }
+    // 3.une page suivante ?
+    if ( $nb_element > $nb_element_page
+         && $start + $nb_element_page < $nb_element )
+    {
+      $next = $start + $nb_element_page;
+      $navigation_bar.= ' | <a href="';
+      $navigation_bar.= add_session_id( $url.'&amp;start='.$next );
+      $navigation_bar.= '" class="'.$link_class.'">'.$lang['next_page'].'</a>';
+    }
+  }
+  return $navigation_bar;
+}
+
+function get_frame_start()
+{
+  return '<table style="width:';
+}
+/*
+function get_frame_begin()
+{
+  return ';">
+            <tr>
+              <td style="border:1px dashed gray;width:100%;padding:5px;background-color:white;">';
+}
+
+function get_frame_end()
+{
+  return '
+              </td>
+            </tr>   
+          </table>';
+}
+*/
+
+function get_frame_begin()
+{
+  global $user;
+  $path = './template/'.$user['template'].'/theme/';
+  $size_01 = getimagesize( $path.'01.gif' );
+  $size_02 = getimagesize( $path.'02.gif' );
+  $size_03 = getimagesize( $path.'03.gif' );
+  return ';">
+            <tr>
+              <td><img src="'.$path.'01.gif" style="width:'.$size_01[0].'px;display:box;" alt="" /></td>
+              <td><img src="'.$path.'02.gif" style="display:box;width:100%;height:'.$size_02[1].'px;" alt="" /></td>
+              <td><img src="'.$path.'03.gif" style="display:box;width:'.$size_03[0].'px;" alt="" /></td>
+            </tr>
+            <tr>
+              <td style="background:url('.$path.'04.gif);"></td>
+              <td style="background:url('.$path.'05.gif);width:100%;">';
+}
+        
+function get_frame_end()
+{
+  global $user;
+  $path = './template/'.$user['template'].'/theme/';
+  $size_08 = getimagesize( $path.'08.gif' );
+  return '
+              </td>
+              <td style="background:url('.$path.'06.gif);"></td>
+            </tr>
+            <tr>
+              <td><img src="'.$path.'07.gif" alt="" /></td>
+              <td><img src="'.$path.'08.gif" style="width:100%;height:'.$size_08[1].'px;" alt="" /></td>
+              <td><img src="'.$path.'09.gif" alt="" /></td>
+            </tr>   
+          </table>';
+}
+
+function initialize_template()
+{
+  global $vtp, $handle, $user, $lang;
+
+ // $vtp->setGlobalVar( $handle, 'charset', $lang['charset'] );
+  //$vtp->setGlobalVar( $handle, 'style', $user['style'] );
+  $vtp->setGlobalVar( $handle, 'frame_start', get_frame_start() );
+  $vtp->setGlobalVar( $handle, 'frame_begin', get_frame_begin() );
+  $vtp->setGlobalVar( $handle, 'frame_end',   get_frame_end() );
+ //$vtp->setVarF( $handle, 'header',
+ //                './template/'.$user['template'].'/header.htm' );
+  //$vtp->setVarF( $handle, 'footer',
+   //              './template/'.$user['template'].'/footer.htm' );
+}
+
+function display_category( $category, $indent, $handle )
+{
+  global $user,$lang,$vtp;
+
+  $vtp->addSession( $handle, 'category' );
+  $vtp->setVar( $handle, 'category.indent', $indent );
+  if ( $user['expand'] or $category['nb_sub_categories'] == 0 )
+  {
+    $vtp->addSession( $handle, 'bullet_wo_link' );
+    $vtp->setVar( $handle, 'bullet_wo_link.bullet_url',
+                  $user['lien_collapsed'] );
+    $vtp->closeSession( $handle, 'bullet_wo_link' );
+  }
+  else
+  {
+    $vtp->addSession( $handle, 'bullet_w_link' );
+    $url = './category.php';
+	if (isset($page['cat']))
+	{
+	$url .='?cat='.$page['cat'];
+    $url.= '&amp;expand='.$category['expand_string'];
+	}
+	else if ($category['expand_string']<>'')
+	{
+		$url.= '?expand='.$category['expand_string'];
+	}
+    $vtp->setVar( $handle, 'bullet_w_link.bullet_link', add_session_id($url) );
+    if ( $category['expanded'] )
+    {
+      $vtp->setVar( $handle, 'bullet_w_link.bullet_url',
+                    $user['lien_expanded'] );
+    }
+    else
+    {
+      $vtp->setVar( $handle, 'bullet_w_link.bullet_url',
+                    $user['lien_collapsed'] );
+    }
+    $vtp->closeSession( $handle, 'bullet_w_link' );
+  }
+
+  $url = './category.php?cat='.$category['id'];
+  $url.= '&amp;expand='.$category['expand_string'];
+  $vtp->setVar( $handle, 'category.link_url', add_session_id( $url ) );
+
+  $name = $category['name'];
+  if ( $name == '' ) $name = str_replace( '_', ' ', $category['dir'] );
+  $vtp->setVar( $handle, 'category.link_name', $name );
+
+  if ( $category['id_uppercat'] == '' )
+  {
+    $vtp->setVar( $handle, 'category.name_style', 'font-weight:bold;' );
+  }
+  if ( $category['nb_sub_categories'] > 0 )
+  {
+    $vtp->addSession( $handle, 'subcat' );
+    $vtp->setVar( $handle,'subcat.nb_subcats',$category['nb_sub_categories'] );
+    $vtp->closeSession( $handle, 'subcat' );
+  }
+  $vtp->setVar( $handle, 'category.total_cat', $category['nb_images'] );
+  if ( isset( $category['date_last'] ) )
+  {
+    $vtp->setVar($handle,'category.cat_icon',get_icon($category['date_last']));
+  }
+  $vtp->closeSession( $handle, 'category' );
+
+  // recursive call
+  if ( $category['expanded'] )
+  {
+    foreach ( $category['subcats'] as $subcat ) {
+      display_category( $subcat, $indent.str_repeat( '&nbsp', 2 ), $handle );
+    }
+  }
+}
+?>
Index: /branches/1.3/template/default/identification.vtp
===================================================================
--- /branches/1.3/template/default/identification.vtp	(revision 3252)
+++ /branches/1.3/template/default/identification.vtp	(revision 3252)
@@ -0,0 +1,67 @@
+    <table style="width:100%;height:100%">
+      <tr align="center" valign="middle">
+        <td>
+          {#frame_start}1px{#frame_begin}
+            <div class="titrePage">{#ident_title}</div>
+          {#frame_end}
+          <div style="margin-bottom:5px;">&nbsp;</div>
+          {#frame_start}50%{#frame_begin}
+            <div style="margin-left:auto;margin-right:auto;text-align:center;">
+              <form method="post" action="./identification.php">
+                <table style="width:80%;margin-left:auto;margin-right:auto;">
+                  <!--VTP_errors-->
+                  <tr>
+                    <td colspan="3">
+                      <div class="errors">
+                        <ul>
+                          <!--VTP_li-->
+                          <li>{#li}</li>
+                          <!--/VTP_li-->
+                        </ul>
+                      </div>
+                    </td>
+                  </tr>
+                  <!--/VTP_errors-->
+                  <tr>
+                    <td class="menu" align="center">{#login}</td>
+                    <td class="menu" align="center">{#password}</td>
+                    <td>&nbsp;</td>
+                  </tr>
+                  <tr>
+                    <td align="center">
+                      <!--VTP_select_field-->
+                      <select name="login">
+                        <!--VTP_option-->
+                        <option>{#option}</option>
+                        <!--/VTP_option-->
+                      </select>
+                      <!--/VTP_select_field-->
+                      <!--VTP_text_field-->
+                      <input type="text" name="login" value="" />
+                      <!--/VTP_text_field-->
+                    </td>
+                    <td align="center"><input type="password" name="pass"/></td>
+                    <td align="center"><input type="submit" name="submit" value="{#submit}" class="bouton"/></td>
+                  </tr>
+                </table>
+              </form>
+              <table style="width:80%;margin-left:auto;margin-right:auto;">
+                <tr>
+                  <td colspan="3" align="center">
+                    <!--VTP_guest_visit-->
+                      <a href="./category.php">[ {#ident_guest_visit} ]</a>
+                    <!--/VTP_guest_visit-->
+                    <div  style="margin-top:10px;text-align:left;">
+                      <!--VTP_register-->
+                        <a href="register.php"><img src="./template/{#user_template}/theme/register.gif" style="border:0;" alt="{#ident_register}"/>&nbsp;{#ident_register}</a><br />
+                      <!--/VTP_register-->
+                      <a href="mailto:{#mail_webmaster}?subject=[PhpWebGallery] {#ident_forgotten_password}"><img src="./template/{#user_template}/theme/lost.gif" style="border:0;" alt=""/>&nbsp;{#ident_forgotten_password}</a>
+                    </div>
+                  </td>
+                </tr>
+              </table>
+            </div>
+          {#frame_end}
+        </td>
+      </tr>
+    </table>
Index: /branches/1.3/template/default/picture.vtp
===================================================================
--- /branches/1.3/template/default/picture.vtp	(revision 3252)
+++ /branches/1.3/template/default/picture.vtp	(revision 3252)
@@ -0,0 +1,136 @@
+    <!--VTP_information-->
+    <div class="information">{#content}</div>
+    <!--/VTP_information-->
+    <!--VTP_start_slideshow-->
+    <div style="text-align:center;margin-bottom:5px;">
+      [ {#slideshow} :
+      <!--VTP_second-->
+      <a href="{#url}" class="back" style="font-weight:bold;">{#option}</a>
+      <!--/VTP_second-->
+      {#period_seconds} ]
+    </div>
+    <!--/VTP_start_slideshow-->
+    <!--VTP_stop_slideshow-->
+    <div style="text-align:center;margin-bottom:5px;">
+      [ <a href="{#url}" class="back" style="font-weight:bold;">{#slideshow_stop}</a> ]
+    </div>
+    <!--/VTP_stop_slideshow-->
+    <table style="width:100%;height:100%;">
+      <tr align="center" valign="middle">
+        <td>
+          <!--VTP_previous-->
+          <a href="{#url}" title="{#title}">
+            <img src="{#src}" class="imgLink" style="margin-right:10px;margin-left:5px;" alt="{#alt}"/>
+          </a>
+          <!--/VTP_previous-->
+          <!--VTP_previous_empty-->
+          &nbsp;
+          <!--/VTP_previous_empty-->
+        </td>
+        <td style="width:100%;">
+          {#frame_start}1%{#frame_begin}
+          <div class="titrePage">{#title}</div>
+          {#frame_end}
+          <div style="margin-bottom:5px">&nbsp;</div>
+          {#frame_start}1%{#frame_begin}
+          <a href="{#picture_link}">
+            <img class="imgLink" style="margin:10px;width:{#picture_width}px;height:{#picture_height}px;border:1px solid" src="{#picture_src}" alt="{#picture_alt}"/>
+          </a>
+          <div class="commentImage">{#picture_comment}</div>
+          <table style="width:100%;">   
+            <tr>
+              <td align="center">
+                <table style="margin:auto;margin-top:5px;margin-bottom:5px;">
+                  <!--VTP_info_line-->
+                  <tr>
+                     <td class="menu" style="font-weight:bold;">{#name}</td>
+                     <td class="menu" style="text-align:right;">{#content}</td>
+                  </tr>
+                  <!--/VTP_info_line-->
+                </table>
+              </td>
+            </tr>
+          </table>
+          <!--VTP_favorite-->
+          <div class="menu" style="text-align:center;margin:5px;">
+            <a href="{#link}" title="{#title}"><img src="{#src}" style="border:none;margin-left:5px;" alt=""/></a>
+            <a href="{#link}">{#alt}</a>
+          </div>
+          <!--/VTP_favorite-->
+          <!--VTP_modification-->
+          <div class="menu" style="text-align:center;margin:5px;">
+            [ <a href="{#link}">{#name}</a> ]
+          </div>
+          <!--/VTP_modification-->
+          {#frame_end}
+          <div style="text-align:center;">{#back}</div>
+        </td>
+        <td>
+          <!--VTP_next-->
+          <a href="{#url}" title="{#title}">
+            <img src="{#src}" class="imgLink" style="margin-right:10px;margin-left:5px;" alt="{#alt}"/>
+          </a>
+          <!--/VTP_next-->
+          <!--VTP_next_empty-->
+          &nbsp;
+          <!--/VTP_next_empty-->
+        </td>
+      </tr>
+      <!--VTP_comments-->
+      <tr align="center" valign="middle">
+        <td colspan="3">
+          {#frame_start}90%{#frame_begin}
+            <table style="width:100%;">
+              <tr align="center">
+                <td>
+                  <div class="commentsTitle">
+                    [{#nb_comments}] {#comments_title}
+                  </div>
+                  <div class="commentsNavigationBar">{#navigation_bar}</div>
+                  <!--VTP_comment-->
+                  <table class="tableComment">
+                    <tr>
+                      <td rowspan="2" valign="top" class="cellAuthor">
+                        <div class="commentsAuthor">{#author}</div>
+                      </td>
+                      <td align="right" class="cellInfo">
+                        <div class="commentsInfos">
+                          {#date}<!--VTP_delete--><a href="{#link}" title="{#comments_del}"><img src="./template/{#user_template}/theme/delete.gif" style="border:none;margin-left:5px;" alt="[{#delete}]"/></a><!--/VTP_delete-->
+                        </div>
+                      </td>
+                    </tr>
+                    <tr>
+                      <td>
+                        <div class="commentsContent">{#content}</div>
+                      </td>
+                    </tr>
+                  </table>
+                  <!--/VTP_comment-->
+                  <div class="commentsNavigationBar">{#navigation_bar}</div>
+                </td>
+              </tr>
+            </table>
+            <!--VTP_add_comment-->
+            <form method="post" action="{#form_action}">
+              <table style="width:100%;">
+                <tr align="center">
+                  <td>
+                    <div class="commentsTitle">{#comments_add}</div>
+                    <!--VTP_author_field-->
+                    <div class="menu">{#author} : <input type="text" name="author" style="margin-top:5px;"/></div>
+                    <!--/VTP_author_field-->
+                    <!--VTP_author_known-->
+                    <input type="hidden" name="author" value="{#value}" />
+                    <!--/VTP_author_known-->
+                    <textarea name="content" rows="10" cols="50" style="overflow:auto;width:450px;margin:10px;"></textarea><br />
+                    <input type="submit" value="{#submit}" style="margin:10px;"/>
+                  </td>
+                </tr>
+              </table>
+            </form>
+            <!--/VTP_add_comment-->
+          {#frame_end}
+        </td>
+      </tr>
+      <!--/VTP_comments-->
+    </table>
Index: /branches/1.3/template/default/profile.vtp
===================================================================
--- /branches/1.3/template/default/profile.vtp	(revision 3252)
+++ /branches/1.3/template/default/profile.vtp	(revision 3252)
@@ -0,0 +1,91 @@
+    <table style="width:100%;height:100%">
+      <tr align="center" valign="middle">
+        <td>
+          {#frame_start}1px{#frame_begin}
+            <div class="titrePage">{#customize_title}</div>
+          {#frame_end}
+          <div style="margin-bottom:20px"></div>
+          {#frame_start}50%{#frame_begin}
+            <form method="post" action="{#form_action}">
+              <table style="width:100%;margin-top:10px;margin-bottom:10px;">
+                <tr align="center" valign="middle">
+                  <td>
+                    <table width="80%">
+                      <!--VTP_errors-->
+                      <tr>
+                        <td colspan="2">
+                          <div class="errors">
+                            <ul>
+                              <!--VTP_li-->
+                              <li>{#li}</li>
+                              <!--/VTP_li-->
+                            </ul>
+                          </div>
+                        </td>
+                      </tr>
+                      <!--/VTP_errors-->
+                      <!--VTP_line-->
+                      <tr>
+                        <td class="menu">{#name}</td>
+                        <td class="menu">
+                          <!--VTP_select-->
+                          <select name="{#name}">
+                            <!--VTP_option-->
+                            <option{#selected}>{#option}</option>
+                            <!--/VTP_option-->
+                          </select>
+                          <!--/VTP_select-->
+                          <!--VTP_text-->
+                          <input type="text" name="{#name}" value="{#value}" />
+                          <!--/VTP_text-->
+                          <!--VTP_group-->
+                            <!--VTP_radio-->
+                            <input type="radio" name="{#name}" value="{#value}"{#checked}/>{#option}
+                            <!--/VTP_radio-->
+                          <!--/VTP_group-->
+                        </td>
+                      </tr>
+                      <!--/VTP_line-->
+                      <tr>
+                        <td colspan="2">&nbsp;</td>
+                      </tr>
+                      <tr>
+                        <td class="menu">{#new} {#password} <input type="checkbox" name="use_new_pwd" value="1" /></td>
+                        <td class="menu"><input type="password" name="password" value="" /></td>
+                      </tr>
+                      <tr>
+                        <td class="menu">{#reg_confirm}</td>
+                        <td class="menu"><input type="password" name="passwordConf" value="" /></td>
+                      </tr>
+                      <!--VTP_cookie-->
+                      <tr>
+                        <td colspan="2">&nbsp;</td>
+                      </tr>
+                      <tr>
+                        <td class="menu">{#create_cookie} <input type="checkbox" name="create_cookie" value="1" /></td>
+                        <td class="menu">
+                          <select name="cookie_expiration">
+                          <!--VTP_expiration_option-->
+                            <option value="{#value}">{#option}</option>
+                          <!--/VTP_expiration_option-->
+                          </select>
+                        </td>
+                      </tr>
+                      <!--/VTP_cookie-->
+                      <tr>
+                        <td colspan="2">&nbsp;</td>
+                      </tr>
+                      <tr>
+                        <td colspan="2" align="center">
+                          <input type="submit" name="submit" value="{#submit}" style="margin:5px;"/>
+                        </td>
+                      </tr>
+                    </table>
+                  </td>
+                </tr>
+              </table>
+            </form>
+          {#frame_end}
+        </td>
+      </tr>
+    </table>
Index: /branches/1.3/template/default/register.vtp
===================================================================
--- /branches/1.3/template/default/register.vtp	(revision 3252)
+++ /branches/1.3/template/default/register.vtp	(revision 3252)
@@ -0,0 +1,63 @@
+    <table style="width:100%;height:100%">
+      <tr align="center" valign="middle">
+        <td>
+          {#frame_start}1px{#frame_begin}
+            <div class="titrePage">{#register_title}</div>
+          {#frame_end}
+          <div style="margin-bottom:20px"></div>
+          {#frame_start}50%{#frame_begin}
+            <form method="post" action="{#form_action}">
+              <table style="width:80%;margin-top:10px;margin-bottom:10px;margin-left:auto;margin-right:auto;">
+                <!--VTP_errors-->
+                <tr>
+                  <td colspan="2">
+                    <div class="errors">
+                      <ul>
+                        <!--VTP_li-->
+                        <li>{#li}</li>
+                        <!--/VTP_li-->
+                      </ul>
+                    </div>
+                  </td>
+                </tr>
+                <!--/VTP_errors-->
+                <!--VTP_line-->
+                <tr>
+                  <td class="menu">{#name}</td>
+                  <td class="menu">
+                    <!--VTP_select-->
+                    <select name="{#name}">
+                      <!--VTP_option-->
+                      <option{#selected}>{#option}</option>
+                      <!--/VTP_option-->
+                    </select>
+                    <!--/VTP_select-->
+                    <!--VTP_text-->
+                    <input type="text" name="{#name}" value="{#value}" />
+                    <!--/VTP_text-->
+                    <!--VTP_password-->
+                    <input type="password" name="{#name}" value="{#value}" />
+                    <!--/VTP_password-->
+                  </td>
+                </tr>
+                <!--/VTP_line-->
+                <tr>
+                  <td colspan="2">&nbsp;</td>
+                </tr>
+                <tr>
+                <tr>
+                  <td colspan="2" align="center">
+                    <input type="submit" name="submit" value="{#submit}" style="margin:5px;"/>
+                  </td>
+                </tr>
+                <tr>
+                  <td colspan="2" align="center">
+                    <a href="./category.php">[ {#ident_guest_visit} ]</a>
+                  </td>
+                </tr>
+              </table>
+            </form>
+          {#frame_end}
+        </td>
+      </tr>
+    </table>
Index: /branches/1.3/template/default/search.vtp
===================================================================
--- /branches/1.3/template/default/search.vtp	(revision 3252)
+++ /branches/1.3/template/default/search.vtp	(revision 3252)
@@ -0,0 +1,73 @@
+    <table style="width:100%;height:100%">
+      <tr align="center" valign="middle">
+        <td>
+          {#frame_start}1px{#frame_begin}
+            <div class="titrePage">{#search_title}</div>
+          {#frame_end}
+          <div style="margin-bottom:5px;">&nbsp;</div>
+          {#frame_start}50%{#frame_begin}
+            <div style="margin-left:auto;margin-right:auto;text-align:center;">
+              <form method="post" action="{#form_action}">
+                <table style="width:80%;margin-left:auto;margin-right:auto;">
+                  <!--VTP_errors-->
+                  <tr>
+                    <td colspan="2">
+                      <div class="errors">
+                        <ul>
+                          <!--VTP_li-->
+                          <li>{#li}</li>
+                          <!--/VTP_li-->
+                        </ul>
+                      </div>
+                    </td>
+                  </tr>
+                  <!--/VTP_errors-->
+                  <tr>
+                    <td colspan="2">
+                      <div style="margin-bottom:10px;">&nbsp;</div>
+                    </td>
+                  </tr>
+                  <!--VTP_line-->
+                  <tr>
+                    <td class="menu">{#name}</td>
+                    <td class="menu">
+                      <!--VTP_select-->
+                      <select name="{#name}">
+                        <!--VTP_option-->
+                        <option{#selected}>{#option}</option>
+                        <!--/VTP_option-->
+                      </select>
+                      <!--/VTP_select-->
+                      <!--VTP_text-->
+                      <input type="text" name="{#name}" size="{#size}" value="{#value}" />
+                      <!--/VTP_text-->
+                      <!--VTP_group-->
+                        <!--VTP_radio-->
+                        <input type="radio" name="{#name}" value="{#value}"{#checked}/>{#option}
+                        <!--/VTP_radio-->
+                      <!--/VTP_group-->
+                    </td>
+                  </tr>
+                  <!--/VTP_line-->
+                  <tr>
+                    <td align="center" colspan="2">
+                      <input type="submit" name="submit" value="{#submit}" class="bouton" style="margin:10px;" />
+                    </td>
+                  </tr>
+                  <tr>
+                    <td align="center" colspan="2">
+                      <a href="{#back_url}">[ {#search_return_main_page} ]</a>
+                    </td>
+                  </tr>
+                  <tr>
+                    <td colspan="2">
+                      <div style="margin-top:10px;">* : {#search_comments}</div>
+                    </td>
+                  </tr>
+                </table>
+              </form>
+            </div>
+          {#frame_end}
+        </td>
+      </tr>
+    </table>
Index: /branches/1.3/template/default/upload.vtp
===================================================================
--- /branches/1.3/template/default/upload.vtp	(revision 3252)
+++ /branches/1.3/template/default/upload.vtp	(revision 3252)
@@ -0,0 +1,104 @@
+    <table style="width:100%;height:100%">
+      <tr align="center" valign="middle">
+        <td>
+          {#frame_start}1px{#frame_begin}
+            <div class="titrePage">{#upload_title}</div>
+          {#frame_end}
+          <div style="margin-bottom:5px;">&nbsp;</div>
+          {#frame_start}50%{#frame_begin}
+            <!--VTP_upload_not_successful-->
+            <form enctype="multipart/form-data" method="post" action="{#form_action}">
+              <table style="width:80%;margin-left:auto;margin-right:auto;">
+                <!--VTP_errors-->
+                <tr>
+                  <td colspan="3">
+                    <div class="errors">
+                      <ul>
+                        <!--VTP_li-->
+                        <li>{#li}</li>
+                        <!--/VTP_li-->
+                      </ul>
+                    </div>
+                  </td>
+                </tr>
+                <!--/VTP_errors-->
+                <tr>
+                  <td colspan="2" class="menu">
+                    <div style="text-align:center;">{#advise_title}</div>
+                    <ul>
+                      <!--VTP_advise-->
+                      <li>{#content}</li>
+                      <!--/VTP_advise-->
+                    </ul>
+                  </td>
+                </tr>
+                <tr>
+                  <td colspan="2" align="center" style="padding:10px;">
+                    <input name="picture" type="file" value="" />
+                  </td>
+                </tr>
+                <!--VTP_fields-->
+                <!-- username -->
+                <tr>
+                  <td class="menu">{#upload_username} <span style="color:red;">*</span></td>
+                  <td align="center" style="padding:10px;">
+                    <input name="username" type="text" value="{#username}" />
+                  </td>
+                </tr>
+                <!-- mail address -->
+                <tr>
+                  <td class="menu">{#mail_address} <span style="color:red;">*</span></td>
+                  <td align="center" style="padding:10px;">
+                    <input name="mail_address" type="text" value="{#user_mail_address}" />
+                  </td>
+                </tr>
+                <!-- name of the picture -->
+                <tr>
+                  <td class="menu">{#upload_name}</td>
+                  <td align="center" style="padding:10px;">
+                    <input name="name" type="text" value="{#name}" />
+                  </td>
+                </tr>
+                <!-- author -->
+                <tr>
+                  <td class="menu">{#upload_author}</td>
+                  <td align="center" style="padding:10px;">
+                    <input name="author" type="text" value="{#author}" />
+                  </td>
+                </tr>
+                <!-- date of creation -->
+                <tr>
+                  <td class="menu">{#upload_creation_date}</td>
+                  <td align="center" style="padding:10px;">
+                    <input name="date_creation" type="text" value="{#date_creation}" />
+                  </td>
+                </tr>
+                <!-- comment -->
+                <tr>
+                  <td class="menu">{#upload_comment}</td>
+                  <td align="center" style="padding:10px;">
+                   <textarea name="comment" rows="3" cols="40" style="overflow:auto">{#comment}</textarea>
+                  </td>
+                </tr>
+                <!--/VTP_fields-->
+                <tr>
+                  <td colspan="2" align="center">
+                    <input name="submit" type="submit" value="{#submit}" />
+                  </td>
+                </tr>
+              </table>
+            </form>
+            <!--/VTP_upload_not_successful-->
+            <!--VTP_upload_successful-->
+            {#upload_successful}<br />
+            <!--/VTP_upload_successful-->
+            <div style="text-align:center;">
+              <a href="{#return_url}">[ {#search_return_main_page} ]</a>
+            </div>
+            <!--VTP_note-->
+            <div style="text-align:left;"><span style="color:red;">*</span> : {#mandatory}</div>
+            <!--/VTP_note-->
+          {#frame_end}
+        </td>
+      </tr>
+    </table>
Index: /branches/1.3/upload.php
===================================================================
--- /branches/1.3/upload.php	(revision 3252)
+++ /branches/1.3/upload.php	(revision 3252)
@@ -0,0 +1,390 @@
+<?php
+/***************************************************************************
+ *                                 upload.php                              *
+ *                            -------------------                          *
+ *   application   : PhpWebGallery 1.3 <http://phpwebgallery.net>          *
+ *   author        : Pierrick LE GALL <pierrick@z0rglub.com>               *
+ *                                                                         *
+ *   $Id$
+ *                                                                         *
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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;                                         *
+ *                                                                         *
+ ***************************************************************************/
+
+//------------------------------------------------------------------- functions
+// The validate_upload function checks if the image of the given path is valid.
+// A picture is valid when :
+//     - width, height and filesize are not higher than the maximum
+//       filesize authorized by the administrator
+//     - the type of the picture is among jpg, gif and png
+// The function returns an array containing :
+//     - $result['type'] contains the type of the image ('jpg', 'gif' or 'png')
+//     - $result['error'] contains an array with the different errors
+//       found with the picture
+function validate_upload( $temp_name, $my_max_file_size,
+                          $image_max_width, $image_max_height )
+{
+  global $conf, $lang;
+		
+  $result = array();
+  $result['error'] = array();
+  //echo $_FILES['picture']['name']."<br />".$temp_name;
+  $extension = get_extension( $_FILES['picture']['name'] );
+  if ( !in_array( $extension, $conf['picture_ext'] ) )
+  {
+    array_push( $result['error'], $lang['upload_advise_filetype'] );
+    return $result;
+  }
+  if ( !isset( $_FILES['picture'] ) )
+  {
+    // do we even have a file?
+    array_push( $result['error'], "You did not upload anything!" );
+  }
+  else if ( $_FILES['picture']['size'] > $my_max_file_size * 1024 )
+  {
+    array_push( $result['error'],
+                $lang['upload_advise_filesize'].$my_max_file_size.' KB' );
+  }
+  else
+  {
+    // check if we are allowed to upload this file_type
+    // upload de la photo sous un nom temporaire
+    if ( !move_uploaded_file( $_FILES['picture']['tmp_name'], $temp_name ) )
+    {
+      array_push( $result['error'], $lang['upload_cannot_upload'] );
+    }
+    else
+    {
+      $size = getimagesize( $temp_name );
+      if ( isset( $image_max_width )
+           and $image_max_width != ""
+           and $size[0] > $image_max_width )
+      {
+        array_push( $result['error'],
+                    $lang['upload_advise_width'].$image_max_width.' px' );
+      }
+      if ( isset( $image_max_height )
+           and $image_max_height != ""
+           and $size[1] > $image_max_height )
+      {
+        array_push( $result['error'],
+                    $lang['upload_advise_height'].$image_max_height.' px' );
+      }
+      // $size[2] == 1 means GIF
+      // $size[2] == 2 means JPG
+      // $size[2] == 3 means PNG
+      switch ( $size[2] )
+      {
+      case 1 : $result['type'] = 'gif'; break;
+      case 2 : $result['type'] = 'jpg'; break;
+      case 3 : $result['type'] = 'png'; break;
+      default :
+        array_push( $result['error'], $lang['upload_advise_filetype'] );  
+      }
+    }
+  }
+  if ( sizeof( $result['error'] ) > 0 )
+  {
+    // destruction de l'image avec le nom temporaire
+    @unlink( $temp_name );
+  }
+  else
+  {
+  	@chmod( $temp_name, 0644);
+  }
+  return $result;
+}	
+//----------------------------------------------------------- personnal include
+include_once( './include/init.inc.php' );
+//-------------------------------------------------- access authorization check
+check_login_authorization();
+check_cat_id( $_GET['cat'] );
+if ( isset( $page['cat'] ) and is_numeric( $page['cat'] ) )
+{
+  check_restrictions( $page['cat'] );
+  $result = get_cat_info( $page['cat'] );
+  $page['cat_dir']        = get_complete_dir( $page['cat'] );
+  $page['cat_site_id']    = $result['site_id'];
+  $page['cat_name']       = $result['name'];
+  $page['cat_uploadable'] = $result['uploadable'];
+if ( $page['cat_site_id'] != 1
+     or !$conf['upload_available']
+     or !$page['cat_uploadable'] )
+{
+  echo '<div style="text-align:center;">'.$lang['upload_forbidden'].'<br />';
+  echo '<a href="'.add_session_id( './category.php' ).'">';
+  echo $lang['thumbnails'].'</a></div>';
+  exit();
+}
+}
+//----------------------------------------------------- template initialization
+//
+// Start output of page
+//
+$title= $lang['upload_title'];
+include('include/page_header.php');
+$handle = $vtp->Open( './template/'.$user['template'].'/upload.vtp' );
+initialize_template();
+
+$tpl = array( 'upload_title', 'upload_username', 'mail_address', 'submit',
+              'upload_successful', 'search_return_main_page','upload_author',
+              'upload_name','upload_creation_date','upload_comment',
+              'mandatory' );
+templatize_array( $tpl, 'lang', $handle );
+
+$error = array();
+$page['upload_successful'] = false;
+if ( isset( $_GET['waiting_id'] ) )
+{
+  $page['waiting_id'] = $_GET['waiting_id'];
+}
+//-------------------------------------------------------------- picture upload
+// verfying fields
+if ( isset( $_POST['submit'] ) and !isset( $_GET['waiting_id'] ) )
+{
+  $path = $page['cat_dir'].$_FILES['picture']['name'];
+  if ( @is_file( $path ) )
+  {
+    array_push( $error, $lang['upload_file_exists'] );
+  }
+  // test de la présence des champs obligatoires
+  if ( $_FILES['picture']['name'] == '' )
+  {
+    array_push( $error, $lang['upload_filenotfound'] );
+  }
+  if ( !ereg( "([_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+)",
+             $_POST['mail_address'] ) )
+  {
+    array_push( $error, $lang['reg_err_mail_address'] );
+  }
+  if ( $_POST['username'] == '' )
+  {
+    array_push( $error, $lang['upload_err_username'] );
+  }
+  
+  $date_creation = '';
+  if ( $_POST['date_creation'] != '' )
+  {
+    list( $day,$month,$year ) = explode( '/', $_POST['date_creation'] );
+    // int checkdate ( int month, int day, int year)
+    if ( checkdate( $month, $day, $year ) )
+    {
+      // int mktime ( int hour, int minute, int second,
+      //              int month, int day, int year [, int is_dst])
+      $date_creation = mktime( 0, 0, 0, $month, $day, $year );
+    }
+    else
+    {
+      array_push( $error, $lang['err_date'] );
+    }
+  }
+  // creation of the "infos" field :
+  // <infos author="Pierrick LE GALL" comment="my comment"
+  //        date_creation="1056891767" name="" />
+  $xml_infos = '<infos';
+  $xml_infos.= ' author="'.htmlspecialchars($_POST['author'],ENT_QUOTES).'"';
+  $xml_infos.= ' comment="'.htmlspecialchars($_POST['comment'],ENT_QUOTES).'"';
+  $xml_infos.= ' date_creation="'.$date_creation.'"';
+  $xml_infos.= ' name="'.htmlspecialchars( $_POST['name'], ENT_QUOTES).'"';
+  $xml_infos.= ' />';
+
+  if ( !preg_match( '/^[a-zA-Z0-9-_.]+$/', $_FILES['picture']['name'] ) )
+  {
+    // reload language file with administration labels
+    $isadmin = true;
+    include( './language/'.$user['language'].'.php' );
+    array_push( $error, $lang['update_wrong_dirname'] );
+  }
+  
+  if ( sizeof( $error ) == 0 )
+  {
+    $result = validate_upload( $path, $conf['upload_maxfilesize'],
+                               $conf['upload_maxwidth'],
+                               $conf['upload_maxheight']  );
+    for ( $j = 0; $j < sizeof( $result['error'] ); $j++ )
+    {
+      array_push( $error, $result['error'][$j] );
+    }
+  }
+
+  if ( sizeof( $error ) == 0 )
+  {
+    $query = 'insert into '.PREFIX_TABLE.'waiting';
+    $query.= ' (storage_category_id,file,username,mail_address,date,infos)';
+    $query.= ' values ';
+    $query.= '('.$page['cat'].",'".$_FILES['picture']['name']."'";
+    $query.= ",'".htmlspecialchars( $_POST['username'], ENT_QUOTES)."'";
+    $query.= ",'".$_POST['mail_address']."',".time().",'".$xml_infos."')";
+    $query.= ';';
+    mysql_query( $query );
+    $page['waiting_id'] = mysql_insert_id();
+    // mail notification for administrators
+    if ( $conf['mail_notification'] )
+    {
+      notify( 'upload' );
+    }
+  }
+}
+//------------------------------------------------------------ thumbnail upload
+if ( isset( $_POST['submit'] ) and isset( $_GET['waiting_id'] ) )
+{
+  // upload of the thumbnail
+  $query = 'select file';
+  $query.= ' from '.PREFIX_TABLE.'waiting';
+  $query.= ' where id = '.$_GET['waiting_id'];
+  $query.= ';';
+  $result= mysql_query( $query );
+  $row = mysql_fetch_array( $result );
+  $file = substr ( $row['file'], 0, strrpos ( $row['file'], ".") );
+  $extension = get_extension( $_FILES['picture']['name'] );
+  $path = $page['cat_dir'].'thumbnail/';
+  $path.= $conf['prefix_thumbnail'].$file.'.'.$extension;
+  $result = validate_upload( $path, $conf['upload_maxfilesize'],
+                             $conf['upload_maxwidth_thumbnail'],
+                             $conf['upload_maxheight_thumbnail']  );
+  for ( $j = 0; $j < sizeof( $result['error'] ); $j++ )
+  {
+    array_push( $error, $result['error'][$j] );
+  }
+  if ( sizeof( $error ) == 0 )
+  {
+    $query = 'update '.PREFIX_TABLE.'waiting';
+    $query.= " set tn_ext = '".$extension."'";
+    $query.= ' where id = '.$_GET['waiting_id'];
+    $query.= ';';
+    mysql_query( $query );
+    $page['upload_successful'] = true;
+  }
+}
+
+if ( !$page['upload_successful'] )
+{
+  $vtp->addSession( $handle, 'upload_not_successful' );
+//-------------------------------------------------------------- errors display
+  if ( sizeof( $error ) != 0 )
+  {
+    $vtp->addSession( $handle, 'errors' );
+    for ( $i = 0; $i < sizeof( $error ); $i++ )
+    {
+      $vtp->addSession( $handle, 'li' );
+      $vtp->setVar( $handle, 'li.li', $error[$i] );
+      $vtp->closeSession( $handle, 'li' );
+    }
+    $vtp->closeSession( $handle, 'errors' );
+  }
+//----------------------------------------------------------------- form action
+  $url = './upload.php?cat='.$page['cat'].'&amp;expand='.$_GET['expand'];
+  if ( isset( $page['waiting_id'] ) )
+  {
+    $url.= '&amp;waiting_id='.$page['waiting_id'];
+  }
+  $vtp->setGlobalVar( $handle, 'form_action', add_session_id( $url ) );
+//--------------------------------------------------------------------- advises
+  if ( $conf['upload_maxfilesize'] != '' )
+  {
+    $vtp->addSession( $handle, 'advise' );
+    $content = $lang['upload_advise_filesize'];
+    $content.= $conf['upload_maxfilesize'].' KB';
+    $vtp->setVar( $handle, 'advise.content', $content );
+    $vtp->closeSession( $handle, 'advise' );
+  }
+  if ( isset( $page['waiting_id'] ) )
+  {
+    $advise_title=$lang['upload_advise_thumbnail'].$_FILES['picture']['name'];
+    $vtp->setGlobalVar( $handle, 'advise_title', $advise_title );
+
+    if ( $conf['upload_maxwidth_thumbnail'] != '' )
+    {
+      $vtp->addSession( $handle, 'advise' );
+      $content = $lang['upload_advise_width'];
+      $content.= $conf['upload_maxwidth_thumbnail'].' px';
+      $vtp->setVar( $handle, 'advise.content', $content );
+      $vtp->closeSession( $handle, 'advise' );
+    }
+    if ( $conf['upload_maxheight_thumbnail'] != '' )
+    {
+      $vtp->addSession( $handle, 'advise' );
+      $content = $lang['upload_advise_height'];
+      $content.= $conf['upload_maxheight_thumbnail'].' px';
+      $vtp->setVar( $handle, 'advise.content', $content );
+      $vtp->closeSession( $handle, 'advise' );
+    }
+  }
+  else
+  {
+    $advise_title = $lang['upload_advise'];
+    $advise_title.= get_cat_display_name( $page['cat_name'], ' - ',
+                                          'font-style:italic;' );
+    $vtp->setGlobalVar( $handle, 'advise_title', $advise_title );
+
+    if ( $conf['upload_maxwidth'] != '' )
+    {
+      $vtp->addSession( $handle, 'advise' );
+      $content = $lang['upload_advise_width'];
+      $content.= $conf['upload_maxwidth'].' px';
+      $vtp->setVar( $handle, 'advise.content', $content );
+      $vtp->closeSession( $handle, 'advise' );
+    }
+    if ( $conf['upload_maxheight'] != '' )
+    {
+      $vtp->addSession( $handle, 'advise' );
+      $content = $lang['upload_advise_height'];
+      $content.= $conf['upload_maxheight'].' px';
+      $vtp->setVar( $handle, 'advise.content', $content );
+      $vtp->closeSession( $handle, 'advise' );
+    }
+  }
+  $vtp->addSession( $handle, 'advise' );
+  $content = $lang['upload_advise_filetype'];
+  $vtp->setVar( $handle, 'advise.content', $content );
+  $vtp->closeSession( $handle, 'advise' );
+//----------------------------------------- optionnal username and mail address
+  if ( !isset( $page['waiting_id'] ) )
+  {
+    $vtp->addSession( $handle, 'fields' );
+    // username
+    if ( isset( $_POST['username'] ) ) $username = $_POST['username'];
+    else                               $username = $user['username'];
+    $vtp->setVar( $handle, 'fields.username',  $username );
+    // mail address
+    if ( isset( $_POST['mail_address'] ) )$mail_address=$_POST['mail_address'];
+    else                                  $mail_address=$user['mail_address'];
+    $vtp->setGlobalVar( $handle, 'user_mail_address',$user['mail_address'] );
+    // name of the picture
+	if (isset($_POST['name']))
+    $vtp->setVar( $handle, 'fields.name', $_POST['name'] );
+    // author
+	if (isset($_POST['author']))
+    $vtp->setVar( $handle, 'fields.author', $_POST['author'] );
+    // date of creation
+	if (isset($_POST['date_creation']))
+    $vtp->setVar( $handle, 'fields.date_creation', $_POST['date_creation'] );
+    // comment
+	if (isset($_POST['comment']))
+    $vtp->setVar( $handle, 'fields.comment', $_POST['comment'] );
+
+    $vtp->closeSession( $handle, 'fields' );
+
+    $vtp->addSession( $handle, 'note' );
+    $vtp->closeSession( $handle, 'note' );
+  }
+  $vtp->closeSession( $handle, 'upload_not_successful' );
+}
+else
+{
+  $vtp->addSession( $handle, 'upload_successful' );
+  $vtp->closeSession( $handle, 'upload_successful' );
+}
+//----------------------------------------------------- return to main page url
+$url = './category.php?cat='.$page['cat'].'&amp;expand='.$_GET['expand'];
+$vtp->setGlobalVar( $handle, 'return_url', add_session_id( $url ) );
+//----------------------------------------------------------- html code display
+$output.= $vtp->Display( $handle, 0 );
+include('include/page_tail.php');
+?>
