if (!isset($thold) or empty($thold)) { if (isset($userinfo['thold'])) { $thold = $userinfo['thold']; } else { $thold = 0; } } switch ($op) { case "Reply": reply($pid, $pollID, $mode, $order, $thold); break; case "" . _PREVIEW . "": replyPreview($pid, $pollID, $subject, $comment, $xanonpost, $mode, $order, $thold); break; case "" . _OK . "": CreateTopic($xanonpost, $subject, $comment, $pid, $pollID, $host_name, $mode, $order, $thold); break; case "moderate": if (!is_admin($admin)) { global $module_name; } if ($admintest == 1 || $moderate == 2) { while (list($tdw, $emp) = each($_POST)) { $tdw = intval($tdw); if (stripos_clone($tdw, "dkn")) { $emp = explode(":", $emp); if ($emp[1] != 0) { $tdw = str_replace("dkn", "", $tdw); $emp[0] = intval($emp[0]); $emp[1] = intval($emp[1]); $tdw = intval($tdw);
<?php include 'models/database.php'; include 'models/posts.php'; include 'models/datetime.php'; if (isset($_POST['topicname']) && isset($_POST['post'])) { $name = $_POST['topicname']; $text = $_POST['post']; $info = ''; $now = datetime(); $userid = $_COOKIE['userid']; $topicid = CreateTopic($userid, $now, $info, $name); $success = CreatePost($userid, $topicid, $text, $now); if ($success) { header('Location: posts.php?topicid=' . $topicid); } else { echo "error"; } }