2004-02-12 00:20:38 +01:00
|
|
|
<?php
|
|
|
|
// +-----------------------------------------------------------------------+
|
2004-11-06 22:12:59 +01:00
|
|
|
// | PhpWebGallery - a PHP based picture gallery |
|
|
|
|
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
|
2005-01-08 00:10:51 +01:00
|
|
|
// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
|
2004-02-12 00:20:38 +01:00
|
|
|
// +-----------------------------------------------------------------------+
|
2004-11-06 22:12:59 +01:00
|
|
|
// | branch : BSF (Best So Far)
|
2004-02-12 00:20:38 +01:00
|
|
|
// | 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-09-20 00:26:41 +02:00
|
|
|
if( !defined("PHPWG_ROOT_PATH") )
|
2004-03-20 01:52:37 +01:00
|
|
|
{
|
2004-09-20 00:26:41 +02:00
|
|
|
die ("Hacking attempt!");
|
2004-03-20 01:52:37 +01:00
|
|
|
}
|
2004-09-20 00:26:41 +02:00
|
|
|
|
|
|
|
include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' );
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
//-------------------------------------------------------- sections definitions
|
|
|
|
if (!isset($_GET['section']))
|
|
|
|
{
|
|
|
|
$page['section'] = 'general';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$page['section'] = $_GET['section'];
|
|
|
|
}
|
|
|
|
//------------------------------------------------------ $conf reinitialization
|
2004-10-30 17:42:29 +02:00
|
|
|
$result = pwg_query('SELECT param,value FROM '.CONFIG_TABLE);
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
while ($row = mysql_fetch_array($result))
|
|
|
|
{
|
|
|
|
$conf[$row['param']] = $row['value'];
|
2004-09-05 17:49:54 +02:00
|
|
|
// if the parameter is present in $_POST array (if a form is submited), we
|
|
|
|
// override it with the submited value
|
2005-01-17 00:54:54 +01:00
|
|
|
if (isset($_POST[$row['param']]))
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
{
|
|
|
|
$conf[$row['param']] = $_POST[$row['param']];
|
|
|
|
}
|
2004-09-20 00:26:41 +02:00
|
|
|
}
|
2003-05-09 14:42:42 +02:00
|
|
|
//------------------------------ verification and registration of modifications
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +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+$/';
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
switch ($page['section'])
|
2003-05-09 14:42:42 +02:00
|
|
|
{
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
case 'general' :
|
2003-09-17 22:40:15 +02:00
|
|
|
{
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 'comments' :
|
|
|
|
{
|
|
|
|
// the number of comments per page must be an integer between 5 and 50
|
|
|
|
// included
|
|
|
|
if (!preg_match($int_pattern, $_POST['nb_comment_page'])
|
|
|
|
or $_POST['nb_comment_page'] < 5
|
|
|
|
or $_POST['nb_comment_page'] > 50)
|
|
|
|
{
|
2005-06-11 16:10:04 +02:00
|
|
|
array_push($page['errors'], $lang['conf_nb_comment_page_error']);
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 'default' :
|
|
|
|
{
|
|
|
|
// periods must be integer values, they represents number of days
|
|
|
|
if (!preg_match($int_pattern, $_POST['recent_period'])
|
|
|
|
or $_POST['recent_period'] <= 0)
|
|
|
|
{
|
2005-06-11 16:10:04 +02:00
|
|
|
array_push($page['errors'], $lang['periods_error']);
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
}
|
2005-09-19 00:29:17 +02:00
|
|
|
// maxwidth
|
|
|
|
if (isset($_POST['default_maxwidth'])
|
|
|
|
and !empty($_POST['default_maxwidth'])
|
|
|
|
and (!preg_match($int_pattern, $_POST['default_maxwidth'])
|
|
|
|
or $_POST['default_maxwidth'] < 50))
|
|
|
|
{
|
|
|
|
array_push($page['errors'], $lang['maxwidth_error']);
|
|
|
|
}
|
|
|
|
// maxheight
|
|
|
|
if (isset($_POST['default_maxheight'])
|
|
|
|
and !empty($_POST['default_maxheight'])
|
|
|
|
and (!preg_match($int_pattern, $_POST['default_maxheight'])
|
|
|
|
or $_POST['default_maxheight'] < 50))
|
|
|
|
{
|
|
|
|
array_push($page['errors'], $lang['maxheight_error']);
|
|
|
|
}
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
break;
|
|
|
|
}
|
2003-05-09 14:42:42 +02:00
|
|
|
}
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
|
2004-09-20 22:08:15 +02:00
|
|
|
// updating configuration if no error found
|
2005-06-11 16:10:04 +02:00
|
|
|
if (count($page['errors']) == 0)
|
2003-05-09 14:42:42 +02:00
|
|
|
{
|
2005-09-19 00:29:17 +02:00
|
|
|
// echo '<pre>'; print_r($_POST); echo '</pre>';
|
2004-10-30 17:42:29 +02:00
|
|
|
$result = pwg_query('SELECT * FROM '.CONFIG_TABLE);
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
while ($row = mysql_fetch_array($result))
|
|
|
|
{
|
|
|
|
if (isset($_POST[$row['param']]))
|
|
|
|
{
|
2005-10-08 01:25:42 +02:00
|
|
|
$value = $_POST[$row['param']];
|
|
|
|
|
|
|
|
if ('gallery_title' == $row['param']
|
|
|
|
or 'gallery_description' == $row['param'])
|
|
|
|
{
|
|
|
|
if (!$conf['allow_html_descriptions'])
|
|
|
|
{
|
|
|
|
$value = strip_tags($value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-09-20 22:08:15 +02:00
|
|
|
$query = '
|
|
|
|
UPDATE '.CONFIG_TABLE.'
|
2005-10-08 01:25:42 +02:00
|
|
|
SET value = \''. str_replace("\'", "''", $value).'\'
|
2004-09-20 22:08:15 +02:00
|
|
|
WHERE param = \''.$row['param'].'\'
|
|
|
|
;';
|
2004-10-30 17:42:29 +02:00
|
|
|
pwg_query($query);
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
}
|
|
|
|
}
|
2005-06-11 16:10:04 +02:00
|
|
|
array_push($page['infos'], $lang['conf_confirmation']);
|
2003-05-09 14:42:42 +02:00
|
|
|
}
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
}
|
|
|
|
|
2004-09-20 00:26:41 +02:00
|
|
|
//----------------------------------------------------- template initialization
|
|
|
|
$template->set_filenames( array('config'=>'admin/configuration.tpl') );
|
- in admin/configuration, add new step with "sections" (general, comments,
default, upload, metadata, sessions)
- admin/configuration.php and its template have been higly simplificated by
making things more generic : for example, for each configuration
parameter, its name must correspond to the name we find in the config
table and belongs to a section, in the lang array we find :
- $lang['conf_<section>_<param>']
- $lang['conf_<section>_<param>_info']
- $lang['conf_<section>_<param>_error'] optionnaly
- more described message when connection to database server is impossible
- redefinitions of get_languages and get_templates functions
- deletion of configuration parameters : webmaster, session_keyword
- rename of configuration parameters :
- default_lang => default_language
- default_style => default_template
git-svn-id: http://piwigo.org/svn/trunk@512 68402e56-0260-453c-a942-63ccdbb3a9ee
2004-09-03 17:01:05 +02:00
|
|
|
|
2004-09-20 22:08:15 +02:00
|
|
|
$action = PHPWG_ROOT_PATH.'admin.php?page=configuration';
|
|
|
|
$action.= '&section='.$page['section'];
|
|
|
|
|
|
|
|
$template->assign_vars(
|
|
|
|
array(
|
|
|
|
'L_YES'=>$lang['yes'],
|
|
|
|
'L_NO'=>$lang['no'],
|
|
|
|
'L_SUBMIT'=>$lang['submit'],
|
|
|
|
'L_RESET'=>$lang['reset'],
|
2005-09-03 18:36:05 +02:00
|
|
|
|
|
|
|
'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=configuration',
|
2004-09-20 22:08:15 +02:00
|
|
|
|
|
|
|
'F_ACTION'=>add_session_id($action)
|
|
|
|
));
|
2003-07-01 11:27:20 +02:00
|
|
|
|
2004-09-20 00:26:41 +02:00
|
|
|
switch ($page['section'])
|
2004-09-20 22:08:15 +02:00
|
|
|
{
|
|
|
|
case 'general' :
|
2003-05-09 14:42:42 +02:00
|
|
|
{
|
2004-09-20 22:08:15 +02:00
|
|
|
$history_yes = ($conf['log']=='true')?'checked="checked"':'';
|
|
|
|
$history_no = ($conf['log']=='false')?'checked="checked"':'';
|
2004-12-21 00:54:59 +01:00
|
|
|
$lock_yes = ($conf['gallery_locked']=='true')?'checked="checked"':'';
|
|
|
|
$lock_no = ($conf['gallery_locked']=='false')?'checked="checked"':'';
|
2004-09-20 22:08:15 +02:00
|
|
|
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'general',
|
|
|
|
array(
|
|
|
|
'HISTORY_YES'=>$history_yes,
|
|
|
|
'HISTORY_NO'=>$history_no,
|
2004-12-21 00:54:59 +01:00
|
|
|
'GALLERY_LOCKED_YES'=>$lock_yes,
|
|
|
|
'GALLERY_LOCKED_NO'=>$lock_no,
|
2005-10-08 01:25:42 +02:00
|
|
|
'CONF_GALLERY_TITLE' => $conf['gallery_title'],
|
|
|
|
'CONF_GALLERY_DESCRIPTION' => $conf['gallery_description'],
|
2004-09-20 22:08:15 +02:00
|
|
|
));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 'comments' :
|
|
|
|
{
|
|
|
|
$all_yes = ($conf['comments_forall']=='true')?'checked="checked"':'';
|
|
|
|
$all_no = ($conf['comments_forall']=='false')?'checked="checked"':'';
|
|
|
|
$validate_yes = ($conf['comments_validation']=='true')?'checked="checked"':'';
|
|
|
|
$validate_no = ($conf['comments_validation']=='false')?'checked="checked"':'';
|
|
|
|
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'comments',
|
|
|
|
array(
|
|
|
|
'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
|
|
|
|
'COMMENTS_ALL_YES'=>$all_yes,
|
|
|
|
'COMMENTS_ALL_NO'=>$all_no,
|
|
|
|
'VALIDATE_YES'=>$validate_yes,
|
|
|
|
'VALIDATE_NO'=>$validate_no
|
|
|
|
));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 'default' :
|
|
|
|
{
|
|
|
|
$show_yes = ($conf['show_nb_comments']=='true')?'checked="checked"':'';
|
|
|
|
$show_no = ($conf['show_nb_comments']=='false')?'checked="checked"':'';
|
|
|
|
$expand_yes = ($conf['auto_expand']=='true')?'checked="checked"':'';
|
|
|
|
$expand_no = ($conf['auto_expand']=='false')?'checked="checked"':'';
|
|
|
|
|
|
|
|
$template->assign_block_vars(
|
|
|
|
'default',
|
|
|
|
array(
|
|
|
|
'NB_IMAGE_LINE'=>$conf['nb_image_line'],
|
|
|
|
'NB_ROW_PAGE'=>$conf['nb_line_page'],
|
|
|
|
'CONF_RECENT'=>$conf['recent_period'],
|
|
|
|
'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
|
2005-09-19 00:29:17 +02:00
|
|
|
'MAXWIDTH'=>$conf['default_maxwidth'],
|
|
|
|
'MAXHEIGHT'=>$conf['default_maxheight'],
|
2004-09-20 22:08:15 +02:00
|
|
|
'EXPAND_YES'=>$expand_yes,
|
|
|
|
'EXPAND_NO'=>$expand_no,
|
|
|
|
'SHOW_COMMENTS_YES'=>$show_yes,
|
|
|
|
'SHOW_COMMENTS_NO'=>$show_no
|
|
|
|
));
|
2005-09-03 18:36:05 +02:00
|
|
|
|
|
|
|
$blockname = 'default.language_option';
|
|
|
|
|
|
|
|
foreach (get_languages() as $language_code => $language_name)
|
|
|
|
{
|
|
|
|
if (isset($_POST['submit']))
|
|
|
|
{
|
|
|
|
$selected =
|
|
|
|
$_POST['default_language'] == $language_code
|
|
|
|
? 'selected="selected"' : '';
|
|
|
|
}
|
|
|
|
else if ($conf['default_language'] == $language_code)
|
|
|
|
{
|
|
|
|
$selected = 'selected="selected"';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$selected = '';
|
|
|
|
}
|
2004-09-20 22:08:15 +02:00
|
|
|
|
2005-09-03 18:36:05 +02:00
|
|
|
$template->assign_block_vars(
|
|
|
|
$blockname,
|
|
|
|
array(
|
|
|
|
'VALUE'=> $language_code,
|
|
|
|
'CONTENT' => $language_name,
|
|
|
|
'SELECTED' => $selected
|
|
|
|
));
|
|
|
|
}
|
2004-10-03 01:12:50 +02:00
|
|
|
|
2005-09-03 18:36:05 +02:00
|
|
|
$blockname = 'default.template_option';
|
|
|
|
|
|
|
|
foreach (get_templates() as $pwg_template)
|
|
|
|
{
|
|
|
|
if (isset($_POST['submit']))
|
|
|
|
{
|
|
|
|
$selected =
|
|
|
|
$_POST['default_template'] == $pwg_template
|
|
|
|
? 'selected="selected"' : '';
|
|
|
|
}
|
|
|
|
else if ($conf['default_template'] == $pwg_template)
|
|
|
|
{
|
|
|
|
$selected = 'selected="selected"';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$selected = '';
|
|
|
|
}
|
2004-09-20 22:08:15 +02:00
|
|
|
|
2005-09-03 18:36:05 +02:00
|
|
|
$template->assign_block_vars(
|
|
|
|
$blockname,
|
|
|
|
array(
|
|
|
|
'VALUE'=> $pwg_template,
|
|
|
|
'CONTENT' => $pwg_template,
|
|
|
|
'SELECTED' => $selected
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-09-20 22:08:15 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2003-05-09 14:42:42 +02:00
|
|
|
//----------------------------------------------------------- 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
|
|
|
?>
|