Delete Posts

Edit Posts
Back to blog
This commit is contained in:
mmk2410 2015-12-06 15:19:16 +01:00
parent fbca74ccec
commit 6e6e26ad26
11 changed files with 574 additions and 121 deletions

22
rcc/res/save.php Normal file
View 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;
}