forked from Blaiden17/Police-MDT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconnexion.php
executable file
·57 lines (57 loc) · 2.24 KB
/
connexion.php
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* Page de connexion sur AidenCAD
* @param int $_GET["error_code"] Code d'erreur provoquant une redirection sur cette page
* @param string $_GET["error_msg"] Message correspondant à l'erreur
* @param string $_GET["url_next"] URL à rediriger une fois connecté
*/
include "./src/php/frame.php";
include ROOT."/src/php/utils.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include ROOT."/src/php/css_js.html" ?>
<link rel="stylesheet" href="/src/css/connexion_subscription.css">
<script src="/src/js/admin/connexion_subscription.js"></script>
<title>Sign in - AidenCAD</title>
<script>
<?php if (isset($_GET["url_next"])) { ?>
document.url_next = "<?php echo $_GET["url_next"]?>";
<?php }
if (isset($_COOKIE["account_id"])) {?>
console.log("cookie checked");
$(".save_creds_container").css("background-color", "rgb(141, 0, 0)").css("width", 50);
$("input[type=checkbox]").prop("checked", true);
<?php } ?>
</script>
</head>
<body>
<div class="main_wrapper">
<header class="header_connexion">
<a href="/" class="button game_button">Game interface</a>
<a href="./register.php" class="button register_button">Sign up</a>
</header>
<main class="main_connexion">
<h3>Sign in</h3>
<form action="#" class="form_connexion" method="POST">
<input type="text" name="username" required autofocus placeholder="Username :"/><br>
<input type="password" name="password" required placeholder="Password :"/><br />
<!-- <span class="save_creds_wrapper ">
<label for="save_creds">Save credentials : </label>
<span class="save_creds_container">
<input type="checkbox" name="save_creds" id="save_creds">
</span>
</span> -->
<input type="submit" value="Sign in" class="button">
</form>
</main>
<?php if (isset($_GET["error_code"], $_GET["error_msg"])) {
load_notif_displayer($_GET["error_code"], $_GET["error_msg"]);
} else {
load_notif_displayer();
}
load_overlay_screen()?>
</div>
</body>
</html>