Download after sent per mail

This commit is contained in:
Tobias Herre 2021-12-17 14:00:12 +01:00
parent 67d602af8d
commit 3de875b138
1 changed files with 20 additions and 4 deletions

View File

@ -1,3 +1,17 @@
<?php
session_start();
if ($_GET['lst']=='1'){
$file = "Antrag.pdf";
header('Content-Disposition: attachment; filename="'. $file . '"');
header('Content-Length: ' . strlen($_SESSION['lst']));
echo $_SESSION['lst'];
die;
}
?>
<html>
<head>
<title>Kostenerstattungsforumlar</title>
@ -13,10 +27,7 @@
</head>
<body>
<?php
session_start();
error_log("SUBMIT\n");
@ -464,9 +475,14 @@ if ($_POST['sendmail']=='yes'){
class="button is-orange"><?=_("Kopie des Antrags herunterladen")?></button>
</div> -->
<?php
echo '<a href="./submit.php?lst=1" target="_blank">Kopie des Antrags herunterladen</a>';
echo "<br>";
echo '<a href="./">
Weiteren Antrag auf Kostenerstattung stellen</a><BR>';
$_SESSION['lst']=file_get_contents("$resultnam.pdf");
session_write_close();
die;