Example #1
0
     throw new Exception('Bad painter passed.');
 }
 $_SESSION['oekaki']['file'] = "{$_GET['file']}.png";
 $_SESSION['oekaki']['thumbnail'] = "{$_GET['file']}t.png";
 $_SESSION['oekaki']['ip'] = $ip;
 $_SESSION['oekaki']['time'] = $_GET['time'];
 $_SESSION['oekaki']['painter'] = $_GET['painter'];
 if (isset($_GET['thread']) && $_GET['thread'] != '' && isset($_GET['board']) && $_GET['board'] != '') {
     $board_name = boards_check_name($_GET['board']);
     if ($board_name === FALSE) {
         // Cleanup.
         DataExchange::releaseResources();
         display_error_page($smarty, kotoba_last_error());
         exit(1);
     }
     $thread_original_post = threads_check_original_post($_GET['thread']);
     header('Location: ' . Config::DIR_PATH . "/{$board_name}/{$thread_original_post}/");
 } else {
     if (isset($_GET['board']) && $_GET['board'] != '') {
         $board_name = boards_check_name($_GET['board']);
         if ($board_name === FALSE) {
             // Cleanup.
             DataExchange::releaseResources();
             display_error_page($smarty, kotoba_last_error());
             exit(1);
         }
         header('Location: ' . Config::DIR_PATH . "/{$board_name}/");
     }
 }
 // Cleanup.
 DataExchange::releaseResources();
Example #2
0
 }
 // Check permission and write message to log file.
 if (!is_admin()) {
     // Cleanup.
     DataExchange::releaseResources();
     display_error_page($smarty, new NotAdminError());
     exit(1);
 }
 call_user_func(Logging::$f['MOVE_THREAD_USE']);
 // Get necessary data.
 $boards = boards_get_all();
 // Move thread.
 if (isset($_POST['submited'])) {
     // Validate input data.
     $src_board['id'] = boards_check_id($_POST['src_board']);
     $thread['original_post'] = threads_check_original_post($_POST['thread']);
     $dst_board['id'] = boards_check_id($_POST['dst_board']);
     foreach ($boards as $board) {
         if ($board['id'] == $src_board['id']) {
             $src_board = $board;
         }
         if ($board['id'] == $dst_board['id']) {
             $dst_board = $board;
         }
     }
     $thread = threads_get_by_original_post($src_board['id'], $thread['original_post']);
     threads_move_thread($thread['id'], $dst_board['id']);
     // Copy files.
     $attachments = attachments_get_by_thread($thread['id']);
     foreach ($attachments as $a) {
         switch ($a['attachment_type']) {
Example #3
0
 }
 if (!isset($_POST['y']) || !ctype_digit($_POST['y']) || strlen($_POST['y']) > 3) {
     throw new Exception('y');
 }
 if (isset($_POST['board'])) {
     $board_name = boards_check_name($_POST['board']);
     if ($board_name === FALSE) {
         // Cleanup.
         DataExchange::releaseResources();
         display_error_page($smarty, kotoba_last_error());
         exit(1);
     }
     $smarty->assign('board', $board_name);
 }
 if (isset($_POST['thread'])) {
     $smarty->assign('thread', threads_check_original_post($_POST['thread']));
 }
 if ($_POST['painter'] == 'shi_pro') {
     $tools = 'pro';
 } elseif ($_POST['painter'] == 'shi_normal') {
     $tools = 'normal';
 }
 $file_names = create_filenames('png');
 $smarty->assign('image_width', $_POST['x']);
 $smarty->assign('image_height', $_POST['y']);
 $smarty->assign('thumbnail_width', Config::THUMBNAIL_WIDTH);
 $smarty->assign('thumbnail_height', Config::THUMBNAIL_HEIGHT);
 $smarty->assign('tools', $tools);
 $smarty->assign('ip', $_SERVER['REMOTE_ADDR']);
 $smarty->assign('time', time());
 $smarty->assign('file', $file_names[2]);
Example #4
0
     $smarty->assign('ip', $_SERVER['REMOTE_ADDR']);
     $smarty->assign('reason', $ban['reason']);
     $smarty->display('banned.tpl');
     session_destroy();
     exit(1);
 }
 // Fix for Firefox.
 header("Cache-Control: private");
 $board_name = boards_check_name($_REQUEST['board']);
 if ($board_name === FALSE) {
     // Cleanup.
     DataExchange::releaseResources();
     display_error_page($smarty, kotoba_last_error());
     exit(1);
 }
 $thread_number = threads_check_original_post($_REQUEST['thread']);
 $password = NULL;
 if (isset($_SESSION['password'])) {
     $password = $_SESSION['password'];
 }
 $board = NULL;
 $banners_board_id = NULL;
 $posts_attachments = array();
 $attachments = array();
 $categories = categories_get_all();
 $boards = boards_get_visible($_SESSION['user']);
 make_category_boards_tree($categories, $boards);
 // Конгломерат. Разкомментируйте и отредактируйте.
 //array_push(
 //    $categories,
 //    array('id' => 'Conglomerate',