Finished MaintenanceNotification

This commit is contained in:
Frank Schubert
2024-11-13 18:15:24 +01:00
parent 97dc4446dc
commit 47f71f2310
8 changed files with 465 additions and 14 deletions

View File

@@ -354,12 +354,17 @@ class AddressModel {
}
}
if (array_key_exists("zip", $filter)) {
$zip = FronkDB::singleton()->escape($filter["zip"]);
if ($zip) {
$where .= " AND zip like '%$zip%'";
if(array_key_exists("zip", $filter)) {
$zip = $filter['zip'];
if(is_array($zip)) {
if(count($zip)) {
$where .= " AND Address.zip IN ('".implode("','", $zip)."')";
}
} elseif($zip) {
$zip = FronkDB::singleton()->escape($filter['zip']);
$where .= " AND Contract.zip LIKE '%$zip%'";
}
}
}
if (array_key_exists("city", $filter)) {
$city = FronkDB::singleton()->escape($filter["city"]);
@@ -427,7 +432,7 @@ class AddressModel {
//var_dump($filter);exit;
if (array_key_exists("parent_id", $filter)) {
$parentid = $filter['parent_id'];
if ($parentid === null || $parent_id == "null") {
if ($parentid === null || $parentid == "null") {
$where .= " AND parent_id IS NULL";
} elseif (is_numeric($parentid)) {
$where .= " AND parent_id=$parentid";