AddressDB Status change UI
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user