Initial commit
This commit is contained in:
commit
78a4e70036
24 changed files with 1067 additions and 0 deletions
19
res/php/savetemplate.php
Normal file
19
res/php/savetemplate.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
# COPYRIGHT (c) 2016 Marcel Kapfer (mmk2410)
|
||||
# MIT License
|
||||
|
||||
$content = $_GET["data"];
|
||||
|
||||
$filename = "../../templates/" . $content["template"];
|
||||
|
||||
$file = "Title: " . $content["subject"] . "\n";
|
||||
$file = $file . "Filename: " . $content["filename"] . "\n";
|
||||
$file = $file . "Text: " . $content["text"];
|
||||
|
||||
$handle = fopen($filename, "w");
|
||||
|
||||
if (fwrite($handle, $file)) {
|
||||
echo "0";
|
||||
} else {
|
||||
echo "1";
|
||||
}
|
Reference in a new issue