From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../Praktikum5_6/f-fahrer.php | 161 +++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 Bachelor/Entwicklung webbasierter Anwendungen/Praktikum5_6/f-fahrer.php (limited to 'Bachelor/Entwicklung webbasierter Anwendungen/Praktikum5_6/f-fahrer.php') diff --git a/Bachelor/Entwicklung webbasierter Anwendungen/Praktikum5_6/f-fahrer.php b/Bachelor/Entwicklung webbasierter Anwendungen/Praktikum5_6/f-fahrer.php new file mode 100644 index 0000000..696a9fd --- /dev/null +++ b/Bachelor/Entwicklung webbasierter Anwendungen/Praktikum5_6/f-fahrer.php @@ -0,0 +1,161 @@ + $val) + { + //echo "$key $val \n"; + $auftrg_nr = substr($key,2); + } + //if (is_array($Best)) + { + foreach ($Best as $aktBest) { + if ($aktBest->AuftNr == $auftrg_nr) + { + $pzAktZust = $aktBest->getzustand(); + $newZustand=$pzAktZust; + if ($pzAktZust == 'fertig') + $newZustand = 'unterwegs'; + else if ($pzAktZust == 'unterwegs') + $newZustand = 'geliefert'; + } + } + } + /*else + { + echo "HERE" ; + }*/ + + $update_str = "UPDATE t_bestellung b SET Zustand='$newZustand' WHERE b.AuftragNr = '$auftrg_nr'"; + $res = mysql_query($update_str) or die('Query failed: ' . mysql_error()); + $del_str = "DELETE FROM t_bestellung WHERE Zustand = 'geliefert' or Zustand=''"; + $res = mysql_query($del_str) or die('Query failed: ' . mysql_error()); + } +?> + + + + + Fahrer + + + + + + +

Fahrer

+ "; + echo "
"; + //echo ""; + ?> + + + + + + + + + + adresse) + { + echo "\n"; + echo "\n"; + if ($aktZustand == 'fertig') { + echo "\n"; + echo "\n"; + } else if ($aktZustand == 'unterwegs') { + echo "\n"; + echo "\n"; + } else if ($aktZustand == 'geliefert') { + echo "\n"; + echo "\n"; + } + echo "\n"; + } + } + } + + ?> + + + + + +
+
+ unterwegs + geliefert +
"; + $aktName = $aktBest->getpiz_name(); + $nr = $aktBest->getauftnr(); + $aktZustand = $aktBest->getzustand(); + echo $aktName; + echo "
+ \n"; + $preis_query = "SELECT sum(Preis) FROM t_pizza p NATURAL JOIN t_bestellung WHERE Lieferadresse = '$akt_adr'"; + $preis_result = mysql_query($preis_query) or die('Query failed: ' . mysql_error()); + $preis = number_format(mysql_result($preis_result,0),2,".",","); + ?> + + + €
+
+ + \ No newline at end of file -- cgit v1.2.3