Amélioration de la gestion des encodages.
[auf_paf.git] / index_pwd.php
CommitLineData
98ff4c8e 1<?php\r
2 error_reporting (E_ALL ^ E_NOTICE); //------pour &eacute;viter les notices sur les variables---------------\r
3 session_start();\r
4 $admin=$_SESSION["adminAUFPPKH"];\r
5 $UserName=$_SESSION["UserNamePAF"];\r
6 $Password=$_SESSION["PasswordPAF"];\r
7 include("includes/redirect.php");\r
8 if(!($admin == "y")){\r
9 redirect("index.php");\r
10 }\r
11 \r
12?>\r
96ef3f02
CT
13<?php \r
14 header("Content-type: text/html; charset=utf-8");\r
15?>\r
98ff4c8e 16<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
17<html xmlns="http://www.w3.org/1999/xhtml">\r
18<head>\r
19<title>P A F -- AUF Phnom Penh, Cambodge</title>\r
20<link rel="shortcut icon" type="image/ico" href="images/paf.ico" />\r
21<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
22<link href="includes/styles/style.css" rel="stylesheet" type="text/css" />\r
23</head>\r
24<?php\r
25 include("includes/connection.php");\r
26 include("includes/functions.php");\r
27 $kompler = "{%#bb^csr%#}";\r
28 //----------------Sauvegarder les informations-------------------------------\r
29 if($_REQUEST["cmdSave"]){\r
30 include("includes/tclyit_cam_pc.php");\r
31 /*$txtMDP = $_REQUEST["txtMotdepasse"]; echo $txtMDP;\r
32 $txtMDPC = $_REQUEST["txtMotdepasseconfirmer"]; echo $txtMDPC;*/\r
33 if($_REQUEST["txtMotdepasse"] != $_REQUEST["txtMotdepasseconfirmer"]){\r
34 $ErrorMotPasse = "<img src='images/error.png' title='Votre mot de passe confirm&eacute; n`est pas correct.'>";\r
35 }elseif($_REQUEST["txtMotdepasse"]==""){\r
36 $ErrorMDP = "<img src='images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
37 if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
38 $ErrorMDPC = "<img src='images/error.png' title='Veuillez saisire votre mot de passe confirm&eacute;.'>";\r
39 }\r
40 }elseif($_REQUEST["txtMotdepasseconfirmer"]==""){\r
41 $ErrorMDPC = "<img src='images/error.png' title='Veuillez saisire votre mot de passe confirm&eacute;.'>";\r
42 if($_REQUEST["txtMotdepasse"]==""){\r
43 $ErrorMDP = "<img src='images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
44 }\r
45 }else{\r
46 //----------Sauvegarder les informations ---------------\r
47 $Str = "Update tblinscrit set motdepasse='".encrptPwd(strtolower($_REQUEST["txtMotdepasse"]),$kompler)."' Where id=".substr($_SESSION["UserNamePAF"],1);\r
48 @mysql_query($Str) or die("Veuillez contacter l'administrateur. On ne peut pas sauvgarder ces informations (modifier mot de passe).");\r
49 exit;\r
50 }\r
51 }\r
52?>\r
53<body class="oneColLiqCtrHdr">\r
54<form name="PAF" method="post" enctype="application/x-www-form-urlencoded">\r
55<div id="container">\r
56 <div id="header">\r
57 <table width="100%" cellpadding="0" cellspacing="0">\r
58 <tr><td colspan="2"><a href="http://www.auf.org/" title="AUF" target="_blank"><img src="images/auf.gif" width="155" height="110" border="0" /></a></td>\r
59 <td width="39%" align="right"><h1 class="oneColLiqCtrHdr">P A F</h1></td>\r
60 <td width="41%" valign="bottom" align="right" style="padding-bottom:15px; padding-right:10px;">\r
61 <?php echo $Rows['1']." ".$Rows['2']; ?> &nbsp; <?php echo $Deconnexion; ?></td>\r
62 </tr>\r
63 </table>\r
64 <!-- end #header --></div>\r
65 <div id="mainContent">\r
66 <table width="100%" cellpadding="3" cellspacing="3" border="0" style="border-collapse:collapse;">\r
67 <tr><td colspan="2"><h2>Modifier vote mot de passe</h2></td>\r
68 <tr><td width="26%">Nouveau mot de passe :</td>\r
69 <td width="74%"><input type="password" name="txtMotdepasse" size="25" />&nbsp;&nbsp;<?php echo $ErrorMDP ; ?></td></tr>\r
70 <tr><td>Confirmer :</td><td><input type="password" name="txtMotdepasseconfirmer" size="25" />&nbsp;&nbsp;<?php echo $ErrorMDPC." ".$ErrorMotPasse; ?></td></tr>\r
71 <tr><td></td><td><input type="submit" name="cmdSave" value="Sauvegarder" />\r
72 &nbsp; <?php if($_REQUEST["msg"]=="0"){ echo "<font style='color:#F00F00;'>Connexion &eacute;chou&eacute;e....</font>"; }else{ echo $Message; } ?></td></tr>\r
73 <tr><td></td><td style="padding-top:10px;"></td></tr>\r
74 </table>\r
75 <!-- end #mainContent --></div>\r
76 <div id="footer">\r
77 <table cellpadding="0" cellspacing="0" border="0" height="40" width="100%">\r
78 <tr><td width="80%">Agence Universitaire de la Francophonie -- Antenne de Phnom Penh, Cambodge</td>\r
79 <td width="20%" align="center">Administrateur</td>\r
80 </tr>\r
81 </table>\r
82 <!-- end #footer --></div>\r
83<!-- end #container --></div>\r
84</form>\r
85</body>\r
86</html>\r