diff --git a/upload/admin/admin_users.php b/upload/admin/admin_users.php
deleted file mode 100644
index 579defc26..000000000
--- a/upload/admin/admin_users.php
+++ /dev/null
@@ -1,918 +0,0 @@
-#');
-$html_entities_replace = array('<', '>');
-
-$message = $error_msg = $username_sql = '';
-$group_moderator = $mark_list = array();
-
-$mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : '';
-
-function return_msg_ua ($status_msg)
-{
- global $lang;
-
- $message = $status_msg;
-
- $message .= '
';
- $message .= sprintf($lang['CLICK_RETURN_USERADMIN'], '', '');
- $message .= '
';
- $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', '');
-
- return $message;
-}
-
-//
-// Begin program
-//
-if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset($_GET[POST_USERS_URL]) || isset( $_POST[POST_USERS_URL]) ) )
-{
- attachment_quota_settings('user', @$_POST['submit'], $mode);
-
- //
- // Ok, the profile has been modified and submitted, let's update
- //
- if ( ( $mode == 'save' && isset( $_POST['submit'] ) ) || isset( $_POST['avatargallery'] ) || isset( $_POST['submitavatar'] ) || isset( $_POST['cancelavatar'] ) )
- {
- $user_id = (int) $_POST['id'];
-
- if (!$this_userdata = get_userdata($user_id))
- {
- message_die(GENERAL_MESSAGE, $lang['NO_USER_ID_SPECIFIED']);
- }
-
- if ($userdata['user_id'] != $user_id)
- {
- if (!empty($_POST['deleteuser']))
- {
- delete_user_sessions($user_id);
- user_delete($user_id, !empty($_POST['delete_user_posts']));
-
- if ($this_userdata['user_level'] == MOD)
- {
- $datastore->update('moderators');
- }
-
- message_die(GENERAL_MESSAGE, return_msg_ua($lang['USER_DELETED']));
- }
- else if (!empty($_POST['delete_user_posts']))
- {
- post_delete('user', $user_id);
- message_die(GENERAL_MESSAGE, return_msg_ua('User posts were deleted'));
- }
- }
-
- $username = ( !empty($_POST['username']) ) ? clean_username($_POST['username']) : '';
- $email = ( !empty($_POST['email']) ) ? trim(strip_tags(htmlspecialchars( $_POST['email'] ) )) : '';
-
- $password = ( !empty($_POST['password']) ) ? trim(strip_tags(htmlspecialchars( $_POST['password'] ) )) : '';
- $password_confirm = ( !empty($_POST['password_confirm']) ) ? trim(strip_tags(htmlspecialchars( $_POST['password_confirm'] ) )) : '';
-
- $icq = ( !empty($_POST['icq']) ) ? trim(strip_tags( $_POST['icq'] ) ) : '';
-
- $website = ( !empty($_POST['website']) ) ? trim(strip_tags( $_POST['website'] ) ) : '';
- $location = ( !empty($_POST['location']) ) ? trim(strip_tags( $_POST['location'] ) ) : '';
- $occupation = ( !empty($_POST['occupation']) ) ? trim(strip_tags( $_POST['occupation'] ) ) : '';
- $interests = ( !empty($_POST['interests']) ) ? trim(strip_tags( $_POST['interests'] ) ) : '';
- $signature = ( !empty($_POST['signature']) ) ? trim(str_replace('
', "\n", $_POST['signature'] ) ) : '';
-
- validate_optional_fields($icq, $website, $location, $occupation, $interests, $signature);
-
- $allowviewonline = ( isset( $_POST['hideonline']) ) ? ( ( $_POST['hideonline'] ) ? 0 : TRUE ) : TRUE;
- $notifyreply = ( isset( $_POST['notifyreply']) ) ? ( ( $_POST['notifyreply'] ) ? TRUE : 0 ) : 0;
- $notifypm = ( isset( $_POST['notifypm']) ) ? ( ( $_POST['notifypm'] ) ? TRUE : 0 ) : TRUE;
- $viewemail = (int) !empty($_POST['viewemail']);
- $attachsig = (int) !empty($_POST['attachsig']);
-
- $user_lang = ( $_POST['language'] != $bb_cfg['board_lang'] ) ? $_POST['language'] : '';
- $user_timezone = ( isset($_POST['timezone']) ) ? str_replace(',', '.', doubleval($_POST['timezone'])) : $bb_cfg['board_timezone'];
-
- $user_template = ( @$_POST['template'] ) ? $_POST['template'] : @$bb_cfg['board_template'];
- $user_dateformat = (!empty($_POST['dateformat']) && $_POST['dateformat'] != $bb_cfg['board_dateformat']) ? $_POST['dateformat'] : '';
-
- $user_avatar_local = ( isset( $_POST['avatarselect'] ) && !empty($_POST['submitavatar'] ) && $bb_cfg['allow_avatar_local'] ) ? $_POST['avatarselect'] : ( ( isset( $_POST['avatarlocal'] ) ) ? $_POST['avatarlocal'] : '' );
- $user_avatar_category = ( isset($_POST['avatarcatname']) && $bb_cfg['allow_avatar_local'] ) ? htmlspecialchars($_POST['avatarcatname']) : '' ;
-
- $user_avatar_remoteurl = ( !empty($_POST['avatarremoteurl']) ) ? trim( $_POST['avatarremoteurl'] ) : '';
- $user_avatar_url = ( !empty($_POST['avatarurl']) ) ? trim( $_POST['avatarurl'] ) : '';
- $user_avatar_loc = ( @$_FILES['avatar']['tmp_name'] != "none") ? $_FILES['avatar']['tmp_name'] : '';
- $user_avatar_name = ( !empty($_FILES['avatar']['name']) ) ? $_FILES['avatar']['name'] : '';
- $user_avatar_size = ( !empty($_FILES['avatar']['size']) ) ? $_FILES['avatar']['size'] : 0;
- $user_avatar_filetype = ( !empty($_FILES['avatar']['type']) ) ? $_FILES['avatar']['type'] : '';
-
- $user_avatar = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar'] : '';
- $user_avatar_type = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar_type'] : '';
-
- $user_status = ( !empty($_POST['user_status']) ) ? intval( $_POST['user_status'] ) : 0;
- $user_allowpm = ( !empty($_POST['user_allowpm']) ) ? intval( $_POST['user_allowpm'] ) : 0;
- $user_rank = ( !empty($_POST['user_rank']) ) ? intval( $_POST['user_rank'] ) : 0;
- $user_allowavatar = ( !empty($_POST['user_allowavatar']) ) ? intval( $_POST['user_allowavatar'] ) : 0;
-
- if( isset( $_POST['avatargallery'] ) || isset( $_POST['submitavatar'] ) || isset( $_POST['cancelavatar'] ) )
- {
- $username = stripslashes($username);
- $email = stripslashes($email);
- $password = '';
- $password_confirm = '';
-
- $icq = stripslashes($icq);
-
- $website = htmlspecialchars(stripslashes($website));
- $location = htmlspecialchars(stripslashes($location));
- $occupation = htmlspecialchars(stripslashes($occupation));
- $interests = htmlspecialchars(stripslashes($interests));
- $signature = htmlspecialchars(stripslashes($signature));
-
- $user_lang = stripslashes($user_lang);
- $user_dateformat = htmlspecialchars(stripslashes($user_dateformat));
-
- if ( !isset($_POST['cancelavatar']))
- {
- $user_avatar = $user_avatar_category . '/' . $user_avatar_local;
- $user_avatar_type = USER_AVATAR_GALLERY;
- }
- }
- }
-
- if( isset( $_POST['submit'] ) )
- {
- include(INC_DIR . 'ucp/usercp_avatar.php');
-
- $error = FALSE;
-
- if (stripslashes($username) != $this_userdata['username'])
- {
- unset($rename_user);
-
- if ( stripslashes(strtolower($username)) != strtolower($this_userdata['username']) )
- {
- $result = validate_username($username);
- if ( $result['error'] )
- {
- $error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $result['error_msg'];
- }
- else if ( strtolower(str_replace("\\'", "''", $username)) == strtolower($userdata['username']) )
- {
- $error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['USERNAME_TAKEN'];
- }
- }
-
- if (!$error)
- {
- $username_sql = "username = '" . str_replace("\\'", "''", $username) . "', ";
- $rename_user = $username; // Used for renaming usergroup
- }
- }
-
- $passwd_sql = '';
- if( !empty($password) && !empty($password_confirm) )
- {
- //
- // Awww, the user wants to change their password, isn't that cute..
- //
- if($password != $password_confirm)
- {
- $error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['PASSWORD_MISMATCH'];
- }
- else
- {
- $password = md5($password);
- $passwd_sql = "user_password = '$password', ";
- }
- }
- else if( $password && !$password_confirm )
- {
- $error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['PASSWORD_MISMATCH'];
- }
- else if( !$password && $password_confirm )
- {
- $error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['PASSWORD_MISMATCH'];
- }
-
- if ($signature != '')
- {
- $sig_length_check = preg_replace('/(\[.*?)(=.*?)\]/is', '\\1]', stripslashes($signature));
-
- if ( strlen($sig_length_check) > $bb_cfg['max_sig_chars'] )
- {
- $error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['SIGNATURE_TOO_LONG'];
- }
- }
-
- //
- // Avatar stuff
- //
- $avatar_sql = "";
- if( isset($_POST['avatardel']) )
- {
- if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "" )
- {
- if( @file_exists(@phpbb_realpath('./../' . $bb_cfg['avatar_path'] . "/" . $this_userdata['user_avatar'])) )
- {
- @unlink('./../' . $bb_cfg['avatar_path'] . "/" . $this_userdata['user_avatar']);
- }
- }
- $avatar_sql = ", user_avatar = '', user_avatar_type = " . USER_AVATAR_NONE;
- }
- else if( ( $user_avatar_loc != "" || !empty($user_avatar_url) ) && !$error )
- {
- //
- // Only allow one type of upload, either a
- // filename or a URL
- //
- if( !empty($user_avatar_loc) && !empty($user_avatar_url) )
- {
- $error = TRUE;
- if( isset($error_msg) )
- {
- $error_msg .= "
";
- }
- $error_msg .= $lang['ONLY_ONE_AVATAR'];
- }
-
- if( $user_avatar_loc != "" )
- {
- if( file_exists(@phpbb_realpath($user_avatar_loc)) && preg_match("/\.(gif|jpg|png)$/", $user_avatar_name) )
- {
- if( $user_avatar_size <= $bb_cfg['avatar_filesize'] && $user_avatar_size > 0)
- {
- $error_type = false;
-
- //
- // Opera appends the image name after the type, not big, not clever!
- //
- preg_match("'image\/[x\-]*([a-z]+)'", $user_avatar_filetype, $user_avatar_filetype);
- $user_avatar_filetype = $user_avatar_filetype[1];
-
- switch( $user_avatar_filetype )
- {
- case "jpeg":
- case "pjpeg":
- case "jpg":
- $imgtype = '.jpg';
- break;
- case "gif":
- $imgtype = '.gif';
- break;
- case "png":
- $imgtype = '.png';
- break;
- default:
- $error = true;
- $error_msg = (!empty($error_msg)) ? $error_msg . "
" . $lang['AVATAR_FILETYPE'] : $lang['AVATAR_FILETYPE'];
- break;
- }
-
- if( !$error )
- {
- list($width, $height) = @getimagesize($user_avatar_loc);
-
- if( $width <= $bb_cfg['avatar_max_width'] && $height <= $bb_cfg['avatar_max_height'] )
- {
- $user_id = $this_userdata['user_id'];
-
- $avatar_filename = $user_id . $imgtype;
-
- if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "" )
- {
- if( @file_exists(@phpbb_realpath("./../" . $bb_cfg['avatar_path'] . "/" . $this_userdata['user_avatar'])) )
- {
- @unlink("./../" . $bb_cfg['avatar_path'] . "/". $this_userdata['user_avatar']);
- }
- }
- @copy($user_avatar_loc, "./../" . $bb_cfg['avatar_path'] . "/$avatar_filename");
-
- $avatar_sql = ", user_avatar = '$avatar_filename', user_avatar_type = " . USER_AVATAR_UPLOAD;
- }
- else
- {
- $l_avatar_size = sprintf($lang['AVATAR_IMAGESIZE'], $bb_cfg['avatar_max_width'], $bb_cfg['avatar_max_height']);
-
- $error = true;
- $error_msg = ( !empty($error_msg) ) ? $error_msg . "
" . $l_avatar_size : $l_avatar_size;
- }
- }
- }
- else
- {
- $l_avatar_size = sprintf($lang['AVATAR_FILESIZE'], round($bb_cfg['avatar_filesize'] / 1024));
-
- $error = true;
- $error_msg = ( !empty($error_msg) ) ? $error_msg . "
" . $l_avatar_size : $l_avatar_size;
- }
- }
- else
- {
- $error = true;
- $error_msg = ( !empty($error_msg) ) ? $error_msg . "
" . $lang['AVATAR_FILETYPE'] : $lang['AVATAR_FILETYPE'];
- }
- }
- else if( !empty($user_avatar_url) )
- {
- //
- // First check what port we should connect
- // to, look for a :[xxxx]/ or, if that doesn't
- // exist assume port 80 (http)
- //
- preg_match("/^(http:\/\/)?([\w\-\.]+)\:?([0-9]*)\/(.*)$/", $user_avatar_url, $url_ary);
-
- if( !empty($url_ary[4]) )
- {
- $port = (!empty($url_ary[3])) ? $url_ary[3] : 80;
-
- $fsock = @fsockopen($url_ary[2], $port, $errno, $errstr);
- if( $fsock )
- {
- $base_get = "/" . $url_ary[4];
-
- //
- // Uses HTTP 1.1, could use HTTP 1.0 ...
- //
- @fputs($fsock, "GET $base_get HTTP/1.1\r\n");
- @fputs($fsock, "HOST: " . $url_ary[2] . "\r\n");
- @fputs($fsock, "Connection: close\r\n\r\n");
-
- $avatar_data = '';
- while( !@feof($fsock) )
- {
- $avatar_data .= @fread($fsock, $bb_cfg['avatar_filesize']);
- }
- @fclose($fsock);
-
- if( preg_match("/Content-Length\: ([0-9]+)[^\/ ][\s]+/i", $avatar_data, $file_data1) && preg_match("/Content-Type\: image\/[x\-]*([a-z]+)[\s]+/i", $avatar_data, $file_data2) )
- {
- $file_size = $file_data1[1];
- $file_type = $file_data2[1];
-
- switch( $file_type )
- {
- case "jpeg":
- case "pjpeg":
- case "jpg":
- $imgtype = '.jpg';
- break;
- case "gif":
- $imgtype = '.gif';
- break;
- case "png":
- $imgtype = '.png';
- break;
- default:
- $error = true;
- $error_msg = (!empty($error_msg)) ? $error_msg . "
" . $lang['AVATAR_FILETYPE'] : $lang['AVATAR_FILETYPE'];
- break;
- }
-
- if( !$error && $file_size > 0 && $file_size < $bb_cfg['avatar_filesize'] )
- {
- $avatar_data = substr($avatar_data, strlen($avatar_data) - $file_size, $file_size);
-
- $tmp_filename = tempnam ("/tmp", $this_userdata['user_id'] . "-");
- $fptr = @fopen($tmp_filename, "wb");
- $bytes_written = @fwrite($fptr, $avatar_data, $file_size);
- @fclose($fptr);
-
- if( $bytes_written == $file_size )
- {
- list($width, $height) = @getimagesize($tmp_filename);
-
- if( $width <= $bb_cfg['avatar_max_width'] && $height <= $bb_cfg['avatar_max_height'] )
- {
- $user_id = $this_userdata['user_id'];
-
- $avatar_filename = $user_id . $imgtype;
-
- if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "")
- {
- if( file_exists(@phpbb_realpath("./../" . $bb_cfg['avatar_path'] . "/" . $this_userdata['user_avatar'])) )
- {
- @unlink("./../" . $bb_cfg['avatar_path'] . "/" . $this_userdata['user_avatar']);
- }
- }
- @copy($tmp_filename, "./../" . $bb_cfg['avatar_path'] . "/$avatar_filename");
- @unlink($tmp_filename);
-
- $avatar_sql = ", user_avatar = '$avatar_filename', user_avatar_type = " . USER_AVATAR_UPLOAD;
- }
- else
- {
- $l_avatar_size = sprintf($lang['AVATAR_IMAGESIZE'], $bb_cfg['avatar_max_width'], $bb_cfg['avatar_max_height']);
-
- $error = true;
- $error_msg = ( !empty($error_msg) ) ? $error_msg . "
" . $l_avatar_size : $l_avatar_size;
- }
- }
- else
- {
- //
- // Error writing file
- //
- @unlink($tmp_filename);
- message_die(GENERAL_ERROR, "Could not write avatar file to local storage. Please contact the board administrator with this message", "", __LINE__, __FILE__);
- }
- }
- }
- else
- {
- //
- // No data
- //
- $error = true;
- $error_msg = ( !empty($error_msg) ) ? $error_msg . "
" . $lang['FILE_NO_DATA'] : $lang['FILE_NO_DATA'];
- }
- }
- else
- {
- //
- // No connection
- //
- $error = true;
- $error_msg = ( !empty($error_msg) ) ? $error_msg . "
" . $lang['NO_CONNECTION_URL'] : $lang['NO_CONNECTION_URL'];
- }
- }
- else
- {
- $error = true;
- $error_msg = ( !empty($error_msg) ) ? $error_msg . "
" . $lang['INCOMPLETE_URL'] : $lang['INCOMPLETE_URL'];
- }
- }
- else if( !empty($user_avatar_name) )
- {
- $l_avatar_size = sprintf($lang['AVATAR_FILESIZE'], round($bb_cfg['avatar_filesize'] / 1024));
-
- $error = true;
- $error_msg = ( !empty($error_msg) ) ? $error_msg . "
" . $l_avatar_size : $l_avatar_size;
- }
- }
- else if( $user_avatar_remoteurl != "" && $avatar_sql == "" && !$error )
- {
- if( !preg_match("#^http:\/\/#i", $user_avatar_remoteurl) )
- {
- $user_avatar_remoteurl = "http://" . $user_avatar_remoteurl;
- }
-
- if( preg_match("#^(http:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+\/.*?\.(gif|jpg|png)$)#is", $user_avatar_remoteurl) )
- {
- $avatar_sql = ", user_avatar = '" . str_replace("\'", "''", $user_avatar_remoteurl) . "', user_avatar_type = " . USER_AVATAR_REMOTE;
- }
- else
- {
- $error = true;
- $error_msg = ( !empty($error_msg) ) ? $error_msg . "
" . $lang['WRONG_REMOTE_AVATAR_FORMAT'] : $lang['WRONG_REMOTE_AVATAR_FORMAT'];
- }
- }
- else if( $user_avatar_local != "" && $avatar_sql == "" && !$error )
- {
- $avatar_sql = ", user_avatar = '" . str_replace("\'", "''", phpbb_ltrim(basename($user_avatar_category), "'") . '/' . phpbb_ltrim(basename($user_avatar_local), "'")) . "', user_avatar_type = " . USER_AVATAR_GALLERY;
- }
-
- //
- // Update entry in DB
- //
- if( !$error )
- {
- $update_user_opt = array(
- 'viewemail',
- );
- $user_opt = $this_userdata['user_opt'];
-
- foreach ($update_user_opt as $opt)
- {
- setbit($user_opt, $bf['user_opt'][$opt], !empty($_POST[$opt]));
- }
-
- $sql = "UPDATE " . BB_USERS . "
- SET " . $username_sql . $passwd_sql . "
- user_email = '" . str_replace("\'", "''", $email) . "',
- user_icq = '" . str_replace("\'", "''", $icq) . "',
- user_website = '" . str_replace("\'", "''", $website) . "',
- user_occ = '" . str_replace("\'", "''", $occupation) . "',
- user_from = '" . str_replace("\'", "''", $location) . "',
- user_interests = '" . str_replace("\'", "''", $interests) . "',
- user_sig = '" . str_replace("\'", "''", $signature) . "',
- user_opt = $user_opt,
- user_allow_viewonline = $allowviewonline,
- user_notify = $notifyreply,
- user_notify_pm = $notifypm,
- user_allowavatar = $user_allowavatar,
- user_allow_pm = $user_allowpm,
- user_lang = '" . str_replace("\'", "''", $user_lang) . "',
- user_timezone = $user_timezone,
- user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "',
- user_active = $user_status,
- user_rank = $user_rank" . $avatar_sql . ",
- user_actkey = ''
- WHERE user_id = $user_id";
-
- if( $result = DB()->sql_query($sql) )
- {
- // Delete user session, to prevent the user navigating the forum (if logged in) when disabled
- if (!$user_status)
- {
- delete_user_sessions($user_id);
- }
-
- $message .= $lang['ADMIN_USER_UPDATED'];
- }
- else
- {
- $error = TRUE;
- $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['ADMIN_USER_FAIL'];
- }
-
- if ($this_userdata['user_level'] == MOD)
- {
- $datastore->update('moderators');
- }
-
- if ($this_userdata['user_active'] != $user_status)
- {
- $log_action_type = (!$user_status) ? 'adm_user_ban' : 'adm_user_unban';
-
- $log_action->admin($log_action_type, array(
- 'log_msg' => 'user: '. get_usernames_for_log($user_id),
- ));
- }
-
- $message .= '
' . sprintf($lang['CLICK_RETURN_USERADMIN'], '', '') . '
' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', '');
-
- message_die(GENERAL_MESSAGE, $message);
- }
- else
- {
- $template->assign_vars(array('ERROR_MESSAGE' => $error_msg));
-
- $username = htmlspecialchars(stripslashes($username));
- $email = stripslashes($email);
- $password = '';
- $password_confirm = '';
-
- $icq = stripslashes($icq);
-
- $website = htmlspecialchars(stripslashes($website));
- $location = htmlspecialchars(stripslashes($location));
- $occupation = htmlspecialchars(stripslashes($occupation));
- $interests = htmlspecialchars(stripslashes($interests));
- $signature = htmlspecialchars(stripslashes($signature));
-
- $user_lang = stripslashes($user_lang);
- $user_dateformat = htmlspecialchars(stripslashes($user_dateformat));
- }
- }
- else if( !isset( $_POST['submit'] ) && $mode != 'save' && !isset( $_POST['avatargallery'] ) && !isset( $_POST['submitavatar'] ) && !isset( $_POST['cancelavatar'] ) )
- {
- if( isset( $_GET[POST_USERS_URL]) || isset( $_POST[POST_USERS_URL]) )
- {
- $user_id = ( isset( $_POST[POST_USERS_URL]) ) ? intval( $_POST[POST_USERS_URL]) : intval( $_GET[POST_USERS_URL]);
- $this_userdata = get_userdata($user_id);
- if( !$this_userdata )
- {
- message_die(GENERAL_MESSAGE, $lang['NO_USER_ID_SPECIFIED'] );
- }
- }
- else
- {
- $this_userdata = get_userdata($_POST['username'], true);
- if( !$this_userdata )
- {
- message_die(GENERAL_MESSAGE, $lang['NO_USER_ID_SPECIFIED'] );
- }
- }
-
- //
- // 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'];
-
- $website = htmlspecialchars($this_userdata['user_website']);
- $location = htmlspecialchars($this_userdata['user_from']);
-
- $occupation = htmlspecialchars($this_userdata['user_occ']);
- $interests = htmlspecialchars($this_userdata['user_interests']);
-
- $signature = preg_replace($html_entities_match, $html_entities_replace, $signature);
-
- $viewemail = bf($this_userdata['user_opt'], 'user_opt', 'viewemail');
- $notifypm = $this_userdata['user_notify_pm'];
- $notifyreply = $this_userdata['user_notify'];
- $attachsig = bf($this_userdata['user_opt'], 'user_opt', 'allow_sig');
- $allowviewonline = $this_userdata['user_allow_viewonline'];
-
- $user_avatar = $this_userdata['user_avatar'];
- $user_avatar_type = $this_userdata['user_avatar_type'];
- $user_timezone = $this_userdata['user_timezone'];
-
- $user_lang = ($this_userdata['user_lang']) ? $this_userdata['user_lang'] : $bb_cfg['default_lang'];
- $user_dateformat = ($this_userdata['user_dateformat']) ? $this_userdata['user_dateformat'] : $bb_cfg['default_dateformat'];
-
- $user_status = $this_userdata['user_active'];
- $user_allowavatar = $this_userdata['user_allowavatar'];
- $user_allowpm = $this_userdata['user_allow_pm'];
-
- $bbcode_status = ($bb_cfg['allow_bbcode']) ? $lang['BBCODE_IS_ON'] : $lang['BBCODE_IS_OFF'];
- $smilies_status = ($bb_cfg['allow_smilies']) ? $lang['SMILIES_ARE_ON'] : $lang['SMILIES_ARE_OFF'];
- }
-
- if( isset($_POST['avatargallery']) && !$error )
- {
- if( !$error )
- {
- $user_id = intval($_POST['id']);
-
- $dir = @opendir("../" . $bb_cfg['avatar_gallery_path']);
-
- $avatar_images = array();
- while( $file = @readdir($dir) )
- {
- if( $file != "." && $file != ".." && !is_file(phpbb_realpath("./../" . $bb_cfg['avatar_gallery_path'] . "/" . $file)) && !is_link(phpbb_realpath("./../" . $bb_cfg['avatar_gallery_path'] . "/" . $file)) )
- {
- $sub_dir = @opendir("../" . $bb_cfg['avatar_gallery_path'] . "/" . $file);
-
- $avatar_row_count = 0;
- $avatar_col_count = 0;
-
- while( $sub_file = @readdir($sub_dir) )
- {
- if( preg_match("/(\.gif$|\.png$|\.jpg)$/is", $sub_file) )
- {
- $avatar_images[$file][$avatar_row_count][$avatar_col_count] = $sub_file;
-
- $avatar_col_count++;
- if( $avatar_col_count == 5 )
- {
- $avatar_row_count++;
- $avatar_col_count = 0;
- }
- }
- }
- }
- }
-
- @closedir($dir);
-
- if( isset($_POST['avatarcategory']) )
- {
- $category = htmlspecialchars($_POST['avatarcategory']);
- }
- else
- {
- list($category, ) = each($avatar_images);
- }
- @reset($avatar_images);
-
- $s_categories = "";
- while( list($key) = each($avatar_images) )
- {
- $selected = ( $key == $category ) ? "selected=\"selected\"" : "";
- if( count($avatar_images[$key]) )
- {
- $s_categories .= '';
- }
- }
-
- $s_colspan = 0;
- for($i = 0; $i < count($avatar_images[$category]); $i++)
- {
- $template->assign_block_vars("avatar_row", array());
-
- $s_colspan = max($s_colspan, count($avatar_images[$category][$i]));
-
- for($j = 0; $j < count($avatar_images[$category][$i]); $j++)
- {
- $template->assign_block_vars("avatar_row.avatar_column", array(
- "AVATAR_IMAGE" => "../" . $bb_cfg['avatar_gallery_path'] . '/' . $category . '/' . $avatar_images[$category][$i][$j])
- );
-
- $template->assign_block_vars("avatar_row.avatar_option_column", array(
- "S_OPTIONS_AVATAR" => $avatar_images[$category][$i][$j])
- );
- }
- }
-
- $s_hidden_fields = '';
- $s_hidden_fields .= '';
-
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
-
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
-
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
- $s_hidden_fields .= '';
-
- $template->assign_vars(array(
- 'TPL_ADMIN_USER_AVATAR_GALLERY' => true,
-
- "L_USER_EXPLAIN" => $lang['USER_ADMIN_EXPLAIN'],
-
- "S_OPTIONS_CATEGORIES" => $s_categories,
- "S_COLSPAN" => $s_colspan,
- "S_PROFILE_ACTION" => append_sid("admin_users.php?mode=$mode"),
- "S_HIDDEN_FIELDS" => $s_hidden_fields)
- );
- }
- }
- else
- {
- $s_hidden_fields = '';
- $s_hidden_fields .= '';
-
- if( !empty($user_avatar_local) )
- {
- $s_hidden_fields .= '';
- }
-
- if( $user_avatar_type )
- {
- switch( $user_avatar_type )
- {
- case USER_AVATAR_UPLOAD:
- $avatar = '';
- break;
- case USER_AVATAR_REMOTE:
- $avatar = '
';
- break;
- case USER_AVATAR_GALLERY:
- $avatar = '
';
- break;
- }
- }
- else
- {
- $avatar = "";
- }
-
- $sql = "SELECT * FROM " . BB_RANKS . "
- WHERE rank_special = 1
- ORDER BY rank_title";
- if ( !($result = DB()->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Could not obtain ranks data', '', __LINE__, __FILE__, $sql);
- }
-
- $rank_select_box = '';
- while( $row = DB()->sql_fetchrow($result) )
- {
- $rank = $row['rank_title'];
- $rank_id = $row['rank_id'];
-
- $selected = ( $this_userdata['user_rank'] == $rank_id ) ? ' selected="selected"' : '';
- $rank_select_box .= '';
- }
-
- //
- // Let's do an overall check for settings/versions which would prevent
- // us from doing file uploads....
- //
- $ini_val = ( phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';
- $form_enctype = ( !@$ini_val('file_uploads') || phpversion() == '4.0.4pl1' || !$bb_cfg['allow_avatar_upload'] || ( phpversion() < '4.0.3' && @$ini_val('open_basedir') != '' ) ) ? '' : 'enctype="multipart/form-data"';
-
- $template->assign_vars(array(
- 'TPL_ADMIN_USER_EDIT' => true,
-
- 'USERNAME' => $username,
- 'EMAIL' => $email,
- 'ICQ' => $icq,
- 'OCCUPATION' => $occupation,
- 'INTERESTS' => $interests,
- 'LOCATION' => $location,
-
- 'WEBSITE' => $website,
- 'SIGNATURE' => str_replace('
', "\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"' : '',
- 'NOTIFY_REPLY_YES' => ( $notifyreply ) ? 'checked="checked"' : '',
- 'NOTIFY_REPLY_NO' => ( !$notifyreply ) ? 'checked="checked"' : '',
- 'ADMIN_AVATAR' => $avatar,
- 'LANGUAGE_SELECT' => language_select($user_lang),
- 'TIMEZONE_SELECT' => tz_select($user_timezone),
- 'STYLE_SELECT' => $bb_cfg['tpl_name'],
- '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_EXPLAIN' => $lang['USER_ADMIN_EXPLAIN'],
- 'L_BOARD_LANGUAGE' => $lang['BOARD_LANG'],
- 'L_ALWAYS_ADD_SIGNATURE' => $lang['ALWAYS_ADD_SIG'],
-
- 'L_SPECIAL' => $lang['USER_SPECIAL'],
- 'L_SPECIAL_EXPLAIN' => $lang['USER_SPECIAL_EXPLAIN'],
- 'L_USER_ACTIVE' => $lang['USER_STATUS'],
- 'L_ALLOW_PM' => $lang['USER_ALLOWPM'],
- 'L_ALLOW_AVATAR' => $lang['USER_ALLOWAVATAR'],
-
- 'L_AVATAR_EXP' => $lang['ADMIN_AVATAR_EXPLAIN'],
- 'L_DELETE_AVATAR' => $lang['DELETE_IMAGE'],
- 'L_AVATAR_GALLERY' => $lang['SELECT_FROM_GALLERY'],
- 'L_SHOW_GALLERY' => $lang['VIEW_AVATAR_GALLERY'],
- 'L_LINK_REMOTE_AVATAR' => $lang['LINK_REMOTE_AVATAR'],
-
- 'L_SIGNATURE_EXP' => sprintf($lang['SIGNATURE_EXPLAIN'], $bb_cfg['max_sig_chars'] ),
- 'L_NOTIFY_ON_REPLY' => $lang['ALWAYS_NOTIFY'],
- 'L_PROFILE_INFO_NOTICE' => $lang['PROFILE_INFO_WARN'],
- 'S_FORM_ENCTYPE' => $form_enctype,
-
- 'BBCODE_STATUS' => sprintf(@$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.php"))
- );
-
- if( file_exists(@phpbb_realpath('./../' . $bb_cfg['avatar_path'])) && ($bb_cfg['allow_avatar_upload'] == TRUE) )
- {
- if ( $form_enctype != '' )
- {
- $template->assign_block_vars('avatar_local_upload', array() );
- }
- $template->assign_block_vars('avatar_remote_upload', array() );
- }
-
- if( file_exists(@phpbb_realpath('./../' . $bb_cfg['avatar_gallery_path'])) && ($bb_cfg['allow_avatar_local'] == TRUE) )
- {
- $template->assign_block_vars('avatar_local_gallery', array() );
- }
-
- if( $bb_cfg['allow_avatar_remote'] == TRUE )
- {
- $template->assign_block_vars('avatar_remote_link', array() );
- }
- }
-}
-else
-{
- //
- // Default user selection box
- //
- $template->assign_vars(array(
- 'TPL_ADMIN_USER_SELECT' => true,
-
- 'L_USER_EXPLAIN' => $lang['USER_ADMIN_EXPLAIN'],
-
- 'U_SEARCH_USER' => append_sid("./../search.php?mode=searchuser"),
-
- 'S_USER_ACTION' => append_sid("admin_users.php"),
- 'S_USER_SELECT' => @$select_list)
- );
-}
-
-print_page('admin_users.tpl', 'admin');
\ No newline at end of file
diff --git a/upload/admin/index.php b/upload/admin/index.php
index 09eee8eb2..b5b117171 100644
--- a/upload/admin/index.php
+++ b/upload/admin/index.php
@@ -240,7 +240,7 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
//
// Get users online information.
//
- $sql = "SELECT u.user_id, u.username, s.session_time AS user_session_time, u.user_allow_viewonline, s.session_logged_in, s.session_ip, s.session_start
+ $sql = "SELECT u.user_id, u.username, s.session_time AS user_session_time, u.user_opt, s.session_logged_in, s.session_ip, s.session_start
FROM " . BB_USERS . " u, " . BB_SESSIONS . " s
WHERE s.session_logged_in = 1
AND u.user_id = s.session_user_id
@@ -292,7 +292,7 @@ else if( isset($_GET['pane']) && $_GET['pane'] == 'right' )
$username = $onlinerow_reg[$i]['username'];
- if( $onlinerow_reg[$i]['user_allow_viewonline'] )
+ if( !bf($onlinerow_reg[$i]['user_opt'], 'user_opt', 'allow_viewonline'))
{
$registered_users++;
$hidden = FALSE;
diff --git a/upload/ajax.php b/upload/ajax.php
index 18af35bbf..4c7d8dcaa 100644
--- a/upload/ajax.php
+++ b/upload/ajax.php
@@ -254,8 +254,11 @@ class ajax_common
/**
* Prompt for confirmation
*/
- function prompt_for_confirm ($confirm_msg = 'Точно?')
+ function prompt_for_confirm ($confirm_msg)
{
+ global $lang;
+ if(!empty($confirm_msg)) $confirm_msg = $lang['CONFIRM'];
+
$this->response['prompt_confirm'] = 1;
$this->response['confirm_msg'] = $confirm_msg;
$this->send();
@@ -304,7 +307,7 @@ class ajax_common
function change_user_opt ()
{
- global $userdata, $bf;
+ global $userdata, $bf, $lang;
$user_id = (int) $this->request['user_id'];
$new_opt = bb_json_decode($this->request['user_opt']);
@@ -336,7 +339,7 @@ class ajax_common
DB()->query("UPDATE ". BB_USERS ." SET user_opt = {$u_data['user_opt']} WHERE user_id = $user_id LIMIT 1");
- $this->response['resp_html'] = 'сохранено';
+ $this->response['resp_html'] = $lang['SAVED'];
}
function gen_passkey ()
@@ -349,8 +352,7 @@ class ajax_common
{
if (empty($this->request['confirmed']))
{
- $msg = "Вы уверены, что хотите создать новый passkey?";
- $this->prompt_for_confirm($msg);
+ $this->prompt_for_confirm($lang['BT_GEN_PASSKEY_NEW']);
}
if (!$passkey = generate_passkey($req_uid, IS_ADMIN))
diff --git a/upload/config.php b/upload/config.php
index ea9963192..04ea49ca8 100644
--- a/upload/config.php
+++ b/upload/config.php
@@ -57,8 +57,8 @@ $bb_cfg['css_ver'] = 1;
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.0.2';
-$bb_cfg['tp_release_state'] = 'TP II r60';
-$bb_cfg['tp_release_date'] = '02-07-2011';
+$bb_cfg['tp_release_state'] = 'TP II r63';
+$bb_cfg['tp_release_date'] = '03-07-2011';
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
$bb_cfg['srv_overloaded_msg'] = "Извините, в данный момент сервер перегружен\nПопробуйте повторить запрос через несколько минут";
diff --git a/upload/includes/online_userlist.php b/upload/includes/online_userlist.php
index 26755c619..d91387e58 100644
--- a/upload/includes/online_userlist.php
+++ b/upload/includes/online_userlist.php
@@ -27,7 +27,7 @@ $online = $online_short = array('userlist' => '');
$sql = "
SELECT
- u.username, u.user_id, u.user_allow_viewonline, u.user_level,
+ u.username, u.user_id, u.user_opt, u.user_level,
u.ignore_srv_load,
s.session_logged_in, s.session_ip, (s.session_time - s.session_start) AS ses_len, COUNT(s.session_id) AS sessions, COUNT(DISTINCT s.session_ip) AS ips
FROM ". BB_SESSIONS ." s, ". BB_USERS ." u
diff --git a/upload/includes/page_header.php b/upload/includes/page_header.php
index 622a5efb4..688c2342a 100644
--- a/upload/includes/page_header.php
+++ b/upload/includes/page_header.php
@@ -206,7 +206,7 @@ $template->assign_vars(array(
'LOGGED_IN' => $logged_in,
'SESSION_USER_ID' => $userdata['user_id'],
'THIS_USERNAME' => $userdata['username'],
- 'THIS_AVATAR' => get_avatar($userdata['user_avatar'], $userdata['user_avatar_type'], $userdata['user_allowavatar']),
+ 'THIS_AVATAR' => get_avatar($userdata['user_avatar'], $userdata['user_avatar_type'], !bf($userdata['user_opt'], 'user_opt', 'allowavatar')),
'SHOW_LOGIN_LINK' => !defined('IN_LOGIN'),
'AUTOLOGIN_DISABLED' => !$bb_cfg['allow_autologin'],
'S_LOGIN_ACTION' => BB_ROOT ."login.php",
diff --git a/upload/includes/ucp/usercp_register.php b/upload/includes/ucp/usercp_register.php
index dbe072ad4..fc6d3b5e4 100644
--- a/upload/includes/ucp/usercp_register.php
+++ b/upload/includes/ucp/usercp_register.php
@@ -43,7 +43,7 @@ switch ($mode)
// Отключение регистрации
if ($bb_cfg['new_user_reg_disabled'] || ($bb_cfg['reg_email_activation'] && $bb_cfg['emailer_disabled']))
{
- bb_die('Регистрация новых пользователей временно отключена');
+ bb_die($lang['NEW_USER_REG_DISABLED']);
}
// Ограничение по времени
else if ($bb_cfg['new_user_reg_restricted'])
@@ -132,7 +132,7 @@ switch ($mode)
include(INC_DIR . 'ucp/usercp_avatar.php');
- if ( bf($pr_data['user_opt'], 'user_opt', 'allowavatar') && ( $bb_cfg['allow_avatar_upload'] || $bb_cfg['allow_avatar_local'] || $bb_cfg['allow_avatar_remote'] ) )
+ if ( !bf($pr_data['user_opt'], 'user_opt', 'allowavatar') && ( $bb_cfg['allow_avatar_upload'] || $bb_cfg['allow_avatar_local'] || $bb_cfg['allow_avatar_remote'] ) )
{
$template->assign_block_vars('switch_avatar_block', array() );
@@ -322,6 +322,9 @@ foreach ($profile_fields as $field => $can_edit)
$user_opt = $pr_data['user_opt'];
$update_user_opt = array(
+ 'viewemail' => true,
+ 'allow_viewonline' => true,
+ 'notify' => true,
'notify_pm' => true,
'hide_porn_forums' => true,
);
@@ -415,15 +418,11 @@ foreach ($profile_fields as $field => $can_edit)
{
if (mb_strlen($sig) > $bb_cfg['max_sig_chars'])
{
- $errors[] = 'Слишком длинная подпись';
- }
- else if (preg_match('#speedtest|vkontakte|danasoft#i', $sig))
- {
- $errors[] = 'Подпись нарушает правила';
+ $errors[] = $lang['SIGNATURE_TOO_LONG'];
}
else if (preg_match('#<(a|b|i|u|table|tr|td|img) #i', $sig) || preg_match('#(href|src|target|title)=#i', $sig))
{
- $errors[] = 'Подпись может содержать только BBCode';
+ $errors[] = $lang['SIGNATURE_ERROR_HTML'];
}
else if ($sig != $pr_data['user_sig'])
{
@@ -620,8 +619,8 @@ foreach ($profile_fields as $field => $can_edit)
}
$tp_data['USER_AVATAR'] = get_avatar($user_avatar, $user_avatar_type) . $hidden_vars;
}
else
- {
$tp_data['USER_AVATAR'] = get_avatar($pr_data['user_avatar'], $pr_data['user_avatar_type']);
}
- if ($submit)
+ {
$tp_data['USER_AVATAR'] = get_avatar($pr_data['user_avatar'], $pr_data['user_avatar_type'], !bf($pr_data['user_opt'], 'user_opt', 'allowavatar'));
}
+ if ($submit && !bf($pr_data['user_opt'], 'user_opt', 'allowavatar'))
{
if ( $user_avatar != $pr_data['user_avatar'] || $user_avatar_type != $pr_data['user_avatar_type'])
{
@@ -739,6 +738,9 @@ $template->assign_vars(array(
'TIMEZONE_SELECT' => tz_select($user_timezone, 'user_timezone'),
'AVATAR_EXPLAIN' => sprintf($lang['AVATAR_EXPLAIN'], $bb_cfg['avatar_max_width'], $bb_cfg['avatar_max_height'], (round($bb_cfg['avatar_filesize'] / 1024))),
+ 'SIGNATURE_EXPLAIN' => sprintf($lang['SIGNATURE_EXPLAIN'], $bb_cfg['max_sig_chars']),
+
+ 'SIG_DISALLOWED' => bf($pr_data['user_opt'], 'user_opt', 'allow_sig'),
'PR_USER_ID' => $pr_data['user_id'],
'U_RESET_AUTOLOGIN' => "login.php?logout=1&reset_autologin=1&sid={$userdata['session_id']}",
diff --git a/upload/includes/ucp/usercp_viewprofile.php b/upload/includes/ucp/usercp_viewprofile.php
index 08a9bff91..e7ecfcd2d 100644
--- a/upload/includes/ucp/usercp_viewprofile.php
+++ b/upload/includes/ucp/usercp_viewprofile.php
@@ -153,7 +153,11 @@ $signature = ($bb_cfg['allow_sig'] && $profiledata['user_sig']) ? $profiledata['
if(bf($profiledata['user_opt'], 'user_opt', 'allow_sig'))
{
- $signature = 'Подпись удалена.';
+ if($profiledata['user_id'] == $userdata['user_id'])
+ {
$signature = $lang['SIGNATURE_DISABLE'];
+ }
+ else
+ {
$signature = '';
}
}
else if ($signature)
{
diff --git a/upload/language/lang_english/lang_countries.php b/upload/language/lang_english/lang_countries.php
deleted file mode 100644
index 25a2c3275..000000000
--- a/upload/language/lang_english/lang_countries.php
+++ /dev/null
@@ -1,250 +0,0 @@
-date() function.';
$lang['SIGNATURE'] = 'Signature';
$lang['SIGNATURE_EXPLAIN'] = 'This is a block of text that can be added to posts you make. There is a %d character limit';
+$lang['SIGNATURE_DISABLE'] = 'Signed off for violation of forum rules';
$lang['PUBLIC_VIEW_EMAIL'] = 'Always show my e-mail address';
+$lang['EMAIL_EXPLAIN'] = 'At this address you will be sent to complete the registration';
+
$lang['CURRENT_PASSWORD'] = 'Current password';
$lang['NEW_PASSWORD'] = 'New password';
$lang['CONFIRM_PASSWORD'] = 'Confirm password';
@@ -610,10 +613,12 @@ $lang['EMAIL_TAKEN'] = 'Sorry, but that e-mail address is already registered to
$lang['EMAIL_BANNED'] = 'Sorry, but %s address has been banned.';
$lang['EMAIL_INVALID'] = 'Sorry, but this e-mail address is invalid.';
$lang['SIGNATURE_TOO_LONG'] = 'Your signature is too long.';
+$lang['SIGNATURE_ERROR_HTML'] = 'The signature can contain only BBCode';
$lang['FIELDS_EMPTY'] = 'You must fill in the required fields.';
$lang['AVATAR_FILETYPE'] = 'The avatar filetype must be .jpg, .gif or .png';
$lang['AVATAR_FILESIZE'] = 'The avatar image file size must be less than %d KB'; // The avatar image file size must be less than 6 KB
$lang['AVATAR_IMAGESIZE'] = 'The avatar must be less than %d pixels wide and %d pixels high';
+$lang['AVATAR_DISABLE'] = 'You are not allowed to use an avatar.';
$lang['WELCOME_SUBJECT'] = 'Welcome to %s Forums'; // Welcome to my.com forums
$lang['NEW_ACCOUNT_SUBJECT'] = 'New user account';
@@ -1137,6 +1142,7 @@ $lang['BT_GEN_PASSKEY'] = 'Passkey';
$lang['BT_GEN_PASSKEY_URL'] = 'Generate or change Passkey';
$lang['BT_GEN_PASSKEY_EXPLAIN'] = 'Generate your personal id for torrent tracker';
$lang['BT_GEN_PASSKEY_EXPLAIN_2'] = "Warning! After generating new id you'll need to redownload all active torrent's!";
+$lang['BT_GEN_PASSKEY_NEW'] = 'Are you sure you want to create a new passkey?';
$lang['BT_GEN_PASSKEY_OK'] = 'New personal identifier generated';
$lang['BT_NO_SEARCHABLE_FORUMS'] = 'No searchable forums found';
diff --git a/upload/language/lang_russian/lang_countries.php b/upload/language/lang_russian/lang_countries.php
deleted file mode 100644
index 701cf878a..000000000
--- a/upload/language/lang_russian/lang_countries.php
+++ /dev/null
@@ -1,249 +0,0 @@
-date() языка PHP';
$lang['SIGNATURE'] = 'Подпись';
$lang['SIGNATURE_EXPLAIN'] = 'Это текст, который можно добавлять к размещаемым вами сообщениям. Длина его ограничена %d символами.';
+$lang['SIGNATURE_DISABLE'] = 'Подпись отключена за нарушение правил форума';
$lang['PUBLIC_VIEW_EMAIL'] = 'Всегда показывать мой адрес e-mail';
+$lang['EMAIL_EXPLAIN'] = 'На этот адрес вам будет отправлено письмо для завершения регистрации';
+
$lang['CURRENT_PASSWORD'] = 'Текущий пароль';
$lang['NEW_PASSWORD'] = 'Новый пароль';
$lang['CONFIRM_PASSWORD'] = 'Подтвердите пароль';
@@ -615,10 +618,12 @@ $lang['EMAIL_TAKEN'] = 'Извините, этот адрес e-mail уже за
$lang['EMAIL_BANNED'] = 'Извините, адрес %s находится в чёрном списке';
$lang['EMAIL_INVALID'] = 'Извините, этот адрес e-mail неправилен';
$lang['SIGNATURE_TOO_LONG'] = 'Слишком длинная подпись';
+$lang['SIGNATURE_ERROR_HTML'] = 'Подпись может содержать только BBCode';
$lang['FIELDS_EMPTY'] = 'Вы должны заполнить обязательные поля';
$lang['AVATAR_FILETYPE'] = 'Файл аватары должен быть .jpg, .gif или .png';
$lang['AVATAR_FILESIZE'] = 'Объём файла аватары должен быть не более %d кб';
$lang['AVATAR_IMAGESIZE'] = 'Аватара должна быть не больше %d пикселов в ширину и %d пикселов в высоту';
+$lang['AVATAR_DISABLE'] = 'Вам запрещено использовать аватару.';
$lang['WELCOME_SUBJECT'] = 'Добро пожаловать на форумы %s';
$lang['NEW_ACCOUNT_SUBJECT'] = 'Новый пользователь';
@@ -1143,6 +1148,7 @@ $lang['BT_GEN_PASSKEY'] = 'Passkey';
$lang['BT_GEN_PASSKEY_URL'] = 'Создать или изменить Passkey';
$lang['BT_GEN_PASSKEY_EXPLAIN'] = 'Сгенерировать ваш личный id, который будет добавляться в торрент-файлы во время скачивания и затем использоваться трекером в качестве вашего аутентификатора.';
$lang['BT_GEN_PASSKEY_EXPLAIN_2'] = 'Внимание! После изменения или создания нового id вам будет необходимо заново скачать все активные торренты!';
+$lang['BT_GEN_PASSKEY_NEW'] = 'Вы уверены, что хотите создать новый passkey?';
$lang['BT_GEN_PASSKEY_OK'] = 'Новый персональный идентификатор сгенеририван';
$lang['BT_NO_SEARCHABLE_FORUMS'] = 'Доступных для поиска форумов не найдено';
diff --git a/upload/posting.php b/upload/posting.php
index f34c0de15..049237ced 100644
--- a/upload/posting.php
+++ b/upload/posting.php
@@ -299,7 +299,7 @@ if ($submit || $refresh)
}
else
{
- if (!IS_GUEST && $mode != 'newtopic' && !$userdata['user_notify'])
+ if (!IS_GUEST && $mode != 'newtopic' && bf($userdata['user_opt'], 'user_opt', 'user_notify'))
{
$notify_user = (int) DB()->fetch_row("
SELECT topic_id
diff --git a/upload/privmsg.php b/upload/privmsg.php
index f1218ded1..3a280573f 100644
--- a/upload/privmsg.php
+++ b/upload/privmsg.php
@@ -970,7 +970,7 @@ else if ( $submit || $refresh || $mode != '' )
// DelUsrKeepPM
$to_username_sql = str_replace("\'", "''", $to_username);
- $sql = "SELECT user_id, user_notify_pm, user_email, user_lang, user_active
+ $sql = "SELECT user_id, user_opt, user_email, user_lang, user_active
FROM " . BB_USERS . "
WHERE username = '$to_username_sql'";
@@ -1123,7 +1123,7 @@ else if ( $submit || $refresh || $mode != '' )
message_die(GENERAL_ERROR, 'Could not update private message new/read status for user', '', __LINE__, __FILE__, $sql);
}
- if ( $to_userdata['user_notify_pm'] && !empty($to_userdata['user_email']) && $to_userdata['user_active'] && $bb_cfg['pm_notify_enabled'] )
+ if ( bf($to_userdata['user_opt'], 'user_opt', 'notify_pm') && !empty($to_userdata['user_email']) && $to_userdata['user_active'] && $bb_cfg['pm_notify_enabled'] )
{
$script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($bb_cfg['script_path']));
$script_name = ( $script_name != '' ) ? $script_name . '/privmsg.php' : 'privmsg.php';
diff --git a/upload/templates/admin/admin_users.tpl b/upload/templates/admin/admin_users.tpl
deleted file mode 100644
index bb4fb0d39..000000000
--- a/upload/templates/admin/admin_users.tpl
+++ /dev/null
@@ -1,357 +0,0 @@
-
-
-
-
-
{L_USER_EXPLAIN}
-{L_USER_EXPLAIN}
-{L_USER_EXPLAIN}
-{$bb_cfg['sitename']} - Условия регистрации | +{SITENAME} - {REGISTRATION} | ||
---|---|---|---|
diff --git a/upload/templates/default/usercp_register.tpl b/upload/templates/default/usercp_register.tpl
index 4727c862d..796000642 100644
--- a/upload/templates/default/usercp_register.tpl
+++ b/upload/templates/default/usercp_register.tpl
@@ -21,39 +21,39 @@ ajax.callback.user_register = function(data){
| |||
Регистрационная информация | +{L_REGISTRATION_INFO} | ||
Поля отмеченные * обязательны к заполнению | +{L_ITEMS_REQUIRED} | ||
Имя: * | +{L_USERNAME}: * | {USERNAME} | |
Адрес email: * На этот адрес вам будет отправлено письмо для завершения регистрации |
+ {L_EMAIL}: * {L_EMAIL_EXPLAIN} |
readonly="readonly" style="color: gray;" /> | |
Текущий пароль: * Вы должны указать ваш текущий пароль, если хотите изменить его или поменять свой e-mail |
- + | {L_CURRENT_PASSWORD}: * {L_CONFIRM_PASSWORD_EXPLAIN} |
+ |
Новый пароль: * Указывайте пароль только если вы хотите его поменятьПароль: * |
- максимум 20 символов | +{L_NEW_PASSWORD}: * {L_PASSWORD_IF_CHANGED}{L_PASSWORD}: * |
+ {L_PASSWORD_LONG} |
Подтвердите пароль: * Подтверждать пароль нужно в том случае, если вы изменили его выше |
- + | {L_CONFIRM_PASSWORD}: * {L_PASSWORD_CONFIRM_IF_CHANGED} |
+ |
Код подтверждения: | +{L_CONFIRM_CODE}: | {CAPTCHA_HTML} | |
Профиль | +{L_PROFILE_INFO} | ||
Пол: | +: | ||
Сайт: | +{L_WEBSITE}: | ||
Род занятий: | +{L_OCCUPATION}: | ||
Интересы: | +{L_INTERESTS}: | ||
Откуда: | +{L_LOCATION}: | ||
Часовой пояс: | +{L_TIMEZONE}: | {TIMEZONE_SELECT} | |
Личные настройки | +{L_PREFERENCES} | ||
Опция управления подписью отключена за нарушение правил форума | -|||
Подпись:максимум {$bb_cfg['max_sig_chars']} символов |
- - - - | -||
{L_SIGNATURE}:{SIGNATURE_EXPLAIN} |
+
+ {L_SIGNATURE_DISABLE} | + ++ + + | + +|
{L_PUBLIC_VIEW_EMAIL}: | ++ + + | +||
{L_HIDE_USER}: | ++ + + | +||
{L_ALWAYS_NOTIFY}:{L_ALWAYS_NOTIFY_EXPLAIN} |
+ + + + | +||
Уведомлять о новых личных сообщениях: | +{L_NOTIFY_ON_PRIVMSG}: | - - + + | |
{L_HIDE_PORN_FORUMS}: | - - + + | ||
-
-
-
+
|
|||
+ |
{SIGNATURE}
|