This repository has been archived on 2022-02-10. You can view files and clone it, but cannot push or open issues or pull requests.
filespread/res/php/gettemplate.php

18 lines
411 B
PHP
Raw Normal View History

2016-04-06 17:30:05 +02:00
<?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));