secured list_table
This commit is contained in:
parent
697f0c5f96
commit
627fd8ac7b
@ -1,6 +1,20 @@
|
||||
<?php
|
||||
|
||||
include("../global.php");
|
||||
session_start();
|
||||
|
||||
if (!isset($_SESSION["username"])) goto fail;
|
||||
|
||||
$out = $database -> query("SELECT username, admin FROM user WHERE username=\"" . $_SESSION["username"] . "\" AND admin=\"1\"");
|
||||
|
||||
if ($out -> num_rows != 1)
|
||||
{
|
||||
fail:
|
||||
echo "nope";
|
||||
header("Location: ../../index.php");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$out = $database -> query("SELECT username FROM user ORDER BY id ASC");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user