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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
<?php
// j'avais des variables de session mais ici je l'ai mis en dur pour tester.
$IdEntreprise = "titi";
$PassEntreprise = "tata";
$connect = mysql_connect("","",""); // rempli avec ce qu'il faut
mysql_select_db("mabase");
$requeteAuthentification = mysql_query("select * from entreprise where IdentifiantEntreprise='$IdEntreprise' AND
PasswordEntreprise='$PassEntreprise'");
$nombreEnregistrement = mysql_numrows($requeteAuthentification);
mysql_close($connect);
if($nombreEnregistrement == false)
{
echo "<script>alert('Vos identifiants sont incorrect ou n existent pas');</script>";
$delai=0.50;
$url='index.php';
header("Rsefresh: $delai;url=$url");
exit(0);
}
else
{
?>
<h2 align="center"><strong><font color='#339933' >vous avez été correctement authentifié</font></strong></h2>
<?php
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>toto.php</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
h2 {text-decoration:blink;}
</style>
</head>
<body>
<h1>Bienvenue sur ... <font color="#0066CC"> <?php echo $IdEntreprise?></font> </h1>
<ul>
<li>Intervenant</li>
<ul>
<li><a href="AjoutIntervenant.php#ajout" > Ajouter</a></li>
<li><a href="ModifierInter.php#modifier" > Modifier</a></li>
<li><a href="DeleteIntervenant.php#supprimer" > Supprimer</a></li>
<li><a href="VoirLesIntervenant.php#" > Voir les intervenants</a></li>
</ul>
<li>Chantier</li>
<ul>
<li><a href="AjouterChantier.php#ajouter" > Ajouter</a></li>
<li><a href="ModifierChant.php#modifier" > Modifier</a></li>
<li><a href="DeleteChantier.php#supprimer" >Supprimer</a></li>
<li><a href="VoirLesChantier.php#" > Voir les chantiers</a></li>
</ul>
</ul>
</body>
</html> |