Удаление вывода списков с правами пользователя

Окончательное удаление данных с правами пользователя на конкретный форум или тему.
This commit is contained in:
Exile 2014-12-18 01:26:38 +03:00
commit ebff49c89b
8 changed files with 25 additions and 119 deletions

View file

@ -22,7 +22,7 @@ $show_dl_buttons = ($dl_topic && $bb_cfg['bt_show_dl_list_buttons']);
$template->assign_vars(array('S_DL_DELETE' => false)); $template->assign_vars(array('S_DL_DELETE' => false));
if (($is_auth['auth_mod']) && ($t_data['topic_dl_type'] == TOPIC_DL_TYPE_DL)) if (($is_auth['auth_mod']) && ($t_data['topic_dl_type'] == TOPIC_DL_TYPE_DL))
{ {
$s_dl_delete = "<br /><a href=\"dl_list.php?mode=dl_delete&amp;". POST_TOPIC_URL ."=$topic_id&amp;sid=". $userdata['session_id'] .'">'. $lang['DL_LIST_DEL'] .'</a>'; $s_dl_delete = "<a href=\"dl_list.php?mode=dl_delete&amp;". POST_TOPIC_URL ."=$topic_id&amp;sid=". $userdata['session_id'] .'">'. $lang['DL_LIST_DEL'] .'</a>';
$template->assign_vars(array('S_DL_DELETE' => $s_dl_delete)); $template->assign_vars(array('S_DL_DELETE' => $s_dl_delete));
} }

View file

@ -213,18 +213,6 @@ $lang['TOPIC_POLL'] = '[ Poll ]';
$lang['MARK_TOPICS_READ'] = 'Mark all topics read'; $lang['MARK_TOPICS_READ'] = 'Mark all topics read';
$lang['TOPICS_MARKED_READ'] = 'The topics for this forum have just been marked read'; $lang['TOPICS_MARKED_READ'] = 'The topics for this forum have just been marked read';
$lang['RULES_POST_CAN'] = 'You <b>can</b> post new topics in this forum';
$lang['RULES_POST_CANNOT'] = 'You <b>cannot</b> post new topics in this forum';
$lang['RULES_REPLY_CAN'] = 'You <b>can</b> reply to topics in this forum';
$lang['RULES_REPLY_CANNOT'] = 'You <b>cannot</b> reply to topics in this forum';
$lang['RULES_EDIT_CAN'] = 'You <b>can</b> edit your posts in this forum';
$lang['RULES_EDIT_CANNOT'] = 'You <b>cannot</b> edit your posts in this forum';
$lang['RULES_DELETE_CAN'] = 'You <b>can</b> delete your posts in this forum';
$lang['RULES_DELETE_CANNOT'] = 'You <b>cannot</b> delete your posts in this forum';
$lang['RULES_VOTE_CAN'] = 'You <b>can</b> vote in polls in this forum';
$lang['RULES_VOTE_CANNOT'] = 'You <b>cannot</b> vote in polls in this forum';
$lang['RULES_MODERATE'] = 'You <b>can</b> moderate this forum';
$lang['NO_TOPICS_POST_ONE'] = 'There are no posts in this forum.<br />Click on the <b>Post New Topic</b> link on this page to post one.'; $lang['NO_TOPICS_POST_ONE'] = 'There are no posts in this forum.<br />Click on the <b>Post New Topic</b> link on this page to post one.';
// Viewtopic // Viewtopic

View file

@ -213,18 +213,6 @@ $lang['TOPIC_POLL'] = '[ Опрос ]';
$lang['MARK_TOPICS_READ'] = 'Отметить все темы как прочтенные'; $lang['MARK_TOPICS_READ'] = 'Отметить все темы как прочтенные';
$lang['TOPICS_MARKED_READ'] = 'Все темы в этом форуме были отмечены как прочтенные'; $lang['TOPICS_MARKED_READ'] = 'Все темы в этом форуме были отмечены как прочтенные';
$lang['RULES_POST_CAN'] = 'Вы <b>можете</b> начинать темы';
$lang['RULES_POST_CANNOT'] = 'Вы <b>не можете</b> начинать темы';
$lang['RULES_REPLY_CAN'] = 'Вы <b>можете</b> отвечать на сообщения';
$lang['RULES_REPLY_CANNOT'] = 'Вы <b>не можете</b> отвечать на сообщения';
$lang['RULES_EDIT_CAN'] = 'Вы <b>можете</b> редактировать свои сообщения';
$lang['RULES_EDIT_CANNOT'] = 'Вы <b>не можете</b> редактировать свои сообщения';
$lang['RULES_DELETE_CAN'] = 'Вы <b>можете</b> удалять свои сообщения';
$lang['RULES_DELETE_CANNOT'] = 'Вы <b>не можете</b> удалять свои сообщения';
$lang['RULES_VOTE_CAN'] = 'Вы <b>можете</b> голосовать в опросах';
$lang['RULES_VOTE_CANNOT'] = 'Вы <b>не можете</b> голосовать в опросах';
$lang['RULES_MODERATE'] = 'Вы <b>можете</b> модерировать этот форум';
$lang['NO_TOPICS_POST_ONE'] = 'В этом форуме пока нет сообщений<br />Кликните <b>Начать новую тему</b>, и ваше сообщение станет первым.'; $lang['NO_TOPICS_POST_ONE'] = 'В этом форуме пока нет сообщений<br />Кликните <b>Начать новую тему</b>, и ваше сообщение станет первым.';
// Viewtopic // Viewtopic

View file

@ -213,18 +213,6 @@ $lang['TOPIC_POLL'] = '[ Опитування ]';
$lang['MARK_TOPICS_READ'] = 'Позначити всі теми прочитаними'; $lang['MARK_TOPICS_READ'] = 'Позначити всі теми прочитаними';
$lang['TOPICS_MARKED_READ'] = 'Всі теми цього форуму були позначені як прочитані'; $lang['TOPICS_MARKED_READ'] = 'Всі теми цього форуму були позначені як прочитані';
$lang['RULES_POST_CAN'] = 'Ви <b>можете</b> починати теми';
$lang['RULES_POST_CANNOT'] = 'Ви <b>не можете</b> починати теми';
$lang['RULES_REPLY_CAN'] = 'Ви <b>можете</b> відповідати на повідомлення';
$lang['RULES_REPLY_CANNOT'] = 'Ви <b>не можете</b> відповідати на повідомлення';
$lang['RULES_EDIT_CAN'] = 'Ви <b>можете</b> редагувати свої повідомлення';
$lang['RULES_EDIT_CANNOT'] = 'Ви <b>не можете</b> редагувати свої повідомлення';
$lang['RULES_DELETE_CAN'] = 'Ви <b>можете</b> видаляти свої повідомлення';
$lang['RULES_DELETE_CANNOT'] = 'Ви <b>не можете</b> видаляти свої повідомлення';
$lang['RULES_VOTE_CAN'] = 'Ви <b>можете</b> голосувати в опитуваннях';
$lang['RULES_VOTE_CANNOT'] = 'Ви <b>не можете</b> голосувати в опитуваннях';
$lang['RULES_MODERATE'] = 'Ви <b>можете</b> модерувати цей форум';
$lang['NO_TOPICS_POST_ONE'] = 'У цьому форумі поки немає повідомлень<br />Натисніть <b>Почати нову тему</b>, і ваше повідомлення буде першим.'; $lang['NO_TOPICS_POST_ONE'] = 'У цьому форумі поки немає повідомлень<br />Натисніть <b>Почати нову тему</b>, і ваше повідомлення буде першим.';
// Viewtopic // Viewtopic

View file

@ -658,7 +658,6 @@ td.topic_id { cursor: pointer; }
<table width="100%" cellspacing="0"> <table width="100%" cellspacing="0">
<tr> <tr>
<td width="40%" class="small"><span>{S_AUTH_LIST}</span></td>
<td width="60%" valign="top"> <td width="60%" valign="top">
<table class="bRight small"> <table class="bRight small">
<tr> <tr>

View file

@ -619,24 +619,18 @@ function build_poll_add_form (src_el)
<table width="100%"> <table width="100%">
<tr> <tr>
<td width="40%" valign="top" nowrap="nowrap"><span class="small">{S_WATCH_TOPIC}</span><br /> <td valign="top" nowrap="nowrap">
<div class="small"> <div class="small">
<!-- IF S_TOPIC_ADMIN --> <!-- IF S_TOPIC_ADMIN -->
<br clear="all" /> <br clear="all" />
<div style="float: left;">{S_TOPIC_ADMIN}</div> <div style="float: left;">{L_MANAGE}: {S_TOPIC_ADMIN}</div>
<!-- ENDIF --> <!-- ENDIF -->
<br clear="all" />
<div style="float: left;">{S_WATCH_TOPIC}</div>
<!-- IF IS_ADMIN --> <!-- IF IS_ADMIN -->
<div class="med" style="float: right;">
Admin:&nbsp;
<a href="{U_LOGS}">{L_LOGS}</a>&nbsp;
</div>
<!-- ENDIF -->
<!-- IF S_DL_DELETE -->
<br clear="all" /> <br clear="all" />
<div style="float: left;">{S_DL_DELETE}</div> <div style="float: left;"><a href="{U_LOGS}">{L_LOGS}</a></div>
<!-- ENDIF --> <!-- ENDIF -->
<br clear="all" />
<div style="float: left;">{S_AUTH_LIST}</div>
</div> </div>
</td> </td>
</tr> </tr>

View file

@ -408,18 +408,6 @@ $template->assign_vars(array(
'S_DISPLAY_ORDER' => $s_display_order, 'S_DISPLAY_ORDER' => $s_display_order,
)); ));
// User authorisation levels output
$u_auth = array();
$u_auth[] = ($is_auth['auth_post']) ? $lang['RULES_POST_CAN'] : $lang['RULES_POST_CANNOT'];
$u_auth[] = ($is_auth['auth_reply']) ? $lang['RULES_REPLY_CAN'] : $lang['RULES_REPLY_CANNOT'];
$u_auth[] = ($is_auth['auth_edit']) ? $lang['RULES_EDIT_CAN'] : $lang['RULES_EDIT_CANNOT'];
$u_auth[] = ($is_auth['auth_delete']) ? $lang['RULES_DELETE_CAN'] : $lang['RULES_DELETE_CANNOT'];
$u_auth[] = ($is_auth['auth_vote']) ? $lang['RULES_VOTE_CAN'] : $lang['RULES_VOTE_CANNOT'];
$u_auth[] = ($is_auth['auth_attachments']) ? $lang['RULES_ATTACH_CAN'] : $lang['RULES_ATTACH_CANNOT'];
$u_auth[] = ($is_auth['auth_download']) ? $lang['RULES_DOWNLOAD_CAN'] : $lang['RULES_DOWNLOAD_CANNOT'];
$u_auth[] = ($is_auth['auth_mod']) ? $lang['RULES_MODERATE'] : '';
$u_auth = join("<br />\n", $u_auth);
$template->assign_vars(array( $template->assign_vars(array(
'SHOW_JUMPBOX' => true, 'SHOW_JUMPBOX' => true,
'PAGE_TITLE' => htmlCHR($forum_data['forum_name']), 'PAGE_TITLE' => htmlCHR($forum_data['forum_name']),
@ -442,7 +430,6 @@ $template->assign_vars(array(
'TITLE_MATCH' => htmlCHR($title_match), 'TITLE_MATCH' => htmlCHR($title_match),
'SELECT_TPP' => ($select_tpp) ? build_select('tpp', $select_tpp, $topics_per_page, null, null, 'onchange="$(\'#tpp\').submit();"') : '', 'SELECT_TPP' => ($select_tpp) ? build_select('tpp', $select_tpp, $topics_per_page, null, null, 'onchange="$(\'#tpp\').submit();"') : '',
'T_POST_NEW_TOPIC' => ($forum_data['forum_status'] == FORUM_LOCKED) ? $lang['FORUM_LOCKED'] : $post_new_topic, 'T_POST_NEW_TOPIC' => ($forum_data['forum_status'] == FORUM_LOCKED) ? $lang['FORUM_LOCKED'] : $post_new_topic,
'S_AUTH_LIST' => $u_auth,
'U_VIEW_FORUM' => FORUM_URL . $forum_id, 'U_VIEW_FORUM' => FORUM_URL . $forum_id,
'U_MARK_READ' => FORUM_URL . $forum_id ."&amp;mark=topics", 'U_MARK_READ' => FORUM_URL . $forum_id ."&amp;mark=topics",
'U_SEARCH_SELF' => "search.php?uid={$userdata['user_id']}&f=$forum_id", 'U_SEARCH_SELF' => "search.php?uid={$userdata['user_id']}&f=$forum_id",

View file

@ -242,9 +242,7 @@ if ($post_id && !empty($t_data['prev_posts']))
$start = floor(($t_data['prev_posts'] - 1) / $posts_per_page) * $posts_per_page; $start = floor(($t_data['prev_posts'] - 1) / $posts_per_page) * $posts_per_page;
} }
//
// Is user watching this thread? // Is user watching this thread?
//
$can_watch_topic = $is_watching_topic = false; $can_watch_topic = $is_watching_topic = false;
if ($bb_cfg['topic_notify_enabled']) if ($bb_cfg['topic_notify_enabled'])
@ -252,7 +250,6 @@ if ($bb_cfg['topic_notify_enabled'])
if ($userdata['session_logged_in']) if ($userdata['session_logged_in'])
{ {
$can_watch_topic = TRUE; $can_watch_topic = TRUE;
if (!empty($t_data['notify_status']) && $t_data['notify_status']) if (!empty($t_data['notify_status']) && $t_data['notify_status'])
{ {
if (isset($_GET['unwatch'])) if (isset($_GET['unwatch']))
@ -260,18 +257,14 @@ if ($bb_cfg['topic_notify_enabled'])
if ($_GET['unwatch'] == 'topic') if ($_GET['unwatch'] == 'topic')
{ {
$is_watching_topic = 0; $is_watching_topic = 0;
DB()->query("DELETE FROM ". BB_TOPICS_WATCH ." WHERE topic_id = $topic_id AND user_id = {$userdata['user_id']}"); DB()->query("DELETE FROM ". BB_TOPICS_WATCH ." WHERE topic_id = $topic_id AND user_id = {$userdata['user_id']}");
} }
set_die_append_msg($forum_id, $topic_id); set_die_append_msg($forum_id, $topic_id);
bb_die($lang['NO_LONGER_WATCHING']); bb_die($lang['NO_LONGER_WATCHING']);
} }
else else
{ {
$is_watching_topic = TRUE; $is_watching_topic = TRUE;
if (!$t_data['notify_status']) if (!$t_data['notify_status'])
{ {
DB()->query("UPDATE ". BB_TOPICS_WATCH ." SET notify_status = ". TOPIC_WATCH_NOTIFIED ." WHERE topic_id = $topic_id AND user_id = {$userdata['user_id']}"); DB()->query("UPDATE ". BB_TOPICS_WATCH ." SET notify_status = ". TOPIC_WATCH_NOTIFIED ." WHERE topic_id = $topic_id AND user_id = {$userdata['user_id']}");
@ -285,16 +278,13 @@ if ($bb_cfg['topic_notify_enabled'])
if ($_GET['watch'] == 'topic') if ($_GET['watch'] == 'topic')
{ {
$is_watching_topic = TRUE; $is_watching_topic = TRUE;
DB()->query(" DB()->query("
INSERT INTO ". BB_TOPICS_WATCH ." (user_id, topic_id, notify_status) INSERT INTO ". BB_TOPICS_WATCH ." (user_id, topic_id, notify_status)
VALUES (". $userdata['user_id'] .", $topic_id, ". TOPIC_WATCH_NOTIFIED .") VALUES (". $userdata['user_id'] .", $topic_id, ". TOPIC_WATCH_NOTIFIED .")
"); ");
} }
set_die_append_msg($forum_id, $topic_id); set_die_append_msg($forum_id, $topic_id);
bb_die($lang['YOU_ARE_WATCHING']); bb_die($lang['YOU_ARE_WATCHING']);
} }
else else
{ {
@ -441,59 +431,34 @@ $reply_alt = ( $t_data['forum_status'] == FORUM_LOCKED || $t_data['topic_status'
// Set 'body' template for attach_mod // Set 'body' template for attach_mod
$template->set_filenames(array('body' => 'viewtopic.tpl')); $template->set_filenames(array('body' => 'viewtopic.tpl'));
// // Moderator output
// User authorisation levels output
//
$s_auth_can = (($is_auth['auth_post']) ? $lang['RULES_POST_CAN'] : $lang['RULES_POST_CANNOT']) . '<br />';
$s_auth_can .= (($is_auth['auth_reply']) ? $lang['RULES_REPLY_CAN'] : $lang['RULES_REPLY_CANNOT']) . '<br />';
$s_auth_can .= (($is_auth['auth_edit']) ? $lang['RULES_EDIT_CAN'] : $lang['RULES_EDIT_CANNOT']) . '<br />';
$s_auth_can .= (($is_auth['auth_delete']) ? $lang['RULES_DELETE_CAN'] : $lang['RULES_DELETE_CANNOT']) . '<br />';
$s_auth_can .= (($is_auth['auth_vote']) ? $lang['RULES_VOTE_CAN'] : $lang['RULES_VOTE_CANNOT']) . '<br />';
$s_auth_can .= (($is_auth['auth_attachments']) ? $lang['RULES_ATTACH_CAN'] : $lang['RULES_ATTACH_CANNOT']) . '<br />';
$s_auth_can .= (($is_auth['auth_download']) ? $lang['RULES_DOWNLOAD_CAN'] : $lang['RULES_DOWNLOAD_CANNOT']) . '<br />';
$topic_mod = ''; $topic_mod = '';
if ($is_auth['auth_mod']) if ($is_auth['auth_mod'])
{ {
$s_auth_can .= $lang['RULES_MODERATE']; $locked = ($t_data['topic_status'] == TOPIC_LOCKED);
$topic_mod .= "<a href=\"modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=delete&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_delete'] . '" alt="' . $lang['DELETE_TOPIC'] . '" title="' . $lang['DELETE_TOPIC'] . '" border="0" /></a>&nbsp;'; $topic_mod .= "<a href='modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=delete'><img src='{$images['topic_mod_delete']}' alt='{$lang['DELETE_TOPIC']}' title='{$lang['DELETE_TOPIC']}' border='0' /></a>&nbsp;";
$topic_mod .= "<a href=\"modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=move&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_move'] . '" alt="' . $lang['MOVE_TOPIC'] . '" title="' . $lang['MOVE_TOPIC'] . '" border="0" /></a>&nbsp;'; $topic_mod .= "<a href='modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=move'><img src='{$images['topic_mod_move']}' alt='{$lang['MOVE_TOPIC']}' title='{$lang['MOVE_TOPIC']}' border='0 /></a>&nbsp;";
$topic_mod .= ( $t_data['topic_status'] == TOPIC_UNLOCKED ) ? "<a href=\"modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=lock&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_lock'] . '" alt="' . $lang['LOCK_TOPIC'] . '" title="' . $lang['LOCK_TOPIC'] . '" border="0" /></a>&nbsp;' : "<a href=\"modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=unlock&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_unlock'] . '" alt="' . $lang['UNLOCK_TOPIC'] . '" title="' . $lang['UNLOCK_TOPIC'] . '" border="0" /></a>&nbsp;'; $topic_mod .= ($locked) ? "<a href='modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=unlock'><img src='{$images['topic_mod_unlock']}' alt='{$lang['UNLOCK_TOPIC']}' title='{$lang['UNLOCK_TOPIC']}' border='0' /></a>&nbsp;" : "<a href='modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=lock'><img src='{$images['topic_mod_lock']}' alt='{$lang['LOCK_TOPIC']}' title='{$lang['LOCK_TOPIC']}' border='0' /></a>&nbsp;";
$topic_mod .= "<a href=\"modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=split&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_split'] . '" alt="' . $lang['SPLIT_TOPIC'] . '" title="' . $lang['SPLIT_TOPIC'] . '" border="0" /></a>&nbsp;'; $topic_mod .= "<a href='modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=split'><img src='{$images['topic_mod_split']}' alt='{$lang['SPLIT_TOPIC']}' title='{$lang['SPLIT_TOPIC']}' border='0' /></a>&nbsp;";
if ($t_data['allow_reg_tracker'] || $t_data['topic_dl_type'] == TOPIC_DL_TYPE_DL || IS_ADMIN)
{
if ($t_data['topic_dl_type'] == TOPIC_DL_TYPE_DL)
{
$topic_mod .= "<a href=\"modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=unset_download&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_normal'] . '" alt="' . $lang['UNSET_DL_STATUS'] . '" title="' . $lang['UNSET_DL_STATUS'] . '" border="0" /></a>';
}
else
{
$topic_mod .= "<a href=\"modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=set_download&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_dl'] . '" alt="' . $lang['SET_DL_STATUS'] . '" title="' . $lang['SET_DL_STATUS'] . '" border="0" /></a>';
}
}
} }
elseif (($t_data['topic_poster'] == $userdata['user_id']) && $userdata['session_logged_in'] && $t_data['self_moderated']) elseif (($t_data['topic_poster'] == $userdata['user_id']) && $userdata['session_logged_in'] && $t_data['self_moderated'])
{ {
$topic_mod .= "<a href=\"modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=move&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_move'] . '" alt="' . $lang['MOVE_TOPIC'] . '" title="' . $lang['MOVE_TOPIC'] . '" border="0" /></a>&nbsp;'; $topic_mod .= "<a href='modcp.php?" . POST_TOPIC_URL . "=$topic_id&amp;mode=move'><img src='{$images['topic_mod_move']}' alt='{$lang['MOVE_TOPIC']}' title='{$lang['MOVE_TOPIC']}' border='0' /></a>&nbsp;";
} }
//
// Topic watch information // Topic watch information
//
$s_watching_topic = $s_watching_topic_img = ''; $s_watching_topic = $s_watching_topic_img = '';
if ($can_watch_topic) if ($can_watch_topic)
{ {
if ($is_watching_topic) if ($is_watching_topic)
{ {
$s_watching_topic = "<a href=\"". TOPIC_URL . $topic_id ."&amp;unwatch=topic&amp;start=$start&amp;sid=" . $userdata['session_id'] . '">' . $lang['STOP_WATCHING_TOPIC'] . '</a>'; $s_watching_topic = "<a href='". TOPIC_URL . $topic_id ."&amp;unwatch=topic'>{$lang['STOP_WATCHING_TOPIC']}</a>";
$s_watching_topic_img = (isset($images['topic_un_watch'])) ? "<a href=\"" . TOPIC_URL . "$topic_id&amp;unwatch=topic&amp;start=$start&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_un_watch'] . '" alt="' . $lang['STOP_WATCHING_TOPIC'] . '" title="' . $lang['STOP_WATCHING_TOPIC'] . '" border="0"></a>' : ''; $s_watching_topic_img = (isset($images['topic_un_watch'])) ? "<a href='" . TOPIC_URL . "$topic_id&amp;unwatch=topic'><img src='{$images['topic_un_watch']}' alt='{$lang['STOP_WATCHING_TOPIC']}' title='{$lang['STOP_WATCHING_TOPIC']}' border='0'></a>" : '';
} }
else else
{ {
$s_watching_topic = "<a href=\"". TOPIC_URL . $topic_id ."&amp;watch=topic&amp;start=$start&amp;sid=" . $userdata['session_id'] . '">' . $lang['START_WATCHING_TOPIC'] . '</a>'; $s_watching_topic = "<a href='". TOPIC_URL . $topic_id ."&amp;watch=topic'>{$lang['START_WATCHING_TOPIC']}</a>";
$s_watching_topic_img = (isset($images['Topic_watch'])) ? "<a href=\"". TOPIC_URL ."$topic_id&amp;watch=topic&amp;start=$start&amp;sid=" . $userdata['session_id'] . '"><img src="' . $images['Topic_watch'] . '" alt="' . $lang['START_WATCHING_TOPIC'] . '" title="' . $lang['START_WATCHING_TOPIC'] . '" border="0"></a>' : ''; $s_watching_topic_img = (isset($images['topic_watch'])) ? "<a href='". TOPIC_URL ."$topic_id&amp;watch=topic'><img src='{$images['topic_watch']}' alt='{$lang['START_WATCHING_TOPIC']}' title='{$lang['START_WATCHING_TOPIC']}' border='0'></a>" : '';
} }
} }
@ -507,9 +472,7 @@ $pg_url .= ($posts_per_page != $bb_cfg['posts_per_page']) ? "&amp;ppp=$posts_per
generate_pagination($pg_url, $total_replies, $posts_per_page, $start); generate_pagination($pg_url, $total_replies, $posts_per_page, $start);
//
// Selects // Selects
//
$sel_previous_days = array( $sel_previous_days = array(
0 => $lang['ALL_POSTS'], 0 => $lang['ALL_POSTS'],
1 => $lang['1_DAY'], 1 => $lang['1_DAY'],
@ -571,7 +534,6 @@ $template->assign_vars(array(
'S_SELECT_POST_DAYS' => build_select('postdays', array_flip($sel_previous_days), $post_days), 'S_SELECT_POST_DAYS' => build_select('postdays', array_flip($sel_previous_days), $post_days),
'S_SELECT_POST_ORDER' => build_select('postorder', $sel_post_order_ary, $post_order), 'S_SELECT_POST_ORDER' => build_select('postorder', $sel_post_order_ary, $post_order),
'S_POST_DAYS_ACTION' => TOPIC_URL . $topic_id . "&amp;start=$start", 'S_POST_DAYS_ACTION' => TOPIC_URL . $topic_id . "&amp;start=$start",
'S_AUTH_LIST' => $s_auth_can,
'S_TOPIC_ADMIN' => $topic_mod, 'S_TOPIC_ADMIN' => $topic_mod,
'S_WATCH_TOPIC' => $s_watching_topic, 'S_WATCH_TOPIC' => $s_watching_topic,
'S_WATCH_TOPIC_IMG' => $s_watching_topic_img, 'S_WATCH_TOPIC_IMG' => $s_watching_topic_img,
@ -883,7 +845,7 @@ $template->assign_vars(array(
if (IS_ADMIN) if (IS_ADMIN)
{ {
$template->assign_vars(array( $template->assign_vars(array(
'U_LOGS' => "admin/admin_log.php?sid={$userdata['session_id']}&amp;t=$topic_id&amp;db=900", 'U_LOGS' => "admin/admin_log.php?t=$topic_id&amp;db=365",
)); ));
} }