">next ></a></li> <li><a href="viewthread.php?forum=<?php echo $f . '&id=' . $i; ?> &page=<?php echo $pages; ?> ">last >></a></li> </ul> </form> </td> <td class="commands"> <ul class="flat"> <li><a href=""><img src="../img/forum/refresh.gif" alt=""> Refresh</a></li> <?php if ($thread->canReply($i, $rank) && !$user->checkMute($username)) { echo '<li><a href="reply.php?forum=' . $f . '&id=' . $i . '"><img src="../img/forum/new_thread.gif" alt="T" /> Reply</a></li>'; } ?> <?php if ($thread->canReply($i, $rank) && !$user->checkMute($username) && $details['username'] == $username) { echo '<li><a href="actions/bumpthread.php?&forum=' . $f . '&id=' . $i . '"><img src="../img/forum/bump_thread.gif" alt=""> Bump Thread</a></li>'; } ?> </ul> </td> </tr> </tbody> </table> </div>
$forum = new forum($database); $thread_obj = new thread($database); $user->updateLastActive(); //make sure required data is in the correct format AND they're logged in if (!$user->isLoggedIn() || !ctype_digit($_REQUEST['forum']) || !ctype_digit($_REQUEST['id']) || !ctype_digit($_REQUEST['type']) || !ctype_digit($_REQUEST['pid']) && $_REQUEST['type'] == 1) { $base->redirect('index.php'); } //set some variables that are used a lot throughout the page $username = $user->getUsername($_COOKIE['user'], 2); $rank = $user->getRank($username); $f = $_REQUEST['forum']; $thread = $_REQUEST['id']; //instead of typing it a million times, we're going to set our redirect url $redirect = 'viewthread.php?forum=' . $f . '&id=' . $thread; //make sure they are posting in a forum where they have permission if ($user->checkMute($username) || !$thread_obj->canView($thread, $username, $rank) || !$thread_obj->canReply($thread, $rank)) { $base->redirect($redirect); } //extract content for the set type $data = $_REQUEST['type'] == 1 ? $database->processQuery("SELECT `content`,`username`,`status` FROM `posts` WHERE `id` = ?", array($_REQUEST['pid']), true) : $database->processQuery("SELECT `username`,`content`,`status`,`title` FROM `threads` WHERE `id` = ?", array($thread), true); //check if they have permission to edit the thread/post if ($rank < 3 && ($data[0]['username'] != $username || $data[0]['status'] == 1)) { $base->redirect($redirect); } $type = $_POST['type']; if ($user->getRank($data[0]['username']) > 3 && $rank < 4) { $content = '<div class="frame e">You can\'t edit an administrator\'s post.</div>'; } elseif (isset($_POST['message'])) { //send them to their newly editted post $url = $type == 1 ? 'viewthread.php?forum=' . $f . '&id=' . $thread . '&goto=' . $_POST['pid'] : 'viewthread.php?forum=' . $f . '&id=' . $thread . '&goto=start'; if (isset($_POST['cancel'])) {
require '../../includes/config.php'; require '../../structure/database.php'; require '../../structure/forum.php'; require '../../structure/forum.thread.php'; require '../../structure/base.php'; require '../../structure/user.php'; $database = new database($db_host, $db_name, $db_user, $db_password); $thread = new thread($database); $base = new base($database); $user = new user($database); $user->updateLastActive(); $username = $user->getUsername($_COOKIE['user'], 2); //get the user's last bump $data = $database->processQuery("SELECT `lastbump` FROM `users` WHERE `username` = ?", array($username), true); if (time() - $data[0]['lastbump'] > 3600 && $thread->canReply($_GET['id'], $user->getRank($username))) { $thread->bumpThread($_GET['id'], $username); } else { $base->redirect('../viewthread.php?forum=' . $_GET['forum'] . '&id=' . $_GET['id'] . '&goto=start'); } $redirect = 'http://' . $path . 'forums/viewthread.php?forum=' . $_GET['forum'] . '&id=' . $_GET['id'] . '&goto=start'; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns:IE> <!-- LeeStrong Runescape Website Source --!> <!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"><!-- /Added by HTTrack --> <head> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache"> <meta name="MSSmartTagsPreventParsing" content="TRUE">