Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($_SERVER["REQUEST_METHOD"] == "POST"){
- $first = trim($_POST["first"]);
- $last = trim($_POST["last"]);
- $comment = htmlsafechars(trim($_POST["comment"]));
- if (!$first || !$last || !$comment){
- stderr("{$lang['stderr_error']}", "{$lang['text_missing']}");
- }
- $first = ip2long($first);
- $last = ip2long($last);
- if ($first == - 1 || $first === FALSE || $last == - 1 || $last === FALSE){
- stderr("{$lang['stderr_error']}", "{$lang['text_badip.']}");
- }
- $added = TIME_NOW;
- for ($i = $first; $i <= $last; $i++) {
- $key = 'bans:::' . long2ip($i);
- $mc1->delete_value($key);
- }
- mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO bans (added, addedby, first, last, comment) VALUES($added, " . sqlesc($CURUSER['id']) . ", " . sqlesc($first) . ", " . sqlesc($last) . ", " . sqlesc($comment) . ")") or sqlerr(__FILE__, __LINE__);
- die;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement