コード例 #1
0
ファイル: misc.php プロジェクト: kamilpacaq/drydock
     $db = new ThornToolsDBI();
     if ($db->checkban()) {
         THdie("PObanned");
     }
     $board = $db->getboardnumber($_POST['board']);
     // verify that the board is correct
     if ($board == null) {
         $message = "Invalid board provided!";
     } else {
         if ($_POST['post'] <= 0 || isset($_POST['post']) == false) {
             $message = "No valid post to report!";
         } else {
             if (isset($_POST['category'])) {
                 $category = intval($_POST['category']);
                 if ($category > 0 && $category < 4) {
                     if ($db->checkreportpost($_POST['post'], $board) == 0) {
                         $db->reportpost($_POST['post'], $board, $category);
                     }
                     // We'll just tell them they got this far even if
                     // it was invalid for whatever reason.
                     $message = "Your report has been submitted.";
                 } else {
                     $message = "Invalid category provided!";
                 }
             } else {
                 $message = "No category provided!";
             }
         }
     }
 }
 $sm = sminit("popup.tpl");