php clean-up, logon fix

This commit is contained in:
Jokob-sk
2022-12-31 14:02:30 +11:00
parent c35b22dc53
commit e7fe5f795a
12 changed files with 103 additions and 133 deletions

View File

@@ -8,20 +8,11 @@
#--------------------------------------------------------------------------- -->
<?php
session_start();
if(array_search('login', $_SESSION) != FALSE)
{
if ($_SESSION["login"] != 1)
{
header('Location: index.php');
exit;
}
}
require 'php/templates/header.php';
require 'php/templates/graph.php';
require 'php/server/util.php';
// check permissions
$dbPath = "../db/pialert.db";