Фикс критичного бага с обновлением времени сообщений из r506 (спасибо PheRum); фикс ненулевого числа сообщений у гостя в пустой базе; фикс вывода блока с новостями трекера, в случае если они отключены (спасибо greencell); удаление пустых строк в конце всех .php-файлов; пара мелочей на будущие релизы. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@561 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
glix08@gmail.com 2014-01-18 21:23:13 +00:00
commit 8bec4dc91f
83 changed files with 441 additions and 455 deletions

View file

@ -1434,7 +1434,7 @@ CREATE TABLE IF NOT EXISTS `bb_users` (
-- Дамп данных таблицы `bb_users`
--
INSERT INTO `bb_users` VALUES (-1, 0, 'Guest', 'd41d8cd98f00b204e9800998ecf8427e', 0, 0, '0', 0, '0', 0, 5, 0.00, '', 0, 0, 0, 0, 0, '', 0, 0, 0, 0, '', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');
INSERT INTO `bb_users` VALUES (-1, 0, 'Guest', 'd41d8cd98f00b204e9800998ecf8427e', 0, 0, '0', 0, '0', 0, 0, 0.00, '', 0, 0, 0, 0, 0, '', 0, 0, 0, 0, '', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');
INSERT INTO `bb_users` VALUES (2, 1, 'admin', 'c3284d0f94606de1fd2af172aba15bf3', 0, 0, '0', 0, '0', 1, 1, 4.00, '', 0, 0, 0, 304, 1, '', 1, 0, 0, 0, 'admin@admin.com', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');
INSERT INTO `bb_users` VALUES (-746, 0, 'bot', 'd41d8cd98f00b204e9800998ecf8427e', 0, 0, '0', 0, '0', 0, 0, 0.00, '', 0, 0, 0, 144, 0, 'bot.gif', 1, 0, 0, 0, 'bot@bot.bot', '', '', '', '', '', '', '', '', '', '', 0, 0, 'default');

View file

@ -96,4 +96,4 @@ $template->assign_vars(array(
'S_FORM_ACTION' => "admin_disallow.php",
));
print_page('admin_disallow.tpl', 'admin');
print_page('admin_disallow.tpl', 'admin');

View file

@ -1243,4 +1243,4 @@ function change_sf_cat ($parent_id, $new_cat_id, $order_shear)
forum_order = forum_order + $order_shear
WHERE forum_parent = $parent_id
");
}
}

View file

@ -183,4 +183,4 @@ else
));
}
print_page('admin_groups.tpl', 'admin');
print_page('admin_groups.tpl', 'admin');

View file

@ -157,4 +157,4 @@ $template->assign_vars(array(
'S_GROUP_SELECT' => $select_list)
);
print_page('admin_mass_email.tpl', 'admin');
print_page('admin_mass_email.tpl', 'admin');

View file

@ -265,4 +265,4 @@ else
}
}
print_page('admin_ranks.tpl', 'admin');
print_page('admin_ranks.tpl', 'admin');

View file

@ -451,4 +451,4 @@ else
}
}
print_page('admin_smilies.tpl', 'admin');
print_page('admin_smilies.tpl', 'admin');

View file

@ -26,53 +26,53 @@ if ($mode == 'templates')
));
}
$template->assign_vars(array(
$template->assign_vars(array(
'TPL_LIST' => true,
'S_ACTION' => "admin_topic_templates.php?mode=delete",
));
}
else if ($mode == 'add' || $mode == 'edit')
{
$template->assign_vars(array(
$template->assign_vars(array(
'TPL' => true,
));
if($mode == 'edit')
{
$tpl_id = (int) request_var('tpl', '');
if(!$tpl_id) bb_die('');
if ($mode == 'edit')
{
$tpl_id = (int) request_var('tpl', '');
if (!$tpl_id) bb_die('');
$row = DB()->fetch_row("SELECT * FROM ". BB_TOPIC_TPL_OLD ." WHERE tpl_id = $tpl_id");
if(!$row) bb_die('');
$row = DB()->fetch_row("SELECT * FROM ". BB_TOPIC_TPL_OLD ." WHERE tpl_id = $tpl_id");
if (!$row) bb_die('');
$template->assign_vars(array(
$template->assign_vars(array(
'S_ACTION' => "admin_topic_templates.php?mode=edit&tpl=$tpl_id",
));
}
else
{
$template->assign_vars(array(
}
else
{
$template->assign_vars(array(
'S_ACTION' => "admin_topic_templates.php?mode=add",
));
}
}
$tpl_name = isset($_POST['tpl_name']) ? $_POST['tpl_name'] : @$row['tpl_name'];
$tpl_script = isset($_POST['tpl_script']) ? $_POST['tpl_script'] : @$row['tpl_script'];
$tpl_template = isset($_POST['tpl_template']) ? $_POST['tpl_template'] : @$row['tpl_template'];
$tpl_desc = isset($_POST['tpl_desc']) ? $_POST['tpl_desc'] : @$row['tpl_desc'];
$tpl_name = isset($_POST['tpl_name']) ? $_POST['tpl_name'] : @$row['tpl_name'];
$tpl_script = isset($_POST['tpl_script']) ? $_POST['tpl_script'] : @$row['tpl_script'];
$tpl_template = isset($_POST['tpl_template']) ? $_POST['tpl_template'] : @$row['tpl_template'];
$tpl_desc = isset($_POST['tpl_desc']) ? $_POST['tpl_desc'] : @$row['tpl_desc'];
$template->assign_vars(array(
$template->assign_vars(array(
'NAME' => $tpl_name,
'SCRIPT' => $tpl_script,
'TEMP' => $tpl_template,
'DESC' => $tpl_desc,
));
if(isset($_POST['submit']))
{
if($mode == 'edit')
{
DB()->query("UPDATE ". BB_TOPIC_TPL_OLD ." SET
if (isset($_POST['submit']))
{
if ($mode == 'edit')
{
DB()->query("UPDATE ". BB_TOPIC_TPL_OLD ." SET
tpl_name = '". DB()->escape($tpl_name) ."',
tpl_script = '". DB()->escape($tpl_script) ."',
tpl_template = '". DB()->escape($tpl_template) ."',
@ -80,27 +80,27 @@ else if ($mode == 'add' || $mode == 'edit')
WHERE tpl_id = $tpl_id
");
$message = $lang['CHANGED'];
}
else
{
DB()->query("INSERT INTO ". BB_TOPIC_TPL_OLD ." (tpl_name, tpl_script, tpl_template, tpl_desc)
}
else
{
DB()->query("INSERT INTO ". BB_TOPIC_TPL_OLD ." (tpl_name, tpl_script, tpl_template, tpl_desc)
VALUES ('". DB()->escape($tpl_name) ."', '". DB()->escape($tpl_script) ."', '". DB()->escape($tpl_template) ."', '". DB()->escape($tpl_desc) ."')");
$message = $lang['ADEDD'];
}
}
bb_die($message);
bb_die($message);
}
}
else if ($mode == 'delete')
elseif ($mode == 'delete')
{
$tpl_ids = isset($_POST['tpl_id']) ? $_POST['tpl_id'] : bb_die($lang['NOT_CHOOSE']);
$tpl_ids = isset($_POST['tpl_id']) ? $_POST['tpl_id'] : bb_die($lang['NOT_CHOOSE']);
foreach ($tpl_ids as $tpl_id)
foreach ($tpl_ids as $tpl_id)
{
$hidden_fields['tpl_id'][] = $tpl_id;
}
if (isset($_POST['confirm']))
if (isset($_POST['confirm']))
{
DB()->query("DELETE FROM ". BB_TOPIC_TPL_OLD ." WHERE tpl_id IN(". join(',', $tpl_ids) .")");
bb_die($lang['REMOVED']);
@ -193,4 +193,5 @@ else
'S_ACTION' => "admin_topic_templates.php",
));
}
print_page('admin_topic_templates.tpl', 'admin');
print_page('admin_topic_templates.tpl', 'admin');

View file

@ -473,4 +473,4 @@ $template->assign_vars(array(
'U_ALL_FORUMS' => !empty($base_url) ? "$base_url&c=all" : '',
));
print_page('admin_ug_auth.tpl', 'admin');
print_page('admin_ug_auth.tpl', 'admin');

View file

@ -166,4 +166,4 @@ else
}
}
print_page('admin_words.tpl', 'admin');
print_page('admin_words.tpl', 'admin');

View file

@ -335,4 +335,4 @@ function inarray($needle, $haystack)
}
}
return false;
}
}

View file

@ -15,12 +15,14 @@ if (IS_GUEST)
{
redirect("login.php?redirect=admin/index.php");
}
if (!IS_ADMIN)
{
message_die(GENERAL_MESSAGE, $lang['NOT_ADMIN']);
}
if (!$userdata['session_admin'])
{
$redirect = url_arg($_SERVER['REQUEST_URI'], 'admin', 1);
redirect("login.php?redirect=$redirect");
}
$redirect = url_arg($_SERVER['REQUEST_URI'], 'admin', 1);
redirect("login.php?redirect=$redirect");
}

View file

@ -245,4 +245,5 @@ $template->assign_vars(array(
);
$template->pparse('body');
xs_exit();

View file

@ -112,4 +112,5 @@ $template->assign_vars(array(
$template->set_filenames(array('body' => XS_TPL_PATH . 'config.tpl'));
$template->pparse('body');
xs_exit();

View file

@ -69,4 +69,5 @@ $template->assign_vars(array(
));
$template->pparse('body');
xs_exit();

View file

@ -35,4 +35,5 @@ $template->assign_vars(array(
$template->set_filenames(array('body' => XS_TPL_PATH . 'index.tpl'));
$template->pparse('body');
xs_exit();

View file

@ -9,9 +9,9 @@ if (!isset($this->request['attach_id'])) $this->ajax_die($lang['EMPTY_ATTACH_ID'
$attach_id = (int) $this->request['attach_id'];
$mode = (string) $this->request['mode'];
if($bb_cfg['tor_comment'])
if ($bb_cfg['tor_comment'])
{
$comment = (string) $this->request['comment'];
$comment = (string) $this->request['comment'];
}
$tor = DB()->fetch_row("
@ -23,24 +23,25 @@ $tor = DB()->fetch_row("
WHERE tor.attach_id = $attach_id
LIMIT 1
");
if (!$tor) $this->ajax_die($lang['TORRENT_FAILED']);
switch($mode)
{
{
case 'status':
$new_status = (int) $this->request['status'];
$new_status = (int) $this->request['status'];
// Валидность статуса
if (!isset($lang['TOR_STATUS_NAME'][$new_status])) $this->ajax_die($lang['TOR_STATUS_FAILED']);
if (!isset($this->request['status'])) $this->ajax_die($lang['TOR_DONT_CHANGE']);
if(!IS_AM) $this->ajax_die($lang['NOT_MODERATOR']);
if (!IS_AM) $this->ajax_die($lang['NOT_MODERATOR']);
// Тот же статус
if ($tor['tor_status'] == $new_status)
{
$this->ajax_die($lang['TOR_STATUS_DUB']);
}
// Запрет на изменение/присвоение CH-статуса модератором
if ($new_status == TOR_CLOSED_CPHOLD && !IS_ADMIN)
{
@ -71,36 +72,35 @@ switch($mode)
}
change_tor_status($attach_id, $new_status);
$this->response['status'] = $bb_cfg['tor_icons'][$new_status] .' <b> '. $lang['TOR_STATUS_NAME'][$new_status]. '</b> &middot; '. profile_url($userdata) .' &middot; <i>'. delta_time(TIMENOW) . $lang['BACK']. '</i>';
if($bb_cfg['tor_comment'] && (($comment && $comment != $lang['COMMENT']) || in_array($new_status, $bb_cfg['tor_reply'])))
{
if($tor['poster_id'] > 0)
{
$subject = sprintf($lang['TOR_MOD_TITLE'], $tor['topic_title']);
$message = sprintf($lang['TOR_MOD_MSG'], get_username($tor['poster_id']), make_url(TOPIC_URL . $tor['topic_id']), $bb_cfg['tor_icons'][$new_status] .' '.$lang['TOR_STATUS_NAME'][$new_status]);
if($comment && $comment != $lang['COMMENT']) $message .= "\n\n[b]". $lang['COMMENT'] .'[/b]: '. $comment;
send_pm($tor['poster_id'], $subject, $message, $userdata['user_id']);
cache_rm_user_sessions($tor['poster_id']);
$this->response['status'] = $bb_cfg['tor_icons'][$new_status] .' <b> '. $lang['TOR_STATUS_NAME'][$new_status]. '</b> &middot; '. profile_url($userdata) .' &middot; <i>'. delta_time(TIMENOW) . $lang['BACK']. '</i>';
if ($bb_cfg['tor_comment'] && (($comment && $comment != $lang['COMMENT']) || in_array($new_status, $bb_cfg['tor_reply'])))
{
if ($tor['poster_id'] > 0)
{
$subject = sprintf($lang['TOR_MOD_TITLE'], $tor['topic_title']);
$message = sprintf($lang['TOR_MOD_MSG'], get_username($tor['poster_id']), make_url(TOPIC_URL . $tor['topic_id']), $bb_cfg['tor_icons'][$new_status] .' '.$lang['TOR_STATUS_NAME'][$new_status]);
if ($comment && $comment != $lang['COMMENT']) $message .= "\n\n[b]". $lang['COMMENT'] .'[/b]: '. $comment;
send_pm($tor['poster_id'], $subject, $message, $userdata['user_id']);
cache_rm_user_sessions($tor['poster_id']);
}
}
}
break;
case 'status_reply':
if(!$bb_cfg['tor_comment']) $this->ajax_die($lang['MODULE_OFF']);
case 'status_reply':
if (!$bb_cfg['tor_comment']) $this->ajax_die($lang['MODULE_OFF']);
$subject = sprintf($lang['TOR_AUTH_TITLE'], $tor['topic_title']);
$message = sprintf($lang['TOR_AUTH_MSG'], get_username($tor['checked_user_id']), make_url(TOPIC_URL . $tor['topic_id']), $tor['topic_title']);
$message = sprintf($lang['TOR_AUTH_MSG'], get_username($tor['checked_user_id']), make_url(TOPIC_URL . $tor['topic_id']), $tor['topic_title']);
if($comment && $comment != $lang['COMMENT']) $message .= "\n\n[b]". $lang['COMMENT'] .'[/b]: '. $comment;
send_pm($tor['checked_user_id'], $subject, $message, $userdata['user_id']);
send_pm($tor['checked_user_id'], $subject, $message, $userdata['user_id']);
cache_rm_user_sessions($tor['checked_user_id']);
break;
}
$this->response['attach_id'] = $attach_id;
$this->response['attach_id'] = $attach_id;

View file

@ -12,16 +12,16 @@ switch($mode)
case 'birthday_week':
$stats = $datastore->get('stats');
$datastore->enqueue(array(
'stats',
));
'stats',
));
if ($stats['birthday_week_list'])
{
foreach($stats['birthday_week_list'] as $week)
{
$html[] = profile_url($week) .' <span class="small">('. birthday_age($week['age']) .')</span>';
}
$html = sprintf($lang['BIRTHDAY_WEEK'], $bb_cfg['birthday_check_day'], join(', ', $html));
$html = sprintf($lang['BIRTHDAY_WEEK'], $bb_cfg['birthday_check_day'], join(', ', $html));
}
else $html = sprintf($lang['NOBIRTHDAY_WEEK'], $bb_cfg['birthday_check_day']);
break;
@ -29,8 +29,8 @@ switch($mode)
case 'birthday_today':
$stats = $datastore->get('stats');
$datastore->enqueue(array(
'stats',
));
'stats',
));
if ($stats['birthday_today_list'])
{
@ -42,41 +42,40 @@ switch($mode)
}
else $html = $lang['NOBIRTHDAY_TODAY'];
break;
case 'get_forum_mods':
$forum_id = (int) $this->request['forum_id'];
$forum_id = (int) $this->request['forum_id'];
$datastore->enqueue(array(
'moderators',
));
'moderators',
));
$moderators = array();
$mod = $datastore->get('moderators');
if (isset($mod['mod_users'][$forum_id]))
{
foreach ($mod['mod_users'][$forum_id] as $user_id)
{
$moderators[] = '<a href="'. PROFILE_URL . $user_id .'">'. $mod['name_users'][$user_id] .'</a>';
}
}
if (isset($mod['mod_groups'][$forum_id]))
{
foreach ($mod['mod_groups'][$forum_id] as $group_id)
{
$moderators[] = '<a href="'. "groupcp.php?". POST_GROUPS_URL ."=". $group_id .'">'. $mod['name_groups'][$group_id] .'</a>';
}
}
$html = ':&nbsp;';
$html .= ($moderators) ? join(', ', $moderators) : $lang['NONE'];
unset($moderators, $mod);
$datastore->rm('moderators');
if (isset($mod['mod_users'][$forum_id]))
{
foreach ($mod['mod_users'][$forum_id] as $user_id)
{
$moderators[] = '<a href="'. PROFILE_URL . $user_id .'">'. $mod['name_users'][$user_id] .'</a>';
}
}
if (isset($mod['mod_groups'][$forum_id]))
{
foreach ($mod['mod_groups'][$forum_id] as $group_id)
{
$moderators[] = '<a href="'. "groupcp.php?". POST_GROUPS_URL ."=". $group_id .'">'. $mod['name_groups'][$group_id] .'</a>';
}
}
$html = ':&nbsp;';
$html .= ($moderators) ? join(', ', $moderators) : $lang['NONE'];
unset($moderators, $mod);
$datastore->rm('moderators');
break;
case 'change_tz':
case 'change_tz':
$tz = (int) $this->request['tz'];
if ($tz < -12) $tz = -12;
if ($tz > 13) $tz = 13;
@ -88,18 +87,18 @@ switch($mode)
cache_rm_user_sessions ($userdata['user_id']);
}
break;
case 'get_traf_stats':
$user_id = (int) $this->request['user_id'];
$btu = get_bt_userdata($user_id);
$profiledata = get_userdata($user_id);
$speed_up = ($btu['speed_up']) ? humn_size($btu['speed_up']).'/s' : '0 KB/s';
$speed_down = ($btu['speed_down']) ? humn_size($btu['speed_down']).'/s' : '0 KB/s';
$user_ratio = ($btu['u_down_total'] > MIN_DL_FOR_RATIO) ? '<b class="gen">'. get_bt_ratio($btu) .'</b>' : $lang['IT_WILL_BE_DOWN'] .' <b>'. humn_size(MIN_DL_FOR_RATIO) .'</b>';
$html = '
<tr class="row3">
<tr class="row3">
<th style="padding: 0;" class="stats-ext"></th>
<th>'. $lang['DOWNLOADED'] .'</th>
<th>'. $lang['UPLOADED'] .'</th>
@ -113,7 +112,7 @@ switch($mode)
<td id="u_up_total"><span class="editable bold seedmed">' .humn_size($btu['u_up_total']) .'</span></td>
<td id="u_up_release"><span class="editable bold seedmed">'. humn_size($btu['u_up_release']) .'</span></td>
<td id="u_up_bonus"><span class="editable bold seedmed">'. humn_size($btu['u_up_bonus']) .'</span></td>';
$html .= ($bb_cfg['seed_bonus_enabled']) ? '<td id="user_points"><span class="editable bold points">'. $profiledata['user_points'] .'</b></td>' : '';
$html .= ($bb_cfg['seed_bonus_enabled']) ? '<td id="user_points"><span class="editable bold points">'. $profiledata['user_points'] .'</b></td>' : '';
$html .= '</tr>
<tr class="row5">
<td colspan="1">'. $lang['MAX_SPEED'] .'</td>
@ -123,11 +122,11 @@ switch($mode)
$html .= '</tr>';
$this->response['user_ratio'] = '
<th><a href="'. $bb_cfg['ratio_url_help'] .'" class="bold">'. $lang['USER_RATIO'] .'</a>:</th>
<th><a href="'. $bb_cfg['ratio_url_help'] .'" class="bold">'. $lang['USER_RATIO'] .'</a>:</th>
<td>'. $user_ratio .'</td>
';
break;
}
$this->response['html'] = $html;
$this->response['mode'] = $mode;
$this->response['html'] = $html;
$this->response['mode'] = $mode;

View file

@ -7,23 +7,23 @@ global $userdata, $lang, $bb_cfg;
$mode = (string) $this->request['mode'];
$user_id = $this->request['user_id'];
switch($mode)
switch ($mode)
{
case 'clear_cache':
$gc_cache = array(
'tr_cache',
'bb_cache',
'session_cache',
'bb_login_err',
'bb_cap_sid',
);
'tr_cache',
'bb_cache',
'session_cache',
'bb_login_err',
'bb_cap_sid',
);
foreach ($gc_cache as $cache_name)
{
CACHE($cache_name)->rm();
}
foreach ($gc_cache as $cache_name)
{
CACHE($cache_name)->rm();
}
$this->response['cache_html'] = '<span class="seed bold">'. $lang['ALL_CACHE_CLEARED'] .'</span>';
$this->response['cache_html'] = '<span class="seed bold">'. $lang['ALL_CACHE_CLEARED'] .'</span>';
break;
case 'clear_datastore':
@ -36,71 +36,72 @@ switch($mode)
case 'delete_profile':
if ($userdata['user_id'] == $user_id) $this->ajax_die($lang['USER_DELETE_ME']);
if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['USER_DELETE_CONFIRM']);
if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['USER_DELETE_CONFIRM']);
if ($user_id != BOT_UID)
{
delete_user_sessions($user_id);
{
delete_user_sessions($user_id);
user_delete($user_id);
$this->response['info'] = $lang['USER_DELETED'];
}
else $this->ajax_die($lang['USER_DELETE_CSV']);
break;
$this->response['info'] = $lang['USER_DELETED'];
}
else $this->ajax_die($lang['USER_DELETE_CSV']);
break;
case 'delete_topics':
if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']);
if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DELETE_USER_ALL_POSTS_CONFIRM']);
case 'delete_topics':
if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']);
if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DELETE_USER_ALL_POSTS_CONFIRM']);
if (IS_ADMIN)
{
$user_topics = DB()->fetch_rowset("SELECT topic_id FROM ". BB_TOPICS ." WHERE topic_poster = $user_id", 'topic_id');
{
$user_topics = DB()->fetch_rowset("SELECT topic_id FROM ". BB_TOPICS ." WHERE topic_poster = $user_id", 'topic_id');
$deleted_topics = topic_delete($user_topics);
$deleted_posts = post_delete('user', $user_id);
$this->response['info'] = $lang['USER_DELETED_POSTS'];
}
else $this->ajax_die($lang['NOT_ADMIN']);
break;
$this->response['info'] = $lang['USER_DELETED_POSTS'];
}
else $this->ajax_die($lang['NOT_ADMIN']);
break;
case 'delete_message':
if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']);
if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_CONFIRM']);
case 'delete_message':
if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']);
if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DELETE_USER_POSTS_CONFIRM']);
if (IS_ADMIN)
{
post_delete('user', $user_id);
{
post_delete('user', $user_id);
$this->response['info'] = $lang['USER_DELETED_POSTS'];
}
else $this->ajax_die($lang['NOT_ADMIN']);
break;
$this->response['info'] = $lang['USER_DELETED_POSTS'];
}
else $this->ajax_die($lang['NOT_ADMIN']);
break;
case 'user_activate':
if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['DEACTIVATE_CONFIRM']);
DB()->query("UPDATE ". BB_USERS ." SET user_active = '1' WHERE user_id = ". $user_id);
DB()->query("UPDATE ". BB_USERS ." SET user_active = '1' WHERE user_id = ". $user_id);
$this->response['info'] = $lang['USER_ACTIVATE_ON'];
$this->response['info'] = $lang['USER_ACTIVATE_ON'];
break;
case 'user_deactivate':
if ($userdata['user_id'] == $user_id) $this->ajax_die($lang['USER_DEACTIVATE_ME']);
if ($userdata['user_id'] == $user_id) $this->ajax_die($lang['USER_DEACTIVATE_ME']);
if (empty($this->request['confirmed'])) $this->prompt_for_confirm($lang['ACTIVATE_CONFIRM']);
DB()->query("UPDATE ". BB_USERS ." SET user_active = '0' WHERE user_id = ". $user_id);
delete_user_sessions($user_id);
DB()->query("UPDATE ". BB_USERS ." SET user_active = '0' WHERE user_id = ". $user_id);
delete_user_sessions($user_id);
$this->response['info'] = $lang['USER_ACTIVATE_OFF'];
$this->response['info'] = $lang['USER_ACTIVATE_OFF'];
break;
case "indexer":
exec("indexer --config {$bb_cfg['sphinx_config_path']} --all --rotate", $result);
if(!is_file($bb_cfg['sphinx_config_path'].".log"))
if (!is_file($bb_cfg['sphinx_config_path'].".log"))
{
file_put_contents($bb_cfg['sphinx_config_path'].".log", "####Logger from dimka3210.####".date("H:i:s", TIMENOW)."##############################\r\n\r\n\r\n\r\n", FILE_APPEND);
}
file_put_contents($bb_cfg['sphinx_config_path'].".log", "##############################".date("H:i:s", TIMENOW)."##############################\r\n", FILE_APPEND);
foreach($result as $row)
foreach ($result as $row)
{
file_put_contents($bb_cfg['sphinx_config_path'].".log", $row."\r\n", FILE_APPEND);
}
@ -111,5 +112,5 @@ switch($mode)
break;
}
$this->response['mode'] = $mode;
$this->response['mode'] = $mode;
$this->response['url'] = html_entity_decode(make_url('/') . PROFILE_URL . $user_id);

View file

@ -9,10 +9,10 @@ $mode = (string) $this->request['mode'];
switch ($mode)
{
case 'tor_status':
$topics = (string) $this->request['topic_ids'];
$status = (int) $this->request['status'];
$topics = (string) $this->request['topic_ids'];
$status = (int) $this->request['status'];
// Валидность статуса
// Валидность статуса
if (!isset($lang['TOR_STATUS_NAME'][$status]))
{
$this->ajax_die($lang['STATUS_DOES_EXIST'] . $new_status);
@ -26,10 +26,10 @@ switch ($mode)
}
$this->response['status'] = $bb_cfg['tor_icons'][$status];
$this->response['topics'] = explode(',', $topics);
break;
break;
case 'edit_topic_title':
$topic_id = (int) $this->request['topic_id'];
$topic_id = (int) $this->request['topic_id'];
$topic_title = (string) $this->request['topic_title'];
$new_title = clean_title($topic_title);
@ -46,32 +46,32 @@ switch ($mode)
DB()->query("UPDATE ". BB_TOPICS ." SET topic_title = '$topic_title_sql' WHERE topic_id = $topic_id LIMIT 1");
//Обновление кеша новостей на главной
// Обновление кеша новостей на главной
$news_forums = array_flip(explode(',', $bb_cfg['latest_news_forum_id']));
if(isset($news_forums[$t_data['forum_id']]) && $bb_cfg['show_latest_news'])
if (isset($news_forums[$t_data['forum_id']]) && $bb_cfg['show_latest_news'])
{
$datastore->enqueue('latest_news');
$datastore->update('latest_news');
}
$net_forums = array_flip(explode(',', $bb_cfg['network_news_forum_id']));
if(isset($net_forums[$t_data['forum_id']]) && $bb_cfg['show_network_news'])
if (isset($net_forums[$t_data['forum_id']]) && $bb_cfg['show_network_news'])
{
$datastore->enqueue('network_news');
$datastore->update('network_news');
}
$this->response['topic_id'] = $topic_id;
$this->response['topic_id'] = $topic_id;
$this->response['topic_title'] = $new_title;
break;
case 'profile_ip':
$user_id = (int) $this->request['user_id'];
$profiledata = get_userdata($user_id);
if(!$user_id) $this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
break;
$reg_ip = DB()->fetch_rowset("SELECT username, user_id, user_rank FROM ". BB_USERS ."
case 'profile_ip':
$user_id = (int) $this->request['user_id'];
$profiledata = get_userdata($user_id);
if (!$user_id) $this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
$reg_ip = DB()->fetch_rowset("SELECT username, user_id, user_rank FROM ". BB_USERS ."
WHERE user_reg_ip = '{$profiledata['user_reg_ip']}'
AND user_reg_ip != ''
AND user_id != {$profiledata['user_id']}
@ -83,8 +83,8 @@ switch ($mode)
AND user_id != {$profiledata['user_id']}");
$link_reg_ip = $link_last_ip = '';
if(!empty($reg_ip))
if (!empty($reg_ip))
{
$link_reg_ip .= $lang['OTHER_IP'] .' ';
foreach ($reg_ip as $row)
@ -93,7 +93,7 @@ switch ($mode)
}
}
if(!empty($last_ip))
if (!empty($last_ip))
{
$link_last_ip .= $lang['OTHER_IP'] .' ';
foreach ($last_ip as $row)
@ -111,20 +111,20 @@ switch ($mode)
$reg_ip = '<a href="'. $bb_cfg['whois_info'] . $user_reg_ip .'" class="gen" target="_blank">'. $user_reg_ip .'</a>';
$last_ip = '<a href="'. $bb_cfg['whois_info'] . $user_last_ip .'" class="gen" target="_blank">'. $user_last_ip .'</a>';
}
$this->response['ip_list_html'] = '
<br /><table class="mod_ip bCenter borderless" cellspacing="1">
<tr class="row5" >
<tr class="row5" >
<td>'. $lang['REG_IP'] .'</td>
<td class="tCenter">'. $reg_ip .'</td>
<td><div>'. $link_reg_ip .'</div></td>
</tr>
<tr class="row4">
<tr class="row4">
<td>'. $lang['LAST_IP'] .'</td>
<td class="tCenter">'. $last_ip .'</td>
<td><div>'. $link_last_ip .'</div></td>
</tr>
</table><br />
</table><br />
';
break;
}
break;
}

View file

@ -50,7 +50,7 @@ if (!defined('WORD_LIST_OBTAINED'))
switch($this->request['type'])
{
case 'delete';
if($post['post_id'] != $post['topic_first_post_id'] && ($is_auth['auth_mod'] || ($userdata['user_id'] == $post['poster_id'] && $is_auth['auth_delete'] && $post['topic_last_post_id'] == $post['post_id'] && $post['post_time'] + 3600*3 > TIMENOW)))
if ($post['post_id'] != $post['topic_first_post_id'] && ($is_auth['auth_mod'] || ($userdata['user_id'] == $post['poster_id'] && $is_auth['auth_delete'] && $post['topic_last_post_id'] == $post['post_id'] && $post['post_time'] + 3600*3 > TIMENOW)))
{
if (empty($this->request['confirmed']))
{
@ -64,14 +64,14 @@ switch($this->request['type'])
{
$this->ajax_die(sprintf($lang['DELETE_OWN_POSTS'], strip_tags($is_auth['auth_delete_type'])));
}
break;
break;
case 'reply';
if(bf($userdata['user_opt'], 'user_opt', 'allow_post'))
{
$this->ajax_die($lang['RULES_REPLY_CANNOT']);
}
else if(!$is_auth['auth_reply'])
else if(!$is_auth['auth_reply'])
{
$this->ajax_die(sprintf($lang['SORRY_AUTH_REPLY'], strip_tags($is_auth['auth_reply_type'])));
}
@ -89,55 +89,55 @@ switch($this->request['type'])
$message = (!empty($message)) ? preg_replace($orig_word, $replace_word, $message) : '';
}
if($post['post_id'] == $post['topic_first_post_id'])
if ($post['post_id'] == $post['topic_first_post_id'])
{
$message = "[quote]". $post['topic_title'] ."[/quote]\n";
$message = "[quote]". $post['topic_title'] ."[/quote]\n";
}
if(mb_strlen($message, 'UTF-8') > 1000)
if (mb_strlen($message, 'UTF-8') > 1000)
{
$this->response['redirect'] = make_url('posting.php?mode=quote&p='. $post_id);
}
$this->response['quote'] = true;
$this->response['message'] = $message;
break;
break;
case 'view_message':
$message = (string) $this->request['message'];
if(!trim($message)) $this->ajax_die($lang['EMPTY_MESSAGE']);
$message = htmlCHR($message, false, ENT_NOQUOTES);
$this->response['message_html'] = bbcode2html($message);
$this->response['res_id'] = @$this->request['res_id'];
break;
$this->response['message_html'] = bbcode2html($message);
$this->response['res_id'] = @$this->request['res_id'];
break;
case 'edit':
case 'editor':
if ($post['poster_id'] != $userdata['user_id'] && !$is_auth['auth_mod'])
case 'editor':
if ($post['poster_id'] != $userdata['user_id'] && !$is_auth['auth_mod'])
{
$this->ajax_die($lang['EDIT_OWN_POSTS']);
}
if((mb_strlen($post['post_text'], 'UTF-8') > 1000) || $post['post_attachment'] || ($post['topic_first_post_id'] == $post_id))
{
$this->response['redirect'] = make_url('posting.php?mode=editpost&p='. $post_id);
}
else if($this->request['type'] == 'editor')
if ((mb_strlen($post['post_text'], 'UTF-8') > 1000) || $post['post_attachment'] || ($post['topic_first_post_id'] == $post_id))
{
$this->response['redirect'] = make_url('posting.php?mode=editpost&p='. $post_id);
}
elseif ($this->request['type'] == 'editor')
{
$text = (string) $this->request['text'];
$text = prepare_message($text);
if(mb_strlen($text) > 2)
if (mb_strlen($text) > 2)
{
if($text != $post['post_text'])
if ($text != $post['post_text'])
{
if($bb_cfg['max_smilies'])
{
if ($bb_cfg['max_smilies'])
{
$count_smilies = substr_count(bbcode2html($text), '<img class="smile" src="'. $bb_cfg['smilies_path']);
if($count_smilies > $bb_cfg['max_smilies'])
if ($count_smilies > $bb_cfg['max_smilies'])
{
$this->ajax_die(sprintf($lang['MAX_SMILIES_PER_POST'], $bb_cfg['max_smilies']));
}
}
}
DB()->query("UPDATE ". BB_POSTS_TEXT ." SET post_text = '". DB()->escape($text) ."' WHERE post_id = $post_id LIMIT 1");
if ($post['topic_last_post_id'] != $post['post_id'] && $userdata['user_id'] == $post['poster_id'])
{
@ -146,7 +146,7 @@ switch($this->request['type'])
$s_text = str_replace('\n', "\n", $text);
$s_topic_title = str_replace('\n', "\n", $post['topic_title']);
add_search_words($post_id, stripslashes($s_text), stripslashes($s_topic_title));
update_post_html(array(
update_post_html(array(
'post_id' => $post_id,
'post_text' => $text,
));
@ -163,7 +163,7 @@ switch($this->request['type'])
{
$this->ajax_die($lang['TOPIC_LOCKED']);
}
else if(!$is_auth['auth_edit'])
elseif (!$is_auth['auth_edit'])
{
$this->ajax_die(sprintf($lang['SORRY_AUTH_EDIT'], strip_tags($is_auth['auth_edit_type'])));
}
@ -173,7 +173,7 @@ switch($this->request['type'])
$hidden_form .= '<input type="hidden" name="subject" value="'. $post['topic_title'] .'" />';
$this->response['text'] = '
<form action="posting.php" method="post" name="post">
<form action="posting.php" method="post" name="post">
'. $hidden_form .'
<div class="buttons mrg_4">
<input type="button" value="B" name="codeB" title="'. $lang['BOLD'] .'" style="font-weight: bold; width: 25px;" />
@ -217,28 +217,28 @@ switch($this->request['type'])
break;
case 'add':
if (!isset($this->request['topic_id']))
if (!isset($this->request['topic_id']))
{
$this->ajax_die('empty topic_id');
}
if(bf($userdata['user_opt'], 'user_opt', 'allow_post'))
if (bf($userdata['user_opt'], 'user_opt', 'allow_post'))
{
$this->ajax_die($lang['RULES_REPLY_CANNOT']);
}
else if(!$is_auth['auth_reply'])
elseif (!$is_auth['auth_reply'])
{
$this->ajax_die(sprintf($lang['SORRY_AUTH_REPLY'], strip_tags($is_auth['auth_reply_type'])));
}
if ($post['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
if ($post['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
{
$this->ajax_die($lang['TOPIC_LOCKED']);
$this->ajax_die($lang['TOPIC_LOCKED']);
}
$message = (string) $this->request['message'];
$message = (string) $this->request['message'];
$message = prepare_message($message);
// Flood control
// Flood control
$where_sql = (IS_GUEST) ? "p.poster_ip = '". USER_IP ."'" : "p.poster_id = {$userdata['user_id']}";
$sql = "SELECT MAX(p.post_time) AS last_post_time FROM ". BB_POSTS ." p WHERE $where_sql";
@ -276,33 +276,33 @@ switch($this->request['type'])
}
}
if($bb_cfg['max_smilies'])
{
if ($bb_cfg['max_smilies'])
{
$count_smilies = substr_count(bbcode2html($message), '<img class="smile" src="'. $bb_cfg['smilies_path']);
if($count_smilies > $bb_cfg['max_smilies'])
if ($count_smilies > $bb_cfg['max_smilies'])
{
$this->ajax_die(sprintf($lang['MAX_SMILIES_PER_POST'], $bb_cfg['max_smilies']));
}
}
}
DB()->sql_query("INSERT INTO " . BB_POSTS . " (topic_id, forum_id, poster_id, post_time, poster_ip) VALUES ($topic_id, ". $post['forum_id'] .", ". $userdata['user_id'] .", '". TIMENOW ."', '". USER_IP ."')");
$post_id = DB()->sql_nextid();
$post_id = DB()->sql_nextid();
DB()->sql_query("INSERT INTO " . BB_POSTS_TEXT . " (post_id, post_text) VALUES ($post_id, '". DB()->escape($message) ."')");
update_post_stats('reply', $post, $post['forum_id'], $topic_id, $post_id, $userdata['user_id']);
update_post_stats('reply', $post, $post['forum_id'], $topic_id, $post_id, $userdata['user_id']);
$s_message = str_replace('\n', "\n", $message);
$s_topic_title = str_replace('\n', "\n", $post['topic_title']);
add_search_words($post_id, stripslashes($s_message), stripslashes($s_topic_title));
update_post_html(array(
update_post_html(array(
'post_id' => $post_id,
'post_text' => $message,
));
$this->response['redirect'] = make_url(POST_URL . $post_id .'#'. $post_id);
break;
break;
default:
$this->ajax_die('empty type');
break;
}
break;
}

View file

@ -169,4 +169,4 @@ if ($sql_error)
// выход
$this->response['mode'] = $mode;
$this->response['timestamp'] = TIMENOW;
$this->response['timestamp'] = TIMENOW;

View file

@ -20,7 +20,8 @@ switch($mode)
{
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'. $err .'</span>';
}
break;
break;
case 'check_email':
$email = (string) $this->request['email'];
@ -32,7 +33,8 @@ switch($mode)
{
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'. $err .'</span>';
}
break;
break;
case 'check_pass':
$pass = (string) $this->request['pass'];
$pass_confirm = (string) $this->request['pass_confirm'];
@ -42,7 +44,7 @@ switch($mode)
}
else
{
if ($pass != $pass_confirm)
if ($pass != $pass_confirm)
{
$html = '<img src="./images/bad.gif"> <span class="leechmed bold">'. $lang['CHOOSE_PASS_ERR'] .'</span>';
}
@ -60,12 +62,13 @@ switch($mode)
{
$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;
case 'refresh_captcha';
$html = CAPTCHA()->get_html();
$html = CAPTCHA()->get_html();
break;
}

View file

@ -9,10 +9,10 @@ $mode = (string) $this->request['mode'];
switch ($mode)
{
case 'active_torrents':
$user_id = (int) $this->request['user_id'];
if(!$user_id) $this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
$user_id = (int) $this->request['user_id'];
if (!$user_id) $this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
$user_info = get_userdata($user_id);
if(!bf($user_info['user_opt'], 'user_opt', 'allow_dls') && !IS_AM && $user_id != $userdata['user_id']) $this->ajax_die($lang['CUR_ACTIVE_DLS_DISALLOWED']);
if (!bf($user_info['user_opt'], 'user_opt', 'allow_dls') && !IS_AM && $user_id != $userdata['user_id']) $this->ajax_die($lang['CUR_ACTIVE_DLS_DISALLOWED']);
$excluded_forums_csv = $user->get_excluded_forums(AUTH_VIEW);
$not_auth_forums_sql = ($excluded_forums_csv) ? "

View file

@ -10,11 +10,8 @@ if (!isset($this->request['attach_id']))
}
$attach_id = (int) $this->request['attach_id'];
$torrent = DB()->fetch_row("SELECT at.attach_id, at.physical_filename
FROM ". BB_ATTACHMENTS_DESC ." at
WHERE at.attach_id = $attach_id
LIMIT 1");
if(!$torrent) $this->ajax_die($lang['EMPTY_ATTACH_ID']);
$torrent = DB()->fetch_row("SELECT at.attach_id, at.physical_filename FROM ". BB_ATTACHMENTS_DESC ." at WHERE at.attach_id = $attach_id LIMIT 1");
if (!$torrent) $this->ajax_die($lang['EMPTY_ATTACH_ID']);
$filename = get_attachments_dir() .'/'. $torrent['physical_filename'];
if (($file_contents = @file_get_contents($filename)) === false)
@ -34,7 +31,7 @@ $tor_filelist = build_tor_filelist($file_contents);
function build_tor_filelist ($file_contents)
{
global $lang;
global $lang;
if (!$tor = bdecode($file_contents))
{
@ -172,5 +169,4 @@ function clean_tor_dirname ($dirname)
return str_replace(array('[', ']', '<', '>', "'"), array('&#91;', '&#93;', '&lt;', '&gt;', '&#039;'), $dirname);
}
$this->response['html'] = $tor_filelist;
$this->response['html'] = $tor_filelist;

View file

@ -489,4 +489,4 @@ class sql_db
$msg[] = '';
bb_log($msg, 'sql_error_tr');
}
}
}

View file

@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.5 (unstable)';
$bb_cfg['tp_release_date'] = '17-01-2014';
$bb_cfg['tp_release_state'] = 'R560';
$bb_cfg['tp_release_date'] = '19-01-2014';
$bb_cfg['tp_release_state'] = 'R561';
// Database
$charset = 'utf8';

View file

@ -354,4 +354,4 @@ class Benchmark_Timer {
$microtime = explode(' ', microtime());
return $microtime[1] . substr($microtime[0], 1);
}
}
}

View file

@ -3,5 +3,4 @@
// Open file in Editor
$bb_cfg['dbg']['interpreter'] = 'cmd.exe /c START';
$bb_cfg['dbg']['editor_path'] = 'D:\Programs\TextPad\TextPad.exe';
$bb_cfg['dbg']['editor_args'] = '%s(%s)'; // %s - file_to_open path, %s - line number
$bb_cfg['dbg']['editor_args'] = '%s(%s)'; // %s - file_to_open path, %s - line number

View file

@ -103,5 +103,4 @@ class bb_error_handler
}
$errHandler = new bb_error_handler;
set_error_handler(array(&$errHandler, 'bb_error_handler'));
set_error_handler(array(&$errHandler, 'bb_error_handler'));

View file

@ -99,4 +99,4 @@ function showSource ($file, $line, $prev = 10, $next = 10, $add_view_full_link =
echo '<a style="font-family: tahoma; font-size: 12px;" href="'. BB_ROOT .'develop/show_source.php?file='.urlencode($file).'&line='.$line.'&prev=10000&next=10000#'.($line - 15).'">View Full Source</a>';
}
return ob_get_clean();
}
}

View file

@ -38,4 +38,4 @@ function prepend_debug_info ($contents)
return $contents;
}
ob_start('prepend_debug_info');
ob_start('prepend_debug_info');

View file

@ -116,4 +116,4 @@ font {
font-size: 12px;
background: #FBFBFB;
font-family: Courier, monospace;
}
}

View file

@ -32,4 +32,4 @@ class profiler
trigger_error("Unsupported profiler extension: $extension_name", E_USER_ERROR);
}
}
}
}

View file

@ -156,7 +156,7 @@ class profiler_dbg extends profiler
var $min_time = 0;
var $total_time = 0;
// $min_time - минимальное время выполнения для вывода в подробной построковой информации (в секундах или %)
// $min_time - минимальное время выполнения для вывода в подробной построковой информации (в секундах или %)
//
function print_profile_data ($min_time = 0)
{
@ -370,8 +370,4 @@ class profiler_dbg extends profiler
if ($a['time'] == $b['time']) return 0;
return ($a['time'] > $b['time']) ? -1 : 1;
}
}
}

View file

@ -397,4 +397,4 @@ class captcha_kcaptcha extends captcha_common
return $this->keystring;
}
}
}

View file

@ -258,4 +258,4 @@ DB()->query("
if ($posts_days = intval($bb_cfg['posts_cache_days_keep']))
{
DB()->query("DELETE FROM ". BB_POSTS_HTML ." WHERE post_html_time < DATE_SUB(NOW(), INTERVAL $posts_days DAY)");
}
}

View file

@ -17,4 +17,4 @@ foreach ($gc_cache as $cache_name)
$changes = CACHE($cache_name)->gc();
$cron_runtime_log .= date('Y-m-d H:i:s') ." -- tr -- $changes rows deleted\n";
}
}
}

View file

@ -34,4 +34,4 @@ if ($exec_return_status && !$bb_cfg['emailer_disabled'] && $bb_cfg['tech_admin_e
sleep(10);
DB()->expect_slow_query(16*60, 100);
DB()->expect_slow_query(16*60, 100);

View file

@ -63,4 +63,4 @@ while (true)
sleep(3);
}
unset($prune_users, $not_activated_users, $not_active_users);
unset($prune_users, $not_activated_users, $not_active_users);

View file

@ -207,4 +207,4 @@ if($bb_cfg['seed_bonus_enabled'] && $bb_cfg['seed_bonus_points'] && $bb_cfg['see
}
DB()->query("DROP TEMPORARY TABLE IF EXISTS tmp_bonus");
}
}

View file

@ -27,4 +27,4 @@ DB()->query("
");
// Drop tmp table
DB()->query("DROP TEMPORARY TABLE tmp_complete_count");
DB()->query("DROP TEMPORARY TABLE tmp_complete_count");

View file

@ -53,4 +53,4 @@ if ($dead_tor_sql && $attach_sql)
DELETE FROM ". BB_BT_TORRENTS ."
WHERE topic_id IN($dead_tor_sql)
");
}
}

View file

@ -164,4 +164,4 @@ if ($bb_cfg['torhelp_enabled'])
DB()->query("DROP TABLE IF EXISTS ". NEW_BB_BT_TORHELP .", ". OLD_BB_BT_TORHELP);
}
DB()->expect_slow_query(10);
DB()->expect_slow_query(10);

View file

@ -12,4 +12,4 @@ DB()->query("
tor.topic_id = b.topic_id
");
DB()->query("TRUNCATE TABLE ". BUF_LAST_SEEDER);
DB()->query("TRUNCATE TABLE ". BUF_LAST_SEEDER);

View file

@ -14,4 +14,4 @@ $extensions = DB()->fetch_rowset("
AND g.allow_group = 1
");
$this->store('attach_extensions', $extensions);
$this->store('attach_extensions', $extensions);

View file

@ -24,14 +24,14 @@ $data = array(
// Store only these fields from BB_FORUMS in $data['f']
$forum_store_fields = array_flip(array_keys($bf['forum_perm']));
$forum_store_fields += array_flip(array(
'forum_id',
'cat_id',
'forum_name',
'forum_desc',
'forum_status',
'forum_posts',
'forum_topics',
'forum_parent',
'forum_id',
'cat_id',
'forum_name',
'forum_desc',
'forum_status',
'forum_posts',
'forum_topics',
'forum_parent',
));
// Categories
@ -73,7 +73,7 @@ foreach (DB()->fetch_rowset($sql) as $row)
$not_auth['user_read'][] = $fid;
}
$data['forum'][$fid] = $row;
$data['forum'][$fid] = $row;
// Store forums data
if ($parent_id = $row['forum_parent'])
@ -136,7 +136,7 @@ if ($bb_cfg['show_latest_news'] AND $news_forum_ids = $bb_cfg['latest_news_forum
SELECT topic_id, topic_time, topic_title, forum_id
FROM ". BB_TOPICS ."
WHERE forum_id IN ($news_forum_ids)
AND topic_moved_id = 0
AND topic_moved_id = 0
ORDER BY topic_time DESC
LIMIT $news_count
");
@ -149,18 +149,18 @@ if ($bb_cfg['show_latest_news'] AND $news_forum_ids = $bb_cfg['latest_news_forum
//
if ($bb_cfg['show_network_news'] AND $net_forum_ids = $bb_cfg['network_news_forum_id'])
{
$net_count = max($bb_cfg['network_news_count'], 1);
$net_count = max($bb_cfg['network_news_count'], 1);
$data = DB()->fetch_rowset("
SELECT topic_id, topic_time, topic_title, forum_id
FROM ". BB_TOPICS ."
WHERE forum_id IN ($net_forum_ids)
AND topic_moved_id = 0
ORDER BY topic_time DESC
LIMIT $net_count
");
$data = DB()->fetch_rowset("
SELECT topic_id, topic_time, topic_title, forum_id
FROM ". BB_TOPICS ."
WHERE forum_id IN ($net_forum_ids)
AND topic_moved_id = 0
ORDER BY topic_time DESC
LIMIT $net_count
");
$this->store('network_news', $data);
$this->store('network_news', $data);
}
//
@ -174,8 +174,8 @@ if ($bb_cfg['show_ads'])
SELECT *
FROM ". BB_ADS ."
WHERE ad_status = 1
AND ad_start_time < NOW()
AND DATE_ADD(ad_start_time, INTERVAL ad_active_days DAY) > NOW()
AND ad_start_time < NOW()
AND DATE_ADD(ad_start_time, INTERVAL ad_active_days DAY) > NOW()
");
foreach ($active_ads as $ad)
@ -187,9 +187,9 @@ if ($bb_cfg['show_ads'])
$ad_block_assignment[$block_id][] = $ad['ad_id'];
}
}
$ad_html[$ad['ad_id']] = $ad['ad_html'];
}
$this->store('ads', $ad_html);
bb_update_config(array('active_ads' => serialize($ad_block_assignment)));
}
}

View file

@ -11,4 +11,4 @@ foreach (DB()->fetch_rowset($sql) as $row)
$ranks[$row['rank_id']] = $row;
}
$this->store('ranks', $ranks);
$this->store('ranks', $ranks);

View file

@ -13,7 +13,7 @@ foreach ($rowset as $smile)
{
$smilies['orig'][] = '#(?<=^|\W)'. preg_quote($smile['code'], '#') .'(?=$|\W)#';
$smilies['repl'][] = ' <img class="smile" src="'. $bb_cfg['smilies_path'] .'/'. $smile['smile_url'] .'" alt="'. $smile['emoticon'] .'" align="absmiddle" border="0" />';
$smilies['smile'][] = $smile;
$smilies['smile'][] = $smile;
}
$this->store('smile_replacements', $smilies);
$this->store('smile_replacements', $smilies);

View file

@ -2745,26 +2745,26 @@ function get_path_from_id ($id, $ext_id, $base_path, $first_div, $sec_div)
return ($base_path ? "$base_path/" : '') . ($id % $sec_div) .'/'. $id . ($ext ? ".$ext" : '');
}
function send_pm($user_id, $subject, $message, $poster_id = BOT_UID)
function send_pm ($user_id, $subject, $message, $poster_id = BOT_UID)
{
global $userdata;
$subject = DB()->escape($subject);
$message = DB()->escape($message);
if($poster_id == BOT_UID)
{
$poster_ip = '7f000001';
}
else if($row = DB()->fetch_row("SELECT user_reg_ip FROM ". BB_USERS ." WHERE user_id = $poster_id"))
{
$poster_ip = $row['user_reg_ip'];
}
else
{
$poster_id = $userdata['user_id'];
$poster_ip = USER_IP;
}
if ($poster_id == BOT_UID)
{
$poster_ip = '7f000001';
}
elseif ($row = DB()->fetch_row("SELECT user_reg_ip FROM ". BB_USERS ." WHERE user_id = $poster_id"))
{
$poster_ip = $row['user_reg_ip'];
}
else
{
$poster_id = $userdata['user_id'];
$poster_ip = USER_IP;
}
DB()->sql_query("INSERT INTO ". BB_PRIVMSGS ." (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip)
VALUES (". PRIVMSGS_NEW_MAIL .", '$subject', {$poster_id}, $user_id, ". TIMENOW .", '$poster_ip')");
@ -2780,7 +2780,7 @@ function send_pm($user_id, $subject, $message, $poster_id = BOT_UID)
WHERE user_id = $user_id");
}
function profile_url($data)
function profile_url ($data)
{
global $bb_cfg, $lang, $datastore;
@ -2792,22 +2792,22 @@ function profile_url($data)
$user_rank = !empty($data['user_rank']) ? $data['user_rank'] : 0;
if(isset($ranks[$user_rank]))
if (isset($ranks[$user_rank]))
{
$title = $ranks[$user_rank]['rank_title'];
$style = $ranks[$user_rank]['rank_style'];
}
if(empty($title)) $title = $lang['USER'];
if(empty($style)) $style = 'colorUser';
if (empty($title)) $title = $lang['USER'];
if (empty($style)) $style = 'colorUser';
if(!$bb_cfg['color_nick']) $style = '';
if (!$bb_cfg['color_nick']) $style = '';
$username = !empty($data['username']) ? $data['username'] : $lang['GUEST'];
$user_id = (!empty($data['user_id']) && $username != $lang['GUEST']) ? $data['user_id'] : GUEST_UID;
$profile = '<span title="'. $title .'" class="'. $style .'">'. $username .'</span>';
if(!in_array($user_id, array('', GUEST_UID, BOT_UID)) && $username)
if (!in_array($user_id, array('', GUEST_UID, BOT_UID)) && $username)
{
$profile = '<a href="'. make_url(PROFILE_URL . $user_id) .'">'. $profile .'</a>';
}
@ -2815,7 +2815,8 @@ function profile_url($data)
return $profile;
}
function seo_link_header($str){
function seo_link_header ($str)
{
/**
* Функция обработки url. Сверяет url с переданным выражением.
*/

View file

@ -159,41 +159,26 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
$topic_dl_type = (isset($_POST['topic_dl_type']) && ($post_info['allow_reg_tracker'] || $is_auth['auth_mod'])) ? TOPIC_DL_TYPE_DL : TOPIC_DL_TYPE_NORMAL;
if (($mode == 'editpost' && $post_data['first_post']))
{
$sql_update = "
UPDATE
". BB_POSTS ." p,
". BB_TOPICS ." t
SET
p.post_time = ". TIMENOW .",
t.topic_title = '$post_subject',
t.topic_type = $topic_type,
t.topic_dl_type = $topic_dl_type " . ((@$post_data['edit_vote'] || !empty($poll_title)) ? ",
t.topic_vote = " . $topic_vote : "") . ",
t.topic_last_post_time = ". TIMENOW .",
t.topic_time = ". TIMENOW ."
WHERE
t.topic_id = $topic_id
AND t.topic_first_post_id = p.post_id
";
}
else
{
$sql_update = "
UPDATE
" . BB_TOPICS . "
SET
topic_title = '$post_subject',
topic_type = $topic_type,
topic_dl_type = $topic_dl_type " . ((@$post_data['edit_vote'] || !empty($poll_title)) ? ",
topic_vote = " . $topic_vote : "") . "
WHERE
topic_id = $topic_id
";
}
$sql_insert = "
INSERT INTO
" . BB_TOPICS . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_dl_type, topic_vote)
VALUES
('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_dl_type, $topic_vote)
";
$sql = ($mode != "editpost") ? "INSERT INTO " . BB_TOPICS . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_dl_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_dl_type, $topic_vote)" : $sql_update;
$sql_update = "
UPDATE
" . BB_TOPICS . "
SET
topic_title = '$post_subject',
topic_type = $topic_type,
topic_dl_type = $topic_dl_type
". ((@$post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = ". $topic_vote : "") ."
WHERE
topic_id = $topic_id
";
$sql = ($mode != "editpost") ? $sql_insert : $sql_update;
if (!DB()->sql_query($sql))
{

View file

@ -5,7 +5,7 @@ if (!defined('BB_ROOT')) die(basename(__FILE__));
//
// Pick a language, any language
//
function language_select($default, $select_name = "language", $dirname="language")
function language_select ($default, $select_name = "language", $dirname="language")
{
global $bb_cfg;
if(!$default) $default = $bb_cfg['default_lang'];
@ -43,7 +43,7 @@ function language_select($default, $select_name = "language", $dirname="language
//
// Pick a timezone
//
function tz_select($default, $select_name = 'timezone')
function tz_select ($default, $select_name = 'timezone')
{
global $sys_timezone, $lang;
@ -66,7 +66,7 @@ function tz_select($default, $select_name = 'timezone')
//
// Templates
//
function templates_select($default_style, $select_name = 'tpl_name')
function templates_select ($default_style, $select_name = 'tpl_name')
{
global $bb_cfg;

View file

@ -111,4 +111,4 @@ function validate_email ($email, $check_ban_and_taken = true)
}
return false;
}
}

View file

@ -580,9 +580,8 @@ $dl_status_css = array(
DL_STATUS_CANCEL => 'dlCancel',
);
// Show 'Board is disabled' message if needed.
// Show 'Board is disabled' message if needed
if ($bb_cfg['board_disable'] && !defined('IN_ADMIN') && !defined('IN_LOGIN'))
{
message_die(GENERAL_MESSAGE, 'BOARD_DISABLE');
}
}

View file

@ -150,4 +150,4 @@ $online['cnt'] = $online_short['cnt'] = <<<HTML
HTML;
CACHE('bb_cache')->set('online', $online, 45);
CACHE('bb_cache')->set('online_short', $online_short, 45);
CACHE('bb_cache')->set('online_short', $online_short, 45);

View file

@ -112,4 +112,4 @@ if (defined('REQUESTED_PAGE') && !defined('DISABLE_CACHING_OUTPUT'))
}
}
bb_exit();
bb_exit();

View file

@ -352,7 +352,7 @@ $template->pparse('page_header');
define('PAGE_HEADER_SENT', true);
if(!$bb_cfg['gzip_compress'])
if (!$bb_cfg['gzip_compress'])
{
flush();
}

View file

@ -66,6 +66,7 @@ if ($edit_tpl_mode)
'NO_TPL_ASSIGNED' => !($f_data['forum_tpl_id']),
'TPL_SELECT' => get_select('forum_tpl', $f_data['forum_tpl_id']),
));
if ($tpl_data)
{
$template->assign_vars(array(
@ -78,5 +79,4 @@ if ($edit_tpl_mode)
}
}
print_page('posting_tpl.tpl');
print_page('posting_tpl.tpl');

View file

@ -1648,4 +1648,4 @@ class SphinxClient extends cache_common
//
// $Id: sphinxapi.php 2055 2009-11-06 23:09:58Z shodan $
//
//

View file

@ -18,4 +18,5 @@ $lang['TPL']['GUIDE'] = array(
'audio' => 330984,
'torrent' => 330985,
);
$lang['TPL']['GUIDE'] = array();

View file

@ -315,4 +315,4 @@ if ($do_pagination && $total_rows > $bb_cfg['topics_per_page'])
generate_pagination(BB_ROOT ."profile.php?mode=attachcp&amp;mode_a=$mode&amp;order=$sort_order&amp;" . POST_USERS_URL . '=' . $profiledata['user_id'] . '&amp;sid=' . $userdata['session_id'], $total_rows, $bb_cfg['topics_per_page'], $start).'&nbsp;';
}
print_page('usercp_attachcp.tpl');
print_page('usercp_attachcp.tpl');

View file

@ -24,18 +24,18 @@ if (isset($_POST['bonus_id']))
generate_passkey($user_id, true);
$btu = get_bt_userdata($user_id);
}
$upload = $upload_row[$id]*1024*1024*1024;
$points = $price_row[$id];
if($userdata['user_points'] < $points)
if ($userdata['user_points'] < $points)
{
meta_refresh('index.php', 5);
$message = $lang['BONUS_NOT_SUCCES'] .'<br /><br /><a href="'. BONUS_URL .'">'. $lang['BONUS_RETURN'] .'</a><br /><br /><a href="'. PROFILE_URL . $userdata['user_id'] .'">'. $lang['RETURN_PROFILE'] .'</a><br /><br />'. sprintf($lang['CLICK_RETURN_INDEX'], '<a href="index.php">', '</a>');
bb_die($message);
}
meta_refresh('index.php', 5);
$message = $lang['BONUS_NOT_SUCCES'] .'<br /><br /><a href="'. BONUS_URL .'">'. $lang['BONUS_RETURN'] .'</a><br /><br /><a href="'. PROFILE_URL . $userdata['user_id'] .'">'. $lang['RETURN_PROFILE'] .'</a><br /><br />'. sprintf($lang['CLICK_RETURN_INDEX'], '<a href="index.php">', '</a>');
bb_die($message);
}
DB()->query("UPDATE ". BB_BT_USERS ." bu, ". BB_USERS ." u
SET
@ -47,12 +47,12 @@ if (isset($_POST['bonus_id']))
");
cache_rm_user_sessions($user_id);
meta_refresh(BONUS_URL, 5);
meta_refresh(BONUS_URL, 5);
$message = sprintf($lang['BONUS_SUCCES'], humn_size($upload_row[$id]*1024*1024*1024));
$message .= '<br /><br /><a href="'. BONUS_URL .'">'. $lang['BONUS_RETURN'] .'</a><br /><br /><a href="'. PROFILE_URL . $userdata['user_id'] .'">'. $lang['RETURN_PROFILE'] .'</a><br /><br />'. sprintf($lang['CLICK_RETURN_INDEX'], '<a href="index.php">', '</a>');
bb_die($message);
bb_die($message);
}
else
{

View file

@ -22,9 +22,7 @@ if ( !$userdata['session_logged_in'] )
redirect("login.php?redirect=profile.php&mode=email&" . POST_USERS_URL . "=$user_id");
}
$sql = "SELECT username, user_email, user_lang
FROM " . BB_USERS . "
WHERE user_id = $user_id";
$sql = "SELECT username, user_email, user_lang FROM " . BB_USERS . " WHERE user_id = $user_id";
if ( $row = DB()->fetch_row($sql) )
{
$username = $row['username'];

View file

@ -88,4 +88,4 @@ $template->assign_vars(array(
'S_PROFILE_ACTION' => "profile.php?mode=sendpassword")
);
print_page('usercp_sendpasswd.tpl');
print_page('usercp_sendpasswd.tpl');

View file

@ -433,4 +433,4 @@ if (IS_AM)
// Display page
define('SHOW_ONLINE', $show_online_users);
print_page('index.tpl');
print_page('index.tpl');

View file

@ -660,4 +660,4 @@ $lang['SEED_BONUS_TOR_SIZE'] = '<h4>Minimum distribution for which will be award
$lang['SEED_BONUS_USER_REGDATA'] = '<h4>Minimum length of user tracker, after which will be awarded bonuses </h4> <h6> If you want to accrue bonuses to all users, leave blank. </h6>';
$lang['SEED_BONUS_WARNING'] = 'ATTENTION! Seed Bonuses should be in ascending order';
$lang['SEED_BONUS_EXCHANGE'] = 'Configuring Exchange Sid Bonuses';
$lang['SEED_BONUS_ROPORTION'] = 'Proportion addition for an exchange of bonuses on GB';
$lang['SEED_BONUS_ROPORTION'] = 'Proportion addition for an exchange of bonuses on GB';

View file

@ -13,4 +13,4 @@ $lang['CALLSEED_MSG_POPUP'] = 'Error of popup';
$lang['CALLSEED_MSG_TIME'] = 'Unable to set the last query';
$lang['CALLSEED_HAVE_SEED'] = 'Topic does not require help (<b>Seeders:</b> %d, <b>Leechers:</b> %d)';
$lang['CALLSEED_RETURN'] = '<br><br> <a href="viewtopic.php?t=%s"><b>Back to the topic</b></a>';
$lang['CALLSEED_RETURN'] = '<br><br> <a href="viewtopic.php?t=%s"><b>Back to the topic</b></a>';

View file

@ -657,4 +657,4 @@ $lang['SEED_BONUS_TOR_SIZE'] = '<h4>Минимальный размер разд
$lang['SEED_BONUS_USER_REGDATA'] = '<h4>Минимальный стаж пользователя на трекере, после которого будут начисляться бонусы</h4><h6>Если хотите начислять бонусы всем пользователям, оставьте поле пустым.</h6>';
$lang['SEED_BONUS_WARNING'] = 'ВНИМАНИЕ! Сид Бонусы должны быть в порядке возрастания';
$lang['SEED_BONUS_EXCHANGE'] = 'Настройка обмена Сид Бонусов';
$lang['SEED_BONUS_ROPORTION'] = 'Добавление пропорции для обмена бонусов на GB';
$lang['SEED_BONUS_ROPORTION'] = 'Добавление пропорции для обмена бонусов на GB';

View file

@ -61,4 +61,4 @@ $lang['JOB_REMOVED'] = 'Задача была успешно удалена';
$lang['SCRIPT_DUPLICATE'] = 'Скрипт <b>'. @$_POST['cron_script'] .'</b> уже существует!';
$lang['TITLE_DUPLICATE'] = 'Название задачи <b>'. @$_POST['cron_title'] .'</b> уже существует!';
$lang['CLICK_RETURN_JOBS_ADDED'] = '%sВернуться к добавлению задачи%s';
$lang['CLICK_RETURN_JOBS'] = '%sВернуться к планировщику задач%s';
$lang['CLICK_RETURN_JOBS'] = '%sВернуться к планировщику задач%s';

View file

@ -13,4 +13,4 @@ $lang['CALLSEED_MSG_POPUP'] = 'Ошибка работы всплывающе
$lang['CALLSEED_MSG_TIME'] = 'Не удалось установить время последнего запроса';
$lang['CALLSEED_HAVE_SEED'] = 'Раздача не нуждается в помощи (<b>Сидеров:</b> %d, <b>Личеров:</b> %d)';
$lang['CALLSEED_RETURN'] = '<br><br> <a href="viewtopic.php?t=%s"><b>Вернуться в тему</b></a>';
$lang['CALLSEED_RETURN'] = '<br><br> <a href="viewtopic.php?t=%s"><b>Вернуться в тему</b></a>';

View file

@ -28,4 +28,4 @@ $faq[] = array("Почему я не могу добавить вложение?
$faq[] = array("Я получил разрешение, почему я всё ещё не могу добавлять приложения?", "Размер файлов, разрешённые расширения и другие вещи зависят от администратора форума. Может быть модератор или администратор изменили ваши права, или запретили приложения в определённых форумах. Когда вы пытаетесь добавить файл, форум должен выдать подробное описание проблемы, почему приложения не работают. Если этого недостаточно, свяжитесь с модератором или администратором, чтобы решить проблему.");
$faq[] = array("Почему я не могу удалить вложение?", "В некоторых форумах удаление вложений разрешено только определённым пользователям или группам. Чтобы удалить вложение, необходимы права, которые могут дать только модератор или администратор форума, поэтому свяжитесь с ними.");
$faq[] = array("Почему я не могу просмотреть/скачать вложение?", "В некоторых форумах скачивание файлов может быть разрешено только определённым пользователям или группам. Чтобы скачать файлы, нужны определённые права, и только модератор и администратор могут их вам дать, так что свяжитесь с ними.");
$faq[] = array("С кем мне надо связаться, чтобы сообщить о незаконных приложениях?", "Свяжитесь с администратором форума. Если вы не знаете, кто это, свяжитесь сначала с модераторами и спросите их, как связаться с администратором. Если вы не получите ответа, вам нужно будет связаться с владельцем домена (с помощью whois поиска), или, если сайт находится на бесплатном хостинге, вроде yahoo/tripod,, свяжитесь с администратором того сёрвера. Заметьте, что phpBB Group не принимает никакой ответственности за то, как или кто использует форум. Поэтому совершенно бесполезно контактировать phpBB Group с просьбами о прекращении какой бы то ни было нелегальной деятельности совершённой 3-ми лицами.");
$faq[] = array("С кем мне надо связаться, чтобы сообщить о незаконных приложениях?", "Свяжитесь с администратором форума. Если вы не знаете, кто это, свяжитесь сначала с модераторами и спросите их, как связаться с администратором. Если вы не получите ответа, вам нужно будет связаться с владельцем домена (с помощью whois поиска), или, если сайт находится на бесплатном хостинге, вроде yahoo/tripod,, свяжитесь с администратором того сёрвера. Заметьте, что phpBB Group не принимает никакой ответственности за то, как или кто использует форум. Поэтому совершенно бесполезно контактировать phpBB Group с просьбами о прекращении какой бы то ни было нелегальной деятельности совершённой 3-ми лицами.");

View file

@ -134,4 +134,4 @@ if (IS_GUEST || $mod_admin_login)
print_page('login.tpl');
}
redirect($redirect_url);
redirect($redirect_url);

View file

@ -238,4 +238,4 @@ $template->assign_vars(array(
'PAGE_TITLE' => $lang['MEMBERLIST'],
));
print_page('memberlist.tpl');
print_page('memberlist.tpl');

View file

@ -141,4 +141,4 @@ elseif ($do == 'info')
else
{
message_die(GENERAL_ERROR, 'Invalid mode <br /> <a href="javascript:history.go(-1)">'.mb_convert_case($lang['BACK'], MB_CASE_TITLE).'</a>');
}
}

View file

@ -49,5 +49,4 @@
</div>
</fieldset>
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Закрыть ]</a></p>
</div><!--/infobox-wrap-->
</div><!--/infobox-wrap-->

View file

@ -20,5 +20,4 @@
</div>
</fieldset>
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Закрыть ]</a></p>
</div><!--/infobox-wrap-->
</div><!--/infobox-wrap-->

View file

@ -102,4 +102,4 @@
</fieldset>
<p class="gen tRight pad_6"><a href="javascript:window.close();" class="gen">[ Закрыть ]</a></p>
</div><!--/infobox-wrap-->
<?php }?>
<?php }?>

View file

@ -1743,4 +1743,4 @@ function pm_message_die ($msg)
$msg .= sprintf($lang['CLICK_RETURN_INDEX'], '<a href="'."index.php".'">', '</a>');
message_die(GENERAL_MESSAGE, $msg);
}
}

View file

@ -955,4 +955,4 @@ function username_search ($search_match)
));
print_page('search.tpl', 'simple');
}
}

View file

@ -137,5 +137,4 @@ echo '</body></html>';
DB()->query("DROP TEMPORARY TABLE ". TMP_TRACKER_TABLE);
bb_exit();
bb_exit();

View file

@ -17,6 +17,10 @@
<!-- IF INCLUDE_BBCODE_JS -->
<script type="text/javascript" src="{SITE_URL}misc/js/bbcode.js?v={$bb_cfg['js_ver']}"></script>
<script type="text/javascript">
window.BB = {};
window.encURL = encodeURIComponent;
</script>
<script type="text/javascript">
var postImg_MaxWidth = screen.width - {POST_IMG_WIDTH_DECR_JS};
var postImgAligned_MaxWidth = Math.round(screen.width/3);
@ -577,8 +581,6 @@ important_info
<!--/menus-->
<!--page_content-->
<div id="page_content">
<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
@ -608,48 +610,51 @@ important_info
<!-- ENDIF -->
<!--main_content-->
<td id="main_content">
<td id="main_content">
<div id="main_content_wrap">
<div id="latest_news">
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="50%">
<!-- IF SHOW_LATEST_NEWS -->
<h3>{L_LATEST_NEWS}</h3>
<table cellpadding="0">
<!-- BEGIN news -->
<tr>
<td><div class="news_date">{news.NEWS_TIME}</div></td>
<td width="100%">
<div class="news_title<!-- IF news.NEWS_IS_NEW --> new<!-- ENDIF -->"><a href="{TOPIC_URL}{news.NEWS_TOPIC_ID}">{news.NEWS_TITLE}</a></div>
</td>
</tr>
<!-- END news -->
</table>
<!-- ENDIF -->
</td>
<!-- IF SHOW_NETWORK_NEWS -->
<td width="50%">
<h3>{L_NETWORK_NEWS}</h3>
<table cellpadding="0">
<!-- BEGIN net -->
<div id="latest_news">
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td><div class="news_date">{net.NEWS_TIME}</div></td>
<td width="100%">
<div class="news_title<!-- IF net.NEWS_IS_NEW --> new<!-- ENDIF -->"><a href="{TOPIC_URL}{net.NEWS_TOPIC_ID}">{net.NEWS_TITLE}</a></div>
</td>
<!-- IF SHOW_LATEST_NEWS -->
<td width="50%">
<h3>{L_LATEST_NEWS}</h3>
<table cellpadding="0">
<!-- BEGIN news -->
<tr>
<td><div class="news_date">{news.NEWS_TIME}</div></td>
<td width="100%">
<div class="news_title<!-- IF news.NEWS_IS_NEW --> new<!-- ENDIF -->"><a href="{TOPIC_URL}{news.NEWS_TOPIC_ID}">{news.NEWS_TITLE}</a></div>
</td>
</tr>
<!-- END news -->
</table>
</td>
<!-- ENDIF -->
<!-- IF SHOW_NETWORK_NEWS -->
<td width="50%">
<h3>{L_NETWORK_NEWS}</h3>
<table cellpadding="0">
<!-- BEGIN net -->
<tr>
<td><div class="news_date">{net.NEWS_TIME}</div></td>
<td width="100%">
<div class="news_title<!-- IF net.NEWS_IS_NEW --> new<!-- ENDIF -->"><a href="{TOPIC_URL}{net.NEWS_TOPIC_ID}">{net.NEWS_TITLE}</a></div>
</td>
</tr>
<!-- END net -->
</table>
</td>
<!-- ENDIF -->
</tr>
<!-- END net -->
</table>
</td>
<!-- ENDIF -->
</tr>
</table>
</div>
</table>
</div>
<!-- IF AD_BLOCK_200 --><div id="ad-200">{AD_BLOCK_200}</div><!--/ad-200--><!-- ELSEIF AD_BLOCK_100 --><div id="ad-100">{AD_BLOCK_100}</div><!--/ad-100--><!-- ENDIF / AD_BLOCK_100 -->
<!-- IF AD_BLOCK_200 -->
<div id="ad-200">{AD_BLOCK_200}</div><!--/ad-200-->
<!-- ELSEIF AD_BLOCK_100 -->
<div id="ad-100">{AD_BLOCK_100}</div><!--/ad-100-->
<!-- ENDIF / AD_BLOCK_100 -->
<!--=======================-->
<!-- ENDIF / COMMON_HEADER -->

View file

@ -594,4 +594,4 @@ $template->assign_vars(array(
'PRUNE_DAYS' => $forum_data['prune_days'],
));
print_page('viewforum.tpl');
print_page('viewforum.tpl');

View file

@ -115,4 +115,4 @@ $template->assign_vars(array(
'TOTAL_GUEST_USERS_ONLINE' => sprintf($lang['GUEST_USERS_ONLINE'], $guest_users))
);
print_page('viewonline.tpl');
print_page('viewonline.tpl');