Example #1
0
// {{{ Module loading
modules_load_all();
// }}}
// {{{ GET/POST board send check
// In some cases, the board value is sent through post, others get
if (isset($_POST['board']) || isset($_GET['board'])) {
    $_POST['board'] = isset($_GET['board']) ? $_GET['board'] : $_POST['board'];
}
// }}}
// If the script was called using a board name:
if (isset($_POST['board'])) {
    $board_name = $tc_db->GetOne("SELECT `name` FROM `" . KU_DBPREFIX . "boards` WHERE `name` = " . $tc_db->qstr($_POST['board']) . "");
    if (!empty($board_name)) {
        $board_class = new Board($board_name);
        if (!empty($board_class->board['locale'])) {
            changeLocale($board_class->board['locale']);
        }
    } else {
        do_redirect(KU_WEBPATH);
    }
} else {
    // A board being supplied is required for this script to function
    do_redirect(KU_WEBPATH);
}
// {{{ Expired ban removal, and then existing ban check on the current user
$bans_class->BanCheck($_SERVER['REMOTE_ADDR'], $board_class->board['name']);
// }}}
$oekaki = $posting_class->CheckOekaki();
$is_oekaki = empty($oekaki) ? false : true;
/* Ensure that UTF-8 is used on some of the post variables */
$posting_class->UTF8Strings();
Example #2
0
 function __destruct()
 {
     changeLocale(KU_LOCALE);
 }