Exemplo n.º 1
0
 if ($_POST['modban'] != "nil" || $_POST['moddo'] != "nil") {
     $moddb = new ThornModDBI();
     //Get post
     $targetid = $postarray['id'];
     // Find out if this is a thread
     if ($postarray['thread'] != 0) {
         $targetisthread = false;
     } else {
         $targetisthread = true;
     }
     if ($_POST['modban'] == "banip") {
         $moddb->banipfrompost($targetid, $targetisthread, 0, $_POST['privatebanreason'], $_POST['publicbanreason'], $_POST['adminbanreason'], $_POST['banduration'], $_SESSION['username'] . " via mod panel");
     } elseif ($_POST['modban'] == "bansub") {
         $moddb->banipfrompost($targetid, $targetisthread, 1, $_POST['privatebanreason'], $_POST['publicbanreason'], $_POST['adminbanreason'], $_POST['banduration'], $_SESSION['username'] . " via mod panel");
     } elseif ($_POST['modban'] == "banthread" && $adminpowers > 0) {
         $moddb->banipfromthread($targetid, $_POST['privatebanreason'], $_POST['publicbanreason'], $_POST['adminbanreason'], $_POST['banduration'], $_SESSION['username'] . " via mod panel (threadban)");
     }
     // Post deletion, if they have access
     if ($adminpowers > 0 && $_POST['moddo'] != "nil") {
         if ($targetisthread) {
             $actionstring = "delete\tt:" . $postarray['globalid'] . "\tb:" . $postarray['board'];
             if (THuserewrite) {
                 $diereturn = 'Post(s) deleted.<br /><a href="' . THurl . $boardname . '">Return to board</a>';
             } else {
                 $diereturn = 'Post(s) deleted.<br /><a href="' . THurl . 'drydock.php?b=' . $boardname . '">Return to board</a>';
             }
         } else {
             $actionstring = "delete:\tp:" . $threadid . "\tb:" . $postarray['board'] . "\tp:" . $postarray['globalid'];
             if (THuserewrite) {
                 $diereturn = 'Post(s) deleted.<br /><a href="' . THurl . $boardname . '/thread/' . $threadop . '">Return to thread</a>';
             } else {