obtemploye2.php 692 B

123456789101112131415161718192021222324
  1. <?php
  2. //Librairie de fonctions
  3. require("lib/libsession.inc.php");
  4. require("lib/libencode.inc.php");
  5. require("lib/libconnection.inc.php");
  6. if (isset(filter_input(INPUT_POST, "prm1"))) {
  7. //Encodage des caractères
  8. header('Content-Type: text/plain; charset=$ENCODAGE');
  9. $rlreference = antiInjection(filter_input(INPUT_POST, "prm1"));
  10. if ($rlreference != "") {
  11. unset($sqlparam);
  12. $sqlparam["table"][] = "employes";
  13. $sqlparam["where"][] = sprintf("refemploye = %d", $rlreference);
  14. $result = executerRequeteSql($sqlparam);
  15. print (!empty($result)) ? $result[0]["compte"] : "0";
  16. } else {
  17. print "0";
  18. }
  19. } else {
  20. print "0";
  21. }