From b2ad23bd9772ed162a4f9e70d0eb843ad2b84050 Mon Sep 17 00:00:00 2001 From: Walter Hupfeld Date: Sun, 30 Jul 2023 16:58:10 +0200 Subject: [PATCH] filter_1 --- css/style.css | 4 ++- index.php | 76 +++++++++++++++++------------------------------ lib/functions.php | 34 +++++++++------------ 3 files changed, 45 insertions(+), 69 deletions(-) diff --git a/css/style.css b/css/style.css index 7baa7f9..e2b7d33 100644 --- a/css/style.css +++ b/css/style.css @@ -93,4 +93,6 @@ i.wa { h5 {margin-top:15px;} -.statistik td, th {border: 1px solid grey; font-size: smaller;} \ No newline at end of file +.statistik td, th {border: 1px solid grey; font-size: smaller;} + +.radio_header {margin-right:7px;} diff --git a/index.php b/index.php index 7da5611..b576cd8 100644 --- a/index.php +++ b/index.php @@ -224,6 +224,7 @@ \ No newline at end of file diff --git a/lib/functions.php b/lib/functions.php index e0500da..3d1e817 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -97,13 +97,13 @@ function nl2br2($string) { global $arrCategory; global $strLocation; - $strTable="
Unfallkategorie
"; + $strTable="
Unfallkategorie
"; $strTable.=""; $strSQL="SELECT UKATEGORIE, count(UKATEGORIE) as anz FROM data WHERE ".$strWhere.$strYear.$strLocation." GROUP BY UKATEGORIE"; $result = $db->query($strSQL); while ($row = $result->fetch(PDO::FETCH_ASSOC)) { - $strTable.="" + $strTable.="" ."\n"; } $strTable.="
".$arrCategory[$row['UKATEGORIE']]."".$row['anz']."
"; @@ -121,22 +121,16 @@ function nl2br2($string) { WHERE ".$strWhere.$strYear.$strLocation; $result = $db->query($strSQL); - $strTable.="
Unfallbeteiligte
"; + $strTable.="
Unfallbeteiligte
"; $strTable.=""; - //$strTable.=""; while ($row = $result->fetch(PDO::FETCH_ASSOC)) { - $strTable.=""; - $strTable.=""; - $strTable.=""; - $strTable.=""; - $strTable.="\n"; - $strTable.="\n"; + $strTable.=""; + $strTable.=""; + $strTable.=""; + $strTable.=""; + $strTable.="\n"; + $strTable.="\n"; } - /* - $strSQL="SELECT count(*) as count - FROM data - WHERE IstRad=0 and IstPKW=0 and IstFuss=0 and IstKrad=0 and IstGkfz=0 and IstSonstige=0"; - */ switch ($numVehicle) { case 1: case 0: @@ -167,7 +161,7 @@ function nl2br2($string) { $result = $db->query($strSQL.$strYear); if ($row = $result->fetch(PDO::FETCH_ASSOC)) { - $strTable.=""; + $strTable.=""; } $strTable.="
UnfallbeteiligteAnzahl
Fahrräder".$row['rad']."
PKWs".$row['pkw']."
Fussgänger".$row['fuss']."
Krafträder".$row['krad']."
LKWs".$row['lkw']."
Sonstiges".$row['sonstiges']."
Fahrräder".$row['rad']."
PKWs".$row['pkw']."
Fussgänger".$row['fuss']."
Krafträder".$row['krad']."
LKWs".$row['lkw']."
Sonstiges".$row['sonstiges']."
Alleinunfälle und Unfälle mit geicher Fahrzeugart".$row['count']."
Alleinunfälle und Unfälle mit geicher Fahrzeugart".$row['count']."
"; @@ -176,11 +170,11 @@ function nl2br2($string) { //Unfalltyp $strSQL="SELECT UTYP1, count(UTYP1) as anz FROM data WHERE ".$strWhere.$strYear.$strLocation." GROUP BY UTYP1"; - $strTable.="
Unfalltyp
"; + $strTable.="
Unfalltyp
"; $strTable.=""; $result = $db->query($strSQL); while ($row = $result->fetch(PDO::FETCH_ASSOC)) { - $strTable.="" + $strTable.="" ."\n"; } $strTable.="
".$arrUnfalltyp[$row['UTYP1']]."".$row['anz']."
"; @@ -188,11 +182,11 @@ function nl2br2($string) { //Unfallart $strSQL="SELECT UART, count(UART) as anz FROM data WHERE ".$strWhere.$strYear.$strLocation." GROUP BY UART"; - $strTable.="
Unfallart
"; + $strTable.="
Unfallart
"; $strTable.=""; $result = $db->query($strSQL); while ($row = $result->fetch(PDO::FETCH_ASSOC)) { - $strTable.="" + $strTable.="" ."\n"; } $strTable.="
".$arrUnfallart[$row['UART']]."".$row['anz']."
";