Initial commit
This commit is contained in:
commit
78a4e70036
24 changed files with 1067 additions and 0 deletions
17
res/php/gettemplate.php
Normal file
17
res/php/gettemplate.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
# COPYRIGHT (c) 2016 Marcel Kapfer (mmk2410)
|
||||
# MIT License
|
||||
|
||||
$file = "../../templates/" . $_GET["template"];
|
||||
$content = file($file);
|
||||
|
||||
$title = substr($content[0], 7);
|
||||
|
||||
$filename = substr($content[1], 10);
|
||||
|
||||
$text = substr($content[2], 6);
|
||||
for ($i = 3; $i < count($content); $i++) {
|
||||
$text = $text . $content[$i];
|
||||
}
|
||||
|
||||
echo json_encode(array("subject" => $title, "filename" => $filename, "text" => $text));
|
Reference in a new issue