mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
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
This commit is contained in:
parent
42e30320e4
commit
f0e4a8a4e4
17 changed files with 380 additions and 418 deletions
|
@ -23,9 +23,10 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Let's set the root dir for phpBB
|
// Let's set the root dir for phpBB
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
$phpbb_root_path = "../";
|
||||||
require('pagestart.inc');
|
require($phpbb_root_path . 'extension.inc');
|
||||||
include($phpbb_root_dir . 'includes/functions_selects.'.$phpEx);
|
require('pagestart.' . $phpEx);
|
||||||
|
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Pull all config data
|
// Pull all config data
|
||||||
|
|
|
@ -53,9 +53,10 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
|
||||||
$no_page_header = TRUE;
|
$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);
|
include($phpbb_root_path . 'includes/sql_parse.'.$phpEx);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -33,8 +33,9 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Include required files, get $phpEx and check permissions
|
// Include required files, get $phpEx and check permissions
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = './../';
|
$phpbb_root_path = "../";
|
||||||
require('pagestart.inc');
|
require($phpbb_root_path . 'extension.inc');
|
||||||
|
require('pagestart.' . $phpEx);
|
||||||
|
|
||||||
if( isset($HTTP_POST_VARS['add_name']) )
|
if( isset($HTTP_POST_VARS['add_name']) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
define('IN_PHPBB', 1);
|
define('IN_PHPBB', 1);
|
||||||
|
|
||||||
if( !empty($setmodules) )
|
if ( !empty($setmodules) )
|
||||||
{
|
{
|
||||||
$filename = basename(__FILE__);
|
$filename = basename(__FILE__);
|
||||||
$module['Forums']['Prune'] = $filename;
|
$module['Forums']['Prune'] = $filename;
|
||||||
|
@ -32,9 +32,11 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
$phpbb_root_path = "../";
|
||||||
require('pagestart.inc');
|
require($phpbb_root_path . 'extension.inc');
|
||||||
include($phpbb_root_path . 'includes/prune.'.$phpEx);
|
require('pagestart.' . $phpEx);
|
||||||
|
require($phpbb_root_path . 'includes/prune.'.$phpEx);
|
||||||
|
require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the forum ID for pruning
|
// Get the forum ID for pruning
|
||||||
|
|
|
@ -33,9 +33,10 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
|
||||||
$no_page_header = TRUE;
|
$no_page_header = TRUE;
|
||||||
require('pagestart.inc');
|
$phpbb_root_path = "../";
|
||||||
|
require($phpbb_root_path . 'extension.inc');
|
||||||
|
require('pagestart.' . $phpEx);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Start program - define vars
|
// Start program - define vars
|
||||||
|
|
|
@ -32,9 +32,10 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
$phpbb_root_path = "../";
|
||||||
require('pagestart.inc');
|
require($phpbb_root_path . 'extension.inc');
|
||||||
include($phpbb_root_dir . 'includes/functions_admin.'.$phpEx);
|
require('pagestart.' . $phpEx);
|
||||||
|
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
||||||
|
|
||||||
$forum_auth_ary = array(
|
$forum_auth_ary = array(
|
||||||
"auth_view" => AUTH_ALL,
|
"auth_view" => AUTH_ALL,
|
||||||
|
|
|
@ -33,9 +33,9 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
$phpbb_root_path = "../";
|
||||||
|
require($phpbb_root_path . 'extension.inc');
|
||||||
require('pagestart.inc');
|
require('pagestart.' . $phpEx);
|
||||||
|
|
||||||
if( isset($HTTP_POST_VARS[POST_GROUPS_URL]) || isset($HTTP_GET_VARS[POST_GROUPS_URL]) )
|
if( isset($HTTP_POST_VARS[POST_GROUPS_URL]) || isset($HTTP_GET_VARS[POST_GROUPS_URL]) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,9 +32,10 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
|
||||||
$no_page_header = TRUE;
|
$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
|
// Increase maximum execution time in case of a lot of users, but don't complain about it if it isn't
|
||||||
|
|
|
@ -32,10 +32,9 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Let's set the root dir for phpBB
|
// Let's set the root dir for phpBB
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
$phpbb_root_path = "../";
|
||||||
|
require($phpbb_root_path . 'extension.inc');
|
||||||
require('pagestart.inc');
|
require('pagestart.' . $phpEx);
|
||||||
|
|
||||||
|
|
||||||
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,8 +39,6 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
|
||||||
|
|
||||||
if( isset($HTTP_GET_VARS['export_pack']) )
|
if( isset($HTTP_GET_VARS['export_pack']) )
|
||||||
{
|
{
|
||||||
if ( $HTTP_GET_VARS['export_pack'] == "send" )
|
if ( $HTTP_GET_VARS['export_pack'] == "send" )
|
||||||
|
@ -48,8 +46,10 @@ if( isset($HTTP_GET_VARS['export_pack']) )
|
||||||
$no_page_header = true;
|
$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.
|
// Check to see what mode we should operate in.
|
||||||
|
|
|
@ -35,18 +35,19 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check if the user has cancled a confirmation message.
|
// Check if the user has cancled a confirmation message.
|
||||||
//
|
//
|
||||||
|
$phpbb_root_path = "../";
|
||||||
|
|
||||||
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
|
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
|
||||||
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;
|
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;
|
||||||
|
|
||||||
if( empty($HTTP_POST_VARS['send_file']) )
|
if( empty($HTTP_POST_VARS['send_file']) )
|
||||||
{
|
{
|
||||||
$no_page_header = ( $cancel ) ? TRUE : FALSE;
|
$no_page_header = ( $cancel ) ? TRUE : FALSE;
|
||||||
require('pagestart.inc');
|
require($phpbb_root_path . 'extension.inc');
|
||||||
|
require('pagestart.' . $phpEx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $cancel )
|
if( $cancel )
|
||||||
|
@ -72,7 +73,7 @@ switch( $mode )
|
||||||
if( isset($install_to) )
|
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;
|
$template_name = $$install_to;
|
||||||
$found = FALSE;
|
$found = FALSE;
|
||||||
|
@ -127,15 +128,15 @@ switch( $mode )
|
||||||
|
|
||||||
$installable_themes = array();
|
$installable_themes = array();
|
||||||
|
|
||||||
if( $dir = @opendir($phpbb_root_dir . "templates/") )
|
if( $dir = @opendir($phpbb_root_path. "templates/") )
|
||||||
{
|
{
|
||||||
while( $sub_dir = @readdir($dir) )
|
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( !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++)
|
for($i = 0; $i < count($$sub_dir); $i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,9 +34,11 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = './../';
|
|
||||||
$no_page_header = TRUE;
|
$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');
|
$params = array('mode' => 'mode', 'user_id' => POST_USERS_URL, 'group_id' => POST_GROUPS_URL, 'adv' => 'adv');
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,9 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
$phpbb_root_path = "../";
|
||||||
require('pagestart.inc');
|
require($phpbb_root_path . 'extension.inc');
|
||||||
|
require('pagestart.' . $phpEx);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Start program
|
// Start program
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* copyright : (C) 2001 The phpBB Group
|
||||||
* email : support@phpbb.com
|
* 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
$phpbb_root_path = "../";
|
||||||
// Load default header
|
require($phpbb_root_path . 'extension.inc');
|
||||||
//
|
require('pagestart.' . $phpEx);
|
||||||
$phpbb_root_dir = "./../";
|
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
|
else
|
||||||
{
|
{
|
||||||
$mode = "";
|
$mode = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Begin program
|
// 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
|
// 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);
|
$this_userdata = get_userdata($user_id);
|
||||||
if( !$this_userdata )
|
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'])) : "";
|
$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']))) : "";
|
$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 = ( !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_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'])) : "";
|
$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'])) : "";
|
$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'])) : "";
|
$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'])) : "";
|
$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'])) : "";
|
$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'])) : "";
|
$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'])) : "";
|
$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'])) : "";
|
$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'])) : "";
|
$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);
|
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;
|
$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;
|
$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;
|
$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;
|
$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;
|
$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;
|
$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'];
|
$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'];
|
$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'];
|
$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_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_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_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_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_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_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_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_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_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_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_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_filetype = ( !empty($HTTP_POST_FILES['avatar']['type']) ) ? $HTTP_POST_FILES['avatar']['type'] : '';
|
||||||
|
|
||||||
$user_avatar = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar'] : "";
|
$user_avatar = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar'] : '';
|
||||||
$user_avatar_type = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar_type'] : "";
|
$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_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_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_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;
|
$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']) )
|
if( isset( $HTTP_POST_VARS['avatargallery'] ) || isset( $HTTP_POST_VARS['submitavatar'] ) || isset( $HTTP_POST_VARS['cancelavatar'] ) )
|
||||||
{
|
{
|
||||||
$username = stripslashes($username);
|
$username = stripslashes($username);
|
||||||
$email = stripslashes($email);
|
$email = stripslashes($email);
|
||||||
$password = "";
|
$password = '';
|
||||||
$password_confirm = "";
|
$password_confirm = '';
|
||||||
|
|
||||||
$icq = stripslashes($icq);
|
$icq = stripslashes($icq);
|
||||||
$aim = stripslashes($aim);
|
$aim = stripslashes($aim);
|
||||||
|
@ -145,11 +141,19 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
|
|
||||||
$user_lang = stripslashes($user_lang);
|
$user_lang = stripslashes($user_lang);
|
||||||
$user_dateformat = stripslashes($user_dateformat);
|
$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;
|
$error = FALSE;
|
||||||
|
|
||||||
if( stripslashes($username) != $this_userdata['username'] )
|
if( stripslashes($username) != $this_userdata['username'] )
|
||||||
|
@ -158,11 +162,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
if( !validate_username($username) )
|
if( !validate_username($username) )
|
||||||
{
|
{
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
if( isset($error_msg) )
|
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Invalid_username'];
|
||||||
{
|
|
||||||
$error_msg .= "<br />";
|
|
||||||
}
|
|
||||||
$error_msg .= $lang['Invalid_username'];
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -180,11 +180,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
if($password != $password_confirm)
|
if($password != $password_confirm)
|
||||||
{
|
{
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
if( isset($error_msg) )
|
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
|
||||||
{
|
|
||||||
$error_msg .= "<br />";
|
|
||||||
}
|
|
||||||
$error_msg .= $lang['Password_mismatch'];
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -195,20 +191,12 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
else if( $password && !$password_confirm )
|
else if( $password && !$password_confirm )
|
||||||
{
|
{
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
if( isset($error_msg) )
|
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
|
||||||
{
|
|
||||||
$error_msg .= "<br />";
|
|
||||||
}
|
|
||||||
$error_msg .= $lang['Password_mismatch'];
|
|
||||||
}
|
}
|
||||||
else if( !$password && $password_confirm )
|
else if( !$password && $password_confirm )
|
||||||
{
|
{
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
if( isset($error_msg) )
|
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
|
||||||
{
|
|
||||||
$error_msg .= "<br />";
|
|
||||||
}
|
|
||||||
$error_msg .= $lang['Password_mismatch'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $user_status == 0 )
|
if( $user_status == 0 )
|
||||||
|
@ -218,37 +206,36 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
WHERE session_user_id = $user_id";
|
WHERE session_user_id = $user_id";
|
||||||
if( !$db->sql_query($sql) )
|
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 != "" )
|
if( $signature != "" )
|
||||||
{
|
{
|
||||||
$sig_length_check = preg_replace("/(\[.*?)(=.*?)\]/is", "\\1]", stripslashes($signature));
|
$sig_length_check = preg_replace('/(\[.*?)(=.*?)\]/is', '\\1]', stripslashes($signature));
|
||||||
if ( $allowhtml )
|
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.
|
// Only create a new bbcode_uid when there was no uid yet.
|
||||||
if ( $signature_bbcode_uid == '' )
|
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);
|
$signature = prepare_message($signature, $allowhtml, $allowbbcode, $allowsmilies, $signature_bbcode_uid);
|
||||||
|
|
||||||
if ( strlen($sig_length_check) > $board_config['max_sig_chars'] )
|
if ( strlen($sig_length_check) > $board_config['max_sig_chars'] )
|
||||||
{
|
{
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
if ( isset($error_msg) )
|
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Signature_too_long'];
|
||||||
{
|
|
||||||
$error_msg .= "<br />";
|
|
||||||
}
|
|
||||||
$error_msg .= $lang['Signature_too_long'];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Avatar stuff
|
||||||
|
//
|
||||||
//
|
//
|
||||||
// Avatar stuff
|
// Avatar stuff
|
||||||
//
|
//
|
||||||
|
@ -530,7 +517,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
AND g.group_single_user = 1";
|
AND g.group_single_user = 1";
|
||||||
if( !($result = $db->sql_query($sql)) )
|
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);
|
$row = $db->sql_fetchrow($result);
|
||||||
|
@ -540,7 +527,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
WHERE poster_id = $user_id";
|
WHERE poster_id = $user_id";
|
||||||
if( !$db->sql_query($sql) )
|
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 . "
|
$sql = "UPDATE " . TOPICS_TABLE . "
|
||||||
|
@ -548,42 +535,42 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
WHERE topic_poster = $user_id";
|
WHERE topic_poster = $user_id";
|
||||||
if( !$db->sql_query($sql) )
|
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 . "
|
$sql = "DELETE FROM " . USERS_TABLE . "
|
||||||
WHERE user_id = $user_id";
|
WHERE user_id = $user_id";
|
||||||
if( !$db->sql_query($sql) )
|
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 . "
|
$sql = "DELETE FROM " . USER_GROUP_TABLE . "
|
||||||
WHERE user_id = $user_id";
|
WHERE user_id = $user_id";
|
||||||
if( !$db->sql_query($sql) )
|
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 . "
|
$sql = "DELETE FROM " . GROUPS_TABLE . "
|
||||||
WHERE group_id = " . $row['group_id'];
|
WHERE group_id = " . $row['group_id'];
|
||||||
if( !$db->sql_query($sql) )
|
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 . "
|
$sql = "DELETE FROM " . AUTH_ACCESS_TABLE . "
|
||||||
WHERE group_id = " . $row['group_id'];
|
WHERE group_id = " . $row['group_id'];
|
||||||
if( !$db->sql_query($sql) )
|
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 . "
|
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
|
||||||
WHERE user_id = $user_id";
|
WHERE user_id = $user_id";
|
||||||
if ( !$db->sql_query($sql) )
|
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'];
|
$message = $lang['User_deleted'];
|
||||||
|
@ -600,10 +587,10 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
{
|
{
|
||||||
$sql = "UPDATE " . GROUPS_TABLE . "
|
$sql = "UPDATE " . GROUPS_TABLE . "
|
||||||
SET group_name = '".str_replace("\'", "''", $rename_user)."'
|
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) )
|
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'];
|
$message .= $lang['Admin_user_updated'];
|
||||||
|
@ -611,11 +598,7 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
if( isset($error_msg) )
|
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Admin_user_fail'];
|
||||||
{
|
|
||||||
$error_msg .= "<br />";
|
|
||||||
}
|
|
||||||
$error_msg .= $lang['Admin_user_fail'];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -626,20 +609,22 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$template->set_filenames(array(
|
$template->set_filenames(array(
|
||||||
"reg_header" => "error_body.tpl")
|
'reg_header' => 'error_body.tpl')
|
||||||
);
|
);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$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);
|
$username = stripslashes($username);
|
||||||
$email = stripslashes($email);
|
$email = stripslashes($email);
|
||||||
$password = "";
|
$password = '';
|
||||||
$password_confirm = "";
|
$password_confirm = '';
|
||||||
|
|
||||||
$icq = stripslashes($icq);
|
$icq = stripslashes($icq);
|
||||||
$aim = stripslashes($aim);
|
$aim = str_replace('+', ' ', stripslashes($aim));
|
||||||
$msn = stripslashes($msn);
|
$msn = stripslashes($msn);
|
||||||
$yim = stripslashes($yim);
|
$yim = stripslashes($yim);
|
||||||
|
|
||||||
|
@ -653,23 +638,23 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
$user_dateformat = stripslashes($user_dateformat);
|
$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);
|
$this_userdata = get_userdata($user_id);
|
||||||
if( !$this_userdata )
|
if( !$this_userdata )
|
||||||
{
|
{
|
||||||
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
|
message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this_userdata = get_userdata($HTTP_POST_VARS['username']);
|
$this_userdata = get_userdata( $HTTP_POST_VARS['username'] );
|
||||||
if( !$this_userdata )
|
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'];
|
$user_id = $this_userdata['user_id'];
|
||||||
$username = $this_userdata['username'];
|
$username = $this_userdata['username'];
|
||||||
$email = $this_userdata['user_email'];
|
$email = $this_userdata['user_email'];
|
||||||
$password = "";
|
$password = '';
|
||||||
$password_confirm = "";
|
$password_confirm = '';
|
||||||
|
|
||||||
$icq = $this_userdata['user_icq'];
|
$icq = $this_userdata['user_icq'];
|
||||||
$aim = $this_userdata['user_aim'];
|
$aim = str_replace('+', ' ', $this_userdata['user_aim'] );
|
||||||
$msn = $this_userdata['user_msnm'];
|
$msn = $this_userdata['user_msnm'];
|
||||||
$yim = $this_userdata['user_yim'];
|
$yim = $this_userdata['user_yim'];
|
||||||
|
|
||||||
|
@ -695,8 +680,8 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
|
|
||||||
$viewemail = $this_userdata['user_viewemail'];
|
$viewemail = $this_userdata['user_viewemail'];
|
||||||
$notifypm = $this_userdata['user_notify_pm'];
|
$notifypm = $this_userdata['user_notify_pm'];
|
||||||
$popuppm = $userdata['user_popup_pm'];
|
$popuppm = $this_userdata['user_popup_pm'];
|
||||||
$notifyreply = $userdata['user_notify'];
|
$notifyreply = $this_userdata['user_notify'];
|
||||||
$attachsig = $this_userdata['user_attachsig'];
|
$attachsig = $this_userdata['user_attachsig'];
|
||||||
$allowhtml = $this_userdata['user_allowhtml'];
|
$allowhtml = $this_userdata['user_allowhtml'];
|
||||||
$allowbbcode = $this_userdata['user_allowbbcode'];
|
$allowbbcode = $this_userdata['user_allowbbcode'];
|
||||||
|
@ -716,12 +701,12 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
|
|
||||||
$COPPA = false;
|
$COPPA = false;
|
||||||
|
|
||||||
$html_status = ($this_userdata['user_allowhtml']) ? $lang['HTML_is_ON'] : $lang['HTML_is_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'];
|
$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'];
|
$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 )
|
if( !$error )
|
||||||
{
|
{
|
||||||
|
@ -854,7 +839,6 @@ if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) |
|
||||||
}
|
}
|
||||||
else
|
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="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'] . '" />';
|
$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";
|
ORDER BY rank_title";
|
||||||
if ( !($result = $db->sql_query($sql)) )
|
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>';
|
$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>';
|
$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(
|
$template->set_filenames(array(
|
||||||
"body" => "admin/user_edit_body.tpl")
|
"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
|
// Let's do an overall check for settings/versions which would prevent
|
||||||
// us from doing file uploads....
|
// us from doing file uploads....
|
||||||
//
|
//
|
||||||
if(phpversion() >= '4.0.0')
|
$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"';
|
||||||
$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"';
|
|
||||||
}
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"USERNAME" => $username,
|
'USERNAME' => $username,
|
||||||
"EMAIL" => $email,
|
'EMAIL' => $email,
|
||||||
"YIM" => $yim,
|
'YIM' => $yim,
|
||||||
"ICQ" => $icq,
|
'ICQ' => $icq,
|
||||||
"MSN" => $msn,
|
'MSN' => $msn,
|
||||||
"AIM" => $aim,
|
'AIM' => $aim,
|
||||||
"OCCUPATION" => $occupation,
|
'OCCUPATION' => $occupation,
|
||||||
"INTERESTS" => $interests,
|
'INTERESTS' => $interests,
|
||||||
"LOCATION" => $location,
|
'LOCATION' => $location,
|
||||||
"WEBSITE" => $website,
|
'WEBSITE' => $website,
|
||||||
"SIGNATURE" => str_replace("<br />", "\n", $signature),
|
'SIGNATURE' => str_replace('<br />', "\n", $signature),
|
||||||
"VIEW_EMAIL_YES" => ($viewemail) ? 'checked="checked"' : '',
|
'VIEW_EMAIL_YES' => ($viewemail) ? 'checked="checked"' : '',
|
||||||
"VIEW_EMAIL_NO" => (!$viewemail) ? 'checked="checked"' : '',
|
'VIEW_EMAIL_NO' => (!$viewemail) ? 'checked="checked"' : '',
|
||||||
"HIDE_USER_YES" => (!$allowviewonline) ? 'checked="checked"' : '',
|
'HIDE_USER_YES' => (!$allowviewonline) ? 'checked="checked"' : '',
|
||||||
"HIDE_USER_NO" => ($allowviewonline) ? 'checked="checked"' : '',
|
'HIDE_USER_NO' => ($allowviewonline) ? 'checked="checked"' : '',
|
||||||
"NOTIFY_PM_YES" => ($notifypm) ? 'checked="checked"' : '',
|
'NOTIFY_PM_YES' => ($notifypm) ? 'checked="checked"' : '',
|
||||||
"NOTIFY_PM_NO" => (!$notifypm) ? 'checked="checked"' : '',
|
'NOTIFY_PM_NO' => (!$notifypm) ? 'checked="checked"' : '',
|
||||||
"POPUP_PM_YES" => ($popuppm) ? 'checked="checked"' : '',
|
'POPUP_PM_YES' => ($popuppm) ? 'checked="checked"' : '',
|
||||||
"POPUP_PM_NO" => (!$popuppm) ? 'checked="checked"' : '',
|
'POPUP_PM_NO' => (!$popuppm) ? 'checked="checked"' : '',
|
||||||
"ALWAYS_ADD_SIGNATURE_YES" => ($attachsig) ? 'checked="checked"' : '',
|
'ALWAYS_ADD_SIGNATURE_YES' => ($attachsig) ? 'checked="checked"' : '',
|
||||||
"ALWAYS_ADD_SIGNATURE_NO" => (!$attachsig) ? 'checked="checked"' : '',
|
'ALWAYS_ADD_SIGNATURE_NO' => (!$attachsig) ? 'checked="checked"' : '',
|
||||||
"NOTIFY_REPLY_YES" => ($notifyreply) ? 'checked="checked"' : '',
|
'NOTIFY_REPLY_YES' => ( $notifyreply ) ? 'checked="checked"' : '',
|
||||||
"NOTIFY_REPLY_NO" => (!$notifyreply) ? 'checked="checked"' : '',
|
'NOTIFY_REPLY_NO' => ( !$notifyreply ) ? 'checked="checked"' : '',
|
||||||
"ALWAYS_ALLOW_BBCODE_YES" => ($allowbbcode) ? 'checked="checked"' : '',
|
'ALWAYS_ALLOW_BBCODE_YES' => ($allowbbcode) ? 'checked="checked"' : '',
|
||||||
"ALWAYS_ALLOW_BBCODE_NO" => (!$allowbbcode) ? 'checked="checked"' : '',
|
'ALWAYS_ALLOW_BBCODE_NO' => (!$allowbbcode) ? 'checked="checked"' : '',
|
||||||
"ALWAYS_ALLOW_HTML_YES" => ($allowhtml) ? 'checked="checked"' : '',
|
'ALWAYS_ALLOW_HTML_YES' => ($allowhtml) ? 'checked="checked"' : '',
|
||||||
"ALWAYS_ALLOW_HTML_NO" => (!$allowhtml) ? 'checked="checked"' : '',
|
'ALWAYS_ALLOW_HTML_NO' => (!$allowhtml) ? 'checked="checked"' : '',
|
||||||
"ALWAYS_ALLOW_SMILIES_YES" => ($allowsmilies) ? 'checked="checked"' : '',
|
'ALWAYS_ALLOW_SMILIES_YES' => ($allowsmilies) ? 'checked="checked"' : '',
|
||||||
"ALWAYS_ALLOW_SMILIES_NO" => (!$allowsmilies) ? 'checked="checked"' : '',
|
'ALWAYS_ALLOW_SMILIES_NO' => (!$allowsmilies) ? 'checked="checked"' : '',
|
||||||
"AVATAR" => $avatar,
|
'AVATAR' => $avatar,
|
||||||
"LANGUAGE_SELECT" => language_select($user_lang, 'language', '../language'),
|
'LANGUAGE_SELECT' => language_select($user_lang, 'language', '../language'),
|
||||||
"TIMEZONE_SELECT" => tz_select($user_timezone),
|
'TIMEZONE_SELECT' => tz_select($user_timezone),
|
||||||
"STYLE_SELECT" => style_select($user_style, 'style'),
|
'STYLE_SELECT' => style_select($user_style, 'style'),
|
||||||
"DATE_FORMAT" => $user_dateformat,
|
'DATE_FORMAT' => $user_dateformat,
|
||||||
"ALLOW_PM_YES" => ($user_allowpm) ? 'checked="checked"' : '',
|
'ALLOW_PM_YES' => ($user_allowpm) ? 'checked="checked"' : '',
|
||||||
"ALLOW_PM_NO" => (!$user_allowpm) ? 'checked="checked"' : '',
|
'ALLOW_PM_NO' => (!$user_allowpm) ? 'checked="checked"' : '',
|
||||||
"ALLOW_AVATAR_YES" => ($user_allowavatar) ? 'checked="checked"' : '',
|
'ALLOW_AVATAR_YES' => ($user_allowavatar) ? 'checked="checked"' : '',
|
||||||
"ALLOW_AVATAR_NO" => (!$user_allowavatar) ? 'checked="checked"' : '',
|
'ALLOW_AVATAR_NO' => (!$user_allowavatar) ? 'checked="checked"' : '',
|
||||||
"USER_ACTIVE_YES" => ($user_status) ? 'checked="checked"' : '',
|
'USER_ACTIVE_YES' => ($user_status) ? 'checked="checked"' : '',
|
||||||
"USER_ACTIVE_NO" => (!$user_status) ? 'checked="checked"' : '',
|
'USER_ACTIVE_NO' => (!$user_status) ? 'checked="checked"' : '',
|
||||||
"RANK_SELECT_BOX" => $rank_select_box,
|
'RANK_SELECT_BOX' => $rank_select_box,
|
||||||
|
|
||||||
"L_USER_TITLE" => $lang['User_admin'],
|
'L_USER_TITLE' => $lang['User_admin'],
|
||||||
"L_USER_EXPLAIN" => $lang['User_admin_explain'],
|
'L_USER_EXPLAIN' => $lang['User_admin_explain'],
|
||||||
"L_PASSWORD_IF_CHANGED" => $lang['password_if_changed'],
|
'L_PASSWORD_IF_CHANGED' => $lang['password_if_changed'],
|
||||||
"L_PASSWORD_CONFIRM_IF_CHANGED" => $lang['password_confirm_if_changed'],
|
'L_PASSWORD_CONFIRM_IF_CHANGED' => $lang['password_confirm_if_changed'],
|
||||||
"L_SUBMIT" => $lang['Submit'],
|
'L_SUBMIT' => $lang['Submit'],
|
||||||
"L_RESET" => $lang['Reset'],
|
'L_RESET' => $lang['Reset'],
|
||||||
"L_ICQ_NUMBER" => $lang['ICQ'],
|
'L_ICQ_NUMBER' => $lang['ICQ'],
|
||||||
"L_MESSENGER" => $lang['MSNM'],
|
'L_MESSENGER' => $lang['MSNM'],
|
||||||
"L_YAHOO" => $lang['YIM'],
|
'L_YAHOO' => $lang['YIM'],
|
||||||
"L_WEBSITE" => $lang['Website'],
|
'L_WEBSITE' => $lang['Website'],
|
||||||
"L_AIM" => $lang['AIM'],
|
'L_AIM' => $lang['AIM'],
|
||||||
"L_LOCATION" => $lang['From'],
|
'L_LOCATION' => $lang['From'],
|
||||||
"L_OCCUPATION" => $lang['Occupation'],
|
'L_OCCUPATION' => $lang['Occupation'],
|
||||||
"L_BOARD_LANGUAGE" => $lang['Board_lang'],
|
'L_BOARD_LANGUAGE' => $lang['Board_lang'],
|
||||||
"L_BOARD_STYLE" => $lang['Board_style'],
|
'L_BOARD_STYLE' => $lang['Board_style'],
|
||||||
"L_TIMEZONE" => $lang['Timezone'],
|
'L_TIMEZONE' => $lang['Timezone'],
|
||||||
"L_DATE_FORMAT" => $lang['Date_format'],
|
'L_DATE_FORMAT' => $lang['Date_format'],
|
||||||
"L_DATE_FORMAT_EXPLAIN" => $lang['Date_format_explain'],
|
'L_DATE_FORMAT_EXPLAIN' => $lang['Date_format_explain'],
|
||||||
"L_YES" => $lang['Yes'],
|
'L_YES' => $lang['Yes'],
|
||||||
"L_NO" => $lang['No'],
|
'L_NO' => $lang['No'],
|
||||||
"L_INTERESTS" => $lang['Interests'],
|
'L_INTERESTS' => $lang['Interests'],
|
||||||
"L_ALWAYS_ALLOW_SMILIES" => $lang['Always_smile'],
|
'L_ALWAYS_ALLOW_SMILIES' => $lang['Always_smile'],
|
||||||
"L_ALWAYS_ALLOW_BBCODE" => $lang['Always_bbcode'],
|
'L_ALWAYS_ALLOW_BBCODE' => $lang['Always_bbcode'],
|
||||||
"L_ALWAYS_ALLOW_HTML" => $lang['Always_html'],
|
'L_ALWAYS_ALLOW_HTML' => $lang['Always_html'],
|
||||||
"L_HIDE_USER" => $lang['Hide_user'],
|
'L_HIDE_USER' => $lang['Hide_user'],
|
||||||
"L_ALWAYS_ADD_SIGNATURE" => $lang['Always_add_sig'],
|
'L_ALWAYS_ADD_SIGNATURE' => $lang['Always_add_sig'],
|
||||||
|
|
||||||
"L_SPECIAL" => $lang['User_special'],
|
'L_SPECIAL' => $lang['User_special'],
|
||||||
"L_SPECIAL_EXPLAIN" => $lang['User_specail_explain'],
|
'L_SPECIAL_EXPLAIN' => $lang['User_specail_explain'],
|
||||||
"L_USER_ACTIVE" => $lang['User_status'],
|
'L_USER_ACTIVE' => $lang['User_status'],
|
||||||
"L_ALLOW_PM" => $lang['User_allowpm'],
|
'L_ALLOW_PM' => $lang['User_allowpm'],
|
||||||
"L_ALLOW_AVATAR" => $lang['User_allowavatar'],
|
'L_ALLOW_AVATAR' => $lang['User_allowavatar'],
|
||||||
|
|
||||||
"L_AVATAR_PANEL" => $lang['Avatar_panel'],
|
'L_AVATAR_PANEL' => $lang['Avatar_panel'],
|
||||||
"L_AVATAR_EXPLAIN" => $lang['Admin_avatar_explain'],
|
'L_AVATAR_EXPLAIN' => $lang['Admin_avatar_explain'],
|
||||||
"L_DELETE_AVATAR" => $lang['Delete_Image'],
|
'L_DELETE_AVATAR' => $lang['Delete_Image'],
|
||||||
"L_CURRENT_IMAGE" => $lang['Current_Image'],
|
'L_CURRENT_IMAGE' => $lang['Current_Image'],
|
||||||
"L_UPLOAD_AVATAR_FILE" => $lang['Upload_Avatar_file'],
|
'L_UPLOAD_AVATAR_FILE' => $lang['Upload_Avatar_file'],
|
||||||
"L_UPLOAD_AVATAR_URL" => $lang['Upload_Avatar_URL'],
|
'L_UPLOAD_AVATAR_URL' => $lang['Upload_Avatar_URL'],
|
||||||
"L_AVATAR_GALLERY" => $lang['Select_from_gallery'],
|
'L_AVATAR_GALLERY' => $lang['Select_from_gallery'],
|
||||||
"L_SHOW_GALLERY" => $lang['View_avatar_gallery'],
|
'L_SHOW_GALLERY' => $lang['View_avatar_gallery'],
|
||||||
"L_LINK_REMOTE_AVATAR" => $lang['Link_remote_Avatar'],
|
'L_LINK_REMOTE_AVATAR' => $lang['Link_remote_Avatar'],
|
||||||
|
|
||||||
"L_SIGNATURE" => $lang['Signature'],
|
'L_SIGNATURE' => $lang['Signature'],
|
||||||
"L_SIGNATURE_EXPLAIN" => sprintf($lang['Signature_explain'], $board_config['max_sig_chars']),
|
'L_SIGNATURE_EXPLAIN' => sprintf($lang['Signature_explain'], $board_config['max_sig_chars'] ),
|
||||||
"L_NOTIFY_ON_PRIVMSG" => $lang['Notify_on_privmsg'],
|
'L_NOTIFY_ON_PRIVMSG' => $lang['Notify_on_privmsg'],
|
||||||
"L_NOTIFY_ON_REPLY" => $lang['Always_notify'],
|
'L_NOTIFY_ON_REPLY' => $lang['Always_notify'],
|
||||||
"L_POPUP_ON_PRIVMSG" => $lang['Popup_on_privmsg'],
|
'L_POPUP_ON_PRIVMSG' => $lang['Popup_on_privmsg'],
|
||||||
"L_PREFERENCES" => $lang['Preferences'],
|
'L_PREFERENCES' => $lang['Preferences'],
|
||||||
"L_PUBLIC_VIEW_EMAIL" => $lang['Public_view_email'],
|
'L_PUBLIC_VIEW_EMAIL' => $lang['Public_view_email'],
|
||||||
"L_ITEMS_REQUIRED" => $lang['Items_required'],
|
'L_ITEMS_REQUIRED' => $lang['Items_required'],
|
||||||
"L_REGISTRATION_INFO" => $lang['Registration_info'],
|
'L_REGISTRATION_INFO' => $lang['Registration_info'],
|
||||||
"L_PROFILE_INFO" => $lang['Profile_info'],
|
'L_PROFILE_INFO' => $lang['Profile_info'],
|
||||||
"L_PROFILE_INFO_NOTICE" => $lang['Profile_info_warn'],
|
'L_PROFILE_INFO_NOTICE' => $lang['Profile_info_warn'],
|
||||||
"L_CONFIRM" => $lang['Confirm'],
|
'L_CONFIRM' => $lang['Confirm'],
|
||||||
"L_EMAIL_ADDRESS" => $lang['Email_address'],
|
'L_EMAIL_ADDRESS' => $lang['Email_address'],
|
||||||
"S_FORM_ENCTYPE" => $form_enctype,
|
'S_FORM_ENCTYPE' => $form_enctype,
|
||||||
|
|
||||||
"HTML_STATUS" => $html_status,
|
'HTML_STATUS' => $html_status,
|
||||||
"BBCODE_STATUS" => sprintf($bbcode_status, '<a href="../' . append_sid("faq.$phpEx?mode=bbcode") . '" target="_phpbbcode">', '</a>'),
|
'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="../' . append_sid("faq.$phpEx?mode=bbcode") . '" target="_phpbbcode">', '</a>'),
|
||||||
"SMILIES_STATUS" => $smilies_status,
|
'SMILIES_STATUS' => $smilies_status,
|
||||||
|
|
||||||
"L_DELETE_USER" => $lang['User_delete'],
|
'L_DELETE_USER' => $lang['User_delete'],
|
||||||
"L_DELETE_USER_EXPLAIN" => $lang['User_delete_explain'],
|
'L_DELETE_USER_EXPLAIN' => $lang['User_delete_explain'],
|
||||||
"L_SELECT_RANK" => $lang['Rank_title'],
|
'L_SELECT_RANK' => $lang['Rank_title'],
|
||||||
|
|
||||||
"S_HIDDEN_FIELDS" => $s_hidden_fields,
|
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||||
"S_PROFILE_ACTION" => append_sid("admin_users.$phpEx"))
|
'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
|
else
|
||||||
|
@ -1077,20 +1048,20 @@ else
|
||||||
$select_list .= '</select>';
|
$select_list .= '</select>';
|
||||||
|
|
||||||
$template->set_filenames(array(
|
$template->set_filenames(array(
|
||||||
"body" => "admin/user_select_body.tpl")
|
'body' => 'admin/user_select_body.tpl')
|
||||||
);
|
);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"L_USER_TITLE" => $lang['User_admin'],
|
'L_USER_TITLE' => $lang['User_admin'],
|
||||||
"L_USER_EXPLAIN" => $lang['User_admin_explain'],
|
'L_USER_EXPLAIN' => $lang['User_admin_explain'],
|
||||||
"L_USER_SELECT" => $lang['Select_a_User'],
|
'L_USER_SELECT' => $lang['Select_a_User'],
|
||||||
"L_LOOK_UP" => $lang['Look_up_user'],
|
'L_LOOK_UP' => $lang['Look_up_user'],
|
||||||
"L_FIND_USERNAME" => $lang['Find_username'],
|
'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_ACTION' => append_sid("admin_users.$phpEx"),
|
||||||
"S_USER_SELECT" => $select_list)
|
'S_USER_SELECT' => $select_list)
|
||||||
);
|
);
|
||||||
$template->pparse('body');
|
$template->pparse('body');
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,9 @@ if( !empty($setmodules) )
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
$phpbb_root_path = "../";
|
||||||
require('pagestart.inc');
|
require($phpbb_root_path . 'extension.inc');
|
||||||
|
require('pagestart.' . $phpEx);
|
||||||
|
|
||||||
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -25,10 +25,10 @@ define('IN_PHPBB', 1);
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
//
|
//
|
||||||
$phpbb_root_dir = "./../";
|
|
||||||
|
|
||||||
$no_page_header = TRUE;
|
$no_page_header = TRUE;
|
||||||
require('pagestart.inc');
|
$phpbb_root_path = "../";
|
||||||
|
require($phpbb_root_path . 'extension.inc');
|
||||||
|
require('pagestart.' . $phpEx);
|
||||||
|
|
||||||
// ---------------
|
// ---------------
|
||||||
// Begin functions
|
// Begin functions
|
||||||
|
|
|
@ -35,141 +35,120 @@ if($board_config['gzip_compress'])
|
||||||
{
|
{
|
||||||
$phpver = phpversion();
|
$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(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
|
||||||
{
|
{
|
||||||
if(extension_loaded("zlib"))
|
if(extension_loaded('zlib'))
|
||||||
{
|
{
|
||||||
$do_gzip_compress = TRUE;
|
$do_gzip_compress = TRUE;
|
||||||
ob_start();
|
ob_start();
|
||||||
ob_implicit_flush(0);
|
ob_implicit_flush(0);
|
||||||
|
|
||||||
header("Content-Encoding: gzip");
|
header('Content-Encoding: gzip');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->set_filenames(array(
|
$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
|
// 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
|
// in a template. Note that all URL's should be wrapped in append_sid, as
|
||||||
// should all S_x_ACTIONS for forms.
|
// should all S_x_ACTIONS for forms.
|
||||||
//
|
//
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"SITENAME" => $board_config['sitename'],
|
'SITENAME' => $board_config['sitename'],
|
||||||
"PAGE_TITLE" => $page_title,
|
'PAGE_TITLE' => $page_title,
|
||||||
|
|
||||||
"L_ADMIN" => $lang['Admin'],
|
'L_ADMIN' => $lang['Admin'],
|
||||||
"L_USERNAME" => $lang['Username'],
|
'L_USERNAME' => $lang['Username'],
|
||||||
"L_PASSWORD" => $lang['Password'],
|
'L_PASSWORD' => $lang['Password'],
|
||||||
"L_INDEX" => $lang['Forum_Index'],
|
'L_INDEX' => $lang['Forum_Index'],
|
||||||
"L_REGISTER" => $lang['Register'],
|
'L_REGISTER' => $lang['Register'],
|
||||||
"L_PROFILE" => $lang['Profile'],
|
'L_PROFILE' => $lang['Profile'],
|
||||||
"L_SEARCH" => $lang['Search'],
|
'L_SEARCH' => $lang['Search'],
|
||||||
"L_PRIVATEMSGS" => $lang['Private_msgs'],
|
'L_PRIVATEMSGS' => $lang['Private_msgs'],
|
||||||
"L_MEMBERLIST" => $lang['Memberlist'],
|
'L_MEMBERLIST' => $lang['Memberlist'],
|
||||||
"L_FAQ" => $lang['FAQ'],
|
'L_FAQ' => $lang['FAQ'],
|
||||||
"L_USERGROUPS" => $lang['Usergroups'],
|
'L_USERGROUPS' => $lang['Usergroups'],
|
||||||
"L_FORUM" => $lang['Forum'],
|
'L_FORUM' => $lang['Forum'],
|
||||||
"L_TOPICS" => $lang['Topics'],
|
'L_TOPICS' => $lang['Topics'],
|
||||||
"L_REPLIES" => $lang['Replies'],
|
'L_REPLIES' => $lang['Replies'],
|
||||||
"L_VIEWS" => $lang['Views'],
|
'L_VIEWS' => $lang['Views'],
|
||||||
"L_POSTS" => $lang['Posts'],
|
'L_POSTS' => $lang['Posts'],
|
||||||
"L_LASTPOST" => $lang['Last_Post'],
|
'L_LASTPOST' => $lang['Last_Post'],
|
||||||
"L_MODERATOR" => $lang['Moderator'],
|
'L_MODERATOR' => $lang['Moderator'],
|
||||||
"L_NONEWPOSTS" => $lang['No_new_posts'],
|
'L_NONEWPOSTS' => $lang['No_new_posts'],
|
||||||
"L_NEWPOSTS" => $lang['New_posts'],
|
'L_NEWPOSTS' => $lang['New_posts'],
|
||||||
"L_POSTED" => $lang['Posted'],
|
'L_POSTED' => $lang['Posted'],
|
||||||
"L_JOINED" => $lang['Joined'],
|
'L_JOINED' => $lang['Joined'],
|
||||||
"L_AUTHOR" => $lang['Author'],
|
'L_AUTHOR' => $lang['Author'],
|
||||||
"L_MESSAGE" => $lang['Message'],
|
'L_MESSAGE' => $lang['Message'],
|
||||||
"L_BY" => $lang['by'],
|
'L_BY' => $lang['by'],
|
||||||
|
|
||||||
"U_INDEX" => append_sid("../index.".$phpEx),
|
'U_INDEX' => append_sid('../index.'.$phpEx),
|
||||||
|
|
||||||
"S_TIMEZONE" => $s_timezone,
|
'S_TIMEZONE' => sprintf($lang['All_times'], $lang[$board_config['board_timezone']]),
|
||||||
"S_LOGIN_ACTION" => append_sid("../login.$phpEx"),
|
'S_LOGIN_ACTION' => append_sid('../login.'.$phpEx),
|
||||||
"S_JUMPBOX_ACTION" => append_sid("../viewforum.$phpEx"),
|
'S_JUMPBOX_ACTION' => append_sid('../viewforum.'.$phpEx),
|
||||||
"S_CURRENT_TIME" => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']),
|
'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_DIRECTION' => $lang['DIRECTION'],
|
||||||
"S_CONTENT_ENCODING" => $lang['ENCODING'],
|
'S_CONTENT_ENCODING' => $lang['ENCODING'],
|
||||||
"S_CONTENT_DIR_LEFT" => $lang['LEFT'],
|
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
|
||||||
"S_CONTENT_DIR_RIGHT" => $lang['RIGHT'],
|
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
|
||||||
|
|
||||||
"T_HEAD_STYLESHEET" => $theme['head_stylesheet'],
|
'T_HEAD_STYLESHEET' => $theme['head_stylesheet'],
|
||||||
"T_BODY_BACKGROUND" => $theme['body_background'],
|
'T_BODY_BACKGROUND' => $theme['body_background'],
|
||||||
"T_BODY_BGCOLOR" => "#".$theme['body_bgcolor'],
|
'T_BODY_BGCOLOR' => '#'.$theme['body_bgcolor'],
|
||||||
"T_BODY_TEXT" => "#".$theme['body_text'],
|
'T_BODY_TEXT' => '#'.$theme['body_text'],
|
||||||
"T_BODY_LINK" => "#".$theme['body_link'],
|
'T_BODY_LINK' => '#'.$theme['body_link'],
|
||||||
"T_BODY_VLINK" => "#".$theme['body_vlink'],
|
'T_BODY_VLINK' => '#'.$theme['body_vlink'],
|
||||||
"T_BODY_ALINK" => "#".$theme['body_alink'],
|
'T_BODY_ALINK' => '#'.$theme['body_alink'],
|
||||||
"T_BODY_HLINK" => "#".$theme['body_hlink'],
|
'T_BODY_HLINK' => '#'.$theme['body_hlink'],
|
||||||
"T_TR_COLOR1" => "#".$theme['tr_color1'],
|
'T_TR_COLOR1' => '#'.$theme['tr_color1'],
|
||||||
"T_TR_COLOR2" => "#".$theme['tr_color2'],
|
'T_TR_COLOR2' => '#'.$theme['tr_color2'],
|
||||||
"T_TR_COLOR3" => "#".$theme['tr_color3'],
|
'T_TR_COLOR3' => '#'.$theme['tr_color3'],
|
||||||
"T_TR_CLASS1" => $theme['tr_class1'],
|
'T_TR_CLASS1' => $theme['tr_class1'],
|
||||||
"T_TR_CLASS2" => $theme['tr_class2'],
|
'T_TR_CLASS2' => $theme['tr_class2'],
|
||||||
"T_TR_CLASS3" => $theme['tr_class3'],
|
'T_TR_CLASS3' => $theme['tr_class3'],
|
||||||
"T_TH_COLOR1" => "#".$theme['th_color1'],
|
'T_TH_COLOR1' => '#'.$theme['th_color1'],
|
||||||
"T_TH_COLOR2" => "#".$theme['th_color2'],
|
'T_TH_COLOR2' => '#'.$theme['th_color2'],
|
||||||
"T_TH_COLOR3" => "#".$theme['th_color3'],
|
'T_TH_COLOR3' => '#'.$theme['th_color3'],
|
||||||
"T_TH_CLASS1" => $theme['th_class1'],
|
'T_TH_CLASS1' => $theme['th_class1'],
|
||||||
"T_TH_CLASS2" => $theme['th_class2'],
|
'T_TH_CLASS2' => $theme['th_class2'],
|
||||||
"T_TH_CLASS3" => $theme['th_class3'],
|
'T_TH_CLASS3' => $theme['th_class3'],
|
||||||
"T_TD_COLOR1" => "#".$theme['td_color1'],
|
'T_TD_COLOR1' => '#'.$theme['td_color1'],
|
||||||
"T_TD_COLOR2" => "#".$theme['td_color2'],
|
'T_TD_COLOR2' => '#'.$theme['td_color2'],
|
||||||
"T_TD_COLOR3" => "#".$theme['td_color3'],
|
'T_TD_COLOR3' => '#'.$theme['td_color3'],
|
||||||
"T_TD_CLASS1" => $theme['td_class1'],
|
'T_TD_CLASS1' => $theme['td_class1'],
|
||||||
"T_TD_CLASS2" => $theme['td_class2'],
|
'T_TD_CLASS2' => $theme['td_class2'],
|
||||||
"T_TD_CLASS3" => $theme['td_class3'],
|
'T_TD_CLASS3' => $theme['td_class3'],
|
||||||
"T_FONTFACE1" => $theme['fontface1'],
|
'T_FONTFACE1' => $theme['fontface1'],
|
||||||
"T_FONTFACE2" => $theme['fontface2'],
|
'T_FONTFACE2' => $theme['fontface2'],
|
||||||
"T_FONTFACE3" => $theme['fontface3'],
|
'T_FONTFACE3' => $theme['fontface3'],
|
||||||
"T_FONTSIZE1" => $theme['fontsize1'],
|
'T_FONTSIZE1' => $theme['fontsize1'],
|
||||||
"T_FONTSIZE2" => $theme['fontsize2'],
|
'T_FONTSIZE2' => $theme['fontsize2'],
|
||||||
"T_FONTSIZE3" => $theme['fontsize3'],
|
'T_FONTSIZE3' => $theme['fontsize3'],
|
||||||
"T_FONTCOLOR1" => "#".$theme['fontcolor1'],
|
'T_FONTCOLOR1' => '#'.$theme['fontcolor1'],
|
||||||
"T_FONTCOLOR2" => "#".$theme['fontcolor2'],
|
'T_FONTCOLOR2' => '#'.$theme['fontcolor2'],
|
||||||
"T_FONTCOLOR3" => "#".$theme['fontcolor3'],
|
'T_FONTCOLOR3' => '#'.$theme['fontcolor3'],
|
||||||
"T_SPAN_CLASS1" => $theme['span_class1'],
|
'T_SPAN_CLASS1' => $theme['span_class1'],
|
||||||
"T_SPAN_CLASS2" => $theme['span_class2'],
|
'T_SPAN_CLASS2' => $theme['span_class2'],
|
||||||
"T_SPAN_CLASS3" => $theme['span_class3'])
|
'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');
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Add table
Reference in a new issue