Delete Posts
Edit Posts Back to blog
This commit is contained in:
parent
fbca74ccec
commit
6e6e26ad26
11 changed files with 574 additions and 121 deletions
22
rcc/res/save.php
Normal file
22
rcc/res/save.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
$title = $_POST["title"];
|
||||
$date = $_POST["date"];
|
||||
$author = $_POST["author"];
|
||||
$tags = $_POST["tags"];
|
||||
$text = $_POST["text"];
|
||||
$filename = $_POST["file"];
|
||||
$md = <<<EOD
|
||||
%TITLE: $title
|
||||
%DATE: $date
|
||||
%AUTHOR: $author
|
||||
%TAGS: $tags
|
||||
|
||||
$text
|
||||
EOD;
|
||||
if (file_put_contents($filename, $md)) {
|
||||
echo 0;
|
||||
} else if (file_exists(($filename))) {
|
||||
echo 1;
|
||||
} else {
|
||||
echo -1;
|
||||
}
|
Reference in a new issue