2015-10-20 21:03:24 +00:00
|
|
|
<?php session_start();
|
2015-10-20 08:44:40 +00:00
|
|
|
|
2015-10-20 21:03:24 +00:00
|
|
|
$postAreSet = isset($_POST['username']) && isset($_POST['password']); // variables POST existent
|
|
|
|
$postStrings = $postAreSet && is_string($_POST['username']) && is_string($_POST['password']); // sont toutes 2 des strings
|
|
|
|
$postNotEmpty = $postStrings && strlen($_POST['username']) > 1 && strlen($_POST['password']) > 1; // d'au moins 2 caractères
|
2015-10-20 08:44:40 +00:00
|
|
|
|
2015-10-20 21:03:24 +00:00
|
|
|
if( $postNotEmpty ){
|
|
|
|
$userlist = file_get_contents('src/userlist.json');
|
|
|
|
}
|
2015-10-20 08:44:40 +00:00
|
|
|
|
|
|
|
// $_SERVER['HTTP_USER_AGENT']; // dépends du navigateur (version, système X, OS)
|
|
|
|
// $_SERVER['REMOTE_ADDR']; // ip publique de l'utilisateur
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Système d'Information du Département</title>
|
|
|
|
|
|
|
|
<!-- Informations de la page -->
|
|
|
|
<meta charset='utf-8'>
|
|
|
|
<meta name='author' content='Aurélien CLERAC; Cédric ELOUNDOU; Guillaume FAUVET; Adrien MARQUES {xdrm}'>
|
|
|
|
<meta name='desctiption' content="Système d'Information du Département Informatique" >
|
|
|
|
|
|
|
|
<!-- Dépendences CSS -->
|
|
|
|
<link type='text/css' rel='stylesheet' href='css/layout.css' /> <!-- Positionnement global des pages -->
|
|
|
|
<link type='text/css' rel='stylesheet' href='css/header.css' /> <!-- Gestion du header -->
|
|
|
|
<link type='text/css' rel='stylesheet' href='css/container.css'/> <!-- Gestion du container -->
|
|
|
|
<link type='text/css' rel='stylesheet' href='css/menu.css' /> <!-- Gestion du menu -->
|
|
|
|
<link type='text/css' rel='stylesheet' href='css/global.css' /> <!-- Style global -->
|
2015-10-20 20:10:38 +00:00
|
|
|
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
|
2015-10-20 08:44:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- Dépendences Javascript -->
|
|
|
|
<script type='text/javascript' src='js/shortcut.js' ></script> <!-- Gestion des raccourcis clavier -->
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body><!-- CORPS DE LA PAGE -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-20 20:10:38 +00:00
|
|
|
<!-- HEADER DE LA PAGE -->
|
|
|
|
<div id='HEADER'>
|
2015-10-20 08:44:40 +00:00
|
|
|
|
2015-10-20 20:10:38 +00:00
|
|
|
<div id='icon' style='width:100px; height:100%; background: blue;'></div>
|
|
|
|
|
|
|
|
<!-- MENU DE LA PAGE -->
|
|
|
|
<nav id='MENU'>
|
|
|
|
<a href='home.php' >Accueil </a>
|
|
|
|
<a href='groups.php' >Groupes </a>
|
|
|
|
<a href='ue.php' >Suivi </a>
|
|
|
|
<a href='modules.php' >Modules </a>
|
|
|
|
<a href='marks.php' >Notes </a>
|
|
|
|
<a href='settings.php'>Paramètres </a>
|
|
|
|
</nav>
|
2015-10-20 08:44:40 +00:00
|
|
|
|
2015-10-20 21:03:24 +00:00
|
|
|
<?php
|
|
|
|
if( isset($_SESSION['username']) && strlen($_SESSION['username']) > 1 )
|
|
|
|
echo '<a>'.$_SESSION['username'].'</a>';
|
|
|
|
else
|
|
|
|
echo "<a class='active'>Authentificaiton</a>";
|
|
|
|
?>
|
2015-10-20 08:44:40 +00:00
|
|
|
|
2015-10-20 20:10:38 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div id='AUTH_FILTER'></div>
|
|
|
|
<form id='AUTH' action='' method='POST'>
|
2015-10-20 21:03:24 +00:00
|
|
|
Connection
|
2015-10-20 20:10:38 +00:00
|
|
|
<input type='text' name='username' placeholder='username'>
|
|
|
|
<input type='password' name='password' placeholder='password'>
|
|
|
|
<input type='submit' value='Connection'>
|
|
|
|
</form>
|
2015-10-20 08:44:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- CONTENEUR DE LA PAGE -->
|
|
|
|
<div id='CONTAINER'></div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- MESSAGE BOX DE LA PAGE -->
|
|
|
|
<div id='MSGBOX' class=''>Hey! Your password is not the right one.</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Dépendences Javascript après chargement des éléments -->
|
|
|
|
<script type='text/javascript' src='js/actionScript.js'></script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|