Première version publique
[auf_paf.git] / index_mdpo.php
CommitLineData
98ff4c8e 1<?php\r
2 error_reporting (E_ALL & ~E_NOTICE & ~E_DEPRECATED);\r
3 session_start();\r
4 $admin=$_SESSION["adminAUFPPKH"];\r
5 $UserName=$_SESSION["UserNamePAF"];\r
6 $Password=$_SESSION["PasswordPAF"];\r
7 \r
8?>\r
9<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
10<html xmlns="http://www.w3.org/1999/xhtml">\r
11<head>\r
12<title>P A F -- AUF Phnom Penh, Cambodge</title>\r
13<link rel="shortcut icon" type="image/ico" href="images/paf.ico" />\r
14<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
15<link href="includes/styles/style.css" rel="stylesheet" type="text/css" />\r
16</head>\r
17<?php\r
18 include("includes/connection.php");\r
19 include("includes/functions.php");\r
20 include("includes/redirect.php");\r
21 $kompler = "{%#bb^csr%#}";\r
22 //----------------Sauvegarder les informations-------------------------------\r
23 if($_REQUEST["cmdSend"]){\r
24 if($_REQUEST["txtMail"]==""){\r
25 $ErrorMail = "<img src='./images/error.png' title='Veuillez saisire votre adresse de courriel.'>";\r
26 $MsgErrors = "<span style='background-color:#F00F00; color:#FFFFFF;'>Erreur, votre mot de passe n'a pas envoy&eacute;.</span>";\r
27 }elseif(check_email($_REQUEST["txtMail"])==false){\r
28 $ErrorMail = "<img src='./images/error.png' title='Veuillez v&eacute;rifier votre mail.'>";\r
29 $MsgErrors = "<span style='background-color:#F00; color:#FFFFFF;'>Erreur, votre mot de passe n'a pas envoy&eacute;.</span>";\r
30 }else{\r
31 //----------tirer le mot de passe et login----------\r
32 $Strs = "Select login, motdepasse, id from tblinscrit where email='".$_REQUEST["txtMail"]."'";\r
33 $Row = mysql_fetch_row(mysql_query($Strs));\r
34 if(mysql_num_rows(mysql_query($Strs))>0){\r
35 //----------Envoyer les informations ---------------\r
36 $Subject = "PAF : Mot de passe oubli&eacute;";\r
37 $Today = date("Y-m-d");\r
38 $Time = date("Y-m-d H:i:s",time());\r
39 $Body = "<html><head><title></title></head><body>\r
40 <table width=\"584\" border=\"0\" cellpadding=\"0\" cellspacing=\"6\">\r
41 <tr>\r
42 <td colspan=\"2\" align=\"right\" style=\"padding-right:20px; padding-bottom:10px;\">Date : ".$Time."</td>\r
43 </tr>\r
44 <tr bgcolor=\"#E2F080\">\r
45 <td colspan=\"2\">Suject : Mot de passe oubli&eacute;</td>\r
46 </tr>\r
47 <tr>\r
48 <td width=\"30%\">Login : </td>\r
49 <td width=\"70%\">".$Row['0'].$Row['2']."</td>\r
50 </tr>\r
51 <tr>\r
52 <td>Mot de passe : </td>\r
53 <td>".decrptPwd($Row['1'],$kompler)."</td>\r
54 </tr>\r
55 <tr><td colspan=\"5\"><hr size=\"1\"></td></tr>\r
56 </table>\r
57 </body>\r
58 </html>";\r
59 $headers = 'MIME-Version: 1.0' . "\r\n";\r
60 $headers .= 'Content-type: text/html; charset=iso-8859-15;' . "\r\n";\r
61 //------------to sender-----------------------------------------\r
62 $Footer = "<br><br>Cordialement,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;PAF<br><br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <br><br>Ce courriel a &eacute;t&eacute; envoy&eacute; par le PAF (".$Time.").<br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br><br>";\r
63 $headerss .= "Content-type: text/html; charset=iso-8859-1\r\n";\r
64 $headerss .= "From: PAF\r\n".\r
65 "Reply-To:" . "\r\n" .\r
66 "X-Mailer: PHP/" . phpversion();\r
67 $MailAddressReply = $_REQUEST["txtMail"];\r
68 $SubjectReply="Cordialement";\r
69 $BodyReply=$Body."<br />Merci beaucoup pour votre intérêt.";\r
70 //echo $MailAddressReply."<br>".$SubjectReply."<br>".$BodyReply." ".$Footer,$headerss;\r
71 //----------Mail infos to mail address---------------------------------\r
72 //@mail($MailAddressReply,$SubjectReply,$BodyReply." ".$Footer,$headerss) or die("On ne peut pas envoyer à cet adresse de courriel.");\r
73 $MsgErrors = "<span style='background-color:#000FFF; color:#FFFFFF;'>Votre mot de passe a &eacute;t&eacute; envoy&eacute; &agrave; votre mail.</span>";\r
74 }else{\r
75 $MsgErrors = "<span style='background-color:#F00; color:#FFFFFF;'>Erreur, votre adresse de courriel n'est pas correct.</span>";\r
76 }\r
77 }\r
78 }\r
79 \r
80 //-------------------------------XXXXXXXXXX-------Search-------XXXXXXXXXX------------------\r
81 if($_REQUEST["cmdSearch"]){\r
82 $StrSearch = $_REQUEST["txtSearch"];\r
83 redirect("index_search.php?str_sch=$StrSearch");\r
84 }\r
85?>\r
86<body class="oneColLiqCtrHdr">\r
87<form name="PAF" method="post" enctype="application/x-www-form-urlencoded">\r
88<div id="container">\r
89 <div id="header">\r
90 <table width="100%" cellpadding="0" cellspacing="0">\r
91 <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
92 <td width="39%" align="right"><h1 class="oneColLiqCtrHdr"><a href="index.php" title="Page d'accueil" style="text-decoration:none;">P A F</a></h1></td>\r
93 <td width="41%" valign="bottom" align="right" style="padding-bottom:15px; padding-right:10px;"></td>\r
94 </tr>\r
95 </table>\r
96 <!-- end #header --></div>\r
97 <div id="searchContent">\r
98 <table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;" width="100%" align="right">\r
99 <tr><td width="94%" align="right"><!--Hyperlines g&eacute;n&eacute;raux en tête--------------->\r
100 <a href="index.php" title="Accueil">Accueil</a> > Mot de passe oubli&eacute;\r
101 &nbsp;&nbsp;&nbsp; Rechercher : <input type="text" name="txtSearch" value="<?php echo $StrSearch; ?>" />\r
102 </td>\r
103 <td width="6%" align="left"><input type="submit" name="cmdSearch" value="OK" /></td>\r
104 </tr>\r
105 </table>\r
106 </div>\r
107 <div id="mainContent">\r
108 <?php\r
109 include("forms/mdp_oublie.php");\r
110 ?>\r
111 <!-- end #mainContent -->\r
112 </div>\r
113 <div id="footer">\r
114 <table cellpadding="0" cellspacing="0" border="0" height="40" width="100%">\r
115 <tr><td width="80%">Agence Universitaire de la Francophonie -- Antenne de Phnom Penh, Cambodge</td>\r
116 <td width="20%" align="center">Administrateur</td>\r
117 </tr>\r
118 </table>\r
119 <!-- end #footer --></div>\r
120<!-- end #container --></div>\r
121</form>\r
122</body>\r
123</html>\r