query("SELECT * FROM items ORDER BY id ASC"); $ret = array(); while ($row = $res->fetch_assoc()) { $ret[] = $row; } return $ret; } $page = isset($_GET["page"])?$_GET["page"]:"dashboard"; if (!auth()) { header('WWW-Authenticate: Basic realm="C3CLOC"'); header('HTTP/1.0 401 Unauthorized'); include "templates/404.php"; exit; } else { include "templates/page.php"; } ?>