2
0

cms.document.php 540 B

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