mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-12 06:11:00 +00:00
Fix ban, forgot to change access
Fix ban, forgot to change access
This commit is contained in:
+20
-10
@@ -71,17 +71,27 @@ if(isset($_POST['action']) && $_POST['action'] == 'addBan')
|
|||||||
$name = $user['username'];
|
$name = $user['username'];
|
||||||
$end = ($time > 0) ? (time() + $time) : 0;
|
$end = ($time > 0) ? (time() + $time) : 0;
|
||||||
|
|
||||||
// =========================
|
// =========================
|
||||||
// INSERT BAN (ACTIVE)
|
// INSERT BAN (ACTIVE)
|
||||||
// =========================
|
// =========================
|
||||||
mysqli_query($database->dblink, "
|
mysqli_query($database->dblink, "
|
||||||
INSERT INTO ".TB_PREFIX."banlist
|
INSERT INTO ".TB_PREFIX."banlist
|
||||||
(uid,name,reason,time,end,admin,active)
|
(uid,name,reason,time,end,admin,active)
|
||||||
VALUES
|
VALUES
|
||||||
($uid,'$name','$reason',".time().",$end,0,1)
|
($uid,'$name','$reason',".time().",$end,0,1)
|
||||||
");
|
");
|
||||||
|
|
||||||
$success = "User has been banned successfully!";
|
// =========================
|
||||||
|
// BLOCK USER ACCESS
|
||||||
|
// =========================
|
||||||
|
mysqli_query($database->dblink, "
|
||||||
|
UPDATE ".TB_PREFIX."users
|
||||||
|
SET access = 0
|
||||||
|
WHERE id = $uid
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
|
||||||
|
$success = "User has been banned successfully!";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user