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 47 48 49 50
| <?
session_start();
include("configbase.php");
$login=$_POST['login'];
$password=$_POST['password'];
$password=md5($password);
$req1 = "SELECT * FROM acteur WHERE login='$login' AND password='$password' and droit ='hybride' and etat='actif' ";
$res1 = mysql_query($req1) or die("<p align=center><b>Impossible d'accéder à votre requête</b></p>");
$nblignes = mysql_num_rows($res1);
if ($nblignes!=1)
{
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<HEAD>
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<!--<META HTTP-EQUIV="refresh" CONTENT="2;URL=index.php">-->
<!-- Icône du site (favicon) -->
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<style>
b {font: 14px Verdana, Helvetica; font-weight: bold;color=#OO60c0"}
</style>
<TITLE>ADHESION GAZETTE LABORATOIRE</TITLE>
</HEAD>
<body BGCOLOR="#AODOFF" TEXT="#OO60c0">
<TABLE width=100%>
<br>
<p align=center><font color=red><b>Erreur d'identification, veuillez entrez un login et un mot de passe valide !</b></font></p>
<?
}
else
{
$row1 = mysql_fetch_assoc($res1);
$id = $row1['id'];
$pays = $row1['pays'];
$req2 = "SELECT id_support FROM support_web WHERE id_pays = $pays";
$res2 = mysql_query($req2);
$row2 = mysql_fetch_assoc($res2);
$_SESSION["abonn"] = array(1=>$id,$login);
$_SESSION["id"] = $id;
$_SESSION["pays"] = $pays;
$_SESSION["support"] = $row2['id_support'];
session_register("abonn");
session_register("id");
session_register("pays");
session_register("support");
header("location:abonnement.php");
}
?> |