Zeile 3 | Zeile 3 |
---|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html
| * Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html
|
*
|
*
|
* $Id: showthread.php 2542 2006-12-19 23:43:47Z Tikitiki $
| * $Id: showthread.php 3595 2008-01-09 00:10:57Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 89 | Zeile 89 |
---|
error_no_permission(); }
|
error_no_permission(); }
|
// Check that this forum is not password protected. check_forum_password($forum['fid'], $forum['password']);
| // Check if this forum is password protected and we have a valid password check_forum_password($forum['fid']);
|
// If there is no specific action, we must be looking at the thread. if(!$mybb->input['action'])
| // If there is no specific action, we must be looking at the thread. if(!$mybb->input['action'])
|
Zeile 245 | Zeile 245 |
---|
{ header("Location:showthread.php?action=lastpost&tid={$tid}"); }
|
{ header("Location:showthread.php?action=lastpost&tid={$tid}"); }
|
| }
if($mybb->input['pid']) { $pid = $mybb->input['pid'];
|
}
$plugins->run_hooks("showthread_start");
| }
$plugins->run_hooks("showthread_start");
|
Zeile 276 | Zeile 281 |
---|
// If the user is not a guest, check if he already voted. if($mybb->user['uid'] != 0)
|
// If the user is not a guest, check if he already voted. if($mybb->user['uid'] != 0)
|
{
| {
|
$query = $db->simple_select(TABLE_PREFIX."pollvotes", "*", "uid='".$mybb->user['uid']."' AND pid='".$poll['pid']."'"); while($votecheck = $db->fetch_array($query)) {
| $query = $db->simple_select(TABLE_PREFIX."pollvotes", "*", "uid='".$mybb->user['uid']."' AND pid='".$poll['pid']."'"); while($votecheck = $db->fetch_array($query)) {
|
Zeile 334 | Zeile 339 |
---|
if($alreadyvoted || $showresults) { if(intval($votes) == "0")
|
if($alreadyvoted || $showresults) { if(intval($votes) == "0")
|
{
| {
|
$percent = "0";
|
$percent = "0";
|
} else
| } else
|
{ $percent = number_format($votes / $poll['totvotes'] * 100, 2);
|
{ $percent = number_format($votes / $poll['totvotes'] * 100, 2);
|
}
| }
|
$imagewidth = round(($percent/3) * 5); eval("\$polloptions .= \"".$templates->get("showthread_poll_resultbit")."\";"); } else { if($poll['multiple'] == "yes")
|
$imagewidth = round(($percent/3) * 5); eval("\$polloptions .= \"".$templates->get("showthread_poll_resultbit")."\";"); } else { if($poll['multiple'] == "yes")
|
{
| {
|
eval("\$polloptions .= \"".$templates->get("showthread_poll_option_multiple")."\";"); } else
| eval("\$polloptions .= \"".$templates->get("showthread_poll_option_multiple")."\";"); } else
|
Zeile 361 | Zeile 366 |
---|
if($poll['totvotes']) { $totpercent = "100%";
|
if($poll['totvotes']) { $totpercent = "100%";
|
} else {
| } else {
|
$totpercent = "0%"; }
| $totpercent = "0%"; }
|
Zeile 371 | Zeile 376 |
---|
if(is_moderator($fid, 'caneditposts') != 'yes') { $edit_poll = '';
|
if(is_moderator($fid, 'caneditposts') != 'yes') { $edit_poll = '';
|
}
| }
|
else { $edit_poll = "| <a href=\"polls.php?action=editpoll&pid={$poll['pid']}\">{$lang->edit_poll}</a>";
| else { $edit_poll = "| <a href=\"polls.php?action=editpoll&pid={$poll['pid']}\">{$lang->edit_poll}</a>";
|
Zeile 391 | Zeile 396 |
---|
$lang->total_votes = sprintf($lang->total_votes, $totalvotes); eval("\$pollbox = \"".$templates->get("showthread_poll_results")."\";"); $plugins->run_hooks("showthread_poll_results");
|
$lang->total_votes = sprintf($lang->total_votes, $totalvotes); eval("\$pollbox = \"".$templates->get("showthread_poll_results")."\";"); $plugins->run_hooks("showthread_poll_results");
|
} else
| } else
|
{ $publicnote = ' '; if($poll['public'] == "yes")
| { $publicnote = ' '; if($poll['public'] == "yes")
|
Zeile 402 | Zeile 407 |
---|
eval("\$pollbox = \"".$templates->get("showthread_poll")."\";"); $plugins->run_hooks("showthread_poll"); }
|
eval("\$pollbox = \"".$templates->get("showthread_poll")."\";"); $plugins->run_hooks("showthread_poll"); }
|
}
| }
|
else
|
else
|
{
| {
|
$pollbox = ""; }
|
$pollbox = ""; }
|
// Create the forum jump dropdown box. $forumjump = build_forum_jump("", $fid, 1);
| // Create the forum jump dropdown box. if($mybb->settings['enableforumjump'] != "no") { $forumjump = build_forum_jump("", $fid, 1); }
|
// Mark this thread read for the currently logged in user. if($mybb->settings['threadreadcut'] && ($mybb->user['uid'] != 0))
| // Mark this thread read for the currently logged in user. if($mybb->settings['threadreadcut'] && ($mybb->user['uid'] != 0))
|
Zeile 420 | Zeile 428 |
---|
REPLACE INTO ".TABLE_PREFIX."threadsread SET tid='$tid', uid='".$mybb->user['uid']."', dateline='".time()."' ");
|
REPLACE INTO ".TABLE_PREFIX."threadsread SET tid='$tid', uid='".$mybb->user['uid']."', dateline='".time()."' ");
|
} else {
| } else {
|
// For guests, store the information in a cookie. my_set_array_cookie("threadread", $tid, time());
|
// For guests, store the information in a cookie. my_set_array_cookie("threadread", $tid, time());
|
}
| }
|
// If the forum is not open, show closed newreply button unless the user is a moderator of this forum. if($forum['open'] != "no") {
| // If the forum is not open, show closed newreply button unless the user is a moderator of this forum. if($forum['open'] != "no") {
|
Zeile 451 | Zeile 459 |
---|
$adminpolloptions = "<option value=\"deletepoll\">".$lang->delete_poll."</option>"; } if($thread['visible'] != 1)
|
$adminpolloptions = "<option value=\"deletepoll\">".$lang->delete_poll."</option>"; } if($thread['visible'] != 1)
|
{
| {
|
$approveunapprovethread = "<option value=\"approvethread\">".$lang->approve_thread."</option>"; } else
|
$approveunapprovethread = "<option value=\"approvethread\">".$lang->approve_thread."</option>"; } else
|
{
| {
|
$approveunapprovethread = "<option value=\"unapprovethread\">".$lang->unapprove_thread."</option>"; } if($thread['closed'] == "yes")
|
$approveunapprovethread = "<option value=\"unapprovethread\">".$lang->unapprove_thread."</option>"; } if($thread['closed'] == "yes")
|
{
| {
|
$closelinkch = "checked"; } if($thread['sticky'])
| $closelinkch = "checked"; } if($thread['sticky'])
|
Zeile 473 | Zeile 481 |
---|
$plugins->run_hooks("showthread_ismod"); } else
|
$plugins->run_hooks("showthread_ismod"); } else
|
{
| {
|
$adminoptions = " "; $inlinemod = ""; }
| $adminoptions = " "; $inlinemod = ""; }
|
Zeile 481 | Zeile 489 |
---|
// Decide whether or not to include signatures. if($forumpermissions['canpostreplys'] != "no" && ($thread['closed'] != "yes" || is_moderator($fid) == "yes") && $mybb->settings['quickreply'] != "off" && $mybb->user['showquickreply'] != "no" && $forum['open'] != "no") {
|
// Decide whether or not to include signatures. if($forumpermissions['canpostreplys'] != "no" && ($thread['closed'] != "yes" || is_moderator($fid) == "yes") && $mybb->settings['quickreply'] != "off" && $mybb->user['showquickreply'] != "no" && $forum['open'] != "no") {
|
| // Show captcha image for guests if enabled if($mybb->settings['captchaimage'] == "on" && function_exists("imagepng") && !$mybb->user['uid']) { $randomstr = random_str(5); $imagehash = md5($randomstr); $imagearray = array( "imagehash" => $imagehash, "imagestring" => $randomstr, "dateline" => time() ); $db->insert_query(TABLE_PREFIX."captcha", $imagearray); eval("\$captcha = \"".$templates->get("post_captcha")."\";"); }
|
if($mybb->user['signature']) { $postoptionschecked['signature'] = "checked";
| if($mybb->user['signature']) { $postoptionschecked['signature'] = "checked";
|