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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
<?php
session_start();
// code de verrification du captcha et la valeur saisie dans le input
if( (isset($_post['sident'])) &&(!empty($_SESSION['captcha'])) && ($_SESSION['captcha'] == $_POST['code']))
{
//
echo "<p> code valide!<br/></p>";
//unset($_SESSION['captcha']);
}
else {
echo "<p> code invalide.....</p>";
}
?>
<!DOCTYPE html>
<HTML>
<head>
<!--Pour forcer le navigateur à afficher en mode IE9, sans quoi il peut passer en mode quirks.-->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="utf-8" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <!-- application dynamique -->
<link rel="shortcut icon" href="image/favs3g.ico" />
<link rel="stylesheet" media="screen" type="text/css" href="css/style_div.css">
<title> Identification</title>
<script type="text/javascript"> // fonction pour empeché le retour arrière boutton du navigateur
function noBack(){window.history.forward()}
noBack();
window.onload=noBack;
window.onpageshow=function(evt){if(evt.persisted)noBack()}
window.onunload=function(){void(0)}
</script>
</head>
<body>
<div class="entete">
<div class="date">
<?php
$jour = array("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi");
$mois = array("","Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre");
$heure_courante = date ("H:i");
$dateDuJour = $jour[date("w")]." ".date("d")." ".$mois[date("n")]." ".date("Y")." ".$heure_courante;
echo "Date: ". $dateDuJour;
?>
</div>
<div class="h1">
<h1> S-3-G: Identification </h1>
</div>
</div>
<div class="contenu">
<form class="form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" autocomplete='off'>
<p class="labelident"><label for="ident">Identifiant:</label>
<input type="text" name="ident" value="<?php if (isset($_POST['ident']))echo stripslashes(htmlentities(trim($_POST['ident']))); ?>" size="28" maxlength="23" id="ident" autofocus/>
<?php
if (!empty($erreurs_msg['ident']))
{
affichage_texte ("3", "red",$erreurs_msg['ident']); // fonction js pour afficher le msg en rouge
}
?>
</p>
<p class="labelpass"><label for="pass">Mot de passe:</label>
<input type="password" name="pass" value="<?php if (isset($_POST['pass']))echo stripslashes(htmlentities(trim($_POST['pass']))); ?>" " size="28" maxlength="23" id="pass"/>
<?php
if (!empty($erreurs_msg['pass']))
{
affichage_texte ("3", "red",$erreurs_msg['pass']); // fonction pour afficher le msg en rouge
}
?>
</p>
<p>
<label>Texte de l'image</label> : <input type="text" name="code" value="" size="6" id="captcha" />
<img src= "captcha.php" alt="Texte de l'image" />
<a href="test.php"> voir captcha </a>
</p>
<?php
if (!empty($erreurs_msg['code']))
{
affichage_texte ("3", "red",$erreurs_msg['code']); // fonction pour afficher le msg en rouge erreur captcha
}
?>
<p class="buttons">
<button type="submit" name="sident" value="envoyer" >Connexion</button>
</p>
</form>
</div>
<footer class="pied">
<p> Copyright © s3g - Conception kacinet <p>
</footer>
</body>
</html> |
Partager