set_charset('utf8'); if (mysqli_connect_errno()) { die('Konnte keine Verbindung zu Datenbank aufbauen, MySQL meldete: ' . mysqli_connect_error()); } if (isset($_POST['formaction'])) { if ("view" == $_POST['formaction']) { if (isset($_POST['from'])) { $from = "&from=" . $_POST['from']; } else { $from = ""; } if ("lv" == $_GET['section']) { include "pdf/lv_pdf.php"; header('Location: index.php?section=lv&pdf=LV_' . $nt['Jahr'] . '_' . $nt['ID'] . $from); } elseif ("angebot" == $_GET['section']) { include "pdf/ang_pdf.php"; header('Location: index.php?section=angebot&pdf=A_' . $nt['Jahr'] . '_' . $nt['ID'] . $from); } elseif ("bestaet" == $_GET['section']) { include "pdf/best_pdf.php"; header('Location: index.php?section=bestaet&pdf=B_' . $nt['Jahr'] . '_' . $nt['ID'] . $from); } elseif ("rechnung" == $_GET['section']) { include "pdf/rech_pdf.php"; header('Location: index.php?section=rechnung&pdf=R_' . $nt['Jahr'] . '_' . $nt['ID'] . $from); } elseif ("liefer" == $_GET['section']) { include "pdf/liefer_pdf.php"; header('Location: index.php?section=liefer&pdf=L_' . $nt['Jahr'] . '_' . $nt['ID'] . $from); } elseif ("gut" == $_GET['section']) { include "pdf/gut_pdf.php"; header('Location: index.php?section=gut&pdf=G_' . $nt['Jahr'] . '_' . $nt['ID'] . $from); } elseif ("oposten" == $_GET['section']) { if (!isset($_POST['mahnung'])) { include "pdf/opost_pdf.php"; header('Location: index.php?section=oposten&pdf=O_' . date('Ymd')); } else { if ("1" == $_POST['mahnung']) { include "pdf/mahn1_pdf.php"; header('Location: index.php?section=oposten&pdf=M1_' . $nt['Jahr'] . '_' . $nt['ID']); } else { include "pdf/mahn2_pdf.php"; header('Location: index.php?section=oposten&pdf=M2_' . $nt['Jahr'] . '_' . $nt['ID']); } } } elseif ("tracking" == $_GET['section']) { include "pdf/track_pdf.php"; header('Location: index.php?section=tracking&pdf=T_' . date('Ymd')); } elseif ("eur" == $_GET['section']) { if ("aus_ist" == $_POST['type']) { include "pdf/ausist_pdf.php"; header('Location: index.php?section=eur&pdf=A_' . date('Ymd')); } elseif ("aus_soll" == $_POST['type']) { include "pdf/aussoll_pdf.php"; header('Location: index.php?section=eur&pdf=A_' . date('Ymd')); } elseif ("ein_ist" == $_POST['type']) { include "pdf/einist_pdf.php"; header('Location: index.php?section=eur&pdf=E_' . date('Ymd')); } elseif ("ein_soll" == $_POST['type']) { include "pdf/einsoll_pdf.php"; header('Location: index.php?section=eur&pdf=E_' . date('Ymd')); } } elseif ("schrift" == $_GET['section']) { include "pdf/schrift_pdf.php"; header('Location: index.php?section=schrift&pdf=S_' . $nt['File_Name']); } elseif ("kontakt" == $_GET['section']) { include "pdf/kontakt_pdf.php"; header('Location: index.php?section=kontakt&pdf=K_' . $nt['ID']); } } elseif ("email" == $_POST['formaction']) { if ("lv" == $_GET['section']) { include "pdf/lv_pdf.php"; } elseif ("angebot" == $_GET['section']) { include "pdf/ang_pdf.php"; } elseif ("bestaet" == $_GET['section']) { include "pdf/best_pdf.php"; } elseif ("rechnung" == $_GET['section']) { include "pdf/rech_pdf.php"; } elseif ("liefer" == $_GET['section']) { include "pdf/liefer_pdf.php"; } elseif ("gut" == $_GET['section']) { include "pdf/gut_pdf.php"; } elseif ("schrift" == $_GET['section']) { include "pdf/schrift_pdf.php"; } } } echo ""; echo "\n"; echo "
\n"; echo "