cms.user.php 587 B

123456789101112131415161718192021222324
  1. <?php
  2. if (core::ifPost("from") AND core::getPost("from") == "user") {
  3. if(core::getPost("id") == "add"){
  4. user::add_user(core::getPost());
  5. header("Location: /user-" . user::lastUser() . ".html");
  6. exit();
  7. } else {
  8. user::maj_user(core::getPost());
  9. if(core::getPost("id") == session::getId()){
  10. header("Location: /user.html");
  11. } else {
  12. header("Location: /user-" . core::getPost("id") . ".html");
  13. }
  14. exit();
  15. }
  16. } else {
  17. header('HTTP/1.0 401 Unauthorized');
  18. exit();
  19. }