cms.document.php 517 B

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