Initial add
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
switch ($_GET['mode']) {
|
||||
case 'login':
|
||||
$user = $_POST['user'];
|
||||
$pass = $_POST['pass'];
|
||||
|
||||
if ($user == getenv('ELFINDER_USER') && $pass == getenv('ELFINDER_PASS')) {
|
||||
session_start();
|
||||
$_SESSION['loggedin'] = true;
|
||||
header('Location: index.php');
|
||||
} else {
|
||||
header('Location: login.html');
|
||||
}
|
||||
break;
|
||||
case 'logout':
|
||||
unset($_SESSION['loggedin']);
|
||||
header('Location: login.html');
|
||||
break;
|
||||
default:
|
||||
header('Location: login.html');
|
||||
}
|
||||
Reference in New Issue
Block a user