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