| 12345678910111213141516171819202122 |
- <?php
- if (core::ifPost("from") AND core::getPost("from") == "document") {
- if(core::getPost("id") == "add"){
- if(document::add() == TRUE) {
- $location = "/document-". document::lastAdd() .".html";
- } else {
- $location = "/documents.html";
- }
- } else {
- document::update();
- $location = "/document-". core::getPost("id") .".html";
- }
- header("Location: " . $location);
- exit();
- } else {
- header('HTTP/1.0 401 Unauthorized');
- exit();
- }
|