function delete_post($resno, $pwd, $imgonly = 0, $automatic = 0, $children = 1, $die = 1) { require_once CORE_DIR . "/log/log.php"; require_once CORE_DIR . "/admin/delete.php"; $remove = new Delete(); $remove->targeted($resno, $pwd, $imgonly = 0, $automatic = 0, $children = 1, $die = 1); }
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; } if ($afterban !== 'none') { require_once CORE_DIR . '/admin/delete.php'; $del = new Delete(); 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); } } $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 . "'"); } }