blob: d90ba91a5a8e2b4061b82b559f9e8e8440c906aa (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
require_once("settings.php");
session_start();
$username = isset($_POST["username"]) ? $_POST["username"] : $_GET["username"];
$password = isset($_POST["password"]) ? $_POST["password"] : $_GET["password"];
if($username == USER_USERNAME && $password == USER_PASSWORD) //very basic, but only for now
{
$_SESSION["loggedin"] = true;
}
elseif($username != "" && $password != "")
{
$wrongPassword = true;
}
if($_SESSION["loggedin"] !== true)
{
session_write_close();
header("HTTP/1.1 403 Incorrect Username and/or Password");
require_once("login.php");
exit;
}
session_write_close();
?>
|