Exemple #1
0
function usrdel($no, $pwd, $onlyimgdel)
{
    global $path, $pwdc, $onlyimgdel;
    require_once CORE_DIR . "/admin/delpost.php";
    $del = new DeletePost();
    $del->userDel($no, $pwd, $onlyimgdel);
}
Exemple #2
0
function delete_post($resno, $pwd, $imgonly = 0, $automatic = 0, $children = 1, $die = 1)
{
    // deletes a post from the database
    // imgonly: whether to just delete the file or to delete from the database as well
    // automatic: always delete regardless of password/admin (for self-pruning)
    // children: whether to delete just the parent post of a thread or also delete the children
    // die: whether to die on error
    // careful, setting children to 0 could leave orphaned posts.
    require_once CORE_DIR . "/log/log.php";
    require_once CORE_DIR . "/admin/delpost.php";
    $remove = new DeletePost();
    $remove->targeted($resno, $pwd, $imgonly = 0, $automatic = 0, $children = 1, $die = 1);
}
Exemple #3
0
 function postOptions($no, $ip, $expires, $banType, $perma, $pubreason, $staffnote, $custmess, $showbanmess, $afterban)
 {
     global $mysql;
     //This will do the POST processing and pass it to applyBan
     $str = "+" . $expires . " day";
     $expires = strtotime($str, time());
     if ($banType) {
         if ($banType == 'warn') {
             $banType = 1;
         } elseif ($banType == 'thisboard') {
             $banType = 2;
         } elseif ($banType == 'global') {
             //bantype is global
             $banType = 3;
         } else {
             $banType = 4;
         }
     }
     if ($showbanmess) {
         if ($custmess == '') {
             $custmess = "(USER WAS BANNED FOR THIS POST)";
         } else {
             $custmess = "(" . $custmess . ")";
         }
     } else {
         $custmess = 0;
     }
     //$banish->applyBan($no, $ip, $length, $banType, $pubreason, $staffnote, $custmess);
     if ($afterban !== 'none') {
         require_once CORE_DIR . '/admin/delpost.php';
         $del = new DeletePost();
         if ($afterban == 'delpost') {
             $del->targeted($no, $pwd, $imgonly = 0, $automatic = 1, $children = 1, $die = 1);
         }
         if ($afterban == 'delallbyip') {
             $del->targeted($no, $pwd, $imgonly = 0, $automatic = 1, $children = 1, $die = 1, $allbyip = 1, $ip);
         }
         if ($afterban == 'delimgonly') {
             $del->targeted($no, $pwd, $imgonly = 1, $automatic = 1, $children = 0, $die = 1);
         }
     }
     //}
     //function applyBan( $no, $ip, $length, $type, $pubreason, $staffnote, $custmess) {
     $mysql->query("INSERT INTO " . SQLBANLOG . " (ip, active, placedon, expires, board, type, reason, staffnotes) \n\t\tVALUES ('" . $mysql->escape_string($ip) . "', \n\t\t'1', \n\t\tUNIX_TIMESTAMP(),\n\t\t'" . $mysql->escape_string($expires) . "',\n\t\t'" . BOARD_DIR . "', \n\t\t'" . $mysql->escape_string($banType) . "', \n\t\t'" . $mysql->escape_string($pubreason) . "', \n\t\t'" . $mysql->escape_string($staffnote) . "' )");
     if ($custmess) {
         $mysql->query("UPDATE " . SQLLOG . " SET com = CONCAT(com, '<br><b><font color=\"FF101A\">" . $mysql->escape_string($custmess) . "</font></b>') where no='" . $no . "'");
     }
 }
Exemple #4
0
function delete_post($resno, $pwd, $imgonly = 0, $automatic = 0, $children = 1, $die = 1)
{
    require_once CORE_DIR . "/admin/delpost.php";
    $remove = new DeletePost();
    $remove->targeted($resno, $pwd, $imgonly = 0, $automatic = 0, $children = 1, $die = 1);
}