obtemploye3.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. define("LIBERATIONSWEB", 20091223);
  3. session_start();
  4. //Librairie de fonctions
  5. require (__DIR__ . '/vendor/autoload.php');
  6. require_once("lib/libconfig.inc.php");
  7. require_once("lib/libsession.inc.php");
  8. require_once("lib/libfonctions.inc.php");
  9. require_once("lib/libmysql.inc.php");
  10. require_once("lib/libencode.inc.php");
  11. require_once("lib/libcourriel.inc.php");
  12. require_once("lib/libliberations.inc.php");
  13. if (filter_input(INPUT_POST, "prm1")!="") {
  14. //Début de la session
  15. $search = antiInjection(filter_input(INPUT_POST, "prm1"));
  16. if ($search != "" && $search != "-1") {
  17. $condition = antiInjection(filter_input(INPUT_POST, "prm1"));
  18. } elseif ($_SESSION["gestion_site"] != "Oui") {
  19. $condition = $_SESSION["employeur"];
  20. } else {
  21. $condition = "";
  22. }
  23. //Encodage des caractères
  24. header('Content-Type: text/html; charset=$ENCODAGE');
  25. unset($result2);
  26. $result2 = getEmployes($condition, "gestion_site", true);
  27. print "<option value=\"-1\">--------------------</option>";
  28. foreach ($result2 as $clef => $valeur) {
  29. print "<option value='" . $valeur["refid"] . "'>" . htmlentities($valeur["valeur"], ENT_SUBSTITUTE, "UTF-8") . "</option>";
  30. }
  31. }