Ejemplo n.º 1
0
 }
 $results = $tc_db->GetAll("SELECT id FROM `" . KU_DBPREFIX . "posts` WHERE `boardid` = " . $board_class->board['id'] . " ORDER BY id DESC LIMIT 1");
 if (count($results) > 0) {
     $nextid = $results[0]['id'] + 1;
 } else {
     $nextid = 1;
 }
 $parse_class->id = $nextid;
 // If they are just a normal user, or vip...
 if (isNormalUser($user_authority)) {
     // If the thread is locked
     if ($thread_locked == 1) {
         // Don't let the user post
         exitWithErrorPage(_gettext('Sorry, this thread is locked and can not be replied to.'));
     }
     $post_message = $parse_class->ParsePost($_POST['message'], $board_class->board['name'], $board_class->board['type'], $thread_replyto, $board_class->board['id']);
     // Or, if they are a moderator/administrator...
 } else {
     // If they checked the D checkbox, set the variable to tell the script to display their staff status (Admin/Mod) on the post during insertion
     if (isset($_POST['displaystaffstatus'])) {
         $post_displaystaffstatus = true;
     }
     // If they checked the RH checkbox, set the variable to tell the script to insert the post as-is...
     if (isset($_POST['rawhtml'])) {
         $post_message = $_POST['message'];
         // Otherwise, parse it as usual...
     } else {
         $post_message = $parse_class->ParsePost($_POST['message'], $board_class->board['name'], $board_class->board['type'], $thread_replyto, $board_class->board['id']);
     }
     // If they checked the L checkbox, set the variable to tell the script to lock the post after insertion
     if (isset($_POST['lockonpost'])) {
Ejemplo n.º 2
0
    $board_class = new Board($board_name);
    if ($board_class->board['locale'] != '') {
        changeLocale($board_class->board['locale']);
    }
} else {
    die('<font color="red">Invalid board.</font>');
}
$board_class->InitializeDwoo();
$board_class->dwoo_data->assign('isexpand', true);
$board_class->dwoo_data->assign('board', $board_class->board);
$board_class->dwoo_data->assign('file_path', getCLBoardPath($board_class->board['name'], $board_class->board['loadbalanceurl_formatted'], ''));
if (isset($_GET['preview'])) {
    require KU_ROOTDIR . 'inc/classes/parse.class.php';
    $parse_class = new Parse();
    if (isset($_GET['board']) && isset($_GET['parentid']) && isset($_GET['message'])) {
        die('<strong>' . _gettext('Post preview') . ':</strong><br /><div style="border: 1px dotted;padding: 8px;background-color: white;">' . $parse_class->ParsePost($_GET['message'], $board_class->board['name'], $board_class->board['type'], $_GET['parentid'], $board_class->board['id']) . '</div>');
    }
    die('Error');
}
$posts = $tc_db->GetAll('SELECT * FROM `' . KU_DBPREFIX . 'posts` WHERE `boardid` = ' . $board_class->board['id'] . ' AND `IS_DELETED` = 0 AND `parentid` = ' . $tc_db->qstr($_GET['threadid']) . ' ORDER BY `id` ASC');
global $expandjavascript;
$output = '';
$expandjavascript = '';
$numimages = 0;
if ($board_class->board['type'] != 1) {
    $embeds = $tc_db->GetAll("SELECT filetype FROM `" . KU_DBPREFIX . "embeds`");
    foreach ($embeds as $embed) {
        $board_class->board['filetypes'][] .= $embed['filetype'];
    }
    $board_class->dwoo_data->assign('filetypes', $board_class->board['filetypes']);
}