|
@@ -1,13 +1,26 @@
|
1
|
1
|
<?php
|
2
|
2
|
|
|
3
|
+require_once(dirname(__DIR__)."/controllers/data.php");
|
|
4
|
+require_once(dirname(__DIR__)."/models/data.class.php");
|
|
5
|
+require_once(dirname(__DIR__)."/../DbIds.php");
|
|
6
|
+
|
3
|
7
|
function login()
|
4
|
8
|
{
|
5
|
|
- set("title", "Titre");
|
|
9
|
+ set("title", "Login");
|
6
|
10
|
|
7
|
11
|
return html("login.html.php", "layout.html.php");
|
8
|
12
|
}
|
9
|
13
|
|
10
|
14
|
function check_login()
|
11
|
15
|
{
|
12
|
|
- // TODO
|
|
16
|
+ $identifiers = getAdminIdentifiers();
|
|
17
|
+
|
|
18
|
+ if($_POST["login"] != $identifiers[0] || $_POST["password"] != $identifiers[1])
|
|
19
|
+ {
|
|
20
|
+ set("title", "Error");
|
|
21
|
+ set("error", true);
|
|
22
|
+ } else
|
|
23
|
+ set("error", false);
|
|
24
|
+
|
|
25
|
+ return html("login.html.php", "layout.html.php");
|
13
|
26
|
}
|