2
0

cms.document.php 595 B

1234567891011121314151617181920212223242526
  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. session::resetTemp();
  7. $location = "/document-". $add .".html";
  8. } else {
  9. $location = "/add-document.html";
  10. }
  11. } else {
  12. document::update();
  13. $location = "/document-". core::getPost("id") .".html";
  14. }
  15. document::cleanOrphanTags();
  16. header("Location: " . $location);
  17. exit();
  18. } else {
  19. header('HTTP/1.0 401 Unauthorized');
  20. exit();
  21. }