$sm->display("modscript.tpl", null); } $sm->display("bottombar.tpl", null); die; } if (isset($_GET['tlist']) == true) { // Caching ID format: t<board>-tlist-<template> $cid = "t" . $boardid . "-tlist"; $sm = sminit("threadlist.tpl", $cid, $template, false); $db = new ThornBoardDBI($boardid, $page, $on); $sm->register_object("it", $db, array("getallthreads", "binfo")); $sm->display("threadlist.tpl", $cid); $sm->display("bottombar.tpl", null); die; } elseif (isset($_GET['g']) == true) { //This page of the board... $page = abs((int) $_GET['g']); } else { $page = 0; } $tpl = "board.tpl"; // Caching ID format: b<board>-<page>-<template> $cid = "b" . $boardid . "-" . $page . "-" . $template; $modvar = is_in_csl($boardid, $_SESSION['mod_array']); // individual board moderator $sm = sminit($tpl, $cid, $template, false, $modvar); $sm->assign('modvar', $modvar); //var_dump($obj); $db = new ThornBoardDBI($boardid, $page, $on); $sm->register_object("it", $db, array("getallthreads", "getsthreads", "getindex", "binfo", "page", "allthreadscalmerge", "blotterentries")); $sm->assign('template', $template);
$sm->assign("title", "Moderation action"); $sm->display("popup.tpl"); die; } elseif ($_GET['quicker'] == 1) { // First check if we even have the params we need if (!isset($_GET['board']) || !isset($_GET['post'])) { $message = "No post and/or board parameter, nothing to do!"; } else { $db = new ThornModDBI(); if ($db->checkban()) { THdie("ADbanned"); } // Get the board name. $board_folder = trim($_GET['board']); // Check for local mod access or global mod/admin access. if (is_in_csl($board_folder, $_SESSION['mod_array']) != 1 && $_SESSION['admin'] != 1 && $_SESSION['mod_global'] != 1) { $message = "You are not permitted to moderate posts on this board"; } else { // Set some stuff up. $board_id = $db->getboardnumber($board_folder); // Make sure we retrieved a valid board folder if ($board_folder == null) { $message = "That board does not exist!"; } else { $postid = intval($_GET['post']); // SQL injection protection :] $postarray = $db->getsinglepost($postid, $board_id); // Make sure it exists if ($postarray == null) { $message = "Post with global ID of " . $postid . " and board /" . $board_folder . "/ does not exist."; } else {
function getblotter($board) { $entries = array(); $count = 0; $blotter = $this->myquery("select * from " . THblotter_table . " ORDER BY time ASC"); while ($entry = sqlite_fetch_array($blotter)) { if ($entry['board'] == "0" || is_in_csl($board, $entry['board'])) { $entries[] = $entry; $count++; } if ($count >= 5) { break; } } return $entries; }