2
0

cms.login.php 552 B

123456789101112131415161718192021
  1. <?php
  2. if (core::ifPost("from") AND core::getPost("from") == "login") {
  3. $connect = user::connect(core::getPost());
  4. if($connect == TRUE){
  5. historique::recRef("/login.html");
  6. historique::add(array(
  7. "idType" => historique::getIdRef("CONNEXION"),
  8. "idUser" => session::getId(),
  9. "idPage" => historique::getIdRef("/login.html"),
  10. "log" => $_SERVER['REMOTE_ADDR']
  11. ));
  12. }
  13. header("Location: /");
  14. exit();
  15. } else {
  16. header('HTTP/1.0 401 Unauthorized');
  17. exit();
  18. }