2004-02-12 00:20:38 +01:00
|
|
|
|
<?php
|
|
|
|
|
// +-----------------------------------------------------------------------+
|
|
|
|
|
// | configuration.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. |
|
|
|
|
|
// +-----------------------------------------------------------------------+
|
2003-07-01 11:27:20 +02:00
|
|
|
|
|
2004-03-20 01:52:37 +01:00
|
|
|
|
if( !defined("PHPWG_ROOT_PATH") )
|
|
|
|
|
{
|
|
|
|
|
die ("Hacking attempt!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' );
|
2003-05-09 14:42:42 +02:00
|
|
|
|
|
|
|
|
|
$Caracs = array("<EFBFBD>" => "Y", "<EFBFBD>" => "u", "<EFBFBD>" => "A", "<EFBFBD>" => "A",
|
|
|
|
|
"<EFBFBD>" => "A", "<EFBFBD>" => "A", "<EFBFBD>" => "A", "<EFBFBD>" => "A",
|
|
|
|
|
"<EFBFBD>" => "A", "<EFBFBD>" => "C", "<EFBFBD>" => "E", "<EFBFBD>" => "E",
|
|
|
|
|
"<EFBFBD>" => "E", "<EFBFBD>" => "E", "<EFBFBD>" => "I", "<EFBFBD>" => "I",
|
|
|
|
|
"<EFBFBD>" => "I", "<EFBFBD>" => "I", "<EFBFBD>" => "D", "<EFBFBD>" => "N",
|
|
|
|
|
"<EFBFBD>" => "O", "<EFBFBD>" => "O", "<EFBFBD>" => "O", "<EFBFBD>" => "O",
|
|
|
|
|
"<EFBFBD>" => "O", "<EFBFBD>" => "O", "<EFBFBD>" => "U", "<EFBFBD>" => "U",
|
|
|
|
|
"<EFBFBD>" => "U", "<EFBFBD>" => "U", "<EFBFBD>" => "Y", "<EFBFBD>" => "s",
|
|
|
|
|
"<EFBFBD>" => "a", "<EFBFBD>" => "a", "<EFBFBD>" => "a", "<EFBFBD>" => "a",
|
|
|
|
|
"<EFBFBD>" => "a", "<EFBFBD>" => "a", "<EFBFBD>" => "a", "<EFBFBD>" => "c",
|
|
|
|
|
"<EFBFBD>" => "e", "<EFBFBD>" => "e", "<EFBFBD>" => "e", "<EFBFBD>" => "e",
|
|
|
|
|
"<EFBFBD>" => "i", "<EFBFBD>" => "i", "<EFBFBD>" => "i", "<EFBFBD>" => "i",
|
|
|
|
|
"<EFBFBD>" => "o", "<EFBFBD>" => "n", "<EFBFBD>" => "o", "<EFBFBD>" => "o",
|
|
|
|
|
"<EFBFBD>" => "o", "<EFBFBD>" => "o", "<EFBFBD>" => "o", "<EFBFBD>" => "o",
|
|
|
|
|
"<EFBFBD>" => "u", "<EFBFBD>" => "u", "<EFBFBD>" => "u", "<EFBFBD>" => "u",
|
|
|
|
|
"<EFBFBD>" => "y", "<EFBFBD>" => "y");
|
|
|
|
|
//------------------------------ verification and registration of modifications
|
|
|
|
|
$error = array();
|
2003-05-27 22:56:13 +02:00
|
|
|
|
if ( isset( $_POST['submit'] ) )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-07-01 11:27:20 +02:00
|
|
|
|
$int_pattern = '/^\d+$/';
|
2003-05-09 14:42:42 +02:00
|
|
|
|
// deletion of site as asked
|
2004-02-02 01:55:18 +01:00
|
|
|
|
$site_deleted = false;
|
2003-05-27 22:56:13 +02:00
|
|
|
|
$query = 'SELECT id';
|
2004-03-20 01:52:37 +01:00
|
|
|
|
$query.= ' FROM '.SITES_TABLE;
|
2003-05-27 22:56:13 +02:00
|
|
|
|
$query.= " WHERE galleries_url <> './galleries/';";
|
2003-05-09 14:42:42 +02:00
|
|
|
|
$result = mysql_query( $query );
|
|
|
|
|
while ( $row = mysql_fetch_array( $result ) )
|
|
|
|
|
{
|
|
|
|
|
$site = 'delete_site_'.$row['id'];
|
2003-09-17 22:40:15 +02:00
|
|
|
|
if ( $_POST[$site] == 1 )
|
|
|
|
|
{
|
|
|
|
|
delete_site( $row['id'] );
|
2004-02-02 01:55:18 +01:00
|
|
|
|
$site_deleted = true;
|
2003-09-17 22:40:15 +02:00
|
|
|
|
}
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
2004-02-02 01:55:18 +01:00
|
|
|
|
// if any picture of this site were linked to another categories, we have
|
|
|
|
|
// to update the informations of those categories. To make it simple, we
|
|
|
|
|
// just update all the categories
|
|
|
|
|
if ( $site_deleted )
|
|
|
|
|
{
|
|
|
|
|
update_category( 'all' );
|
|
|
|
|
synchronize_all_users();
|
|
|
|
|
}
|
2003-05-27 22:56:13 +02:00
|
|
|
|
// thumbnail prefix must not contain accentuated characters
|
|
|
|
|
$old_prefix = $_POST['prefix_thumbnail'];
|
|
|
|
|
$prefix = strtr( $_POST['prefix_thumbnail'], $Caracs );
|
|
|
|
|
if ( $old_prefix != $prefix )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-05-27 22:56:13 +02:00
|
|
|
|
array_push( $error, $lang['conf_err_prefixe'] );
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
2003-07-21 21:47:14 +02:00
|
|
|
|
// mail must be formatted as follows : name@server.com
|
2003-05-27 22:56:13 +02:00
|
|
|
|
$pattern = '/^[\w-]+(\.[\w-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/';
|
|
|
|
|
if ( !preg_match( $pattern, $_POST['mail_webmaster'] ) )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-05-27 22:56:13 +02:00
|
|
|
|
array_push( $error, $lang['conf_err_mail'] );
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
2003-05-27 22:56:13 +02:00
|
|
|
|
// periods must be integer values, they represents number of days
|
2004-07-09 23:00:00 +02:00
|
|
|
|
if (!preg_match($int_pattern, $_POST['recent_period'])
|
|
|
|
|
or $_POST['recent_period'] <= 0)
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-05-27 22:56:13 +02:00
|
|
|
|
array_push( $error, $lang['err_periods'] );
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
2003-05-27 22:56:13 +02:00
|
|
|
|
// session_id size must be an integer between 4 and 50
|
2003-07-01 11:27:20 +02:00
|
|
|
|
if ( !preg_match( $int_pattern, $_POST['session_id_size'] )
|
2003-05-27 22:56:13 +02:00
|
|
|
|
or $_POST['session_id_size'] < 4
|
|
|
|
|
or $_POST['session_id_size'] > 50 )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-05-27 22:56:13 +02:00
|
|
|
|
array_push( $error, $lang['conf_err_sid_size'] );
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
2003-05-27 22:56:13 +02:00
|
|
|
|
// session_time must be an integer between 5 and 60, in minutes
|
2003-07-01 11:27:20 +02:00
|
|
|
|
if ( !preg_match( $int_pattern, $_POST['session_time'] )
|
2003-05-27 22:56:13 +02:00
|
|
|
|
or $_POST['session_time'] < 5
|
|
|
|
|
or $_POST['session_time'] > 60 )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-05-27 22:56:13 +02:00
|
|
|
|
array_push( $error, $lang['conf_err_sid_time'] );
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
2003-05-27 22:56:13 +02:00
|
|
|
|
// the number of comments per page must be an integer between 5 and 50
|
|
|
|
|
// included
|
2003-07-01 11:27:20 +02:00
|
|
|
|
if ( !preg_match( $int_pattern, $_POST['nb_comment_page'] )
|
2003-05-27 22:56:13 +02:00
|
|
|
|
or $_POST['nb_comment_page'] < 5
|
|
|
|
|
or $_POST['nb_comment_page'] > 50 )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-05-27 22:56:13 +02:00
|
|
|
|
array_push( $error, $lang['conf_err_comment_number'] );
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
2003-05-27 22:56:13 +02:00
|
|
|
|
// the maximum upload filesize must be an integer between 10 and 1000
|
2003-07-01 11:27:20 +02:00
|
|
|
|
if ( !preg_match( $int_pattern, $_POST['upload_maxfilesize'] )
|
2003-05-27 22:56:13 +02:00
|
|
|
|
or $_POST['upload_maxfilesize'] < 10
|
|
|
|
|
or $_POST['upload_maxfilesize'] > 1000 )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-05-27 22:56:13 +02:00
|
|
|
|
array_push( $error, $lang['conf_err_upload_maxfilesize'] );
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
2003-05-27 22:56:13 +02:00
|
|
|
|
// the maximum width of uploaded pictures must be an integer superior to
|
|
|
|
|
// 10
|
2003-07-01 11:27:20 +02:00
|
|
|
|
if ( !preg_match( $int_pattern, $_POST['upload_maxwidth'] )
|
2003-05-27 22:56:13 +02:00
|
|
|
|
or $_POST['upload_maxwidth'] < 10 )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-05-27 22:56:13 +02:00
|
|
|
|
array_push( $error, $lang['conf_err_upload_maxwidth'] );
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
2003-05-27 22:56:13 +02:00
|
|
|
|
// the maximum height of uploaded pictures must be an integer superior to
|
|
|
|
|
// 10
|
2003-07-01 11:27:20 +02:00
|
|
|
|
if ( !preg_match( $int_pattern, $_POST['upload_maxheight'] )
|
2003-05-27 22:56:13 +02:00
|
|
|
|
or $_POST['upload_maxheight'] < 10 )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-05-27 22:56:13 +02:00
|
|
|
|
array_push( $error, $lang['conf_err_upload_maxheight'] );
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
2003-05-27 22:56:13 +02:00
|
|
|
|
// the maximum width of uploaded thumbnails must be an integer superior to
|
|
|
|
|
// 10
|
2003-07-01 11:27:20 +02:00
|
|
|
|
if ( !preg_match( $int_pattern, $_POST['upload_maxwidth_thumbnail'] )
|
2003-05-27 22:56:13 +02:00
|
|
|
|
or $_POST['upload_maxwidth_thumbnail'] < 10 )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-05-27 22:56:13 +02:00
|
|
|
|
array_push( $error, $lang['conf_err_upload_maxwidth_thumbnail'] );
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
2003-05-27 22:56:13 +02:00
|
|
|
|
// the maximum width of uploaded thumbnails must be an integer superior to
|
|
|
|
|
// 10
|
2003-07-01 11:27:20 +02:00
|
|
|
|
if ( !preg_match( $int_pattern, $_POST['upload_maxheight_thumbnail'] )
|
2003-05-27 22:56:13 +02:00
|
|
|
|
or $_POST['upload_maxheight_thumbnail'] < 10 )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-05-27 22:56:13 +02:00
|
|
|
|
array_push( $error, $lang['conf_err_upload_maxheight_thumbnail'] );
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
2003-07-01 11:27:20 +02:00
|
|
|
|
|
2004-03-20 01:52:37 +01:00
|
|
|
|
/* if ( $_POST['maxwidth'] != ''
|
2003-07-01 11:27:20 +02:00
|
|
|
|
and ( !preg_match( $int_pattern, $_POST['maxwidth'] )
|
|
|
|
|
or $_POST['maxwidth'] < 50 ) )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-07-01 11:27:20 +02:00
|
|
|
|
array_push( $error, $lang['err_maxwidth'] );
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
2003-07-01 11:27:20 +02:00
|
|
|
|
if ( $_POST['maxheight']
|
|
|
|
|
and ( !preg_match( $int_pattern, $_POST['maxheight'] )
|
|
|
|
|
or $_POST['maxheight'] < 50 ) )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2003-07-01 11:27:20 +02:00
|
|
|
|
array_push( $error, $lang['err_maxheight'] );
|
2004-03-20 01:52:37 +01:00
|
|
|
|
}*/
|
2003-07-01 11:27:20 +02:00
|
|
|
|
// updating configuraiton if no error found
|
2004-08-21 14:52:43 +02:00
|
|
|
|
if (count($error) == 0)
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2004-08-21 14:52:43 +02:00
|
|
|
|
$result = mysql_query('SELECT * FROM '.CONFIG_TABLE);
|
|
|
|
|
while ($row = mysql_fetch_array($result))
|
|
|
|
|
{
|
|
|
|
|
$config_name = $row['param'];
|
|
|
|
|
if (isset($_POST[$config_name]))
|
|
|
|
|
{
|
|
|
|
|
$conf[$config_name] = $_POST[$config_name];
|
|
|
|
|
}
|
|
|
|
|
else
|
2004-03-05 00:56:02 +01:00
|
|
|
|
{
|
2004-08-21 14:52:43 +02:00
|
|
|
|
$conf[$config_name] = $row['value'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isset($_POST[$config_name]))
|
|
|
|
|
{
|
|
|
|
|
$query = '
|
|
|
|
|
UPDATE '.CONFIG_TABLE.'
|
|
|
|
|
SET value = \''. str_replace("\'", "''", $conf[$config_name]).'\'
|
|
|
|
|
WHERE param = \''.$config_name.'\'
|
|
|
|
|
;';
|
|
|
|
|
mysql_query($query);
|
2004-03-05 00:56:02 +01:00
|
|
|
|
}
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2003-05-27 22:56:13 +02:00
|
|
|
|
|
2004-08-21 14:52:43 +02:00
|
|
|
|
// echo '<pre>';
|
|
|
|
|
// print_r($conf);
|
|
|
|
|
// echo '</pre>';
|
|
|
|
|
|
2004-03-20 01:52:37 +01:00
|
|
|
|
$access = ($conf['access']=='free')?'ACCESS_FREE':'ACCESS_RESTRICTED';
|
|
|
|
|
$log = ($conf['log']=='true')?'HISTORY_YES':'HISTORY_NO';
|
|
|
|
|
$mail_notif = ($conf['mail_notification']=='true')?'MAIL_NOTIFICATION_YES':'MAIL_NOTIFICATION_NO';
|
|
|
|
|
$show_comments = ($conf['show_comments']=='true')?'SHOW_COMMENTS_YES':'SHOW_COMMENTS_NO';
|
|
|
|
|
$comments_all = ($conf['comments_forall']=='true')?'COMMENTS_ALL_YES':'COMMENTS_ALL_NO';
|
|
|
|
|
$comments_validation = ($conf['comments_validation']=='true')?'VALIDATE_COMMENTS_YES':'VALIDATE_COMMENTS_NO';
|
|
|
|
|
$expand = ($conf['auto_expand']=='true')?'EXPAND_TREE_YES':'EXPAND_TREE_NO';
|
|
|
|
|
$nb_comments = ($conf['show_nb_comments']=='true')?'NB_COMMENTS_YES':'NB_COMMENTS_NO';
|
|
|
|
|
$upload = ($conf['upload_available']=='true')?'UPLOAD_YES':'UPLOAD_NO';
|
|
|
|
|
$cookie = ($conf['authorize_cookies']=='true')?'COOKIE_YES':'COOKIE_NO';
|
2004-08-21 14:52:43 +02:00
|
|
|
|
$use_exif = ($conf['use_exif']=='true')?'USE_EXIF_YES':'USE_EXIF_NO';
|
|
|
|
|
$use_iptc = ($conf['use_iptc']=='true')?'USE_IPTC_YES':'USE_IPTC_NO';
|
2004-08-25 23:09:09 +02:00
|
|
|
|
$show_exif = ($conf['show_exif']=='true')?'SHOW_EXIF_YES':'SHOW_EXIF_NO';
|
|
|
|
|
$show_iptc = ($conf['show_iptc']=='true')?'SHOW_IPTC_YES':'SHOW_IPTC_NO';
|
2004-03-20 01:52:37 +01:00
|
|
|
|
|
2003-05-09 14:42:42 +02:00
|
|
|
|
//----------------------------------------------------- template initialization
|
2004-03-20 01:52:37 +01:00
|
|
|
|
$template->set_filenames( array('config'=>'admin/configuration.tpl') );
|
|
|
|
|
|
|
|
|
|
$template->assign_vars(array(
|
|
|
|
|
'ADMIN_NAME'=>$conf['webmaster'],
|
|
|
|
|
'ADMIN_MAIL'=>$conf['mail_webmaster'],
|
|
|
|
|
'THUMBNAIL_PREFIX'=>$conf['prefix_thumbnail'],
|
|
|
|
|
'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
|
|
|
|
|
'LANG_SELECT'=>language_select($conf['default_lang'], 'default_lang'),
|
|
|
|
|
'NB_IMAGE_LINE'=>$conf['nb_image_line'],
|
|
|
|
|
'NB_ROW_PAGE'=>$conf['nb_line_page'],
|
|
|
|
|
'STYLE_SELECT'=>style_select($conf['default_style'], 'default_style'),
|
2004-07-09 23:00:00 +02:00
|
|
|
|
'RECENT_PERIOD'=>$conf['recent_period'],
|
2004-03-20 01:52:37 +01:00
|
|
|
|
'UPLOAD_MAXSIZE'=>$conf['upload_maxfilesize'],
|
|
|
|
|
'UPLOAD_MAXWIDTH'=>$conf['upload_maxwidth'],
|
|
|
|
|
'UPLOAD_MAXHEIGHT'=>$conf['upload_maxheight'],
|
|
|
|
|
'TN_UPLOAD_MAXWIDTH'=>$conf['upload_maxwidth_thumbnail'],
|
|
|
|
|
'TN_UPLOAD_MAXHEIGHT'=>$conf['upload_maxheight_thumbnail'],
|
|
|
|
|
'SESSION_LENGTH'=>$conf['session_time'],
|
|
|
|
|
'SESSION_ID_SIZE'=>$conf['session_id_size'],
|
|
|
|
|
|
|
|
|
|
$access=>'checked="checked"',
|
|
|
|
|
$log=>'checked="checked"',
|
|
|
|
|
$mail_notif=>'checked="checked"',
|
|
|
|
|
$show_comments=>'checked="checked"',
|
|
|
|
|
$comments_all=>'checked="checked"',
|
|
|
|
|
$comments_validation=>'checked="checked"',
|
|
|
|
|
$expand=>'checked="checked"',
|
|
|
|
|
$nb_comments=>'checked="checked"',
|
|
|
|
|
$upload=>'checked="checked"',
|
|
|
|
|
$cookie=>'checked="checked"',
|
2004-08-21 14:52:43 +02:00
|
|
|
|
$use_exif=>'checked="checked"',
|
|
|
|
|
$use_iptc=>'checked="checked"',
|
2004-08-25 23:09:09 +02:00
|
|
|
|
$show_exif=>'checked="checked"',
|
|
|
|
|
$show_iptc=>'checked="checked"',
|
2004-03-20 01:52:37 +01:00
|
|
|
|
|
|
|
|
|
'L_CONFIRM'=>$lang['conf_confirmation'],
|
|
|
|
|
'L_CONF_GENERAL'=>$lang['conf_general_title'],
|
|
|
|
|
'L_ADMIN_NAME'=>$lang['conf_general_webmaster'],
|
|
|
|
|
'L_ADMIN_NAME_INFO'=>$lang['conf_general_webmaster_info'],
|
|
|
|
|
'L_ADMIN_MAIL'=>$lang['conf_general_mail'],
|
|
|
|
|
'L_ADMIN_MAIL_INFO'=>$lang['conf_general_mail_info'],
|
|
|
|
|
'L_THUMBNAIL_PREFIX'=>$lang['conf_general_prefix'],
|
|
|
|
|
'L_THUMBNAIL_PREFIX_INFO'=>$lang['conf_general_prefix_info'],
|
|
|
|
|
'L_ACCESS'=>$lang['conf_general_access'],
|
|
|
|
|
'L_ACCESS_INFO'=>$lang['conf_general_access_info'],
|
|
|
|
|
'L_ACCESS_FREE'=>$lang['conf_general_access_1'],
|
|
|
|
|
'L_ACCESS_RESTRICTED'=>$lang['conf_general_access_2'],
|
2004-03-26 18:08:09 +01:00
|
|
|
|
'L_CONF_HISTORY'=>$lang['history'],
|
|
|
|
|
'L_CONF_HISTORY_INFO'=>$lang['conf_general_log_info'],
|
2004-03-20 01:52:37 +01:00
|
|
|
|
'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'],
|
|
|
|
|
'L_SHOW_COMMENTS'=>$lang['conf_comments_show_comments'],
|
|
|
|
|
'L_SHOW_COMMENTS_INFO'=>$lang['conf_comments_show_comments_info'],
|
|
|
|
|
'L_COMMENTS_ALL'=>$lang['conf_comments_forall'],
|
|
|
|
|
'L_COMMENTS_ALL_INFO'=>$lang['conf_comments_forall_info'],
|
|
|
|
|
'L_NB_COMMENTS_PAGE'=>$lang['conf_comments_comments_number'],
|
|
|
|
|
'L_NB_COMMENTS_PAGE_INFO'=>$lang['conf_comments_comments_number_info'],
|
|
|
|
|
'L_VALIDATE_COMMENTS'=>$lang['conf_comments_validation'],
|
|
|
|
|
'L_VALIDATE_COMMENTS_INFO'=>$lang['conf_comments_validation_info'],
|
|
|
|
|
'L_ABILITIES_SETTINGS'=>$lang['conf_default_title'],
|
|
|
|
|
'L_LANG_SELECT'=>$lang['customize_language'],
|
|
|
|
|
'L_LANG_SELECT_INFO'=>$lang['conf_default_language_info'],
|
|
|
|
|
'L_NB_IMAGE_LINE'=>$lang['customize_nb_image_per_row'],
|
|
|
|
|
'L_NB_IMAGE_LINE_INFO'=>$lang['conf_default_nb_image_per_row_info'],
|
|
|
|
|
'L_NB_ROW_PAGE'=>$lang['customize_nb_row_per_page'],
|
|
|
|
|
'L_NB_ROW_PAGE_INFO'=>$lang['conf_default_nb_row_per_page_info'],
|
|
|
|
|
'L_STYLE_SELECT'=>$lang['customize_theme'],
|
|
|
|
|
'L_STYLE_SELECT_INFO'=>$lang['conf_default_theme_info'],
|
2004-07-09 23:00:00 +02:00
|
|
|
|
'L_RECENT_PERIOD'=>$lang['customize_recent_period'],
|
|
|
|
|
'L_RECENT_PERIOD_INFO'=>$lang['conf_default_recent_period_info'],
|
2004-03-20 01:52:37 +01:00
|
|
|
|
'L_EXPAND_TREE'=>$lang['customize_expand'],
|
|
|
|
|
'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'],
|
2004-03-26 18:08:09 +01:00
|
|
|
|
'L_AUTH_UPLOAD'=>$lang['conf_upload_available'],
|
|
|
|
|
'L_AUTH_UPLOAD_INFO'=>$lang['conf_upload_available_info'],
|
2004-03-20 01:52:37 +01:00
|
|
|
|
'L_CONF_UPLOAD'=>$lang['conf_upload_title'],
|
|
|
|
|
'L_UPLOAD_MAXSIZE'=>$lang['conf_upload_maxfilesize'],
|
|
|
|
|
'L_UPLOAD_MAXSIZE_INFO'=>$lang['conf_upload_maxfilesize_info'],
|
|
|
|
|
'L_UPLOAD_MAXWIDTH'=>$lang['conf_upload_maxwidth'],
|
|
|
|
|
'L_UPLOAD_MAXWIDTH_INFO'=>$lang['conf_upload_maxwidth_info'],
|
|
|
|
|
'L_UPLOAD_MAXHEIGHT'=>$lang['conf_upload_maxheight'],
|
|
|
|
|
'L_UPLOAD_MAXHEIGHT_INFO'=>$lang['conf_upload_maxheight_info'],
|
|
|
|
|
'L_TN_UPLOAD_MAXWIDTH'=>$lang['conf_upload_maxwidth_thumbnail'],
|
|
|
|
|
'L_TN_UPLOAD_MAXWIDTH_INFO'=>$lang['conf_upload_maxwidth_thumbnail_info'],
|
|
|
|
|
'L_TN_UPLOAD_MAXHEIGHT'=>$lang['conf_upload_maxheight_thumbnail'],
|
|
|
|
|
'L_TN_UPLOAD_MAXHEIGHT_INFO'=>$lang['conf_upload_maxheight_thumbnail'],
|
|
|
|
|
'L_CONF_SESSION'=>$lang['conf_session_title'],
|
|
|
|
|
'L_COOKIE'=>$lang['conf_session_cookie'],
|
|
|
|
|
'L_COOKIE_INFO'=>$lang['conf_session_cookie_info'],
|
|
|
|
|
'L_SESSION_LENGTH'=>$lang['conf_session_time'],
|
|
|
|
|
'L_SESSION_LENGTH_INFO'=>$lang['conf_session_time_info'],
|
|
|
|
|
'L_SESSION_ID_SIZE'=>$lang['conf_session_size'],
|
|
|
|
|
'L_SESSION_ID_SIZE_INFO'=>$lang['conf_session_size_info'],
|
|
|
|
|
'L_YES'=>$lang['yes'],
|
|
|
|
|
'L_NO'=>$lang['no'],
|
|
|
|
|
'L_SUBMIT'=>$lang['submit'],
|
2004-08-21 14:52:43 +02:00
|
|
|
|
'L_CONF_METADATA'=>$lang['conf_metadata_title'],
|
|
|
|
|
'L_USE_EXIF'=>$lang['conf_use_exif'],
|
|
|
|
|
'L_USE_EXIF_INFO'=>$lang['conf_use_exif_info'],
|
|
|
|
|
'L_USE_IPTC'=>$lang['conf_use_iptc'],
|
|
|
|
|
'L_USE_IPTC_INFO'=>$lang['conf_use_iptc_info'],
|
2004-08-25 23:09:09 +02:00
|
|
|
|
'L_SHOW_EXIF'=>$lang['conf_show_exif'],
|
|
|
|
|
'L_SHOW_EXIF_INFO'=>$lang['conf_show_exif_info'],
|
|
|
|
|
'L_SHOW_IPTC'=>$lang['conf_show_iptc'],
|
|
|
|
|
'L_SHOW_IPTC_INFO'=>$lang['conf_show_iptc_info'],
|
2004-03-20 01:52:37 +01:00
|
|
|
|
|
|
|
|
|
'F_ACTION'=>add_session_id(PHPWG_ROOT_PATH.'admin.php?page=configuration')
|
2004-08-21 14:52:43 +02:00
|
|
|
|
));
|
2003-07-01 11:27:20 +02:00
|
|
|
|
|
2003-05-09 14:42:42 +02:00
|
|
|
|
//-------------------------------------------------------------- errors display
|
|
|
|
|
if ( sizeof( $error ) != 0 )
|
|
|
|
|
{
|
2004-03-20 01:52:37 +01:00
|
|
|
|
$template->assign_block_vars('errors',array());
|
2003-05-09 14:42:42 +02:00
|
|
|
|
for ( $i = 0; $i < sizeof( $error ); $i++ )
|
|
|
|
|
{
|
2004-03-20 01:52:37 +01:00
|
|
|
|
$template->assign_block_vars('errors.error',array('ERROR'=>$error[$i]));
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2004-03-20 01:52:37 +01:00
|
|
|
|
elseif ( isset( $_POST['submit'] ) )
|
2003-05-09 14:42:42 +02:00
|
|
|
|
{
|
2004-03-20 01:52:37 +01:00
|
|
|
|
$template->assign_block_vars('confirmation' ,array());
|
2003-05-09 14:42:42 +02:00
|
|
|
|
}
|
|
|
|
|
//------------------------------------------------ remote sites administration
|
|
|
|
|
$query = 'select id,galleries_url';
|
2004-03-20 01:52:37 +01:00
|
|
|
|
$query.= ' from '.SITES_TABLE;
|
2003-05-09 14:42:42 +02:00
|
|
|
|
$query.= " where galleries_url <> './galleries/';";
|
|
|
|
|
$result = mysql_query( $query );
|
|
|
|
|
if ( mysql_num_rows( $result ) > 0 )
|
|
|
|
|
{
|
|
|
|
|
$vtp->addSession( $sub, 'remote_sites' );
|
|
|
|
|
$i = 0;
|
|
|
|
|
while ( $row = mysql_fetch_array( $result ) )
|
|
|
|
|
{
|
|
|
|
|
$vtp->addSession( $sub, 'site' );
|
|
|
|
|
$vtp->setVar( $sub, 'site.url', $row['galleries_url'] );
|
|
|
|
|
$vtp->setVar( $sub, 'site.id', $row['id'] );
|
|
|
|
|
if ( $i == 0 )
|
|
|
|
|
{
|
|
|
|
|
$vtp->addSession( $sub, 'rowspan' );
|
|
|
|
|
$vtp->setVar( $sub, 'rowspan.nb_sites', mysql_num_rows( $result ) );
|
|
|
|
|
$vtp->closeSession( $sub, 'rowspan' );
|
|
|
|
|
}
|
|
|
|
|
$vtp->closeSession( $sub, 'site' );
|
|
|
|
|
$i++;
|
|
|
|
|
}
|
|
|
|
|
$vtp->closeSession( $sub, 'remote_sites' );
|
|
|
|
|
}
|
|
|
|
|
//----------------------------------------------------------- sending html code
|
2004-03-20 01:52:37 +01:00
|
|
|
|
$template->assign_var_from_handle('ADMIN_CONTENT', 'config');
|
2004-02-12 00:20:38 +01:00
|
|
|
|
?>
|