/* Decoded by unphp.net */
echo '
';
include '../settings/config.php';
include '../settings/head_admin.php';
session_start();
require '../db_connection.php';
if (isset($_SESSION['user_id'])) {
header("Location: ".($phpenable === 'true'?$siteurl .$admin_directory .'.php': $siteurl .$admin_directory));
exit;
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$login = $_POST['login'];
$password = $_POST['password'];
$sql = "SELECT * FROM benutzer WHERE name = ?";
$stmt = $conn->prepare($sql);
$stmt->bind_param("s",$login);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows == 1) {
$user = $result->fetch_assoc();
if ($user['admin'] == 1) {
if (password_verify($password,$user['password'])) {
if ($user['gesperrt'] == 1) {
if (!empty($user['sperrgrund'])) {
$error_message = "Dieses Konto wurde von einem Administrator gesperrt.
Grund: ".$user['sperrgrund'];
}else {
$error_message = "Dieses Konto wurde von einem Administrator gesperrt.";
}
}else {
$error_message = "Erfolgreich angemeldet!";
echo '