$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(); //useful variables $username = $user->getUsername($_COOKIE['user'], 2); $rank = $user->getRank($username); $id = $_GET['id']; //take action then log it if ($thread->checkExistence($id) && $thread->canView($id, $username, $rank) && $rank > 2) { if ($_GET['type'] == 2) { $thread->coverThread($id, $rank); $base->appendToFile('../logs.txt', array($username . ' hid the thread ' . $id)); } else { $thread->hideThread($id, $rank); $base->appendToFile('../logs.txt', array($username . ' hid the thread ' . $id)); } } else { $base->redirect('../viewthread.php?forum=' . $_GET['forum'] . '&id=' . $id . '&goto=start'); } $redirect = 'http://' . $domain . '/forums/viewthread.php?forum=' . $_GET['forum'] . '&id=' . $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">
"> </form> <?php } else { foreach ($threads as $thread) { moveThread($thread, $_GET['moveto'], $database); $base->appendToFile('logs.txt', array($username . ' moved the thread ' . $thread . ' to ' . $_GET['moveto'])); } $base->redirect('viewforum.php?forum=' . $_GET['moveto']); } } else { foreach ($threads as $thread) { switch ($action) { case 1: $forum_thread->hideThread($thread, $rank); $base->appendToFile('logs.txt', array($username . ' hid/un-hid the thread ' . $thread)); break; case 2: $forum_thread->lock($thread, $rank); $base->appendToFile('logs.txt', array($username . ' locked the thread ' . $thread)); break; case 4: setAutoHide($thread, $database, $rank); $base->appendToFile('logs.txt', array($username . ' toggled auto-hide hide on the thread ' . $thread)); break; case 5: setSticky($thread, $database, $rank); $base->appendToFile('logs.txt', array($username . ' stickied the thread ' . $thread)); break; case 6: