mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Added pop-up control for PM's to profile
git-svn-id: file:///svn/phpbb/trunk@1403 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
3c6e635bec
commit
ac2c2c688e
6 changed files with 299 additions and 250 deletions
|
@ -30,16 +30,16 @@ if($setmodules == 1)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Load default header
|
// Load default header
|
||||||
// We need to tell the pagestart file not to load page headers
|
|
||||||
// because of the use of META tags.
|
|
||||||
//
|
//
|
||||||
|
|
||||||
$phpbb_root_dir = "./../";
|
$phpbb_root_dir = "./../";
|
||||||
$no_page_header = TRUE;
|
|
||||||
require('pagestart.inc');
|
require('pagestart.inc');
|
||||||
include($phpbb_root_dir . 'includes/bbcode.'.$phpEx);
|
include($phpbb_root_dir . 'includes/bbcode.'.$phpEx);
|
||||||
include($phpbb_root_dir . 'includes/post.'.$phpEx);
|
include($phpbb_root_dir . 'includes/post.'.$phpEx);
|
||||||
|
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
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'];
|
||||||
|
@ -127,240 +127,14 @@ function validate_optional_fields(&$icq, &$aim, &$msnm, &$yim, &$website, &$loca
|
||||||
//
|
//
|
||||||
// Begin program
|
// Begin program
|
||||||
//
|
//
|
||||||
if( $mode == "searchuser" )
|
if( $mode == "edit" || $mode == "save" && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset($HTTP_POST_VARS[POST_USERS_URL]) ) )
|
||||||
{
|
{
|
||||||
//
|
|
||||||
// Remove this later
|
|
||||||
//
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
else if( $mode == "edit" && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset($HTTP_POST_VARS[POST_USERS_URL]) ) )
|
|
||||||
{
|
|
||||||
include('page_header_admin.' . $phpEx);
|
|
||||||
//
|
|
||||||
// Let's find out a little about them...
|
|
||||||
//
|
|
||||||
if( isset($HTTP_GET_VARS[POST_USERS_URL]) || isset($HTTP_POST_VARS[POST_USERS_URL]) )
|
|
||||||
{
|
|
||||||
$user_id = ( isset($HTTP_POST_VARS[POST_USERS_URL]) ) ? $HTTP_POST_VARS[POST_USERS_URL] : $HTTP_GET_VARS[POST_USERS_URL];
|
|
||||||
$this_userdata = get_userdata_from_id($user_id);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this_userdata = get_userdata($HTTP_POST_VARS['username']);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Now parse and display it as a template
|
|
||||||
//
|
|
||||||
$user_id = $this_userdata['user_id'];
|
|
||||||
$username = $this_userdata['username'];
|
|
||||||
$email = $this_userdata['user_email'];
|
|
||||||
$password = "";
|
|
||||||
$password_confirm = "";
|
|
||||||
|
|
||||||
$icq = $this_userdata['user_icq'];
|
|
||||||
$aim = $this_userdata['user_aim'];
|
|
||||||
$msn = $this_userdata['user_msnm'];
|
|
||||||
$yim = $this_userdata['user_yim'];
|
|
||||||
|
|
||||||
$website = $this_userdata['user_website'];
|
|
||||||
$location = $this_userdata['user_from'];
|
|
||||||
$occupation = $this_userdata['user_occ'];
|
|
||||||
$interests = $this_userdata['user_interests'];
|
|
||||||
$signature = $this_userdata['user_sig'];
|
|
||||||
|
|
||||||
$viewemail = $this_userdata['user_viewemail'];
|
|
||||||
$notifypm = $this_userdata['user_notify_pm'];
|
|
||||||
$attachsig = $this_userdata['user_attachsig'];
|
|
||||||
$allowhtml = $this_userdata['user_allowhtml'];
|
|
||||||
$allowbbcode = $this_userdata['user_allowbbcode'];
|
|
||||||
$allowsmilies = $this_userdata['user_allowsmile'];
|
|
||||||
$allowviewonline = $this_userdata['user_allow_viewonline'];
|
|
||||||
|
|
||||||
$user_avatar = $this_userdata['user_avatar'];
|
|
||||||
$user_avatar_type = $this_userdata['user_avatar_type'];
|
|
||||||
$user_style = $this_userdata['user_style'];
|
|
||||||
$user_lang = $this_userdata['user_lang'];
|
|
||||||
$user_timezone = $this_userdata['user_timezone'];
|
|
||||||
$user_dateformat = $this_userdata['user_dateformat'];
|
|
||||||
|
|
||||||
$user_status = $this_userdata['user_active'];
|
|
||||||
$user_allowavatar = $this_userdata['user_allowavatar'];
|
|
||||||
$user_allowpm = $this_userdata['user_allow_pm'];
|
|
||||||
|
|
||||||
$COPPA = false;
|
|
||||||
|
|
||||||
$html_status = ($userdata['user_allowhtml']) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF'];
|
|
||||||
$bbcode_status = ($userdata['user_allowbbcode']) ? $lang['BBCode_is_ON'] : $lang['BBCode_is_OFF'];
|
|
||||||
$smilies_status = ($userdata['user_allowsmile']) ? $lang['Smilies_are_ON'] : $lang['Smilies_are_OFF'];
|
|
||||||
|
|
||||||
$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'] . '" />';
|
|
||||||
|
|
||||||
if( $user_avatar_type )
|
|
||||||
{
|
|
||||||
switch( $user_avatar_type )
|
|
||||||
{
|
|
||||||
case USER_AVATAR_UPLOAD:
|
|
||||||
$avatar = "<img src=\"../" . $board_config['avatar_path'] . "/" . $user_avatar . "\" alt=\"\" />";
|
|
||||||
break;
|
|
||||||
case USER_AVATAR_REMOTE:
|
|
||||||
$avatar = "<img src=\"$user_avatar\" alt=\"\" />";
|
|
||||||
break;
|
|
||||||
case USER_AVATAR_GALLERY:
|
|
||||||
$avatar = "<img src=\"../" . $board_config['avatar_gallery_path'] . "/" . $user_avatar . "\" alt=\"\" />";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$avatar = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = "SELECT * FROM " . RANKS_TABLE . "
|
|
||||||
WHERE rank_special = 1
|
|
||||||
ORDER BY rank_title";
|
|
||||||
if( !$result = $db->sql_query($sql) )
|
|
||||||
{
|
|
||||||
message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);
|
|
||||||
}
|
|
||||||
$rank_count = $db->sql_numrows($result);
|
|
||||||
|
|
||||||
$rank_rows = $db->sql_fetchrowset($result);
|
|
||||||
|
|
||||||
$rank_select_box = "<option value=\"0\">" . $lang['No_assigned_rank'] . "</option>";
|
|
||||||
|
|
||||||
for($i = 0; $i < $rank_count; $i++)
|
|
||||||
{
|
|
||||||
$rank = $rank_rows[$i]['rank_title'];
|
|
||||||
$rank_id = $rank_rows[$i]['rank_id'];
|
|
||||||
|
|
||||||
$selected = ( $this_userdata['user_rank'] == $rank_id ) ? "selected=\"selected\"" : "";
|
|
||||||
$rank_select_box .= "<option value=\"" . $rank_id . "\" " . $selected . ">" . $rank . "</option>";
|
|
||||||
}
|
|
||||||
|
|
||||||
$signature = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $signature);
|
|
||||||
|
|
||||||
$template->set_filenames(array(
|
|
||||||
"body" => "admin/user_edit_body.tpl")
|
|
||||||
);
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
|
||||||
"L_USER_TITLE" => $lang['User'] . " " . $lang['User_admin'],
|
|
||||||
"L_USER_EXPLAIN" => $lang['User_admin_explain'],
|
|
||||||
|
|
||||||
"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\"" : "",
|
|
||||||
"ALWAYS_ADD_SIGNATURE_YES" => ($attachsig) ? "checked=\"checked\"" : "",
|
|
||||||
"ALWAYS_ADD_SIGNATURE_NO" => (!$attachsig) ? "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_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_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_SIGNATURE" => $lang['Signature'],
|
|
||||||
"L_SIGNATURE_EXPLAIN" => sprintf($lang['Signature_explain'], $board_config['max_sig_chars']),
|
|
||||||
"L_NOTIFY_ON_PRIVMSG" => $lang['Notify_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'],
|
|
||||||
|
|
||||||
"HTML_STATUS" => $html_status,
|
|
||||||
"BBCODE_STATUS" => $bbcode_status,
|
|
||||||
"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"))
|
|
||||||
);
|
|
||||||
|
|
||||||
$template->pparse("body");
|
|
||||||
}
|
|
||||||
else if( $mode == "save" && isset($HTTP_POST_VARS['submit']) )
|
|
||||||
{
|
|
||||||
//
|
//
|
||||||
// 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']) )
|
||||||
//
|
{
|
||||||
// First let's declare our "Return Address"
|
|
||||||
//
|
|
||||||
$return_address = append_sid("admin_users." . $phpEx);
|
|
||||||
|
|
||||||
$user_id = intval($HTTP_POST_VARS['id']);
|
$user_id = intval($HTTP_POST_VARS['id']);
|
||||||
|
|
||||||
$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'])) : "";
|
||||||
|
@ -385,6 +159,7 @@ else if( $mode == "save" && isset($HTTP_POST_VARS['submit']) )
|
||||||
$viewemail = (isset($HTTP_POST_VARS['viewemail'])) ? intval($HTTP_POST_VARS['viewemail']) : 0;
|
$viewemail = (isset($HTTP_POST_VARS['viewemail'])) ? intval($HTTP_POST_VARS['viewemail']) : 0;
|
||||||
$allowviewonline = (isset($HTTP_POST_VARS['hideonline'])) ? ( ($HTTP_POST_VARS['hideonline']) ? 0 : 1 ) : 1;
|
$allowviewonline = (isset($HTTP_POST_VARS['hideonline'])) ? ( ($HTTP_POST_VARS['hideonline']) ? 0 : 1 ) : 1;
|
||||||
$notifypm = (isset($HTTP_POST_VARS['notifypm'])) ? intval($HTTP_POST_VARS['notifypm']) : 1;
|
$notifypm = (isset($HTTP_POST_VARS['notifypm'])) ? intval($HTTP_POST_VARS['notifypm']) : 1;
|
||||||
|
$popuppm = (isset($HTTP_POST_VARS['popup_pm'])) ? ( ($HTTP_POST_VARS['popup_pm']) ? TRUE : 0 ) : TRUE;
|
||||||
$attachsig = (isset($HTTP_POST_VARS['attachsig'])) ? intval($HTTP_POST_VARS['attachsig']) : 0;
|
$attachsig = (isset($HTTP_POST_VARS['attachsig'])) ? intval($HTTP_POST_VARS['attachsig']) : 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'];
|
||||||
|
@ -448,7 +223,7 @@ else if( $mode == "save" && isset($HTTP_POST_VARS['submit']) )
|
||||||
{
|
{
|
||||||
if( $user_avatar_type == USER_AVATAR_UPLOAD )
|
if( $user_avatar_type == USER_AVATAR_UPLOAD )
|
||||||
{
|
{
|
||||||
if( file_exists("./../" . $board_config['avatar_path'] . "/" . $user_avatar) )
|
if( @file_exists("./../" . $board_config['avatar_path'] . "/" . $user_avatar) )
|
||||||
{
|
{
|
||||||
@unlink("./../" . $board_config['avatar_path'] . "/" . $user_avatar);
|
@unlink("./../" . $board_config['avatar_path'] . "/" . $user_avatar);
|
||||||
}
|
}
|
||||||
|
@ -503,7 +278,7 @@ else if( $mode == "save" && isset($HTTP_POST_VARS['submit']) )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = "UPDATE " . USERS_TABLE . "
|
$sql = "UPDATE " . USERS_TABLE . "
|
||||||
SET " . $username_sql . $passwd_sql . "user_email = '$email', user_icq = '$icq', user_website = '$website', user_occ = '$occupation', user_from = '$location', user_interests = '$interests', user_sig = '$signature', user_viewemail = $viewemail, user_aim = '$aim', user_yim = '$yim', user_msnm = '$msn', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_lang = '$user_lang', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '$user_dateformat', user_active = $user_status, user_actkey = '$user_actkey', user_rank = $user_rank" . $avatar_sql . "
|
SET " . $username_sql . $passwd_sql . "user_email = '$email', user_icq = '$icq', user_website = '$website', user_occ = '$occupation', user_from = '$location', user_interests = '$interests', user_sig = '$signature', user_viewemail = $viewemail, user_aim = '$aim', user_yim = '$yim', user_msnm = '$msn', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '$user_lang', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '$user_dateformat', user_active = $user_status, user_actkey = '$user_actkey', user_rank = $user_rank" . $avatar_sql . "
|
||||||
WHERE user_id = $user_id";
|
WHERE user_id = $user_id";
|
||||||
if( $result = $db->sql_query($sql) )
|
if( $result = $db->sql_query($sql) )
|
||||||
{
|
{
|
||||||
|
@ -515,22 +290,264 @@ else if( $mode == "save" && isset($HTTP_POST_VARS['submit']) )
|
||||||
$error_msg .= $lang['Admin_user_fail'];
|
$error_msg .= $lang['Admin_user_fail'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$template->assign_vars(array(
|
|
||||||
"META" => '<meta http-equiv="refresh" content="3;url=' . $return_address . '">')
|
$message .= "<br /><br />" . sprintf($lang['Click_return_useradmin'], "<a href=\"" . append_sid("admin_users.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
|
||||||
);
|
|
||||||
message_die(GENERAL_MESSAGE, $message . "<br />" . sprintf($lang['Click_return_useradmin'], "<a href=\"" . $return_address . "\">", "</a>"), $lang['User_admin']);
|
message_die(GENERAL_MESSAGE, $message);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$template->assign_vars(array(
|
$template->set_filenames(array(
|
||||||
"META" => '<meta http-equiv="refresh" content="3;url=' . $return_address . '">')
|
"reg_header" => "error_body.tpl")
|
||||||
);
|
);
|
||||||
message_die(GENERAL_ERROR, $error_msg . "<br />" . sprintf($lang['Click_return_useradmin'], "<a href=\"" . $return_address . "\">", "</a>"), $lang['User_admin']);
|
$template->assign_vars(array(
|
||||||
|
"ERROR_MESSAGE" => $error_msg)
|
||||||
|
);
|
||||||
|
$template->assign_var_from_handle("ERROR_BOX", "reg_header");
|
||||||
|
|
||||||
|
$username = stripslashes($username);
|
||||||
|
$email = stripslashes($email);
|
||||||
|
$password = "";
|
||||||
|
$password_confirm = "";
|
||||||
|
|
||||||
|
$icq = stripslashes($icq);
|
||||||
|
$aim = stripslashes($aim);
|
||||||
|
$msn = stripslashes($msn);
|
||||||
|
$yim = stripslashes($yim);
|
||||||
|
|
||||||
|
$website = stripslashes($website);
|
||||||
|
$location = stripslashes($location);
|
||||||
|
$occupation = stripslashes($occupation);
|
||||||
|
$interests = stripslashes($interests);
|
||||||
|
$signature = stripslashes($signature);
|
||||||
|
|
||||||
|
$user_lang = stripslashes($user_lang);
|
||||||
|
$user_dateformat = stripslashes($user_dateformat);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Let's find out a little about them...
|
||||||
|
//
|
||||||
|
if( !isset($HTTP_POST_VARS['submit']) && $mode != "save" )
|
||||||
|
{
|
||||||
|
if( isset($HTTP_GET_VARS[POST_USERS_URL]) || isset($HTTP_POST_VARS[POST_USERS_URL]) )
|
||||||
|
{
|
||||||
|
$user_id = ( isset($HTTP_POST_VARS[POST_USERS_URL]) ) ? $HTTP_POST_VARS[POST_USERS_URL] : $HTTP_GET_VARS[POST_USERS_URL];
|
||||||
|
$this_userdata = get_userdata_from_id($user_id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this_userdata = get_userdata($HTTP_POST_VARS['username']);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Now parse and display it as a template
|
||||||
|
//
|
||||||
|
$user_id = $this_userdata['user_id'];
|
||||||
|
$username = $this_userdata['username'];
|
||||||
|
$email = $this_userdata['user_email'];
|
||||||
|
$password = "";
|
||||||
|
$password_confirm = "";
|
||||||
|
|
||||||
|
$icq = $this_userdata['user_icq'];
|
||||||
|
$aim = $this_userdata['user_aim'];
|
||||||
|
$msn = $this_userdata['user_msnm'];
|
||||||
|
$yim = $this_userdata['user_yim'];
|
||||||
|
|
||||||
|
$website = $this_userdata['user_website'];
|
||||||
|
$location = $this_userdata['user_from'];
|
||||||
|
$occupation = $this_userdata['user_occ'];
|
||||||
|
$interests = $this_userdata['user_interests'];
|
||||||
|
$signature = $this_userdata['user_sig'];
|
||||||
|
|
||||||
|
$viewemail = $this_userdata['user_viewemail'];
|
||||||
|
$notifypm = $this_userdata['user_notify_pm'];
|
||||||
|
$popuppm = $userdata['user_popup_pm'];
|
||||||
|
$attachsig = $this_userdata['user_attachsig'];
|
||||||
|
$allowhtml = $this_userdata['user_allowhtml'];
|
||||||
|
$allowbbcode = $this_userdata['user_allowbbcode'];
|
||||||
|
$allowsmilies = $this_userdata['user_allowsmile'];
|
||||||
|
$allowviewonline = $this_userdata['user_allow_viewonline'];
|
||||||
|
|
||||||
|
$user_avatar = $this_userdata['user_avatar'];
|
||||||
|
$user_avatar_type = $this_userdata['user_avatar_type'];
|
||||||
|
$user_style = $this_userdata['user_style'];
|
||||||
|
$user_lang = $this_userdata['user_lang'];
|
||||||
|
$user_timezone = $this_userdata['user_timezone'];
|
||||||
|
$user_dateformat = $this_userdata['user_dateformat'];
|
||||||
|
|
||||||
|
$user_status = $this_userdata['user_active'];
|
||||||
|
$user_allowavatar = $this_userdata['user_allowavatar'];
|
||||||
|
$user_allowpm = $this_userdata['user_allow_pm'];
|
||||||
|
|
||||||
|
$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'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$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'] . '" />';
|
||||||
|
|
||||||
|
if( $user_avatar_type )
|
||||||
|
{
|
||||||
|
switch( $user_avatar_type )
|
||||||
|
{
|
||||||
|
case USER_AVATAR_UPLOAD:
|
||||||
|
$avatar = "<img src=\"../" . $board_config['avatar_path'] . "/" . $user_avatar . "\" alt=\"\" />";
|
||||||
|
break;
|
||||||
|
case USER_AVATAR_REMOTE:
|
||||||
|
$avatar = "<img src=\"$user_avatar\" alt=\"\" />";
|
||||||
|
break;
|
||||||
|
case USER_AVATAR_GALLERY:
|
||||||
|
$avatar = "<img src=\"../" . $board_config['avatar_gallery_path'] . "/" . $user_avatar . "\" alt=\"\" />";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
include('page_header_admin.' . $phpEx);
|
$avatar = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT * FROM " . RANKS_TABLE . "
|
||||||
|
WHERE rank_special = 1
|
||||||
|
ORDER BY rank_title";
|
||||||
|
if( !$result = $db->sql_query($sql) )
|
||||||
|
{
|
||||||
|
message_die(GENERAL_ERROR, "Couldn't obtain ranks data", "", __LINE__, __FILE__, $sql);
|
||||||
|
}
|
||||||
|
$rank_count = $db->sql_numrows($result);
|
||||||
|
|
||||||
|
$rank_rows = $db->sql_fetchrowset($result);
|
||||||
|
|
||||||
|
$rank_select_box = "<option value=\"0\">" . $lang['No_assigned_rank'] . "</option>";
|
||||||
|
|
||||||
|
for($i = 0; $i < $rank_count; $i++)
|
||||||
|
{
|
||||||
|
$rank = $rank_rows[$i]['rank_title'];
|
||||||
|
$rank_id = $rank_rows[$i]['rank_id'];
|
||||||
|
|
||||||
|
$selected = ( $this_userdata['user_rank'] == $rank_id ) ? "selected=\"selected\"" : "";
|
||||||
|
$rank_select_box .= "<option value=\"" . $rank_id . "\" " . $selected . ">" . $rank . "</option>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$signature = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $signature);
|
||||||
|
|
||||||
|
$template->set_filenames(array(
|
||||||
|
"body" => "admin/user_edit_body.tpl")
|
||||||
|
);
|
||||||
|
|
||||||
|
$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\"" : "",
|
||||||
|
"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_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_SIGNATURE" => $lang['Signature'],
|
||||||
|
"L_SIGNATURE_EXPLAIN" => sprintf($lang['Signature_explain'], $board_config['max_sig_chars']),
|
||||||
|
"L_NOTIFY_ON_PRIVMSG" => $lang['Notify_on_privmsg'],
|
||||||
|
"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'],
|
||||||
|
|
||||||
|
"HTML_STATUS" => $html_status,
|
||||||
|
"BBCODE_STATUS" => $bbcode_status,
|
||||||
|
"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"))
|
||||||
|
);
|
||||||
|
|
||||||
|
$template->pparse("body");
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Default user selection box
|
// Default user selection box
|
||||||
//
|
//
|
||||||
|
@ -555,9 +572,9 @@ else
|
||||||
);
|
);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"L_USER_TITLE" => $lang['User'] . " " . $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'] . " " . $lang['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'],
|
||||||
|
|
||||||
|
|
|
@ -327,6 +327,11 @@ $template->assign_vars(array(
|
||||||
if( !$userdata['session_logged_in'] )
|
if( !$userdata['session_logged_in'] )
|
||||||
{
|
{
|
||||||
$template->assign_block_vars("switch_user_logged_out", array());
|
$template->assign_block_vars("switch_user_logged_out", array());
|
||||||
|
|
||||||
|
if( $userdata['user_popup_pm'] )
|
||||||
|
{
|
||||||
|
$template->assign_block_vars("switch_enable_pm_popup", array());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -503,7 +503,9 @@ $lang['Select_category'] = "Select category";
|
||||||
$lang['Delete_Image'] = "Delete Image";
|
$lang['Delete_Image'] = "Delete Image";
|
||||||
$lang['Current_Image'] = "Current Image";
|
$lang['Current_Image'] = "Current Image";
|
||||||
|
|
||||||
$lang['Notify_on_privmsg'] = "Notify on Private Message";
|
$lang['Notify_on_privmsg'] = "Notify on new Private Message";
|
||||||
|
$lang['Popup_on_privmsg'] = "Pop up window on new Private Message";
|
||||||
|
$lang['Popup_on_privmsg_explain'] = "Some templates may open a new window to inform you when new private messages arrive";
|
||||||
$lang['Hide_user'] = "Hide your online status";
|
$lang['Hide_user'] = "Hide your online status";
|
||||||
|
|
||||||
$lang['Profile_updated'] = "Your profile has been updated";
|
$lang['Profile_updated'] = "Your profile has been updated";
|
||||||
|
|
|
@ -498,6 +498,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||||
$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;
|
||||||
$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'])) ? ( ($HTTP_POST_VARS['allowhtml']) ? TRUE : 0 ) : $userdata['user_allowhtml'];
|
$allowhtml = (isset($HTTP_POST_VARS['allowhtml'])) ? ( ($HTTP_POST_VARS['allowhtml']) ? TRUE : 0 ) : $userdata['user_allowhtml'];
|
||||||
|
@ -982,7 +983,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE " . USERS_TABLE . "
|
$sql = "UPDATE " . USERS_TABLE . "
|
||||||
SET " . $username_sql . $passwd_sql . "user_email = '$email', user_icq = '$icq', user_website = '$website', user_occ = '$occupation', user_from = '$location', user_interests = '$interests', user_sig = '$signature', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '$aim', user_yim = '$yim', user_msnm = '$msn', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_timezone = $user_timezone, user_dateformat = '$user_dateformat', user_lang = '$user_lang', user_style = $user_style, user_active = $user_active, user_actkey = '$user_actkey'" . $avatar_sql . "
|
SET " . $username_sql . $passwd_sql . "user_email = '$email', user_icq = '$icq', user_website = '$website', user_occ = '$occupation', user_from = '$location', user_interests = '$interests', user_sig = '$signature', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '$aim', user_yim = '$yim', user_msnm = '$msn', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_timezone = $user_timezone, user_dateformat = '$user_dateformat', user_lang = '$user_lang', user_style = $user_style, user_active = $user_active, user_actkey = '$user_actkey'" . $avatar_sql . "
|
||||||
WHERE user_id = $user_id";
|
WHERE user_id = $user_id";
|
||||||
|
|
||||||
if( $result = $db->sql_query($sql) )
|
if( $result = $db->sql_query($sql) )
|
||||||
|
@ -1055,8 +1056,8 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||||
//
|
//
|
||||||
// Get current date
|
// Get current date
|
||||||
//
|
//
|
||||||
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
|
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
|
||||||
VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$icq', '$website', '$occupation', '$location', '$interests', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, ";
|
VALUES ($new_user_id, '$username', " . time() . ", '$password', '$email', '$icq', '$website', '$occupation', '$location', '$interests', '$signature', '$signature_bbcode_uid', '$avatar_filename', $viewemail, '$aim', '$yim', '$msn', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popuppm $user_timezone, '$user_dateformat', '$user_lang', $user_style, 0, 1, ";
|
||||||
|
|
||||||
if( $board_config['require_activation'] ==USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa == 1)
|
if( $board_config['require_activation'] ==USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa == 1)
|
||||||
{
|
{
|
||||||
|
@ -1238,6 +1239,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||||
|
|
||||||
$viewemail = $userdata['user_viewemail'];
|
$viewemail = $userdata['user_viewemail'];
|
||||||
$notifypm = $userdata['user_notify_pm'];
|
$notifypm = $userdata['user_notify_pm'];
|
||||||
|
$popuppm = $userdata['user_popup_pm'];
|
||||||
$notifyreply = $userdata['user_notify'];
|
$notifyreply = $userdata['user_notify'];
|
||||||
$attachsig = $userdata['user_attachsig'];
|
$attachsig = $userdata['user_attachsig'];
|
||||||
$allowhtml = $userdata['user_allowhtml'];
|
$allowhtml = $userdata['user_allowhtml'];
|
||||||
|
@ -1374,6 +1376,7 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||||
$s_hidden_vars .= '<input type="hidden" name="signature" value="' . addslashes($signature) . '" />';
|
$s_hidden_vars .= '<input type="hidden" name="signature" value="' . addslashes($signature) . '" />';
|
||||||
$s_hidden_vars .= '<input type="hidden" name="viewemail" value="' . $viewemail . '" />';
|
$s_hidden_vars .= '<input type="hidden" name="viewemail" value="' . $viewemail . '" />';
|
||||||
$s_hidden_vars .= '<input type="hidden" name="notifypm" value="' . $notifypm . '" />';
|
$s_hidden_vars .= '<input type="hidden" name="notifypm" value="' . $notifypm . '" />';
|
||||||
|
$s_hidden_vars .= '<input type="hidden" name="popup_pm" value="' . $popuppm . '" />';
|
||||||
$s_hidden_vars .= '<input type="hidden" name="notifyreply" value="' . $notifyreply . '" />';
|
$s_hidden_vars .= '<input type="hidden" name="notifyreply" value="' . $notifyreply . '" />';
|
||||||
$s_hidden_vars .= '<input type="hidden" name="attachsig" value="' . $attachsig . '" />';
|
$s_hidden_vars .= '<input type="hidden" name="attachsig" value="' . $attachsig . '" />';
|
||||||
$s_hidden_vars .= '<input type="hidden" name="allowhtml" value="' . $allowhtml . '" />';
|
$s_hidden_vars .= '<input type="hidden" name="allowhtml" value="' . $allowhtml . '" />';
|
||||||
|
@ -1514,6 +1517,8 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||||
"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_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\"" : "",
|
||||||
|
@ -1580,6 +1585,8 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
|
||||||
"L_NOTIFY_ON_REPLY" => $lang['Always_notify'],
|
"L_NOTIFY_ON_REPLY" => $lang['Always_notify'],
|
||||||
"L_NOTIFY_ON_REPLY_EXPLAIN" => $lang['Always_notify_explain'],
|
"L_NOTIFY_ON_REPLY_EXPLAIN" => $lang['Always_notify_explain'],
|
||||||
"L_NOTIFY_ON_PRIVMSG" => $lang['Notify_on_privmsg'],
|
"L_NOTIFY_ON_PRIVMSG" => $lang['Notify_on_privmsg'],
|
||||||
|
"L_POPUP_ON_PRIVMSG" => $lang['Popup_on_privmsg'],
|
||||||
|
"L_POPUP_ON_PRIVMSG_EXPLAIN" => $lang['Popup_on_privmsg_explain'],
|
||||||
"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'],
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
<p>{L_USER_EXPLAIN}</p>
|
<p>{L_USER_EXPLAIN}</p>
|
||||||
|
|
||||||
|
{ERROR_BOX}
|
||||||
|
|
||||||
<form action="{S_PROFILE_ACTION}" method="post"><table width="98%" cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
|
<form action="{S_PROFILE_ACTION}" method="post"><table width="98%" cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="thHead" colspan="2">{L_REGISTRATION_INFO}</th>
|
<th class="thHead" colspan="2">{L_REGISTRATION_INFO}</th>
|
||||||
|
@ -134,6 +136,14 @@
|
||||||
<input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO} />
|
<input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO} />
|
||||||
<span class="gen">{L_NO}</span></td>
|
<span class="gen">{L_NO}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1"><span class="gen">{L_POPUP_ON_PRIVMSG}:</span></td>
|
||||||
|
<td class="row2">
|
||||||
|
<input type="radio" name="popup_pm" value="1" {POPUP_PM_YES} />
|
||||||
|
<span class="gen">{L_YES}</span>
|
||||||
|
<input type="radio" name="popup_pm" value="0" {POPUP_PM_NO} />
|
||||||
|
<span class="gen">{L_NO}</span></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1"><span class="gen">{L_ALWAYS_ADD_SIGNATURE}:</span></td>
|
<td class="row1"><span class="gen">{L_ALWAYS_ADD_SIGNATURE}:</span></td>
|
||||||
<td class="row2">
|
<td class="row2">
|
||||||
|
|
|
@ -152,6 +152,14 @@
|
||||||
<input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO} />
|
<input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO} />
|
||||||
<span class="gen">{L_NO}</span></td>
|
<span class="gen">{L_NO}</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="row1"><span class="gen">{L_POPUP_ON_PRIVMSG}:</span><br /><span class="gensmall">{L_POPUP_ON_PRIVMSG_EXPLAIN}</span></td>
|
||||||
|
<td class="row2">
|
||||||
|
<input type="radio" name="popup_pm" value="1" {POPUP_PM_YES} />
|
||||||
|
<span class="gen">{L_YES}</span>
|
||||||
|
<input type="radio" name="popup_pm" value="0" {POPUP_PM_NO} />
|
||||||
|
<span class="gen">{L_NO}</span></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1"><span class="gen">{L_ALWAYS_ADD_SIGNATURE}:</span></td>
|
<td class="row1"><span class="gen">{L_ALWAYS_ADD_SIGNATURE}:</span></td>
|
||||||
<td class="row2">
|
<td class="row2">
|
||||||
|
|
Loading…
Add table
Reference in a new issue