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 113 114 115 116 117 118 119 120 121 122 123 124
| <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> CHAT SMS : Welcome </title>
<link rel="stylesheet" href="css/design.css" />
<script type="text/javascript" src="js/jquery-1.8.2.js"></script>
<script type="text/javascript">
function encode(istr)
{
var j,nchar,ch,str ="";
for(j=0;j < istr.length; j++)
{
nchar = istr.charCodeAt(j);
str= nchar+ ";" ;
}
return str;
}
$(document).ready(function(){
$("#form").submit(function(){
var login= encode($('#login').val());
var password= encode($('#password').val());
if(login== '' ||password== '')
{
alert('les champs doivent etre remplis');
}else
{
$.ajax({
url:$(this).attr('action'),
type:$(this).attr('method'),
data: $(this).serialize(),
success: succes
});
}
return false;
});
});
// On les poste en Ajax
</script>
</head>
<body>
<div id="corps">
<?php
$chemin='header/';
include($chemin.'logo.php');
// $chemin='../admin/header/';
// include($chemin.'banniere.php');
?>
<div id="contenu">
<form dir="rtl" id="form" class="formlogin" method="POST" action="login.php">
<table >
<caption>معلومات الدخول</caption>
<tr>
<td> <input type="hidden" name="id" ></td>
</tr>
<tr>
<td dir="rtl"><label> إسم*الدخول:</label></td>
<td><input type="text" id="login" name="login" ></td>
</tr>
<tr>
<td dir="rtl"><label> كلمة*السر:</label></td>
<td><input type="password" id="password" name="password" ></td>
</tr>
<tr>
<td> <button type="submit" id="send" name="send" value="se connecter">
دخول
</button>
</td>
<td><a href="sendmail.php">نسيت كلمة السر</a></td>
</tr>
</table>
</form>
<p style="color: #B22222">
<?php
$message = "";
if(isset($_GET["erreur"]))
{
switch($_GET['erreur'])
{
case 1:
$message = "mot de passe incorrecte veuillez reessayer";
break;
case 2:
$message = " ce login n'existe pas dans la base de données veuillez reessayer";
break;
}
echo $message;
}
if(isset($_GET["reussite"]))
{
echo "<br>Un email vous a été envoyé<br>";
echo"consultez votre boite e-mail , recuperez votre nouveau mot de passe et reconnectez vous ";
}
?>
</p>
</div>
</div>
</body>
</html> |
Partager