checkbox
This commit is contained in:
parent
0ae8f915c4
commit
e18ee929a6
28
config.php
28
config.php
@ -17,12 +17,12 @@ try {
|
|||||||
|
|
||||||
|
|
||||||
$arrVehicles = array (
|
$arrVehicles = array (
|
||||||
1 => "Fahrrad",
|
1 => "Fahrrad",
|
||||||
2 => "PKW",
|
2 => "PKW",
|
||||||
3 => "Fussgänger",
|
3 => "Fussgänger",
|
||||||
4 => "Kraftrad",
|
4 => "Kraftrad",
|
||||||
5 => "LKW",
|
5 => "LKW",
|
||||||
6 => "Sonstiges"
|
6 => "Sonstiges"
|
||||||
);
|
);
|
||||||
|
|
||||||
$arrVehicles_pl = array (
|
$arrVehicles_pl = array (
|
||||||
@ -35,16 +35,15 @@ $arrVehicles_pl = array (
|
|||||||
);
|
);
|
||||||
|
|
||||||
$arrWochentage = array (
|
$arrWochentage = array (
|
||||||
1 => "Sonntag",
|
1 => "Sonntag",
|
||||||
2 => "Montag",
|
2 => "Montag",
|
||||||
3 => "Dienstag",
|
3 => "Dienstag",
|
||||||
4 => "Mittwoch",
|
4 => "Mittwoch",
|
||||||
5 => "Donnerstag",
|
5 => "Donnerstag",
|
||||||
6 => "Freitag",
|
6 => "Freitag",
|
||||||
7 => "Samstag"
|
7 => "Samstag"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$arrCategory = array (
|
$arrCategory = array (
|
||||||
1 => "Unfall mit Getöteten",
|
1 => "Unfall mit Getöteten",
|
||||||
2 => "Unfall mit Schwerverletztem",
|
2 => "Unfall mit Schwerverletztem",
|
||||||
@ -108,7 +107,6 @@ $arrMarkerType = array (
|
|||||||
5=>"truckMarker",
|
5=>"truckMarker",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$arrIcon = array (
|
$arrIcon = array (
|
||||||
0 => "<i class='wa bg-primary fa fa-info'></i>",
|
0 => "<i class='wa bg-primary fa fa-info'></i>",
|
||||||
1 => "<i class='wa bg-danger fa fa-male'></i>",
|
1 => "<i class='wa bg-danger fa fa-male'></i>",
|
||||||
|
28
index.php
28
index.php
@ -220,9 +220,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<div id="loader"><img src="css/images/ajax-loader.gif"></div>
|
<div id="loader"><img src="css/images/ajax-loader.gif"></div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
// Map ----------------------------------------------------------------------
|
// Map ----------------------------------------------------------------------
|
||||||
|
|
||||||
var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>);
|
var mymap = L.map('mapid').setView([<?=$numInfoLat ?>, <?=$numInfoLng ?>], <?=$numZoom ?>);
|
||||||
@ -311,7 +310,6 @@
|
|||||||
|
|
||||||
if (jQuery(this).prop("checked")) {
|
if (jQuery(this).prop("checked")) {
|
||||||
jQuery.each(marker, function(key, value) {
|
jQuery.each(marker, function(key, value) {
|
||||||
console.log(value);
|
|
||||||
if (value) {
|
if (value) {
|
||||||
if (filter.match(value[1])) { value[0].addTo(mymap); }
|
if (filter.match(value[1])) { value[0].addTo(mymap); }
|
||||||
}
|
}
|
||||||
@ -325,11 +323,29 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function check_all(){
|
||||||
|
jQuery.each(marker, function(key, value) {
|
||||||
|
console.log(value);
|
||||||
|
if (value) { value[0].addTo(mymap); }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
function uncheck_all()
|
||||||
|
{
|
||||||
|
jQuery.each(marker, function(key, value) {
|
||||||
|
console.log(value);
|
||||||
|
if (value) { value[0].remove(); }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
$('#check_art').click(function(){
|
$('#check_art').click(function(){
|
||||||
if (jQuery(this).prop("checked")) {
|
if (jQuery(this).prop("checked")) {
|
||||||
$('.uart').prop( "checked", true );
|
$('.uart').prop( "checked", true );
|
||||||
|
check_all();
|
||||||
} else {
|
} else {
|
||||||
$('.uart').prop( "checked", false );
|
$('.uart').prop( "checked", false );
|
||||||
|
uncheck_all();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -337,24 +353,30 @@
|
|||||||
console.log("test");
|
console.log("test");
|
||||||
if (jQuery(this).prop("checked")) {
|
if (jQuery(this).prop("checked")) {
|
||||||
$('.ukat').prop( "checked", true );
|
$('.ukat').prop( "checked", true );
|
||||||
|
check_all();
|
||||||
} else {
|
} else {
|
||||||
$('.ukat').prop( "checked", false );
|
$('.ukat').prop( "checked", false );
|
||||||
|
uncheck_all();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#check_typ').click(function(){
|
$('#check_typ').click(function(){
|
||||||
if (jQuery(this).prop("checked")) {
|
if (jQuery(this).prop("checked")) {
|
||||||
$('.utyp').prop( "checked", true );
|
$('.utyp').prop( "checked", true );
|
||||||
|
check_all();
|
||||||
} else {
|
} else {
|
||||||
$('.utyp').prop( "checked", false );
|
$('.utyp').prop( "checked", false );
|
||||||
|
uncheck_all();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#check_art').click(function(){
|
$('#check_art').click(function(){
|
||||||
if (jQuery(this).prop("checked")) {
|
if (jQuery(this).prop("checked")) {
|
||||||
$('.uart').prop( "checked", true );
|
$('.uart').prop( "checked", true );
|
||||||
|
check_all();
|
||||||
} else {
|
} else {
|
||||||
$('.uart').prop( "checked", false );
|
$('.uart').prop( "checked", false );
|
||||||
|
uncheck_all();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -32,14 +32,14 @@ function generate_tooltip_description($row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function generate_category($row) {
|
function generate_category($row) {
|
||||||
$strReturn = "UART_".$row['UART']."|UKATEGORIE_".$row['UKATEGORIE']."|UTYP_".$row['UTYP1'];
|
$strReturn = "UART_".$row['UART']."|UKATEGORIE_".$row['UKATEGORIE']."|UTYP_".$row['UTYP1'];
|
||||||
if ($row['IstRad']) $strReturn .="|UBETEILIGT_RAD";
|
if ($row['IstRad']) $strReturn .="|UBETEILIGT_RAD";
|
||||||
if ($row['IstPKW']) $strReturn .="|UBETEILIGT_PKW";
|
if ($row['IstPKW']) $strReturn .="|UBETEILIGT_PKW";
|
||||||
if ($row['IstFuss']) $strReturn .="|UBETEILIGT_FUSS";
|
if ($row['IstFuss']) $strReturn .="|UBETEILIGT_FUSS";
|
||||||
if ($row['IstKrad']) $strReturn .="|UBETEILIGT_KRAD";
|
if ($row['IstKrad']) $strReturn .="|UBETEILIGT_KRAD";
|
||||||
if ($row['IstGkfz']) $strReturn .="|UBETEILIGT_LKW";
|
if ($row['IstGkfz']) $strReturn .="|UBETEILIGT_LKW";
|
||||||
if ($row['IstSonstige']) $strReturn .="|UBETEILIGT_SONSTIGES";
|
if ($row['IstSonstige']) $strReturn .="|UBETEILIGT_SONSTIGES";
|
||||||
return $strReturn;
|
return $strReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -106,20 +106,19 @@ function nl2br2($string) {
|
|||||||
$strTable.="<tr><td><input type='checkbox' name='UKATEGORIE_".$row['UKATEGORIE']."' id='UKATEGORIE_".$row['UKATEGORIE']."' class='check ukat' checked='checked' ></td>"
|
$strTable.="<tr><td><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";
|
."<td>".$arrCategory[$row['UKATEGORIE']]."</td><td>".$row['anz']."</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$strTable.="</table>";
|
$strTable.="</table>";
|
||||||
|
|
||||||
|
|
||||||
$strSQL="SELECT
|
$strSQL="SELECT
|
||||||
sum(IstRad) as rad,
|
sum(IstRad) as rad,
|
||||||
sum(IstPKW) as pkw,
|
sum(IstPKW) as pkw,
|
||||||
sum(IstFuss) as fuss,
|
sum(IstFuss) as fuss,
|
||||||
sum(IstKrad) as krad,
|
sum(IstKrad) as krad,
|
||||||
sum(IstGkfz) as lkw,
|
sum(IstGkfz) as lkw,
|
||||||
sum(IstSonstige) as sonstiges,
|
sum(IstSonstige) as sonstiges,
|
||||||
count(*) as summe
|
count(*) as summe
|
||||||
FROM data
|
FROM data
|
||||||
WHERE ".$strWhere.$strYear.$strLocation;
|
WHERE ".$strWhere.$strYear.$strLocation;
|
||||||
|
|
||||||
$result = $db->query($strSQL);
|
$result = $db->query($strSQL);
|
||||||
$strTable.="<h5><input type='checkbox' id='check_beteiligt' class='check_header' checked='checked'>Unfallbeteiligte</h5>";
|
$strTable.="<h5><input type='checkbox' id='check_beteiligt' class='check_header' checked='checked'>Unfallbeteiligte</h5>";
|
||||||
@ -132,7 +131,6 @@ function nl2br2($string) {
|
|||||||
$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_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_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><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
|
$strSQL="SELECT count(*) as count
|
||||||
|
Loading…
Reference in New Issue
Block a user