forked from leftypol/leftypol
IP notes
This commit is contained in:
parent
2843ddc482
commit
7f6f836bf8
6 changed files with 191 additions and 16 deletions
|
@ -55,6 +55,8 @@ function parse_time($str) {
|
|||
function ban($mask, $reason, $length, $board) {
|
||||
global $mod;
|
||||
|
||||
// TODO: permissions
|
||||
|
||||
$query = prepare("INSERT INTO `bans` VALUES (NULL, :ip, :mod, :time, :expires, :reason, :board)");
|
||||
$query->bindValue(':ip', $mask);
|
||||
$query->bindValue(':mod', $mod['id']);
|
||||
|
@ -79,6 +81,8 @@ function ban($mask, $reason, $length, $board) {
|
|||
}
|
||||
|
||||
function unban($id) {
|
||||
// TODO: permissions
|
||||
|
||||
$query = prepare("DELETE FROM `bans` WHERE `id` = :id");
|
||||
$query->bindValue(':id', $id);
|
||||
$query->execute() or error(db_error($query));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue