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/savetemplate.php
2016-04-06 17:30:05 +02:00

19 lines
406 B
PHP

<?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";
}