Exemplo n.º 1
0
 public function login()
 {
     $email = $_POST["email"];
     $password = $_POST["password"];
     $user = Admin::get_admin($email, $password, $this->connection);
     if (empty($user)) {
         header("Location: ../../view/admin/authentication/index.php");
     } else {
         $_SESSION["current_user"] = $user;
         header("Location: " . $_SESSION["original_page"]);
     }
 }
Exemplo n.º 2
0
use model\Industry;
use model\Position;
use model\Employer;
AuthenticationController::authenticate();
?>

<html>

	<head>
	</head>

	<body>
		<?php 
$database = new Database();
$connection = $database->get_connection();
$admin = Admin::get_admin("*****@*****.**", "dogssocute", $connection);
if (is_null($admin)) {
    echo "invalid email or password";
} else {
    echo $admin->get_email();
    echo "<br />";
    echo $admin->get_password();
    echo "<br />";
}
$locations = Location::get_all_location($connection);
for ($i = 0; $i < sizeof($locations); $i++) {
    echo $locations[$i]->get_name();
    echo "<br />";
}
echo "<br />";
$nationalities = Nationality::get_all_nationality($connection);