Ejemplo n.º 1
0
include 'protected/config/db_config.php';
include 'protected/config/html_config.php';
include 'protected/library/validation_library.php';
include 'protected/controllers/login.php';
$db = new db_config();
$formelem = new FormElem();
$loginController = new LoginController();
$connect = $db->connect();
if ($_SESSION['session_is_admin'] == 1) {
    header("Location: /user/index.php?redirected=true");
} elseif ($_SESSION['session_is_admin'] == 0) {
}
if (isset($_POST['btn-login'])) {
    $username = $_POST['form-username'];
    $password = $_POST['form-password'];
    $loginController->loginPage($username, $password, $connect);
}
?>

<!DOCTYPE html>
<html lang="en">

    <head>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Zaril Login Form</title>

        <!-- CSS -->
        <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:400,100,300,500">