calendarexporter: TODO: write new list module, ics creation improvements

This commit is contained in:
2012-12-06 23:10:23 +00:00
parent 76c2f9192a
commit 8f9248aaff
5 changed files with 153 additions and 11 deletions

23
php/download.php Normal file
View File

@@ -0,0 +1,23 @@
<?php
$basedir = $_GET["basedir"];
$secid = $_GET["secid"];
$fileid = $_GET["fileid"];
$realname = $_GET["realname"];
$secfile = $basedir . "/secid." . $secid;
$icsfile = $basedir . "/" . $fileid . "." . $secid;
// if the secid file exists -> download!
if(file_exists($secfile)) {
@header("Last-Modified: " . @gmdate("D, d M Y H:i:s",time()) . " GMT");
@header("Content-type: text/calendar");
header("Content-Length: " . filesize($icsfile));
header("Content-Disposition: attachment; filename=" . $realname . ".ics");
//write ics
readfile($icsfile);
unlink($secfile);
unlink($icsfile);
}
?>