mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
r216
git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@216 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
e4e7fb0509
commit
258847f87e
9 changed files with 49 additions and 57 deletions
|
@ -14,7 +14,7 @@ switch($mode)
|
|||
|
||||
if (empty($username))
|
||||
{
|
||||
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'.$lang['CHOOSE_A_NAME'].'</span>';
|
||||
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'. $lang['CHOOSE_A_NAME'] .'</span>';
|
||||
}
|
||||
else if($err = validate_username($username))
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ switch($mode)
|
|||
|
||||
if (empty($email))
|
||||
{
|
||||
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'.$lang['CHOOSE_E_MAIL'].'</span>';
|
||||
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'. $lang['CHOOSE_E_MAIL'] .'</span>';
|
||||
}
|
||||
else if($err = validate_email($email))
|
||||
{
|
||||
|
@ -38,18 +38,29 @@ switch($mode)
|
|||
$pass_confirm = (string) $this->request['pass_confirm'];
|
||||
if (empty($pass) || empty($pass_confirm))
|
||||
{
|
||||
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'.$lang['CHOOSE_PASS'].'</span>';
|
||||
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'. $lang['CHOOSE_PASS'] .'</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($pass != $pass_confirm)
|
||||
if ($pass != $pass_confirm)
|
||||
{
|
||||
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'.$lang['CHOOSE_PASS_ERR'].'</span>';
|
||||
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'. $lang['CHOOSE_PASS_ERR'] .'</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = (IS_GUEST) ? $lang['CHOOSE_PASS_REG_OK'] : $lang['CHOOSE_PASS_OK'];
|
||||
$html = '<img src="./images/good.gif"> <span class="seedmed bold">'.$text.'</span>';
|
||||
if (mb_strlen($pass, 'UTF-8') > 20)
|
||||
{
|
||||
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'. sprintf($lang['CHOOSE_PASS_ERR_MAX'], 20) .'</span>';
|
||||
}
|
||||
elseif (mb_strlen($pass, 'UTF-8') < 5)
|
||||
{
|
||||
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'. sprintf($lang['CHOOSE_PASS_ERR_MIN'], 5) .'</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = (IS_GUEST) ? $lang['CHOOSE_PASS_REG_OK'] : $lang['CHOOSE_PASS_OK'];
|
||||
$html = '<img src="./images/good.gif"> <span class="seedmed bold">'. $text .'</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -57,7 +57,7 @@ $bb_cfg['css_ver'] = 1;
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.1 Beta';
|
||||
$bb_cfg['tp_release_state'] = 'R212';
|
||||
$bb_cfg['tp_release_state'] = 'R216';
|
||||
$bb_cfg['tp_release_date'] = '16-08-2011';
|
||||
|
||||
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
|
||||
|
|
|
@ -32,11 +32,12 @@ $data['speed'] = $row['speed'];
|
|||
// gender + birthday stat
|
||||
$sql = DB()->fetch_rowset("SELECT user_gender, user_id, username, user_birthday, user_level, user_rank FROM ". BB_USERS ." WHERE user_id NOT IN(". EXCLUDED_USERS_CSV .") ORDER BY user_level DESC, username");
|
||||
$birthday = array();
|
||||
$data['male'] = $data['female'] = $data['unselect'] = 0;
|
||||
foreach($sql as $row)
|
||||
{
|
||||
if($row['user_gender'] == 1) @$data['male']++;
|
||||
if($row['user_gender'] == 2) @$data['female']++;
|
||||
if(!$row['user_gender']) @$data['unselect']++;
|
||||
if($row['user_gender'] == 1) $data['male']++;
|
||||
if($row['user_gender'] == 2) $data['female']++;
|
||||
if(!$row['user_gender']) $data['unselect']++;
|
||||
if($row['user_birthday']) $birthday[] = array(
|
||||
'username' => $row['username'],
|
||||
'user_id' => $row['user_id'],
|
||||
|
|
|
@ -103,43 +103,3 @@ function validate_email ($email, $check_ban_and_taken = true)
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Does supplementary validation of optional profile fields. This expects common stuff like trim() and strip_tags()
|
||||
// to have already been run. Params are passed by-ref, so we can set them to the empty string if they fail.
|
||||
//
|
||||
function validate_optional_fields(&$icq, &$website, &$location, &$occupation, &$interests, &$sig)
|
||||
{
|
||||
$check_var_length = array('location', 'occupation', 'interests', 'sig');
|
||||
|
||||
for($i = 0; $i < count($check_var_length); $i++)
|
||||
{
|
||||
if (strlen($$check_var_length[$i]) < 2)
|
||||
{
|
||||
$$check_var_length[$i] = '';
|
||||
}
|
||||
}
|
||||
|
||||
// ICQ number has to be only numbers.
|
||||
if (!preg_match('/^[0-9]+$/', $icq))
|
||||
{
|
||||
$icq = '';
|
||||
}
|
||||
|
||||
// website has to start with http://, followed by something with length at least 3 that
|
||||
// contains at least one dot.
|
||||
if ($website != "")
|
||||
{
|
||||
if (!preg_match('#^http[s]?:\/\/#i', $website))
|
||||
{
|
||||
$website = 'http://' . $website;
|
||||
}
|
||||
|
||||
if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website))
|
||||
{
|
||||
$website = '';
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -240,11 +240,15 @@ foreach ($profile_fields as $field => $can_edit)
|
|||
// пароль для гостя и при смене пароля юзером
|
||||
if (!empty($new_pass))
|
||||
{
|
||||
if (strlen($new_pass) > 20)
|
||||
if (mb_strlen($new_pass, 'UTF-8') > 20)
|
||||
{
|
||||
$errors[] = $lang['CHOOSE_PASS_ERR_20'];
|
||||
$errors[] = sprintf($lang['CHOOSE_PASS_ERR_MAX'], 20);
|
||||
}
|
||||
else if ($new_pass != $cfm_pass)
|
||||
elseif (mb_strlen($new_pass, 'UTF-8') < 5)
|
||||
{
|
||||
$errors[] = sprintf($lang['CHOOSE_PASS_ERR_MIN'], 5);
|
||||
}
|
||||
elseif ($new_pass != $cfm_pass)
|
||||
{
|
||||
$errors[] = $lang['CHOOSE_PASS_ERR'];
|
||||
}
|
||||
|
@ -255,7 +259,7 @@ foreach ($profile_fields as $field => $can_edit)
|
|||
{
|
||||
if (empty($new_pass))
|
||||
{
|
||||
$errors[] = $lang['CHOOSE_PASSWORD'];
|
||||
$errors[] = $lang['CHOOSE_PASS'];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -204,6 +204,7 @@ $template->assign_vars(array(
|
|||
'TOTAL_TOPICS' => sprintf($lang['POSTED_TOPICS_TOTAL'], $stats['topiccount']),
|
||||
'TOTAL_POSTS' => sprintf($lang['POSTED_ARTICLES_TOTAL'], $stats['postcount']),
|
||||
'TOTAL_USERS' => sprintf($lang['REGISTERED_USERS_TOTAL'], $stats['usercount']),
|
||||
'TOTAL_GENDER' => sprintf($lang['USERS_TOTAL_GENDER'], $stats['male'], $stats['female'], $stats['unselect']),
|
||||
'NEWEST_USER' => sprintf($lang['NEWEST_USER'], '<a href="'. PROFILE_URL . $stats['newestuser']['user_id'] .'">', $stats['newestuser']['username'], '</a>'),
|
||||
|
||||
// Tracker stats
|
||||
|
|
|
@ -145,6 +145,7 @@ $lang['POSTED_ARTICLES_ZERO_TOTAL'] = 'Our users have posted a total of <b>0</b>
|
|||
$lang['POSTED_ARTICLES_TOTAL'] = 'Our users have posted a total of <b>%s</b> articles'; // Number of posts
|
||||
$lang['REGISTERED_USERS_ZERO_TOTAL'] = 'We have <b>0</b> registered users'; // # registered users
|
||||
$lang['REGISTERED_USERS_TOTAL'] = 'We have <b>%s</b> registered users'; // # registered users
|
||||
$lang['USERS_TOTAL_GENDER'] = 'Boys: <b>%d</b>, girls: <b>%d</b>, others: <b>%d</b>';
|
||||
$lang['NEWEST_USER'] = 'The newest registered user is <b>%s%s%s</b>'; // a href, username, /a
|
||||
|
||||
// Tracker stats
|
||||
|
@ -576,11 +577,17 @@ $lang['GENDER_SELECT'] = array(
|
|||
1 => 'Male',
|
||||
2 => 'Female'
|
||||
);
|
||||
|
||||
$lang['BIRTHDAY'] = 'Birthday';
|
||||
$lang['WRONG_BIRTHDAY_FORMAT'] = 'The birthday format was entered incorrectly.';
|
||||
$lang['AGE'] = 'Age';
|
||||
$lang['BIRTHDAY_TO_HIGH'] = 'Sorry, this site, does not accept user older than %d years old';
|
||||
$lang['BIRTHDAY_TO_LOW'] = 'Sorry, this site, does not accept user yonger than %d years old';
|
||||
$lang['BIRTHDAY_TODAY'] = 'Users with a birthday today:';
|
||||
$lang['BIRTHDAY_WEEK'] = 'Users with a birthday within the next %d days:';
|
||||
$lang['NOBIRTHDAY_WEEK'] = 'No users are having a birthday in the upcoming %d days'; // %d is substitude with the number of days
|
||||
$lang['NOBIRTHDAY_TODAY'] = 'No users have a birthday today';
|
||||
|
||||
$lang['NO_THEMES'] = 'No Themes In database';
|
||||
$lang['TIMEZONE'] = 'Timezone';
|
||||
$lang['DATE_FORMAT_PROFILE'] = 'Date format';
|
||||
|
@ -1580,8 +1587,11 @@ $lang['CHOOSE_A_NAME'] = 'You should choose a name';
|
|||
$lang['CHOOSE_E_MAIL'] = 'You must specify the e-mail';
|
||||
$lang['CHOOSE_PASS'] = 'Field for the password must not be empty!';
|
||||
$lang['CHOOSE_PASS_ERR'] = 'Entered passwords do not match';
|
||||
$lang['CHOOSE_PASS_ERR_MIN'] = 'Your password must be at least %d characters';
|
||||
$lang['CHOOSE_PASS_ERR_MAX'] = 'Your password must be no longer than $d characters';
|
||||
$lang['CHOOSE_PASS_OK'] = 'Passwords match';
|
||||
$lang['CHOOSE_PASS_REG_OK'] = 'Passwords match, you can proceed with the registration';
|
||||
$lang['CHOOSE_PASS_FAILED'] = 'To change the password, you must correctly specify the current password';
|
||||
$lang['EMAILER_DISABLED'] = 'Sorry, this feature is temporarily not working';
|
||||
$lang['TERMS_ON'] = 'I agree with these terms and conditions';
|
||||
$lang['TERMS_OFF'] = 'I do not agree to these terms';
|
||||
|
|
|
@ -149,6 +149,7 @@ $lang['POSTED_ARTICLES_ZERO_TOTAL'] = 'Наши пользователи не о
|
|||
$lang['POSTED_ARTICLES_TOTAL'] = 'Наши пользователи оставили сообщений: <b>%s</b>'; // Number of posts
|
||||
$lang['REGISTERED_USERS_ZERO_TOTAL'] = 'У нас нет зарегистрированных пользователей'; // # registered users
|
||||
$lang['REGISTERED_USERS_TOTAL'] = 'Всего зарегистрированных пользователей: <b>%s</b>'; // # registered users
|
||||
$lang['USERS_TOTAL_GENDER'] = 'Парней: <b>%d</b>, девушек: <b>%d</b>, ещё не определились: <b>%d</b>';
|
||||
$lang['NEWEST_USER'] = 'Последний зарегистрированный пользователь: <b>%s%s%s</b>'; // username
|
||||
|
||||
// Tracker stats
|
||||
|
@ -1590,10 +1591,10 @@ $lang['NEW_THREADS'] = 'Создавать темы';
|
|||
// Регистрация
|
||||
$lang['CHOOSE_A_NAME'] = 'Вы должны выбрать имя';
|
||||
$lang['CHOOSE_E_MAIL'] = 'Вы должны указать e-mail';
|
||||
$lang['CHOOSE_PASSWORD'] = 'Вы должны указать пароль';
|
||||
$lang['CHOOSE_PASS'] = 'Поля для ввода пароля не должны быть пустыми!';
|
||||
$lang['CHOOSE_PASS_ERR'] = 'Введённые пароли не совпадают';
|
||||
$lang['CHOOSE_PASS_ERR_20'] = 'Пароль должен быть не длиннее 20 символов';
|
||||
$lang['CHOOSE_PASS_ERR_MIN'] = 'Пароль должен быть не короче %d символов';
|
||||
$lang['CHOOSE_PASS_ERR_MAX'] = 'Пароль должен быть не длиннее %d символов';
|
||||
$lang['CHOOSE_PASS_OK'] = 'Пароли совпадают';
|
||||
$lang['CHOOSE_PASS_REG_OK'] = 'Пароли совпадают, можете продолжить регистрацию';
|
||||
$lang['CHOOSE_PASS_FAILED'] = 'Для изменения пароля вы должны правильно указать текущий пароль';
|
||||
|
|
|
@ -172,6 +172,7 @@
|
|||
<p>{TOTAL_TOPICS}</p>
|
||||
<p>{TOTAL_POSTS}</p>
|
||||
<p>{TOTAL_USERS}</p>
|
||||
<p>{TOTAL_GENDER}</p>
|
||||
<p>{NEWEST_USER}</p>
|
||||
|
||||
<div class="hr1" style="margin: 5px 0 4px;"></div>
|
||||
|
@ -181,6 +182,9 @@
|
|||
<p>{SPEED_STAT}</p>
|
||||
|
||||
<div class="hr1" style="margin: 5px 0 4px;"></div>
|
||||
<p>{WHOSBIRTHDAY_TODAY}</p>
|
||||
<p>{WHOSBIRTHDAY_WEEK}</p>
|
||||
<div class="hr1" style="margin: 5px 0 4px;"></div>
|
||||
|
||||
<p>{TOTAL_USERS_ONLINE}<!-- IF SHOW_ADMIN_OPTIONS --> {USERS_ONLINE_COUNTS}<!-- ENDIF --></p>
|
||||
<p>{RECORD_USERS}</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue