|
|
@ -36,14 +36,14 @@ class kaformPDF extends TCPDF { |
|
|
|
}; |
|
|
|
|
|
|
|
function mkFrontPDF(){ |
|
|
|
$comments = str_replace("\n","<BR>",$_POST[comments]); |
|
|
|
$bankaddress = str_replace("\n","<BR>",$_POST[bankaddress]); |
|
|
|
$address = str_replace("\n","<BR>",$_POST[address]); |
|
|
|
$comments = str_replace("\n","<BR>",$_POST['comments']); |
|
|
|
$bankaddress = str_replace("\n","<BR>",$_POST['bankaddress']); |
|
|
|
$address = str_replace("\n","<BR>",$_POST['address']); |
|
|
|
|
|
|
|
$account_owner = $_POST[owner]; |
|
|
|
if (!$account_owner) $account_owner = $_POST[realname]; |
|
|
|
$account_owner = $_POST['owner']; |
|
|
|
if (!$account_owner) $account_owner = $_POST['realname']; |
|
|
|
|
|
|
|
switch ($_POST[bank]){ |
|
|
|
switch ($_POST['bank']){ |
|
|
|
case "EU": |
|
|
|
$aw = "EU-Banküberweisung"; |
|
|
|
$aw_details = "
|
|
|
@ -145,14 +145,12 @@ function mkFrontPDF(){ |
|
|
|
<<<EOD |
|
|
|
<h1>Kostenerstattungsantrag über $sum EUR</h1> |
|
|
|
<p><b>Projekt: $_POST[project]</b></p> |
|
|
|
<p>WMDE Ansprechpartner: $_POST[wmdecontact]</p> |
|
|
|
<hr> |
|
|
|
<p> |
|
|
|
|
|
|
|
<br> |
|
|
|
Name: $_POST[realname]<br> |
|
|
|
E-Mail: $_POST[email]<br> |
|
|
|
Telefon: $_POST[phone] |
|
|
|
</p> |
|
|
|
<hr> |
|
|
|
<br> |
|
|
@ -162,6 +160,8 @@ function mkFrontPDF(){ |
|
|
|
</p> |
|
|
|
|
|
|
|
EOD; |
|
|
|
// <p>WMDE Ansprechpartner: $_POST[wmdecontact]</p>
|
|
|
|
// Telefon: $_POST[phone]
|
|
|
|
|
|
|
|
// Print text using writeHTMLCell()
|
|
|
|
$pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, '', true); |
|
|
@ -249,7 +249,7 @@ function calcSum(){ |
|
|
|
} |
|
|
|
|
|
|
|
foreach ($_POST['amount'] as $val){ |
|
|
|
var_dump($val); |
|
|
|
// var_dump($val);
|
|
|
|
$sum += floatval(str_replace(",",".",$val)); |
|
|
|
} |
|
|
|
return $sum; |
|
|
@ -259,10 +259,19 @@ function calcSum(){ |
|
|
|
$pdfs = array(); |
|
|
|
|
|
|
|
// Applicatoin starts here
|
|
|
|
//
|
|
|
|
$p = mkFrontPDF(); |
|
|
|
|
|
|
|
$file = $p; |
|
|
|
header('Content-Disposition: attachment; filename="'. basename($file) . '"'); |
|
|
|
header('Content-Length: ' . filesize($file)); |
|
|
|
readfile($file); |
|
|
|
|
|
|
|
var_dump($p); |
|
|
|
die(); |
|
|
|
|
|
|
|
echo "Making Fromt PDF<BR>"; |
|
|
|
|
|
|
|
$p = mkFrontPDF(); |
|
|
|
|
|
|
|
echo "Did Making Fromt PDF<BR>"; |
|
|
|
|
|
|
|