cms.document.php 561 B

12345678910111213141516171819202122232425
  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. document::cleanOrphanTags();
  15. header("Location: " . $location);
  16. exit();
  17. } else {
  18. header('HTTP/1.0 401 Unauthorized');
  19. exit();
  20. }