Ersetzen der FPDF-Library durch TCPDF und Code-Formatierung
This commit is contained in:
@@ -1,35 +1,40 @@
|
||||
<?php
|
||||
if (!isset($_POST['action'])) {
|
||||
echo "<h1>Fahrzeug löschen</h1>\n";
|
||||
$sql = "SELECT Kennzeichen, Marke, Modell FROM ".PREFIX."_KfZ WHERE ID = \"".$_POST['ID']."\";";
|
||||
$result = $db->query($sql);
|
||||
$nt = $result->fetch_assoc();
|
||||
echo "<h2>Soll folgendes Fahrzeug wirklich gelöscht werden?</h2>\n";
|
||||
echo "<label>Kennzeichen</label>\n";
|
||||
echo "<label class=\"data\">".$nt['Kennzeichen']."</label>\n";
|
||||
echo "<br class=\"fix\" />\n";
|
||||
echo "<label>Fahrzeug</label>\n";
|
||||
echo "<label class=\"data\">".$nt['Marke']." ".$nt['Modell']."</label>\n";
|
||||
echo "<br class=\"fix\" />\n";
|
||||
echo "<form action=\"index.php?".$_SERVER['QUERY_STRING']."\" method=\"post\" >\n";
|
||||
echo " <input type=\"hidden\" name=\"ID\" value=\"".$_POST['ID']."\" />\n";
|
||||
echo " <input type=\"hidden\" name=\"formaction\" value=\"del\" />\n";
|
||||
echo " <br />\n";
|
||||
echo " <input type=\"submit\" class=\"button_del\" name=\"action\" value=\"1\" title=\"Fahrzeug jetzt löschen\" />\n";
|
||||
echo " <input type=\"submit\" class=\"button_stop\" name=\"formaction\" value=\"stop\" title=\"Abbrechen\" />\n";
|
||||
echo "</form>\n";
|
||||
echo "<br class=\"fix\" />\n";
|
||||
} else {
|
||||
$sql = 'DELETE FROM
|
||||
'.PREFIX.'_KfZ
|
||||
WHERE
|
||||
ID = "'.$_POST['ID'].'";';
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
unset($_POST);
|
||||
include "inhalte/kfz.php";
|
||||
} else {
|
||||
echo "Fehler beim löschen";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (!isset($_POST['action']))
|
||||
{
|
||||
echo "<h1>Fahrzeug löschen</h1>\n";
|
||||
$sql = "SELECT Kennzeichen, Marke, Modell FROM " . PREFIX . "_KfZ WHERE ID = \"" . $_POST['ID'] . "\";";
|
||||
$result = $db->query($sql);
|
||||
$nt = $result->fetch_assoc();
|
||||
echo "<h2>Soll folgendes Fahrzeug wirklich gelöscht werden?</h2>\n";
|
||||
echo "<label>Kennzeichen</label>\n";
|
||||
echo "<label class=\"data\">" . $nt['Kennzeichen'] . "</label>\n";
|
||||
echo "<br class=\"fix\" />\n";
|
||||
echo "<label>Fahrzeug</label>\n";
|
||||
echo "<label class=\"data\">" . $nt['Marke'] . " " . $nt['Modell'] . "</label>\n";
|
||||
echo "<br class=\"fix\" />\n";
|
||||
echo "<form action=\"index.php?" . $_SERVER['QUERY_STRING'] . "\" method=\"post\" >\n";
|
||||
echo " <input type=\"hidden\" name=\"ID\" value=\"" . $_POST['ID'] . "\" />\n";
|
||||
echo " <input type=\"hidden\" name=\"formaction\" value=\"del\" />\n";
|
||||
echo " <br />\n";
|
||||
echo " <input type=\"submit\" class=\"button_del\" name=\"action\" value=\"1\" title=\"Fahrzeug jetzt löschen\" />\n";
|
||||
echo " <input type=\"submit\" class=\"button_stop\" name=\"formaction\" value=\"stop\" title=\"Abbrechen\" />\n";
|
||||
echo "</form>\n";
|
||||
echo "<br class=\"fix\" />\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'DELETE FROM
|
||||
' . PREFIX . '_KfZ
|
||||
WHERE
|
||||
ID = "' . $_POST['ID'] . '";';
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
unset($_POST);
|
||||
include __DIR__ . "/kfz.php";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Fehler beim löschen";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user