sid/page/auth.php

42 lines
969 B
PHP
Raw Normal View History

<?php require('../manager/security.php'); session_init();
/****************************/
/* FORMULAIRE DE CONNECTION */
/****************************/
?>
<hgroup class='active'>Connection</hgroup>
<section>
<form id='user' style='width: 20em; margin-left: calc(50% - 20em/2);'>
<input type='text' name='username' placeholder='username' class='user' style='width:calc( 100% - 2*1.8em );'>
<input type='password' name='password' placeholder='password' style='width:calc( 100% - 2*1.8em );'>
<input type='button' name='submit' value='Connection' style='width:50%;margin-left: 25%;'>
</form>
</section>
<?php
/***************************/
/* VISUALISATION DU PROFIL */
/***************************/
if( isset($_SESSION['permissions']) && $_SESSION['permissions'] != null ){ ?>
<hgroup>Mon Profil</hgroup>
<section>
username = <?php echo $_SESSION['username']; ?><br>
droits = <?php echo $_SESSION['permissions']; ?>
</section>
<?php } ?>