blob: 775b96f3652e062efd15b6f3b390e4b7d6eb25bc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<?php
include_once('controllers/BaseController.php');
include_once('controllers/DashboardController.php');
class DashboardLoginController extends BaseController {
private static $message;
public static function get() {
// include "views/dashboard-login.php";
DashboardController::invoke();
}
public static function post() {
if (isset($_POST['_method'])) {
DashboardController::invoke();
}
else if ($_POST['username'] == "admin" && $_POST['password'] == "admin") {
// Load normal dashboard
DashboardController::get();
}
else {
self::$message = "Bad credentials!";
include "views/dashboard-login.php";
}
}
}
|