upload boulot devs
This commit is contained in:
57
promoInfo/controleurs/c_connexion.php
Normal file
57
promoInfo/controleurs/c_connexion.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
// ****************************************'
|
||||
// Le CASTEL-BTS SIO/ PROJET FORMATION '
|
||||
// Programme: c_connexion.php '
|
||||
// Objet : authentification '
|
||||
// Client : Bts SIO1 '
|
||||
// Version : 2.1 '
|
||||
// Date : 27 avril 2023 à 20h17 '
|
||||
// Auteur : pascal-blain@wanadoo.fr '
|
||||
//*****************************************'
|
||||
|
||||
if(!isset($_REQUEST['action'])){$_REQUEST['action'] = 'demandeConnexion';}
|
||||
|
||||
$action = $_REQUEST['action'];
|
||||
switch($action){
|
||||
case 'demandeConnexion':{
|
||||
session_unset();
|
||||
unset($choix);
|
||||
$formulaire = "frmIdentification";
|
||||
$champ = "login";
|
||||
include("vues/v_entete.php");
|
||||
include("vues/v_connexion.php");
|
||||
break;
|
||||
}
|
||||
case 'valideConnexion':{
|
||||
$login = $_REQUEST['login'];
|
||||
$mdp = $_REQUEST['mdp']; //sha1($_REQUEST['mdp']);
|
||||
$utilisateur = $pdo->getInfosEleve($login,$mdp);
|
||||
|
||||
if(is_array($utilisateur) && $login==$utilisateur['EL_LOGIN'] && $mdp==$utilisateur['EL_MDP'])
|
||||
{
|
||||
$id = $utilisateur['EL_NUM'];
|
||||
$nom = $utilisateur['EL_NOM'];
|
||||
$prenom = $utilisateur['EL_PRENOM'];
|
||||
$statut = $utilisateur['EL_STATUT'];
|
||||
connecter($id,$nom,$prenom,$statut);
|
||||
header ('location: index.php?choixTraitement=eleves&action=voir');
|
||||
}
|
||||
else{
|
||||
$formulaire ="frmIdentification";
|
||||
$champ ="login";
|
||||
include("vues/v_entete.php");
|
||||
ajouterErreur("Login ou mot de passe incorrect");
|
||||
include("vues/v_erreurs.php");
|
||||
include("vues/v_connexion.php");
|
||||
}
|
||||
break;
|
||||
}
|
||||
default :{
|
||||
$formulaire ="frmIdentification";
|
||||
$champ ="login";
|
||||
include("vues/v_entete.php");
|
||||
include("vues/v_connexion.php");
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user