Пример #1
0
     }
     // If they checked the L checkbox, set the variable to tell the script to lock the post after insertion
     if (isset($_POST['lockonpost'])) {
         $post_autolock = true;
     }
     // If they checked the S checkbox, set the variable to tell the script to sticky the post after insertion
     if (isset($_POST['stickyonpost'])) {
         $post_autosticky = true;
     }
     if (isset($_POST['usestaffname'])) {
         $_POST['name'] = md5_decrypt($_POST['modpassword'], KU_RANDOMSEED);
         $post_name = md5_decrypt($_POST['modpassword'], KU_RANDOMSEED);
     }
 }
 $posting_class->CheckBadUnicode($post_name, $post_email, $post_subject, $post_message);
 $post_tag = $posting_class->GetPostTag();
 if ($post_isreply) {
     if ($imagefile_name == '' && !$is_oekaki && $post_message == '') {
         exitWithErrorPage(_gettext('An image, or message, is required for a reply.'));
     }
 } else {
     if ($imagefile_name == '' && !$is_oekaki && (!isset($_POST['nofile']) && $board_class->board['enablenofile'] == 1 || $board_class->board['enablenofile'] == 0) && ($board_class->board['type'] == 0 || $board_class->board['type'] == 2 || $board_class->board['type'] == 3)) {
         if (!isset($_POST['embed']) && $board_class->board['uploadtype'] != 1) {
             exitWithErrorPage(_gettext('A file is required for a new thread. If embedding is allowed, either a file or embed ID is required.'));
         }
     }
 }
 if (isset($_POST['nofile']) && $board_class->board['enablenofile'] == 1) {
     if ($post_message == '') {
         exitWithErrorPage('A message is required to post without a file.');
     }