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
| <?php
include("requetes.php");
if (isset($_POST['login']) && isset($_POST['password']))
{
session_start();
$login=$_POST['login'];
$password=$_POST['password'];
$count=0;
$count=NombreDeLignes(verificationInformations( $_POST['login'],$_POST['password']));
//vérification
if($count!=0)
{
$Donnees=executeTableau(DonneesPseudo($_SESSION['LOGIN']));
$_SESSION['LOGIN']=$login;
$LastDate= executeTableau(informationsConnexionLogin($_SESSION['LOGIN']));
$_SESSION['DATE']=$LastDate['DateDerniereConnexion'];
$_SESSION['HEURE']=$LastDate['HeureDerniereConnexion'];
If ($LastDate)
{
// changement de la date de connexion
$resultat=executeUpdate(UpdateConnexion($_SESSION['LOGIN']));
if ($resultat )
{
ob_end_clean();
header("location:accueil.php");
}
else
{
ob_end_clean();
header("location:index.php");
}
}
}
else //si pas d'identifiants, retour case départ
{
ob_end_clean();
header("location:index_refus.php");
}
}
?> |