| Server IP : 167.99.254.82 / Your IP : 216.73.216.76 Web Server : Apache System : Linux host.techisquad.com 5.15.0-187-generic #197-Ubuntu SMP Fri Jul 17 19:17:01 UTC 2026 x86_64 User : pawluxera ( 1011) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/factures/public_html/ |
Upload File : |
<?php
session_start();
ini_set('display_errors',1);
$link = mysqli_connect("localhost", "advery", "EoM6IJlnirGIfcu","factures") or die("Impossible de se connecter : " . mysqli_error());
if (!$link) {
die('Could not connect to MySQL: ' . mysql_error());
}
//test de validit� des param�tres d'authentification
$reponse = "select count(*) from comptes_user where mail_clt = '$_POST[email_clt]' and pwd = '$_POST[pwd]';";
$exec =mysqli_query($link,$reponse);
$num = mysqli_fetch_row($exec);
if ( $num['0']== 0)
{
header('Location: error_cnx.html');
exit();
}
else
{
$reponse = "select * from comptes_user where mail_clt = '$_POST[email_clt]' and pwd = '$_POST[pwd]' ;";
$exec =mysqli_query($link,$reponse);
$row = mysqli_fetch_assoc($exec);
/*echo $row['etat_cpt'];*/
var_dump($row);
if ( $row['etat_cpt'] == 1 ) // Compte actif
{
if ( $row['type_user'] == 'Administrateur' )
{
$_SESSION['compte_user'] = $row["id_clt"];
$_SESSION['select_user'] = 'OFF';
header('Location: Introadmin.php');
exit();
}
/*if ( $row['type_user'] == 'Client' )
{
$_SESSION['compte_user'] = $row[id_clt];
header('Location: IntroClient.php');
exit();
}
if ( $row['type_user'] == 'Fournisseur' )
{
$_SESSION['compte_user'] = $row[id_clt];
header('Location: Erreur-acces.html');
exit();
}*/
else
{
header('Location: Erreur-acces.html');
exit();
}
}
if ( $row['etat_cpt'] == 2 ) // Compte en cours de traitement par le WebMaster
{
header('Location: Suspend-compte.html');
exit();
}
}
?>