| 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 | <?php \r |
| 10 | header("Content-type: text/html; charset=utf-8");\r |
| 11 | ?>\r |
| 12 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r |
| 13 | <html xmlns="http://www.w3.org/1999/xhtml">\r |
| 14 | <head>\r |
| 15 | <title>P A F -- AUF Phnom Penh, Cambodge</title>\r |
| 16 | <link rel="shortcut icon" type="image/ico" href="images/paf.ico" />\r |
| 17 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r |
| 18 | <link href="includes/styles/style.css" rel="stylesheet" type="text/css" />\r |
| 19 | </head>\r |
| 20 | <?php\r |
| 21 | include("includes/connection.php");\r |
| 22 | include("includes/functions.php");\r |
| 23 | if($_REQUEST["ID"] !=""){\r |
| 24 | $IDS = $_REQUEST["ID"];\r |
| 25 | //-----------Tirer les inforamtions aprÚs sauvegarder---------\r |
| 26 | $Strs = "Select nom, prenom, datedenaissance, motdepasse, id from tblinscrit where id=".$IDS."";\r |
| 27 | $Rows = mysql_fetch_row(mysql_query($Strs)) or die("Erreur de tirer les informations.");\r |
| 28 | }\r |
| 29 | $kompler = "{%#bb^csr%#}";\r |
| 30 | //----------------Sauvegarder les informations-------------------------------\r |
| 31 | if(($_REQUEST["page"]=="login")&&($_REQUEST["cmdSave"])){\r |
| 32 | include("includes/tclyit_cam_pc.php");\r |
| 33 | /*$txtMDP = $_REQUEST["txtMotdepasse"]; echo $txtMDP;\r |
| 34 | $txtMDPC = $_REQUEST["txtMotdepasseconfirmer"]; echo $txtMDPC;*/\r |
| 35 | if($_REQUEST["txtNom"]==""){\r |
| 36 | $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r |
| 37 | if($_REQUEST["txtPrenom"]==""){\r |
| 38 | $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre prénom.'>";\r |
| 39 | }\r |
| 40 | if(($_REQUEST["selJour"]=="")||($_REQUEST["selMois"]=="")||($_REQUEST["selAnnee"]=="")){\r |
| 41 | $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r |
| 42 | }\r |
| 43 | if($_REQUEST["txtMotdepasse"]==""){\r |
| 44 | $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r |
| 45 | }\r |
| 46 | if($_REQUEST["txtMotdepasseconfirmer"]==""){\r |
| 47 | $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe confirmé.'>";\r |
| 48 | }\r |
| 49 | }elseif($_REQUEST["txtPrenom"]==""){\r |
| 50 | $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre prénom.'>";\r |
| 51 | if($_REQUEST["txtNom"]==""){\r |
| 52 | $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r |
| 53 | }\r |
| 54 | if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="année")){\r |
| 55 | $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r |
| 56 | }\r |
| 57 | if($_REQUEST["txtMotdepasse"]==""){\r |
| 58 | $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r |
| 59 | }\r |
| 60 | if($_REQUEST["txtMotdepasseconfirmer"]==""){\r |
| 61 | $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe confirmé.'>";\r |
| 62 | }\r |
| 63 | }elseif(($_REQUEST["selJour"]=="")||($_REQUEST["selMois"]=="")||($_REQUEST["selAnnee"]=="")){\r |
| 64 | $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r |
| 65 | if($_REQUEST["txtPrenom"]==""){\r |
| 66 | $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre prénom.'>";\r |
| 67 | }\r |
| 68 | if($_REQUEST["txtNom"]==""){\r |
| 69 | $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r |
| 70 | }\r |
| 71 | if($_REQUEST["txtMotdepasse"]==""){\r |
| 72 | $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r |
| 73 | }\r |
| 74 | if($_REQUEST["txtMotdepasseconfirmer"]==""){\r |
| 75 | $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe confirmé.'>";\r |
| 76 | }\r |
| 77 | }elseif($_REQUEST["txtMotdepasse"] != $_REQUEST["txtMotdepasseconfirmer"]){\r |
| 78 | $ErrorMotPasse = "<img src='./images/error.png' title='Votre mot de passe confirmé n`est pas correct.'>";\r |
| 79 | }elseif($_REQUEST["txtMotdepasse"]==""){\r |
| 80 | $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r |
| 81 | if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="année")){\r |
| 82 | $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r |
| 83 | }\r |
| 84 | if($_REQUEST["txtPrenom"]==""){\r |
| 85 | $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre prénom.'>";\r |
| 86 | }\r |
| 87 | if($_REQUEST["txtNom"]==""){\r |
| 88 | $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r |
| 89 | }\r |
| 90 | if($_REQUEST["txtMotdepasseconfirmer"]==""){\r |
| 91 | $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre .'>";\r |
| 92 | }\r |
| 93 | }elseif($_REQUEST["txtMotdepasseconfirmer"]==""){\r |
| 94 | $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe confirmé.'>";\r |
| 95 | if($_REQUEST["txtMotdepasse"]==""){\r |
| 96 | $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r |
| 97 | }\r |
| 98 | if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="année")){\r |
| 99 | $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r |
| 100 | }\r |
| 101 | if($_REQUEST["txtPrenom"]==""){\r |
| 102 | $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre prénom.'>";\r |
| 103 | }\r |
| 104 | if($_REQUEST["txtNom"]==""){\r |
| 105 | $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r |
| 106 | }\r |
| 107 | }else{\r |
| 108 | //----------Sauvegarder les informations ---------------\r |
| 109 | $DOB = $_REQUEST["selAnnee"]."-".$_REQUEST["selMois"]."-".$_REQUEST["selJour"];\r |
| 110 | $Str = "Insert Into tblinscrit (nom, prenom, datedenaissance, motdepasse, login, dateinlogin) Values('".str_replace("'","`",$_REQUEST["txtNom"])."','".str_replace("'","`",$_REQUEST["txtPrenom"])."','".$DOB."', '".encrptPwd(strtolower($_REQUEST["txtMotdepasse"]),$kompler)."','C','".date("Y-m-d")."')";\r |
| 111 | @mysql_query($Str) or die("Veuillez contacter l'administrateur. On ne peut pas sauvgarder ces informations (log in).");\r |
| 112 | $ID = mysql_insert_id();\r |
| 113 | redirect("$PHP_SELF?page=login&ID=$ID");\r |
| 114 | }\r |
| 115 | }\r |
| 116 | \r |
| 117 | //=========================xxxxxxxxxxxxxxxxxxxxxxxxxxxxx==============================\r |
| 118 | //-----------------------Accer le PAF par le compte créé------------------------------\r |
| 119 | if($_REQUEST["cmdLogin"]){\r |
| 120 | if($_REQUEST['txtUserName'] <> "" && $_REQUEST['txtPassword'] <> "") {\r |
| 121 | include("includes/connection.php");\r |
| 122 | $Scq=mysql_query("select * from tblinscrit");\r |
| 123 | $Scount = mysql_num_rows($Scq); //echo"Ha..ha..".$Scount;\r |
| 124 | if($Scount == 0){\r |
| 125 | $_SESSION['adminAUFPPKH']="y";\r |
| 126 | redirect("admin/index_admin.php");\r |
| 127 | }else{\r |
| 128 | //$txtPWD = decrptPwd($_SERVER['PHP_AUTH_PW'],$kompler);\r |
| 129 | $Query=mysql_query("Select * from tblinscrit where id = '".substr($_REQUEST["txtUserName"],1)."' and motdepasse = '".encrptPwd(strtolower($_REQUEST['txtPassword']),$kompler)."'");\r |
| 130 | $Col=mysql_fetch_row($Query);\r |
| 131 | if($Col[0] <> ""){\r |
| 132 | $_SESSION["adminAUFPPKH"]="y";\r |
| 133 | $_SESSION["UserNamePAF"]=$_REQUEST['txtUserName'];\r |
| 134 | $_SESSION["PasswordPAF"]=$_REQUEST['txtPassword'];\r |
| 135 | $St = "Insert into tblaccountaccess (username,accesstime) values('".$_REQUEST['txtUserName']."',CURRENT_TIMESTAMP)";\r |
| 136 | @mysql_query($St) or die("2");\r |
| 137 | redirect("index_main.php");\r |
| 138 | echo "<center>Vous êtes connecté ... ";\r |
| 139 | echo "[<a href='" . $_SERVER['PHP_SELF'] . "?actlogin=logout'>Déconnexion</a>]</center>";\r |
| 140 | }else{\r |
| 141 | unset($_SESSION["loginAUFKH"]);\r |
| 142 | unset($_SESSION["adminAUFPPKH"]);\r |
| 143 | unset($_SESSION["UserNamePAF"]);\r |
| 144 | unset($_SESSION["PasswordPAF"]);\r |
| 145 | $Message = "0";\r |
| 146 | //redirect("index.php?msg=$Message");\r |
| 147 | //echo "<meta http-equiv=\"Refresh\" content=\"0;url=$HTTP_SERVER_VARS[PHP_SELF]\">";\r |
| 148 | }\r |
| 149 | }\r |
| 150 | }else{\r |
| 151 | unset($_SESSION["loginAUFKH"]);\r |
| 152 | unset($_SESSION["adminAUFPPKH"]);\r |
| 153 | unset($_SESSION["UserNamePAF"]);\r |
| 154 | unset($_SESSION["PasswordPAF"]);\r |
| 155 | echo "<meta http-equiv=\"Refresh\" content=\"0;url=$HTTP_SERVER_VARS[PHP_SELF]\">";\r |
| 156 | $Message = "<font style='color:#F00F00;'>Connexion échouée....</font>";\r |
| 157 | }\r |
| 158 | }\r |
| 159 | //-------------------------------XXXXXXXXXX-------Search-------XXXXXXXXXX------------------\r |
| 160 | if($_REQUEST["str_sch"]!="" && $_REQUEST["cmdSearch"]){\r |
| 161 | $StrSearch = $_REQUEST["txtSearch"];\r |
| 162 | $Sql_Ct=mysql_query("Select id, nom, prenom, sexe, datedenaissance, nationalite, login, motdepasse, universite, faculte, promotion, anneediplome, delf, anneedelf, langueautre, email, telephonepersonnelle, adressepersonnelle, telephoneparents, adresseparents, titretravail, adressetravail, divers, datein from tblinscrit where nom like '%$StrSearch%' or prenom like '%$StrSearch%' or nationalite like '%$StrSearch%' or universite like '%$StrSearch%' or faculte like '%$StrSearch%' or promotion='$StrSearch' or anneediplome='$StrSearch' or delf like '%$StrSearch%' or anneedelf='$StrSearch' or langueautre like '%$StrSearch%' or email like '%$StrSearch%' or telephonepersonnelle like '%$StrSearch%' or adressepersonnelle like '%$StrSearch%' or telephoneparents like '%$StrSearch%' or adresseparents like '%$StrSearch%' or titretravail like '%$StrSearch%' or adressetravail like '%$StrSearch%' or divers like '%$StrSearch%' order by nom asc");\r |
| 163 | $Num=mysql_num_rows($Sql_Ct);\r |
| 164 | }elseif($_REQUEST["str_sch"]!=""){\r |
| 165 | $StrSearch = $_REQUEST["str_sch"];\r |
| 166 | $Sql_Ct=mysql_query("Select id, nom, prenom, sexe, datedenaissance, nationalite, login, motdepasse, universite, faculte, promotion, anneediplome, delf, anneedelf, langueautre, email, telephonepersonnelle, adressepersonnelle, telephoneparents, adresseparents, titretravail, adressetravail, divers, datein from tblinscrit where nom like '%$StrSearch%' or prenom like '%$StrSearch%' or nationalite like '%$StrSearch%' or universite like '%$StrSearch%' or faculte like '%$StrSearch%' or promotion='$StrSearch' or anneediplome='$StrSearch' or delf like '%$StrSearch%' or anneedelf='$StrSearch' or langueautre like '%$StrSearch%' or email like '%$StrSearch%' or telephonepersonnelle like '%$StrSearch%' or adressepersonnelle like '%$StrSearch%' or telephoneparents like '%$StrSearch%' or adresseparents like '%$StrSearch%' or titretravail like '%$StrSearch%' or adressetravail like '%$StrSearch%' or divers like '%$StrSearch%' order by nom asc");\r |
| 167 | $Num=mysql_num_rows($Sql_Ct);\r |
| 168 | }\r |
| 169 | \r |
| 170 | //--------------Tirer information de Session-----------------------------------------------\r |
| 171 | if($_SESSION["UserNamePAF"] !=""){\r |
| 172 | $St = "Select id, nom, prenom from tblinscrit where id=".substr($UserName,1);\r |
| 173 | $Rowss = mysql_fetch_row(mysql_query($St)) or die("Contactez votre administrateur...(érreur: select session id)");\r |
| 174 | $Deconnexion = "<a href='index.php?actlogin=logout' title='déconnexion'>Déconnexion</a>";\r |
| 175 | }\r |
| 176 | ?>\r |
| 177 | <body class="oneColLiqCtrHdr">\r |
| 178 | <form name="PAF" method="post" enctype="application/x-www-form-urlencoded">\r |
| 179 | <div id="container">\r |
| 180 | <div id="header">\r |
| 181 | <table width="100%" cellpadding="0" cellspacing="0">\r |
| 182 | <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 |
| 183 | <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 |
| 184 | <td width="41%" valign="bottom" align="right" style="padding-bottom:15px; padding-right:10px;">\r |
| 185 | <?php echo $Rowss['1']." ".$Rowss['2']; ?> <?php echo $Deconnexion; ?></td>\r |
| 186 | </tr>\r |
| 187 | </table>\r |
| 188 | <!-- end #header --></div>\r |
| 189 | <div id="searchContent">\r |
| 190 | <table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;" width="100%" align="right">\r |
| 191 | <tr><td width="94%" align="right"><!--Hyperlines généraux en tête--------------->\r |
| 192 | <a href="index.php" title="Accueil">Accueil</a> > Recherche\r |
| 193 | Rechercher : <input type="text" name="txtSearch" value="<?php echo $StrSearch; ?>" />\r |
| 194 | </td>\r |
| 195 | <td width="6%" align="left"><input type="submit" name="cmdSearch" value="OK" /></td>\r |
| 196 | </tr>\r |
| 197 | </table>\r |
| 198 | </div>\r |
| 199 | <div id="mainContent">\r |
| 200 | <?php\r |
| 201 | include("forms/search_infos.php");\r |
| 202 | ?>\r |
| 203 | <!-- end #mainContent -->\r |
| 204 | </div>\r |
| 205 | <div id="footer">\r |
| 206 | <table cellpadding="0" cellspacing="0" border="0" height="40" width="100%">\r |
| 207 | <tr><td width="80%">Agence Universitaire de la Francophonie -- Antenne de Phnom Penh, Cambodge</td>\r |
| 208 | <td width="20%" align="center">Administrateur</td>\r |
| 209 | </tr>\r |
| 210 | </table>\r |
| 211 | <!-- end #footer --></div>\r |
| 212 | <!-- end #container --></div>\r |
| 213 | </form>\r |
| 214 | </body>\r |
| 215 | </html>\r |