Initial commit
This commit is contained in:
19
public/admin/auth.php
Executable file
19
public/admin/auth.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
error_reporting(E_ERROR | E_PARSE);
|
||||
session_start();
|
||||
|
||||
$config = include("../../config.php");
|
||||
|
||||
if (isset($_SESSION['password']) && isset($_SESSION['username']))
|
||||
{
|
||||
if ($_SESSION['password'] !== $config['password'] ||
|
||||
$_SESSION['username'] !== $config['username'])
|
||||
{
|
||||
$_SESSION['admin'] = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($_SESSION['username']) || isset($_SESSION ['password'])) {
|
||||
$error = "Konto opplysningene dine har blitt endret. Vennligst logg inn igjen.";
|
||||
}
|
||||
Reference in New Issue
Block a user