AddressDB Status change UI

This commit is contained in:
Frank Schubert
2024-12-06 13:35:55 +01:00
parent 40e9aaf505
commit 3a7b356b30
7 changed files with 593 additions and 10 deletions

View File

@@ -120,6 +120,7 @@ class ADBStatusModel {
$where = "1=1 ";
//var_dump($filter);exit;
$db = FronkDB::singleton(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
if(array_key_exists("code", $filter)) {
$code = $filter['code'];
@@ -127,6 +128,20 @@ class ADBStatusModel {
$where .= " AND code=$code";
}
}
if(array_key_exists("type", $filter)) {
$type = $db->escape($filter['type']);
if($type) {
$where .= " AND type='$type'";
}
}
if(array_key_exists("!type", $filter)) {
$type = $db->escape($filter['!type']);
if($type) {
$where .= " AND (type IS NULL OR NOT type='$type')";
}
}
//var_dump($filter, $where);exit;