|
|
|
@ -97,13 +97,13 @@ function nl2br2($string) {
|
|
|
|
|
global $arrCategory;
|
|
|
|
|
global $strLocation;
|
|
|
|
|
|
|
|
|
|
$strTable="<h5><input type='checkbox' id='check_kat' class='check_header' checked='checked'>Unfallkategorie</h5>";
|
|
|
|
|
$strTable="<h5><input type='radio' value='UKAT' name='kategorie' class='radio_header' checked='checked'>Unfallkategorie</h5>";
|
|
|
|
|
$strTable.="<table class='statistik'>";
|
|
|
|
|
$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.="<tr><td><input type='checkbox' name='UKATEGORIE_".$row['UKATEGORIE']."' id='UKATEGORIE_".$row['UKATEGORIE']."' class='check ukat' checked='checked' ></td>"
|
|
|
|
|
$strTable.="<tr><td class='td_ukat'><input type='checkbox' name='UKATEGORIE_".$row['UKATEGORIE']."' id='UKATEGORIE_".$row['UKATEGORIE']."' class='check ukat' checked='checked' ></td>"
|
|
|
|
|
."<td>".$arrCategory[$row['UKATEGORIE']]."</td><td>".$row['anz']."</td></tr>\n";
|
|
|
|
|
}
|
|
|
|
|
$strTable.="</table>";
|
|
|
|
@ -121,22 +121,16 @@ function nl2br2($string) {
|
|
|
|
|
WHERE ".$strWhere.$strYear.$strLocation;
|
|
|
|
|
|
|
|
|
|
$result = $db->query($strSQL);
|
|
|
|
|
$strTable.="<h5><input type='checkbox' id='check_beteiligt' class='check_header' checked='checked'>Unfallbeteiligte</h5>";
|
|
|
|
|
$strTable.="<h5><input type='radio' value='UBET' name='kategorie' class='radio_header'>Unfallbeteiligte</h5>";
|
|
|
|
|
$strTable.="<table class='statistik'>";
|
|
|
|
|
//$strTable.="<tr><th>Unfallbeteiligte</th><th>Anzahl</th></tr>";
|
|
|
|
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
|
|
|
|
$strTable.="<tr><td><input type='checkbox' name='UBETEILIGT_RAD' id='BETEILIGT_RAD' class='check' checked='checked' ></td><td>Fahrräder</td><td>".$row['rad']."</td></tr>";
|
|
|
|
|
$strTable.="<tr><td><input type='checkbox' name='UBETEILIGT_PKW' id='BETEILIGT_PKW' class='check' checked='checked' ></td><td>PKWs</td><td>".$row['pkw']."</td></tr>";
|
|
|
|
|
$strTable.="<tr><td><input type='checkbox' name='UBETEILIGT_FUSS' id='BETEILIGT_FUSS' class='check' checked='checked' ></td><td>Fussgänger</td><td>".$row['fuss']."</td></tr>";
|
|
|
|
|
$strTable.="<tr><td><input type='checkbox' name='UBETEILIGT_KRAD' id='BETEILIGT_KRAD' class='check' checked='checked' ></td><td>Krafträder</td><td>".$row['krad']."</td></tr>";
|
|
|
|
|
$strTable.="<tr><td><input type='checkbox' name='UBETEILIGT_LKW' id='BETEILIGT_LKW' class='check' checked='checked' ></td><td>LKWs</td><td>".$row['lkw']."</td></tr>\n";
|
|
|
|
|
$strTable.="<tr><td><input type='checkbox' name='UBETEILIGT_SONSTIGES' id='BETEILIGT_SONSTIGES' class='check' checked='checked' ></td><td>Sonstiges</td><td>".$row['sonstiges']."</td></tr>\n";
|
|
|
|
|
$strTable.="<tr><td class='td_ubet'><input type='checkbox' name='UBETEILIGT_RAD' id='BETEILIGT_RAD' class='check' checked='checked' ></td><td>Fahrräder</td><td>".$row['rad']."</td></tr>";
|
|
|
|
|
$strTable.="<tr><td class='td_ubet'><input type='checkbox' name='UBETEILIGT_PKW' id='BETEILIGT_PKW' class='check' checked='checked' ></td><td>PKWs</td><td>".$row['pkw']."</td></tr>";
|
|
|
|
|
$strTable.="<tr><td class='td_ubet'><input type='checkbox' name='UBETEILIGT_FUSS' id='BETEILIGT_FUSS' class='check' checked='checked' ></td><td>Fussgänger</td><td>".$row['fuss']."</td></tr>";
|
|
|
|
|
$strTable.="<tr><td class='td_ubet'><input type='checkbox' name='UBETEILIGT_KRAD' id='BETEILIGT_KRAD' class='check' checked='checked' ></td><td>Krafträder</td><td>".$row['krad']."</td></tr>";
|
|
|
|
|
$strTable.="<tr><td class='td_ubet'><input type='checkbox' name='UBETEILIGT_LKW' id='BETEILIGT_LKW' class='check' checked='checked' ></td><td>LKWs</td><td>".$row['lkw']."</td></tr>\n";
|
|
|
|
|
$strTable.="<tr><td class='td_ubet'><input type='checkbox' name='UBETEILIGT_SONSTIGES' id='BETEILIGT_SONSTIGES' class='check' checked='checked' ></td><td>Sonstiges</td><td>".$row['sonstiges']."</td></tr>\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.="<tr><td></td><td>Alleinunfälle und Unfälle mit geicher Fahrzeugart</td><td>".$row['count']."</td></tr>";
|
|
|
|
|
$strTable.="<tr><td class='td_ubet'></td><td>Alleinunfälle und Unfälle mit geicher Fahrzeugart</td><td>".$row['count']."</td></tr>";
|
|
|
|
|
}
|
|
|
|
|
$strTable.="</table>";
|
|
|
|
|
|
|
|
|
@ -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.="<h5><input type='checkbox' id='check_typ' class='check_header' checked='checked'>Unfalltyp</h5>";
|
|
|
|
|
$strTable.="<h5><input type='radio' value='UTYP' name='kategorie' class='radio_header'>Unfalltyp</h5>";
|
|
|
|
|
$strTable.="<table class='statistik'>";
|
|
|
|
|
$result = $db->query($strSQL);
|
|
|
|
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
|
|
|
|
$strTable.="<tr><td><input type='checkbox' name='UTYP_".$row['UTYP1']."' id='UTYP_".$row['UTYP1']."' class='check utyp' checked='checked' ></td>"
|
|
|
|
|
$strTable.="<tr><td class='td_utyp'><input type='checkbox' name='UTYP_".$row['UTYP1']."' id='UTYP_".$row['UTYP1']."' class='check utyp' checked='checked' ></td>"
|
|
|
|
|
."<td>".$arrUnfalltyp[$row['UTYP1']]."</td><td>".$row['anz']."</td></tr>\n";
|
|
|
|
|
}
|
|
|
|
|
$strTable.="</table>";
|
|
|
|
@ -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.="<h5><input type='checkbox' id='check_art' class='check_header' checked='checked'>Unfallart</h5>";
|
|
|
|
|
$strTable.="<h5><input type='radio' value='UART' name='kategorie' class='radio_header'>Unfallart</h5>";
|
|
|
|
|
$strTable.="<table class='statistik'>";
|
|
|
|
|
$result = $db->query($strSQL);
|
|
|
|
|
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
|
|
|
|
|
$strTable.="<tr><td><input type='checkbox' name='UART_".$row['UART']."' id='UART_".$row['UART']."' class='check uart' checked='checked' ></td>"
|
|
|
|
|
$strTable.="<tr><td class='td_uart'><input type='checkbox' name='UART_".$row['UART']."' id='UART_".$row['UART']."' class='check uart' checked='checked' ></td>"
|
|
|
|
|
."<td>".$arrUnfallart[$row['UART']]."</td><td>".$row['anz']."</td></tr>\n";
|
|
|
|
|
}
|
|
|
|
|
$strTable.="</table>";
|
|
|
|
|