premier commit
authorchhunly <chhunly@chhunly-desktop.(none)>
Thu, 5 May 2011 08:03:01 +0000 (15:03 +0700)
committerchhunly <chhunly@chhunly-desktop.(none)>
Thu, 5 May 2011 08:03:01 +0000 (15:03 +0700)
38 files changed:
paf/Copy of index.php [new file with mode: 0755]
paf/admin/admin_authen.php [new file with mode: 0755]
paf/admin/images/Thumbs.db [new file with mode: 0755]
paf/admin/images/tclyit_silver.jpg [new file with mode: 0755]
paf/admin/images/tclyit_silver_1.jpg [new file with mode: 0755]
paf/admin/index_admin.php [new file with mode: 0755]
paf/asss.txt [new file with mode: 0755]
paf/excel.php [new file with mode: 0755]
paf/forms/creer_infos.php [new file with mode: 0755]
paf/forms/home.php [new file with mode: 0755]
paf/forms/liste_infos.php [new file with mode: 0755]
paf/forms/login.php [new file with mode: 0755]
paf/forms/mdp_oublie.php [new file with mode: 0755]
paf/forms/search_infos.php [new file with mode: 0755]
paf/images/Thumbs.db [new file with mode: 0755]
paf/images/alert.gif [new file with mode: 0755]
paf/images/auf.gif [new file with mode: 0755]
paf/images/auf.jpg [new file with mode: 0755]
paf/images/boule.png [new file with mode: 0755]
paf/images/error.png [new file with mode: 0755]
paf/images/error_.gif [new file with mode: 0755]
paf/images/paf.ico [new file with mode: 0755]
paf/images/register.jpg [new file with mode: 0755]
paf/images/warning.png [new file with mode: 0755]
paf/includes/connection.php [new file with mode: 0755]
paf/includes/functions.php [new file with mode: 0755]
paf/includes/functions_utf8.php [new file with mode: 0755]
paf/includes/redirect.php [new file with mode: 0755]
paf/includes/styles/style.css [new file with mode: 0755]
paf/includes/tclyit_cam_pc.php [new file with mode: 0755]
paf/index.php [new file with mode: 0755]
paf/index_main.php [new file with mode: 0755]
paf/index_mdpo.php [new file with mode: 0755]
paf/index_pwd.php [new file with mode: 0755]
paf/index_search.php [new file with mode: 0755]
paf/pafauf_bdd.sql [new file with mode: 0755]
paf/pafauf_bdd.txt [new file with mode: 0755]
paf/php_excel.php [new file with mode: 0755]

diff --git a/paf/Copy of index.php b/paf/Copy of index.php
new file mode 100755 (executable)
index 0000000..c246a06
--- /dev/null
@@ -0,0 +1,159 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+<title>P A F -- AUF Phnom Penh, Cambodge</title>\r
+<link href="includes/styles/style.css" rel="stylesheet" type="text/css" />\r
+</head>\r
+<?php\r
+       if(($_REQUEST["page"]=="login")&&($_REQUEST["cmdSave"])){\r
+               $txtMDP = $_REQUEST["txtMotdepasse"]; echo $txtMDP;\r
+               $txtMDPC = $_REQUEST["txtMotdepasseconfirmer"]; echo $txtMDPC;\r
+               if($_REQUEST["txtNom"]==""){\r
+                       $ErrorNom = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre nom. S'il vous plait.</span>";\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre prénom. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["Sexe"]==""){\r
+                               $ErrorSexe = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre sexe. S'il vous plait.</span>";\r
+                       }\r
+                       if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="année")){\r
+                               $ErrorDDN = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre date de naissance. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre mot de passe. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre mot de passe confirmé. S'il vous plait.</span>";\r
+                       }\r
+               }elseif($_REQUEST["txtPrenom"]==""){\r
+                       $ErrorPreNom = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre prénom. S'il vous plait.</span>";\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre nom. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["Sexe"]==""){\r
+                               $ErrorSexe = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre sexe. S'il vous plait.</span>";\r
+                       }\r
+                       if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="année")){\r
+                               $ErrorDDN = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre date de naissance. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre mot de passe. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre mot de passe confirmé. S'il vous plait.</span>";\r
+                       }\r
+               }elseif($_REQUEST["Sexe"]==""){\r
+                       $ErrorSexe = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre sexe. S'il vous plait.</span>";\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre prénom. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre nom. S'il vous plait.</span>";\r
+                       }\r
+                       if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="année")){\r
+                               $ErrorDDN = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre date de naissance. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre mot de passe. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre mot de passe confirmé. S'il vous plait.</span>";\r
+                       }\r
+               }elseif(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="année")){\r
+                       $ErrorDDN = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre date de naissance. S'il vous plait.</span>";\r
+                       if($_REQUEST["Sexe"]==""){\r
+                               $ErrorSexe = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre sexe. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre prénom. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre nom. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre mot de passe. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre mot de passe confirmé. S'il vous plait.</span>";\r
+                       }\r
+               }elseif($txtMDP != $txtMDPC){\r
+                               echo $ErrorMotPasse = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Votre mot de passe confirmée n'est pas correcte. Vérifiez vous encore.</span>";\r
+               }elseif($_REQUEST["txtMotdepasse"]==""){\r
+                       $ErrorMDP = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre mot de passe. S'il vous plait.</span>";\r
+                       if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="année")){\r
+                               $ErrorDDN = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre date de naissance. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["Sexe"]==""){\r
+                               $ErrorSexe = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre sexe. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre prénom. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre nom. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre mot de passe confirmé. S'il vous plait.</span>";\r
+                       }\r
+               }elseif($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                       $ErrorMDPC = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre mot de passe confirmé. S'il vous plait.</span>";\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre mot de passe. S'il vous plait.</span>";\r
+                       }\r
+                       if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="année")){\r
+                               $ErrorDDN = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre date de naissance. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["Sexe"]==""){\r
+                               $ErrorSexe = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre sexe. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre prénom. S'il vous plait.</span>";\r
+                       }\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<span style='background-color:#900900; color:#FFFFFF; font-weight:bold;'>Veuillez saisire votre nom. S'il vous plait.</span>";\r
+                       }\r
+               }else{\r
+                       \r
+               }\r
+       }\r
+?>\r
+<body class="oneColLiqCtrHdr">\r
+<form name="PAF" method="post">\r
+<div id="container">\r
+  <div id="header">\r
+       <table width="100%" cellpadding="0" cellspacing="0">\r
+       <tr><td width="14%"><a href="http://www.auf.org/" title="AUF"><img src="images/auf.gif" width="155" height="110" border="0" /></a></td>\r
+               <td width="86%" align="center"><h1 class="oneColLiqCtrHdr"><a href="index.php" title="Page d'acceuil" style="text-decoration:none;">P A F</a></h1></td>\r
+        </tr>\r
+    </table>\r
+  <!-- end #header --></div>\r
+  <div id="searchContent">\r
+       <table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;" width="100%" align="right">\r
+       <tr><td width="89%" align="right">Link &nbsp;&nbsp;&nbsp; Rechercher : <input type="text" name="txtSearch" /></td>\r
+            <td width="11%" align="left"><input type="submit" name="cmdSearch" value="Go" /></td>\r
+        </tr>\r
+    </table>\r
+  </div>\r
+  <div id="mainContent">\r
+    <?php\r
+               if($_REQUEST["page"]==""){\r
+               include("forms/home.php");\r
+               }elseif($_REQUEST["page"]=="login"){\r
+                       include("forms/login.php");\r
+               }elseif($_REQUEST["page"]=="liste"){\r
+                       include("forms/liste.php");\r
+               }\r
+       ?>\r
+       <!-- end #mainContent --></div>\r
+  <div id="footer">\r
+       <table cellpadding="0" cellspacing="0" border="0" height="40" width="100%">\r
+       <tr><td width="80%">Agence Universitaire de la Francophonie -- Antenne de Phnom Penh, Cambodge</td>\r
+               <td width="20%" align="center">Administrateur</td>\r
+        </tr>\r
+    </table>\r
+  <!-- end #footer --></div>\r
+<!-- end #container --></div>\r
+</form>\r
+</body>\r
+</html>\r
diff --git a/paf/admin/admin_authen.php b/paf/admin/admin_authen.php
new file mode 100755 (executable)
index 0000000..f42a0e1
--- /dev/null
@@ -0,0 +1,566 @@
+<?php\r
+       session_start();\r
+       $admin=$HTTP_SESSION_VARS["admin"];\r
+       $gen_m=$HTTP_SESSION_VARS["gen_m"];\r
+       $UserName=$HTTP_SESSION_VARS["UserName"];\r
+       $Password=$HTTP_SESSION_VARS["Password"];\r
+       if(!($admin == "y" || $gen_m == "y")){\r
+               include("./includes/function.php");\r
+       redirect("index.php");\r
+    }\r
+?>\r
+<html>\r
+<head>\r
+<title>.:|| Administrateur - Mot de passe ||:.</title>\r
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r
+<link href="../styles/styles.css" rel="stylesheet" type="text/css">\r
+<script language="javascript1.2" type="text/javascript">\r
+       function delete_message(){\r
+                       var flag=true;\r
+                       if (!confirm("Est-ce que vous voudriez vraiment supprimer cette information?")) flag =false;\r
+                       return flag;\r
+       }\r
+       \r
+       function validate_txt_box_1(Password){\r
+               var flag = true;\r
+               if(Password.txtUserName.value == 0){\r
+                       alert("Entrez l'identifiant, s.v.p!");\r
+                       Password.txtUserName.focus();\r
+                       return false;\r
+               }\r
+       <?php if($_REQUEST["MODI"] == ""){ ?>\r
+               if(Password.txtPassword.value == 0){\r
+                       alert("Entrez le mot de passe, s.v.p!");\r
+                       Password.txtPassword.focus();\r
+                       return false;\r
+               }\r
+               if(Password.txtMail.value == 0){\r
+                       alert("Entrez le mail, s.v.p!");\r
+                       Password.txtMail.focus();\r
+                       return false;\r
+               }\r
+       <?php } ?>\r
+               if(Password.selPerm.value == "Choisissez"){\r
+                       alert("Choisissez la permission, s.v.p!");\r
+                       Password.selPerm.focus();\r
+                       return false;\r
+               }\r
+//--------------------------Modifier------------------------------------\r
+       <?php if($_REQUEST["MODI"] != ""){ ?>\r
+               if(Password.txtOPassword.value == 0){\r
+                       alert("Entrez l'ancien mot de passe, s.v.p!");\r
+                       Password.txtOPassword.focus();\r
+                       return false;\r
+               }\r
+               if(Password.txtNPassword.value == 0){\r
+                       alert("Entrez le nouveau mot de passe, s.v.p!");\r
+                       Password.txtNPassword.focus();\r
+                       return false;\r
+               }\r
+               if(Password.txtMail.value == 0){\r
+                       alert("Entrez le mail, s.v.p!");\r
+                       Password.txtMail.focus();\r
+                       return false;\r
+               }\r
+       <?php } ?>\r
+       }\r
+</script>\r
+</head>\r
+<?php include("includes/connection.php"); ?>\r
+<?php include("includes/tclyit_cam_pc.php"); ?>\r
+<?php include("includes/function.php"); ?>\r
+<?php include("includes/menu.php")?>\r
+<?php\r
+       $kompler = "ChhunlyPhallen";\r
+       $AID = $_REQUEST["AID"];\r
+       $MODI = $_REQUEST["MODI"]; //Modif_strqrt\r
+       $DEL = $_REQUEST["DEL"]; //Del_strqrt\r
+       $txtUserName = $_REQUEST["txtUserName"];\r
+       $txtOPassword = tcly($_REQUEST["txtOPassword"],$kompler); //echo $txtOPassword;\r
+       $txtNPassword = tcly($_REQUEST["txtNPassword"],$kompler);\r
+       $txtPassword = tcly($_REQUEST["txtPassword"],$kompler);\r
+       $txtMail = $_REQUEST["txtMail"];\r
+       $SEL = $_REQUEST["selPerm"];\r
+       if($_REQUEST["cmdSave"]){\r
+               if($MODI == ""){\r
+                       if(check_email($txtMail)){\r
+                               $Str = "insert into tbladmin(username,password,admail,permission) values('".$txtUserName."','".$txtPassword."','".$txtMail."','".$SEL."')";\r
+                               mysql_query($Str) or die("Les informations ne peuvent pas enregistrer!");\r
+                               redirect("admin_authen.php");\r
+                       }else{ $MailErreur = "Pardon, l'addresse mail est incorrect!"; }\r
+               }else{\r
+//---------------Vérifier l'ancien mot de passe----------------------------------------\r
+                       $Sql = "Select password from tbladmin where password='".$txtOPassword."'";\r
+                       $Query = mysql_query($Sql);\r
+                       $Col = mysql_fetch_row($Query);\r
+                       if(($Col[0] == "") && !(check_email($txtMail))){\r
+                               $Invalid = "Pardon, l'encien mot de passe est invalid!";\r
+                               $MailErreur = "Pardon, l'addresse mail est incorrect!";\r
+                       }elseif(($Col[0] == "")){\r
+                               $Invalid = "Pardon, l'encien mot de passe est invalid!";\r
+                       }elseif(!(check_email($txtMail))){\r
+                               $MailErreur = "Pardon, l'addresse mail est incorrect!";\r
+                       }else{\r
+                               $Upd = "update tbladmin set username='".$txtUserName."',password='".$txtNPassword."',admail='".$txtMail."',permission='".$SEL."' where aid=".$AID;\r
+                               mysql_query($Upd) or die("Les informations ne peuvent pas modifier!");\r
+                               redirect("admin_authen.php");\r
+                       }\r
+               }\r
+       }\r
+//---------------------Information selectée--------------------------------------------\r
+       if($MODI != ""){\r
+               $Stp = mysql_query("select * from tbladmin where aid=".$AID);\r
+               if($Stp){\r
+                       $Row = mysql_fetch_array($Stp);\r
+                       $UName = $Row["username"];\r
+                       $Pwd = $Row["password"];\r
+                       $Mail = $Row["admail"];\r
+                       $Perm = $Row["permission"];\r
+               }\r
+               $Title = "Modifier Information";\r
+       }else{ $Title = "Ajouter Information"; }\r
+\r
+//---------------------Supprimer information------------------------------------------\r
+       if($DEL != ""){\r
+               $Del = "delete from tbladmin where aid=".$AID;\r
+               mysql_query($Del) or die("Cet information ne peut pas supprimer!");\r
+               $DEL = "";\r
+               $MODI = "";\r
+       }\r
+?>\r
+<body bgcolor="#fbfcf7" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">\r
+<center>\r
+<form name="Password" method="post">\r
+<table id="Table_01" width="1000" height="600" border="0" cellpadding="0" cellspacing="0">\r
+       <tr>\r
+               <td rowspan="20" width="17" height="749">&nbsp;</td>\r
+               <td colspan="11">\r
+                       <img src="images/tclyitd_02.png" width="967" height="9" alt=""></td>\r
+               <td rowspan="20" width="15" height="749">&nbsp;</td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="9" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td>\r
+                       <img src="images/tclyitd_04.png" width="27" height="1" alt=""></td>\r
+               <td colspan="3" rowspan="5">\r
+                       <img src="images/tclyitd_05.png" width="204" height="37" alt=""></td>\r
+               <td colspan="3">\r
+                       <img src="images/tclyitd_06.png" width="527" height="1" alt=""></td>\r
+               <td rowspan="14">\r
+                       <img src="images/tclyitd_07.png" width="89" height="85" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_08.png" width="9" height="1" alt=""></td>\r
+               <td rowspan="14">\r
+                       <img src="images/tclyitd_09.png" width="87" height="85" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_10.png" width="24" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="1" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td>\r
+                       <img src="images/tclyitd_11.png" width="27" height="11" alt=""></td>\r
+               <td colspan="3">\r
+                       <img src="images/tclyitd_12.png" width="527" height="11" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_13.png" width="9" height="11" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_14.png" width="24" height="11" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="11" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td>\r
+                       <img src="images/tclyitd_15.png" width="27" height="11" alt=""></td>\r
+               <td colspan="3">\r
+                       <img src="images/tclyitd_16.png" width="527" height="11" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_17.png" width="9" height="11" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_18.png" width="24" height="11" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="11" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td>\r
+                       <img src="images/tclyitd_19.png" width="27" height="10" alt=""></td>\r
+               <td colspan="3">\r
+                       <img src="images/tclyitd_20.png" width="527" height="10" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_21.png" width="9" height="10" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_22.png" width="24" height="10" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="10" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td rowspan="3">\r
+                       <img src="images/tclyitd_23.png" width="27" height="11" alt=""></td>\r
+               <td colspan="3" rowspan="3">\r
+                       <img src="images/tclyitd_24.png" width="527" height="11" alt=""></td>\r
+               <td rowspan="3">\r
+                       <img src="images/tclyitd_25.png" width="9" height="11" alt=""></td>\r
+               <td rowspan="3">\r
+                       <img src="images/tclyitd_26.png" width="24" height="11" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="4" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td rowspan="6">\r
+                       <img src="images/tclyitd_27.png" width="133" height="39" alt=""></td>\r
+               <td colspan="2">\r
+                       <img src="images/tclyitd_28.png" width="71" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="1" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td colspan="2">\r
+                       <img src="images/tclyitd_29.png" width="71" height="6" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="6" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td>\r
+                       <img src="images/tclyitd_30.png" width="27" height="10" alt=""></td>\r
+               <td colspan="3">\r
+                       <img src="images/tclyitd_31.png" width="153" height="10" alt=""></td>\r
+               <td rowspan="5">\r
+                       <img src="images/tclyitd_32.png" width="388" height="35" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_33.png" width="57" height="10" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_34.png" width="9" height="10" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_35.png" width="24" height="10" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="10" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td>\r
+                       <img src="images/tclyitd_36.png" width="27" height="11" alt=""></td>\r
+               <td colspan="3">\r
+                       <img src="images/tclyitd_37.png" width="153" height="11" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_38.png" width="57" height="11" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_39.png" width="9" height="11" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_40.png" width="24" height="11" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="11" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td>\r
+                       <img src="images/tclyitd_41.png" width="27" height="10" alt=""></td>\r
+               <td colspan="3">\r
+                       <img src="images/tclyitd_42.png" width="153" height="10" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_43.png" width="57" height="10" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_44.png" width="9" height="10" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_45.png" width="24" height="10" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="10" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td rowspan="3">\r
+                       <img src="images/tclyitd_46.png" width="27" height="9" alt=""></td>\r
+               <td colspan="3" rowspan="3">\r
+                       <img src="images/tclyitd_47.png" width="153" height="9" alt=""></td>\r
+               <td rowspan="3">\r
+                       <img src="images/tclyitd_48.png" width="57" height="9" alt=""></td>\r
+               <td rowspan="3">\r
+                       <img src="images/tclyitd_49.png" width="9" height="9" alt=""></td>\r
+               <td rowspan="3">\r
+                       <img src="images/tclyitd_50.png" width="24" height="9" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="1" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td rowspan="2">\r
+                       <img src="images/tclyitd_51.png" width="133" height="8" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="3" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td>\r
+                       <img src="images/tclyitd_52.png" width="388" height="5" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="5" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td colspan="7" rowspan="2">\r
+                       <img src="images/tclyitd_53.png" width="758" height="8" alt=""></td>\r
+               <td rowspan="2">\r
+                       <img src="images/tclyitd_54.png" width="9" height="8" alt=""></td>\r
+               <td rowspan="2">\r
+                       <img src="images/tclyitd_55.png" width="24" height="8" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="1" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td>\r
+                       <img src="images/tclyitd_56.png" width="89" height="7" alt=""></td>\r
+               <td>\r
+                       <img src="images/tclyitd_57.png" width="87" height="7" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="7" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td colspan="3" width="187" height="612" valign="top" bgcolor="#b19681"><?php menu(); ?></td>\r
+               <td colspan="8" width="780" height="612" align="center" valign="top">\r
+                       <table width="780" height="612" cellpadding="0" cellspacing="0" border="1" style="border-right-color:#993366; border-style:solid;">\r
+                               <tr>\r
+                                       <td style="padding-left:10px; padding-top:20px;" align="center" valign="<?php if($admin == "y"){ ?>top<?php }else{ echo"middle"; } ?>">\r
+                                               <?php if($admin == "y"){ ?>\r
+                                               <table width="450" height="193" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">\r
+                                                       <tr>\r
+                                                               <td align="center" style="padding-bottom:10px;">\r
+                                                                       <table width="496" height="193" cellpadding="0" cellspacing="0" border="1" style="border-collapse:collapse; border-color:#9999CC;">\r
+                                                                               <tr bgcolor="#56541f">\r
+                                                                                       <td height="34" align="center" background="images/tclyit_silver_1.jpg" style="font-family:Arial, Helvetica, sans-serif; color:#996633; background-repeat:repeat-x;"><strong><?php echo $Title; ?></strong></td>\r
+                                                                               </tr>\r
+                                                                               <tr>\r
+                                                                                       <td>\r
+                                                                                               <table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">\r
+                                                                                                       <tr>\r
+                                                                                                               <td align="left" style="padding-bottom:0; padding-left:10px; padding-right:10px;">\r
+                                                                                                                       <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Identifiant : </span>\r
+                                                                                                               </td>\r
+                                                                                                               <td style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                                                                       <input type="text" name="txtUserName" value="<?php if($MODI == ""){ echo $txtUserName; }else{ echo $UName; } ?>" size="40" />\r
+                                                                                                               </td>\r
+                                                                                                       </tr>\r
+                                                                                                       <?php if($MODI == ""){ ?>\r
+                                                                                                       <tr>\r
+                                                                                                               <td align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                                                                       <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Mot de passe : </span>\r
+                                                                                                               </td>\r
+                                                                                                               <td align="left" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                                                                       <input type="password" name="txtPassword" value="<?php echo $Pwd; ?>" size="40">\r
+                                                                                                               </td>\r
+                                                                                                       </tr>\r
+                                                                                                       <tr>\r
+                                                                                                               <td align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                                                                       <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Addresse Mail : </span>\r
+                                                                                                               </td>\r
+                                                                                                               <td align="left" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                                                                       <div align="center" style="z-index:auto; padding-bottom:3px; color:#CC0000;"><?php echo $MailErreur; ?></div>\r
+                                                                                                                       <input type="text" name="txtMail" value="<?php if($MODI == ""){ echo $txtMail; }else{ echo $Mail; } ?>" size="40">\r
+                                                                                                               </td>\r
+                                                                                                       </tr>\r
+                                                                                                       <?php }else{ ?>\r
+                                                                                                       <tr>\r
+                                                                                                               <td align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                                                                       <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Ancien Mot de passe : </span>\r
+                                                                                                               </td>\r
+                                                                                                               <td align="left" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                                                                       <div align="center" style="z-index:auto; padding-bottom:3px; color:#CC0000;"><?php echo $Invalid; ?></div>\r
+                                                                                                                       <input type="password" name="txtOPassword" value="" size="40">\r
+                                                                                                               </td>\r
+                                                                                                       </tr>\r
+                                                                                                       <tr>\r
+                                                                                                               <td align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                                                                       <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Nouveau Mot de passe : </span>\r
+                                                                                                               </td>\r
+                                                                                                               <td align="left" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                                                                       <input type="password" name="txtNPassword" value="" size="40">\r
+                                                                                                               </td>\r
+                                                                                                       </tr>\r
+                                                                                                       <tr>\r
+                                                                                                               <td align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                                                                       <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Addresse Mail : </span>\r
+                                                                                                               </td>\r
+                                                                                                               <td align="left" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                                                                       <div align="center" style="z-index:auto; padding-bottom:3px; color:#CC0000;"><?php echo $MailErreur; ?></div>\r
+                                                                                                                       <input type="text" name="txtMail" value="<?php echo $Mail; ?>" size="40">\r
+                                                                                                               </td>\r
+                                                                                                       </tr>\r
+                                                                                                       <?php } ?>\r
+                                                                                                       <tr bgcolor="#E4D8A3">\r
+                                                                                                               <td align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                                                                       <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Permission : </span>\r
+                                                                                                               </td>\r
+                                                                                                               <td align="left" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                                                                       <?php if($MODI == ""){ ?>\r
+                                                                                                                               <select name="selPerm" style="width:265;">\r
+                                                                                                                                       <option value="Choisissez">[--Choisissez Permission--]</option>\r
+                                                                                                                                       <option value="1">Administrateur</option>\r
+                                                                                                                                       <option value="2">Utilisateur</option>\r
+                                                                                                                               </select>\r
+                                                                                                                       <?php }else{ ?>\r
+                                                                                                                               <select name="selPerm" style="width:265;">\r
+                                                                                                                                       <?php if($Perm == 1){ ?>\r
+                                                                                                                                               <option value="1" selected="selected">Administrateur</option>\r
+                                                                                                                                               <option value="2">Utilisateur</option>\r
+                                                                                                                                               <option value="Choisissez">[--Choisissez Permission--]</option>\r
+                                                                                                                                       <?php } ?>\r
+                                                                                                                                       <?php if($Perm == 2){ ?>\r
+                                                                                                                                               <option value="2" selected="selected">Utilisateur</option>\r
+                                                                                                                                               <option value="1">Administrateur</option>\r
+                                                                                                                                               <option value="Choisissez">[--Choisissez Permission--]</option>\r
+                                                                                                                                       <?php } ?>                                                                                                                                      \r
+                                                                                                                               </select>\r
+                                                                                                                       <?php } ?>\r
+                                                                                                               </td>\r
+                                                                                                       </tr>\r
+                                                                                                       <tr>\r
+                                                                                                               <td></td>\r
+                                                                                                               <td align="right" style="padding-right:45px; padding-bottom:5px; padding-top:10px;">\r
+                                                                                                                       <input type="submit" name="cmdSave" value="Sauvegarder" onClick="return validate_txt_box_1(Password);" style="border:double; height:27px; border-color:#999966; background-color:#9aa95f; cursor:pointer;">\r
+                                                                                                               </td>\r
+                                                                                                       </tr>\r
+                                                                                                       <tr bgcolor="#EEF1B6">\r
+                                                                                                               <td colspan="2" align="left" style="padding-right:5px; padding-left:5px; padding-bottom:5px; padding-top:10px;">\r
+                                                                                                                       <font style="font-size:12px; font-weight:bold; color:#3300FF;"><u>Note</u> : </font>\r
+                                                                                                                       <font style="font-size:10px; font-weight:normal; color:#993300;">\r
+                                                                                                                               - <i><b>Administrateur</b></i> : Permettre pour ajouter, modifier et supprimer les informations.<br>\r
+                                                                                                                               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- <i><b>Utilisateur</b></i> : Permettre pour ajouter et modifier les informations.\r
+                                                                                                                       </font>\r
+                                                                                                               </td>\r
+                                                                                                       </tr>\r
+                                                                                               </table>\r
+                                                                                       </td>\r
+                                                                               </tr>\r
+                                                                 </table>\r
+                                                               </td>\r
+                                                       </tr>\r
+                                                       <tr>\r
+                                                               <td align="center" style="padding-top:10px; padding-bottom:20px;">\r
+                                                                       <table width="450" height="193" cellpadding="0" cellspacing="0" border="1" style="border-collapse:collapse; border-color:#9999CC;">\r
+                                                                               <tr bgcolor="#56541f">\r
+                                                                                       <td height="34" align="center" background="images/tclyit_silver_1.jpg" style="font-family:Arial, Helvetica, sans-serif; color:#996633; background-repeat:repeat-x;"><strong>Liste de l'information</strong></td>\r
+                                                                               </tr>\r
+                                                                               <tr>\r
+                                                                                       <td align="center" valign="top">\r
+                                                                                               <table width="700" cellpadding="0" cellspacing="0" border="1" style="border-collapse:collapse; border-color:#CCCCCC;">\r
+                                                                                                       <tr bgcolor="#CBD898" class="style2">\r
+                                                                                                               <td width="215" align="left" style="padding-bottom:5px;; padding-top:5px; padding-left:10px; padding-right:10px;">\r
+                                                                                                                       <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Identifiant</span></td>\r
+                                                                                                               <td width="96" align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                                                                       <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Mot de passe</span></td>\r
+                                                                                                               <td width="106" align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                                                                       <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Permission</span></td>\r
+                                                                                                               <td width="" align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                                                                       <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Email</span></td>\r
+                                                                                                               <td width="133" align="center" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                                                                       <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Modifier</span></td>\r
+                                                                                                               <td width="138" align="center" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                                                                       <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Supprimer</span></td>\r
+                                                                                                       </tr>\r
+                                                                                                       <?php\r
+                                                                                                       //----------------Montrer l'information------------------------------------------------\r
+                                                                                                               $Sql = "select * from tbladmin order by permission";\r
+                                                                                                               if($Sql){\r
+                                                                                                                       $Swl = mysql_query($Sql);\r
+                                                                                                                       while($Rows = mysql_fetch_array($Swl)){\r
+                                                                                                                               $AID = $Rows["aid"];\r
+                                                                                                                               $UserName = $Rows["username"];\r
+                                                                                                                               $Password = $Rows["password"];\r
+                                                                                                                               $Mails = $Rows["admail"];\r
+                                                                                                                               $Perm = $Rows["permission"];\r
+                                                                                                                               if($Perm == 1){\r
+                                                                                                                                       $Permission = "Administrateur";\r
+                                                                                                                               }else{ $Permission = "Utilisateur"; }\r
+                                                                                                       ?>\r
+                                                                                                       <tr bgcolor="#E1E3B0">\r
+                                                                                                               <td style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                                                                       <?php echo $UserName; ?>\r
+                                                                                                               </td>\r
+                                                                                                               <td title="<?php echo phlen($Password,$kompler); ?>" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                                                                       <?php echo $Password; ?>\r
+                                                                                                               </td>\r
+                                                                                                               <td style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                                                                       <?php echo $Permission; ?>\r
+                                                                                                               </td>\r
+                                                                                                               <td style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                                                                       <?php echo $Mails; ?>\r
+                                                                                                               </td>\r
+                                                                                                               <td align="center" style="padding-top:5px; padding-left:5px; padding-right:5px; padding-bottom:5px;">\r
+                                                                                                                       <input type="button" name="cmdEdit" value="  Modifier  " style="border:double; height:27px; border-color:#999966; background-color:#9aa95f; cursor:pointer; color:#FFFFFF; font-weight:normal;" title='Modifier : <?php echo $UserName; ?>' onClick="javascript:document.location.href='<?php echo"$_PHP_SELF?AID=$AID&MODI=Modif_strqrt"; ?>'" />\r
+                                                                                                                       <!--<a href="<?php echo"$_PHP_SELF?AID=$AID&MODI=Modif_strqrt"; ?>" title="Modifier : <?php echo $UserName; ?>"><img src="images/tclyit_m.png" width="122" height="28" border="0"></a>-->\r
+                                                                                                               </td>\r
+                                                                                                               <td align="center" style="padding-top:5px; padding-left:5px; padding-right:5px; padding-bottom:5px;">\r
+                                                                                                                       <input type="button" name="cmdDelete" value="Supprimer" style="border:double; height:27px; border-color:#999966; background-color:#9aa95f; cursor:pointer; color:#FFFFFF;" title='Supprimer : <?php echo $UserName; ?>' onClick="javascript: if(window.confirm('Confirmez-vous la suppression de <?php echo "\' ".$UserName." \'"; ?>?')){document.location.href='<?php echo"$_PHP_SELF?AID=$AID&DEL=Del_strqrt"; ?>'}" />\r
+                                                                                                                       <!--<a href="<?php echo"$_PHP_SELF?AID=$AID&DEL=Del_strqrt"; ?>" title="Supprimer : <?php echo $UserName; ?>"><img src="images/tclyits_m.png" width="122" height="28" onClick="return delete_message();" border="0"></a>-->\r
+                                                                                                               </td>\r
+                                                                                                       </tr>\r
+                                                                                                       <?php } } ?>\r
+                                                                                                       <tr>\r
+                                                                                                               <td colspan="5"></td>\r
+                                                                                                               <td align="center" style="padding-top:5px; padding-left:5px; padding-right:5px; padding-bottom:5px;">\r
+                                                                                                                       <input type="button" name="cmdAjouter" value="    Ajouter   " style="border:double; height:27px; border-color:#999966; background-color:#9aa95f; cursor:pointer; color:#FFFFFF;" title="Ajouter nouveau utilisateur" onClick="javascript:document.location.href='<?php echo"admin_authen.php"; ?>'" />\r
+                                                                                                               </td>\r
+                                                                                                       </tr>\r
+                                                                                               </table>\r
+                                                                                       </td>\r
+                                                                               </tr>\r
+                                                                               <tr bgcolor="#E2CEAF"><td align="center" style="padding-top:8px; padding-bottom:8px;"><i>Veuillez mettre votre curseur sur le mot de passe vous allez voir le vrai mot de passe!</i></td></tr>\r
+                                                                 </table>\r
+                                                               </td>\r
+                                                       </tr>\r
+                                         </table>\r
+                                       <?php }else{ echo"<font style='color:#FF0000; font-size:16px; font-weight:bold;'><i>Pardon, Vous n'avez pas permission pour accéder dans cette page!<br>Administrateur seulement qui peut l'accéder.</i></font>"; } ?>\r
+                                       </td>\r
+                               </tr>\r
+                       </table>\r
+               </td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="612" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td colspan="11">\r
+                       <img src="images/tclyitd_60.png" width="967" height="12" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="12" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <?php include("includes/footer_admin.php"); ?>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="13" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td colspan="11">\r
+                       <img src="images/tclyitd_62.png" width="967" height="11" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="1" height="11" alt=""></td>\r
+       </tr>\r
+       <tr>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="17" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="27" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="133" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="27" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="44" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="82" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="388" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="57" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="89" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="9" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="87" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="24" height="1" alt=""></td>\r
+               <td>\r
+                       <img src="images/spacer.gif" width="15" height="1" alt=""></td>\r
+               <td></td>\r
+       </tr>\r
+</table>\r
+</form>\r
+       <script language="javascript" type="text/javascript">\r
+               setTimeout("document.Password.txtUserName.focus()",1);\r
+       </script>\r
+</center>\r
+</body>\r
+</html>
\ No newline at end of file
diff --git a/paf/admin/images/Thumbs.db b/paf/admin/images/Thumbs.db
new file mode 100755 (executable)
index 0000000..47def61
Binary files /dev/null and b/paf/admin/images/Thumbs.db differ
diff --git a/paf/admin/images/tclyit_silver.jpg b/paf/admin/images/tclyit_silver.jpg
new file mode 100755 (executable)
index 0000000..efd475b
Binary files /dev/null and b/paf/admin/images/tclyit_silver.jpg differ
diff --git a/paf/admin/images/tclyit_silver_1.jpg b/paf/admin/images/tclyit_silver_1.jpg
new file mode 100755 (executable)
index 0000000..2ef67f5
Binary files /dev/null and b/paf/admin/images/tclyit_silver_1.jpg differ
diff --git a/paf/admin/index_admin.php b/paf/admin/index_admin.php
new file mode 100755 (executable)
index 0000000..38aa6fc
--- /dev/null
@@ -0,0 +1,340 @@
+<?php session_start();\r
+       $admin=$_SESSION["adminAUFPPKH"];\r
+       $UserName=$_SESSION["UserName"];\r
+       $Password=$_SESSION["Password"];\r
+       if(!($admin == "y")){\r
+               include("includes/redirect.php");\r
+       redirect("index.php");\r
+    }\r
+       \r
+       //-----------session expirée-------------------\r
+       if(isset($_SESSION['started'])){\r
+               if((mktime() - $_SESSION['started'] - 60*30) > 0 ){\r
+                       unset($_SESSION["loginAUFKH"]);\r
+                       unset($_SESSION["adminAUFPPKH"]);\r
+                       redirect("index.php");\r
+               }\r
+       }else{\r
+               $_SESSION['started'] = mktime();\r
+       }\r
+?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />\r
+<title>Gestion de mot de passe -- Administrateur</title>\r
+<script language="javascript1.2" type="text/javascript">\r
+       function delete_message(){\r
+                       var flag=true;\r
+                       if (!confirm("Est-ce que vous voudriez vraiment supprimer cette information?")) flag =false;\r
+                       return flag;\r
+       }\r
+       \r
+       function validate_txt_box_1(Password){\r
+               var flag = true;\r
+               if(Password.txtUserName.value == 0){\r
+                       alert("Entrez l'identifiant, s.v.p!");\r
+                       Password.txtUserName.focus();\r
+                       return false;\r
+               }\r
+       <?php if($_REQUEST["MODI"] == ""){ ?>\r
+               if(Password.txtPassword.value == 0){\r
+                       alert("Entrez le mot de passe, s.v.p!");\r
+                       Password.txtPassword.focus();\r
+                       return false;\r
+               }\r
+               if(Password.txtMail.value == 0){\r
+                       alert("Entrez le mail, s.v.p!");\r
+                       Password.txtMail.focus();\r
+                       return false;\r
+               }\r
+       <?php } ?>\r
+               if(Password.selPerm.value == "Choisissez"){\r
+                       alert("Choisissez la permission, s.v.p!");\r
+                       Password.selPerm.focus();\r
+                       return false;\r
+               }\r
+//--------------------------Modifier------------------------------------\r
+       <?php if($_REQUEST["MODI"] != ""){ ?>\r
+               if(Password.txtOPassword.value == 0){\r
+                       alert("Entrez l'ancien mot de passe, s.v.p!");\r
+                       Password.txtOPassword.focus();\r
+                       return false;\r
+               }\r
+               if(Password.txtNPassword.value == 0){\r
+                       alert("Entrez le nouveau mot de passe, s.v.p!");\r
+                       Password.txtNPassword.focus();\r
+                       return false;\r
+               }\r
+               if(Password.txtMail.value == 0){\r
+                       alert("Entrez le mail, s.v.p!");\r
+                       Password.txtMail.focus();\r
+                       return false;\r
+               }\r
+       <?php } ?>\r
+       }\r
+</script>\r
+</head>\r
+<?php\r
+       include("../includes/connection.php");\r
+       include("../includes/functions.php");\r
+       include("../includes/redirect.php");\r
+       \r
+       $kompler = "{%#bb^csr%#}";\r
+       $ID = $_REQUEST["ID"];\r
+       $MODI = $_REQUEST["MODI"]; //Modif_strqrt\r
+       $DEL = $_REQUEST["DEL"]; //Del_strqrt\r
+       $txtUserName = strtolower(str_replace("'","",$_REQUEST["txtUserName"]));\r
+       $txtOPassword = encrptPwd(strtolower($_REQUEST["txtOPassword"]),$kompler); //echo $txtOPassword;\r
+       $txtNPassword = encrptPwd(strtolower($_REQUEST["txtNPassword"]),$kompler);\r
+       $txtPassword = encrptPwd(strtolower($_REQUEST["txtPassword"]),$kompler);\r
+       $txtMail = $_REQUEST["txtMail"];\r
+       $SEL = $_REQUEST["selPerm"];\r
+       if($_REQUEST["cmdSave"]){\r
+               if($MODI == ""){\r
+                       if(check_email($txtMail)){\r
+                               $Str = "insert into passwd(login,Passwd,Email,Permission) values('".$txtUserName."','".$txtPassword."','".$txtMail."','".$SEL."')";\r
+                               mysql_query($Str) or die("Les informations ne peuvent pas enregistrer!");\r
+                               redirect("index_admin.php");\r
+                       }else{ $MailErreur = "Pardon, l'addresse mail est incorrect!"; }\r
+               }else{\r
+//---------------Vérifier l'ancien mot de passe----------------------------------------\r
+                       $Sql = "Select Passwd from passwd where Passwd='".$txtOPassword."'";\r
+                       $Query = mysql_query($Sql);\r
+                       $Col = mysql_fetch_row($Query);\r
+                       if(($Col[0] == "") && !(check_email($txtMail))){\r
+                               $Invalid = "Pardon, l'encien mot de passe est invalid!";\r
+                               $MailErreur = "Pardon, l'addresse mail est incorrect!";\r
+                       }elseif(($Col[0] == "")){\r
+                               $Invalid = "Pardon, l'encien mot de passe est invalid!";\r
+                       }elseif(!(check_email($txtMail))){\r
+                               $MailErreur = "Pardon, l'addresse mail est incorrect!";\r
+                       }else{\r
+                               $Upd = "update passwd set login='".$txtUserName."',Passwd='".$txtNPassword."',Email='".$txtMail."',Permission='".$SEL."' where ID=".$ID;\r
+                               mysql_query($Upd) or die("Les informations ne peuvent pas modifier!");\r
+                               redirect("index_admin.php");\r
+                       }\r
+               }\r
+       }\r
+//---------------------Information selectée--------------------------------------------\r
+       if($MODI != ""){\r
+               $Stp = mysql_query("select * from passwd where ID=".$ID);\r
+               if($Stp){\r
+                       $Row = mysql_fetch_array($Stp);\r
+                       $UName = $Row["login"];\r
+                       $Pwd = $Row["Passwd"];\r
+                       $Mail = $Row["Email"];\r
+                       $Perm = $Row["Permission"];\r
+               }\r
+               $Title = "Modifier Information";\r
+       }else{ $Title = "Ajouter Information"; }\r
+\r
+//---------------------Supprimer information------------------------------------------\r
+       if($DEL != ""){\r
+               $Del = "delete from passwd where ID=".$ID;\r
+               mysql_query($Del) or die("Cet information ne peut pas supprimer!");\r
+               $DEL = "";\r
+               $MODI = "";\r
+       }\r
+?>\r
+<body>\r
+       <center>\r
+<?php\r
+       echo "You have logged in ... ";\r
+       echo "[<a href='../index.php?logout_sqrt'>Logout</a>]";\r
+       echo "<small>&nbsp;&nbsp;&nbsp;&nbsp;<a href='../index_main.php' title='Accueil'>Accueil</a></small>";\r
+?><br><br>\r
+\r
+       <form name="Password" method="post">\r
+       <table width="450" height="193" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">\r
+               <tr>\r
+                       <td align="center" style="padding-bottom:10px;">\r
+                               <table width="496" height="193" cellpadding="0" cellspacing="0" border="1" style="border-collapse:collapse; border-color:#9999CC;">\r
+                                       <tr bgcolor="#56541f">\r
+                                               <td height="34" align="center" background="images/tclyit_silver_1.jpg" style="font-family:Arial, Helvetica, sans-serif; color:#996633; background-repeat:repeat-x;"><strong><?php echo $Title; ?></strong></td>\r
+                                       </tr>\r
+                                       <tr>\r
+                                               <td>\r
+                                                       <table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">\r
+                                                               <tr>\r
+                                                                       <td align="left" style="padding-bottom:0; padding-left:10px; padding-right:10px;">\r
+                                                                               <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Identifiant : </span>\r
+                                                                       </td>\r
+                                                                       <td style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                               <input type="text" name="txtUserName" value="<?php if($MODI == ""){ echo $txtUserName; }else{ echo $UName; } ?>" size="40" />\r
+                                                                       </td>\r
+                                                               </tr>\r
+                                                               <?php if($MODI == ""){ ?>\r
+                                                               <tr>\r
+                                                                       <td align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                               <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Mot de passe : </span>\r
+                                                                       </td>\r
+                                                                       <td align="left" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                               <input type="password" name="txtPassword" value="<?php echo $Pwd; ?>" maxlength="8" size="40">\r
+                                                                       </td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                               <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Addresse Mail : </span>\r
+                                                                       </td>\r
+                                                                       <td align="left" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                               <div align="center" style="z-index:auto; padding-bottom:3px; color:#CC0000;"><?php echo $MailErreur; ?></div>\r
+                                                                               <input type="text" name="txtMail" value="<?php if($MODI == ""){ echo $txtMail; }else{ echo $Mail; } ?>" size="40">\r
+                                                                       </td>\r
+                                                               </tr>\r
+                                                               <?php }else{ ?>\r
+                                                               <tr>\r
+                                                                       <td align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                               <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Ancien Mot de passe : </span>\r
+                                                                       </td>\r
+                                                                       <td align="left" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                               <div align="center" style="z-index:auto; padding-bottom:3px; color:#CC0000;"><?php echo $Invalid; ?></div>\r
+                                                                               <input type="password" name="txtOPassword" value="" size="40">\r
+                                                                       </td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                               <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Nouveau Mot de passe : </span>\r
+                                                                       </td>\r
+                                                                       <td align="left" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                               <input type="password" name="txtNPassword" value="" size="40">\r
+                                                                       </td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                               <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Addresse Mail : </span>\r
+                                                                       </td>\r
+                                                                       <td align="left" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                               <div align="center" style="z-index:auto; padding-bottom:3px; color:#CC0000;"><?php echo $MailErreur; ?></div>\r
+                                                                               <input type="text" name="txtMail" value="<?php echo $Mail; ?>" size="40">\r
+                                                                       </td>\r
+                                                               </tr>\r
+                                                               <?php } ?>\r
+                                                               <tr bgcolor="#E4D8A3">\r
+                                                                       <td align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                               <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Permission : </span>\r
+                                                                       </td>\r
+                                                                       <td align="left" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                               <?php if($MODI == ""){ ?>\r
+                                                                                       <select name="selPerm" style="width:265;">\r
+                                                                                               <option value="Choisissez">[--Choisissez Permission--]</option>\r
+                                                                                               <option value="1">Administrateur</option>\r
+                                                                                               <option value="2">Utilisateur</option>\r
+                                                                                       </select>\r
+                                                                               <?php }else{ ?>\r
+                                                                                       <select name="selPerm" style="width:265;">\r
+                                                                                               <?php if($Perm == 1){ ?>\r
+                                                                                                       <option value="1" selected="selected">Administrateur</option>\r
+                                                                                                       <option value="2">Utilisateur</option>\r
+                                                                                                       <option value="Choisissez">[--Choisissez Permission--]</option>\r
+                                                                                               <?php } ?>\r
+                                                                                               <?php if($Perm == 2){ ?>\r
+                                                                                                       <option value="2" selected="selected">Utilisateur</option>\r
+                                                                                                       <option value="1">Administrateur</option>\r
+                                                                                                       <option value="Choisissez">[--Choisissez Permission--]</option>\r
+                                                                                               <?php } ?>                                                                                                                                      \r
+                                                                                       </select>\r
+                                                                               <?php } ?>\r
+                                                                       </td>\r
+                                                               </tr>\r
+                                                               <tr>\r
+                                                                       <td></td>\r
+                                                                       <td align="right" style="padding-right:45px; padding-bottom:5px; padding-top:10px;">\r
+                                                                               <input type="submit" name="cmdSave" value="Sauvegarder" onClick="return validate_txt_box_1(Password);" style="border:double; height:27px; border-color:#999966; background-color:#9aa95f; cursor:pointer;">\r
+                                                                       </td>\r
+                                                               </tr>\r
+                                                               <tr bgcolor="#EEF1B6">\r
+                                                                       <td colspan="2" align="left" style="padding-right:5px; padding-left:5px; padding-bottom:5px; padding-top:10px;">\r
+                                                                               <font style="font-size:12px; font-weight:bold; color:#3300FF;"><u>Note</u> : </font>\r
+                                                                               <font style="font-size:10px; font-weight:normal; color:#993300;">\r
+                                                                                       - <i><b>Administrateur</b></i> : Permettre pour ajouter, modifier et supprimer les informations.<br>\r
+                                                                                       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- <i><b>Utilisateur</b></i> : Permettre pour ajouter et modifier les informations.\r
+                                                                               </font>\r
+                                                                       </td>\r
+                                                               </tr>\r
+                                                       </table>\r
+                                               </td>\r
+                                       </tr>\r
+                         </table>\r
+                       </td>\r
+               </tr>\r
+               <tr>\r
+                       <td align="center" style="padding-top:10px; padding-bottom:20px;">\r
+                               <table width="450" height="193" cellpadding="0" cellspacing="0" border="1" style="border-collapse:collapse; border-color:#9999CC;">\r
+                                       <tr bgcolor="#56541f">\r
+                                               <td height="34" align="center" background="images/tclyit_silver_1.jpg" style="font-family:Arial, Helvetica, sans-serif; color:#996633; background-repeat:repeat-x;"><strong>Liste de l'information</strong></td>\r
+                                       </tr>\r
+                                       <tr>\r
+                                               <td align="center" valign="top">\r
+                                                       <table width="700" cellpadding="0" cellspacing="0" border="1" style="border-collapse:collapse; border-color:#CCCCCC;">\r
+                                                               <tr bgcolor="#CBD898" class="style2">\r
+                                                                       <td width="215" align="left" style="padding-bottom:5px;; padding-top:5px; padding-left:10px; padding-right:10px;">\r
+                                                                               <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Identifiant</span></td>\r
+                                                                       <td width="96" align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                               <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Mot de passe</span></td>\r
+                                                                       <td width="106" align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                               <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Permission</span></td>\r
+                                                                       <td width="" align="left" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                               <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Email</span></td>\r
+                                                                       <td width="133" align="center" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                               <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Modifier</span></td>\r
+                                                                       <td width="138" align="center" style="padding-bottom:0px; padding-left:10px; padding-right:10px;">\r
+                                                                               <span style="font-family:Arial, Helvetica, sans-serif; color:#330000">Supprimer</span></td>\r
+                                                               </tr>\r
+                                                               <?php\r
+                                                               //----------------Montrer l'information------------------------------------------------\r
+                                                                       $Sql = "select * from passwd order by login";\r
+                                                                       if($Sql){\r
+                                                                               $Swl = mysql_query($Sql);\r
+                                                                               while($Rows = mysql_fetch_array($Swl)){\r
+                                                                                       $ID = $Rows["ID"];\r
+                                                                                       $UserName = $Rows["login"];\r
+                                                                                       $Password = $Rows["Passwd"];\r
+                                                                                       $Mails = $Rows["Email"];\r
+                                                                                       $Perm = $Rows["Permission"];\r
+                                                                                       if($Perm == 1){\r
+                                                                                               $Permission = "Administrateur";\r
+                                                                                       }else{ $Permission = "Utilisateur"; }\r
+                                                               ?>\r
+                                                               <tr bgcolor="#E1E3B0">\r
+                                                                       <td style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                               <?php echo $UserName; ?>\r
+                                                                       </td>\r
+                                                                       <td title="<?php echo decrptPwd($Password,$kompler); ?>" style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                               <?php echo $Password; ?>\r
+                                                                       </td>\r
+                                                                       <td style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                               <?php echo $Permission; ?>\r
+                                                                       </td>\r
+                                                                       <td style="padding-top:5px; padding-left:10px; padding-right:10px; padding-bottom:5px;">\r
+                                                                               <?php echo $Mails; ?>\r
+                                                                       </td>\r
+                                                                       <td align="center" style="padding-top:5px; padding-left:5px; padding-right:5px; padding-bottom:5px;">\r
+                                                                               <input type="button" name="cmdEdit" value="  Modifier  " style="border:double; height:27px; border-color:#999966; background-color:#9aa95f; cursor:pointer; color:#FFFFFF; font-weight:normal;" title='Modifier : <?php echo $UserName; ?>' onClick="javascript:document.location.href='<?php echo"$_PHP_SELF?ID=$ID&MODI=Modif_strqrt"; ?>'" />\r
+                                                                               <!--<a href="<?php echo"$_PHP_SELF?ID=$ID&MODI=Modif_strqrt"; ?>" title="Modifier : <?php echo $UserName; ?>"><img src="images/tclyit_m.png" width="122" height="28" border="0"></a>-->\r
+                                                                       </td>\r
+                                                                       <td align="center" style="padding-top:5px; padding-left:5px; padding-right:5px; padding-bottom:5px;">\r
+                                                                               <input type="button" name="cmdDelete" value="Supprimer" style="border:double; height:27px; border-color:#999966; background-color:#9aa95f; cursor:pointer; color:#FFFFFF;" title='Supprimer : <?php echo $UserName; ?>' onClick="javascript: if(window.confirm('Confirmez-vous la suppression de <?php echo "\' ".$UserName." \'"; ?>?')){document.location.href='<?php echo"$_PHP_SELF?ID=$ID&DEL=Del_strqrt"; ?>'}" />\r
+                                                                               <!--<a href="<?php echo"$_PHP_SELF?ID=$ID&DEL=Del_strqrt"; ?>" title="Supprimer : <?php echo $UserName; ?>"><img src="images/tclyits_m.png" width="122" height="28" onClick="return delete_message();" border="0"></a>-->\r
+                                                                       </td>\r
+                                                               </tr>\r
+                                                               <?php } } ?>\r
+                                                               <tr>\r
+                                                                       <td colspan="5"></td>\r
+                                                                       <td align="center" style="padding-top:5px; padding-left:5px; padding-right:5px; padding-bottom:5px;">\r
+                                                                               <input type="button" name="cmdAjouter" value="    Ajouter   " style="border:double; height:27px; border-color:#999966; background-color:#9aa95f; cursor:pointer; color:#FFFFFF;" title="Ajouter nouveau utilisateur" onClick="javascript:document.location.href='<?php echo"index_admin.php"; ?>'" />\r
+                                                                       </td>\r
+                                                               </tr>\r
+                                                       </table>\r
+                                               </td>\r
+                                       </tr>\r
+                                       <tr bgcolor="#E2CEAF"><td align="center" style="padding-top:8px; padding-bottom:8px;"><i>Veuillez mettre votre curseur sur le mot de passe vous allez voir le vrai mot de passe!</i></td></tr>\r
+                         </table>\r
+                       </td>\r
+               </tr>\r
+  </table>\r
+   </form>\r
+  </center>\r
\r
+</body>\r
+</html>\r
diff --git a/paf/asss.txt b/paf/asss.txt
new file mode 100755 (executable)
index 0000000..e850d7c
--- /dev/null
@@ -0,0 +1 @@
+xcv
\ No newline at end of file
diff --git a/paf/excel.php b/paf/excel.php
new file mode 100755 (executable)
index 0000000..740c499
--- /dev/null
@@ -0,0 +1,86 @@
+<?php\r
+       error_reporting (E_ALL ^ E_NOTICE); //------pour &eacute;viter les notices sur les variables---------------\r
+       session_start();\r
+       $admin=$_SESSION["adminAUFPPKH"];\r
+       $UserName=$_SESSION["UserNamePAF"];\r
+       $Password=$_SESSION["PasswordPAF"];\r
+       include("includes/redirect.php");\r
+       if(!($admin == "y")){\r
+       redirect("index.php");\r
+    }\r
+\r
+$cdate = date("Y-m-d");\r
+\r
+header("Content-type: application/vnd.ms-excel");\r
+header("Content-Disposition: attachment; filename=tableau_on_$cdate.xls");\r
+\r
+\r
+// selectionner la base de donn&eacute;es\r
+include("includes/connection.php");\r
+include("includes/functions.php");\r
+/*$mysql_host = 'localhost';\r
+$mysql_user = 'root';\r
+$mysql_pass = 'root';\r
+$mysql_db      = 'pafauf_bdd';\r
+$query_string = "select * from v_excel";\r
+$mysql_link = mysql_connect($mysql_host,$mysql_user,$mysql_pass);\r
+\r
+mysql_select_db($mysql_db, $mysql_link);*/\r
+$sql = "SELECT * FROM v_excel";\r
+$sql = mysql_query($sql);\r
+\r
+$tbl= " <table border='100px' cellpadding='0' cellspacing='0'>\r
+<tr bgcolor='#CCCCCC' height='30px'>\r
+<td width='30px'><b>No.</b></td>\r
+<td width='100px'><b>Nom</b></td>\r
+<td width='150px'><b>Pr&eacute;nom</b></td>\r
+<td width='50px'><b>Genre</b></td>\r
+<td width='150px'><b>Date de Naissance</b></td>\r
+<td width='100px'><b>Nationalit&eacute;</b></td>\r
+<td width='100px'><b>Universit&eacute;</b></td>\r
+<td width='100px'><b>Facult&eacute;</b></td>\r
+<td width='50px'><b>Promotion</b></td>\r
+<td width='100px'><b>Ann&eacute;e Dimpl&ocirc;me</b></td>\r
+<td width='50px'><b>DELF / DALF</td>\r
+<td width='100px'><b>Ann&eacute;e DELF / DALF</b></td>\r
+<td width='100px'><b>Autres Langues</b></td>\r
+<td width='100px'><b>E-mail</b></td>\r
+<td width='100px'><b>T&eacute;l&eacute;phone Personnel</b></td>\r
+<td width='200px'><b>Adresse Personnelle</b></td>\r
+<td width='100px'><b>T&eacute;l&eacute;phone Parents</b></td>\r
+<td width='200px'><b>Adresse Parents</b></td>\r
+<td width='100px'><b>Titre du Travail ou Stage</b></td>\r
+<td width='200px'><b>Adresse du Travail ou Stage Actuel</b></td>\r
+</tr>";\r
+$i=1;\r
+while ($data = mysql_fetch_array($sql))\r
+{\r
+$tbl = $tbl . "<tr>";\r
+$tbl = $tbl . "<td>" . $i . "</td>";\r
+$tbl = $tbl . "<td>" . $data['1'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['2'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['3'] . "</td>";\r
+$tbl = $tbl . "<td>" . ChangeDateValueSelect($data['4']) . "</td>";\r
+$tbl = $tbl . "<td>" . $data['5'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['6'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['7'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['8'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['9'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['10'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['11'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['12'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['13'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['14'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['15'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['16'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['17'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['18'] . "</td>";\r
+$tbl = $tbl . "<td>" . $data['19'] . "</td>";\r
+$i++;\r
+$tbl = $tbl . "</tr>";\r
+}\r
+$tbl = $tbl . "</table>";\r
+\r
+print $tbl ; \r
+\r
+?>\r
diff --git a/paf/forms/creer_infos.php b/paf/forms/creer_infos.php
new file mode 100755 (executable)
index 0000000..766af90
--- /dev/null
@@ -0,0 +1,266 @@
+       <h2>Remplire vos informations</h2>\r
+    <p>Veillez-vous remplire vos informations pr&eacute;cises :</h2>&nbsp;&nbsp;&nbsp;<span style="background-color:#03F; color:#FFF; font-weight:bold;"><?php echo $Msg; ?></span><span style="background-color:#C33C33; color:#FFFFFF; font-weight:bold;"><?php echo $MsgError; ?></span>\r
+    <table width="100%" cellpadding="2" cellspacing="2" border="0" style="border-collapse:collapse;">\r
+       <tr><td width="18%">Nom<span style="color:#F00F00">*</span> :</td>\r
+               <td><input type="text" name="txtNom" value="<?php echo str_replace("`","'",$Rows['1']); ?>" maxlength="200" size="20" />&nbsp;&nbsp;<?php echo $ErrorNom; ?></td>\r
+            <td width="49%" align="center" style="background-color:#EDE7D8;"><b>Votre compte et mot de passe</b></td>\r
+        </tr>\r
+        <tr><td>Pr&eacute;nom<span style="color:#F00F00">*</span> :</td>\r
+               <td><input type="text" name="txtPrenom" value="<?php echo str_replace("`","'",$Rows['2']); ?>" maxlength="200" size="20" />&nbsp;&nbsp;<?php echo $ErrorPreNom; ?></td>\r
+            <td width="49%" rowspan="5" valign="top" style="background-color:#F4F4EC; padding-left:15px;">\r
+               <table cellpadding="3" cellspacing="3" border="0" width="80%" style="border-collapse:collapse;">\r
+                       <tr><td width="27%">Login :</td><td width="73%"><?php echo "C".$Rows['0']; ?></td></tr>\r
+                    <tr><td>Mot de passe :</td><td><?php echo decrptPwd($Rows['7'],$kompler); ?></td></tr>\r
+                    <tr><td colspan="2" style="padding-top:15px;">\r
+                               <a onClick="JavaScript:window.open('index_pwd.php','win5strildkdfjwi7599%6&&%%$idjd__e434534%$##$%**','width=900, height=330' )"; style="cursor:pointer;text-decoration:underline; color:#FF0000;" title="modifier vote mot de passe">\r
+                               Changer mot de passe ?</a></td></tr>\r
+                </table>\r
+            </td>\r
+        </tr>\r
+        <tr>\r
+               <td>Genre<span style="color:#F00F00">*</span> :</td>\r
+               <td>\r
+               <?php\r
+                                       if($Rows['3']=="F"){\r
+                                               $CheckedF = "checked";\r
+                                               $CheckedM = "";\r
+                                       }elseif($Rows['3']=="M"){\r
+                                               $CheckedM = "checked";\r
+                                               $CheckedF = "";\r
+                                       }else{\r
+                                               $CheckedM = "";\r
+                                               $CheckedF = "";\r
+                                       }\r
+                               ?>\r
+               <input type="radio" name="Sexe" value="F" <?php if($_REQUEST["Sexe"] == "F"){ echo "checked"; }else{ echo $CheckedF; } ?>> F\r
+                               <input type="radio" name="Sexe" value="M" <?php if($_REQUEST["Sexe"] == "M"){ echo "checked"; }else{ echo $CheckedM; } ?>> M &nbsp;&nbsp;<?php echo $ErrorSexe; ?></td>\r
+        </tr>\r
+        <tr><td>Date de naissance<span style="color:#F00F00">*</span> :</td>\r
+               <td width="33%"><select name="selJour" id="selJour">\r
+                       <?php\r
+                                               list($AA, $MM, $JJ) = split("-",$Rows['4']);\r
+                                               if($JJ != ""){ ?><option value="<?php echo $JJ; ?>"><?php echo $JJ; ?></option><?php } ?>\r
+                       <option value="">jour</option><?php for($i=1; $i <=31; $i++){ ?>\r
+                       <option value="<?php echo $i; ?>"><?php echo $i; ?></option><?php } ?>\r
+                </select> &nbsp;&nbsp;\r
+                       <select name="selMois" id="selMois">\r
+                       <?php if($MM != ""){ ?><option value="<?php echo $MM; ?>"><?php echo $MM; ?></option><?php } ?>\r
+                       <option value="">mois</option><?php for($i=1; $i <=12; $i++){ ?>\r
+                    <option value="<?php echo $i; ?>"><?php echo $i; ?></option><?php } ?>\r
+                </select> &nbsp;&nbsp;\r
+                <select name="selAnnee" id="selAnnee">\r
+                       <?php if($AA != ""){ ?><option value="<?php echo $AA; ?>"><?php echo $AA; ?></option><?php } ?>\r
+                       <option value="">ann&eacute;e</option><?php for($i=1941; $i <= date('Y'); $i++){ ?>\r
+                    <option value="<?php echo $i; ?>"><?php echo $i; ?></option><?php } ?>\r
+          </select>&nbsp;&nbsp;<?php echo $ErrorDDN; ?>&nbsp;(JJ-MM-AAAA)</td>\r
+        </tr>\r
+               <tr><td width="18%">Nationalit&eacute;<span style="color:#F00F00">*</span> :</td>\r
+               <td><!--<?php if($Rows['5']!=""){ $SelNat=$Rows['5']; }else{ $SelNat=$_REQUEST["Nationalite"]; } ?>-->\r
+                       <!--<select name="Nationalite"><?php echo ArrayToSelectBox($Nationalite,$SelNat,1,''); ?></select>-->\r
+            <select name="Nationalite">\r
+               <?php\r
+                               //------------Retrieve data while EtudiantID is not nothing--------------------\r
+                                 $Strs = mysql_query("Select nationalite from tblinscrit where id=".$IDEtudiant."");\r
+                                 if($Strs){\r
+                                       $RowsNat = mysql_fetch_row($Strs);\r
+                                       $Nom = $RowsNat['0'];\r
+                                 }\r
+                                 if($Nom == ""){\r
+                                       if($_REQUEST["Nationalite"] == ""){ ?>\r
+                                               <option value="">Choississez...</option> <?php\r
+                                       }else{ ?>\r
+                                               <option value="<?php echo $_REQUEST["Nationalite"]; ?>" selected><?php echo $_REQUEST["Nationalite"]; ?></option>\r
+                                               <option value="">Choississez...</option>\r
+                                       <?php }\r
+                                       $Pql=mysql_query("Select * from tblnationalite");\r
+                                       if($Pql){\r
+                                         while($PRows=mysql_fetch_array($Pql)){\r
+                                                 $INom=$PRows["nom"];\r
+                                                 if($INom != $_REQUEST["Nationalite"]){\r
+                                                         echo"<OPTION VALUE='$INom'>$INom</OPTION>\n";\r
+                                                 }\r
+                                               } \r
+                                       } \r
+                                 }else{\r
+                                       echo"<OPTION VALUE='$Nom'>$Nom</OPTION>\n";\r
+                                       ?><option value="">Choississez...</option><?php\r
+                                       $Pql=mysql_query("Select * from tblnationalite");\r
+                                       if($Pql){\r
+                                         while($PRows=mysql_fetch_array($Pql)){\r
+                                                 $INom=$PRows["nom"];\r
+                                                 if($INom != $Nom){\r
+                                                         echo"<OPTION VALUE='$INom'>$INom</OPTION>\n";\r
+                                                 }\r
+                                               } \r
+                                       } \r
+                                 }\r
+                                       ?>\r
+            </select>\r
+                       </td>\r
+        </tr>\r
+        <tr><td width="18%">Universit&eacute;<span style="color:#F00F00">*</span> :</td>\r
+               <td><select name="Etablissement" id="Etablissement">\r
+                <?php\r
+                               //------------Retrieve data while EtudiantID is not nothing--------------------\r
+                                 $StrEt = mysql_query("Select universite from tblinscrit where id=".$IDEtudiant."");\r
+                                 if($StrEt){\r
+                                       $RowsEt = mysql_fetch_row($StrEt);\r
+                                       $NomEt = str_replace("`","'",$RowsEt['0']);\r
+                                 }\r
+                                 if($NomEt == ""){\r
+                                       if($_REQUEST["Etablissement"] == ""){ ?>\r
+                                               <option value="">Choississez...</option> <?php\r
+                                       }else{ ?>\r
+                                               <option value="<?php echo str_replace("\'","'",$_REQUEST["Etablissement"]); ?>" selected><?php echo str_replace("\'","'",$_REQUEST["Etablissement"]); ?></option>\r
+                                               <option value="">Choississez...</option>\r
+                                       <?php }\r
+                                       $StEt=mysql_query("Select * from tbluniversite");\r
+                                       if($StEt){\r
+                                         while($PRowsEt=mysql_fetch_array($StEt)){\r
+                                                 $INomEt=str_replace("`","'",$PRowsEt["nom"]);\r
+                                                 if($INomEt != str_replace("\'","'",$_REQUEST["Etablissement"])){\r
+                                                         echo"<OPTION VALUE='$INomEt'>$INomEt</OPTION>\n";\r
+                                                 }\r
+                                               } \r
+                                       } \r
+                                 }else{\r
+                                       echo"<OPTION VALUE='$NomEt'>$NomEt</OPTION>\n";\r
+                                       ?><option value="">Choississez...</option><?php\r
+                                       $StEt=mysql_query("Select * from tbluniversite");\r
+                                       if($StEt){\r
+                                         while($PRowsEt=mysql_fetch_array($StEt)){\r
+                                                 $INomEt=str_replace("`","'",$PRowsEt["nom"]);\r
+                                                 if($INomEt != $NomEt){\r
+                                                         echo"<OPTION VALUE='$INomEt'>$INomEt</OPTION>\n";\r
+                                                 }\r
+                                               } \r
+                                       } \r
+                                 }\r
+                                       ?>\r
+                </select>\r
+                       </td>\r
+        </tr>\r
+        <tr><td width="18%">Facult&eacute;<span style="color:#F00F00">*</span> :</td>\r
+               <td><select name="Domaine">\r
+                <?php\r
+                               //------------Retrieve data while EtudiantID is not nothing--------------------\r
+                                 $StrFac = mysql_query("Select faculte from tblinscrit where id=".$IDEtudiant."");\r
+                                 if($StrFac){\r
+                                       $RowsFac = mysql_fetch_row($StrFac);\r
+                                       $NomFac = $RowsFac['0'];\r
+                                 }\r
+                                 if($NomFac == ""){\r
+                                       if($_REQUEST["Domaine"] == ""){ ?>\r
+                                               <option value="">Choississez...</option> <?php\r
+                                       }else{ ?>\r
+                                               <option value="<?php echo $_REQUEST["Domaine"]; ?>" selected><?php echo $_REQUEST["Domaine"]; ?></option>\r
+                                               <option value="">Choississez...</option>\r
+                                       <?php }\r
+                                       $StFac = mysql_query("Select * from tbldomaine");\r
+                                       if($StFac){\r
+                                         while($PRowsFac = mysql_fetch_array($StFac)){\r
+                                                 $INomFac =$PRowsFac["nom"];\r
+                                                 if($INomFac != $_REQUEST["Domaine"]){\r
+                                                         echo"<OPTION VALUE='$INomFac'>$INomFac</OPTION>\n";\r
+                                                 }\r
+                                               } \r
+                                       } \r
+                                 }else{\r
+                                       echo"<OPTION VALUE='$NomFac'>$NomFac</OPTION>\n";\r
+                                       ?><option value="">Choississez...</option><?php\r
+                                       $StFac = mysql_query("Select * from tbldomaine");\r
+                                       if($StFac){\r
+                                         while($PRowsFac = mysql_fetch_array($StFac)){\r
+                                                 $INomFac = $PRowsFac["nom"];\r
+                                                 if($INomFac != $NomFac){\r
+                                                         echo"<OPTION VALUE='$INomFac'>$INomFac</OPTION>\n";\r
+                                                 }\r
+                                               } \r
+                                       } \r
+                                 }\r
+                                       ?>\r
+                </select>\r
+                       </td><td style="background-color:#EDE7D8; padding-left:17px;">\r
+               <strong><a href="index.php?page=liste_infos" title="liste des informations">Liste des informations >></a></strong>\r
+            </td>\r
+        </tr>\r
+               <tr><td width="18%">Promotion<span style="color:#F00F00">*</span> :</td>\r
+               <td><select name="selPromotion" id="selPromotion">\r
+                       <option value="<?php echo $Rows['10']; ?>"><?php echo $Rows['10']; ?></option>\r
+                                       <?php if($_REQUEST["selPomotion"]!= ""){ ?><option value="<?php echo $_REQUEST["selPomotion"]; ?>"><?php echo $_REQUEST["selPomotion"]; ?></option><?php } ?>\r
+                                       <option value="">choisissez</option><?php for($i=1941; $i <= date('Y'); $i++){ ?>\r
+                                       <option value="<?php echo $i; ?>"><?php echo $i; ?></option><?php } ?>\r
+                               </select>&nbsp;&nbsp;<?php echo $ErrorPRO; ?> Ann&eacute;e obt. Dipl&ocirc;me : &nbsp;\r
+                               <select name="selAnneeDiplome" id="selAnneeDiplome">\r
+                       <option value="<?php echo $Rows['11']; ?>"><?php echo $Rows['11']; ?></option>\r
+                                       <?php if($_REQUEST["selAnneeDiplome"]!= ""){ ?><option value="<?php echo $_REQUEST["selAnneeDiplome"]; ?>"><?php echo $_REQUEST["selAnneeDiplome"]; ?></option><?php } ?>\r
+                                       <option value="">choisissez</option><?php for($i=1941; $i <= date('Y'); $i++){ ?>\r
+                                       <option value="<?php echo $i; ?>"><?php echo $i; ?></option><?php } ?>\r
+                               </select>\r
+                       </td><td rowspan="11" valign="top" style="background-color:#F4F4EC; padding-left:15px; padding-top:15px;">\r
+               <table cellpadding="3" cellspacing="3" border="1" width="100%" style="border-collapse:collapse; border-color:#999;">\r
+                       <tr><td colspan="1">Nom et Pr&eacute;nom :</td><td colspan="3"><?php echo str_replace("`","'",$Rows['1'])." ".str_replace("`","'",$Rows['2']); ?></td></tr>\r
+                    <tr><td width="29%">Genre :</td><td width="10%"><?php echo $Rows['3']; ?></td><td width="29%">Date de Naissance :</td><td width="32%"><?php echo ChangeDateValueSelect($Rows['4']); ?></td></tr>\r
+                    <tr><td colspan="1">Nationalit&eacute; :</td><td colspan="3"><?php echo str_replace("`","'",$Rows['5']); ?></td></tr>\r
+                    <tr><td colspan="1">Universit&eacute; :</td><td colspan="3"><?php echo str_replace("`","'",$Rows['8']); ?></td></tr>\r
+                    <tr><td colspan="1">Facult&eacute; :</td>\r
+                    <td colspan="3"><?php echo str_replace("`","'",$Rows['9']); ?> &nbsp;&nbsp;&nbsp;&nbsp;| Promo. :&nbsp; <?php echo $Rows['10']; ?>&nbsp;&nbsp;| Ann&eacute;e Dipl&ocirc;me : &nbsp; <?php echo $Rows['11']; ?></td></tr>\r
+                    <tr><td>DELF / DALF :</td><td><?php echo $Rows['12']; ?></td><td>Ann&eacute;e Obtention :</td><td><?php echo $Rows['13']; ?></td></tr>\r
+                    <tr><td colspan="1">Autres Langues :</td><td colspan="3"><?php echo str_replace("`","'",$Rows['14']); ?></td></tr>\r
+                    <tr><td colspan="1">Mail :</td><td colspan="3"><?php echo $Rows['15']; ?></td></tr>\r
+                    <tr><td colspan="1">T&eacute;l&eacute;phone personnel :</td><td colspan="3"><?php echo $Rows['16']; ?></td></tr>\r
+                    <tr><td colspan="1">Adresse personnelle :</td><td colspan="3"><?php echo str_replace("`","'",$Rows['17']); ?></td></tr>\r
+                    <tr><td colspan="1">T&eacute;l&eacute;phone parents :</td><td colspan="3"><?php echo $Rows['18']; ?></td></tr>\r
+                    <tr><td colspan="1">Adresse parents :</td><td colspan="3"><?php echo str_replace("`","'",$Rows['19']); ?></td></tr>\r
+                    <tr><td colspan="1">Titre travail / stage :</td><td colspan="3"><?php echo str_replace("`","'",$Rows['20']); ?></td></tr>\r
+                    <tr><td colspan="1">Adresse travail / stage actuel :</td><td colspan="3"><?php echo str_replace("`","'",$Rows['21']); ?></td></tr>\r
+                    <tr><td colspan="1">Divers :</td><td colspan="3"><?php echo str_replace("`","'",$Rows['22']); ?></td></tr>\r
+                </table>\r
+            </td>\r
+        </tr>\r
+               <tr><td width="18%">DELF / DALF :</td>\r
+               <td><select name="selDelf" id="selDelf">\r
+                       <option value="<?php echo $Rows['12']; ?>"><?php echo $Rows['12']; ?></option>\r
+                                       <?php if($_REQUEST["selDelf"]!=""){ ?><option value="<?php echo $_REQUEST["selDelf"]; ?>"><?php echo $_REQUEST["selDelf"]; ?></option><?php } ?>\r
+                                       <option value="">choisissez</option>\r
+                                       <option value="DELF">DELF</option>\r
+                                       <option value="DALF">DALF</option>\r
+                               </select>&nbsp;&nbsp; Ann&eacute;e obtention : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
+                               <select name="selAnneeDelf" id="selAnneeDelf">\r
+                       <option value="<?php echo $Rows['13']; ?>"><?php echo $Rows['13']; ?></option>\r
+                                       <?php if($_REQUEST["selAnneeDelf"]!= ""){ ?><option value="<?php echo $_REQUEST["selAnneeDelf"]; ?>"><?php echo $_REQUEST["selAnneeDelf"]; ?></option><?php } ?>\r
+                                       <option value="">choisissez</option><?php for($i=1941; $i <= date('Y'); $i++){ ?>\r
+                                       <option value="<?php echo $i; ?>"><?php echo $i; ?></option><?php } ?>\r
+                               </select>\r
+                       </td>\r
+        </tr>\r
+               <tr><td width="18%">Autres Langues :</td>\r
+               <td><input type="text" name="txtLangue" value="<?php if($Rows['14'] !=""){ echo str_replace("`","'",$Rows['14']); }else{ echo $_REQUEST["txtLangue"]; } ?>" maxlength="1000" size="20" /></td>\r
+        </tr>\r
+        <tr><td width="18%">Mail :</td>\r
+               <td><input type="text" name="txtMail" value="<?php if($Rows['15'] !=""){ echo str_replace("`","'",$Rows['15']); }else{ echo $_REQUEST["txtMail"]; } ?>" maxlength="100" size="20" />&nbsp;&nbsp;<?php echo $ErrorMail; ?></td>\r
+        </tr>\r
+        <tr><td width="18%">T&eacute;l&eacute;phone personnel :</td>\r
+               <td><input type="text" name="txtTelephonepersonnel" value="<?php if($Rows['16'] !=""){ echo str_replace("`","'",$Rows['16']); }else{ echo $_REQUEST["txtTelephonepersonnel"]; } ?>" maxlength="20" size="20" /></td>\r
+        </tr>\r
+        <tr><td width="18%">Adresse personnelle :</td>\r
+               <td><textarea name="txtAdressepersonnelle" rows="3" cols="30"><?php if($Rows['17'] !=""){ echo str_replace("`","'",$Rows['17']); }else{ echo $_REQUEST["txtAdressepersonnelle"]; } ?></textarea></td>\r
+        </tr>\r
+               <tr><td width="18%">T&eacute;l&eacute;phone parents :</td>\r
+               <td><input type="text" name="txtTelephoneparents" value="<?php if($Rows['18'] !=""){ echo str_replace("`","'",$Rows['18']); }else{ echo $_REQUEST["txtTelephoneparents"]; } ?>" maxlength="20" size="20" /></td>\r
+        </tr>\r
+        <tr><td width="18%">Adresse parents :</td>\r
+               <td><textarea name="txtAdresseparents" rows="3" cols="30"><?php if($Rows['19'] !=""){ echo str_replace("`","'",$Rows['19']); }else{ echo $_REQUEST["txtAdresseparents"];} ?></textarea></td>\r
+        </tr>\r
+               <tr><td width="18%">Titre travail / stage :</td>\r
+               <td><input type="text" name="txtTitretravail" value="<?php if($Rows['20'] !=""){ echo str_replace("`","'",$Rows['20']); }else{ echo $_REQUEST["txtTitretravail"]; } ?>" maxlength="800" size="20" /></td>\r
+        </tr>\r
+        <tr><td width="18%">Adresse travail / stage actuel :</td>\r
+               <td><textarea name="txtAdresseTravail" rows="3" cols="30"><?php if($Rows['21'] !=""){ echo str_replace("`","'",$Rows['21']); }else{ echo $_REQUEST["txtAdresseTravail"]; } ?></textarea></td>\r
+        </tr>\r
+               <tr><td width="18%">Divers :</td>\r
+               <td><textarea name="txtDivers" rows="5" cols="30"><?php if($Rows['22'] !=""){ echo str_replace("`","'",$Rows['22']); }else{ echo $_REQUEST["txtDivers"]; } ?></textarea></td>\r
+        </tr>\r
+        <tr><td></td><td colspan="3"><input type="submit" name="cmdSave" value="Sauvegarder" /> &nbsp;&nbsp;<span style="background-color:#FCFFCF"><i><span style="color:#F00F00">*</span> : c'est obligatoire de remplire.</i></span></td></tr>\r
+    </table>\r
+    <p> </p>\r
diff --git a/paf/forms/home.php b/paf/forms/home.php
new file mode 100755 (executable)
index 0000000..5bc886f
--- /dev/null
@@ -0,0 +1,24 @@
+       <h3>Explications</h3>\r
+    <p>Ce site sera donc exclusivement r&eacute;serv&eacute; &agrave; cet effet avec comme seules entr&eacute;es:\r
+      <br />\r
+      1/ cr&eacute;ation de l'identification\r
+      <br />\r
+      2/ mise &agrave; jour de la fiche individuelle\r
+Il s'agit donc de tester la r&eacute;activit&eacute; des &eacute;tudiants, leur capacit&eacute; et leur motivation pour entrer dans ce genre de site, de mettre &agrave; jour leur fichier de mani&egrave;re interactive, d'&ecirc;tre capable de cr&eacute;er un identifiant, etc.\r
+Un accompagnement se effectu&eacute; par l'&eacute;quipe du CNF.<br />\r
+Le site sera donc basique. Toutes les saisies des &eacute;tudiants sont de toute fa&ccedil;on n&eacute;cessaires pour pouvoir les suivre, ce travail sera donc quoiqu'il arrive utile.</p>\r
+    <?php if($_SESSION["UserNamePAF"] ==""){ ?>\r
+    <h2>Cr&eacute;er votre login.</h2>\r
+    <p>Vous allez besoin de cr&eacute;er votre login avant remplire vos informations.</p><a href="<?php echo"$PHP_SELF?page=login" ?>" style="text-decoration:none; color:#603603;" title="Cliquer ici pour cr&eacute;er votre login"><img src="./images/register.jpg" width="102" height="15" border="0"></a>\r
+    <p><hr color="#E6E6E6" size="1" /></p><?php } ?>\r
+    <h2>Vous &ecirc;tes d&eacute;j&agrave; inscrit.</h2>\r
+    <p>Veuillez remplire votre compte identifiant et mot de passe.</p>\r
+    <table width="100%" cellpadding="3" cellspacing="3" border="0" style="border-collapse:collapse;">\r
+       <tr><td width="16%">Votre login :</td>\r
+       <td width="84%"><input type="text" name="txtUserName" size="25" /></td></tr>\r
+        <tr><td>Mot de passe :</td><td><input type="password" name="txtPassword" size="25" /></td></tr>\r
+        <tr><td></td><td><input type="submit" name="cmdLogin" value="Connexion" />\r
+                       &nbsp; <?php if($_REQUEST["msg"]=="0"){ echo "<font style='color:#F00F00;'>Connexion &eacute;chou&eacute;e....</font>"; }else{ echo $Message; } ?></td></tr>\r
+               <tr><td></td><td style="padding-top:10px;"><img src="./images/boule.png" width="11" height="12" /> <a href="index_mdpo.php" title="mot de passe oubli&eacute;" style="text-decoration:none;"><b>Mot de passe oubli&eacute; ?</b></a></td></tr>\r
+    </table>\r
+    <p> </p>\r
diff --git a/paf/forms/liste_infos.php b/paf/forms/liste_infos.php
new file mode 100755 (executable)
index 0000000..cee0333
--- /dev/null
@@ -0,0 +1,33 @@
+<?php \r
+       if($_SESSION["UserNamePAF"]==""){ redirect("index.php"); } ?>\r
+    <h2>Liste des informations</h2>\r
+    <p><strong><a href="excel.php" title="exporter au fichier d'excel">Exporter Fichier Calc</a></strong></p>\r
+    <table width="100%" cellpadding="3" cellspacing="3" border="1" style="border-collapse:collapse; padding-top:20px;">\r
+       <tr><td width="4%"><strong>No.</strong></td>\r
+               <td width="4%"><strong>Login</strong></td>\r
+               <td width="14%"><strong>Nom & Pr&eacute;nom</strong></td>\r
+            <td width="5%" align="center"><strong>Genre</strong></td>\r
+            <td width="12%"><strong>Date de Naissance</strong></td>\r
+            <td width="17%"><strong>Universit&eacute;</strong></td>\r
+            <td width="13%"><strong>Facult&eacute;</strong></td>\r
+            <td width="13%"><strong>T&eacute;l&eacute;phone</strong></td>\r
+            <td width="18%"><strong>E-mail</strong></td>\r
+        </tr>\r
+        <?php\r
+                       $i=1;\r
+                       $Stt = 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 order by id desc");\r
+                       $Deconnexion = "<a href='index.php?actlogin=logout' title='d&eacute;connexion'>D&eacute;connexion</a>";\r
+                       while($row=mysql_fetch_array($Stt)){ ?>\r
+        <tr><td><?php echo $i; ?></td>\r
+               <td><?php echo "C".$row["id"]; ?></td>\r
+               <td><?php echo str_replace("`","'",$row["nom"])." ".str_replace("`","'",$row["prenom"]); ?></td>\r
+            <td align="center"><?php echo $row["sexe"]; ?></td>\r
+            <td><?php echo ChangeDateValueSelect($row["datedenaissance"]); ?></td>\r
+            <td><?php echo str_replace("`","'",$row["universite"]); ?></td>\r
+            <td><?php echo str_replace("`","'",$row["faculte"]); ?></td>\r
+            <td><?php echo $row["telephonepersonnelle"]; ?></td>\r
+            <td><?php echo $row["email"]; ?></td>\r
+               </tr>\r
+        <?php $i++; } ?>\r
+    </table>\r
+    <p><strong><a href="excel.php" title="exporter au fichier d'excel">Exporter Fichier Calc</a></strong></p>\r
diff --git a/paf/forms/login.php b/paf/forms/login.php
new file mode 100755 (executable)
index 0000000..2544ef6
--- /dev/null
@@ -0,0 +1,55 @@
+<h2>Cr&eacute;er votre login</h2>\r
+    <table width="100%" cellpadding="3" cellspacing="3" border="0" style="border-collapse:collapse;">\r
+               <tr><td colspan="2">Veillez-vous remplire vos informations pr&eacute;cises :</td>\r
+                       <td width="48%" rowspan="6" valign="top"><?php echo $ErrorSave; ?><?php if($IDS != "" && $ErrorSave == ""){ ?>\r
+                               <table cellpadding="3" cellspacing="3" border="0" width="100%" style="border-collapse:collapse;">\r
+                                       <tr><td colspan="2"><font size="3" style="font-weight:bold; color:#000066;">\r
+                                               F&eacute;licitation ! Votre compte login a &eacute;t&eacute; cr&eacute;&eacute;.</font>\r
+                                               <hr color="#99CC00" size="1" /></td></tr>\r
+                                       <tr><td width="41%" style="padding-left:10px;"><?php echo"Nom et Pr&eacute;nom :"; ?></td>\r
+                                       <td width="59%"><?php echo $Rows['1']." ".$Rows['2']; ?></td>\r
+                                       </tr>\r
+                                       <tr><td style="padding-left:10px;"><?php echo"Date de naissance :"; ?></td><td><?php echo ChangeDateValueSelect($Rows['3']); ?></td></tr>\r
+                                       <tr><td style="padding-left:10px;"><?php echo"Login :"; ?></td><td><?php echo"C".$Rows['5']; ?></td></tr>\r
+                                       <tr><td style="padding-left:10px; padding-bottom:15px;"><?php echo"Mote de passe :"; ?></td>\r
+                                       <td style="padding-bottom:15px;"><?php echo decrptPwd($Rows['4'],$kompler); ?></td></tr>\r
+                                       <tr>\r
+                                         <td colspan="2" align="right" style="background-color:#F1ECC5;">\r
+                                               <font size="2" style="font-weight:bold;"><a href="index.php" style="text-decoration:none;" title="connexion">>>> Connectez-vous?</a></font></td>\r
+                                       </tr>\r
+                               </table><?php } ?>                </td>\r
+               </tr>\r
+       <tr><td width="18%">Nom<span style="color:#F00F00">*</span> :</td>\r
+                 <td><input type="text" name="txtNom" value="<?php echo $_REQUEST["txtNom"]; ?>" size="20" title="Vous devez remplire votre nom." />               &nbsp;&nbsp;<?php echo $ErrorNom; ?></td>\r
+        </tr>\r
+        <tr><td>Pr&eacute;nom<span style="color:#F00F00">*</span> :</td>\r
+               <td><input type="text" name="txtPrenom" value="<?php echo $_REQUEST["txtPrenom"]; ?>" size="20" title="Vous devez remplire votre pr&eacute;nom." />&nbsp;&nbsp;<?php echo $ErrorPreNom; ?></td>\r
+        </tr>\r
+        <tr><td>Date de naissance<span style="color:#F00F00">*</span> :</td>\r
+               <td width="34%">\r
+               <select name="selJour" id="selJour" title="Vous devez remplire votre jour de naissance.">\r
+                       <?php if($_REQUEST["selJour"]!= ""){ ?><option value="<?php echo $_REQUEST["selJour"]; ?>"><?php echo $_REQUEST["selJour"]; ?></option><?php } ?>\r
+                       <option value="">jour</option><?php for($i=1; $i <=31; $i++){ ?>\r
+                       <option value="<?php echo $i; ?>"><?php echo $i; ?></option><?php } ?>\r
+                </select> &nbsp;&nbsp;\r
+                       <select name="selMois" id="selMois" title="Vous devez remplire votre mois de naissance.">\r
+                       <?php if($_REQUEST["selMois"]!= ""){ ?><option value="<?php echo $_REQUEST["selMois"]; ?>"><?php echo $_REQUEST["selMois"]; ?></option><?php } ?>\r
+                       <option value="">mois</option><?php for($i=1; $i <=12; $i++){ ?>\r
+                    <option value="<?php echo $i; ?>"><?php echo $i; ?></option><?php } ?>\r
+                </select> &nbsp;&nbsp;\r
+                <select name="selAnnee" id="selAnnee" title="Vous devez remplire votre ann&eacute;e de naissance.">\r
+                       <?php if($_REQUEST["selAnnee"]!= ""){ ?><option value="<?php echo $_REQUEST["selAnnee"]; ?>"><?php echo $_REQUEST["selAnnee"]; ?></option><?php } ?>\r
+                       <option value="">ann&eacute;e</option><?php for($i=1941; $i <= date('Y'); $i++){ ?>\r
+                    <option value="<?php echo $i; ?>"><?php echo $i; ?></option><?php } ?>\r
+          </select>&nbsp;&nbsp;<?php echo $ErrorDDN; ?></td>\r
+        </tr>\r
+        <tr><td width="18%">Mot de passe<span style="color:#F00F00">*</span> :</td>\r
+               <td><input type="password" name="txtMotdepasse" maxlength="10" value="<?php echo $_REQUEST["txtMotdepasse"]; ?>"  size="20" title="Vous devez remplire votre mot de passe." />&nbsp;&nbsp;<?php echo $ErrorMDP; ?></td>\r
+        </tr>\r
+        <tr><td width="18%">Confirmer<span style="color:#F00F00">*</span> :</td>\r
+               <td><input type="password" name="txtMotdepasseconfirmer" maxlength="10" value="<?php echo $_REQUEST["txtMotdepasseconfirmer"]; ?>" size="20" title="Vous devez remplire votre mot de passe confirm&eacute;." />&nbsp;&nbsp;<?php echo $ErrorMDPC." ".$ErrorMotPasse; ?></td>\r
+        </tr>\r
+        <tr><td></td><td colspan="3"><input type="submit" name="cmdSave" value="Sauvegarder" /><p><span style="background-color:#FCFFCF">Note : -<i><span style="color:#F00F00">*</span> : c'est obligatoire de remplire.<br />\r
+                       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Mot de passe est maximum 10 caract&egrave;res.</i></span></p></td></tr>\r
+    </table>\r
+    <p> </p>\r
diff --git a/paf/forms/mdp_oublie.php b/paf/forms/mdp_oublie.php
new file mode 100755 (executable)
index 0000000..1503758
--- /dev/null
@@ -0,0 +1,12 @@
+<h2>Mot de passe oubli&eacute;</h2>\r
+    <table width="100%" cellpadding="3" cellspacing="3" border="0" style="border-collapse:collapse;">\r
+               <tr>\r
+                 <td colspan="2">Veillez-vous remplire votre mail pr&eacute;cis : &nbsp;&nbsp;&nbsp;<?php echo $MsgErrors; ?></td>\r
+               </tr>\r
+       <tr><td width="20%">Courriel<span style="color:#F00F00">*</span> :</td>\r
+               <td><input type="text" name="txtMail" size="30" />&nbsp;&nbsp;<?php echo $ErrorMail; ?></td>\r
+        </tr>\r
+        <tr><td></td><td colspan="2"><input type="submit" name="cmdSend" value="  Envoyer  " />\r
+        <p><span style="background-color:#FCFFCF">Note : -<i><span style="color:#F00F00">*</span> : c'est obligatoire de remplire.<br /></i></span></p></td></tr>\r
+    </table>\r
+    <p> </p>\r
diff --git a/paf/forms/search_infos.php b/paf/forms/search_infos.php
new file mode 100755 (executable)
index 0000000..94c78b1
--- /dev/null
@@ -0,0 +1,33 @@
+<?php //if($_SESSION["UserNamePAF"]==""){ redirect("index.php"); } ?>\r
+    <h2>(<?php echo $Num; ?>) r&eacute;sultat de recherche avec : "<?php echo $StrSearch; ?>"</h2>\r
+    <!--<p><strong><a href="excel.php" title="exporter au fichier d'excel">Exporter Fichier Calc</a></strong></p>-->\r
+    <table width="100%" cellpadding="3" cellspacing="3" border="1" style="border-collapse:collapse; padding-top:20px;">\r
+       <tr><td width="4%"><strong>No.</strong></td>\r
+               <td width="4%"><strong>Login</strong></td>\r
+               <td width="14%"><strong>Nom & Pr&eacute;nom</strong></td>\r
+            <td width="5%" align="center"><strong>Genre</strong></td>\r
+            <td width="12%"><strong>Date de Naissance</strong></td>\r
+            <td width="17%"><strong>Universit&eacute;</strong></td>\r
+            <td width="13%"><strong>Facult&eacute;</strong></td>\r
+            <td width="13%"><strong>T&eacute;l&eacute;phone</strong></td>\r
+            <td width="18%"><strong>E-mail</strong></td>\r
+        </tr>\r
+        <?php\r
+                       $i=1;\r
+                       $Deconnexion = "<a href='index.php?actlogin=logout' title='d&eacute;connexion'>D&eacute;connexion</a>";\r
+                       while($row=mysql_fetch_array($Sql_Ct)){ ?>\r
+        <tr><td><?php echo $i; ?></td>\r
+               <td><?php echo "C".$row["id"]; ?></td>\r
+               <td><?php echo str_replace("`","'",$row["nom"])." ".str_replace("`","'",$row["prenom"]); ?></td>\r
+            <td align="center"><?php echo $row["sexe"]; ?></td>\r
+            <td><?php echo ChangeDateValueSelect($row["datedenaissance"]); ?></td>\r
+            <td><?php echo str_replace("`","'",$row["universite"]); ?></td>\r
+            <td><?php echo str_replace("`","'",$row["faculte"]); ?></td>\r
+            <td><?php echo $row["telephonepersonnelle"]; ?></td>\r
+            <td><?php echo $row["email"]; ?></td>\r
+               </tr>\r
+        <?php $i++; } ?>\r
+    </table>\r
+    <p>&nbsp;</p>\r
+       <?php if($_SESSION["UserNamePAF"]!=""){ ?>\r
+    <p><strong><a href="excel.php" title="exporter au fichier d'excel">Exporter Fichier Calc</a></strong></p><?php } ?>\r
diff --git a/paf/images/Thumbs.db b/paf/images/Thumbs.db
new file mode 100755 (executable)
index 0000000..c1f3c94
Binary files /dev/null and b/paf/images/Thumbs.db differ
diff --git a/paf/images/alert.gif b/paf/images/alert.gif
new file mode 100755 (executable)
index 0000000..2a0f2b1
Binary files /dev/null and b/paf/images/alert.gif differ
diff --git a/paf/images/auf.gif b/paf/images/auf.gif
new file mode 100755 (executable)
index 0000000..bba795d
Binary files /dev/null and b/paf/images/auf.gif differ
diff --git a/paf/images/auf.jpg b/paf/images/auf.jpg
new file mode 100755 (executable)
index 0000000..77ad764
Binary files /dev/null and b/paf/images/auf.jpg differ
diff --git a/paf/images/boule.png b/paf/images/boule.png
new file mode 100755 (executable)
index 0000000..92bbe17
Binary files /dev/null and b/paf/images/boule.png differ
diff --git a/paf/images/error.png b/paf/images/error.png
new file mode 100755 (executable)
index 0000000..74a720a
Binary files /dev/null and b/paf/images/error.png differ
diff --git a/paf/images/error_.gif b/paf/images/error_.gif
new file mode 100755 (executable)
index 0000000..c1019fe
Binary files /dev/null and b/paf/images/error_.gif differ
diff --git a/paf/images/paf.ico b/paf/images/paf.ico
new file mode 100755 (executable)
index 0000000..4bbd16c
Binary files /dev/null and b/paf/images/paf.ico differ
diff --git a/paf/images/register.jpg b/paf/images/register.jpg
new file mode 100755 (executable)
index 0000000..bf318af
Binary files /dev/null and b/paf/images/register.jpg differ
diff --git a/paf/images/warning.png b/paf/images/warning.png
new file mode 100755 (executable)
index 0000000..2de8803
Binary files /dev/null and b/paf/images/warning.png differ
diff --git a/paf/includes/connection.php b/paf/includes/connection.php
new file mode 100755 (executable)
index 0000000..da905ae
--- /dev/null
@@ -0,0 +1,12 @@
+<?php\r
+$dbhost = 'localhost';\r
+$dbuser = 'root';\r
+$dbpass = '';\r
+$dbname = 'pafauf_bdd';\r
+\r
+$conn = mysql_connect($dbhost, $dbuser, $dbpass,true) or die ('Erreur connexion au mysql');\r
+mysql_select_db($dbname,$conn);\r
+mysql_query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'", $conn);\r
+//mysql_set_charset('utf8', $conn) or die("Erreur : "). mysql_error();\r
+//echo"Successfully connected to server!!!";\r
+?>\r
diff --git a/paf/includes/functions.php b/paf/includes/functions.php
new file mode 100755 (executable)
index 0000000..27e453d
--- /dev/null
@@ -0,0 +1,221 @@
+<?php\r
+       function format_date($date){\r
+                //$date = array_shift;\r
+       \r
+               if ($date == -1){ return "&nbsp;"; }\r
+       \r
+               $date *= 24 * 3600;\r
+               list($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($date);\r
+               return ( 1900 + $year ) . "-" . ++$mon . "-" . ++$mday;\r
+               //return date('Y-m-d',$date);\r
+       }\r
+       \r
+       //-------Select box------------------------\r
+       \r
+       $Nationalite = array(\r
+    "Cambodgienne"=>"Cambodgienne",\r
+       "Cambodgien"=>"Cambodgien",\r
+       "Belge"=>"Belge",\r
+       "Canadienne"=>"Canadienne",\r
+       "Canadien"=>"Canadien",\r
+       "Chinoise"=>"Chinoise",\r
+       "Chinois"=>"Chinois",\r
+       "Française"=>"Française",\r
+       "Français"=>"Français",\r
+       "Laotienne"=>"Laotienne",\r
+       "Laotien"=>"Laotien",\r
+       "Suisse"=>"Suisse",\r
+       "Vietnamienne"=>"Vietnamienne",\r
+       "Vietnamien"=>"Vietnamien",\r
+       "Malagasy"=>"Malagasy",\r
+       "Autre"=>"Autre");\r
+    \r
+       $Activite = array(\r
+    "??"=>"??",\r
+       "AUF"=>"AUF",\r
+       "Etudiant"=>"Etudiant",\r
+       "Enseignant"=>"Enseignant",\r
+       "Autre"=>"Autre");\r
+    \r
+       $Domaine = array(\r
+    "??"=>"??",\r
+       "Agronomie"=>"Agronomie",\r
+       "Anglais"=>"Anglais",\r
+       "Archéologie"=>"Archéologie",\r
+       "Architecture"=>"Architecture",\r
+       "Biologie"=>"Biologie",\r
+       "Chimie"=>"Chimie",\r
+       "Commerce"=>"Commerce",\r
+       "Droit"=>"Droit",\r
+       "Français"=>"Français",\r
+       "Génie Civil"=>"Génie Civil",\r
+       "Génie Electrique"=>"Génie Electrique",\r
+       "Génie Industriel"=>"Génie Industriel",\r
+       "Géographie"=>"Géographie",\r
+       "Géologie"=>"Géologie",\r
+       "Gestion"=>"Gestion",\r
+       "Histoire"=>"Histoire",\r
+       "Hydraulique"=>"Hydraulique",\r
+       "Informatique"=>"Informatique",\r
+       "Ingénieur"=>"Ingénieur",\r
+       "Littérature"=>"Littérature",\r
+       "Linguistique"=>"Linguistique",\r
+       "Mathématique"=>"Mathématique",\r
+       "Médecine"=>"Médecine",\r
+       "Odontostomatologie"=>"Odontostomatologie",\r
+       "Pharmacie"=>"Pharmacie",\r
+       "Philosophie"=>"Philosophie",\r
+       "Technicien"=>"Technicien",\r
+       "Touriste"=>"Touriste");\r
+       \r
+       $Etablissement = array(\r
+    "??"=>"??",\r
+       "AUF"=>"AUF",\r
+       "Ecole Royale d'Administration"=>"Ecole Royale d'Administration",\r
+       "Faculty of Business"=>"Faculty of Business",\r
+       "ITC"=>"ITC",\r
+       "Lycée"=>"Lycée",\r
+       "Univ. Royale de Phnom Penh"=>"Univ. Royale de Phnom Penh",\r
+       "Univ. Royale des Beaux-Arts"=>"Univ. Royale des Beaux-Arts",\r
+       "Univ. Royale d'Agronomie"=>"Univ. Royale d'Agronomie",\r
+       "Univ. des Sciences de la Santé"=>"Univ. des Sciences de la Santé",\r
+       "Univ. de Droit et Siences-Eco"=>"Univ. de Droit et Siences-Eco");\r
+       \r
+    $Groupe = array(\r
+    "Usagers"=>"Usagers",\r
+       "CNF"=>"CNF",\r
+       "Admin"=>"Admin");\r
+       \r
+       //================Array to select box================================================\r
+        function ArrayToSelectBox($arr,$sel = '',$usekey=1,$nullvalue='') {\r
+               while (list( $key, $val ) = each($arr)) {\r
+                       if($sel && $usekey && ($key == $sel || is_array($sel) && in_array($key,$sel))) {\r
+                               $select_v=" selected='selected'";\r
+                       } else if ($sel && !$usekey && ($val == $sel || is_array($sel) && in_array($val,$sel))) {\r
+                               $select_v=" selected='selected'";\r
+                       } else {\r
+                               $select_v='';\r
+                       }\r
+               \r
+                       if($nullvalue != '') {\r
+                               if ($key == $nullvalue) {\r
+                                       $key = '';          \r
+                               }\r
+                       }\r
+               \r
+                       if ($usekey == 1) {\r
+                               echo "<option value=\"$key\"$select_v>$val</option>\n";\r
+                       } else {\r
+                               if(($nullvalue != '') && ($key == '')) {\r
+                                       echo "<option value=\"$key\"$select_v>$val</option>\n";\r
+                               } else {\r
+                                       echo "<option$select_v>$val</option>\n";\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+       \r
+       //---------------------Encrypt Password---------------------------------------------------\r
+       \r
+       function EncryptPsWord($password) {\r
+               mt_srand((double)microtime()*1000000);\r
+               $salt = mhash_keygen_s2k(MHASH_SHA1, $password, substr(pack('h*', md5(mt_rand())), 0, 8), 4);\r
+               $hash = "{BBCSR}".base64_encode(mhash(MHASH_SHA1, $password.$salt).$salt);\r
+               return $hash;\r
+       }\r
+       //---------------------Decrypt Password---------------------------------------------------\r
+       function DecryptPsWord($password, $hash) {\r
+               $hash = base64_decode(substr($hash, 6));\r
+               $original_hash = substr($hash, 0, 20);\r
+               $salt = substr($hash, 20);\r
+               $new_hash = mhash(MHASH_SHA1, $password . $salt);\r
+               if (strcmp($original_hash, $new_hash) == 0){\r
+                       //      ... do something because your password is valid ...\r
+                       /*echo"Bravo.......!!<br>";\r
+                       echo $original_hash."<br>";\r
+                       echo $new_hash;*/\r
+                       return 1;\r
+               }else{\r
+                       //echo 'Unauthorized: Authorization has been refused for the credentials you provided. Please login with a valid username and password.';\r
+                       return 0;\r
+                       //... be sure to clear your session data ... \r
+               }\r
+       }\r
+       //----------------------One more to work with---------------------------------------------\r
+       //--Veuillez m'aider pour améliorer cette fonction--et envoyer à tclyit@gmail.com\r
+       //--------Vos critiques sont bienvenues!!----------------------------------------\r
+       //----------Encrypt----------------------------\r
+       \r
+       function encrptPwd($string, $key) {\r
+               $result = '';\r
+               for($i=0; $i<strlen($string); $i++){\r
+               $char = substr($string, $i, 1);\r
+               $keychar = substr($key, ($i % strlen($key))-1, 1);\r
+               $char = chr(ord($char)+ord($keychar));\r
+               $result.=$char;\r
+               }\r
+               return base64_encode($result);\r
+       }\r
+\r
+       //----------Decrypt----------------------------\r
+       function decrptPwd($string, $key) {\r
+               $result = '';\r
+               $string = base64_decode($string);\r
+               \r
+               for($i=0; $i<strlen($string); $i++){\r
+               $char = substr($string, $i, 1);\r
+               $keychar = substr($key, ($i % strlen($key))-1, 1);\r
+               $char = chr(ord($char)-ord($keychar));\r
+               $result.=$char;\r
+               }\r
+               return $result;\r
+       }\r
+       //--------------Check Mail----------------------\r
+       \r
+       function check_email($email){\r
+  // First, we check that there's one @ symbol, and that the lengths are right\r
+  if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)){\r
+    return false;\r
+  }\r
+  // Split it into sections\r
+  $email_array = explode("@", $email);\r
+  $local_array = explode(".", $email_array[0]);\r
+  for ($i = 0; $i < sizeof($local_array); $i++){\r
+     if (!ereg("^(([A-Za-z0-9!#$%&#038;'*+/=?^_`{|}~-][A-Za-z0-9!#$%&#038;'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])){\r
+      return false;\r
+    }\r
+  }\r
+// Check if domain is IP. If not, it should be valid domain name\r
+  if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])){\r
+    $domain_array = explode(".", $email_array[1]);\r
+    if (sizeof($domain_array) < 2) {\r
+        return false; // Not enough parts to domain\r
+  }\r
+    for ($i = 0; $i < sizeof($domain_array); $i++){\r
+      if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])){\r
+        return false;\r
+      }\r
+    }\r
+  }\r
+  return true;\r
+}\r
+\r
+//----------------------------Change Date Value---------------------------------\r
+       //===========From DD/MM/YYYY to YYYY/MM/DD==================================\r
+    function ChangeDateValueInsert($Date){\r
+       if($Date != ""){\r
+               $DateChange=split('[-]',$Date);\r
+               $Str="$DateChange[2]/$DateChange[1]/$DateChange[0]";\r
+               return $Str;\r
+        }\r
+       }\r
+       //===========From YYYY/MM/DD to DD/MM/YYYY==================================\r
+    function ChangeDateValueSelect($DateSe){\r
+       if($DateSe != ""){\r
+               $DateChangeSe=split('[-]',$DateSe);\r
+               $StrSe="$DateChangeSe[2]/$DateChangeSe[1]/$DateChangeSe[0]";\r
+               return $StrSe;\r
+        }\r
+       }\r
+       //===========From YYYY/MM/DD to DD/MM/YYYY==================================\r
+?>
\ No newline at end of file
diff --git a/paf/includes/functions_utf8.php b/paf/includes/functions_utf8.php
new file mode 100755 (executable)
index 0000000..8f7763c
--- /dev/null
@@ -0,0 +1,221 @@
+<?php\r
+       function format_date($date){\r
+                //$date = array_shift;\r
+       \r
+               if ($date == -1){ return "&nbsp;"; }\r
+       \r
+               $date *= 24 * 3600;\r
+               list($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($date);\r
+               return ( 1900 + $year ) . "-" . ++$mon . "-" . ++$mday;\r
+               //return date('Y-m-d',$date);\r
+       }\r
+       \r
+       //-------Select box------------------------\r
+       \r
+       $Nationalite = array(\r
+    "Cambodgienne"=>"Cambodgienne",\r
+       "Cambodgien"=>"Cambodgien",\r
+       "Belge"=>"Belge",\r
+       "Canadienne"=>"Canadienne",\r
+       "Canadien"=>"Canadien",\r
+       "Chinoise"=>"Chinoise",\r
+       "Chinois"=>"Chinois",\r
+       "Fran&ccedil;aise"=>"Fran&ccedil;aise",\r
+       "Fran&ccedil;ais"=>"Fran&ccedil;ais",\r
+       "Laotienne"=>"Laotienne",\r
+       "Laotien"=>"Laotien",\r
+       "Suisse"=>"Suisse",\r
+       "Vietnamienne"=>"Vietnamienne",\r
+       "Vietnamien"=>"Vietnamien",\r
+       "Malagasy"=>"Malagasy",\r
+       "Autre"=>"Autre");\r
+    \r
+       $Activite = array(\r
+    "??"=>"??",\r
+       "AUF"=>"AUF",\r
+       "Etudiant"=>"Etudiant",\r
+       "Enseignant"=>"Enseignant",\r
+       "Autre"=>"Autre");\r
+    \r
+       $Domaine = array(\r
+    "??"=>"??",\r
+       "Agronomie"=>"Agronomie",\r
+       "Anglais"=>"Anglais",\r
+       "Arch&eacute;ologie"=>"Arch&eacute;ologie",\r
+       "Architecture"=>"Architecture",\r
+       "Biologie"=>"Biologie",\r
+       "Chimie"=>"Chimie",\r
+       "Commerce"=>"Commerce",\r
+       "Droit"=>"Droit",\r
+       "Fran&ccedil;ais"=>"Fran&ccedil;ais",\r
+       "G&eacute;nie Civil"=>"G&eacute;nie Civil",\r
+       "G&eacute;nie Electrique"=>"G&eacute;nie Electrique",\r
+       "G&eacute;nie Industriel"=>"G&eacute;nie Industriel",\r
+       "G&eacute;ographie"=>"G&eacute;ographie",\r
+       "G&eacute;ologie"=>"G&eacute;ologie",\r
+       "Gestion"=>"Gestion",\r
+       "Histoire"=>"Histoire",\r
+       "Hydraulique"=>"Hydraulique",\r
+       "Informatique"=>"Informatique",\r
+       "Ing&eacute;nieur"=>"Ing&eacute;nieur",\r
+       "Litt&eacute;rature"=>"Litt&eacute;rature",\r
+       "Linguistique"=>"Linguistique",\r
+       "Math&eacute;matique"=>"Math&eacute;matique",\r
+       "M&eacute;decine"=>"M&eacute;decine",\r
+       "Odontostomatologie"=>"Odontostomatologie",\r
+       "Pharmacie"=>"Pharmacie",\r
+       "Philosophie"=>"Philosophie",\r
+       "Technicien"=>"Technicien",\r
+       "Touriste"=>"Touriste");\r
+       \r
+       $Etablissement = array(\r
+    "??"=>"??",\r
+       "AUF"=>"AUF",\r
+       "Ecole Royale d'Administration"=>"Ecole Royale d'Administration",\r
+       "Faculty of Business"=>"Faculty of Business",\r
+       "ITC"=>"ITC",\r
+       "Lyc&eacute;e"=>"Lyc&eacute;e",\r
+       "Univ. Royale de Phnom Penh"=>"Univ. Royale de Phnom Penh",\r
+       "Univ. Royale des Beaux-Arts"=>"Univ. Royale des Beaux-Arts",\r
+       "Univ. Royale d'Agronomie"=>"Univ. Royale d'Agronomie",\r
+       "Univ. des Sciences de la Sant&eacute;"=>"Univ. des Sciences de la Sant&eacute;",\r
+       "Univ. de Droit et Siences-Eco"=>"Univ. de Droit et Siences-Eco");\r
+       \r
+    $Groupe = array(\r
+    "Usagers"=>"Usagers",\r
+       "CNF"=>"CNF",\r
+       "Admin"=>"Admin");\r
+       \r
+       //================Array to select box================================================\r
+        function ArrayToSelectBox($arr,$sel = '',$usekey=1,$nullvalue='') {\r
+               while (list( $key, $val ) = each($arr)) {\r
+                       if($sel && $usekey && ($key == $sel || is_array($sel) && in_array($key,$sel))) {\r
+                               $select_v=" selected='selected'";\r
+                       } else if ($sel && !$usekey && ($val == $sel || is_array($sel) && in_array($val,$sel))) {\r
+                               $select_v=" selected='selected'";\r
+                       } else {\r
+                               $select_v='';\r
+                       }\r
+               \r
+                       if($nullvalue != '') {\r
+                               if ($key == $nullvalue) {\r
+                                       $key = '';          \r
+                               }\r
+                       }\r
+               \r
+                       if ($usekey == 1) {\r
+                               echo "<option value=\"$key\"$select_v>$val</option>\n";\r
+                       } else {\r
+                               if(($nullvalue != '') && ($key == '')) {\r
+                                       echo "<option value=\"$key\"$select_v>$val</option>\n";\r
+                               } else {\r
+                                       echo "<option$select_v>$val</option>\n";\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+       \r
+       //---------------------Encrypt Password---------------------------------------------------\r
+       \r
+       function EncryptPsWord($password) {\r
+               mt_srand((double)microtime()*1000000);\r
+               $salt = mhash_keygen_s2k(MHASH_SHA1, $password, substr(pack('h*', md5(mt_rand())), 0, 8), 4);\r
+               $hash = "{BBCSR}".base64_encode(mhash(MHASH_SHA1, $password.$salt).$salt);\r
+               return $hash;\r
+       }\r
+       //---------------------Decrypt Password---------------------------------------------------\r
+       function DecryptPsWord($password, $hash) {\r
+               $hash = base64_decode(substr($hash, 6));\r
+               $original_hash = substr($hash, 0, 20);\r
+               $salt = substr($hash, 20);\r
+               $new_hash = mhash(MHASH_SHA1, $password . $salt);\r
+               if (strcmp($original_hash, $new_hash) == 0){\r
+                       //      ... do something because your password is valid ...\r
+                       /*echo"Bravo.......!!<br>";\r
+                       echo $original_hash."<br>";\r
+                       echo $new_hash;*/\r
+                       return 1;\r
+               }else{\r
+                       //echo 'Unauthorized: Authorization has been refused for the credentials you provided. Please login with a valid username and password.';\r
+                       return 0;\r
+                       //... be sure to clear your session data ... \r
+               }\r
+       }\r
+       //----------------------One more to work with---------------------------------------------\r
+       //--Veuillez m'aider pour améliorer cette fonction--et envoyer à tclyit@gmail.com\r
+       //--------Vos critiques sont bienvenues!!----------------------------------------\r
+       //----------Encrypt----------------------------\r
+       \r
+       function encrptPwd($string, $key) {\r
+               $result = '';\r
+               for($i=0; $i<strlen($string); $i++){\r
+               $char = substr($string, $i, 1);\r
+               $keychar = substr($key, ($i % strlen($key))-1, 1);\r
+               $char = chr(ord($char)+ord($keychar));\r
+               $result.=$char;\r
+               }\r
+               return base64_encode($result);\r
+       }\r
+\r
+       //----------Decrypt----------------------------\r
+       function decrptPwd($string, $key) {\r
+               $result = '';\r
+               $string = base64_decode($string);\r
+               \r
+               for($i=0; $i<strlen($string); $i++){\r
+               $char = substr($string, $i, 1);\r
+               $keychar = substr($key, ($i % strlen($key))-1, 1);\r
+               $char = chr(ord($char)-ord($keychar));\r
+               $result.=$char;\r
+               }\r
+               return $result;\r
+       }\r
+       //--------------Check Mail----------------------\r
+       \r
+       function check_email($email){\r
+  // First, we check that there's one @ symbol, and that the lengths are right\r
+  if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)){\r
+    return false;\r
+  }\r
+  // Split it into sections\r
+  $email_array = explode("@", $email);\r
+  $local_array = explode(".", $email_array[0]);\r
+  for ($i = 0; $i < sizeof($local_array); $i++){\r
+     if (!ereg("^(([A-Za-z0-9!#$%&#038;'*+/=?^_`{|}~-][A-Za-z0-9!#$%&#038;'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])){\r
+      return false;\r
+    }\r
+  }\r
+// Check if domain is IP. If not, it should be valid domain name\r
+  if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])){\r
+    $domain_array = explode(".", $email_array[1]);\r
+    if (sizeof($domain_array) < 2) {\r
+        return false; // Not enough parts to domain\r
+  }\r
+    for ($i = 0; $i < sizeof($domain_array); $i++){\r
+      if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])){\r
+        return false;\r
+      }\r
+    }\r
+  }\r
+  return true;\r
+}\r
+\r
+//----------------------------Change Date Value---------------------------------\r
+       //===========From DD/MM/YYYY to YYYY/MM/DD==================================\r
+    function ChangeDateValueInsert($Date){\r
+       if($Date != ""){\r
+               $DateChange=split('[-]',$Date);\r
+               $Str="$DateChange[2]/$DateChange[1]/$DateChange[0]";\r
+               return $Str;\r
+        }\r
+       }\r
+       //===========From YYYY/MM/DD to DD/MM/YYYY==================================\r
+    function ChangeDateValueSelect($DateSe){\r
+       if($DateSe != ""){\r
+               $DateChangeSe=split('[-]',$DateSe);\r
+               $StrSe="$DateChangeSe[2]/$DateChangeSe[1]/$DateChangeSe[0]";\r
+               return $StrSe;\r
+        }\r
+       }\r
+       //===========From YYYY/MM/DD to DD/MM/YYYY==================================\r
+?>
\ No newline at end of file
diff --git a/paf/includes/redirect.php b/paf/includes/redirect.php
new file mode 100755 (executable)
index 0000000..92c7f92
--- /dev/null
@@ -0,0 +1,5 @@
+<?php\r
+       function redirect($url){\r
+               die('<meta http-equiv="refresh" content="0; URL='.$url.'">');\r
+       }\r
+?>
\ No newline at end of file
diff --git a/paf/includes/styles/style.css b/paf/includes/styles/style.css
new file mode 100755 (executable)
index 0000000..5a41492
--- /dev/null
@@ -0,0 +1,46 @@
+@charset "utf-8";\r
+/* CSS Document */\r
+\r
+<!--\r
+body {\r
+       font: 100% Verdana, Arial, Helvetica, sans-serif;\r
+       background: #666666;\r
+       margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */\r
+       padding: 0;\r
+       text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */\r
+       color: #000000;\r
+}\r
+.oneColLiqCtrHdr #container {\r
+       font:Verdana, Geneva, sans-serif;\r
+       font-size:12px;\r
+       width: 80%;  /* this will create a container 80% of the browser width */\r
+       background: #FFFFFF;\r
+       margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */\r
+       border: 1px solid #000000;\r
+       text-align: left; /* this overrides the text-align: center on the body element. */\r
+}\r
+.oneColLiqCtrHdr #header {\r
+       background: #DDDDDD; \r
+       padding: 0 0px 0 0px;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */\r
+}\r
+.oneColLiqCtrHdr #header h1 {\r
+       margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */\r
+       padding: 0px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */\r
+}\r
+.oneColLiqCtrHdr #searchContent {\r
+       padding: 0 0px;\r
+       text-align: right;\r
+}\r
+.oneColLiqCtrHdr #mainContent {\r
+       padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */\r
+       background: #FFFFFF;\r
+}\r
+.oneColLiqCtrHdr #footer { \r
+       padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */\r
+       background:#DDDDDD;\r
+} \r
+.oneColLiqCtrHdr #footer p {\r
+       margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */\r
+       padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */\r
+}\r
+-->
\ No newline at end of file
diff --git a/paf/includes/tclyit_cam_pc.php b/paf/includes/tclyit_cam_pc.php
new file mode 100755 (executable)
index 0000000..61d2264
--- /dev/null
@@ -0,0 +1,69 @@
+<?php\r
+//--Veuillez m'aider pour améliorer cette fonction--et envoyer à tclyit@gmail.com\r
+//--------Vos critiques sont bienvenues!!----------------------------------------\r
+//----------Encrypt----------------------------\r
+\r
+function tcly($string, $key) {\r
+$result = '';\r
+for($i=0; $i<strlen($string); $i++){\r
+$char = substr($string, $i, 1);\r
+$keychar = substr($key, ($i % strlen($key))-1, 1);\r
+$char = chr(ord($char)+ord($keychar));\r
+$result.=$char;\r
+}\r
+return base64_encode($result);\r
+}\r
+\r
+/*$key1 = "Chhunly";\r
+$Se = "1@2!3#^&%()-_+=[{}}|\;:,.Chhunly";\r
+$See = encrypt($Se,$key1);\r
+echo "Encrypt: ".$See."<br /><br />";*/\r
+\r
+//----------Decrypt----------------------------\r
+function bbcsr($string, $key) {\r
+$result = '';\r
+$string = base64_decode($string);\r
+\r
+for($i=0; $i<strlen($string); $i++){\r
+$char = substr($string, $i, 1);\r
+$keychar = substr($key, ($i % strlen($key))-1, 1);\r
+$char = chr(ord($char)-ord($keychar));\r
+$result.=$char;\r
+}\r
+return $result;\r
+}\r
+/*$key2 = "Chhunly";\r
+$Sd = "n4OaiaiRyp91kIqZy5CrnuPl8urItIqUj6/UzeOx1OE=";\r
+$Sdd = decrypt($Sd,$key2);\r
+echo "Decrypt: ".$Sdd;*/\r
+\r
+//------------Valider Email Addresse--------------------------------\r
+\r
+function check_emails($email){\r
+  // First, we check that there's one @ symbol, and that the lengths are right\r
+  if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)){\r
+    return false;\r
+  }\r
+  // Split it into sections\r
+  $email_array = explode("@", $email);\r
+  $local_array = explode(".", $email_array[0]);\r
+  for ($i = 0; $i < sizeof($local_array); $i++){\r
+     if (!ereg("^(([A-Za-z0-9!#$%&#038;'*+/=?^_`{|}~-][A-Za-z0-9!#$%&#038;'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])){\r
+      return false;\r
+    }\r
+  }\r
+// Check if domain is IP. If not, it should be valid domain name\r
+  if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])){\r
+    $domain_array = explode(".", $email_array[1]);\r
+    if (sizeof($domain_array) < 2) {\r
+        return false; // Not enough parts to domain\r
+  }\r
+    for ($i = 0; $i < sizeof($domain_array); $i++){\r
+      if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])){\r
+        return false;\r
+      }\r
+    }\r
+  }\r
+  return true;\r
+}\r
+?>
\ No newline at end of file
diff --git a/paf/index.php b/paf/index.php
new file mode 100755 (executable)
index 0000000..1c8258b
--- /dev/null
@@ -0,0 +1,242 @@
+<?php\r
+       error_reporting (E_ALL & ~E_NOTICE & ~E_DEPRECATED);\r
+       session_start();\r
+       $admin=$_SESSION["adminAUFPPKH"];\r
+       $UserName=$_SESSION["UserNamePAF"];\r
+       $Password=$_SESSION["PasswordPAF"];\r
+       include("includes/redirect.php");\r
+       if($_GET['actlogin'] == "logout"){\r
+               unset($_SESSION["loginAUFKH"]);\r
+               unset($_SESSION["adminAUFPPKH"]);\r
+               unset($_SESSION["UserNamePAF"]);\r
+               unset($_SESSION["PasswordPAF"]);\r
+               echo "<center>Vous avez d&eacute;connect&eacute; ... ";\r
+               redirect("index.php");\r
+               //echo "<meta http-equiv=\"Refresh\" content=\"0;url=$HTTP_SERVER_VARS[PHP_SELF]\">";\r
+    }\r
+       \r
+?>\r
+<?php \r
+       //header("Content-type: text/html; charset=iso-8859-15");\r
+?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+<title>P A F -- AUF Phnom Penh, Cambodge</title>\r
+<link rel="shortcut icon" type="image/ico" href="images/paf.ico" />\r
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+<link href="includes/styles/style.css" rel="stylesheet" type="text/css" />\r
+</head>\r
+<?php\r
+       include("includes/connection.php");\r
+       include("includes/functions.php");\r
+       if($_REQUEST["ID"] !=""){\r
+               $IDS = $_REQUEST["ID"];\r
+               //-----------Tirer les inforamtions après sauvegarder---------\r
+               $Strs = "Select id, nom, prenom, datedenaissance, motdepasse, id from tblinscrit where id=".$IDS."";\r
+               $Rows = mysql_fetch_row(mysql_query($Strs)) or die("Erreur de tirer les informations.");\r
+       }\r
+       $kompler = "{%#bb^csr%#}";\r
+       //----------------Sauvegarder les informations-------------------------------\r
+       if(($_REQUEST["page"]=="login")&&($_REQUEST["cmdSave"])){\r
+               include("includes/tclyit_cam_pc.php");\r
+               /*$txtMDP = $_REQUEST["txtMotdepasse"]; echo $txtMDP;\r
+               $txtMDPC = $_REQUEST["txtMotdepasseconfirmer"]; echo $txtMDPC;*/\r
+               if($_REQUEST["txtNom"]==""){\r
+                       $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if(($_REQUEST["selJour"]=="")||($_REQUEST["selMois"]=="")||($_REQUEST["selAnnee"]=="")){\r
+                               $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe confirm&eacute;.'>";\r
+                       }\r
+               }elseif($_REQUEST["txtPrenom"]==""){\r
+                       $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r
+                       }\r
+                       if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="ann&eacute;e")){\r
+                               $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe confirm&eacute;.'>";\r
+                       }\r
+               }elseif(($_REQUEST["selJour"]=="")||($_REQUEST["selMois"]=="")||($_REQUEST["selAnnee"]=="")){\r
+                       $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe confirm&eacute;.'>";\r
+                       }\r
+               }elseif($_REQUEST["txtMotdepasse"] != $_REQUEST["txtMotdepasseconfirmer"]){\r
+                               $ErrorMotPasse = "<img src='./images/error.png' title='Votre mot de passe confirm&eacute; n`est pas correct.'>";\r
+               }elseif($_REQUEST["txtMotdepasse"]==""){\r
+                       $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="ann&eacute;e")){\r
+                               $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       }\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre .'>";\r
+                       }\r
+               }elseif($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                       $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe confirm&eacute;.'>";\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       }\r
+                       if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="ann&eacute;e")){\r
+                               $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       }\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r
+                       }\r
+               }else{\r
+                       //----------Sauvegarder les informations ---------------\r
+                       $DOB = $_REQUEST["selAnnee"]."-".$_REQUEST["selMois"]."-".$_REQUEST["selJour"];\r
+                       //-----------Comparer les infos avant saugarder-----------------\r
+                       $StrC = mysql_query("Select * from tblinscrit where nom='".str_replace("'","`",$_REQUEST["txtNom"])."' and prenom='".str_replace("'","`",$_REQUEST["txtPrenom"])."' and datedenaissance='".$DOB."'");\r
+                       $CountRec = mysql_num_rows($StrC);\r
+                       if($CountRec == "0"){\r
+                               $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
+                               @mysql_query($Str) or die("Veuillez contacter l'administrateur. On ne peut pas sauvgarder ces informations (log in).");\r
+                               $ID = mysql_insert_id();\r
+                               redirect("$PHP_SELF?page=login&ID=$ID");\r
+                       }else{\r
+                               $ErrorSave = "<span style='background-color:#F00; color:#FFFFFF;'><strong>Pardon, ces informations existent d&eacute;j&agrave;.</strong></span>";\r
+                       }\r
+               }\r
+       }\r
+       \r
+       //-------------------------------XXXXXXXXXX-------Search--------XXXXXXXXXX------------------\r
+       if($_REQUEST["cmdSearch"] && $_REQUEST["txtSearch"]!=""){\r
+               $StrSearch = $_REQUEST["txtSearch"];\r
+               redirect("index_search.php?str_sch=$StrSearch");\r
+       }\r
+       \r
+       //=========================xxxxxxxxxxxxxxxxxxxxxxxxxxxxx==============================\r
+       //-----------------------Accer le PAF par le compte cr&eacute;&eacute;------------------------------\r
+       if($_REQUEST["cmdLogin"]){\r
+               if($_REQUEST['txtUserName'] <> "" && $_REQUEST['txtPassword'] <> "") {\r
+                               include("includes/connection.php");\r
+                               $Scq=mysql_query("select * from tblinscrit");\r
+                               $Scount = mysql_num_rows($Scq); //echo"Ha..ha..".$Scount;\r
+                               if($Scount == 0){\r
+                                       redirect("index.php");\r
+                               }else{\r
+                                       //$txtPWD = decrptPwd($_SERVER['PHP_AUTH_PW'],$kompler);\r
+                                       $Query=mysql_query("Select * from tblinscrit where id = '".substr($_REQUEST["txtUserName"],1)."' and motdepasse = '".encrptPwd(strtolower($_REQUEST['txtPassword']),$kompler)."'");\r
+                                       $Col=mysql_fetch_row($Query);\r
+                                       if($Col[0] <> ""){\r
+                                               $_SESSION["adminAUFPPKH"]="y";\r
+                                               $_SESSION["UserNamePAF"]=$_REQUEST['txtUserName'];\r
+                                               $_SESSION["PasswordPAF"]=$_REQUEST['txtPassword'];\r
+                                               $St = "Insert into tblaccountaccess (username,accesstime) values('".$_REQUEST['txtUserName']."',CURRENT_TIMESTAMP)";\r
+                                               @mysql_query($St) or die("2");\r
+                                               redirect("index_main.php");\r
+                                               echo "<center>Vous êtes connect&eacute; ... ";\r
+                                               echo "[<a href='" . $_SERVER['PHP_SELF'] . "?actlogin=logout'>D&eacute;connexion</a>]</center>";\r
+                                       }else{\r
+                                               unset($_SESSION["loginAUFKH"]);\r
+                                               unset($_SESSION["adminAUFPPKH"]);\r
+                                               unset($_SESSION["UserNamePAF"]);\r
+                                               unset($_SESSION["PasswordPAF"]);\r
+                                               $Message = "0";\r
+                                               redirect("index.php?msg=$Message");\r
+                                               //echo "<meta http-equiv=\"Refresh\" content=\"0;url=$HTTP_SERVER_VARS[PHP_SELF]\">";\r
+                                       }\r
+                               }\r
+                 }else{\r
+                       unset($_SESSION["loginAUFKH"]);\r
+                       unset($_SESSION["adminAUFPPKH"]);\r
+                       unset($_SESSION["UserNamePAF"]);\r
+                       unset($_SESSION["PasswordPAF"]);\r
+                       echo "<meta http-equiv=\"Refresh\" content=\"0;url=$HTTP_SERVER_VARS[PHP_SELF]\">";\r
+                       $Message = "<font style='color:#F00F00;'>Connexion &eacute;chou&eacute;e....</font>";\r
+                 }\r
+       }\r
+               \r
+       //--------------Tirer information de Session----------------------------\r
+       if($_REQUEST["ID"] =="" && $_SESSION["UserNamePAF"] !=""){\r
+               $St = "Select id, nom, prenom from tblinscrit where id=".substr($UserName,1);\r
+               $Rows = mysql_fetch_row(mysql_query($St)) or die("Contactez votre administrateur...(&eacute;rreur: select session id)");\r
+               $Deconnexion = "<a href='index.php?actlogin=logout' title='d&eacute;connexion'>D&eacute;connexion</a>";\r
+       }\r
+?>\r
+<body class="oneColLiqCtrHdr">\r
+<form name="PAF" method="post" enctype="application/x-www-form-urlencoded">\r
+<div id="container">\r
+  <div id="header">\r
+       <table width="100%" cellpadding="0" cellspacing="0">\r
+       <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
+               <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
+                       <td width="41%" valign="bottom" align="right" style="padding-bottom:15px; padding-right:10px;">\r
+                               <?php echo $Rows['1']." ".$Rows['2']; ?> &nbsp; <?php echo $Deconnexion; ?></td>\r
+        </tr>\r
+    </table>\r
+  <!-- end #header --></div>\r
+  <div id="searchContent">\r
+       <table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;" width="100%" align="right">\r
+       <tr><td width="94%" align="right"><!--Hyperlines g&eacute;n&eacute;raux en tête--------------->\r
+                               <?php if (($_SESSION["UserNamePAF"] !="")&&($_REQUEST["page"] =="login")){ ?>\r
+                                       <a href="index.php" title="Accueil">Accueil</a> > <a href="index_main.php" title="cr&eacute;er vos informations d&eacute;tailles">Cr&eacute;er infos</a> > Cr&eacute;er login\r
+                               <?php }elseif (($_SESSION["UserNamePAF"] =="") &&($_REQUEST["page"]=="")){ ?>\r
+                                       Accueil > <a href="index_main.php" title="cr&eacute;er vos informations d&eacute;tailles">Cr&eacute;er infos</a>\r
+                <?php }elseif(($_SESSION["UserNamePAF"]!="")&&($_REQUEST["page"]=="")){ ?>\r
+                       Accueil > <a href="index_main.php" title="modifier vos informations d&eacute;tailles">Modifier infos</a>\r
+                               <?php }elseif ($_REQUEST["page"] =="login"){ ?>\r
+                                       <a href="index.php" title="Accueil">Accueil</a> > Cr&eacute;er login\r
+                               <?php }elseif(($_SESSION["UserNamePAF"] !="")&&($_REQUEST["page"]=="liste_infos")){ ?>\r
+                       <a href="index.php" title="Accueil">Accueil</a> > <a href="index_main.php" title="modifier vos informations d&eacute;tailles">Modifier infos</a> > Liste des informations\r
+                <?php } ?>\r
+                               &nbsp;&nbsp;&nbsp; Rechercher : <input type="text" name="txtSearch" value="<?php echo $_REQUEST["txtSearch"]; ?>" />\r
+                       </td>\r
+            <td width="6%" align="left"><input type="submit" name="cmdSearch" value="OK" /></td>\r
+        </tr>\r
+    </table>\r
+  </div>\r
+  <div id="mainContent">\r
+    <?php\r
+               if($_REQUEST["page"]==""){\r
+               include("forms/home.php");\r
+               }elseif($_REQUEST["page"]=="login"){\r
+                       include("forms/login.php");\r
+               }elseif($_REQUEST["page"]=="liste_infos"){\r
+                       include("forms/liste_infos.php");\r
+               }\r
+       ?>\r
+       <!-- end #mainContent --></div>\r
+  <div id="footer">\r
+       <table cellpadding="0" cellspacing="0" border="0" height="40" width="100%">\r
+       <tr><td width="80%">Agence Universitaire de la Francophonie -- Antenne de Phnom Penh, Cambodge</td>\r
+               <td width="20%" align="center"><!--Administrateur--></td>\r
+        </tr>\r
+    </table>\r
+  <!-- end #footer --></div>\r
+<!-- end #container --></div>\r
+</form>\r
+</body>\r
+</html>\r
diff --git a/paf/index_main.php b/paf/index_main.php
new file mode 100755 (executable)
index 0000000..6de1746
--- /dev/null
@@ -0,0 +1,163 @@
+<?php\r
+       error_reporting (E_ALL & ~E_NOTICE & ~E_DEPRECATED); \r
+       //------pour &eacute;viter les notices sur les variables---------------\r
+       session_start();\r
+       $admin=$_SESSION["adminAUFPPKH"];\r
+       $UserName=$_SESSION["UserNamePAF"];\r
+       $Password=$_SESSION["PasswordPAF"];\r
+       include("includes/redirect.php");\r
+       if(!($admin == "y")){\r
+       redirect("index.php");\r
+    }\r
+       \r
+?>\r
+<?php \r
+       //header("Content-type: text/html; charset=iso-8859-15");\r
+?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+<title>P A F -- AUF Phnom Penh, Cambodge</title>\r
+<link rel="shortcut icon" type="image/ico" href="images/paf.ico" />\r
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+<link href="includes/styles/style.css" rel="stylesheet" type="text/css" />\r
+</head>\r
+<?php\r
+       include("includes/connection.php");\r
+       include("includes/functions_utf8.php");\r
+       $kompler = "{%#bb^csr%#}";\r
+       //----------------Sauvegarder les informations-------------------------------\r
+       if($_REQUEST["cmdSave"]){\r
+               include("includes/tclyit_cam_pc.php");\r
+               /*$txtMDP = $_REQUEST["txtMotdepasse"]; echo $txtMDP;\r
+               $txtMDPC = $_REQUEST["txtMotdepasseconfirmer"]; echo $txtMDPC;*/\r
+               if($_REQUEST["txtNom"]==""){\r
+                       $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if($_REQUEST["Sexe"]==""){\r
+                               $ErrorSexe = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if(($_REQUEST["selJour"]=="")||($_REQUEST["selMois"]=="")||($_REQUEST["selAnnee"]=="")){\r
+                               $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       }\r
+                       if($_REQUEST["selPromotion"]==""){\r
+                               $ErrorPRO = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       }\r
+                       $MsgError = "Erreur, vos informations n'ont pas mis  jour.";\r
+               }elseif($_REQUEST["txtPrenom"]==""){\r
+                       $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if($_REQUEST["Sexe"]==""){\r
+                               $ErrorSexe = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if(($_REQUEST["selJour"]=="")||($_REQUEST["selMois"]=="")||($_REQUEST["selAnnee"]=="")){\r
+                               $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       }\r
+                       if($_REQUEST["selPromotion"]==""){\r
+                               $ErrorPRO = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       }\r
+                       $MsgError = "Erreur, vos informations n'ont pas mis  jour.";\r
+               }elseif($_REQUEST["Sexe"]==""){\r
+                       $ErrorSexe = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r
+                       }\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if(($_REQUEST["selJour"]=="")||($_REQUEST["selMois"]=="")||($_REQUEST["selAnnee"]=="")){\r
+                               $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       }\r
+                       if($_REQUEST["selPromotion"]==""){\r
+                               $ErrorPRO = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       }\r
+                       $MsgError = "Erreur, vos informations n'ont pas mis  jour.";\r
+               }elseif(($_REQUEST["selJour"]=="")||($_REQUEST["selMois"]=="")||($_REQUEST["selAnnee"]=="")){\r
+                       $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPrenom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if($_REQUEST["Sexe"]==""){\r
+                               $ErrorSexe = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if($_REQUEST["selPromotion"]==""){\r
+                               $ErrorPRO = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       }\r
+                       $MsgError = "Erreur, vos informations n'ont pas mis  jour.";\r
+               }elseif((check_email($_REQUEST["txtMail"])==false)&&($_REQUEST["txtMail"]!="")){\r
+                       $ErrorMail = "<img src='./images/error.png' title='Veuillez v&eacute;rifier votre mail.'>";\r
+                       $MsgError = "Erreur, vos informations n'ont pas mis  jour.";\r
+               }else{\r
+                       //----------Sauvegarder les informations ---------------\r
+                       $DOB = $_REQUEST["selAnnee"]."-".$_REQUEST["selMois"]."-".$_REQUEST["selJour"];\r
+                       $Str = "Update tblinscrit Set nom='".str_replace("'","`",$_REQUEST["txtNom"])."', prenom='".str_replace("'","`",$_REQUEST["txtPrenom"])."', sexe='".$_REQUEST["Sexe"]."', datedenaissance='".$DOB."', nationalite='".str_replace("'","`",$_REQUEST["Nationalite"])."', universite='".str_replace("'","`",$_REQUEST["Etablissement"])."', faculte='".str_replace("'","`",$_REQUEST["Domaine"])."', promotion='".$_REQUEST["selPromotion"]."', anneediplome='".$_REQUEST["selAnneeDiplome"]."', delf='".str_replace("'","`",$_REQUEST["selDelf"])."', anneedelf='".$_REQUEST["selAnneeDelf"]."', langueautre='".str_replace("'","`",$_REQUEST["txtLangue"])."', email='".str_replace("'","`",$_REQUEST["txtMail"])."', telephonepersonnelle='".str_replace("'","`",$_REQUEST["txtTelephonepersonnel"])."', adressepersonnelle='".str_replace("'","`",$_REQUEST["txtAdressepersonnelle"])."', telephoneparents='".str_replace("'","`",$_REQUEST["txtTelephoneparents"])."', adresseparents='".str_replace("'","`",$_REQUEST["txtAdresseparents"])."', titretravail='".str_replace("'","`",$_REQUEST["txtTitretravail"])."', adressetravail='".str_replace("'","`",$_REQUEST["txtAdresseTravail"])."', divers='".str_replace("'","`",$_REQUEST["txtDivers"])."', datein='".date("Y-m-d")."' Where id=".substr($UserName,1);\r
+                       mysql_query($Str) or die("<br /><br /><span style='background-color:#F00F00; color:#FFFFFF;'>Veuillez contacter l'administrateur. On ne peut pas sauvgarder ces informations (info d&eacute;taille).</span>");\r
+                       $Msg = "Vos informatios ont mis &agrave; jour.";\r
+                       //redirect("$PHP_SELF?page=login&ID=$ID");\r
+               }\r
+       }\r
+       \r
+       //-------------------------------XXXXXXXXXX-------Search--------XXXXXXXXXX------------------\r
+       if($_REQUEST["cmdSearch"]){\r
+               $StrSearch = $_REQUEST["txtSearch"];\r
+               redirect("index_search.php?str_sch=$StrSearch");\r
+       }\r
+       //--------------Tirer information de Session----------------------------\r
+       if($_SESSION["UserNamePAF"] !=""){\r
+               $IDEtudiant = substr($UserName,1);\r
+               $St = "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 id=".substr($UserName,1);\r
+               $Rows = mysql_fetch_row(mysql_query($St)) or die("Contactez votre administrateur...(&eacute;rreur: select session id)");\r
+               $Deconnexion = "<a href='index.php?actlogin=logout' title='d&eacute;connexion'>D&eacute;connexion</a>";\r
+       }\r
+?>\r
+<body class="oneColLiqCtrHdr">\r
+<form name="PAF" method="post" enctype="application/x-www-form-urlencoded">\r
+<div id="container">\r
+  <div id="header">\r
+       <table width="100%" cellpadding="0" cellspacing="0"  border="0">\r
+       <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
+               <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
+                       <td width="41%" valign="bottom" align="right" style="padding-bottom:15px; padding-right:10px;">\r
+                               <?php echo $Rows['1']." ".$Rows['2']; ?> &nbsp; <?php echo $Deconnexion; ?></td>\r
+        </tr>\r
+    </table>\r
+  <!-- end #header --></div>\r
+  <div id="searchContent">\r
+       <table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;" width="100%" align="right">\r
+       <tr><td width="94%" align="right">\r
+                               <a href="index.php" title="Accueil">Accueil</a>&nbsp; > Cr&eacute;er infos\r
+                               &nbsp;&nbsp;&nbsp; Rechercher : <input type="text" name="txtSearch" value="<?php echo $_REQUEST["txtSearch"]; ?>" />\r
+                       </td>\r
+          <td width="6%" align="left"><input type="submit" name="cmdSearch" value="Go" /></td>\r
+        </tr>\r
+    </table>\r
+  </div>\r
+  <div id="mainContent">\r
+    <?php\r
+               if($_REQUEST["page"]==""){\r
+               include("forms/creer_infos.php");\r
+               }elseif($_REQUEST["page"]=="login"){\r
+                       include("forms/creer_infos.php");\r
+               }elseif($_REQUEST["page"]=="login_f"){\r
+                       include("forms/login_success.php");\r
+               }\r
+       ?>\r
+       <!-- end #mainContent --></div>\r
+  <div id="footer">\r
+       <table cellpadding="0" cellspacing="0" border="0" height="40" width="100%">\r
+       <tr><td width="80%">Agence Universitaire de la Francophonie -- Antenne de Phnom Penh, Cambodge</td>\r
+               <td width="20%" align="center"><!--Administrateur--></td>\r
+        </tr>\r
+    </table>\r
+  <!-- end #footer --></div>\r
+<!-- end #container --></div>\r
+</form>\r
+</body>\r
+</html>\r
diff --git a/paf/index_mdpo.php b/paf/index_mdpo.php
new file mode 100755 (executable)
index 0000000..66b1948
--- /dev/null
@@ -0,0 +1,123 @@
+<?php\r
+       error_reporting (E_ALL & ~E_NOTICE & ~E_DEPRECATED);\r
+       session_start();\r
+       $admin=$_SESSION["adminAUFPPKH"];\r
+       $UserName=$_SESSION["UserNamePAF"];\r
+       $Password=$_SESSION["PasswordPAF"];\r
+       \r
+?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+<title>P A F -- AUF Phnom Penh, Cambodge</title>\r
+<link rel="shortcut icon" type="image/ico" href="images/paf.ico" />\r
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+<link href="includes/styles/style.css" rel="stylesheet" type="text/css" />\r
+</head>\r
+<?php\r
+       include("includes/connection.php");\r
+       include("includes/functions.php");\r
+       include("includes/redirect.php");\r
+       $kompler = "{%#bb^csr%#}";\r
+       //----------------Sauvegarder les informations-------------------------------\r
+       if($_REQUEST["cmdSend"]){\r
+               if($_REQUEST["txtMail"]==""){\r
+                       $ErrorMail = "<img src='./images/error.png' title='Veuillez saisire votre adresse de courriel.'>";\r
+                       $MsgErrors = "<span style='background-color:#F00F00; color:#FFFFFF;'>Erreur, votre mot de passe n'a pas envoy&eacute;.</span>";\r
+               }elseif(check_email($_REQUEST["txtMail"])==false){\r
+                       $ErrorMail = "<img src='./images/error.png' title='Veuillez v&eacute;rifier votre mail.'>";\r
+                       $MsgErrors = "<span style='background-color:#F00; color:#FFFFFF;'>Erreur, votre mot de passe n'a pas envoy&eacute;.</span>";\r
+               }else{\r
+                       //----------tirer le mot de passe et login----------\r
+                       $Strs = "Select login, motdepasse, id from tblinscrit where email='".$_REQUEST["txtMail"]."'";\r
+                       $Row = mysql_fetch_row(mysql_query($Strs));\r
+                       if(mysql_num_rows(mysql_query($Strs))>0){\r
+                               //----------Envoyer les informations ---------------\r
+                               $Subject = "PAF : Mot de passe oubli&eacute;";\r
+                               $Today = date("Y-m-d");\r
+                               $Time = date("Y-m-d H:i:s",time());\r
+                               $Body = "<html><head><title></title></head><body>\r
+                                       <table width=\"584\" border=\"0\" cellpadding=\"0\" cellspacing=\"6\">\r
+                                       <tr>\r
+                                          <td colspan=\"2\" align=\"right\" style=\"padding-right:20px; padding-bottom:10px;\">Date : ".$Time."</td>\r
+                                 </tr>\r
+                                 <tr bgcolor=\"#E2F080\">\r
+                                          <td colspan=\"2\">Suject : Mot de passe oubli&eacute;</td>\r
+                                  </tr>\r
+                                  <tr>\r
+                                          <td width=\"30%\">Login : </td>\r
+                                          <td width=\"70%\">".$Row['0'].$Row['2']."</td>\r
+                                 </tr>\r
+                                        <tr>\r
+                                          <td>Mot de passe : </td>\r
+                                          <td>".decrptPwd($Row['1'],$kompler)."</td>\r
+                                        </tr>\r
+                                        <tr><td colspan=\"5\"><hr size=\"1\"></td></tr>\r
+                               </table>\r
+                               </body>\r
+                               </html>";\r
+                               $headers  = 'MIME-Version: 1.0' . "\r\n";\r
+                               $headers .= 'Content-type: text/html; charset=iso-8859-15;' . "\r\n";\r
+                               //------------to sender-----------------------------------------\r
+                               $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
+                               $headerss .= "Content-type: text/html; charset=iso-8859-1\r\n";\r
+                               $headerss .= "From: PAF\r\n".\r
+                                       "Reply-To:" . "\r\n" .\r
+                                       "X-Mailer: PHP/" . phpversion();\r
+                               $MailAddressReply = $_REQUEST["txtMail"];\r
+                               $SubjectReply="Cordialement";\r
+                               $BodyReply=$Body."<br />Merci beaucoup pour votre intérêt.";\r
+                               //echo $MailAddressReply."<br>".$SubjectReply."<br>".$BodyReply." ".$Footer,$headerss;\r
+                               //----------Mail infos to mail address---------------------------------\r
+                               //@mail($MailAddressReply,$SubjectReply,$BodyReply." ".$Footer,$headerss) or die("On ne peut pas envoyer à cet adresse de courriel.");\r
+                               $MsgErrors = "<span style='background-color:#000FFF; color:#FFFFFF;'>Votre mot de passe a &eacute;t&eacute; envoy&eacute; &agrave; votre mail.</span>";\r
+                       }else{\r
+                               $MsgErrors = "<span style='background-color:#F00; color:#FFFFFF;'>Erreur, votre adresse de courriel n'est pas correct.</span>";\r
+                       }\r
+               }\r
+       }\r
+       \r
+       //-------------------------------XXXXXXXXXX-------Search-------XXXXXXXXXX------------------\r
+       if($_REQUEST["cmdSearch"]){\r
+               $StrSearch = $_REQUEST["txtSearch"];\r
+               redirect("index_search.php?str_sch=$StrSearch");\r
+       }\r
+?>\r
+<body class="oneColLiqCtrHdr">\r
+<form name="PAF" method="post" enctype="application/x-www-form-urlencoded">\r
+<div id="container">\r
+  <div id="header">\r
+       <table width="100%" cellpadding="0" cellspacing="0">\r
+       <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
+               <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
+                       <td width="41%" valign="bottom" align="right" style="padding-bottom:15px; padding-right:10px;"></td>\r
+        </tr>\r
+    </table>\r
+  <!-- end #header --></div>\r
+  <div id="searchContent">\r
+       <table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;" width="100%" align="right">\r
+       <tr><td width="94%" align="right"><!--Hyperlines g&eacute;n&eacute;raux en tête--------------->\r
+                                       <a href="index.php" title="Accueil">Accueil</a> > Mot de passe oubli&eacute;\r
+                               &nbsp;&nbsp;&nbsp; Rechercher : <input type="text" name="txtSearch" value="<?php echo $StrSearch; ?>" />\r
+                       </td>\r
+            <td width="6%" align="left"><input type="submit" name="cmdSearch" value="OK" /></td>\r
+        </tr>\r
+    </table>\r
+  </div>\r
+  <div id="mainContent">\r
+    <?php\r
+       include("forms/mdp_oublie.php");\r
+       ?>\r
+    <!-- end #mainContent -->\r
+  </div>\r
+  <div id="footer">\r
+       <table cellpadding="0" cellspacing="0" border="0" height="40" width="100%">\r
+       <tr><td width="80%">Agence Universitaire de la Francophonie -- Antenne de Phnom Penh, Cambodge</td>\r
+               <td width="20%" align="center">Administrateur</td>\r
+        </tr>\r
+    </table>\r
+  <!-- end #footer --></div>\r
+<!-- end #container --></div>\r
+</form>\r
+</body>\r
+</html>\r
diff --git a/paf/index_pwd.php b/paf/index_pwd.php
new file mode 100755 (executable)
index 0000000..7ca7f6c
--- /dev/null
@@ -0,0 +1,83 @@
+<?php\r
+       error_reporting (E_ALL ^ E_NOTICE); //------pour &eacute;viter les notices sur les variables---------------\r
+       session_start();\r
+       $admin=$_SESSION["adminAUFPPKH"];\r
+       $UserName=$_SESSION["UserNamePAF"];\r
+       $Password=$_SESSION["PasswordPAF"];\r
+       include("includes/redirect.php");\r
+       if(!($admin == "y")){\r
+       redirect("index.php");\r
+    }\r
+       \r
+?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+<title>P A F -- AUF Phnom Penh, Cambodge</title>\r
+<link rel="shortcut icon" type="image/ico" href="images/paf.ico" />\r
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+<link href="includes/styles/style.css" rel="stylesheet" type="text/css" />\r
+</head>\r
+<?php\r
+       include("includes/connection.php");\r
+       include("includes/functions.php");\r
+       $kompler = "{%#bb^csr%#}";\r
+       //----------------Sauvegarder les informations-------------------------------\r
+       if($_REQUEST["cmdSave"]){\r
+               include("includes/tclyit_cam_pc.php");\r
+               /*$txtMDP = $_REQUEST["txtMotdepasse"]; echo $txtMDP;\r
+               $txtMDPC = $_REQUEST["txtMotdepasseconfirmer"]; echo $txtMDPC;*/\r
+               if($_REQUEST["txtMotdepasse"] != $_REQUEST["txtMotdepasseconfirmer"]){\r
+                               $ErrorMotPasse = "<img src='images/error.png' title='Votre mot de passe confirm&eacute; n`est pas correct.'>";\r
+               }elseif($_REQUEST["txtMotdepasse"]==""){\r
+                       $ErrorMDP = "<img src='images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<img src='images/error.png' title='Veuillez saisire votre mot de passe confirm&eacute;.'>";\r
+                       }\r
+               }elseif($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                       $ErrorMDPC = "<img src='images/error.png' title='Veuillez saisire votre mot de passe confirm&eacute;.'>";\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<img src='images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       }\r
+               }else{\r
+                       //----------Sauvegarder les informations ---------------\r
+                       $Str = "Update tblinscrit set motdepasse='".encrptPwd(strtolower($_REQUEST["txtMotdepasse"]),$kompler)."' Where id=".substr($_SESSION["UserNamePAF"],1);\r
+                       @mysql_query($Str) or die("Veuillez contacter l'administrateur. On ne peut pas sauvgarder ces informations (modifier mot de passe).");\r
+                       exit;\r
+               }\r
+       }\r
+?>\r
+<body class="oneColLiqCtrHdr">\r
+<form name="PAF" method="post" enctype="application/x-www-form-urlencoded">\r
+<div id="container">\r
+  <div id="header">\r
+       <table width="100%" cellpadding="0" cellspacing="0">\r
+       <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
+               <td width="39%" align="right"><h1 class="oneColLiqCtrHdr">P A F</h1></td>\r
+                       <td width="41%" valign="bottom" align="right" style="padding-bottom:15px; padding-right:10px;">\r
+                               <?php echo $Rows['1']." ".$Rows['2']; ?> &nbsp; <?php echo $Deconnexion; ?></td>\r
+        </tr>\r
+    </table>\r
+  <!-- end #header --></div>\r
+  <div id="mainContent">\r
+   <table width="100%" cellpadding="3" cellspacing="3" border="0" style="border-collapse:collapse;">\r
+               <tr><td colspan="2"><h2>Modifier vote mot de passe</h2></td>\r
+       <tr><td width="26%">Nouveau mot de passe :</td>\r
+       <td width="74%"><input type="password" name="txtMotdepasse" size="25" />&nbsp;&nbsp;<?php echo $ErrorMDP ; ?></td></tr>\r
+        <tr><td>Confirmer :</td><td><input type="password" name="txtMotdepasseconfirmer" size="25" />&nbsp;&nbsp;<?php echo $ErrorMDPC." ".$ErrorMotPasse; ?></td></tr>\r
+        <tr><td></td><td><input type="submit" name="cmdSave" value="Sauvegarder" />\r
+                       &nbsp; <?php if($_REQUEST["msg"]=="0"){ echo "<font style='color:#F00F00;'>Connexion &eacute;chou&eacute;e....</font>"; }else{ echo $Message; } ?></td></tr>\r
+               <tr><td></td><td style="padding-top:10px;"></td></tr>\r
+    </table>\r
+       <!-- end #mainContent --></div>\r
+  <div id="footer">\r
+       <table cellpadding="0" cellspacing="0" border="0" height="40" width="100%">\r
+       <tr><td width="80%">Agence Universitaire de la Francophonie -- Antenne de Phnom Penh, Cambodge</td>\r
+               <td width="20%" align="center">Administrateur</td>\r
+        </tr>\r
+    </table>\r
+  <!-- end #footer --></div>\r
+<!-- end #container --></div>\r
+</form>\r
+</body>\r
+</html>\r
diff --git a/paf/index_search.php b/paf/index_search.php
new file mode 100755 (executable)
index 0000000..f71f09c
--- /dev/null
@@ -0,0 +1,212 @@
+<?php\r
+       error_reporting (E_ALL & ~E_NOTICE & ~E_DEPRECATED);\r
+       session_start();\r
+       $admin=$_SESSION["adminAUFPPKH"];\r
+       $UserName=$_SESSION["UserNamePAF"];\r
+       $Password=$_SESSION["PasswordPAF"];\r
+       \r
+?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+<title>P A F -- AUF Phnom Penh, Cambodge</title>\r
+<link rel="shortcut icon" type="image/ico" href="images/paf.ico" />\r
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
+<link href="includes/styles/style.css" rel="stylesheet" type="text/css" />\r
+</head>\r
+<?php\r
+       include("includes/connection.php");\r
+       include("includes/functions.php");\r
+       if($_REQUEST["ID"] !=""){\r
+               $IDS = $_REQUEST["ID"];\r
+               //-----------Tirer les inforamtions aprÚs sauvegarder---------\r
+               $Strs = "Select nom, prenom, datedenaissance, motdepasse, id from tblinscrit where id=".$IDS."";\r
+               $Rows = mysql_fetch_row(mysql_query($Strs)) or die("Erreur de tirer les informations.");\r
+       }\r
+       $kompler = "{%#bb^csr%#}";\r
+       //----------------Sauvegarder les informations-------------------------------\r
+       if(($_REQUEST["page"]=="login")&&($_REQUEST["cmdSave"])){\r
+               include("includes/tclyit_cam_pc.php");\r
+               /*$txtMDP = $_REQUEST["txtMotdepasse"]; echo $txtMDP;\r
+               $txtMDPC = $_REQUEST["txtMotdepasseconfirmer"]; echo $txtMDPC;*/\r
+               if($_REQUEST["txtNom"]==""){\r
+                       $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if(($_REQUEST["selJour"]=="")||($_REQUEST["selMois"]=="")||($_REQUEST["selAnnee"]=="")){\r
+                               $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe confirm&eacute;.'>";\r
+                       }\r
+               }elseif($_REQUEST["txtPrenom"]==""){\r
+                       $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r
+                       }\r
+                       if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="ann&eacute;e")){\r
+                               $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe confirm&eacute;.'>";\r
+                       }\r
+               }elseif(($_REQUEST["selJour"]=="")||($_REQUEST["selMois"]=="")||($_REQUEST["selAnnee"]=="")){\r
+                       $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe confirm&eacute;.'>";\r
+                       }\r
+               }elseif($_REQUEST["txtMotdepasse"] != $_REQUEST["txtMotdepasseconfirmer"]){\r
+                               $ErrorMotPasse = "<img src='./images/error.png' title='Votre mot de passe confirm&eacute; n`est pas correct.'>";\r
+               }elseif($_REQUEST["txtMotdepasse"]==""){\r
+                       $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="ann&eacute;e")){\r
+                               $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       }\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r
+                       }\r
+                       if($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                               $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre .'>";\r
+                       }\r
+               }elseif($_REQUEST["txtMotdepasseconfirmer"]==""){\r
+                       $ErrorMDPC = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe confirm&eacute;.'>";\r
+                       if($_REQUEST["txtMotdepasse"]==""){\r
+                               $ErrorMDP = "<img src='./images/error.png' title='Veuillez saisire votre mot de passe.'>";\r
+                       }\r
+                       if(($_REQUEST["selJour"]=="jour")||($_REQUEST["selMois"]=="mois")||($_REQUEST["selAnnee"]=="ann&eacute;e")){\r
+                               $ErrorDDN = "<img src='./images/error.png' title='Veuillez saisire votre date de naissance.'>";\r
+                       }\r
+                       if($_REQUEST["txtPrenom"]==""){\r
+                               $ErrorPreNom = "<img src='./images/error.png' title='Veuillez saisire votre pr&eacute;nom.'>";\r
+                       }\r
+                       if($_REQUEST["txtNom"]==""){\r
+                               $ErrorNom = "<img src='./images/error.png' title='Veuillez saisire votre nom.'>";\r
+                       }\r
+               }else{\r
+                       //----------Sauvegarder les informations ---------------\r
+                       $DOB = $_REQUEST["selAnnee"]."-".$_REQUEST["selMois"]."-".$_REQUEST["selJour"];\r
+                       $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
+                       @mysql_query($Str) or die("Veuillez contacter l'administrateur. On ne peut pas sauvgarder ces informations (log in).");\r
+                       $ID = mysql_insert_id();\r
+                       redirect("$PHP_SELF?page=login&ID=$ID");\r
+               }\r
+       }\r
+       \r
+       //=========================xxxxxxxxxxxxxxxxxxxxxxxxxxxxx==============================\r
+       //-----------------------Accer le PAF par le compte cr&eacute;&eacute;------------------------------\r
+       if($_REQUEST["cmdLogin"]){\r
+               if($_REQUEST['txtUserName'] <> "" && $_REQUEST['txtPassword'] <> "") {\r
+                               include("includes/connection.php");\r
+                               $Scq=mysql_query("select * from tblinscrit");\r
+                               $Scount = mysql_num_rows($Scq); //echo"Ha..ha..".$Scount;\r
+                               if($Scount == 0){\r
+                                       $_SESSION['adminAUFPPKH']="y";\r
+                                       redirect("admin/index_admin.php");\r
+                               }else{\r
+                                       //$txtPWD = decrptPwd($_SERVER['PHP_AUTH_PW'],$kompler);\r
+                                       $Query=mysql_query("Select * from tblinscrit where id = '".substr($_REQUEST["txtUserName"],1)."' and motdepasse = '".encrptPwd(strtolower($_REQUEST['txtPassword']),$kompler)."'");\r
+                                       $Col=mysql_fetch_row($Query);\r
+                                       if($Col[0] <> ""){\r
+                                               $_SESSION["adminAUFPPKH"]="y";\r
+                                               $_SESSION["UserNamePAF"]=$_REQUEST['txtUserName'];\r
+                                               $_SESSION["PasswordPAF"]=$_REQUEST['txtPassword'];\r
+                                               $St = "Insert into tblaccountaccess (username,accesstime) values('".$_REQUEST['txtUserName']."',CURRENT_TIMESTAMP)";\r
+                                               @mysql_query($St) or die("2");\r
+                                               redirect("index_main.php");\r
+                                               echo "<center>Vous Ãªtes connect&eacute; ... ";\r
+                                               echo "[<a href='" . $_SERVER['PHP_SELF'] . "?actlogin=logout'>D&eacute;connexion</a>]</center>";\r
+                                       }else{\r
+                                               unset($_SESSION["loginAUFKH"]);\r
+                                               unset($_SESSION["adminAUFPPKH"]);\r
+                                               unset($_SESSION["UserNamePAF"]);\r
+                                               unset($_SESSION["PasswordPAF"]);\r
+                                               $Message = "0";\r
+                                               //redirect("index.php?msg=$Message");\r
+                                               //echo "<meta http-equiv=\"Refresh\" content=\"0;url=$HTTP_SERVER_VARS[PHP_SELF]\">";\r
+                                       }\r
+                               }\r
+                 }else{\r
+                       unset($_SESSION["loginAUFKH"]);\r
+                       unset($_SESSION["adminAUFPPKH"]);\r
+                       unset($_SESSION["UserNamePAF"]);\r
+                       unset($_SESSION["PasswordPAF"]);\r
+                       echo "<meta http-equiv=\"Refresh\" content=\"0;url=$HTTP_SERVER_VARS[PHP_SELF]\">";\r
+                       $Message = "<font style='color:#F00F00;'>Connexion &eacute;chou&eacute;e....</font>";\r
+                 }\r
+       }\r
+       //-------------------------------XXXXXXXXXX-------Search-------XXXXXXXXXX------------------\r
+       if($_REQUEST["str_sch"]!="" && $_REQUEST["cmdSearch"]){\r
+               $StrSearch = $_REQUEST["txtSearch"];\r
+               $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
+               $Num=mysql_num_rows($Sql_Ct);\r
+       }elseif($_REQUEST["str_sch"]!=""){\r
+               $StrSearch = $_REQUEST["str_sch"];\r
+               $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
+               $Num=mysql_num_rows($Sql_Ct);\r
+       }\r
+       \r
+       //--------------Tirer information de Session-----------------------------------------------\r
+       if($_SESSION["UserNamePAF"] !=""){\r
+               $St = "Select id, nom, prenom from tblinscrit where id=".substr($UserName,1);\r
+               $Rowss = mysql_fetch_row(mysql_query($St)) or die("Contactez votre administrateur...(&eacute;rreur: select session id)");\r
+               $Deconnexion = "<a href='index.php?actlogin=logout' title='d&eacute;connexion'>D&eacute;connexion</a>";\r
+       }\r
+?>\r
+<body class="oneColLiqCtrHdr">\r
+<form name="PAF" method="post" enctype="application/x-www-form-urlencoded">\r
+<div id="container">\r
+  <div id="header">\r
+       <table width="100%" cellpadding="0" cellspacing="0">\r
+       <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
+               <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
+                       <td width="41%" valign="bottom" align="right" style="padding-bottom:15px; padding-right:10px;">\r
+                               <?php echo $Rowss['1']." ".$Rowss['2']; ?> &nbsp; <?php echo $Deconnexion; ?></td>\r
+        </tr>\r
+    </table>\r
+  <!-- end #header --></div>\r
+  <div id="searchContent">\r
+       <table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;" width="100%" align="right">\r
+       <tr><td width="94%" align="right"><!--Hyperlines g&eacute;n&eacute;raux en tête--------------->\r
+                                       <a href="index.php" title="Accueil">Accueil</a> > Recherche\r
+                               &nbsp;&nbsp;&nbsp; Rechercher : <input type="text" name="txtSearch" value="<?php echo $StrSearch; ?>" />\r
+                       </td>\r
+            <td width="6%" align="left"><input type="submit" name="cmdSearch" value="OK" /></td>\r
+        </tr>\r
+    </table>\r
+  </div>\r
+  <div id="mainContent">\r
+    <?php\r
+               include("forms/search_infos.php");\r
+       ?>\r
+    <!-- end #mainContent -->\r
+  </div>\r
+  <div id="footer">\r
+       <table cellpadding="0" cellspacing="0" border="0" height="40" width="100%">\r
+       <tr><td width="80%">Agence Universitaire de la Francophonie -- Antenne de Phnom Penh, Cambodge</td>\r
+               <td width="20%" align="center">Administrateur</td>\r
+        </tr>\r
+    </table>\r
+  <!-- end #footer --></div>\r
+<!-- end #container --></div>\r
+</form>\r
+</body>\r
+</html>\r
diff --git a/paf/pafauf_bdd.sql b/paf/pafauf_bdd.sql
new file mode 100755 (executable)
index 0000000..13436f9
--- /dev/null
@@ -0,0 +1,266 @@
+# SQL Manager 2005 for MySQL 3.7.5.1\r
+# ---------------------------------------\r
+# Host     : localhost\r
+# Port     : 3306\r
+# Database : pafauf_bdd\r
+\r
+\r
+DROP DATABASE IF EXISTS `pafauf_bdd`;\r
+\r
+CREATE DATABASE `pafauf_bdd`\r
+    CHARACTER SET 'utf8'\r
+    COLLATE 'utf8_general_ci';\r
+\r
+USE `pafauf_bdd`;\r
+\r
+#\r
+# Structure for the `tblaccountaccess` table : \r
+#\r
+\r
+DROP TABLE IF EXISTS `tblaccountaccess`;\r
+\r
+CREATE TABLE `tblaccountaccess` (\r
+  `ID` int(15) NOT NULL AUTO_INCREMENT,\r
+  `username` varchar(300) DEFAULT NULL,\r
+  `accesstime` datetime DEFAULT NULL,\r
+  PRIMARY KEY (`ID`)\r
+) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=latin1;\r
+\r
+#\r
+# Structure for the `tbldomaine` table : \r
+#\r
+\r
+DROP TABLE IF EXISTS `tbldomaine`;\r
+\r
+CREATE TABLE `tbldomaine` (\r
+  `id` int(11) NOT NULL AUTO_INCREMENT,\r
+  `nom` varchar(500) NOT NULL,\r
+  `other` varchar(500) DEFAULT NULL,\r
+  PRIMARY KEY (`id`)\r
+) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;\r
+\r
+#\r
+# Structure for the `tblinscrit` table : \r
+#\r
+\r
+DROP TABLE IF EXISTS `tblinscrit`;\r
+\r
+CREATE TABLE `tblinscrit` (\r
+  `id` int(11) NOT NULL AUTO_INCREMENT,\r
+  `nom` varchar(200) NOT NULL,\r
+  `prenom` varchar(200) NOT NULL,\r
+  `sexe` varchar(1) NOT NULL,\r
+  `datedenaissance` date NOT NULL DEFAULT '0000-00-00',\r
+  `nationalite` varchar(100) DEFAULT NULL,\r
+  `login` varchar(1) NOT NULL,\r
+  `motdepasse` varchar(300) DEFAULT NULL,\r
+  `universite` varchar(300) DEFAULT NULL,\r
+  `faculte` varchar(300) DEFAULT NULL,\r
+  `promotion` int(11) DEFAULT NULL,\r
+  `anneediplome` int(11) DEFAULT NULL,\r
+  `delf` varchar(20) DEFAULT NULL,\r
+  `anneedelf` int(11) DEFAULT NULL,\r
+  `langueautre` varchar(1000) DEFAULT NULL,\r
+  `email` varchar(100) DEFAULT NULL,\r
+  `telephonepersonnelle` varchar(20) DEFAULT NULL,\r
+  `adressepersonnelle` text,\r
+  `telephoneparents` varchar(20) DEFAULT NULL,\r
+  `adresseparents` text,\r
+  `titretravail` varchar(1000) DEFAULT NULL,\r
+  `adressetravail` text,\r
+  `divers` text,\r
+  `dateinlogin` date DEFAULT NULL,\r
+  `datein` date DEFAULT NULL,\r
+  `supprimer` int(1) DEFAULT '0',\r
+  PRIMARY KEY (`id`)\r
+) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;\r
+\r
+#\r
+# Structure for the `tblnationalite` table : \r
+#\r
+\r
+DROP TABLE IF EXISTS `tblnationalite`;\r
+\r
+CREATE TABLE `tblnationalite` (\r
+  `id` int(11) NOT NULL AUTO_INCREMENT,\r
+  `nom` varchar(500) NOT NULL,\r
+  `other` varchar(500) DEFAULT NULL,\r
+  PRIMARY KEY (`id`)\r
+) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;\r
+\r
+#\r
+# Structure for the `tbluniversite` table : \r
+#\r
+\r
+DROP TABLE IF EXISTS `tbluniversite`;\r
+\r
+CREATE TABLE `tbluniversite` (\r
+  `id` int(11) NOT NULL AUTO_INCREMENT,\r
+  `nom` varchar(500) DEFAULT NULL,\r
+  `other` varchar(500) DEFAULT NULL,\r
+  PRIMARY KEY (`id`)\r
+) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;\r
+\r
+#\r
+# Definition for the `v_excel` view : \r
+#\r
+\r
+DROP VIEW IF EXISTS `v_excel`;\r
+\r
+CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_excel` AS \r
+  select \r
+    `tblinscrit`.`id` AS `Numéro`,\r
+    `tblinscrit`.`nom` AS `Nom`,\r
+    `tblinscrit`.`prenom` AS `Prénom`,\r
+    `tblinscrit`.`sexe` AS `Genre`,\r
+    `tblinscrit`.`datedenaissance` AS `Date de Naissance`,\r
+    `tblinscrit`.`nationalite` AS `Nationalité`,\r
+    `tblinscrit`.`universite` AS `Université`,\r
+    `tblinscrit`.`faculte` AS `Faculté`,\r
+    `tblinscrit`.`promotion` AS `Promotion`,\r
+    `tblinscrit`.`anneediplome` AS `Année Obtention de Diplôme`,\r
+    `tblinscrit`.`delf` AS `DELF / DALF`,\r
+    `tblinscrit`.`anneedelf` AS `Année Obtention DELF / DALF`,\r
+    `tblinscrit`.`langueautre` AS `Autres Langues`,\r
+    `tblinscrit`.`email` AS `E-mail`,\r
+    `tblinscrit`.`telephonepersonnelle` AS `Téléphone Personnel`,\r
+    `tblinscrit`.`adressepersonnelle` AS `Adresse Personnelle`,\r
+    `tblinscrit`.`telephoneparents` AS `Téléphone de Parents`,\r
+    `tblinscrit`.`adresseparents` AS `Adresse de Parents`,\r
+    `tblinscrit`.`titretravail` AS `Titre de Travail ou Stage`,\r
+    `tblinscrit`.`adressetravail` AS `Adresse de Travail ou Stage Actuel` \r
+  from \r
+    `tblinscrit`;\r
+\r
+#\r
+# Data for the `tblaccountaccess` table  (LIMIT 0,500)\r
+#\r
+\r
+INSERT INTO `tblaccountaccess` (`ID`, `username`, `accesstime`) VALUES \r
+  (1,'C1','2011-01-15 11:09:32'),\r
+  (2,'C1','2011-01-15 17:10:10'),\r
+  (3,'C1','2011-01-15 21:12:24'),\r
+  (4,'C3','2011-01-15 22:05:24'),\r
+  (5,'C2','2011-01-15 22:05:58'),\r
+  (6,'C1','2011-01-15 23:29:42'),\r
+  (7,'C1','2011-01-17 20:38:46'),\r
+  (8,'C1','2011-01-17 23:12:04'),\r
+  (9,'C1','2011-01-17 23:15:38'),\r
+  (10,'C1','2011-01-17 23:45:36'),\r
+  (11,'C1','2011-01-17 23:46:33'),\r
+  (12,'C1','2011-01-17 23:57:33'),\r
+  (13,'C1','2011-01-18 00:06:57'),\r
+  (14,'C1','2011-01-18 21:43:54'),\r
+  (15,'C3','2011-01-18 22:09:37'),\r
+  (16,'C4','2011-01-18 22:12:15'),\r
+  (17,'C5','2011-01-18 22:50:17'),\r
+  (18,'C1','2011-01-25 21:17:41'),\r
+  (19,'C1','2011-01-25 21:32:00'),\r
+  (20,'C1','2011-01-25 23:51:31'),\r
+  (21,'C1','2011-01-26 00:25:01'),\r
+  (22,'C1','2011-01-26 00:28:20'),\r
+  (23,'c1','2011-04-29 22:14:33'),\r
+  (24,'c1','2011-04-29 22:15:14'),\r
+  (25,'c1','2011-05-01 21:10:18'),\r
+  (26,'c1','2011-05-01 21:50:34'),\r
+  (27,'c1','2011-05-01 21:50:48'),\r
+  (28,'c1','2011-05-04 21:22:38'),\r
+  (29,'c1','2011-05-04 21:30:58'),\r
+  (30,'c6','2011-05-04 22:29:03'),\r
+  (31,'c7','2011-05-04 23:14:15'),\r
+  (32,'c8','2011-05-04 23:18:22'),\r
+  (33,'c6','2011-05-04 23:48:32'),\r
+  (34,'c7','2011-05-04 23:49:02');\r
+\r
+COMMIT;\r
+\r
+#\r
+# Data for the `tbldomaine` table  (LIMIT 0,500)\r
+#\r
+\r
+INSERT INTO `tbldomaine` (`id`, `nom`, `other`) VALUES \r
+  (1,'Agronomie',NULL),\r
+  (2,'Anglais',NULL),\r
+  (3,'Archéologie',NULL),\r
+  (4,'Architecture',NULL),\r
+  (5,'Biologie',NULL),\r
+  (6,'Chimie',NULL),\r
+  (7,'Commerce',NULL),\r
+  (8,'Droit',NULL),\r
+  (9,'Français',NULL),\r
+  (10,'Génie Civil',NULL),\r
+  (11,'Génie Electrique',NULL),\r
+  (12,'Génie Industriel',NULL),\r
+  (13,'Géographie',NULL),\r
+  (14,'Géologie',NULL),\r
+  (15,'Gestion',NULL),\r
+  (16,'Histoire',NULL),\r
+  (17,'Hydraulique',NULL),\r
+  (18,'Informatique',NULL),\r
+  (19,'Ingénieur',NULL),\r
+  (20,'Littérature',NULL),\r
+  (21,'Linguistique',NULL),\r
+  (22,'Mathématique',NULL),\r
+  (23,'Médecine',NULL),\r
+  (24,'Odontostomatologie',NULL),\r
+  (25,'Pharmacie',NULL),\r
+  (26,'Philosophie',NULL),\r
+  (27,'Technicien',NULL),\r
+  (28,'Tourisme',NULL),\r
+  (29,'Autre',NULL);\r
+\r
+COMMIT;\r
+\r
+#\r
+# Data for the `tblinscrit` table  (LIMIT 0,500)\r
+#\r
+\r
+INSERT INTO `tblinscrit` (`id`, `nom`, `prenom`, `sexe`, `datedenaissance`, `nationalite`, `login`, `motdepasse`, `universite`, `faculte`, `promotion`, `anneediplome`, `delf`, `anneedelf`, `langueautre`, `email`, `telephonepersonnelle`, `adressepersonnelle`, `telephoneparents`, `adresseparents`, `titretravail`, `adressetravail`, `divers`, `dateinlogin`, `datein`, `supprimer`) VALUES \r
+  (1,'TIV','Chhunly','M','1980-03-07','Laotienne','C','4OONmNDO1w==','??','??',1950,1950,'DALF',1954,'Anglais','tclyit@gmail.com','012343854899 ? ?','PP`s','0123854358','SRédiction','Responsable de Formation au CNF','ITC','Bopha','2011-01-12','2011-05-04',0),\r
+  (2,'Ong','Bopha','F','1981-12-02','Cambodgien','C','4OONmNDO1w==','Univ. Royale de Phnom Penh','Linguistique',2009,2009,'DALF',2007,'Anglais','ong_bopha@yahoo.com','01245545577','Battambang','012457788','Battambang','PhD','Canada','Toronto','2011-01-12','2011-01-15',0),\r
+  (3,'Ong','Bopha','F','2011-02-02','Cambodgien','C','3+qVi8M=','ITC','Génie Civil',1950,1948,'DALF',1950,'Anglais','ong_bopha@yahoo.com','012343854899','PP','012457788','BB','PhD','Toronto','Chhunly','2011-01-13','2011-01-18',0),\r
+  (4,'TIV','Poteang','F','2001-02-01','Cambodgien','C','rq1YV5eY','Univ. des Sciences de la Santé','Ingénieur',2003,2007,'DALF',1978,'Anglais','ong_bopha@yahoo.com','012343854899','SR','012457788','PP','PhD','Manager','company','2011-01-18','2011-01-18',0),\r
+  (5,'TIV','Potin','F','2003-06-05','Cambodgien','C','rq1YV5eY','Univ. Royale de Phnom Penh','Commerce',1987,2004,'DALF',1994,'Anglais','tivpotin@yahoo.com','012343854899','','','','','','','2011-01-18','2011-01-18',0),\r
+  (6,'Tong','Vong','M','1980-01-01','Française','C','rq1Y','Ecole Royale d','Littérature',0,0,'',0,'','','','','','','','','','2011-05-04','2011-05-04',0),\r
+  (7,'Voila','Pos','F','1980-02-02','Chinoise','C','rq1Y','Univ. des Sciences de la Santé (USS)','Génie Industriel',0,0,'',0,'','','','','','','','','','2011-05-04','2011-05-04',0),\r
+  (8,'Pily','Site','F','1980-03-03','Suisse','C','rq1Y','Lycée','Génie Civil',1986,0,'',0,'','','','','','','','','','2011-05-04','2011-05-04',0);\r
+\r
+COMMIT;\r
+\r
+#\r
+# Data for the `tblnationalite` table  (LIMIT 0,500)\r
+#\r
+\r
+INSERT INTO `tblnationalite` (`id`, `nom`, `other`) VALUES \r
+  (1,'Cambodgienne',NULL),\r
+  (2,'Belge',NULL),\r
+  (3,'Canadienne',NULL),\r
+  (4,'Chinoise',NULL),\r
+  (5,'Française',NULL),\r
+  (6,'Laotienne',NULL),\r
+  (7,'Suisse',NULL),\r
+  (8,'Vietnamienne',NULL),\r
+  (9,'Malagasy',NULL),\r
+  (10,'Autre',NULL);\r
+\r
+COMMIT;\r
+\r
+#\r
+# Data for the `tbluniversite` table  (LIMIT 0,500)\r
+#\r
+\r
+INSERT INTO `tbluniversite` (`id`, `nom`, `other`) VALUES \r
+  (1,'AUF',NULL),\r
+  (2,'Ecole Royale Administration',NULL),\r
+  (3,'Faculty of Business',NULL),\r
+  (4,'ITC',NULL),\r
+  (5,'Lycée',NULL),\r
+  (6,'Univ. Royale de Phnom Penh (URPP)',NULL),\r
+  (7,'Univ. Royale des Beaux-Arts (URBA)',NULL),\r
+  (8,'Univ. Royale Agronomie (URA)',NULL),\r
+  (9,'Univ. des Sciences de la Santé (USS)',NULL),\r
+  (10,'Univ. de Droit et Science-Eco (URDSE)',NULL),\r
+  (11,'Autre',NULL);\r
+\r
+COMMIT;\r
+\r
diff --git a/paf/pafauf_bdd.txt b/paf/pafauf_bdd.txt
new file mode 100755 (executable)
index 0000000..44f55e2
--- /dev/null
@@ -0,0 +1,265 @@
+# SQL Manager 2005 for MySQL 3.7.5.1\r
+# ---------------------------------------\r
+# Host     : localhost\r
+# Port     : 3306\r
+# Database : pafauf_bdd\r
+\r
+\r
+DROP DATABASE IF EXISTS `pafauf_bdd`;\r
+\r
+CREATE DATABASE `pafauf_bdd`\r
+    CHARACTER SET 'utf8'\r
+    COLLATE 'utf8_general_ci';\r
+\r
+USE `pafauf_bdd`;\r
+\r
+#\r
+# Structure for the `tblaccountaccess` table : \r
+#\r
+\r
+DROP TABLE IF EXISTS `tblaccountaccess`;\r
+\r
+CREATE TABLE `tblaccountaccess` (\r
+  `ID` int(15) NOT NULL AUTO_INCREMENT,\r
+  `username` varchar(300) DEFAULT NULL,\r
+  `accesstime` datetime DEFAULT NULL,\r
+  PRIMARY KEY (`ID`)\r
+) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=latin1;\r
+\r
+#\r
+# Structure for the `tbldomaine` table : \r
+#\r
+\r
+DROP TABLE IF EXISTS `tbldomaine`;\r
+\r
+CREATE TABLE `tbldomaine` (\r
+  `id` int(11) NOT NULL AUTO_INCREMENT,\r
+  `nom` varchar(500) NOT NULL,\r
+  `other` varchar(500) DEFAULT NULL,\r
+  PRIMARY KEY (`id`)\r
+) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;\r
+\r
+#\r
+# Structure for the `tblinscrit` table : \r
+#\r
+\r
+DROP TABLE IF EXISTS `tblinscrit`;\r
+\r
+CREATE TABLE `tblinscrit` (\r
+  `id` int(11) NOT NULL AUTO_INCREMENT,\r
+  `nom` varchar(200) NOT NULL,\r
+  `prenom` varchar(200) NOT NULL,\r
+  `sexe` varchar(1) NOT NULL,\r
+  `datedenaissance` date NOT NULL DEFAULT '0000-00-00',\r
+  `nationalite` varchar(100) DEFAULT NULL,\r
+  `login` varchar(1) NOT NULL,\r
+  `motdepasse` varchar(300) DEFAULT NULL,\r
+  `universite` varchar(300) DEFAULT NULL,\r
+  `faculte` varchar(300) DEFAULT NULL,\r
+  `promotion` int(11) DEFAULT NULL,\r
+  `anneediplome` int(11) DEFAULT NULL,\r
+  `delf` varchar(20) DEFAULT NULL,\r
+  `anneedelf` int(11) DEFAULT NULL,\r
+  `langueautre` varchar(1000) DEFAULT NULL,\r
+  `email` varchar(100) DEFAULT NULL,\r
+  `telephonepersonnelle` varchar(20) DEFAULT NULL,\r
+  `adressepersonnelle` text,\r
+  `telephoneparents` varchar(20) DEFAULT NULL,\r
+  `adresseparents` text,\r
+  `titretravail` varchar(1000) DEFAULT NULL,\r
+  `adressetravail` text,\r
+  `divers` text,\r
+  `dateinlogin` date DEFAULT NULL,\r
+  `datein` date DEFAULT NULL,\r
+  `supprimer` int(1) DEFAULT '0',\r
+  PRIMARY KEY (`id`)\r
+) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;\r
+\r
+#\r
+# Structure for the `tblnationalite` table : \r
+#\r
+\r
+DROP TABLE IF EXISTS `tblnationalite`;\r
+\r
+CREATE TABLE `tblnationalite` (\r
+  `id` int(11) NOT NULL AUTO_INCREMENT,\r
+  `nom` varchar(500) NOT NULL,\r
+  `other` varchar(500) DEFAULT NULL,\r
+  PRIMARY KEY (`id`)\r
+) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;\r
+\r
+#\r
+# Structure for the `tbluniversite` table : \r
+#\r
+\r
+DROP TABLE IF EXISTS `tbluniversite`;\r
+\r
+CREATE TABLE `tbluniversite` (\r
+  `id` int(11) NOT NULL AUTO_INCREMENT,\r
+  `nom` varchar(500) DEFAULT NULL,\r
+  `other` varchar(500) DEFAULT NULL,\r
+  PRIMARY KEY (`id`)\r
+) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;\r
+\r
+#\r
+# Definition for the `v_excel` view : \r
+#\r
+\r
+DROP VIEW IF EXISTS `v_excel`;\r
+\r
+CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_excel` AS \r
+  select \r
+    `tblinscrit`.`id` AS `Numéro`,\r
+    `tblinscrit`.`nom` AS `Nom`,\r
+    `tblinscrit`.`prenom` AS `Prénom`,\r
+    `tblinscrit`.`sexe` AS `Genre`,\r
+    `tblinscrit`.`datedenaissance` AS `Date de Naissance`,\r
+    `tblinscrit`.`nationalite` AS `Nationalité`,\r
+    `tblinscrit`.`universite` AS `Université`,\r
+    `tblinscrit`.`faculte` AS `Faculté`,\r
+    `tblinscrit`.`promotion` AS `Promotion`,\r
+    `tblinscrit`.`anneediplome` AS `Année Obtention de Diplôme`,\r
+    `tblinscrit`.`delf` AS `DELF / DALF`,\r
+    `tblinscrit`.`anneedelf` AS `Année Obtention DELF / DALF`,\r
+    `tblinscrit`.`langueautre` AS `Autres Langues`,\r
+    `tblinscrit`.`email` AS `E-mail`,\r
+    `tblinscrit`.`telephonepersonnelle` AS `Téléphone Personnel`,\r
+    `tblinscrit`.`adressepersonnelle` AS `Adresse Personnelle`,\r
+    `tblinscrit`.`telephoneparents` AS `Téléphone de Parents`,\r
+    `tblinscrit`.`adresseparents` AS `Adresse de Parents`,\r
+    `tblinscrit`.`titretravail` AS `Titre de Travail ou Stage`,\r
+    `tblinscrit`.`adressetravail` AS `Adresse de Travail ou Stage Actuel` \r
+  from \r
+    `tblinscrit`;\r
+\r
+#\r
+# Data for the `tblaccountaccess` table  (LIMIT 0,500)\r
+#\r
+\r
+INSERT INTO `tblaccountaccess` (`ID`, `username`, `accesstime`) VALUES \r
+  (1,'C1','2011-01-15 11:09:32'),\r
+  (2,'C1','2011-01-15 17:10:10'),\r
+  (3,'C1','2011-01-15 21:12:24'),\r
+  (4,'C3','2011-01-15 22:05:24'),\r
+  (5,'C2','2011-01-15 22:05:58'),\r
+  (6,'C1','2011-01-15 23:29:42'),\r
+  (7,'C1','2011-01-17 20:38:46'),\r
+  (8,'C1','2011-01-17 23:12:04'),\r
+  (9,'C1','2011-01-17 23:15:38'),\r
+  (10,'C1','2011-01-17 23:45:36'),\r
+  (11,'C1','2011-01-17 23:46:33'),\r
+  (12,'C1','2011-01-17 23:57:33'),\r
+  (13,'C1','2011-01-18 00:06:57'),\r
+  (14,'C1','2011-01-18 21:43:54'),\r
+  (15,'C3','2011-01-18 22:09:37'),\r
+  (16,'C4','2011-01-18 22:12:15'),\r
+  (17,'C5','2011-01-18 22:50:17'),\r
+  (18,'C1','2011-01-25 21:17:41'),\r
+  (19,'C1','2011-01-25 21:32:00'),\r
+  (20,'C1','2011-01-25 23:51:31'),\r
+  (21,'C1','2011-01-26 00:25:01'),\r
+  (22,'C1','2011-01-26 00:28:20'),\r
+  (23,'c1','2011-04-29 22:14:33'),\r
+  (24,'c1','2011-04-29 22:15:14'),\r
+  (25,'c1','2011-05-01 21:10:18'),\r
+  (26,'c1','2011-05-01 21:50:34'),\r
+  (27,'c1','2011-05-01 21:50:48'),\r
+  (28,'c1','2011-05-04 21:22:38'),\r
+  (29,'c1','2011-05-04 21:30:58'),\r
+  (30,'c6','2011-05-04 22:29:03'),\r
+  (31,'c7','2011-05-04 23:14:15'),\r
+  (32,'c8','2011-05-04 23:18:22'),\r
+  (33,'c6','2011-05-04 23:48:32'),\r
+  (34,'c7','2011-05-04 23:49:02');\r
+\r
+COMMIT;\r
+\r
+#\r
+# Data for the `tbldomaine` table  (LIMIT 0,500)\r
+#\r
+\r
+INSERT INTO `tbldomaine` (`id`, `nom`, `other`) VALUES \r
+  (1,'Agronomie',NULL),\r
+  (2,'Anglais',NULL),\r
+  (3,'Archéologie',NULL),\r
+  (4,'Architecture',NULL),\r
+  (5,'Biologie',NULL),\r
+  (6,'Chimie',NULL),\r
+  (7,'Commerce',NULL),\r
+  (8,'Droit',NULL),\r
+  (9,'Français',NULL),\r
+  (10,'Génie Civil',NULL),\r
+  (11,'Génie Electrique',NULL),\r
+  (12,'Génie Industriel',NULL),\r
+  (13,'Géographie',NULL),\r
+  (14,'Géologie',NULL),\r
+  (15,'Gestion',NULL),\r
+  (16,'Histoire',NULL),\r
+  (17,'Hydraulique',NULL),\r
+  (18,'Informatique',NULL),\r
+  (19,'Ingénieur',NULL),\r
+  (20,'Littérature',NULL),\r
+  (21,'Linguistique',NULL),\r
+  (22,'Mathématique',NULL),\r
+  (23,'Médecine',NULL),\r
+  (24,'Odontostomatologie',NULL),\r
+  (25,'Pharmacie',NULL),\r
+  (26,'Philosophie',NULL),\r
+  (27,'Technicien',NULL),\r
+  (28,'Tourisme',NULL),\r
+  (29,'Autre',NULL);\r
+\r
+COMMIT;\r
+\r
+#\r
+# Data for the `tblinscrit` table  (LIMIT 0,500)\r
+#\r
+\r
+INSERT INTO `tblinscrit` (`id`, `nom`, `prenom`, `sexe`, `datedenaissance`, `nationalite`, `login`, `motdepasse`, `universite`, `faculte`, `promotion`, `anneediplome`, `delf`, `anneedelf`, `langueautre`, `email`, `telephonepersonnelle`, `adressepersonnelle`, `telephoneparents`, `adresseparents`, `titretravail`, `adressetravail`, `divers`, `dateinlogin`, `datein`, `supprimer`) VALUES \r
+  (1,'TIV','Chhunly','M','1980-03-07','Laotienne','C','4OONmNDO1w==','??','??',1950,1950,'DALF',1954,'Anglais','tclyit@gmail.com','012343854899 ? ?','PP`s','0123854358','SRédiction','Responsable de Formation au CNF','ITC','Bopha','2011-01-12','2011-05-04',0),\r
+  (2,'Ong','Bopha','F','1981-12-02','Cambodgien','C','4OONmNDO1w==','Univ. Royale de Phnom Penh','Linguistique',2009,2009,'DALF',2007,'Anglais','ong_bopha@yahoo.com','01245545577','Battambang','012457788','Battambang','PhD','Canada','Toronto','2011-01-12','2011-01-15',0),\r
+  (3,'Ong','Bopha','F','2011-02-02','Cambodgien','C','3+qVi8M=','ITC','Génie Civil',1950,1948,'DALF',1950,'Anglais','ong_bopha@yahoo.com','012343854899','PP','012457788','BB','PhD','Toronto','Chhunly','2011-01-13','2011-01-18',0),\r
+  (4,'TIV','Poteang','F','2001-02-01','Cambodgien','C','rq1YV5eY','Univ. des Sciences de la Santé','Ingénieur',2003,2007,'DALF',1978,'Anglais','ong_bopha@yahoo.com','012343854899','SR','012457788','PP','PhD','Manager','company','2011-01-18','2011-01-18',0),\r
+  (5,'TIV','Potin','F','2003-06-05','Cambodgien','C','rq1YV5eY','Univ. Royale de Phnom Penh','Commerce',1987,2004,'DALF',1994,'Anglais','tivpotin@yahoo.com','012343854899','','','','','','','2011-01-18','2011-01-18',0),\r
+  (6,'Tong','Vong','M','1980-01-01','Française','C','rq1Y','Ecole Royale d','Littérature',0,0,'',0,'','','','','','','','','','2011-05-04','2011-05-04',0),\r
+  (7,'Voila','Pos','F','1980-02-02','Chinoise','C','rq1Y','Univ. des Sciences de la Santé (USS)','Génie Industriel',0,0,'',0,'','','','','','','','','','2011-05-04','2011-05-04',0),\r
+  (8,'Pily','Site','F','1980-03-03','Suisse','C','rq1Y','Lycée','Génie Civil',1986,0,'',0,'','','','','','','','','','2011-05-04','2011-05-04',0);\r
+\r
+COMMIT;\r
+\r
+#\r
+# Data for the `tblnationalite` table  (LIMIT 0,500)\r
+#\r
+\r
+INSERT INTO `tblnationalite` (`id`, `nom`, `other`) VALUES \r
+  (1,'Cambodgienne',NULL),\r
+  (2,'Belge',NULL),\r
+  (3,'Canadienne',NULL),\r
+  (4,'Chinoise',NULL),\r
+  (5,'Française',NULL),\r
+  (6,'Laotienne',NULL),\r
+  (7,'Suisse',NULL),\r
+  (8,'Vietnamienne',NULL),\r
+  (9,'Malagasy',NULL),\r
+  (10,'Autre',NULL);\r
+\r
+COMMIT;\r
+\r
+#\r
+# Data for the `tbluniversite` table  (LIMIT 0,500)\r
+#\r
+\r
+INSERT INTO `tbluniversite` (`id`, `nom`, `other`) VALUES \r
+  (1,'AUF',NULL),\r
+  (2,'Ecole Royale Administration',NULL),\r
+  (3,'Faculty of Business',NULL),\r
+  (4,'ITC',NULL),\r
+  (5,'Lycée',NULL),\r
+  (6,'Univ. Royale de Phnom Penh (URPP)',NULL),\r
+  (7,'Univ. Royale des Beaux-Arts (URBA)',NULL),\r
+  (8,'Univ. Royale Agronomie (URA)',NULL),\r
+  (9,'Univ. des Sciences de la Santé (USS)',NULL),\r
+  (10,'Univ. de Droit et Science-Eco (URDSE)',NULL),\r
+  (11,'Autre',NULL);\r
+\r
+COMMIT;\r
diff --git a/paf/php_excel.php b/paf/php_excel.php
new file mode 100755 (executable)
index 0000000..9849c30
--- /dev/null
@@ -0,0 +1,73 @@
+<?php\r
+\r
+/**\r
+ * @author sapta\r
+ * @copyright 2009\r
+ */\r
+\r
+$cdate = date("Y-m-d"); // get current date\r
+\r
+// configuration\r
+$mysql_host = 'localhost';\r
+$mysql_user = 'root';\r
+$mysql_pass = 'root';\r
+$mysql_db      = 'pafauf_bdd';\r
+$query_string = "select * from v_excel";\r
+$export_filename = "exported_tableau_on_$cdate.xls";\r
+\r
+// connect to mysql server\r
+$mysql_link = mysql_connect($mysql_host,$mysql_user,$mysql_pass);\r
+mysql_select_db($mysql_db,$mysql_link);\r
+\r
+// query from table\r
+$result = mysql_query($query_string);\r
+\r
+$count = mysql_num_fields($result);\r
+\r
+// fetch table header\r
+$header = '';\r
+for ($i = 0; $i < $count; $i++){\r
+       $header .= mysql_field_name($result, $i)."\t";\r
+}\r
+\r
+// fetch data each row, store on tabular row data\r
+while($row = mysql_fetch_row($result)){\r
+       $line = '';\r
+       foreach($row as $value){\r
+               if(!isset($value) || $value == ""){\r
+                       $value = "\t";\r
+               }else{\r
+                       # important to escape any quotes to preserve them in the data.\r
+                       $value = str_replace('"', '""', $value);\r
+                       # needed to encapsulate data in quotes because some data might be multi line.\r
+                       # the good news is that numbers remain numbers in Excel even though quoted.\r
+                       $value = '"' . $value . '"' . "\t";\r
+               }\r
+\r
+               $line .= $value;\r
+       }\r
+       $data .= trim($line)."\n";\r
+}\r
+\r
+# this line is needed because returns embedded in the data have "\r"\r
+# and this looks like a "box character" in Excel\r
+$data = str_replace("\r", "", $data);\r
+\r
+# Nice to let someone know that the search came up empty.\r
+# Otherwise only the column name headers will be output to Excel.\r
+if ($data == "") {\r
+       $data = "\nno matching records found\n";\r
+}\r
+\r
+// create table header showing to download a xls (excel) file\r
+header("Content-type: application/octet-stream");\r
+header("Content-Disposition: attachment; filename=$export_filename");\r
+header("Cache-Control: public");\r
+header("Content-length: ".strlen($data)); // tells file size\r
+header("Pragma: no-cache");\r
+header("Expires: 0");\r
+\r
+// output data\r
+echo $header."\n".$data;\r
+\r
+?>\r