Added buttons to Order/Index

This commit is contained in:
Frank Schubert
2021-08-27 19:42:34 +02:00
parent 1a0f51360f
commit a40dc708fa
6 changed files with 199 additions and 10 deletions

View File

@@ -76,7 +76,7 @@ class mfLayout {
$html = $this->render();
if (!$filename)
$filename = date('U') . ".pdf";
$filename = date('U') . "-" . rand(1000, 9999) . ".pdf";
$wk = new mfWkhtmltopdf($html);
@@ -108,10 +108,10 @@ class mfLayout {
header('Content-disposition: attachment; filename=' . $filename);
header('Content-Transfer-Encoding: binary');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Type: ' . mime_content_type($filename));
header("Content-Length: " . filesize($filename));
readfile($file);
header('Content-Type: ' . mime_content_type($filepath));
header("Content-Length: " . filesize($filepath));
readfile($filepath);
exit;
}