aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin.php41
-rw-r--r--admin/admin_phpinfo.php82
-rw-r--r--admin/cat_list.php592
-rw-r--r--admin/cat_modify.php2
-rw-r--r--admin/comments.php273
-rw-r--r--admin/configuration.php11
-rw-r--r--admin/include/functions.php20
-rw-r--r--admin/update.php31
-rw-r--r--category.php36
-rw-r--r--include/common.inc.php11
-rw-r--r--include/functions.inc.php13
-rw-r--r--include/functions_category.inc.php42
-rw-r--r--include/functions_user.inc.php1
-rw-r--r--include/htmlfunctions.inc.php (renamed from template/default/htmlfunctions.inc.php)59
-rw-r--r--language/en_UK.iso-8859-1/admin.lang.php203
-rw-r--r--language/en_UK.iso-8859-1/common.lang.php87
-rw-r--r--picture.php2
-rw-r--r--template/default/admin.tpl76
-rw-r--r--template/default/admin/cat_list.tpl55
-rw-r--r--template/default/admin/cat_list.vtp110
-rw-r--r--template/default/admin/configuration.tpl171
-rw-r--r--template/default/admin/help.tpl2
-rw-r--r--template/default/admin/images/icon_folder.gifbin0 -> 677 bytes
-rw-r--r--template/default/admin/images/icon_folder_link.gifbin0 -> 714 bytes
-rw-r--r--template/default/admin/images/icon_folder_lock.gifbin0 -> 673 bytes
-rw-r--r--template/default/admin/images/icon_subfolder.gifbin0 -> 705 bytes
-rw-r--r--template/default/category.tpl2
-rw-r--r--template/default/comments.tpl2
-rw-r--r--template/default/default.css59
-rw-r--r--upload.php2
30 files changed, 807 insertions, 1178 deletions
diff --git a/admin.php b/admin.php
index 7d32565c8..0076d1fb3 100644
--- a/admin.php
+++ b/admin.php
@@ -89,6 +89,8 @@ switch ( $_GET['page'] )
$title = $lang['title_update']; $page_valide = true; break;
case 'configuration':
$title = $lang['title_configuration']; $page_valide = true; break;
+ case 'admin_phpinfo':
+ $title = $lang['phpinfos']; $page_valide = true; break;
case 'help':
$title = $lang['title_instructions']; $page_valide = true; break;
case 'cat_perm':
@@ -172,25 +174,38 @@ include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->set_filenames( array('admin'=>'admin.tpl') );
$template->assign_vars(array(
- 'L_CONFIG'=>$lang['menu_config'],
- 'L_USERS'=>$lang['menu_users'],
- 'L_GROUPS'=>$lang['menu_groups'],
- 'L_CATEGORIES'=>$lang['menu_categories'],
- 'L_WAITING'=>$lang['menu_waiting'].$nb_waiting,
- 'L_COMMENTS'=>$lang['menu_comments'].$nb_comments,
- 'L_UPDATE'=>$lang['menu_update'],
- 'L_THUMBNAILS'=>$lang['menu_thumbnails'],
- 'L_HISTORY'=>$lang['menu_history'],
- 'L_FAQ'=>$lang['menu_instructions'],
- 'L_RETURN'=>$lang['menu_back'],
-
+ 'L_TITLE'=>$lang['admin_panel'],
+ 'L_LINKS'=>$lang['links'],
+ 'L_GALLERY_INDEX'=>$lang['gallery_index'],
+ 'L_GENERAL'=>$lang['general'],
+ 'L_CONFIG'=>$lang['config'],
+ 'L_SITES'=>$lang['remote_site'],
+ 'L_DEFAULT'=>$lang['gallery_default'],
+ 'L_PHPINFO'=>$lang['phpinfos'],
+ 'L_HISTORY'=>$lang['history'],
+ 'L_FAQ'=>$lang['instructions'],
+ 'L_CATEGORIES'=>$lang['categories'],
+ 'L_MANAGE'=>$lang['manage'],
+ 'L_UPLOAD'=>$lang['upload'],
+ 'L_IMAGES'=>$lang['pictures'],
+ 'L_WAITING'=>$lang['waiting'].$nb_waiting,
+ 'L_COMMENTS'=>$lang['comments'].$nb_comments,
+ 'L_THUMBNAILS'=>$lang['thumbnails'],
+ 'L_IDENTIFY'=>$lang['identification'],
+ 'L_USERS'=>$lang['users'],
+ 'L_GROUPS'=>$lang['groups'],
+ 'L_AUTH'=>$lang['permissions'],
+ 'L_UPDATE'=>$lang['update'],
+
'U_CONFIG'=>add_session_id($link_start.'configuration' ),
+ 'U_PHPINFO'=>add_session_id($link_start.'admin_phpinfo' ),
'U_USERS'=>add_session_id($link_start.'user_search' ),
'U_GROUPS'=>add_session_id($link_start.'group_list' ),
'U_CATEGORIES'=>add_session_id($link_start.'cat_list' ),
'U_WAITING'=>add_session_id($link_start.'waiting' ),
'U_COMMENTS'=>add_session_id($link_start.'comments' ),
- 'U_UPDATE'=>add_session_id($link_start.'update' ),
+ 'U_CAT_UPDATE'=>add_session_id($link_start.'update&update=cats' ),
+ 'U_IMG_UPDATE'=>add_session_id($link_start.'update&update=all' ),
'U_THUMBNAILS'=>add_session_id($link_start.'thumbnail' ),
'U_HISTORY'=>add_session_id($link_start.'stats' ),
'U_FAQ'=>add_session_id($link_start.'help' ),
diff --git a/admin/admin_phpinfo.php b/admin/admin_phpinfo.php
new file mode 100644
index 000000000..db0b52bb6
--- /dev/null
+++ b/admin/admin_phpinfo.php
@@ -0,0 +1,82 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | admin_phpinfo.php |
+// +-----------------------------------------------------------------------+
+// | application : PhpWebGallery <http://phpwebgallery.net> |
+// | branch : BSF (Best So Far) |
+// +-----------------------------------------------------------------------+
+// | file : $RCSfile$
+// | last update : $Date$
+// | last modifier : $Author$
+// | revision : $Revision$
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify |
+// | it under the terms of the GNU General Public License as published by |
+// | the Free Software Foundation |
+// | |
+// | This program is distributed in the hope that it will be useful, but |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
+// | General Public License for more details. |
+// | |
+// | You should have received a copy of the GNU General Public License |
+// | along with this program; if not, write to the Free Software |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA. |
+// +-----------------------------------------------------------------------+
+
+if( !defined("PHPWG_ROOT_PATH") )
+{
+ die ("Hacking attempt!");
+}
+
+include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' );
+
+ob_start();
+phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES);
+$phpinfo = ob_get_contents();
+ob_end_clean();
+
+// Get used layout
+$layout = (preg_match('#bgcolor#i', $phpinfo)) ? 'old' : 'new';
+$output='';
+// Here we play around a little with the PHP Info HTML to try and stylise
+// it along phpBB's lines ... hopefully without breaking anything. The idea
+// for this was nabbed from the PHP annotated manual
+preg_match_all('#<body[^>]*>(.*)</body>#siU', $phpinfo, $output);
+
+switch ($layout)
+{
+ case 'old':
+ $output = preg_replace('#<table#', '<table class="table1"', $output[1][0]);
+ $output = preg_replace('# bgcolor="\#(\w){6}"#', '', $output);
+ $output = preg_replace('#(\w),(\w)#', '\1, \2', $output);
+ $output = preg_replace('#border="0" cellpadding="3" cellspacing="1" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);
+ $output = preg_replace('#<tr valign="top"><td align="left">(.*?<a .*?</a>)(.*?)</td></tr>#s', '<tr class="row1"><td style="{background-color: #9999cc;}"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td style="{background-color: #9999cc;}">\2</td><td style="{background-color: #9999cc;}">\1</td></tr></table></td></tr>', $output);
+ $output = preg_replace('#<tr valign="baseline"><td[ ]{0,1}><b>(.*?)</b>#', '<tr><td class="row1" nowrap="nowrap">\1', $output);
+ $output = preg_replace('#<td align="(center|left)">#', '<td class="row2">', $output);
+ $output = preg_replace('#<td>#', '<td class="row2">', $output);
+ $output = preg_replace('#valign="middle"#', '', $output);
+ $output = preg_replace('#<tr >#', '<tr>', $output);
+ $output = preg_replace('#<hr(.*?)>#', '', $output);
+ $output = preg_replace('#<h1 align="center">#i', '<h1>', $output);
+ $output = preg_replace('#<h2 align="center">#i', '<h2>', $output);
+ break;
+ case 'new':
+ $output = preg_replace('#<table#', '<table class="table1" align="center"', $output[1][0]);
+ $output = preg_replace('#(\w),(\w)#', '\1, \2', $output);
+ $output = preg_replace('#border="0" cellpadding="3" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);
+ $output = preg_replace('#<tr class="v"><td>(.*?<a .*?</a>)(.*?)</td></tr>#s', '<tr class="throw"><td><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td>\2</td><td>\1</td></tr></table></td></tr>', $output);
+ $output = preg_replace('#<td>#', '<td style="{background-color: #9999cc;}">', $output);
+ $output = preg_replace('#<th>#', '<th class="throw">', $output);
+ $output = preg_replace('#class="e"#', 'class="row1" nowrap="nowrap"', $output);
+ $output = preg_replace('#class="v"#', 'class="row2"', $output);
+ $output = preg_replace('# class="h"#', '', $output);
+ $output = preg_replace('#<hr />#', '', $output);
+ preg_match_all('#<div class="center">(.*)</div>#siU', $output, $output);
+ $output = $output[1][0];
+ break;
+}
+$template->assign_var('ADMIN_CONTENT',$output);
+
+?> \ No newline at end of file
diff --git a/admin/cat_list.php b/admin/cat_list.php
index 95cf066ce..1f021bf0c 100644
--- a/admin/cat_list.php
+++ b/admin/cat_list.php
@@ -24,442 +24,262 @@
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// | USA. |
// +-----------------------------------------------------------------------+
-include_once( './admin/include/isadmin.inc.php' );
-//----------------------------------------------------- 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
+if( !defined("PHPWG_ROOT_PATH") )
+{
+ die ("Hacking attempt!");
+}
+include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' );
+
$errors = array();
-if ( isset( $_POST['submit'] ) )
+$categories=array();
+$navigation=$lang['gallery_index'];
+
+//--------------------------------------------------- virtual categories
+if ( isset( $_GET['delete'] ) && is_numeric( $_GET['delete'] ) )
+{
+ delete_category( $_GET['delete'] );
+ synchronize_all_users();
+}
+elseif ( 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'] == '' )
- {
- $_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 )
+
+ if ( !count( $errors ))
{
// 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'].")";
+ $parent_id = !empty($_GET['parent_id'])?$_GET['parent_id']:'NULL';
+ $query = 'INSERT INTO '.CATEGORIES_TABLE;
+ $query.= ' (name,id_uppercat,rank) VALUES ';
+ $query.= " ('".$_POST['virtual_name']."',".$parent_id.",".$_POST['rank'].")";
$query.= ';';
mysql_query( $query );
synchronize_all_users();
}
}
-//--------------------------------------------------------------- rank updates
-if ( isset( $_GET['up'] ) and is_numeric( $_GET['up'] ) )
+
+// Cache management
+
+$query = 'SELECT * FROM '.CATEGORIES_TABLE;
+if ( !isset($_GET['parent_id']))
{
- // 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 );
+ $query.= ' WHERE id_uppercat IS NULL';
}
-if ( isset( $_GET['down'] ) and is_numeric( $_GET['down'] ) )
+else
{
- // 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 );
+ $query.= ' WHERE id_uppercat = '.$_GET['parent_id'];
}
-if ( isset( $_GET['last'] ) and is_numeric( $_GET['last'] ) )
+$query.= ' ORDER BY rank ASC';
+$query.= ';';
+$result = mysql_query( $query );
+while ( $row = mysql_fetch_assoc( $result ) )
{
- // 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 );
+ $categories[$row['rank']]=$row;
}
-if ( isset( $_GET['first'] ) and is_numeric( $_GET['first'] ) )
+
+// Navigation path
+if (isset($_GET['parent_id']))
{
- // 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 );
+ $current_category = get_cat_info($_GET['parent_id']);
+ $url = PHPWG_ROOT_PATH.'admin.php?page=cat_list&amp;parent_id=';
+ $navigation = '<a class="" href="'.add_session_id(PHPWG_ROOT_PATH.'admin.php?page=cat_list').'">';
+ $navigation.= $lang['gallery_index'].'</a>-&gt;';
+ $navigation.= get_cat_display_name($current_category['name'], '-&gt;', $url);
}
-if ( isset( $_GET['delete'] ) and is_numeric( $_GET['delete'] ) )
+
+//--------------------------------------------------------------- rank updates
+$current_rank=0;
+if ( isset( $_GET['up'] ) && is_numeric( $_GET['up'] ))
{
- delete_category( $_GET['delete'] );
- synchronize_all_users();
+ // 1. searching the id of the category just above at the same level
+ while (list ($id,$current) = each($categories))
+ {
+ if ($current['id'] == $_GET['up'])
+ {
+ $current_rank = $current['rank'];
+ break;
+ }
+ }
+ if ($current_rank>1)
+ {
+ // 2. Exchanging ranks between the two categories
+ $query = 'UPDATE '.CATEGORIES_TABLE;
+ $query.= ' SET rank = '.($current_rank-1);
+ $query.= ' WHERE id = '.$_GET['up'];
+ $query.= ';';
+ mysql_query( $query );
+ $query = 'UPDATE '.CATEGORIES_TABLE;
+ $query.= ' SET rank = '.$current_rank;
+ $query.= ' WHERE id = '.$categories[($current_rank-1)]['id'];
+ $query.= ';';
+ mysql_query( $query );
+ // 3. Updating the cache array
+ $categories[$current_rank]=$categories[($current_rank-1)];
+ $categories[($current_rank-1)] = $current;
+ }
+ else
+ {
+ // 2. Updating the rank of our category to be after the previous max rank
+ $query = 'UPDATE '.CATEGORIES_TABLE;
+ $query.= ' SET rank = '.(count($categories) + 1);
+ $query.= ' WHERE id = '.$_GET['up'];
+ $query.= ';';
+ mysql_query( $query );
+ $query = 'UPDATE '.CATEGORIES_TABLE;
+ $query.= ' SET rank = rank-1';
+ $query.= ' WHERE id_uppercat ';
+ $query.= empty($_GET['parent_id'])?'IS NULL':('= '.$_GET['parent_id']);
+ $query.= ';';
+ mysql_query( $query );
+ // 3. Updating the cache array
+ array_push($categories, $current);
+ array_shift($categories);
+ }
}
-//------------------------------------------------------------------ reordering
-function ordering( $id_uppercat )
+elseif ( isset( $_GET['down'] ) && is_numeric( $_GET['down'] ) )
{
- $rank = 1;
-
- $query = 'SELECT id';
- $query.= ' FROM '.PREFIX_TABLE.'categories';
- if ( !is_numeric( $id_uppercat ) )
+ // 1. searching the id of the category just above at the same level
+ while (list ($id,$current) = each($categories))
{
- $query.= ' WHERE id_uppercat IS NULL';
+ if ($current['id'] == $_GET['down'])
+ {
+ $current_rank = $current['rank'];
+ break;
+ }
}
- else
+ if ($current_rank < count($categories))
{
- $query.= ' WHERE id_uppercat = '.$id_uppercat;
+ // 2. Exchanging ranks between the two categories
+ $query = 'UPDATE '.CATEGORIES_TABLE;
+ $query.= ' SET rank = '.($current_rank+1);
+ $query.= ' WHERE id = '.$_GET['down'];
+ $query.= ';';
+ mysql_query( $query );
+ $query = 'UPDATE '.CATEGORIES_TABLE;
+ $query.= ' SET rank = '.$current_rank;
+ $query.= ' WHERE id = '.$categories[($current_rank+1)]['id'];
+ $query.= ';';
+ mysql_query( $query );
+ // 3. Updating the cache array
+ $categories[$current_rank]=$categories[($current_rank+1)];
+ $categories[($current_rank+1)] = $current;
}
- $query.= ' ORDER BY rank ASC, dir ASC';
- $query.= ';';
- $result = mysql_query( $query );
- while ( $row = mysql_fetch_array( $result ) )
+ else
{
- $query = 'UPDATE '.PREFIX_TABLE.'categories';
- $query.= ' SET rank = '.$rank;
- $query.= ' WHERE id = '.$row['id'];
+ // 2. updating the rank of our category to be the first one
+ $query = 'UPDATE '.CATEGORIES_TABLE;
+ $query.= ' SET rank = 0';
+ $query.= ' WHERE id = '.$_GET['down'];
$query.= ';';
mysql_query( $query );
- $rank++;
- ordering( $row['id'] );
+ $query = 'UPDATE '.CATEGORIES_TABLE;
+ $query.= ' SET rank = (rank+1)';
+ $query.= ' WHERE id_uppercat ';
+ $query.= empty($_GET['parent_id'])?'IS NULL':('= '.$_GET['parent_id']);
+ $query.= ';';
+ mysql_query( $query );
+ // 3. Updating the cache array
+ array_unshift($categories, $current);
+ array_pop($categories);
}
}
-ordering( 'NULL' );
+reset($categories);
+
+//----------------------------------------------------- template initialization
+$template->set_filenames( array('categories'=>'admin/cat_list.tpl') );
+
+$template->assign_vars(array(
+ 'CATEGORIES_NAV'=>$navigation,
+ 'NEXT_RANK'=>count($categories)+1,
+
+ 'L_ADD_VIRTUAL'=>$lang['cat_add'],
+ 'L_SUBMIT'=>$lang['submit'],
+ 'L_STORAGE'=>$lang['storage'],
+ 'L_NB_IMG'=>$lang['pictures'],
+ 'L_MOVE_UP'=>$lang['cat_up'],
+ 'L_MOVE_DOWN'=>$lang['cat_down'],
+ 'L_EDIT'=>$lang['edit'],
+ 'L_INFO_IMG'=>$lang['cat_image_info'],
+ 'L_DELETE'=>$lang['delete']
+ ));
+
+$tpl = array( 'cat_first','cat_last');
+
//-------------------------------------------------------------- errors display
-if ( count( $errors ) != 0 )
+if ( sizeof( $errors ) != 0 )
{
- $vtp->addSession( $sub, 'errors' );
- foreach ( $errors as $error ) {
- $vtp->addSession( $sub, 'li' );
- $vtp->setVar( $sub, 'li.content', $error );
- $vtp->closeSession( $sub, 'li' );
+ $template->assign_block_vars('errors',array());
+ for ( $i = 0; $i < sizeof( $errors ); $i++ )
+ {
+ $template->assign_block_vars('errors.error',array('ERROR'=>$errors[$i]));
}
- $vtp->closeSession( $sub, 'errors' );
}
-//---------------------------------------------------------------- page display
-function display_cat_manager( $id_uppercat, $indent,
- $uppercat_visible, $level )
+//----------------------------------------------------------- Categories display
+while (list ($id,$category) = each($categories))
{
- 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 ) )
+
+ if ($category['status'] == 'private')
{
- $query.= ' WHERE id_uppercat IS NULL';
+ $category_image = '<img src="'.PHPWG_ROOT_PATH.'template/'.$user['template'].'/admin/images/icon_folder_lock.gif"
+ width="46" height="25" alt="'.$lang['cat_private'].'" title="'.$lang['cat_private'].'"/>';
+ }
+ elseif (empty($category['dir']))
+ {
+ $category_image = '<img src="'.PHPWG_ROOT_PATH.'template/'.$user['template'].'/admin/images/icon_folder_link.gif"
+ width="46" height="25" alt="'.$lang['cat_virtual'].'" title="'.$lang['cat_virtual'].'"/>';
}
else
{
- $query.= ' WHERE id_uppercat = '.$id_uppercat;
+ // May be should we have to introduce a computed field in the table to avoid this query
+ $query = 'SELECT COUNT(id) as sub_cats FROM ' . CATEGORIES_TABLE . ' WHERE id_uppercat = '.$category['id'];
+ $result = mysql_fetch_array(mysql_query( $query ));
+ $category_image = ($result['sub_cats']) ?
+ '<img src="'.PHPWG_ROOT_PATH.'template/'.$user['template'].'/admin/images/icon_subfolder.gif" width="46" height="25" alt="" />' :
+ '<img src="'.PHPWG_ROOT_PATH.'template/'.$user['template'].'/admin/images/icon_folder.gif" width="46" height="25" alt="" />';
}
- $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 ) )
+
+ if ( !isset( $category['dir'] ) ) $category['dir'] = '';
+ $simple_url = PHPWG_ROOT_PATH.'admin.php?page=cat_list&amp;';
+ $url = $simple_url;
+ if (isset($_GET['parent_id']))
+ $url = $simple_url.'parent_id='.$_GET['parent_id'].'&amp;';
+
+ $template->assign_block_vars('category' ,array(
+ 'CATEGORY_IMG'=>$category_image,
+ 'CATEGORY_NAME'=>$category['name'],
+ 'CATEGORY_DIR'=>$category['dir'],
+ 'CATEGORY_NB_IMG'=>$category['nb_images'],
+
+ 'U_CATEGORY'=>add_session_id( $simple_url.'parent_id='.$category['id']),
+ 'U_MOVE_UP'=>add_session_id( $url.'up='.$category['id'] ),
+ 'U_MOVE_DOWN'=>add_session_id( $url.'down='.$category['id'] ),
+ 'U_CAT_EDIT'=>add_session_id( PHPWG_ROOT_PATH.'admin.php?page=cat_modify&amp;cat_id='.$row['id'] ),
+ 'U_CAT_DELETE'=>add_session_id( $url.'delete='.$category['id'] ),
+ 'U_INFO_IMG'=>add_session_id( PHPWG_ROOT_PATH.'admin.php?page=infos_images&amp;cat_id='.$row['id'] ),
+ 'U_CAT_UPDATE'=>add_session_id( PHPWG_ROOT_PATH.'admin.php?page=update&amp;update='.$row['id'] )
+ ));
+
+ if ( !empty($category['dir']))
{
- $query.= ' WHERE id_uppercat IS NULL';
+ $template->assign_block_vars('category.storage' ,array());
}
else
{
- $query.= ' WHERE id_uppercat = '.$id_uppercat;
+ $template->assign_block_vars('category.virtual' ,array());
}
- $query.= ' ORDER BY rank ASC';
- $query.= ';';
- $result = mysql_query( $query );
- while ( $row = mysql_fetch_array( $result ) )
+ $url = add_session_id( './admin.php?page=cat_modify&amp;cat='.$row['id'] );
+ if ( $category['nb_images'] > 0 )
{
- $subcat_visible = true;
- if ( !isset( $row['dir'] ) ) $row['dir'] = '';
-
- $vtp->addSession( $sub, 'cat' );
- // is the category expanded or not ?
- if ( isset($page['expand']) && $page['expand'] == 'all' )
- {
- $vtp->addSession( $sub, 'bullet_wo_link' );
- $vtp->closeSession( $sub, 'bullet_wo_link' );
- }
- else if ( isset($page['tab_expand']) && 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 );
+ $template->assign_block_vars('category.image_info' ,array());
+ }
+ else
+ {
+ $template->assign_block_vars('category.no_image_info' ,array());
}
}
-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 );
+$template->assign_var_from_handle('ADMIN_CONTENT', 'categories');
?>
diff --git a/admin/cat_modify.php b/admin/cat_modify.php
index 2f08f8f81..ba1cd7d9d 100644
--- a/admin/cat_modify.php
+++ b/admin/cat_modify.php
@@ -129,7 +129,7 @@ if ( !isset( $row['id_uppercat'] ) ) $row['id_uppercat'] = '';
$result = get_cat_info( $row['id'] );
// cat name
-$cat_name = get_cat_display_name( $result['name'], ' - ', '' );
+$cat_name = get_cat_display_name( $result['name'], ' - ' );
$vtp->setVar( $sub, 'cat:name', $cat_name );
// cat dir
if ( $row['dir'] != '' )
diff --git a/admin/comments.php b/admin/comments.php
deleted file mode 100644
index f6672e5a2..000000000
--- a/admin/comments.php
+++ /dev/null
@@ -1,273 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | comments.php |
-// +-----------------------------------------------------------------------+
-// | application : PhpWebGallery <http://phpwebgallery.net> |
-// | branch : BSF (Best So Far) |
-// +-----------------------------------------------------------------------+
-// | file : $RCSfile$
-// | last update : $Date$
-// | last modifier : $Author$
-// | revision : $Revision$
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-include_once( './admin/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 = $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 );
-?>
diff --git a/admin/configuration.php b/admin/configuration.php
index ba77a72f7..92243fb01 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -249,8 +249,8 @@ $template->assign_vars(array(
'L_ACCESS_INFO'=>$lang['conf_general_access_info'],
'L_ACCESS_FREE'=>$lang['conf_general_access_1'],
'L_ACCESS_RESTRICTED'=>$lang['conf_general_access_2'],
- 'L_HISTORY'=>$lang['conf_general_log'],
- 'L_HISTORY_INFO'=>$lang['conf_general_log_info'],
+ 'L_CONF_HISTORY'=>$lang['history'],
+ 'L_CONF_HISTORY_INFO'=>$lang['conf_general_log_info'],
'L_MAIL_NOTIFICATION'=>$lang['conf_general_mail_notification'],
'L_MAIL_NOTIFICATION_INFO'=>$lang['conf_general_mail_notification_info'],
'L_CONF_COMMENTS'=>$lang['conf_comments_title'],
@@ -279,8 +279,8 @@ $template->assign_vars(array(
'L_EXPAND_TREE_INFO'=>$lang['conf_default_expand_info'],
'L_NB_COMMENTS'=>$lang['customize_show_nb_comments'],
'L_NB_COMMENTS_INFO'=>$lang['conf_default_show_nb_comments_info'],
- 'L_UPLOAD'=>$lang['conf_upload_available'],
- 'L_UPLOAD_INFO'=>$lang['conf_upload_available_info'],
+ 'L_AUTH_UPLOAD'=>$lang['conf_upload_available'],
+ 'L_AUTH_UPLOAD_INFO'=>$lang['conf_upload_available_info'],
'L_CONF_UPLOAD'=>$lang['conf_upload_title'],
'L_UPLOAD_MAXSIZE'=>$lang['conf_upload_maxfilesize'],
'L_UPLOAD_MAXSIZE_INFO'=>$lang['conf_upload_maxfilesize_info'],
@@ -306,9 +306,6 @@ $template->assign_vars(array(
'F_ACTION'=>add_session_id(PHPWG_ROOT_PATH.'admin.php?page=configuration')
));
-$tpl = array( 'conf_confirmation','remote_site','delete',
- 'conf_remote_site_delete_info','submit','errors_title' );
-
//-------------------------------------------------------------- errors display
if ( sizeof( $error ) != 0 )
{
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 6a690ae4f..84b81e66f 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -136,7 +136,7 @@ function delete_site( $id )
{
// destruction of the categories of the site
$query = 'SELECT id';
- $query.= ' FROM '.PREFIX_TABLE.'categories';
+ $query.= ' FROM '.CATEGORIES_TABLE;
$query.= ' WHERE site_id = '.$id;
$query.= ';';
$result = mysql_query( $query );
@@ -190,7 +190,7 @@ function delete_category( $id )
// destruction of the sub-categories
$query = 'SELECT id';
- $query.= ' FROM '.PREFIX_TABLE.'categories';
+ $query.= ' FROM '.CATEGORIES_TABLE;
$query.= ' WHERE id_uppercat = '.$id;
$query.= ';';
$result = mysql_query( $query );
@@ -200,7 +200,7 @@ function delete_category( $id )
}
// destruction of the category
- $query = 'DELETE FROM '.PREFIX_TABLE.'categories';
+ $query = 'DELETE FROM '.CATEGORIES_TABLE;
$query.= ' WHERE id = '.$id;
$query.= ';';
mysql_query( $query );
@@ -373,9 +373,7 @@ function update_category( $id = 'all' )
{
if ( $id == 'all' )
{
- $query = 'SELECT id';
- $query.= ' FROM '.PREFIX_TABLE.'categories';
- $query.= ';';
+ $query = 'SELECT id FROM '.CATEGORIES_TABLE.';';
$result = mysql_query( $query );
while ( $row = mysql_fetch_array( $result ) )
{
@@ -399,7 +397,7 @@ function update_category( $id = 'all' )
$query.= ';';
list( $date_available ) = mysql_fetch_array( mysql_query( $query ) );
- $query = 'UPDATE '.PREFIX_TABLE.'categories';
+ $query = 'UPDATE '.CATEGORIES_TABLE;
$query.= " SET date_last = '".$date_available."'";
$query.= ', nb_images = '.$nb_images;
$query.= ' WHERE id = '.$id;
@@ -410,7 +408,7 @@ function update_category( $id = 'all' )
// 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.= ' FROM '.CATEGORIES_TABLE;
$query.= ' WHERE id = '.$id;
$row = mysql_fetch_array( mysql_query( $query ) );
// if the category has no representative picture (ie
@@ -425,7 +423,7 @@ function update_category( $id = 'all' )
$result = mysql_query( $query );
if ( mysql_num_rows( $result ) == 0 )
{
- $query = 'UPDATE '.PREFIX_TABLE.'categories';
+ $query = 'UPDATE '.CATEGORIES_TABLE;
$query.= ' SET representative_picture_id = NULL';
$query.= ' WHERE id = '.$id;
$query.= ';';
@@ -524,7 +522,7 @@ function get_plain_structure( $use_name = false )
$query = 'SELECT id,id_uppercat';
if ( $use_name ) $query.= ',name';
- $query.= ' FROM '.PREFIX_TABLE.'categories';
+ $query.= ' FROM '.CATEGORIES_TABLE;
$query.= ' ORDER BY id_uppercat ASC, rank ASC';
$query.= ';';
@@ -711,7 +709,7 @@ function update_uppercats( $category_id )
}
$string_uppercats = implode( ',', array_reverse( $uppercats ) );
- $query = 'UPDATE '.PREFIX_TABLE.'categories';
+ $query = 'UPDATE '.CATEGORIES_TABLE;
$query.= ' SET uppercats = '."'".$string_uppercats."'";
$query.= ' WHERE id = '.$final_id;
$query.= ';';
diff --git a/admin/update.php b/admin/update.php
index 1803d5468..db8790bdf 100644
--- a/admin/update.php
+++ b/admin/update.php
@@ -27,6 +27,35 @@
include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' );
//------------------------------------------------------------------- functions
+function ordering( $id_uppercat )
+{
+ $rank = 1;
+
+ $query = 'SELECT id';
+ $query.= ' FROM '.CATEGORIES_TABLE;
+ 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 '.CATEGORIES_TABLE;
+ $query.= ' SET rank = '.$rank;
+ $query.= ' WHERE id = '.$row['id'];
+ $query.= ';';
+ mysql_query( $query );
+ $rank++;
+ ordering( $row['id'] );
+ }
+}
+
function insert_local_category( $id_uppercat )
{
global $conf, $page, $user, $lang;
@@ -677,7 +706,6 @@ $template->assign_vars(array(
'U_ALL_UPDATE'=>add_session_id( PHPWG_ROOT_PATH.'admin.php?page=update&amp;update=all' )
));
-$tpl = array('remote_site');
//-------------------------------------------- introduction : choices of update
// Display choice if "update" var is not specified
if (!isset( $_GET['update'] ))
@@ -732,6 +760,7 @@ if ( isset( $_GET['update'] )
{
$start = get_moment();
update_category( 'all' );
+ ordering('NULL');
$end = get_moment();
echo get_elapsed_time( $start, $end ).' for update_category( all )<br />';
diff --git a/category.php b/category.php
index a4c749e42..ed50a5762 100644
--- a/category.php
+++ b/category.php
@@ -67,9 +67,7 @@ function display_category( $category, $indent )
$name = $category['name'];
if (empty($name)) $name = str_replace( '_', ' ', $category['dir'] );
- $template->assign_block_vars(
- 'category',
- array(
+ $template->assign_block_vars('category', array(
'T_NAME' => $style,
'LINK_NAME' => $name,
'INDENT' => $indent,
@@ -187,8 +185,7 @@ if ( isset ( $page['cat'] ) )
{
if ( is_numeric( $page['cat'] ) )
{
- $cat_title = get_cat_display_name( $page['cat_name'], ' &gt; ',
- 'font-style:italic;' );
+ $cat_title = get_cat_display_name( $page['cat_name'], ' - ');
}
else
{
@@ -356,7 +353,7 @@ if ( isset( $page['cat'] ) && $page['cat_nb_images'] != 0 )
$poids = $row['filesize'];
$thumbnail_title .= ' : '.$poids.' KB';
// url link on picture.php page
- $url_link = './picture.php?cat='.$page['cat'];
+ $url_link = PHPWG_ROOT_PATH.'picture.php?cat='.$page['cat'];
$url_link.= '&amp;image_id='.$row['id'];
if ( $page['cat'] == 'search' )
{
@@ -473,28 +470,15 @@ else
//------------------------------------------------------- category informations
if ( isset ( $page['cat'] ) )
{
- $cat_name='';
- // total number of pictures in the category
- if ( is_numeric( $page['cat'] ) )
+ // upload a picture in the category
+ if ( is_numeric( $page['cat']) && $page['cat_site_id'] == 1
+ && $conf['upload_available'] && $page['cat_uploadable'] )
{
- $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'] )
- {
- $url = PHPWG_ROOT_PATH.'upload.php?cat='.$page['cat'];
- $template->assign_block_vars('upload',array('U_UPLOAD'=>add_session_id( $url )));
- }
+ $url = PHPWG_ROOT_PATH.'upload.php?cat='.$page['cat'];
+ $template->assign_block_vars('upload',array('U_UPLOAD'=>add_session_id( $url )));
}
- else
- {
- $cat_name= $page['title'];
- }
- $template->assign_block_vars('cat_infos',array(
- 'CAT_NAME'=>$cat_name,
- 'NB_IMG_CAT' => $page['cat_nb_images']
- ));
+
+ $template->assign_block_vars('cat_infos',array('NB_IMG_CAT' => $page['cat_nb_images']));
// navigation bar
if ( $page['navigation_bar'] != '' )
diff --git a/include/common.inc.php b/include/common.inc.php
index 2478850a9..6a06706ce 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -120,7 +120,6 @@ if( !defined("PHPWG_INSTALLED") )
exit;
}
-define( 'PREFIX_INCLUDE', '' );// en attendant la migration complète
include(PHPWG_ROOT_PATH . 'include/constants.php');
include(PHPWG_ROOT_PATH . 'include/config.inc.php');
include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
@@ -140,7 +139,8 @@ or die ( "Could not connect to database" );
//
if ( getenv( 'HTTP_X_FORWARDED_FOR' ) != '' )
{
- $client_ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : $REMOTE_ADDR );
+ $client_ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ?
+ $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : $REMOTE_ADDR );
if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/",
getenv('HTTP_X_FORWARDED_FOR'), $ip_list) )
@@ -158,13 +158,14 @@ if ( getenv( 'HTTP_X_FORWARDED_FOR' ) != '' )
}
else
{
- $client_ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : $REMOTE_ADDR );
+ $client_ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ?
+ $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : $REMOTE_ADDR );
}
$user_ip = encode_ip($client_ip);
//
-// Setup forum wide options, if this fails then we output a CRITICAL_ERROR
-// since basic forum information is not available
+// Setup gallery wide options, if this fails then we output a CRITICAL_ERROR
+// since basic gallery information is not available
//
$query = 'SELECT param,value';
$query.= ' FROM '.CONFIG_TABLE;
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 5287bf99e..4cf4a2337 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -24,11 +24,12 @@
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
// | USA. |
// +-----------------------------------------------------------------------+
-include( PHPWG_ROOT_PATH .'include/functions_user.inc.php' );
-include( PHPWG_ROOT_PATH .'include/functions_session.inc.php' );
-include( PHPWG_ROOT_PATH .'include/functions_category.inc.php' );
-include( PHPWG_ROOT_PATH .'include/functions_xml.inc.php' );
-include( PHPWG_ROOT_PATH .'include/functions_group.inc.php' );
+include_once( PHPWG_ROOT_PATH .'include/functions_user.inc.php' );
+include_once( PHPWG_ROOT_PATH .'include/functions_session.inc.php' );
+include_once( PHPWG_ROOT_PATH .'include/functions_category.inc.php' );
+include_once( PHPWG_ROOT_PATH .'include/functions_xml.inc.php' );
+include_once( PHPWG_ROOT_PATH .'include/functions_group.inc.php' );
+include_once( PHPWG_ROOT_PATH .'include/htmlfunctions.inc.php' );
//----------------------------------------------------------- generic functions
@@ -396,7 +397,7 @@ function notify( $type, $infos = '' )
while ( $row = mysql_fetch_array( $result ) )
{
$to = $row['mail_address'];
- include( PREFIX_INCLUDE.'./language/'.$row['language'].'.php' );
+ include( PHPWG_ROOT_PATH.'language/'.$row['language'].'.php' );
$content = $lang['mail_hello']."\n\n";
switch ( $type )
{
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index 1652f3b6e..5f8aed0cf 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -111,10 +111,17 @@ function get_user_plain_structure()
{
$category = array();
foreach ( $infos as $info ) {
- if ( $info == 'uc.date_last' )
+ if ( $info == 'uc.date_last')
{
- list($year,$month,$day) = explode( '-', $row['date_last'] );
- $category['date_last'] = mktime(0,0,0,$month,$day,$year);
+ if (empty($row['date_last']))
+ {
+ $category['date_last']= 0;
+ }
+ else
+ {
+ 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] = '';
@@ -239,8 +246,6 @@ function count_user_total_images()
// $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' );
@@ -270,14 +275,14 @@ function get_cat_info( $id )
$cat['name'] = array();
- $query = 'SELECT name FROM '.CATEGORIES_TABLE;
+ $query = 'SELECT name,id FROM '.CATEGORIES_TABLE;
$query.= ' WHERE id IN ('.$cat['uppercats'].')';
$query.= ' ORDER BY id ASC';
$query.= ';';
$result = mysql_query( $query );
while( $row = mysql_fetch_array( $result ) )
{
- array_push( $cat['name'], $row['name'] );
+ $cat['name'][$row['id']] = $row['name'];
}
return $cat;
@@ -350,28 +355,6 @@ function get_site_url( $category_id )
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
@@ -633,3 +616,4 @@ function get_first_non_empty_cat_id( $id_uppercat )
return false;
}
?>
+
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 0c6671974..cf3f01fb3 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -260,7 +260,6 @@ function setup_style($style)
{
$template_path = 'template/' ;
$template_name = $style ;
- include_once( PHPWG_ROOT_PATH . $template_path . $template_name.'/htmlfunctions.inc.php' );
$template = new Template(PHPWG_ROOT_PATH . $template_path . $template_name);
return $template;
}
diff --git a/template/default/htmlfunctions.inc.php b/include/htmlfunctions.inc.php
index 6031d1e45..426ef8e82 100644
--- a/template/default/htmlfunctions.inc.php
+++ b/include/htmlfunctions.inc.php
@@ -107,38 +107,6 @@ function create_navigation_bar( $url, $nb_element, $start,
return $navigation_bar;
}
-
-
-function make_jumpbox($value, $selected, $usekeys=false)
-{
- $boxstring = '';
- $nb = sizeof( $value);
- $keys = ($usekeys?array_keys($value):$value);
- $value = ($usekeys?array_values($value):$value);
- for ( $i = 0; $i < $nb; $i++ )
- {
- $boxstring .= '<option value="'.$keys[$i].'"';
- if ($selected == $keys[$i]) $boxstring .=' selected="selected"';
- $boxstring .='>'.$value[$i].'</option>';
- }
- return $boxstring;
-}
-
-function make_radio($name, $value, $selected, $usekeys=false)
-{
- $boxstring = '';
- $nb = sizeof( $value);
- $keys = ($usekeys?array_keys($value):$value);
- $value = ($usekeys?array_values($value):$value);
- for ( $i = 0; $i < $nb; $i++ )
- {
- $boxstring .= '<input type="radio" name="'.$name.'" value="'.$keys[$i].'"';
- if ($selected == $keys[$i]) $boxstring .=' checked';
- $boxstring .='/>'.$value[$i];
- }
- return $boxstring;
-}
-
//
// Pick a language, any language ...
//
@@ -192,4 +160,31 @@ function style_select($default_style, $select_name = "style")
closedir($dir);
return $style_select;
}
+
+// 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 this parameters :
+// - $style : the style of the span tag for the lowest category,
+// "font-style:italic;" for example
+function get_cat_display_name( $cat_informations, $separator,
+ $url = 'category.php?cat=', $replace_space = true)
+{
+ $output = '';
+ $i=0;
+ while ( list ($id, $name) = each($cat_informations))
+ {
+ if ( $i ) $output.= $separator;
+ $i++;
+ if (empty($style) && empty($url) || ($i == count( $cat_informations)))
+ $output.= $name;
+ elseif (!empty($url))
+ $output.= '<a class="" href="'.add_session_id(PHPWG_ROOT_PATH.$url.$id).'">'.$name."</a>";
+ else
+ $output.= '<span style="'.$style.'">'.$name.'</span>';
+ }
+ if ( $replace_space ) return replace_space( $output );
+ else return $output;
+}
?>
+
diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php
index 7e641edad..534161f24 100644
--- a/language/en_UK.iso-8859-1/admin.lang.php
+++ b/language/en_UK.iso-8859-1/admin.lang.php
@@ -25,6 +25,39 @@
// | USA. |
// +-----------------------------------------------------------------------+
+// Main words
+$lang['links'] = 'Links';
+$lang['general'] = 'General';
+$lang['config'] = 'Configuration';
+$lang['users'] = 'Users';
+$lang['instructions'] = 'Instructions';
+$lang['history'] = 'History';
+$lang['manage'] = 'Manage';
+$lang['waiting'] = 'Waiting';
+$lang['groups'] = 'Groups';
+$lang['permissions'] = 'Permissions';
+$lang['update'] = 'Synchronize';
+$lang['storage'] = 'Directory';
+$lang['edit'] = 'Edit';
+
+// Specific words
+$lang['phpinfos'] = 'PHP Information';
+$lang['remote_site'] = 'Remote site';
+$lang['gallery_default'] = 'Gallery Default';
+$lang['upload'] = 'Upload';
+
+// Categorie words
+$lang['cat_up'] = 'Move up';
+$lang['cat_down'] = 'Move down';
+$lang['cat_add'] = 'Add a virtual category';
+$lang['cat_virtual'] = 'Virtual category';
+$lang['cat_public'] = 'Public category';
+$lang['cat_private'] = 'Private category';
+$lang['cat_image_info'] = 'Images info';
+
+// Titles
+$lang['admin_panel'] = 'Administration Panel';
+$lang['default_message'] = 'PhpWebGallery Administration Control Panel';
$lang['title_liste_users'] = 'Users list';
$lang['title_history'] = 'History';
$lang['title_update'] = 'Database update';
@@ -36,44 +69,90 @@ $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['title_waiting'] = 'Pictures waiting for validation';
+
$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';
+
+//Error messages
$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['cat_error_name'] = 'The name of a category mustn\'t be empty';
+
+//FAQ
+$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['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.';
+if (isset($conf))
+ $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['conf_confirmation'] = 'Information data registered in database';
$lang['conf_general_title'] = 'Main configuration';
-$lang['conf_general_webmaster'] = 'webmaster login';
+$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'] = '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'] = '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'] = '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'] = 'Users comments';
+$lang['conf_comments_title'] = 'Configuration of users 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'] = '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.';
@@ -95,8 +174,8 @@ $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_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';
@@ -127,21 +206,16 @@ $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'] = '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';
@@ -193,37 +267,8 @@ $lang['tn_params_format_info'] = 'only jpeg file format is supported for thumbna
$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['remote_site'] = 'Remote site';
+
+
$lang['title_add'] = 'Add a user';
$lang['title_modify'] = 'Modify a user';
$lang['title_groups'] = 'Groups management';
@@ -231,9 +276,6 @@ $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.';
@@ -258,12 +300,6 @@ $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)';
@@ -280,26 +316,7 @@ $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.';
-if (isset($conf))
- $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';
diff --git a/language/en_UK.iso-8859-1/common.lang.php b/language/en_UK.iso-8859-1/common.lang.php
index 8fc0e18f8..cf960354a 100644
--- a/language/en_UK.iso-8859-1/common.lang.php
+++ b/language/en_UK.iso-8859-1/common.lang.php
@@ -25,31 +25,64 @@
// | USA. |
// +-----------------------------------------------------------------------+
+// Main words
+
+$lang['gallery_index'] = 'Gallery index';
+$lang['category'] = 'Category';
+$lang['categories'] = 'Categories';
+$lang['thumbnail'] = 'Thumbnail';
+$lang['thumbnails'] = 'Thumbnails';
+$lang['search'] = 'Search';
+$lang['submit'] = 'Submit';
+$lang['comment'] = 'Comment';
+$lang['comments'] = 'Comments';
+$lang['picture'] = 'Picture';
+$lang['pictures'] = 'Pictures';
+$lang['no'] = 'No';
+$lang['yes'] = 'Yes';
+$lang['date'] = 'Date';
+
+// Identification
+$lang['login'] = 'Login';
+$lang['logout'] = 'Logout';
+$lang['password'] = 'Password';
+$lang['customize'] = 'Customize';
+$lang['new'] = 'New';
+$lang['delete'] = 'Delete';
+$lang['identification'] = 'Identification';
+
+//Calendar
+$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['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';
@@ -111,25 +144,7 @@ $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';
@@ -164,12 +179,9 @@ $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';
@@ -182,7 +194,6 @@ $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';
diff --git a/picture.php b/picture.php
index d28dde037..1db708996 100644
--- a/picture.php
+++ b/picture.php
@@ -276,7 +276,7 @@ $title_img = $picture['current']['name'];
$title_nb = '';
if (is_numeric( $page['cat'] ))
{
- $title_img = replace_space(get_cat_display_name( $page['cat_name'], " &gt; ","font-style:italic;" ));
+ $title_img = replace_space(get_cat_display_name( $page['cat_name'], " &gt; "));
$n = $page['num'] + 1;
$title_nb = "Photo".' '.$n.'/';
$title_nb.= $page['cat_nb_images'];
diff --git a/template/default/admin.tpl b/template/default/admin.tpl
index 7b9dd9462..696f43072 100644
--- a/template/default/admin.tpl
+++ b/template/default/admin.tpl
@@ -1,21 +1,67 @@
<!-- BEGIN install_warning -->
<p class="install_warning">{L_INSTALL_WARNING}</div>
<!-- END install_warning -->
-<div class="adminMenu">
- <a class="adminMenu" href="{U_CONFIG}">{L_CONFIG}</a>&nbsp;|&nbsp;
- <a class="adminMenu" href="{U_USERS}">{L_USERS}</a>&nbsp;|&nbsp;
- <a class="adminMenu" href="{U_GROUPS}">{L_GROUPS}</a>&nbsp;|&nbsp;
- <a class="adminMenu" href="{U_CATEGORIES}">{L_CATEGORIES}</a>&nbsp;|&nbsp;
- <a class="adminMenu" href="{U_WAITING}">{L_WAITING}</a>&nbsp;|&nbsp;
- <a class="adminMenu" href="{U_COMMENTS}">{L_COMMENTS}</a>&nbsp;|&nbsp;
- <a class="adminMenu" href="{U_UPDATE}">{L_UPDATE}</a>&nbsp;|&nbsp;
- <a class="adminMenu" href="{U_THUMBNAILS}">{L_THUMBNAILS}</a>&nbsp;|&nbsp;
- <a class="adminMenu" href="{U_HISTORY}">{L_HISTORY}</a>&nbsp;|&nbsp;
- <a class="adminMenu" href="{U_FAQ}">{L_FAQ}</a>&nbsp;|&nbsp;
- <a class="adminMenu" href="{U_RETURN}">{L_RETURN}</a>
+<table style="width:100%;">
+ <tr>
+ <td valign="top" style="padding:10px;width:1%;">
+ <div class="table1">
+
+<div class="titreMenu">{L_LINKS}</div>
+<div class="menu">
+<ul class="menu">
+ <li><a class="adminMenu" href="{U_RETURN}">{L_GALLERY_INDEX}</a></li>
+ </ul>
</div>
-<div align="center">
-<div class="adminMain">
+<div class="titreMenu">{L_GENERAL}</div>
+<div class="menu">
+<ul class="menu">
+ <li><a class="adminMenu" href="{U_FAQ}">{L_FAQ}</a></li>
+ <li><a class="adminMenu" href="{U_CONFIG}">{L_CONFIG}</a></li>
+ <li><a class="adminMenu" href="{U_CONFIG}">{L_SITES}</a></li>
+ <!--<li><a class="adminMenu" href="{U_CONFIG}">{L_DEFAULT}</a></li>-->
+ <li><a class="adminMenu" href="{U_PHPINFO}">{L_PHPINFO}</a></li>
+ <li><a class="adminMenu" href="{U_HISTORY}">{L_HISTORY}</a></li>
+ </ul>
+</div>
+<div class="titreMenu">{L_CATEGORIES}</div>
+<div class="menu">
+<ul class="menu">
+ <li><a class="adminMenu" href="{U_CATEGORIES}">{L_MANAGE}</a></li>
+ <li><a class="adminMenu" href="{U_UPLOAD}">{L_UPLOAD}</a></li>
+ <li><a class="adminMenu" href="{U_CAT_UPDATE}">{L_UPDATE}</a></li>
+</ul>
+</div>
+<div class="titreMenu">{L_IMAGES}</div>
+<div class="menu">
+<ul class="menu">
+ <li><a class="adminMenu" href="{U_WAITING}">{L_WAITING}</a></li>
+ <li><a class="adminMenu" href="{U_THUMBNAILS}">{L_THUMBNAILS}</a></li>
+ <li><a class="adminMenu" href="{U_COMMENTS}">{L_COMMENTS}</a></li>
+ <li><a class="adminMenu" href="{U_IMG_UPDATE}">{L_UPDATE}</a></li>
+ </ul>
+</div>
+<div class="titreMenu">{L_IDENTIFY}</div>
+<div class="menu">
+<ul class="menu">
+ <li><a class="adminMenu" href="{U_USERS}">{L_USERS}</a></li>
+ <li><a class="adminMenu" href="{U_GROUPS}">{L_GROUPS}</a></li>
+</ul>
+</div>
+<div class="titreMenu">{L_AUTH}</div>
+<div class="menu">
+<ul class="menu">
+ <li><a class="adminMenu" href="{U_AUTH}">{L_AUTH}</a></li>
+ <li><a class="adminMenu" href="{U_USERS_AUTH}">{L_USERS}</a></li>
+ <li><a class="adminMenu" href="{U_GROUPS_AUTH}">{L_GROUPS}</a></li>
+</ul>
+</div>
+ </div>
+ </td>
+ <td style="padding:10px;width:99%;" valign="top">
+<div class="home">
<div class="titrePage">{PAGE_TITLE}</div>
{ADMIN_CONTENT}
-</div></div>
+</div>
+ </td>
+ </tr>
+</table> \ No newline at end of file
diff --git a/template/default/admin/cat_list.tpl b/template/default/admin/cat_list.tpl
new file mode 100644
index 000000000..dbc59d487
--- /dev/null
+++ b/template/default/admin/cat_list.tpl
@@ -0,0 +1,55 @@
+<!-- BEGIN errors -->
+<div class="errors">
+<ul>
+ <!-- BEGIN error -->
+ <li>{errors.error.ERROR}</li>
+ <!-- END error -->
+</ul>
+</div>
+<!-- END errors -->
+<div class="admin">{CATEGORIES_NAV}</div>
+<table style="width:100%;">
+<!-- BEGIN category -->
+<tr>
+ <td style="width:1px;padding:5px;">{category.CATEGORY_IMG}</td>
+ <td style="width:50%;text-align:left;"><a class="titreImg" href="{category.U_CATEGORY}">{category.CATEGORY_NAME}</a>
+ <br />
+ <!-- BEGIN storage -->
+ {L_STORAGE} : {category.CATEGORY_DIR} -
+ <!-- END storage -->
+ {L_NB_IMG} : {category.CATEGORY_NB_IMG}
+ </td>
+ <td class="row1" style="width:10%;white-space:nowrap;text-align:center;">
+ <a href="{category.U_MOVE_UP}">{L_MOVE_UP}</a><br />
+ <a href="{category.U_MOVE_DOWN}">{L_MOVE_DOWN}</a>
+ </td>
+ <td class="row1" style="width:10%;white-space:nowrap;text-align:center;">
+ <a href="{category.U_CAT_EDIT}">{L_EDIT}</a>
+ </td>
+ <td class="row1" style="width:10%;white-space:nowrap;text-align:center;">
+ <!-- BEGIN image_info -->
+ <a href="{category.U_INFO_IMG}">{L_INFO_IMG}</a>
+ <!-- END image_info -->
+ <!-- BEGIN no_image_info -->
+ <span style="color:darkgray;">{L_INFO_IMG}</span>
+ <!-- END no_image_info -->
+ </td>
+ <td class="row1" style="width:10%;white-space:nowrap;text-align:center;">
+ <a href="{category.U_CAT_UPDATE}">{L_UPDATE}</a>
+ </td>
+ <td class="row1" style="width:10%;white-space:nowrap;text-align:center;">
+ <!-- BEGIN virtual -->
+ <a href="{category.U_CAT_DELETE}">{L_DELETE}</a>
+ <!-- END virtual -->
+ <!-- BEGIN storage -->
+ <span style="color:darkgray;">{L_DELETE}</span>
+ <!-- END storage -->
+ </td>
+<tr>
+<!-- END category -->
+</table>
+<form action="" method="post">
+ {L_ADD_VIRTUAL} : <input type="text" name="virtual_name" />
+ <input type="hidden" name="rank" value="{NEXT_RANK}"/>
+ <input type="submit" value="{L_SUBMIT}" class="bouton" name="submit" />
+</form> \ No newline at end of file
diff --git a/template/default/admin/cat_list.vtp b/template/default/admin/cat_list.vtp
deleted file mode 100644
index 997f3d1f1..000000000
--- a/template/default/admin/cat_list.vtp
+++ /dev/null
@@ -1,110 +0,0 @@
-<!--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}#{#id}"><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}#{#id}"><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}#{#id}"><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}#{#id}"><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> \ No newline at end of file
diff --git a/template/default/admin/configuration.tpl b/template/default/admin/configuration.tpl
index 845c87435..76d09519a 100644
--- a/template/default/admin/configuration.tpl
+++ b/template/default/admin/configuration.tpl
@@ -11,197 +11,170 @@
<div class="info">{L_CONFIRM}</div>
<!-- END confirmation -->
<form method="post" action="{F_ACTION}">
-<table width="100%">
+<table width="100%" align="center">
<tr class="admin">
- <th colspan="3">{L_CONF_GENERAL}</th>
+ <th colspan="2">{L_CONF_GENERAL}</th>
</tr>
<tr>
- <td colspan="3">&nbsp;</td>
+ <td colspan="2">&nbsp;</td>
</tr>
<tr>
- <td width="20%" >{L_ADMIN_NAME}</td>
- <td><input type="text" size="25" name="webmaster" value="{ADMIN_NAME}" /></td>
- <td width="50%" >{L_ADMIN_NAME_INFO}</td>
+ <td width="50%" ><strong>{L_ADMIN_NAME} &nbsp;:</strong><br /><span class="small">{L_ADMIN_NAME_INFO}</span></td>
+ <td class="row1"><input type="text" size="25" name="webmaster" value="{ADMIN_NAME}" /></td>
</tr>
<tr>
- <td>{L_ADMIN_MAIL}</td>
- <td><input type="text" size="25" maxlength="100" name="mail_webmaster" value="{ADMIN_MAIL}" /></td>
- <td>{L_ADMIN_MAIL_INFO}</td>
+ <td><strong>{L_ADMIN_MAIL}&nbsp;:</strong><br /><span class="small">{L_ADMIN_MAIL_INFO}</span></td>
+ <td class="row1"><input type="text" size="25" maxlength="100" name="mail_webmaster" value="{ADMIN_MAIL}" /></td>
</tr>
<tr>
- <td>{L_THUMBNAIL_PREFIX}</td>
- <td><input type="text" size="3" maxlength="4" name="prefix_thumbnail" value="{THUMBNAIL_PREFIX}" /></td>
- <td>{L_THUMBNAIL_PREFIX_INFO}</td>
+ <td><strong>{L_THUMBNAIL_PREFIX}&nbsp;:</strong><br /><span class="small">{L_THUMBNAIL_PREFIX_INFO}</span></td>
+ <td class="row1"><input type="text" size="3" maxlength="4" name="prefix_thumbnail" value="{THUMBNAIL_PREFIX}" /></td>
</tr>
<tr>
- <td>{L_ACCESS}</td>
- <td><input type="radio" class="radio" name="access" value="free" {ACCESS_FREE} />{L_ACCESS_FREE}&nbsp;&nbsp;
+ <td><strong>{L_ACCESS}&nbsp;:</strong><br /><span class="small">{L_ACCESS_INFO}</span></td>
+ <td class="row1"><input type="radio" class="radio" name="access" value="free" {ACCESS_FREE} />{L_ACCESS_FREE}&nbsp;&nbsp;
<input type="radio" class="radio" name="access" value="restricted" {ACCESS_RESTRICTED} />{L_ACCESS_RESTRICTED}</td>
- <td>{L_ACCESS_INFO}</td>
</tr>
<tr>
- <td>{L_HISTORY}</td>
- <td><input type="radio" class="radio" name="log" value="true" {HISTORY_YES} />{L_YES}&nbsp;&nbsp;
+ <td><strong>{L_CONF_HISTORY}&nbsp;:</strong><br /><span class="small">{L_CONF_HISTORY_INFO}</span></td>
+ <td class="row1"><input type="radio" class="radio" name="log" value="true" {HISTORY_YES} />{L_YES}&nbsp;&nbsp;
<input type="radio" class="radio" name="log" value="false" {HISTORY_NO} />{L_NO}</td>
- <td>{L_HISTORY_INFO}</td>
</tr>
<tr>
- <td>{L_MAIL_NOTIFICATION}</td>
- <td><input type="radio" class="radio" name="mail_notification" value="true" {MAIL_NOTIFICATION_YES} />{L_YES}&nbsp;&nbsp;
+ <td><strong>{L_MAIL_NOTIFICATION}&nbsp;:</strong><br /><span class="small">{L_MAIL_NOTIFICATION_INFO}</span></td>
+ <td class="row1"><input type="radio" class="radio" name="mail_notification" value="true" {MAIL_NOTIFICATION_YES} />{L_YES}&nbsp;&nbsp;
<input type="radio" class="radio" name="mail_notification" value="false" {MAIL_NOTIFICATION_NO} />{L_NO}</td>
- <td>{L_MAIL_NOTIFICATION_INFO}</td>
</tr>
<tr>
- <td colspan="3">&nbsp;</td>
+ <td colspan="2">&nbsp;</td>
</tr>
<tr class="admin">
- <th colspan="3">{L_CONF_COMMENTS}</th>
+ <th colspan="2">{L_CONF_COMMENTS}</th>
</tr>
<tr>
- <td colspan="3">&nbsp;</td>
+ <td colspan="2">&nbsp;</td>
</tr>
<tr>
- <td>{L_SHOW_COMMENTS}</td>
- <td><input type="radio" class="radio" name="show_comments" value="true" {SHOW_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
+ <td><strong>{L_SHOW_COMMENTS}&nbsp;:</strong><br /><span class="small">{L_SHOW_COMMENTS_INFO}</span></td>
+ <td class="row1"><input type="radio" class="radio" name="show_comments" value="true" {SHOW_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
<input type="radio" class="radio" name="show_comments" value="false" {SHOW_COMMENTS_NO} />{L_NO}</td>
- <td>{L_SHOW_COMMENTS_INFO}</td>
</tr>
<tr>
- <td>{L_COMMENTS_ALL}</td>
- <td><input type="radio" class="radio" name="comments_forall" value="true" {COMMENTS_ALL_YES} />{L_YES}&nbsp;&nbsp;
+ <td><strong>{L_COMMENTS_ALL}&nbsp;:</strong><br /><span class="small">{L_NB_COMMENTS_PAGE_INFO}</span></td>
+ <td class="row1"><input type="radio" class="radio" name="comments_forall" value="true" {COMMENTS_ALL_YES} />{L_YES}&nbsp;&nbsp;
<input type="radio" class="radio" name="comments_forall" value="false" {COMMENTS_ALL_NO} />{L_NO}</td>
- <td>{L_COMMENTS_ALL_INFO}</td>
</tr>
<tr>
- <td>{L_NB_COMMENTS_PAGE}</td>
- <td><input type="text" size="3" maxlength="4" name="nb_comment_page" value="{NB_COMMENTS_PAGE}" /></td>
- <td>{L_NB_COMMENTS_PAGE_INFO}</td>
+ <td><strong>{L_NB_COMMENTS_PAGE}&nbsp;:</strong><br /><span class="small">{L_NB_COMMENTS_PAGE_INFO}</span></td>
+ <td class="row1"><input type="text" size="3" maxlength="4" name="nb_comment_page" value="{NB_COMMENTS_PAGE}" /></td>
</tr>
<tr>
- <td>{L_VALIDATE_COMMENTS}</td>
- <td><input type="radio" class="radio" name="comments_validation" value="true" {VALIDATE_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
+ <td><strong>{L_VALIDATE_COMMENTS}&nbsp;:</strong><br /><span class="small">{L_VALIDATE_COMMENTS_INFO}</span></td>
+ <td class="row1"><input type="radio" class="radio" name="comments_validation" value="true" {VALIDATE_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
<input type="radio" class="radio" name="comments_validation" value="false" {VALIDATE_COMMENTS_NO} />{L_NO}</td>
- <td>{L_VALIDATE_COMMENTS_INFO}</td>
</tr>
<tr>
- <td colspan="3">&nbsp;</td>
+ <td colspan="2">&nbsp;</td>
</tr>
<tr class="admin">
- <th colspan="3">{L_ABILITIES_SETTINGS}</th>
+ <th colspan="2">{L_ABILITIES_SETTINGS}</th>
</tr>
<tr>
- <td colspan="3">&nbsp;</td>
+ <td colspan="2">&nbsp;</td>
</tr>
<tr>
- <td>{L_LANG_SELECT}</td>
- <td>{LANG_SELECT}</td>
- <td>{L_LANG_SELECT_INFO}</td>
+ <td><strong>{L_LANG_SELECT}&nbsp;:</strong><br /><span class="small">{L_LANG_SELECT_INFO}</span></td>
+ <td class="row1">{LANG_SELECT}</td>
</tr>
<tr>
- <td>{L_NB_IMAGE_LINE}</td>
- <td><input type="text" size="3" maxlength="2" name="nb_image_line" value="{NB_IMAGE_LINE}" /></td>
- <td>{L_NB_IMAGE_LINE_INFO}</td>
+ <td><strong>{L_NB_IMAGE_LINE}&nbsp;:</strong><br /><span class="small">{L_NB_IMAGE_LINE_INFO}</span></td>
+ <td class="row1"><input type="text" size="3" maxlength="2" name="nb_image_line" value="{NB_IMAGE_LINE}" /></td>
</tr>
<tr>
- <td>{L_NB_ROW_PAGE}</td>
- <td><input type="text" size="3" maxlength="2" name="nb_line_page" value="{NB_ROW_PAGE}" /></td>
- <td>{L_NB_ROW_PAGE_INFO}</td>
+ <td><strong>{L_NB_ROW_PAGE}&nbsp;:</strong><br /><span class="small">{L_NB_ROW_PAGE_INFO}</span></td>
+ <td class="row1"><input type="text" size="3" maxlength="2" name="nb_line_page" value="{NB_ROW_PAGE}" /></td>
</tr>
<tr>
- <td>{L_STYLE_SELECT}</td>
- <td>{STYLE_SELECT}</td>
- <td>{L_STYLE_SELECT_INFO}</td>
+ <td><strong>{L_STYLE_SELECT}&nbsp;:</strong><br /><span class="small">{L_STYLE_SELECT_INFO}</span></td>
+ <td class="row1">{STYLE_SELECT}</td>
</tr>
<tr>
- <td>{L_SHORT_PERIOD}</td>
- <td><input type="text" size="3" maxlength="2" name="short_period" value="{SHORT_PERIOD}" /></td>
- <td>{L_SHORT_PERIOD_INFO}</td>
+ <td><strong>{L_SHORT_PERIOD}&nbsp;:</strong><br /><span class="small">{L_SHORT_PERIOD_INFO}</span></td>
+ <td class="row1"><input type="text" size="3" maxlength="2" name="short_period" value="{SHORT_PERIOD}" /></td>
</tr>
<tr>
- <td>{L_LONG_PERIOD}</td>
- <td><input type="text" size="3" maxlength="2" name="long_period" value="{LONG_PERIOD}" /></td>
- <td>{L_LONG_PERIOD_INFO}</td>
+ <td><strong>{L_LONG_PERIOD}&nbsp;:</strong><br /><span class="small">{L_LONG_PERIOD_INFO}</span></td>
+ <td class="row1"><input type="text" size="3" maxlength="2" name="long_period" value="{LONG_PERIOD}" /></td>
</tr>
<tr>
- <td>{L_EXPAND_TREE}</td>
- <td><input type="radio" class="radio" name="auto_expand" value="true" {EXPAND_TREE_YES} />{L_YES}&nbsp;&nbsp;
+ <td><strong>{L_EXPAND_TREE}&nbsp;:</strong><br /><span class="small">{L_EXPAND_TREE_INFO}</span></td>
+ <td class="row1"><input type="radio" class="radio" name="auto_expand" value="true" {EXPAND_TREE_YES} />{L_YES}&nbsp;&nbsp;
<input type="radio" class="radio" name="auto_expand" value="false" {EXPAND_TREE_NO} />{L_NO}</td>
- <td>{L_EXPAND_TREE_INFO}</td>
</tr>
<tr>
- <td>{L_NB_COMMENTS}</td>
- <td><input type="radio" class="radio" name="show_nb_comments" value="true" {NB_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
+ <td><strong>{L_NB_COMMENTS}&nbsp;:</strong><br /><span class="small">{L_NB_COMMENTS_INFO}</span></td>
+ <td class="row1"><input type="radio" class="radio" name="show_nb_comments" value="true" {NB_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
<input type="radio" class="radio" name="show_nb_comments" value="false" {NB_COMMENTS_NO} />{L_NO}</td>
- <td>{L_NB_COMMENTS_INFO}</td>
</tr>
<tr>
- <td colspan="3">&nbsp;</td>
+ <td colspan="2">&nbsp;</td>
</tr>
<tr class="admin">
- <th colspan="3">{L_CONF_UPLOAD}</th>
+ <th colspan="2">{L_CONF_UPLOAD}</th>
</tr>
<tr>
- <td colspan="3">&nbsp;</td>
+ <td colspan="2">&nbsp;</td>
</tr>
<tr>
- <td>{L_UPLOAD}</td>
- <td><input type="radio" class="radio" name="upload_available" value="true" {UPLOAD_YES} />{L_YES}&nbsp;&nbsp;
+ <td><strong>{L_AUTH_UPLOAD}&nbsp;:</strong><br /><span class="small">{L_AUTH_UPLOAD_INFO}</span></td>
+ <td class="row1"><input type="radio" class="radio" name="upload_available" value="true" {UPLOAD_YES} />{L_YES}&nbsp;&nbsp;
<input type="radio" class="radio" name="upload_available" value="false" {UPLOAD_NO} />{L_NO}</td>
- <td>{L_UPLOAD_INFO}</td>
</tr>
<tr>
- <td>{L_UPLOAD_MAXSIZE}</td>
- <td><input type="text" size="4" maxlength="4" name="upload_maxfilesize" value="{UPLOAD_MAXSIZE}" /></td>
- <td>{L_UPLOAD_MAXSIZE_INFO}</td>
+ <td><strong>{L_UPLOAD_MAXSIZE}&nbsp;:</strong><br /><span class="small">{L_UPLOAD_MAXSIZE_INFO}</span></td>
+ <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxfilesize" value="{UPLOAD_MAXSIZE}" /></td>
</tr>
<tr>
- <td>{L_UPLOAD_MAXWIDTH}</td>
- <td><input type="text" size="4" maxlength="4" name="upload_maxwidth" value="{UPLOAD_MAXWIDTH}" /></td>
- <td>{L_UPLOAD_MAXWIDTH_INFO}</td>
+ <td><strong>{L_UPLOAD_MAXWIDTH}&nbsp;:</strong><br /><span class="small">{L_UPLOAD_MAXWIDTH_INFO}</span></td>
+ <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxwidth" value="{UPLOAD_MAXWIDTH}" /></td>
</tr>
<tr>
- <td>{L_UPLOAD_MAXHEIGHT}</td>
- <td><input type="text" size="4" maxlength="4" name="upload_maxheight" value="{UPLOAD_MAXHEIGHT}" /></td>
- <td>{L_UPLOAD_MAXHEIGHT_INFO}</td>
+ <td><strong>{L_UPLOAD_MAXHEIGHT}&nbsp;:</strong><br /><span class="small">{L_UPLOAD_MAXHEIGHT_INFO}</span></td>
+ <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxheight" value="{UPLOAD_MAXHEIGHT}" /></td>
</tr>
<tr>
- <td>{L_TN_UPLOAD_MAXWIDTH}</td>
- <td><input type="text" size="4" maxlength="4" name="upload_maxwidth_thumbnail" value="{TN_UPLOAD_MAXWIDTH}" /></td>
- <td>{L_TN_UPLOAD_MAXWIDTH_INFO}</td>
+ <td><strong>{L_TN_UPLOAD_MAXWIDTH}&nbsp;:</strong><br /><span class="small">{L_TN_UPLOAD_MAXWIDTH_INFO}</span></td>
+ <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxwidth_thumbnail" value="{TN_UPLOAD_MAXWIDTH}" /></td>
</tr>
<tr>
- <td>{L_TN_UPLOAD_MAXHEIGHT}</td>
- <td><input type="text" size="4" maxlength="4" name="upload_maxheight_thumbnail" value="{TN_UPLOAD_MAXHEIGHT}" /></td>
- <td>{L_TN_UPLOAD_MAXHEIGHT_INFO}</td>
+ <td><strong>{L_TN_UPLOAD_MAXHEIGHT}&nbsp;:</strong><br /><span class="small">{L_TN_UPLOAD_MAXHEIGHT_INFO}</span></td>
+ <td class="row1"><input type="text" size="4" maxlength="4" name="upload_maxheight_thumbnail" value="{TN_UPLOAD_MAXHEIGHT}" /></td>
</tr>
<tr>
- <td colspan="3">&nbsp;</td>
+ <td colspan="2">&nbsp;</td>
</tr>
<tr class="admin">
- <th colspan="3">{L_CONF_SESSION}</th>
+ <th colspan="2">{L_CONF_SESSION}</th>
</tr>
<tr>
- <td colspan="3">&nbsp;</td>
+ <td colspan="2">&nbsp;</td>
</tr>
<tr>
- <td>{L_COOKIE}</td>
- <td><input type="radio" class="radio" name="authorize_cookies" value="true" {COOKIE_YES} />{L_YES}&nbsp;&nbsp;
+ <td><strong>{L_COOKIE}&nbsp;:</strong><br /><span class="small">{L_COOKIE_INFO}</span></td>
+ <td class="row1"><input type="radio" class="radio" name="authorize_cookies" value="true" {COOKIE_YES} />{L_YES}&nbsp;&nbsp;
<input type="radio" class="radio" name="authorize_cookies" value="false" {COOKIE_NO} />{L_NO}</td>
- <td>{L_COOKIE_INFO}</td>
</tr>
<tr>
- <td>{L_SESSION_LENGTH}</td>
- <td><input type="text" size="4" maxlength="6" name="session_time" value="{SESSION_LENGTH}" /></td>
- <td>{L_SESSION_LENGTH_INFO}</td>
+ <td><strong>{L_SESSION_LENGTH}&nbsp;:</strong><br /><span class="small">{L_SESSION_LENGTH_INFO}</span></td>
+ <td class="row1"><input type="text" size="4" maxlength="6" name="session_time" value="{SESSION_LENGTH}" /></td>
</tr>
<tr>
- <td>{L_SESSION_ID_SIZE}</td>
- <td><input type="text" size="2" maxlength="3" name="session_id_size" value="{SESSION_ID_SIZE}" /></td>
- <td>{L_SESSION_ID_SIZE_INFO}</td>
+ <td><strong>{L_SESSION_ID_SIZE}&nbsp;:</strong><br /><span class="small">{L_SESSION_ID_SIZE_INFO}</span></td>
+ <td class="row1"><input type="text" size="2" maxlength="3" name="session_id_size" value="{SESSION_ID_SIZE}" /></td>
</tr>
<!-- BEGIN remote_sites -->
<tr>
- <th colspan="3" align="center">{#remote_site}</th>
+ <th colspan="2" align="center">{#remote_site}</th>
</tr>
<tr>
<td colspan=3><div style='margin-bottom:0px'>&nbsp;</div></td>
@@ -216,7 +189,7 @@
<td>{#url}</td>
<td align="center"><input type="checkbox" name="delete_site_{#id}" value="1" /></td>
<!-- BEGIN rowspan -->
- <td class="row2" rowspan="{#nb_sites}">{#conf_remote_site_delete_info}</td>
+ <td class="row2" rowspan="{#nb_sites}">{#conf_remote_site_delete_INFO}</span></td>
<!-- END rowspan -->
</tr>
<!-- END site -->
@@ -225,7 +198,7 @@
</tr>
<!-- END remote_sites -->
<tr>
- <td colspan="3" align="center">
+ <td colspan="2" align="center">
<input type="submit" name="submit" class="bouton" value="{L_SUBMIT}">
</td>
</tr>
diff --git a/template/default/admin/help.tpl b/template/default/admin/help.tpl
index f603fe5e5..c890e1fea 100644
--- a/template/default/admin/help.tpl
+++ b/template/default/admin/help.tpl
@@ -12,7 +12,7 @@
<div style="text-align:center;margin:auto;margin-bottom:10px;"><img src="{cat.illustration.SRC_IMG}" style="border:1px solid black;" alt=""/></div>
{cat.illustration.CAPTION}
<!-- END illustration -->
- <ul style="margin-right:10px;">
+ <ul style="text-align:left; margin-right:10px;">
<!-- BEGIN item -->
<li>{cat.item.CONTENT}</li>
<!-- END item -->
diff --git a/template/default/admin/images/icon_folder.gif b/template/default/admin/images/icon_folder.gif
new file mode 100644
index 000000000..9b2bc47c6
--- /dev/null
+++ b/template/default/admin/images/icon_folder.gif
Binary files differ
diff --git a/template/default/admin/images/icon_folder_link.gif b/template/default/admin/images/icon_folder_link.gif
new file mode 100644
index 000000000..d5e86d47d
--- /dev/null
+++ b/template/default/admin/images/icon_folder_link.gif
Binary files differ
diff --git a/template/default/admin/images/icon_folder_lock.gif b/template/default/admin/images/icon_folder_lock.gif
new file mode 100644
index 000000000..436f3d21c
--- /dev/null
+++ b/template/default/admin/images/icon_folder_lock.gif
Binary files differ
diff --git a/template/default/admin/images/icon_subfolder.gif b/template/default/admin/images/icon_subfolder.gif
new file mode 100644
index 000000000..9179303e7
--- /dev/null
+++ b/template/default/admin/images/icon_subfolder.gif
Binary files differ
diff --git a/template/default/category.tpl b/template/default/category.tpl
index deb4e2229..449ac30e4 100644
--- a/template/default/category.tpl
+++ b/template/default/category.tpl
@@ -102,7 +102,7 @@
<div class="comments">{cat_infos.comment.COMMENTS}</div>
<!-- END comment -->
<div class="infoCat">
- {L_NB_IMG} "{cat_infos.CAT_NAME}" : {cat_infos.NB_IMG_CAT}
+ {L_NB_IMG} "{TITLE}" : {cat_infos.NB_IMG_CAT}
</div>
<!-- END cat_infos -->
</div>
diff --git a/template/default/comments.tpl b/template/default/comments.tpl
index 71f3a4c62..d74963d9f 100644
--- a/template/default/comments.tpl
+++ b/template/default/comments.tpl
@@ -49,7 +49,9 @@
<!-- END picture -->
</table>
<!-- BEGIN validation -->
+<div align="center">
<input type="submit" name="validate" class="bouton" value="{L_VALIDATE}" />
<input type="submit" name="delete" class="bouton" value="{L_DELETE}" />
+</div>
</form>
<!-- END validation --> \ No newline at end of file
diff --git a/template/default/default.css b/template/default/default.css
index 148f36d0f..704add92a 100644
--- a/template/default/default.css
+++ b/template/default/default.css
@@ -1,25 +1,36 @@
-/* Main styles */
+/* MAIN STYLES */
body {
font-family: Verdana, Geneva, Arial, sans-serif;
- font-size:10px;
+ font-size:12px;
background-color:#000000;
color:#E0E0E0;
margin:5px;
}
-a {
- text-decoration:none;
- color:#FFFFFF;
+h1 {
+ font: bold 18pt 'Trebuchet MS', Verdana, sans-serif;
+ text-decoration:none;
+ line-height: 120%;
}
-a:hover {
- text-decoration:underline;
- color:#FFF48E;
+h2 {
+ font: bold 12pt Arial, Helvetica, sans-serif;
+ text-decoration:none;
+ line-height: 120%;
}
-a.none:hover {
- text-decoration:none;
-}
+.small{ font-size:80%;}
+
+/* ANCHORS */
+
+a { text-decoration:none; color:#FFFFFF;}
+a:hover { text-decoration:underline; color:#FFF48E;}
+a.none:hover { text-decoration:none;}
+a.image:hover { text-decoration:none;}
+a.thumbLink:hover { text-decoration:none;}
+/*a.adminMenu:hover{ color : #C6B78E; }
+a.adminMenu{ color : #FFF48E; }*/
+
/* Navigation styles */
.titreMenu,.titrePage
@@ -79,10 +90,6 @@ ul.menu {
margin : 10px 4px 10px 4px;
}
-a.image:hover {
- text-decoration:none;
-}
-
.commentImage {
text-align:justify;
font-style:italic;
@@ -144,7 +151,6 @@ a.image:hover {
.throw {
color:#FFFFCC;
background-color:#3F3F3F;
- width:100%;
text-align:center;
font-weight:bold;
border-top: 1px solid #000000;
@@ -177,10 +183,6 @@ table.thumbnail {
margin: 2px;
}
-a.thumbLink:hover {
- text-decoration:none;
-}
-
/* Comment styles */
.commentTitle {
font-family: Arial, Helvetica, sans-serif;
@@ -203,6 +205,11 @@ a.thumbLink:hover {
}
/* Form styles */
+form{
+ text-align:left;
+ padding:10px;
+}
+
.bouton {
background-image: url(theme/button_bg.gif);
border: 1px solid #404750;
@@ -215,12 +222,16 @@ a.thumbLink:hover {
}
input,select {
+ text-indent:2px;
background-color:#505050;
border: 1px solid #797979;
padding: 0;
color:#FFFFCC;
}
+.radio{
+ border:0;
+}
/* Admin styles */
.adminMenu {
@@ -232,14 +243,6 @@ div.adminMenu{
margin:10px 50px 10px 50px;
}
-a.adminMenu:hover{
- color : #C6B78E;
-}
-
-a.adminMenu{
- color : #FFF48E;
-}
-
.admin {
font-weight:bold;
background-color:#444444;
diff --git a/upload.php b/upload.php
index 5a535895f..190e1df11 100644
--- a/upload.php
+++ b/upload.php
@@ -277,7 +277,7 @@ if ( isset( $page['waiting_id'] ) )
else
{
$advise_title = $lang['upload_advise'];
- $advise_title.= get_cat_display_name( $page['cat_name'], ' - ', 'font-style:italic;' );
+ $advise_title.= get_cat_display_name( $page['cat_name'], ' - ' );
}
$username = !empty($_POST['username'])?$_POST['username']:$user['username'];