Черновики до конца не доделаны, есть пара нюансов. За правки в шаблоне админки спасибо T-John. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@499 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
gemini_13@torba.su 2013-04-13 22:11:47 +00:00
commit ebad74456a
21 changed files with 151 additions and 108 deletions

View file

@ -45,6 +45,7 @@ switch ($ajax->action)
break; break;
case 'manage_user': case 'manage_user':
case 'modify_draft':
require(INC_DIR .'functions_admin.php'); require(INC_DIR .'functions_admin.php');
break; break;
@ -535,13 +536,13 @@ class ajax_common
$mode = (int)$this->request['mode']; $mode = (int)$this->request['mode'];
$sql = "SELECT * FROM ". BB_TOPICS ." WHERE topic_id = {$tid}"; $sql = "SELECT * FROM ". BB_TOPICS ." WHERE topic_id = {$tid}";
if (!$row = DB()->fetch_row($sql)) $this->ajax_die('Нет такого черновика'); if (!$row = DB()->fetch_row($sql)) $this->ajax_die($lang['TOPIC_POST_NOT_EXIST']);
if ($row['topic_poster'] != $userdata['user_id'] && !IS_ADMIN) $this->ajax_die('Нельзя удалять чужие черновики'); if ($row['topic_poster'] != $userdata['user_id'] && !IS_ADMIN) $this->ajax_die($lang['CANNOT_DELETE_DRAFT']);
if (!$mode) if (!$mode)
{ {
DB()->query("DELETE FROM ". BB_TOPICS ." WHERE topic_id = {$tid} LIMIT 1"); topic_delete($tid);
} }
else else
{ {

View file

@ -11,6 +11,8 @@ switch ($mode)
case 'active_torrents': case 'active_torrents':
$user_id = (int) $this->request['user_id']; $user_id = (int) $this->request['user_id'];
if(!$user_id) $this->ajax_die($lang['NO_USER_ID_SPECIFIED']); 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']);
$excluded_forums_csv = $user->get_excluded_forums(AUTH_VIEW); $excluded_forums_csv = $user->get_excluded_forums(AUTH_VIEW);
$not_auth_forums_sql = ($excluded_forums_csv) ? " $not_auth_forums_sql = ($excluded_forums_csv) ? "
@ -18,6 +20,21 @@ switch ($mode)
AND f.forum_parent NOT IN($excluded_forums_csv) AND f.forum_parent NOT IN($excluded_forums_csv)
" : ''; " : '';
$dl = ' ';
if(IS_AM || $user_id == $userdata['user_id'])
{
$dl_link = "search.php?dlu=$user_id&";
$dl = '
<a href="'. $dl_link .'dlw=1" class="med">'. $lang['SEARCH_DL_WILL_DOWNLOADS'] .'</a>
::
<a href="'. $dl_link .'dld=1" class="med">'. $lang['SEARCH_DL_DOWN'] .'</a>
::
<a href="'. $dl_link .'dlc=1" class="med">'. $lang['SEARCH_DL_COMPLETE'] .'</a>
::
<a href="'. $dl_link .'dla=1" class="med">'. $lang['SEARCH_DL_CANCEL'] .'</a>
';
}
$sql = " $sql = "
SELECT SELECT
f.forum_id, f.forum_name, f.forum_id, f.forum_name,
@ -40,10 +57,11 @@ switch ($mode)
$this->ajax_die('Could not query users torrent profile information', '', __LINE__, __FILE__, $sql); $this->ajax_die('Could not query users torrent profile information', '', __LINE__, __FILE__, $sql);
} }
$r = $s = $l = $releasing_count = $seeding_count = $leeching_count = 0;
if ($rowset = DB()->sql_fetchrowset($result)) if ($rowset = DB()->sql_fetchrowset($result))
{ {
$html = ''; $html = '';
$r = $s = $l = $releasing_count = $seeding_count = $leeching_count = 0;
for ($i=0; $i<count($rowset); $i++) for ($i=0; $i<count($rowset); $i++)
{ {
$is_gold = ''; $is_gold = '';
@ -111,31 +129,47 @@ switch ($mode)
$releasing_count = ($releasing_count) ? $releasing_count .' ('. humn_size($r) .')' : 0; $releasing_count = ($releasing_count) ? $releasing_count .' ('. humn_size($r) .')' : 0;
$seeding_count = ($seeding_count) ? $seeding_count .' ('. humn_size($s) .')' : 0; $seeding_count = ($seeding_count) ? $seeding_count .' ('. humn_size($s) .')' : 0;
$leeching_count = ($leeching_count) ? $leeching_count .' ('. humn_size($l) .')' : 0; $leeching_count = ($leeching_count) ? $leeching_count .' ('. humn_size($l) .')' : 0;
}
$dl = '&nbsp;'; else
if (!empty($page_cfg['dl_links_user_id']))
{ {
$dl_link = "search.php?dlu={$page_cfg['dl_links_user_id']}&amp;"; $html = '
$dl = ' <tr class="row1">
<a href="'. $dl_link .'dlw=1" class="med">'. $lang['SEARCH_DL_WILL_DOWNLOADS'] .'</a> <td colspan="4" class="tCenter pad_4">'. $lang['NONE'] .'</td>
:: </tr>
<a href="'. $dl_link .'dld=1" class="med">'. $lang['SEARCH_DL_DOWN'] .'</a>
::
<a href="'. $dl_link .'dlc=1" class="med">'. $lang['SEARCH_DL_COMPLETE'] .'</a>
::
<a href="'. $dl_link .'dla=1" class="med">'. $lang['SEARCH_DL_CANCEL'] .'</a>
'; ';
} }
$this->response['active_torrents'] = ' $this->response['active_torrents'] = '
<a name="torrent"></a> <a name="torrent"></a>
<div class="spacer_8"></div> <div class="spacer_8"></div>
<div class="pagetitle tCenter">'. $lang['CUR_ACTIVE_DLS'] .'</div> <h1 class="pagetitle tCenter">'. $lang['CUR_ACTIVE_DLS'] .'</h1>
<div class="bold tCenter">'. $lang['RELEASING'] .': <span class="dlComplete">'. $releasing_count .'</span> :: '. $lang['SEEDING'] .': <span class="dlComplete">' . $seeding_count .'</span> :: '. $lang['LEECHING'] .': <span class="dlDown">' . $leeching_count .'</span></div> <div class="bold tCenter">'. $lang['RELEASING'] .': <span class="dlComplete">'. $releasing_count .'</span> :: '. $lang['SEEDING'] .': <span class="dlComplete">' . $seeding_count .'</span> :: '. $lang['LEECHING'] .': <span class="dlDown">' . $leeching_count .'</span></div>
<div class="spacer_8"></div> <div class="spacer_8"></div>
<div class="fon2"> <div class="fon2">
<table class="forumline"> <table class="forumline">
<tr> <tr>
<th><b class="tbs-text">'. $lang['TYPE'] .'</b></th> <th><b class="tbs-text">'. $lang['TYPE'] .'</b></th>
@ -152,7 +186,8 @@ switch ($mode)
</table> </table>
</div> </div>
'; ';
}
else $this->ajax_die($lang['CUR_ACTIVE_DLS_ERROR']);
break; break;
} }

View file

@ -56,8 +56,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Increase number of revision after update // Increase number of revision after update
$bb_cfg['tp_version'] = '2.5 pre-stable'; $bb_cfg['tp_version'] = '2.5 pre-stable';
$bb_cfg['tp_release_date'] = '11-03-2013'; $bb_cfg['tp_release_date'] = '14-04-2013';
$bb_cfg['tp_release_state'] = 'R497'; $bb_cfg['tp_release_state'] = 'R499';
// Database // Database
$charset = 'utf8'; $charset = 'utf8';

View file

@ -176,7 +176,6 @@ class emailer
$bcc = (@count($this->addresses['bcc'])) ? implode(', ', $this->addresses['bcc']) : ''; $bcc = (@count($this->addresses['bcc'])) ? implode(', ', $this->addresses['bcc']) : '';
// Build header // Build header
//$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $bb_cfg['board_email'] . "\n") . "Return-Path: " . $bb_cfg['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $bb_cfg['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : '');
$this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $bb_cfg['board_email'] . "\n") . "Return-Path: " . $bb_cfg['board_email'] . "\nMessage-ID: <" . md5(uniqid(TIMENOW)) . "@" . $bb_cfg['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', TIMENOW) . "\nX-Priority: 0\nX-MSMail-Priority: Normal\nX-Mailer: Microsoft Office Outlook, Build 11.0.5510\nX-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441\nX-Sender: " . $bb_cfg['board_email'] . "\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : ''); $this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $bb_cfg['board_email'] . "\n") . "Return-Path: " . $bb_cfg['board_email'] . "\nMessage-ID: <" . md5(uniqid(TIMENOW)) . "@" . $bb_cfg['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', TIMENOW) . "\nX-Priority: 0\nX-MSMail-Priority: Normal\nX-Mailer: Microsoft Office Outlook, Build 11.0.5510\nX-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441\nX-Sender: " . $bb_cfg['board_email'] . "\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : '');
// Send message ... removed $this->encode() from subject for time being // Send message ... removed $this->encode() from subject for time being

View file

@ -278,19 +278,6 @@ $template->assign_vars(array(
'U_SEARCH_SELF_BY_LAST' => "search.php?uid={$userdata['user_id']}&amp;o=5", 'U_SEARCH_SELF_BY_LAST' => "search.php?uid={$userdata['user_id']}&amp;o=5",
)); ));
if (!empty($page_cfg['dl_links_user_id']))
{
$dl_link = "search.php?dlu={$page_cfg['dl_links_user_id']}&amp;";
$template->assign_vars(array(
'SHOW_SEARCH_DL' => true,
'U_SEARCH_DL_WILL' => $dl_link .'dlw=1',
'U_SEARCH_DL_DOWN' => $dl_link .'dld=1',
'U_SEARCH_DL_COMPLETE' => $dl_link .'dlc=1',
'U_SEARCH_DL_CANCEL' => $dl_link .'dla=1',
));
}
if (!empty($page_cfg['show_torhelp'][BB_SCRIPT]) && !empty($userdata['torhelp'])) if (!empty($page_cfg['show_torhelp'][BB_SCRIPT]) && !empty($userdata['torhelp']))
{ {
$ignore_time = !empty($_COOKIE['torhelp']) ? (int) $_COOKIE['torhelp'] : 0; $ignore_time = !empty($_COOKIE['torhelp']) ? (int) $_COOKIE['torhelp'] : 0;

View file

@ -433,7 +433,7 @@ class SphinxClient extends cache_common
// per-query settings // per-query settings
$this->_offset = 0; $this->_offset = 0;
$this->_limit = 20; $this->_limit = 2000;
$this->_mode = SPH_MATCH_ALL; $this->_mode = SPH_MATCH_ALL;
$this->_weights = array (); $this->_weights = array ();
$this->_sort = SPH_SORT_RELEVANCE; $this->_sort = SPH_SORT_RELEVANCE;

View file

@ -96,8 +96,16 @@ else if ($signature)
$signature = bbcode2html($signature); $signature = bbcode2html($signature);
} }
$count_draft = DB()->fetch_row("SELECT COUNT(topic_id) as count FROM ". BB_TOPICS . " WHERE topic_poster = {$profiledata['user_id']} AND is_draft=1"); if($bb_cfg['status_of_draft'])
$count_draft = $count_draft["count"]; {
$count_draft = DB()->fetch_row("
SELECT COUNT(topic_id) as count
FROM ". BB_TOPICS . "
WHERE topic_poster = {$profiledata['user_id']}
AND is_draft = 1
");
$count_draft = $count_draft["count"];
}
$template->assign_vars(array( $template->assign_vars(array(
'PAGE_TITLE' => sprintf($lang['VIEWING_USER_PROFILE'], $profiledata['username']), 'PAGE_TITLE' => sprintf($lang['VIEWING_USER_PROFILE'], $profiledata['username']),
@ -119,7 +127,7 @@ $template->assign_vars(array(
'LOCATION' => $profiledata['user_from'], 'LOCATION' => $profiledata['user_from'],
'USER_ACTIVE' => $profiledata['user_active'], 'USER_ACTIVE' => $profiledata['user_active'],
'COUNT_DRAFT' => $count_draft, 'COUNT_DRAFT' => ($bb_cfg['status_of_draft']) ? $count_draft : '',
'OCCUPATION' => $profiledata['user_occ'], 'OCCUPATION' => $profiledata['user_occ'],
'INTERESTS' => $profiledata['user_interests'], 'INTERESTS' => $profiledata['user_interests'],
'SKYPE' => $profiledata['user_skype'], 'SKYPE' => $profiledata['user_skype'],
@ -143,6 +151,7 @@ $template->assign_vars(array(
'SHOW_ROLE' => (IS_AM || $profile_user_id || $profiledata['user_active']), 'SHOW_ROLE' => (IS_AM || $profile_user_id || $profiledata['user_active']),
'GROUP_MEMBERSHIP' => false, 'GROUP_MEMBERSHIP' => false,
'TRAF_STATS' => !(IS_AM || $profile_user_id), 'TRAF_STATS' => !(IS_AM || $profile_user_id),
'U_MANAGE' => (IS_ADMIN) ? "profile.php?mode=editprofile&amp;u={$profiledata['user_id']}" : 'profile.php?mode=editprofile',
)); ));
if (IS_ADMIN) if (IS_ADMIN)
@ -214,8 +223,6 @@ if (IS_ADMIN)
{ {
$template->assign_vars(array( $template->assign_vars(array(
'EDITABLE_TPLS' => true, 'EDITABLE_TPLS' => true,
'U_MANAGE' => "profile.php?mode=editprofile&amp;u={$profiledata['user_id']}",
'U_PERMISSIONS' => "admin/admin_ug_auth.php?mode=user&amp;u={$profiledata['user_id']}", 'U_PERMISSIONS' => "admin/admin_ug_auth.php?mode=user&amp;u={$profiledata['user_id']}",
)); ));

View file

@ -225,6 +225,7 @@ $lang['TOPIC_ANNOUNCEMENT'] = 'Announcement:';
$lang['TOPIC_STICKY'] = 'Sticky:'; $lang['TOPIC_STICKY'] = 'Sticky:';
$lang['TOPIC_MOVED'] = 'Moved:'; $lang['TOPIC_MOVED'] = 'Moved:';
$lang['TOPIC_POLL'] = '[ Poll ]'; $lang['TOPIC_POLL'] = '[ Poll ]';
$lang['TOPIC_DRAFT'] = '[ Draft ]';
$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 now been marked read'; $lang['TOPICS_MARKED_READ'] = 'The topics for this forum have now been marked read';
@ -383,6 +384,7 @@ $lang['ATTACH_SIGNATURE'] = 'Attach signature (signatures can be changed in prof
$lang['NOTIFY'] = 'Notify me when a reply is posted'; $lang['NOTIFY'] = 'Notify me when a reply is posted';
$lang['TO_DRAFT'] = 'Save as Draft'; $lang['TO_DRAFT'] = 'Save as Draft';
$lang['DRAFTS'] = 'Drafts'; $lang['DRAFTS'] = 'Drafts';
$lang['CANNOT_DELETE_DRAFT'] = 'Sorry, but you may not delete other user\'s drafts';
$lang['STORED'] = 'Your message has been entered successfully.'; $lang['STORED'] = 'Your message has been entered successfully.';
$lang['DELETED'] = 'Your message has been deleted successfully.'; $lang['DELETED'] = 'Your message has been deleted successfully.';

View file

@ -223,6 +223,7 @@ $lang['TOPIC_ANNOUNCEMENT'] = 'Объявление:';
$lang['TOPIC_STICKY'] = 'Прилеплена:'; $lang['TOPIC_STICKY'] = 'Прилеплена:';
$lang['TOPIC_MOVED'] = 'Перемещена:'; $lang['TOPIC_MOVED'] = 'Перемещена:';
$lang['TOPIC_POLL'] = '[ Опрос ]'; $lang['TOPIC_POLL'] = '[ Опрос ]';
$lang['TOPIC_DRAFT'] = '[ Черновик ]';
$lang['MARK_TOPICS_READ'] = 'Отметить все темы как прочтённые'; $lang['MARK_TOPICS_READ'] = 'Отметить все темы как прочтённые';
$lang['TOPICS_MARKED_READ'] = 'Все темы в этом форуме были отмечены как прочтённые'; $lang['TOPICS_MARKED_READ'] = 'Все темы в этом форуме были отмечены как прочтённые';
@ -385,6 +386,7 @@ $lang['ATTACH_SIGNATURE'] = 'Присоединить подпись (можно
$lang['NOTIFY'] = 'Сообщать мне о получении ответа'; $lang['NOTIFY'] = 'Сообщать мне о получении ответа';
$lang['TO_DRAFT'] = 'Сохранить как черновик'; $lang['TO_DRAFT'] = 'Сохранить как черновик';
$lang['DRAFTS'] = 'Черновиков'; $lang['DRAFTS'] = 'Черновиков';
$lang['CANNOT_DELETE_DRAFT'] = 'Извините, вы не можете удалять чужие черновики';
$lang['STORED'] = 'Ваше сообщение было успешно добавлено'; $lang['STORED'] = 'Ваше сообщение было успешно добавлено';
$lang['DELETED'] = 'Ваше сообщение было успешно удалено'; $lang['DELETED'] = 'Ваше сообщение было успешно удалено';

View file

@ -525,10 +525,28 @@ else if ( ($submit || $confirm) && !$topic_has_new_posts )
if (!in_array($mode, array('editpost', 'delete', 'poll_delete'))) if (!in_array($mode, array('editpost', 'delete', 'poll_delete')))
{ {
$user_id = ( $mode == 'reply' || $mode == 'newtopic' ) ? $userdata['user_id'] : $post_data['poster_id']; $user_id = ( $mode == 'reply' || $mode == 'newtopic' ) ? $userdata['user_id'] : $post_data['poster_id'];
if (!isset($_POST['to_draft'])) if (!$to_draft)
{ {
update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id); update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id);
} }
else
{
update_post_stats('delete', $post_data, $forum_id, $topic_id, $post_id, $user_id);
}
}
if ($mode == 'editpost')
{
if ($post_info['is_draft'] != $to_draft)
{
if ($to_draft)
{
update_post_stats('delete', $post_data, $forum_id, $topic_id, $post_id, $post_data['poster_id']);
}
else
{
update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $post_data['poster_id']);
}
}
} }
$attachment_mod['posting']->insert_attachment($post_id); $attachment_mod['posting']->insert_attachment($post_id);

View file

@ -25,10 +25,6 @@ if (isset($_POST['del_my_post']))
<a href="index.php">'. $lang['INDEX_RETURN'] .'</a> <a href="index.php">'. $lang['INDEX_RETURN'] .'</a>
'); ');
if (IS_GUEST)
{
redirect('index.php');
}
if (empty($_POST['topic_id_list']) OR !$topic_csv = get_id_csv($_POST['topic_id_list'])) if (empty($_POST['topic_id_list']) OR !$topic_csv = get_id_csv($_POST['topic_id_list']))
{ {
bb_die($lang['NONE_SELECTED']); bb_die($lang['NONE_SELECTED']);

View file

@ -108,14 +108,14 @@
</tr> </tr>
<tr> <tr>
<td class="row1" colspan="2" align="right"><span class="gen">{L_FORUM}:</span></td> <td class="row1" colspan="2" align="right"><span class="gen">{L_FORUM}:</span></td>
<td class="row2" colspan="2"><select class="post" name="search_forum">{S_FORUM_OPTIONS}</select></span></td> <td class="row2" colspan="2"><select class="post" name="search_forum">{S_FORUM_OPTIONS}</select></td>
</tr> </tr>
<tr> <tr>
<td class="row1" colspan="2" align="right"><span class="gen">{L_SORT_BY}:&nbsp;</span></td> <td class="row1" colspan="2" align="right"><span class="gen">{L_SORT_BY}:&nbsp;</span></td>
<td class="row2" colspan="2">{S_SORT_OPTIONS}</span></td> <td class="row2" colspan="2">{S_SORT_OPTIONS}</td>
<tr> <tr>
<td class="row1" colspan="2" align="right"><span class="gen">{L_SORT}:&nbsp;</span></td> <td class="row1" colspan="2" align="right"><span class="gen">{L_SORT}:&nbsp;</span></td>
<td class="row2" colspan="2">{S_SORT_ORDER}</span></td> <td class="row2" colspan="2">{S_SORT_ORDER}</td>
</tr> </tr>
<tr> <tr>
<td class="catBottom" colspan="4">{S_HIDDEN_FIELDS}<input class="liteoption" type="submit" name="search" value="{L_SEARCH}" /></td> <td class="catBottom" colspan="4">{S_HIDDEN_FIELDS}<input class="liteoption" type="submit" name="search" value="{L_SEARCH}" /></td>
@ -133,8 +133,10 @@
<form method="post" action="{S_MODE_ACTION}"> <form method="post" action="{S_MODE_ACTION}">
<table width="100%"> <table width="100%">
<tr> <tr>
<td align="right" nowrap="nowrap"><span class="med">{L_VIEW}:&nbsp;{S_VIEW_SELECT}&nbsp;&nbsp;{L_SORT_BY}:&nbsp;{S_MODE_SELECT}&nbsp;&nbsp;{L_ORDER}&nbsp;{S_ORDER_SELECT}&nbsp;&nbsp; <td align="right" nowrap="nowrap">
<span class="med">{L_VIEW}:&nbsp;{S_VIEW_SELECT}&nbsp;&nbsp;{L_SORT_BY}:&nbsp;{S_MODE_SELECT}&nbsp;&nbsp;{L_ORDER}&nbsp;{S_ORDER_SELECT}&nbsp;&nbsp;
<input type="submit" name="submit" value="{L_SUBMIT}" class="liteoption" /> <input type="submit" name="submit" value="{L_SUBMIT}" class="liteoption" />
</span>
</td> </td>
</tr> </tr>
</table> </table>

View file

@ -52,7 +52,7 @@
</tr> </tr>
<tr> <tr>
<td><h4>{L_ALLOW_GUEST_DL}</h4><!-- IF L_ALLOW_GUEST_DL_EXPL --><h6>{L_ALLOW_GUEST_DL_EXPL}</h6><!-- ENDIF --></td> <td><h4>{L_ALLOW_GUEST_DL}</h4><!-- IF L_ALLOW_GUEST_DL_EXPL --><h6>{L_ALLOW_GUEST_DL_EXPL}</h6><!-- ENDIF --></td>
<td><span class="gen">&nbsp; <!-- IF $bb_cfg['bt_tor_browse_only_reg'] -->{L_NO}<!-- ELSE -->{L_YES}<!-- ENDIF --></td> <td>&nbsp; <!-- IF $bb_cfg['bt_tor_browse_only_reg'] -->{L_NO}<!-- ELSE -->{L_YES}<!-- ENDIF --></td>
</tr> </tr>
<tr> <tr>

View file

@ -140,7 +140,7 @@
<td class="row2" align="center">&nbsp;</td> <td class="row2" align="center">&nbsp;</td>
<td class="row2" align="center">&nbsp;</td> <td class="row2" align="center">&nbsp;</td>
<td class="row2" align="center">&nbsp;</td> <td class="row2" align="center">&nbsp;</td>
<tr> </tr>
<!-- END extensionrow --> <!-- END extensionrow -->
<!-- END grouprow --> <!-- END grouprow -->

View file

@ -19,8 +19,8 @@
<td class="row2"><span class="gen"><input class="post" type="text" name="subject" size="45" maxlength="100" tabindex="2" class="post" value="{SUBJECT}" /></span></td> <td class="row2"><span class="gen"><input class="post" type="text" name="subject" size="45" maxlength="100" tabindex="2" class="post" value="{SUBJECT}" /></span></td>
</tr> </tr>
<tr> <tr>
<td class="row1" align="right" valign="top"> <span class="gen"><b>{L_MESSAGE}</b></span> <td class="row1" align="right" valign="top"> <span class="gen"><b>{L_MESSAGE}</b></span></td>
<td class="row2"><span class="gen"> <textarea name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3" class="post">{MESSAGE}</textarea></span> <td class="row2"><span class="gen"> <textarea name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3" class="post">{MESSAGE}</textarea></span></td>
</tr> </tr>
<tr> <tr>
<td class="catBottom" colspan="2"><input type="submit" value="{L_EMAIL}" name="submit" class="mainoption" /></td> <td class="catBottom" colspan="2"><input type="submit" value="{L_EMAIL}" name="submit" class="mainoption" /></td>

View file

@ -25,6 +25,7 @@
<tr> <tr>
<td width="40%"><h4>{L_STYLE_COLOR}</h4><br /> <td width="40%"><h4>{L_STYLE_COLOR}</h4><br />
<h6>{L_STYLE_COLOR_FAQ}</h6> <h6>{L_STYLE_COLOR_FAQ}</h6>
</td>
<td> <td>
<input class="post" type="text" name="style" size="60" maxlength="40" value="{STYLE}" /> <input class="post" type="text" name="style" size="60" maxlength="40" value="{STYLE}" />
</td> </td>

View file

@ -173,7 +173,7 @@ function updateButton()
<!-- IF SESSION_PERCENT_BOX --> <!-- IF SESSION_PERCENT_BOX -->
<div style="width: 200px; border: 1px solid #6E3A20; background: #FFFFFF;"> <div style="width: 200px; border: 1px solid #6E3A20; background: #FFFFFF;">
<div class="spacer_6" style="width: {SESSION_PERCENT_WIDTH}%; background: #2E8F58;"></div> <div class="spacer_6" style="width: {SESSION_PERCENT_WIDTH}%; background: #2E8F58;"></div>
<div> </div>
<!-- ENDIF / SESSION_PERCENT_BOX --> <!-- ENDIF / SESSION_PERCENT_BOX -->
</td> </td>
</tr> </tr>
@ -185,7 +185,7 @@ function updateButton()
<!-- IF TOTAL_PERCENT_BOX --> <!-- IF TOTAL_PERCENT_BOX -->
<div style="width: 200px; border: 1px solid #6E3A20; background: #FFFFFF;"> <div style="width: 200px; border: 1px solid #6E3A20; background: #FFFFFF;">
<div class="spacer_6" style="width: {TOTAL_PERCENT_WIDTH}%; background: #2E8F58;"></div> <div class="spacer_6" style="width: {TOTAL_PERCENT_WIDTH}%; background: #2E8F58;"></div>
<div> </div>
<!-- ENDIF / TOTAL_PERCENT_BOX --> <!-- ENDIF / TOTAL_PERCENT_BOX -->
</td> </td>
</tr> </tr>

View file

@ -180,7 +180,7 @@
<td>&nbsp;{userrow.USER}&nbsp;</td> <td>&nbsp;{userrow.USER}&nbsp;</td>
<td>&nbsp;{userrow.EMAIL}&nbsp;</td> <td>&nbsp;{userrow.EMAIL}&nbsp;</td>
<td>&nbsp;{userrow.JOINDATE}&nbsp;</td> <td>&nbsp;{userrow.JOINDATE}&nbsp;</td>
<td>&nbsp;<a href="{userrow.U_VIEWPOSTS}" class="gen" target="_blank">{userrow.POSTS}&nbsp;</span></td> <td>&nbsp;<a href="{userrow.U_VIEWPOSTS}" class="gen" target="_blank">{userrow.POSTS}&nbsp;</td>
<td>&nbsp;{userrow.LASTVISIT}&nbsp;</td> <td>&nbsp;{userrow.LASTVISIT}&nbsp;</td>
<td>&nbsp;<a href="{userrow.U_MANAGE}" class="gen">{L_MANAGE}</a>&nbsp;</td> <td>&nbsp;<a href="{userrow.U_MANAGE}" class="gen">{L_MANAGE}</a>&nbsp;</td>
<td>&nbsp;<a href="{userrow.U_PERMISSIONS}" class="gen">{L_PERMISSIONS}</a>&nbsp;</td> <td>&nbsp;<a href="{userrow.U_PERMISSIONS}" class="gen">{L_PERMISSIONS}</a>&nbsp;</td>

View file

@ -179,11 +179,9 @@ ajax.callback.view_profile = function(data) {
<div class="nav"> <div class="nav">
<p class="floatL"><a href="{U_INDEX}">{T_INDEX}</a></p> <p class="floatL"><a href="{U_INDEX}">{T_INDEX}</a></p>
<!-- IF IS_ADMIN -->
<p class="floatR"> <p class="floatR">
<a href="{U_MANAGE}">{L_PROFILE}</a> &middot; <!-- IF IS_ADMIN || PROFILE_USER --><a href="{U_MANAGE}">{L_EDIT_PROFILE}</a><!-- ENDIF -->
<a href="{U_PERMISSIONS}">{L_PERMISSIONS}</a> <!-- IF IS_ADMIN --> &middot; <a href="{U_PERMISSIONS}">{L_PERMISSIONS}</a><!-- ENDIF -->
<!-- ENDIF -->
<div class="clear"></div> <div class="clear"></div>
</div> </div>
@ -417,7 +415,7 @@ ajax.callback.view_profile = function(data) {
<td id="ignore_srv_load">{L_ACCESS_SRV_LOAD}: <b class="editable">{IGNORE_SRV_LOAD}</b></td> <td id="ignore_srv_load">{L_ACCESS_SRV_LOAD}: <b class="editable">{IGNORE_SRV_LOAD}</b></td>
</tr> </tr>
<!-- ENDIF --> <!-- ENDIF -->
<!-- IF PROFILE_USER || IS_ADMIN --> <!-- IF PROFILE_USER || IS_ADMIN && $bb_cfg['status_of_draft'] -->
<tr> <tr>
<th>{L_DRAFTS}:</th> <th>{L_DRAFTS}:</th>
<td><a href="profile.php?mode=viewdraft&u={PROFILE_USER_ID}"><b>{COUNT_DRAFT}</b></a></td> <td><a href="profile.php?mode=viewdraft&u={PROFILE_USER_ID}"><b>{COUNT_DRAFT}</b></a></td>
@ -463,7 +461,7 @@ ajax.callback.view_profile = function(data) {
<td colspan="1">{L_MAX_SPEED}</td> <td colspan="1">{L_MAX_SPEED}</td>
<td colspan="2">{L_DL_DL_SPEED}: {SPEED_DOWN}</td> <td colspan="2">{L_DL_DL_SPEED}: {SPEED_DOWN}</td>
<td colspan="2">{L_DL_UL_SPEED}: {SPEED_UP}</td> <td colspan="2">{L_DL_UL_SPEED}: {SPEED_UP}</td>
<!-- IF $bb_cfg['seed_bonus_enabled'] --><td colspan="1"><!-- IF EDIT_PROF --><a href="profile.php?mode=bonus">{L_EXCHANGE}</a><!-- ENDIF --></td><!-- ENDIF --> <!-- IF $bb_cfg['seed_bonus_enabled'] --><td colspan="1"><!-- IF PROFILE_USER --><a href="profile.php?mode=bonus">{L_EXCHANGE}</a><!-- ENDIF --></td><!-- ENDIF -->
</tr> </tr>
</table> </table>
@ -497,16 +495,6 @@ ajax.callback.view_profile = function(data) {
<!--bottom_info--> <!--bottom_info-->
<div class="bottom_info"> <div class="bottom_info">
<!-- IF EDIT_PROF -->
<form method="post" action="{EDIT_PROF_HREF}">
<p class="tCenter mrg_10">
<input type="submit" value="{L_EDIT_PROFILE}" class="main gen" />
</p>
</form>
<!-- ELSE -->
<br />
<!-- ENDIF -->
<div class="spacer_6"></div> <div class="spacer_6"></div>
<div id="timezone"> <div id="timezone">

View file

@ -49,7 +49,6 @@ if (!$forum_id OR !$forum_data = @$forums['forum'][$forum_id])
// Only new // Only new
$only_new = $user->opt_js['only_new']; $only_new = $user->opt_js['only_new'];
$only_new_sql = ''; $only_new_sql = '';
$no_draft = "AND `t`.`is_draft` = 0";
if ($only_new == ONLY_NEW_POSTS) if ($only_new == ONLY_NEW_POSTS)
{ {
$only_new_sql = "AND t.topic_last_post_time > $lastvisit"; $only_new_sql = "AND t.topic_last_post_time > $lastvisit";
@ -279,6 +278,7 @@ if (!empty($_REQUEST['topicdays']))
SELECT COUNT(*) AS forum_topics SELECT COUNT(*) AS forum_topics
FROM ". BB_TOPICS ." FROM ". BB_TOPICS ."
WHERE forum_id = $forum_id WHERE forum_id = $forum_id
AND is_draft != 1
AND topic_last_post_time > ". (TIMENOW - 86400*$req_topic_days) ." AND topic_last_post_time > ". (TIMENOW - 86400*$req_topic_days) ."
"; ";
@ -363,7 +363,6 @@ $sql = "
$only_new_sql $only_new_sql
$title_match_sql $title_match_sql
$limit_topics_time_sql $limit_topics_time_sql
$no_draft
$order_sql $order_sql
LIMIT $start, $topics_per_page LIMIT $start, $topics_per_page
"; ";
@ -465,12 +464,18 @@ $template->assign_vars(array(
// Okay, lets dump out the page ... // Okay, lets dump out the page ...
foreach ($topic_rowset as $topic) foreach ($topic_rowset as $topic)
{ {
if ($topic['is_draft'] && $topic['first_user_id'] != $userdata['user_id'])
{
continue;
}
$topic_id = $topic['topic_id']; $topic_id = $topic['topic_id'];
$moved = ($topic['topic_status'] == TOPIC_MOVED); $moved = ($topic['topic_status'] == TOPIC_MOVED);
$replies = $topic['topic_replies']; $replies = $topic['topic_replies'];
$t_hot = ($replies >= $bb_cfg['hot_threshold']); $t_hot = ($replies >= $bb_cfg['hot_threshold']);
$t_type = $topic['topic_type']; $t_type = $topic['topic_type'];
$separator = ''; $separator = '';
$topic_draft = ($topic['is_draft']) ? $lang['TOPIC_DRAFT'] .' ' : '';
$is_unread = is_unread($topic['topic_last_post_time'], $topic_id, $forum_id); $is_unread = is_unread($topic['topic_last_post_time'], $topic_id, $forum_id);
if ($t_type == POST_ANNOUNCE && !defined('ANNOUNCE_SEP')) if ($t_type == POST_ANNOUNCE && !defined('ANNOUNCE_SEP'))
@ -511,7 +516,7 @@ foreach ($topic_rowset as $topic)
'FORUM_ID' => $forum_id, 'FORUM_ID' => $forum_id,
'TOPIC_ID' => $topic_id, 'TOPIC_ID' => $topic_id,
'HREF_TOPIC_ID' => ($moved) ? $topic['topic_moved_id'] : $topic['topic_id'], 'HREF_TOPIC_ID' => ($moved) ? $topic['topic_moved_id'] : $topic['topic_id'],
'TOPIC_TITLE' => wbr($topic['topic_title']), 'TOPIC_TITLE' => $topic_draft . wbr($topic['topic_title']),
'TOPICS_SEPARATOR' => $separator, 'TOPICS_SEPARATOR' => $separator,
'IS_UNREAD' => $is_unread, 'IS_UNREAD' => $is_unread,
'TOPIC_ICON' => get_topic_icon($topic, $is_unread), 'TOPIC_ICON' => get_topic_icon($topic, $is_unread),