aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-03-22 17:00:33 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-03-22 17:00:33 +0000
commitf0e4a8a4e4124f25a502219fe0e3da7aef5c1ee4 (patch)
treee8eef954971db13d1a198af737a7ed9ede51d243
parent42e30320e4cfc76229f3022954eda0b9fd2e4b13 (diff)
downloadforums-f0e4a8a4e4124f25a502219fe0e3da7aef5c1ee4.tar
forums-f0e4a8a4e4124f25a502219fe0e3da7aef5c1ee4.tar.gz
forums-f0e4a8a4e4124f25a502219fe0e3da7aef5c1ee4.tar.bz2
forums-f0e4a8a4e4124f25a502219fe0e3da7aef5c1ee4.tar.xz
forums-f0e4a8a4e4124f25a502219fe0e3da7aef5c1ee4.zip
Fix problem with user_admin not showing correct status for certain settings + switch to same include series as main files
git-svn-id: file:///svn/phpbb/trunk@2397 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/admin/admin_board.php7
-rw-r--r--phpBB/admin/admin_db_utilities.php5
-rw-r--r--phpBB/admin/admin_disallow.php5
-rw-r--r--phpBB/admin/admin_forum_prune.php10
-rw-r--r--phpBB/admin/admin_forumauth.php5
-rw-r--r--phpBB/admin/admin_forums.php7
-rw-r--r--phpBB/admin/admin_groups.php6
-rw-r--r--phpBB/admin/admin_mass_email.php5
-rw-r--r--phpBB/admin/admin_ranks.php7
-rw-r--r--phpBB/admin/admin_smilies.php6
-rw-r--r--phpBB/admin/admin_styles.php15
-rw-r--r--phpBB/admin/admin_ug_auth.php6
-rw-r--r--phpBB/admin/admin_user_ban.php5
-rw-r--r--phpBB/admin/admin_users.php535
-rw-r--r--phpBB/admin/admin_words.php5
-rw-r--r--phpBB/admin/index.php6
-rw-r--r--phpBB/admin/page_header_admin.php195
17 files changed, 396 insertions, 434 deletions
diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php
index f22ac1ba9d..56ddc946d7 100644
--- a/phpBB/admin/admin_board.php
+++ b/phpBB/admin/admin_board.php
@@ -23,9 +23,10 @@ if( !empty($setmodules) )
//
// Let's set the root dir for phpBB
//
-$phpbb_root_dir = "./../";
-require('pagestart.inc');
-include($phpbb_root_dir . 'includes/functions_selects.'.$phpEx);
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
//
// Pull all config data
diff --git a/phpBB/admin/admin_db_utilities.php b/phpBB/admin/admin_db_utilities.php
index 56ebe9307c..7dffff981c 100644
--- a/phpBB/admin/admin_db_utilities.php
+++ b/phpBB/admin/admin_db_utilities.php
@@ -53,9 +53,10 @@ if( !empty($setmodules) )
//
// Load default header
//
-$phpbb_root_dir = "./../";
$no_page_header = TRUE;
-require('pagestart.inc');
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/sql_parse.'.$phpEx);
//
diff --git a/phpBB/admin/admin_disallow.php b/phpBB/admin/admin_disallow.php
index 78dfbd3f7b..4efcd2f3e9 100644
--- a/phpBB/admin/admin_disallow.php
+++ b/phpBB/admin/admin_disallow.php
@@ -33,8 +33,9 @@ if( !empty($setmodules) )
//
// Include required files, get $phpEx and check permissions
//
-$phpbb_root_dir = './../';
-require('pagestart.inc');
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
if( isset($HTTP_POST_VARS['add_name']) )
{
diff --git a/phpBB/admin/admin_forum_prune.php b/phpBB/admin/admin_forum_prune.php
index 293c8334ab..ec04cc7291 100644
--- a/phpBB/admin/admin_forum_prune.php
+++ b/phpBB/admin/admin_forum_prune.php
@@ -21,7 +21,7 @@
define('IN_PHPBB', 1);
-if( !empty($setmodules) )
+if ( !empty($setmodules) )
{
$filename = basename(__FILE__);
$module['Forums']['Prune'] = $filename;
@@ -32,9 +32,11 @@ if( !empty($setmodules) )
//
// Load default header
//
-$phpbb_root_dir = "./../";
-require('pagestart.inc');
-include($phpbb_root_path . 'includes/prune.'.$phpEx);
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
+require($phpbb_root_path . 'includes/prune.'.$phpEx);
+require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
//
// Get the forum ID for pruning
diff --git a/phpBB/admin/admin_forumauth.php b/phpBB/admin/admin_forumauth.php
index 15b0bfac41..e6edc49eb2 100644
--- a/phpBB/admin/admin_forumauth.php
+++ b/phpBB/admin/admin_forumauth.php
@@ -33,9 +33,10 @@ if( !empty($setmodules) )
//
// Load default header
//
-$phpbb_root_dir = "./../";
$no_page_header = TRUE;
-require('pagestart.inc');
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
//
// Start program - define vars
diff --git a/phpBB/admin/admin_forums.php b/phpBB/admin/admin_forums.php
index 230a7e1b91..223949ebe7 100644
--- a/phpBB/admin/admin_forums.php
+++ b/phpBB/admin/admin_forums.php
@@ -32,9 +32,10 @@ if( !empty($setmodules) )
//
// Load default header
//
-$phpbb_root_dir = "./../";
-require('pagestart.inc');
-include($phpbb_root_dir . 'includes/functions_admin.'.$phpEx);
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
+include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
$forum_auth_ary = array(
"auth_view" => AUTH_ALL,
diff --git a/phpBB/admin/admin_groups.php b/phpBB/admin/admin_groups.php
index e66aa2187b..6ae809ff20 100644
--- a/phpBB/admin/admin_groups.php
+++ b/phpBB/admin/admin_groups.php
@@ -33,9 +33,9 @@ if( !empty($setmodules) )
//
// Load default header
//
-$phpbb_root_dir = "./../";
-
-require('pagestart.inc');
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
if( isset($HTTP_POST_VARS[POST_GROUPS_URL]) || isset($HTTP_GET_VARS[POST_GROUPS_URL]) )
{
diff --git a/phpBB/admin/admin_mass_email.php b/phpBB/admin/admin_mass_email.php
index 02562c0ad2..2a02135cc5 100644
--- a/phpBB/admin/admin_mass_email.php
+++ b/phpBB/admin/admin_mass_email.php
@@ -32,9 +32,10 @@ if( !empty($setmodules) )
//
// Load default header
//
-$phpbb_root_dir = "./../";
$no_page_header = TRUE;
-require('pagestart.inc');
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
//
// Increase maximum execution time in case of a lot of users, but don't complain about it if it isn't
diff --git a/phpBB/admin/admin_ranks.php b/phpBB/admin/admin_ranks.php
index 27287b9bec..33546a91d3 100644
--- a/phpBB/admin/admin_ranks.php
+++ b/phpBB/admin/admin_ranks.php
@@ -32,10 +32,9 @@ if( !empty($setmodules) )
//
// Let's set the root dir for phpBB
//
-$phpbb_root_dir = "./../";
-
-require('pagestart.inc');
-
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
diff --git a/phpBB/admin/admin_smilies.php b/phpBB/admin/admin_smilies.php
index 00de33ac66..e28bfe866e 100644
--- a/phpBB/admin/admin_smilies.php
+++ b/phpBB/admin/admin_smilies.php
@@ -39,8 +39,6 @@ if( !empty($setmodules) )
//
// Load default header
//
-$phpbb_root_dir = "./../";
-
if( isset($HTTP_GET_VARS['export_pack']) )
{
if ( $HTTP_GET_VARS['export_pack'] == "send" )
@@ -48,8 +46,10 @@ if( isset($HTTP_GET_VARS['export_pack']) )
$no_page_header = true;
}
}
-require('pagestart.inc');
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
//
// Check to see what mode we should operate in.
diff --git a/phpBB/admin/admin_styles.php b/phpBB/admin/admin_styles.php
index 0d15d94983..2d5c64a8ff 100644
--- a/phpBB/admin/admin_styles.php
+++ b/phpBB/admin/admin_styles.php
@@ -35,18 +35,19 @@ if( !empty($setmodules) )
//
// Load default header
//
-$phpbb_root_dir = "./../";
-
//
// Check if the user has cancled a confirmation message.
//
+$phpbb_root_path = "../";
+
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;
if( empty($HTTP_POST_VARS['send_file']) )
{
$no_page_header = ( $cancel ) ? TRUE : FALSE;
- require('pagestart.inc');
+ require($phpbb_root_path . 'extension.inc');
+ require('pagestart.' . $phpEx);
}
if( $cancel )
@@ -72,7 +73,7 @@ switch( $mode )
if( isset($install_to) )
{
- include($phpbb_root_dir . "templates/" . $install_to . "/theme_info.cfg");
+ include($phpbb_root_path. "templates/" . $install_to . "/theme_info.cfg");
$template_name = $$install_to;
$found = FALSE;
@@ -127,15 +128,15 @@ switch( $mode )
$installable_themes = array();
- if( $dir = @opendir($phpbb_root_dir . "templates/") )
+ if( $dir = @opendir($phpbb_root_path. "templates/") )
{
while( $sub_dir = @readdir($dir) )
{
if( !is_file($phpbb_root_path . 'templates/' .$sub_dir) && !is_link($phpbb_root_path . 'templates/' .$sub_dir) && $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" )
{
- if( @file_exists($phpbb_root_dir . "templates/" . $sub_dir . "/theme_info.cfg") )
+ if( @file_exists($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg") )
{
- include($phpbb_root_dir . "templates/" . $sub_dir . "/theme_info.cfg");
+ include($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg");
for($i = 0; $i < count($$sub_dir); $i++)
{
diff --git a/phpBB/admin/admin_ug_auth.php b/phpBB/admin/admin_ug_auth.php
index d2f037f03f..5c1b23ce06 100644
--- a/phpBB/admin/admin_ug_auth.php
+++ b/phpBB/admin/admin_ug_auth.php
@@ -34,9 +34,11 @@ if( !empty($setmodules) )
//
// Load default header
//
-$phpbb_root_dir = './../';
$no_page_header = TRUE;
-require('pagestart.inc');
+
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
$params = array('mode' => 'mode', 'user_id' => POST_USERS_URL, 'group_id' => POST_GROUPS_URL, 'adv' => 'adv');
diff --git a/phpBB/admin/admin_user_ban.php b/phpBB/admin/admin_user_ban.php
index 242590bc6a..e20462a9cc 100644
--- a/phpBB/admin/admin_user_ban.php
+++ b/phpBB/admin/admin_user_ban.php
@@ -33,8 +33,9 @@ if( !empty($setmodules) )
//
// Load default header
//
-$phpbb_root_dir = "./../";
-require('pagestart.inc');
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
//
// Start program
diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php
index 5312be125d..8d01dc6fbf 100644
--- a/phpBB/admin/admin_users.php
+++ b/phpBB/admin/admin_users.php
@@ -6,7 +6,7 @@
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
- * $Id$
+ * $user_id: admin_users.php,v 1.53 2002/03/19 00:26:49 psotfx Exp $
*
*
***************************************************************************/
@@ -30,107 +30,103 @@ if( !empty($setmodules) )
return;
}
-//
-// Load default header
-//
-$phpbb_root_dir = "./../";
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
+require($phpbb_root_path . 'includes/bbcode.'.$phpEx);
+require($phpbb_root_path . 'includes/functions_post.'.$phpEx);
+require($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
+require($phpbb_root_path . 'includes/functions_validate.'.$phpEx);
-require('pagestart.inc');
-include($phpbb_root_dir . 'includes/bbcode.'.$phpEx);
-include($phpbb_root_dir . 'includes/functions_post.'.$phpEx);
-include($phpbb_root_dir . 'includes/functions_selects.'.$phpEx);
-include($phpbb_root_dir . 'includes/functions_validate.'.$phpEx);
-//
//
+// Set mode
//
-if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
+if( isset( $HTTP_POST_VARS['mode'] ) || isset( $HTTP_GET_VARS['mode'] ) )
{
- $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
+ $mode = ( isset( $HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
}
else
{
- $mode = "";
+ $mode = '';
}
//
// Begin program
//
-
-if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset($HTTP_POST_VARS[POST_USERS_URL]) ) )
+if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset( $HTTP_POST_VARS[POST_USERS_URL]) ) )
{
-
//
// Ok, the profile has been modified and submitted, let's update
//
- if( ( $mode == "save" && isset($HTTP_POST_VARS['submit']) ) || isset($HTTP_POST_VARS['avatargallery']) || isset($HTTP_POST_VARS['submitavatar']) || isset($HTTP_POST_VARS['cancelavatar']) )
+ if( ( $mode == 'save' && isset( $HTTP_POST_VARS['submit'] ) ) || isset( $HTTP_POST_VARS['avatargallery'] ) || isset( $HTTP_POST_VARS['submitavatar'] ) || isset( $HTTP_POST_VARS['cancelavatar'] ) )
{
- $user_id = intval($HTTP_POST_VARS['id']);
+ $user_id = intval( $HTTP_POST_VARS['id'] );
$this_userdata = get_userdata($user_id);
if( !$this_userdata )
{
- message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
+ message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
}
- $username = (!empty($HTTP_POST_VARS['username'])) ? trim(strip_tags($HTTP_POST_VARS['username'])) : "";
- $email = (!empty($HTTP_POST_VARS['email'])) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['email']))) : "";
+ $username = ( !empty($HTTP_POST_VARS['username']) ) ? trim(strip_tags( $HTTP_POST_VARS['username'] ) ) : '';
+ $email = ( !empty($HTTP_POST_VARS['email']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['email'] ) )) : '';
- $password = (!empty($HTTP_POST_VARS['password'])) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['password']))) : "";
- $password_confirm = (!empty($HTTP_POST_VARS['password_confirm'])) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['password_confirm']))) : "";
+ $password = ( !empty($HTTP_POST_VARS['password']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['password'] ) )) : '';
+ $password_confirm = ( !empty($HTTP_POST_VARS['password_confirm']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['password_confirm'] ) )) : '';
- $icq = (!empty($HTTP_POST_VARS['icq'])) ? trim(strip_tags($HTTP_POST_VARS['icq'])) : "";
- $aim = (!empty($HTTP_POST_VARS['aim'])) ? trim(strip_tags($HTTP_POST_VARS['aim'])) : "";
- $msn = (!empty($HTTP_POST_VARS['msn'])) ? trim(strip_tags($HTTP_POST_VARS['msn'])) : "";
- $yim = (!empty($HTTP_POST_VARS['yim'])) ? trim(strip_tags($HTTP_POST_VARS['yim'])) : "";
+ $icq = ( !empty($HTTP_POST_VARS['icq']) ) ? trim(strip_tags( $HTTP_POST_VARS['icq'] ) ) : '';
+ $aim = ( !empty($HTTP_POST_VARS['aim']) ) ? trim(strip_tags( $HTTP_POST_VARS['aim'] ) ) : '';
+ $msn = ( !empty($HTTP_POST_VARS['msn']) ) ? trim(strip_tags( $HTTP_POST_VARS['msn'] ) ) : '';
+ $yim = ( !empty($HTTP_POST_VARS['yim']) ) ? trim(strip_tags( $HTTP_POST_VARS['yim'] ) ) : '';
- $website = (!empty($HTTP_POST_VARS['website'])) ? trim(strip_tags($HTTP_POST_VARS['website'])) : "";
- $location = (!empty($HTTP_POST_VARS['location'])) ? trim(strip_tags($HTTP_POST_VARS['location'])) : "";
- $occupation = (!empty($HTTP_POST_VARS['occupation'])) ? trim(strip_tags($HTTP_POST_VARS['occupation'])) : "";
- $interests = (!empty($HTTP_POST_VARS['interests'])) ? trim(strip_tags($HTTP_POST_VARS['interests'])) : "";
- $signature = (!empty($HTTP_POST_VARS['signature'])) ? trim(str_replace("<br />", "\n", $HTTP_POST_VARS['signature'])) : "";
+ $website = ( !empty($HTTP_POST_VARS['website']) ) ? trim(strip_tags( $HTTP_POST_VARS['website'] ) ) : '';
+ $location = ( !empty($HTTP_POST_VARS['location']) ) ? trim(strip_tags( $HTTP_POST_VARS['location'] ) ) : '';
+ $occupation = ( !empty($HTTP_POST_VARS['occupation']) ) ? trim(strip_tags( $HTTP_POST_VARS['occupation'] ) ) : '';
+ $interests = ( !empty($HTTP_POST_VARS['interests']) ) ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : '';
+ $signature = ( !empty($HTTP_POST_VARS['signature']) ) ? trim(str_replace('<br />', "\n", $HTTP_POST_VARS['signature'] ) ) : '';
validate_optional_fields($icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature);
- $viewemail = (isset($HTTP_POST_VARS['viewemail'])) ? ( ($HTTP_POST_VARS['viewemail']) ? TRUE : 0 ) : 0;
- $allowviewonline = (isset($HTTP_POST_VARS['hideonline'])) ? ( ($HTTP_POST_VARS['hideonline']) ? 0 : TRUE ) : TRUE;
- $notifyreply = (isset($HTTP_POST_VARS['notifyreply'])) ? ( ($HTTP_POST_VARS['notifyreply']) ? TRUE : 0 ) : 0;
- $notifypm = (isset($HTTP_POST_VARS['notifypm'])) ? ( ($HTTP_POST_VARS['notifypm']) ? TRUE : 0 ) : TRUE;
- $popuppm = (isset($HTTP_POST_VARS['popup_pm'])) ? ( ($HTTP_POST_VARS['popup_pm']) ? TRUE : 0 ) : TRUE;
- $attachsig = (isset($HTTP_POST_VARS['attachsig'])) ? ( ($HTTP_POST_VARS['attachsig']) ? TRUE : 0 ) : 0;
-
- $allowhtml = (isset($HTTP_POST_VARS['allowhtml'])) ? intval($HTTP_POST_VARS['allowhtml']) : $board_config['allow_html'];
- $allowbbcode = (isset($HTTP_POST_VARS['allowbbcode'])) ? intval($HTTP_POST_VARS['allowbbcode']) : $board_config['allow_bbcode'];
- $allowsmilies = (isset($HTTP_POST_VARS['allowsmilies'])) ? intval($HTTP_POST_VARS['allowsmilies']) : $board_config['allow_smilies'];
-
- $user_style = ($HTTP_POST_VARS['style']) ? intval($HTTP_POST_VARS['style']) : $board_config['default_style'];
- $user_lang = ($HTTP_POST_VARS['language']) ? $HTTP_POST_VARS['language'] : $board_config['default_lang'];
- $user_timezone = (isset($HTTP_POST_VARS['timezone'])) ? doubleval($HTTP_POST_VARS['timezone']) : $board_config['board_timezone'];
- $user_template = ($HTTP_POST_VARS['template']) ? $HTTP_POST_VARS['template'] : $board_config['board_template'];
- $user_dateformat = ($HTTP_POST_VARS['dateformat']) ? trim($HTTP_POST_VARS['dateformat']) : $board_config['default_dateformat'];
-
- $user_avatar_local = ( isset($HTTP_POST_VARS['avatarselect']) && !empty($HTTP_POST_VARS['submitavatar']) && $board_config['allow_avatar_local'] ) ? $HTTP_POST_VARS['avatarselect'] : ( ( isset($HTTP_POST_VARS['avatarlocal']) ) ? $HTTP_POST_VARS['avatarlocal'] : "" );
-
- $user_avatar_remoteurl = (!empty($HTTP_POST_VARS['avatarremoteurl'])) ? trim($HTTP_POST_VARS['avatarremoteurl']) : "";
- $user_avatar_url = (!empty($HTTP_POST_VARS['avatarurl'])) ? trim($HTTP_POST_VARS['avatarurl']) : "";
- $user_avatar_loc = ($HTTP_POST_FILES['avatar']['tmp_name'] != "none") ? $HTTP_POST_FILES['avatar']['tmp_name'] : "";
- $user_avatar_name = (!empty($HTTP_POST_FILES['avatar']['name'])) ? $HTTP_POST_FILES['avatar']['name'] : "";
- $user_avatar_size = (!empty($HTTP_POST_FILES['avatar']['size'])) ? $HTTP_POST_FILES['avatar']['size'] : 0;
- $user_avatar_filetype = (!empty($HTTP_POST_FILES['avatar']['type'])) ? $HTTP_POST_FILES['avatar']['type'] : "";
-
- $user_avatar = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar'] : "";
- $user_avatar_type = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar_type'] : "";
-
- $user_status = (!empty($HTTP_POST_VARS['user_status'])) ? intval($HTTP_POST_VARS['user_status']) : 0;
- $user_allowpm = (!empty($HTTP_POST_VARS['user_allowpm'])) ? intval($HTTP_POST_VARS['user_allowpm']) : 0;
- $user_rank = (!empty($HTTP_POST_VARS['user_rank'])) ? intval($HTTP_POST_VARS['user_rank']) : 0;
- $user_allowavatar = (!empty($HTTP_POST_VARS['user_allowavatar'])) ? intval($HTTP_POST_VARS['user_allowavatar']) : 0;
-
- if( isset($HTTP_POST_VARS['avatargallery']) || isset($HTTP_POST_VARS['submitavatar']) || isset($HTTP_POST_VARS['cancelavatar']) )
+ $viewemail = ( isset( $HTTP_POST_VARS['viewemail']) ) ? ( ( $HTTP_POST_VARS['viewemail'] ) ? TRUE : 0 ) : 0;
+ $allowviewonline = ( isset( $HTTP_POST_VARS['hideonline']) ) ? ( ( $HTTP_POST_VARS['hideonline'] ) ? 0 : TRUE ) : TRUE;
+ $notifyreply = ( isset( $HTTP_POST_VARS['notifyreply']) ) ? ( ( $HTTP_POST_VARS['notifyreply'] ) ? TRUE : 0 ) : 0;
+ $notifypm = ( isset( $HTTP_POST_VARS['notifypm']) ) ? ( ( $HTTP_POST_VARS['notifypm'] ) ? TRUE : 0 ) : TRUE;
+ $popuppm = ( isset( $HTTP_POST_VARS['popup_pm']) ) ? ( ( $HTTP_POST_VARS['popup_pm'] ) ? TRUE : 0 ) : TRUE;
+ $attachsig = ( isset( $HTTP_POST_VARS['attachsig']) ) ? ( ( $HTTP_POST_VARS['attachsig'] ) ? TRUE : 0 ) : 0;
+
+ $allowhtml = ( isset( $HTTP_POST_VARS['allowhtml']) ) ? intval( $HTTP_POST_VARS['allowhtml'] ) : $board_config['allow_html'];
+ $allowbbcode = ( isset( $HTTP_POST_VARS['allowbbcode']) ) ? intval( $HTTP_POST_VARS['allowbbcode'] ) : $board_config['allow_bbcode'];
+ $allowsmilies = ( isset( $HTTP_POST_VARS['allowsmilies']) ) ? intval( $HTTP_POST_VARS['allowsmilies'] ) : $board_config['allow_smilies'];
+
+ $user_style = ( $HTTP_POST_VARS['style'] ) ? intval( $HTTP_POST_VARS['style'] ) : $board_config['default_style'];
+ $user_lang = ( $HTTP_POST_VARS['language'] ) ? $HTTP_POST_VARS['language'] : $board_config['default_lang'];
+ $user_timezone = ( isset( $HTTP_POST_VARS['timezone']) ) ? doubleval( $HTTP_POST_VARS['timezone'] ) : $board_config['board_timezone'];
+ $user_template = ( $HTTP_POST_VARS['template'] ) ? $HTTP_POST_VARS['template'] : $board_config['board_template'];
+ $user_dateformat = ( $HTTP_POST_VARS['dateformat'] ) ? trim( $HTTP_POST_VARS['dateformat'] ) : $board_config['default_dateformat'];
+
+ $user_avatar_local = ( isset( $HTTP_POST_VARS['avatarselect'] ) && !empty($HTTP_POST_VARS['submitavatar'] ) && $board_config['allow_avatar_local'] ) ? $HTTP_POST_VARS['avatarselect'] : ( ( isset( $HTTP_POST_VARS['avatarlocal'] ) ) ? $HTTP_POST_VARS['avatarlocal'] : '' );
+
+ $user_avatar_remoteurl = ( !empty($HTTP_POST_VARS['avatarremoteurl']) ) ? trim( $HTTP_POST_VARS['avatarremoteurl'] ) : '';
+ $user_avatar_url = ( !empty($HTTP_POST_VARS['avatarurl']) ) ? trim( $HTTP_POST_VARS['avatarurl'] ) : '';
+ $user_avatar_loc = ( $HTTP_POST_FILES['avatar']['tmp_name'] != "none") ? $HTTP_POST_FILES['avatar']['tmp_name'] : '';
+ $user_avatar_name = ( !empty($HTTP_POST_FILES['avatar']['name']) ) ? $HTTP_POST_FILES['avatar']['name'] : '';
+ $user_avatar_size = ( !empty($HTTP_POST_FILES['avatar']['size']) ) ? $HTTP_POST_FILES['avatar']['size'] : 0;
+ $user_avatar_filetype = ( !empty($HTTP_POST_FILES['avatar']['type']) ) ? $HTTP_POST_FILES['avatar']['type'] : '';
+
+ $user_avatar = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar'] : '';
+ $user_avatar_type = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar_type'] : '';
+
+ $user_status = ( !empty($HTTP_POST_VARS['user_status']) ) ? intval( $HTTP_POST_VARS['user_status'] ) : 0;
+ $user_allowpm = ( !empty($HTTP_POST_VARS['user_allowpm']) ) ? intval( $HTTP_POST_VARS['user_allowpm'] ) : 0;
+ $user_rank = ( !empty($HTTP_POST_VARS['user_rank']) ) ? intval( $HTTP_POST_VARS['user_rank'] ) : 0;
+ $user_allowavatar = ( !empty($HTTP_POST_VARS['user_allowavatar']) ) ? intval( $HTTP_POST_VARS['user_allowavatar'] ) : 0;
+
+ if( isset( $HTTP_POST_VARS['avatargallery'] ) || isset( $HTTP_POST_VARS['submitavatar'] ) || isset( $HTTP_POST_VARS['cancelavatar'] ) )
{
$username = stripslashes($username);
$email = stripslashes($email);
- $password = "";
- $password_confirm = "";
+ $password = '';
+ $password_confirm = '';
$icq = stripslashes($icq);
$aim = stripslashes($aim);
@@ -145,11 +141,19 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
$user_lang = stripslashes($user_lang);
$user_dateformat = stripslashes($user_dateformat);
+
+ if ( !isset($HTTP_POST_VARS['cancelavatar']))
+ {
+ $user_avatar = $user_avatar_local;
+ $user_avatar_type = USER_AVATAR_GALLERY;
+ }
}
}
- if( isset($HTTP_POST_VARS['submit']) )
+ if( isset( $HTTP_POST_VARS['submit'] ) )
{
+ include($phpbb_root_path . 'includes/usercp_avatar.'.$phpEx);
+
$error = FALSE;
if( stripslashes($username) != $this_userdata['username'] )
@@ -158,11 +162,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
if( !validate_username($username) )
{
$error = TRUE;
- if( isset($error_msg) )
- {
- $error_msg .= "<br />";
- }
- $error_msg .= $lang['Invalid_username'];
+ $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Invalid_username'];
}
else
{
@@ -180,11 +180,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
if($password != $password_confirm)
{
$error = TRUE;
- if( isset($error_msg) )
- {
- $error_msg .= "<br />";
- }
- $error_msg .= $lang['Password_mismatch'];
+ $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
}
else
{
@@ -195,20 +191,12 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
else if( $password && !$password_confirm )
{
$error = TRUE;
- if( isset($error_msg) )
- {
- $error_msg .= "<br />";
- }
- $error_msg .= $lang['Password_mismatch'];
+ $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
}
else if( !$password && $password_confirm )
{
$error = TRUE;
- if( isset($error_msg) )
- {
- $error_msg .= "<br />";
- }
- $error_msg .= $lang['Password_mismatch'];
+ $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
}
if( $user_status == 0 )
@@ -218,40 +206,39 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
WHERE session_user_id = $user_id";
if( !$db->sql_query($sql) )
{
- message_die(GENERAL_ERROR, "Couldn't delete this user's sessions", "", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_ERROR, 'Could not delete this users sessions', '', __LINE__, __FILE__, $sql);
}
}
if( $signature != "" )
{
- $sig_length_check = preg_replace("/(\[.*?)(=.*?)\]/is", "\\1]", stripslashes($signature));
+ $sig_length_check = preg_replace('/(\[.*?)(=.*?)\]/is', '\\1]', stripslashes($signature));
if ( $allowhtml )
{
- $sig_length_check = preg_replace("/(\<.*?)(=.*?)( .*?=.*?)?([ \/]?\>)/is", "\\1\\3\\4", $sig_length_check);
+ $sig_length_check = preg_replace('/(\<.*?)(=.*?)( .*?=.*?)?([ \/]?\>)/is', '\\1\\3\\4', $sig_length_check);
}
- $sig_length_check = preg_replace("/(\[.*?)(=.*?)\]/is", "\\1]", stripslashes($signature));
+ $sig_length_check = preg_replace('/(\[.*?)(=.*?)\]/is', '\\1]', stripslashes($signature));
// Only create a new bbcode_uid when there was no uid yet.
if ( $signature_bbcode_uid == '' )
{
- $signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : "";
+ $signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : '';
}
$signature = prepare_message($signature, $allowhtml, $allowbbcode, $allowsmilies, $signature_bbcode_uid);
if ( strlen($sig_length_check) > $board_config['max_sig_chars'] )
{
$error = TRUE;
- if ( isset($error_msg) )
- {
- $error_msg .= "<br />";
- }
- $error_msg .= $lang['Signature_too_long'];
+ $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Signature_too_long'];
}
}
//
// Avatar stuff
//
+ //
+ // Avatar stuff
+ //
$avatar_sql = "";
if( isset($HTTP_POST_VARS['avatardel']) )
{
@@ -515,7 +502,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
{
$avatar_sql = ", user_avatar = '" . str_replace("\'", "''", $user_avatar_local) . "', user_avatar_type = " . USER_AVATAR_GALLERY;
}
-
+
//
// Update entry in DB
//
@@ -530,7 +517,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
AND g.group_single_user = 1";
if( !($result = $db->sql_query($sql)) )
{
- message_die(GENERAL_ERROR, "Couldn't obtain group information for this user", "", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_ERROR, 'Could not obtain group information for this user', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
@@ -540,7 +527,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
WHERE poster_id = $user_id";
if( !$db->sql_query($sql) )
{
- message_die(GENERAL_ERROR, "Couldn't update posts for this user", "", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_ERROR, 'Could not update posts for this user', '', __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . TOPICS_TABLE . "
@@ -548,42 +535,42 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
WHERE topic_poster = $user_id";
if( !$db->sql_query($sql) )
{
- message_die(GENERAL_ERROR, "Couldn't update topics for this user", "", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_ERROR, 'Could not update topics for this user', '', __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . USERS_TABLE . "
WHERE user_id = $user_id";
if( !$db->sql_query($sql) )
{
- message_die(GENERAL_ERROR, "Couldn't delete user", "", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_ERROR, 'Could not delete user', '', __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . USER_GROUP_TABLE . "
WHERE user_id = $user_id";
if( !$db->sql_query($sql) )
{
- message_die(GENERAL_ERROR, "Couldn't delete user from user_group table", "", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_ERROR, 'Could not delete user from user_group table', '', __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . GROUPS_TABLE . "
WHERE group_id = " . $row['group_id'];
if( !$db->sql_query($sql) )
{
- message_die(GENERAL_ERROR, "Couldn't delete group for this user", "", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . AUTH_ACCESS_TABLE . "
WHERE group_id = " . $row['group_id'];
if( !$db->sql_query($sql) )
{
- message_die(GENERAL_ERROR, "Couldn't delete group for this user", "", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
WHERE user_id = $user_id";
if ( !$db->sql_query($sql) )
{
- message_die(GENERAL_ERROR, "Couldn't delete user from topic watch table", "", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_ERROR, 'Could not delete user from topic watch table', '', __LINE__, __FILE__, $sql);
}
$message = $lang['User_deleted'];
@@ -600,10 +587,10 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
{
$sql = "UPDATE " . GROUPS_TABLE . "
SET group_name = '".str_replace("\'", "''", $rename_user)."'
- WHERE group_name = '".str_replace("\'", "''", $this_userdata['username'])."'";
+ WHERE group_name = '".str_replace("\'", "''", $this_userdata['username'] )."'";
if( !$result = $db->sql_query($sql) )
{
- message_die(GENERAL_ERROR, "Couldn't rename user's group.", "", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_ERROR, 'Could not rename users group', '', __LINE__, __FILE__, $sql);
}
}
$message .= $lang['Admin_user_updated'];
@@ -611,11 +598,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
else
{
$error = TRUE;
- if( isset($error_msg) )
- {
- $error_msg .= "<br />";
- }
- $error_msg .= $lang['Admin_user_fail'];
+ $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Admin_user_fail'];
}
}
@@ -626,20 +609,22 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
else
{
$template->set_filenames(array(
- "reg_header" => "error_body.tpl")
+ 'reg_header' => 'error_body.tpl')
);
+
$template->assign_vars(array(
- "ERROR_MESSAGE" => $error_msg)
+ 'ERROR_MESSAGE' => $error_msg)
);
- $template->assign_var_from_handle("ERROR_BOX", "reg_header");
+
+ $template->assign_var_from_handle('ERROR_BOX', 'reg_header');
$username = stripslashes($username);
$email = stripslashes($email);
- $password = "";
- $password_confirm = "";
+ $password = '';
+ $password_confirm = '';
$icq = stripslashes($icq);
- $aim = stripslashes($aim);
+ $aim = str_replace('+', ' ', stripslashes($aim));
$msn = stripslashes($msn);
$yim = stripslashes($yim);
@@ -653,23 +638,23 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
$user_dateformat = stripslashes($user_dateformat);
}
}
- else if( !isset($HTTP_POST_VARS['submit']) && $mode != "save" && !isset($HTTP_POST_VARS['avatargallery']) && !isset($HTTP_POST_VARS['submitavatar']) && !isset($HTTP_POST_VARS['cancelavatar']))
+ else if( !isset( $HTTP_POST_VARS['submit'] ) && $mode != 'save' && !isset( $HTTP_POST_VARS['avatargallery'] ) && !isset( $HTTP_POST_VARS['submitavatar'] ) && !isset( $HTTP_POST_VARS['cancelavatar'] ) )
{
- if( isset($HTTP_GET_VARS[POST_USERS_URL]) || isset($HTTP_POST_VARS[POST_USERS_URL]) )
+ if( isset( $HTTP_GET_VARS[POST_USERS_URL]) || isset( $HTTP_POST_VARS[POST_USERS_URL]) )
{
- $user_id = ( isset($HTTP_POST_VARS[POST_USERS_URL]) ) ? intval($HTTP_POST_VARS[POST_USERS_URL]) : intval($HTTP_GET_VARS[POST_USERS_URL]);
+ echo $user_id = ( isset( $HTTP_POST_VARS[POST_USERS_URL]) ) ? intval( $HTTP_POST_VARS[POST_USERS_URL]) : intval( $HTTP_GET_VARS[POST_USERS_URL]);
$this_userdata = get_userdata($user_id);
if( !$this_userdata )
{
- message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
+ message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
}
}
else
{
- $this_userdata = get_userdata($HTTP_POST_VARS['username']);
+ $this_userdata = get_userdata( $HTTP_POST_VARS['username'] );
if( !$this_userdata )
{
- message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
+ message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
}
}
@@ -679,11 +664,11 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
$user_id = $this_userdata['user_id'];
$username = $this_userdata['username'];
$email = $this_userdata['user_email'];
- $password = "";
- $password_confirm = "";
+ $password = '';
+ $password_confirm = '';
$icq = $this_userdata['user_icq'];
- $aim = $this_userdata['user_aim'];
+ $aim = str_replace('+', ' ', $this_userdata['user_aim'] );
$msn = $this_userdata['user_msnm'];
$yim = $this_userdata['user_yim'];
@@ -695,8 +680,8 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
$viewemail = $this_userdata['user_viewemail'];
$notifypm = $this_userdata['user_notify_pm'];
- $popuppm = $userdata['user_popup_pm'];
- $notifyreply = $userdata['user_notify'];
+ $popuppm = $this_userdata['user_popup_pm'];
+ $notifyreply = $this_userdata['user_notify'];
$attachsig = $this_userdata['user_attachsig'];
$allowhtml = $this_userdata['user_allowhtml'];
$allowbbcode = $this_userdata['user_allowbbcode'];
@@ -716,12 +701,12 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
$COPPA = false;
- $html_status = ($this_userdata['user_allowhtml']) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF'];
- $bbcode_status = ($this_userdata['user_allowbbcode']) ? $lang['BBCode_is_ON'] : $lang['BBCode_is_OFF'];
- $smilies_status = ($this_userdata['user_allowsmile']) ? $lang['Smilies_are_ON'] : $lang['Smilies_are_OFF'];
+ $html_status = ($this_userdata['user_allowhtml'] ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF'];
+ $bbcode_status = ($this_userdata['user_allowbbcode'] ) ? $lang['BBCode_is_ON'] : $lang['BBCode_is_OFF'];
+ $smilies_status = ($this_userdata['user_allowsmile'] ) ? $lang['Smilies_are_ON'] : $lang['Smilies_are_OFF'];
}
- if( isset($HTTP_POST_VARS['avatargallery']) )
+ if( isset($HTTP_POST_VARS['avatargallery']) && !$error )
{
if( !$error )
{
@@ -854,7 +839,6 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
}
else
{
-
$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
$s_hidden_fields .= '<input type="hidden" name="id" value="' . $this_userdata['user_id'] . '" />';
@@ -888,7 +872,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
ORDER BY rank_title";
if ( !($result = $db->sql_query($sql)) )
{
- message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);
+ message_die(GENERAL_ERROR, 'Could not obtain ranks data', '', __LINE__, __FILE__, $sql);
}
$rank_select_box = '<option value="0">' . $lang['No_assigned_rank'] . '</option>';
@@ -901,7 +885,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
$rank_select_box .= '<option value="' . $rank_id . '"' . $selected . '>' . $rank . '</option>';
}
- $signature = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $signature);
+ $signature = preg_replace('/\:[0-9a-z\:]*?\]/si', ']', $signature);
$template->set_filenames(array(
"body" => "admin/user_edit_body.tpl")
@@ -911,151 +895,138 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
// Let's do an overall check for settings/versions which would prevent
// us from doing file uploads....
//
- if(phpversion() >= '4.0.0')
- {
- $file_uploads = ini_get('file_uploads');
- }
- else
- {
- $file_uploads = get_cfg_var('file_uploads');
- }
- if( ($file_uploads == 0 && !empty($file_uploads)) || (strtolower($file_uploads) == 'off') || (phpversion() == '4.0.4pl1') || (!$board_config['allow_avatar_upload']) )
- {
- $form_enctype = '';
- }
- else
- {
- $form_enctype = 'enctype="multipart/form-data"';
- }
+ $ini_val = ( phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';
+ $form_enctype = ( !@$ini_val('file_uploads') || phpversion() == '4.0.4pl1' || !$board_config['allow_avatar_upload'] || ( phpversion() < '4.0.3' && @$ini_val('open_basedir') != '' ) ) ? '' : 'enctype="multipart/form-data"';
+
$template->assign_vars(array(
- "USERNAME" => $username,
- "EMAIL" => $email,
- "YIM" => $yim,
- "ICQ" => $icq,
- "MSN" => $msn,
- "AIM" => $aim,
- "OCCUPATION" => $occupation,
- "INTERESTS" => $interests,
- "LOCATION" => $location,
- "WEBSITE" => $website,
- "SIGNATURE" => str_replace("<br />", "\n", $signature),
- "VIEW_EMAIL_YES" => ($viewemail) ? 'checked="checked"' : '',
- "VIEW_EMAIL_NO" => (!$viewemail) ? 'checked="checked"' : '',
- "HIDE_USER_YES" => (!$allowviewonline) ? 'checked="checked"' : '',
- "HIDE_USER_NO" => ($allowviewonline) ? 'checked="checked"' : '',
- "NOTIFY_PM_YES" => ($notifypm) ? 'checked="checked"' : '',
- "NOTIFY_PM_NO" => (!$notifypm) ? 'checked="checked"' : '',
- "POPUP_PM_YES" => ($popuppm) ? 'checked="checked"' : '',
- "POPUP_PM_NO" => (!$popuppm) ? 'checked="checked"' : '',
- "ALWAYS_ADD_SIGNATURE_YES" => ($attachsig) ? 'checked="checked"' : '',
- "ALWAYS_ADD_SIGNATURE_NO" => (!$attachsig) ? 'checked="checked"' : '',
- "NOTIFY_REPLY_YES" => ($notifyreply) ? 'checked="checked"' : '',
- "NOTIFY_REPLY_NO" => (!$notifyreply) ? 'checked="checked"' : '',
- "ALWAYS_ALLOW_BBCODE_YES" => ($allowbbcode) ? 'checked="checked"' : '',
- "ALWAYS_ALLOW_BBCODE_NO" => (!$allowbbcode) ? 'checked="checked"' : '',
- "ALWAYS_ALLOW_HTML_YES" => ($allowhtml) ? 'checked="checked"' : '',
- "ALWAYS_ALLOW_HTML_NO" => (!$allowhtml) ? 'checked="checked"' : '',
- "ALWAYS_ALLOW_SMILIES_YES" => ($allowsmilies) ? 'checked="checked"' : '',
- "ALWAYS_ALLOW_SMILIES_NO" => (!$allowsmilies) ? 'checked="checked"' : '',
- "AVATAR" => $avatar,
- "LANGUAGE_SELECT" => language_select($user_lang, 'language', '../language'),
- "TIMEZONE_SELECT" => tz_select($user_timezone),
- "STYLE_SELECT" => style_select($user_style, 'style'),
- "DATE_FORMAT" => $user_dateformat,
- "ALLOW_PM_YES" => ($user_allowpm) ? 'checked="checked"' : '',
- "ALLOW_PM_NO" => (!$user_allowpm) ? 'checked="checked"' : '',
- "ALLOW_AVATAR_YES" => ($user_allowavatar) ? 'checked="checked"' : '',
- "ALLOW_AVATAR_NO" => (!$user_allowavatar) ? 'checked="checked"' : '',
- "USER_ACTIVE_YES" => ($user_status) ? 'checked="checked"' : '',
- "USER_ACTIVE_NO" => (!$user_status) ? 'checked="checked"' : '',
- "RANK_SELECT_BOX" => $rank_select_box,
-
- "L_USER_TITLE" => $lang['User_admin'],
- "L_USER_EXPLAIN" => $lang['User_admin_explain'],
- "L_PASSWORD_IF_CHANGED" => $lang['password_if_changed'],
- "L_PASSWORD_CONFIRM_IF_CHANGED" => $lang['password_confirm_if_changed'],
- "L_SUBMIT" => $lang['Submit'],
- "L_RESET" => $lang['Reset'],
- "L_ICQ_NUMBER" => $lang['ICQ'],
- "L_MESSENGER" => $lang['MSNM'],
- "L_YAHOO" => $lang['YIM'],
- "L_WEBSITE" => $lang['Website'],
- "L_AIM" => $lang['AIM'],
- "L_LOCATION" => $lang['From'],
- "L_OCCUPATION" => $lang['Occupation'],
- "L_BOARD_LANGUAGE" => $lang['Board_lang'],
- "L_BOARD_STYLE" => $lang['Board_style'],
- "L_TIMEZONE" => $lang['Timezone'],
- "L_DATE_FORMAT" => $lang['Date_format'],
- "L_DATE_FORMAT_EXPLAIN" => $lang['Date_format_explain'],
- "L_YES" => $lang['Yes'],
- "L_NO" => $lang['No'],
- "L_INTERESTS" => $lang['Interests'],
- "L_ALWAYS_ALLOW_SMILIES" => $lang['Always_smile'],
- "L_ALWAYS_ALLOW_BBCODE" => $lang['Always_bbcode'],
- "L_ALWAYS_ALLOW_HTML" => $lang['Always_html'],
- "L_HIDE_USER" => $lang['Hide_user'],
- "L_ALWAYS_ADD_SIGNATURE" => $lang['Always_add_sig'],
+ 'USERNAME' => $username,
+ 'EMAIL' => $email,
+ 'YIM' => $yim,
+ 'ICQ' => $icq,
+ 'MSN' => $msn,
+ 'AIM' => $aim,
+ 'OCCUPATION' => $occupation,
+ 'INTERESTS' => $interests,
+ 'LOCATION' => $location,
+ 'WEBSITE' => $website,
+ 'SIGNATURE' => str_replace('<br />', "\n", $signature),
+ 'VIEW_EMAIL_YES' => ($viewemail) ? 'checked="checked"' : '',
+ 'VIEW_EMAIL_NO' => (!$viewemail) ? 'checked="checked"' : '',
+ 'HIDE_USER_YES' => (!$allowviewonline) ? 'checked="checked"' : '',
+ 'HIDE_USER_NO' => ($allowviewonline) ? 'checked="checked"' : '',
+ 'NOTIFY_PM_YES' => ($notifypm) ? 'checked="checked"' : '',
+ 'NOTIFY_PM_NO' => (!$notifypm) ? 'checked="checked"' : '',
+ 'POPUP_PM_YES' => ($popuppm) ? 'checked="checked"' : '',
+ 'POPUP_PM_NO' => (!$popuppm) ? 'checked="checked"' : '',
+ 'ALWAYS_ADD_SIGNATURE_YES' => ($attachsig) ? 'checked="checked"' : '',
+ 'ALWAYS_ADD_SIGNATURE_NO' => (!$attachsig) ? 'checked="checked"' : '',
+ 'NOTIFY_REPLY_YES' => ( $notifyreply ) ? 'checked="checked"' : '',
+ 'NOTIFY_REPLY_NO' => ( !$notifyreply ) ? 'checked="checked"' : '',
+ 'ALWAYS_ALLOW_BBCODE_YES' => ($allowbbcode) ? 'checked="checked"' : '',
+ 'ALWAYS_ALLOW_BBCODE_NO' => (!$allowbbcode) ? 'checked="checked"' : '',
+ 'ALWAYS_ALLOW_HTML_YES' => ($allowhtml) ? 'checked="checked"' : '',
+ 'ALWAYS_ALLOW_HTML_NO' => (!$allowhtml) ? 'checked="checked"' : '',
+ 'ALWAYS_ALLOW_SMILIES_YES' => ($allowsmilies) ? 'checked="checked"' : '',
+ 'ALWAYS_ALLOW_SMILIES_NO' => (!$allowsmilies) ? 'checked="checked"' : '',
+ 'AVATAR' => $avatar,
+ 'LANGUAGE_SELECT' => language_select($user_lang, 'language', '../language'),
+ 'TIMEZONE_SELECT' => tz_select($user_timezone),
+ 'STYLE_SELECT' => style_select($user_style, 'style'),
+ 'DATE_FORMAT' => $user_dateformat,
+ 'ALLOW_PM_YES' => ($user_allowpm) ? 'checked="checked"' : '',
+ 'ALLOW_PM_NO' => (!$user_allowpm) ? 'checked="checked"' : '',
+ 'ALLOW_AVATAR_YES' => ($user_allowavatar) ? 'checked="checked"' : '',
+ 'ALLOW_AVATAR_NO' => (!$user_allowavatar) ? 'checked="checked"' : '',
+ 'USER_ACTIVE_YES' => ($user_status) ? 'checked="checked"' : '',
+ 'USER_ACTIVE_NO' => (!$user_status) ? 'checked="checked"' : '',
+ 'RANK_SELECT_BOX' => $rank_select_box,
+
+ 'L_USER_TITLE' => $lang['User_admin'],
+ 'L_USER_EXPLAIN' => $lang['User_admin_explain'],
+ 'L_PASSWORD_IF_CHANGED' => $lang['password_if_changed'],
+ 'L_PASSWORD_CONFIRM_IF_CHANGED' => $lang['password_confirm_if_changed'],
+ 'L_SUBMIT' => $lang['Submit'],
+ 'L_RESET' => $lang['Reset'],
+ 'L_ICQ_NUMBER' => $lang['ICQ'],
+ 'L_MESSENGER' => $lang['MSNM'],
+ 'L_YAHOO' => $lang['YIM'],
+ 'L_WEBSITE' => $lang['Website'],
+ 'L_AIM' => $lang['AIM'],
+ 'L_LOCATION' => $lang['From'],
+ 'L_OCCUPATION' => $lang['Occupation'],
+ 'L_BOARD_LANGUAGE' => $lang['Board_lang'],
+ 'L_BOARD_STYLE' => $lang['Board_style'],
+ 'L_TIMEZONE' => $lang['Timezone'],
+ 'L_DATE_FORMAT' => $lang['Date_format'],
+ 'L_DATE_FORMAT_EXPLAIN' => $lang['Date_format_explain'],
+ 'L_YES' => $lang['Yes'],
+ 'L_NO' => $lang['No'],
+ 'L_INTERESTS' => $lang['Interests'],
+ 'L_ALWAYS_ALLOW_SMILIES' => $lang['Always_smile'],
+ 'L_ALWAYS_ALLOW_BBCODE' => $lang['Always_bbcode'],
+ 'L_ALWAYS_ALLOW_HTML' => $lang['Always_html'],
+ 'L_HIDE_USER' => $lang['Hide_user'],
+ 'L_ALWAYS_ADD_SIGNATURE' => $lang['Always_add_sig'],
- "L_SPECIAL" => $lang['User_special'],
- "L_SPECIAL_EXPLAIN" => $lang['User_specail_explain'],
- "L_USER_ACTIVE" => $lang['User_status'],
- "L_ALLOW_PM" => $lang['User_allowpm'],
- "L_ALLOW_AVATAR" => $lang['User_allowavatar'],
+ 'L_SPECIAL' => $lang['User_special'],
+ 'L_SPECIAL_EXPLAIN' => $lang['User_specail_explain'],
+ 'L_USER_ACTIVE' => $lang['User_status'],
+ 'L_ALLOW_PM' => $lang['User_allowpm'],
+ 'L_ALLOW_AVATAR' => $lang['User_allowavatar'],
- "L_AVATAR_PANEL" => $lang['Avatar_panel'],
- "L_AVATAR_EXPLAIN" => $lang['Admin_avatar_explain'],
- "L_DELETE_AVATAR" => $lang['Delete_Image'],
- "L_CURRENT_IMAGE" => $lang['Current_Image'],
- "L_UPLOAD_AVATAR_FILE" => $lang['Upload_Avatar_file'],
- "L_UPLOAD_AVATAR_URL" => $lang['Upload_Avatar_URL'],
- "L_AVATAR_GALLERY" => $lang['Select_from_gallery'],
- "L_SHOW_GALLERY" => $lang['View_avatar_gallery'],
- "L_LINK_REMOTE_AVATAR" => $lang['Link_remote_Avatar'],
-
- "L_SIGNATURE" => $lang['Signature'],
- "L_SIGNATURE_EXPLAIN" => sprintf($lang['Signature_explain'], $board_config['max_sig_chars']),
- "L_NOTIFY_ON_PRIVMSG" => $lang['Notify_on_privmsg'],
- "L_NOTIFY_ON_REPLY" => $lang['Always_notify'],
- "L_POPUP_ON_PRIVMSG" => $lang['Popup_on_privmsg'],
- "L_PREFERENCES" => $lang['Preferences'],
- "L_PUBLIC_VIEW_EMAIL" => $lang['Public_view_email'],
- "L_ITEMS_REQUIRED" => $lang['Items_required'],
- "L_REGISTRATION_INFO" => $lang['Registration_info'],
- "L_PROFILE_INFO" => $lang['Profile_info'],
- "L_PROFILE_INFO_NOTICE" => $lang['Profile_info_warn'],
- "L_CONFIRM" => $lang['Confirm'],
- "L_EMAIL_ADDRESS" => $lang['Email_address'],
- "S_FORM_ENCTYPE" => $form_enctype,
-
- "HTML_STATUS" => $html_status,
- "BBCODE_STATUS" => sprintf($bbcode_status, '<a href="../' . append_sid("faq.$phpEx?mode=bbcode") . '" target="_phpbbcode">', '</a>'),
- "SMILIES_STATUS" => $smilies_status,
-
- "L_DELETE_USER" => $lang['User_delete'],
- "L_DELETE_USER_EXPLAIN" => $lang['User_delete_explain'],
- "L_SELECT_RANK" => $lang['Rank_title'],
-
- "S_HIDDEN_FIELDS" => $s_hidden_fields,
- "S_PROFILE_ACTION" => append_sid("admin_users.$phpEx"))
+ 'L_AVATAR_PANEL' => $lang['Avatar_panel'],
+ 'L_AVATAR_EXPLAIN' => $lang['Admin_avatar_explain'],
+ 'L_DELETE_AVATAR' => $lang['Delete_Image'],
+ 'L_CURRENT_IMAGE' => $lang['Current_Image'],
+ 'L_UPLOAD_AVATAR_FILE' => $lang['Upload_Avatar_file'],
+ 'L_UPLOAD_AVATAR_URL' => $lang['Upload_Avatar_URL'],
+ 'L_AVATAR_GALLERY' => $lang['Select_from_gallery'],
+ 'L_SHOW_GALLERY' => $lang['View_avatar_gallery'],
+ 'L_LINK_REMOTE_AVATAR' => $lang['Link_remote_Avatar'],
+
+ 'L_SIGNATURE' => $lang['Signature'],
+ 'L_SIGNATURE_EXPLAIN' => sprintf($lang['Signature_explain'], $board_config['max_sig_chars'] ),
+ 'L_NOTIFY_ON_PRIVMSG' => $lang['Notify_on_privmsg'],
+ 'L_NOTIFY_ON_REPLY' => $lang['Always_notify'],
+ 'L_POPUP_ON_PRIVMSG' => $lang['Popup_on_privmsg'],
+ 'L_PREFERENCES' => $lang['Preferences'],
+ 'L_PUBLIC_VIEW_EMAIL' => $lang['Public_view_email'],
+ 'L_ITEMS_REQUIRED' => $lang['Items_required'],
+ 'L_REGISTRATION_INFO' => $lang['Registration_info'],
+ 'L_PROFILE_INFO' => $lang['Profile_info'],
+ 'L_PROFILE_INFO_NOTICE' => $lang['Profile_info_warn'],
+ 'L_CONFIRM' => $lang['Confirm'],
+ 'L_EMAIL_ADDRESS' => $lang['Email_address'],
+ 'S_FORM_ENCTYPE' => $form_enctype,
+
+ 'HTML_STATUS' => $html_status,
+ 'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="../' . append_sid("faq.$phpEx?mode=bbcode") . '" target="_phpbbcode">', '</a>'),
+ 'SMILIES_STATUS' => $smilies_status,
+
+ 'L_DELETE_USER' => $lang['User_delete'],
+ 'L_DELETE_USER_EXPLAIN' => $lang['User_delete_explain'],
+ 'L_SELECT_RANK' => $lang['Rank_title'],
+
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
+ 'S_PROFILE_ACTION' => append_sid("admin_users.$phpEx"))
);
- if( file_exists("./../" . $board_config['avatar_path']) )
+ if( file_exists('./../' . $board_config['avatar_path'] ) )
{
- $template->assign_block_vars("avatarupload", array() );
- if($form_enctype != '')
+ if ( $form_enctype != '' )
{
- $template->assign_block_vars('avatarupload.fileuploads', array() );
+ $template->assign_block_vars('avatar_local_upload', array() );
}
+ $template->assign_block_vars('avatar_remote_upload', array() );
}
- if( file_exists("./../" . $board_config['avatar_gallery_path']) )
+ if( file_exists('./../' . $board_config['avatar_gallery_path'] ) )
{
- $template->assign_block_vars("avatargallery", array() );
+ $template->assign_block_vars('avatar_local_gallery', array() );
}
}
- $template->pparse("body");
+ $template->pparse('body');
}
else
@@ -1077,20 +1048,20 @@ else
$select_list .= '</select>';
$template->set_filenames(array(
- "body" => "admin/user_select_body.tpl")
+ 'body' => 'admin/user_select_body.tpl')
);
$template->assign_vars(array(
- "L_USER_TITLE" => $lang['User_admin'],
- "L_USER_EXPLAIN" => $lang['User_admin_explain'],
- "L_USER_SELECT" => $lang['Select_a_User'],
- "L_LOOK_UP" => $lang['Look_up_user'],
- "L_FIND_USERNAME" => $lang['Find_username'],
+ 'L_USER_TITLE' => $lang['User_admin'],
+ 'L_USER_EXPLAIN' => $lang['User_admin_explain'],
+ 'L_USER_SELECT' => $lang['Select_a_User'],
+ 'L_LOOK_UP' => $lang['Look_up_user'],
+ 'L_FIND_USERNAME' => $lang['Find_username'],
- "U_SEARCH_USER" => append_sid("../search.$phpEx?mode=searchuser"),
+ 'U_SEARCH_USER' => append_sid("../search.$phpEx?mode=searchuser"),
- "S_USER_ACTION" => append_sid("admin_users.$phpEx"),
- "S_USER_SELECT" => $select_list)
+ 'S_USER_ACTION' => append_sid("admin_users.$phpEx"),
+ 'S_USER_SELECT' => $select_list)
);
$template->pparse('body');
@@ -1098,4 +1069,4 @@ else
include('page_footer_admin.'.$phpEx);
-?>
+?> \ No newline at end of file
diff --git a/phpBB/admin/admin_words.php b/phpBB/admin/admin_words.php
index 4e6894ab1a..72380a43bb 100644
--- a/phpBB/admin/admin_words.php
+++ b/phpBB/admin/admin_words.php
@@ -32,8 +32,9 @@ if( !empty($setmodules) )
//
// Load default header
//
-$phpbb_root_dir = "./../";
-require('pagestart.inc');
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
diff --git a/phpBB/admin/index.php b/phpBB/admin/index.php
index 99b616c4dd..49cf7b8bd6 100644
--- a/phpBB/admin/index.php
+++ b/phpBB/admin/index.php
@@ -25,10 +25,10 @@ define('IN_PHPBB', 1);
//
// Load default header
//
-$phpbb_root_dir = "./../";
-
$no_page_header = TRUE;
-require('pagestart.inc');
+$phpbb_root_path = "../";
+require($phpbb_root_path . 'extension.inc');
+require('pagestart.' . $phpEx);
// ---------------
// Begin functions
diff --git a/phpBB/admin/page_header_admin.php b/phpBB/admin/page_header_admin.php
index 1d5112559b..7786d464c4 100644
--- a/phpBB/admin/page_header_admin.php
+++ b/phpBB/admin/page_header_admin.php
@@ -35,141 +35,120 @@ if($board_config['gzip_compress'])
{
$phpver = phpversion();
- if($phpver >= "4.0.4pl1")
+ if($phpver >= '4.0.4pl1')
{
- if(extension_loaded("zlib"))
+ if(extension_loaded('zlib'))
{
- ob_start("ob_gzhandler");
+ ob_start('ob_gzhandler');
}
}
- else if($phpver > "4.0")
+ else if($phpver > '4.0')
{
if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
{
- if(extension_loaded("zlib"))
+ if(extension_loaded('zlib'))
{
$do_gzip_compress = TRUE;
ob_start();
ob_implicit_flush(0);
- header("Content-Encoding: gzip");
+ header('Content-Encoding: gzip');
}
}
}
}
$template->set_filenames(array(
- "header" => "admin/page_header.tpl")
+ 'header' => 'admin/page_header.tpl')
);
//
-// Do timezone text output
-//
-if($board_config['board_timezone'] < 0)
-{
- $s_timezone = $lang['All_times'] . " " .$lang['GMT'] . " - " . (-$board_config['board_timezone']) . " " . $lang['Hours'];
-}
-else if($board_config['board_timezone'] == 0)
-{
- $s_timezone = $lang['All_times'] . " " . $lang['GMT'];
-}
-else
-{
- $s_timezone = $lang['All_times'] . " " . $lang['GMT'] ." + " . $board_config['board_timezone'] . " " . $lang['Hours'];
-}
-
-//
// The following assigns all _common_ variables that may be used at any point
// in a template. Note that all URL's should be wrapped in append_sid, as
// should all S_x_ACTIONS for forms.
//
$template->assign_vars(array(
- "SITENAME" => $board_config['sitename'],
- "PAGE_TITLE" => $page_title,
-
- "L_ADMIN" => $lang['Admin'],
- "L_USERNAME" => $lang['Username'],
- "L_PASSWORD" => $lang['Password'],
- "L_INDEX" => $lang['Forum_Index'],
- "L_REGISTER" => $lang['Register'],
- "L_PROFILE" => $lang['Profile'],
- "L_SEARCH" => $lang['Search'],
- "L_PRIVATEMSGS" => $lang['Private_msgs'],
- "L_MEMBERLIST" => $lang['Memberlist'],
- "L_FAQ" => $lang['FAQ'],
- "L_USERGROUPS" => $lang['Usergroups'],
- "L_FORUM" => $lang['Forum'],
- "L_TOPICS" => $lang['Topics'],
- "L_REPLIES" => $lang['Replies'],
- "L_VIEWS" => $lang['Views'],
- "L_POSTS" => $lang['Posts'],
- "L_LASTPOST" => $lang['Last_Post'],
- "L_MODERATOR" => $lang['Moderator'],
- "L_NONEWPOSTS" => $lang['No_new_posts'],
- "L_NEWPOSTS" => $lang['New_posts'],
- "L_POSTED" => $lang['Posted'],
- "L_JOINED" => $lang['Joined'],
- "L_AUTHOR" => $lang['Author'],
- "L_MESSAGE" => $lang['Message'],
- "L_BY" => $lang['by'],
-
- "U_INDEX" => append_sid("../index.".$phpEx),
-
- "S_TIMEZONE" => $s_timezone,
- "S_LOGIN_ACTION" => append_sid("../login.$phpEx"),
- "S_JUMPBOX_ACTION" => append_sid("../viewforum.$phpEx"),
- "S_CURRENT_TIME" => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']),
- "S_CONTENT_DIRECTION" => $lang['DIRECTION'],
- "S_CONTENT_ENCODING" => $lang['ENCODING'],
- "S_CONTENT_DIR_LEFT" => $lang['LEFT'],
- "S_CONTENT_DIR_RIGHT" => $lang['RIGHT'],
-
- "T_HEAD_STYLESHEET" => $theme['head_stylesheet'],
- "T_BODY_BACKGROUND" => $theme['body_background'],
- "T_BODY_BGCOLOR" => "#".$theme['body_bgcolor'],
- "T_BODY_TEXT" => "#".$theme['body_text'],
- "T_BODY_LINK" => "#".$theme['body_link'],
- "T_BODY_VLINK" => "#".$theme['body_vlink'],
- "T_BODY_ALINK" => "#".$theme['body_alink'],
- "T_BODY_HLINK" => "#".$theme['body_hlink'],
- "T_TR_COLOR1" => "#".$theme['tr_color1'],
- "T_TR_COLOR2" => "#".$theme['tr_color2'],
- "T_TR_COLOR3" => "#".$theme['tr_color3'],
- "T_TR_CLASS1" => $theme['tr_class1'],
- "T_TR_CLASS2" => $theme['tr_class2'],
- "T_TR_CLASS3" => $theme['tr_class3'],
- "T_TH_COLOR1" => "#".$theme['th_color1'],
- "T_TH_COLOR2" => "#".$theme['th_color2'],
- "T_TH_COLOR3" => "#".$theme['th_color3'],
- "T_TH_CLASS1" => $theme['th_class1'],
- "T_TH_CLASS2" => $theme['th_class2'],
- "T_TH_CLASS3" => $theme['th_class3'],
- "T_TD_COLOR1" => "#".$theme['td_color1'],
- "T_TD_COLOR2" => "#".$theme['td_color2'],
- "T_TD_COLOR3" => "#".$theme['td_color3'],
- "T_TD_CLASS1" => $theme['td_class1'],
- "T_TD_CLASS2" => $theme['td_class2'],
- "T_TD_CLASS3" => $theme['td_class3'],
- "T_FONTFACE1" => $theme['fontface1'],
- "T_FONTFACE2" => $theme['fontface2'],
- "T_FONTFACE3" => $theme['fontface3'],
- "T_FONTSIZE1" => $theme['fontsize1'],
- "T_FONTSIZE2" => $theme['fontsize2'],
- "T_FONTSIZE3" => $theme['fontsize3'],
- "T_FONTCOLOR1" => "#".$theme['fontcolor1'],
- "T_FONTCOLOR2" => "#".$theme['fontcolor2'],
- "T_FONTCOLOR3" => "#".$theme['fontcolor3'],
- "T_SPAN_CLASS1" => $theme['span_class1'],
- "T_SPAN_CLASS2" => $theme['span_class2'],
- "T_SPAN_CLASS3" => $theme['span_class3'])
+ 'SITENAME' => $board_config['sitename'],
+ 'PAGE_TITLE' => $page_title,
+
+ 'L_ADMIN' => $lang['Admin'],
+ 'L_USERNAME' => $lang['Username'],
+ 'L_PASSWORD' => $lang['Password'],
+ 'L_INDEX' => $lang['Forum_Index'],
+ 'L_REGISTER' => $lang['Register'],
+ 'L_PROFILE' => $lang['Profile'],
+ 'L_SEARCH' => $lang['Search'],
+ 'L_PRIVATEMSGS' => $lang['Private_msgs'],
+ 'L_MEMBERLIST' => $lang['Memberlist'],
+ 'L_FAQ' => $lang['FAQ'],
+ 'L_USERGROUPS' => $lang['Usergroups'],
+ 'L_FORUM' => $lang['Forum'],
+ 'L_TOPICS' => $lang['Topics'],
+ 'L_REPLIES' => $lang['Replies'],
+ 'L_VIEWS' => $lang['Views'],
+ 'L_POSTS' => $lang['Posts'],
+ 'L_LASTPOST' => $lang['Last_Post'],
+ 'L_MODERATOR' => $lang['Moderator'],
+ 'L_NONEWPOSTS' => $lang['No_new_posts'],
+ 'L_NEWPOSTS' => $lang['New_posts'],
+ 'L_POSTED' => $lang['Posted'],
+ 'L_JOINED' => $lang['Joined'],
+ 'L_AUTHOR' => $lang['Author'],
+ 'L_MESSAGE' => $lang['Message'],
+ 'L_BY' => $lang['by'],
+
+ 'U_INDEX' => append_sid('../index.'.$phpEx),
+
+ 'S_TIMEZONE' => sprintf($lang['All_times'], $lang[$board_config['board_timezone']]),
+ 'S_LOGIN_ACTION' => append_sid('../login.'.$phpEx),
+ 'S_JUMPBOX_ACTION' => append_sid('../viewforum.'.$phpEx),
+ 'S_CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])),
+ 'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
+ 'S_CONTENT_ENCODING' => $lang['ENCODING'],
+ 'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
+ 'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
+
+ 'T_HEAD_STYLESHEET' => $theme['head_stylesheet'],
+ 'T_BODY_BACKGROUND' => $theme['body_background'],
+ 'T_BODY_BGCOLOR' => '#'.$theme['body_bgcolor'],
+ 'T_BODY_TEXT' => '#'.$theme['body_text'],
+ 'T_BODY_LINK' => '#'.$theme['body_link'],
+ 'T_BODY_VLINK' => '#'.$theme['body_vlink'],
+ 'T_BODY_ALINK' => '#'.$theme['body_alink'],
+ 'T_BODY_HLINK' => '#'.$theme['body_hlink'],
+ 'T_TR_COLOR1' => '#'.$theme['tr_color1'],
+ 'T_TR_COLOR2' => '#'.$theme['tr_color2'],
+ 'T_TR_COLOR3' => '#'.$theme['tr_color3'],
+ 'T_TR_CLASS1' => $theme['tr_class1'],
+ 'T_TR_CLASS2' => $theme['tr_class2'],
+ 'T_TR_CLASS3' => $theme['tr_class3'],
+ 'T_TH_COLOR1' => '#'.$theme['th_color1'],
+ 'T_TH_COLOR2' => '#'.$theme['th_color2'],
+ 'T_TH_COLOR3' => '#'.$theme['th_color3'],
+ 'T_TH_CLASS1' => $theme['th_class1'],
+ 'T_TH_CLASS2' => $theme['th_class2'],
+ 'T_TH_CLASS3' => $theme['th_class3'],
+ 'T_TD_COLOR1' => '#'.$theme['td_color1'],
+ 'T_TD_COLOR2' => '#'.$theme['td_color2'],
+ 'T_TD_COLOR3' => '#'.$theme['td_color3'],
+ 'T_TD_CLASS1' => $theme['td_class1'],
+ 'T_TD_CLASS2' => $theme['td_class2'],
+ 'T_TD_CLASS3' => $theme['td_class3'],
+ 'T_FONTFACE1' => $theme['fontface1'],
+ 'T_FONTFACE2' => $theme['fontface2'],
+ 'T_FONTFACE3' => $theme['fontface3'],
+ 'T_FONTSIZE1' => $theme['fontsize1'],
+ 'T_FONTSIZE2' => $theme['fontsize2'],
+ 'T_FONTSIZE3' => $theme['fontsize3'],
+ 'T_FONTCOLOR1' => '#'.$theme['fontcolor1'],
+ 'T_FONTCOLOR2' => '#'.$theme['fontcolor2'],
+ 'T_FONTCOLOR3' => '#'.$theme['fontcolor3'],
+ 'T_SPAN_CLASS1' => $theme['span_class1'],
+ 'T_SPAN_CLASS2' => $theme['span_class2'],
+ 'T_SPAN_CLASS3' => $theme['span_class3'])
);
-header ("Cache-Control: no-store, no-cache, must-revalidate");
-header ("Cache-Control: pre-check=0, post-check=0, max-age=0", false);
-header ("Pragma: no-cache");
-header ("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
-header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
-$template->pparse("header");
+$template->pparse('header');
-?>
+?> \ No newline at end of file