Added abililty to filter by alert state Ok or Alert

This commit is contained in:
laf
2016-05-02 19:40:12 +00:00
parent c260adeb5b
commit aefbde3df0
2 changed files with 17 additions and 1 deletions

View File

@@ -7,6 +7,11 @@ if (is_numeric($_POST['device_id'])) {
$param[] = $_POST['device_id'];
}
if ($_POST['state'] >= 0) {
$where .= ' AND `E`.`state` = ?';
$param[] = mres($_POST['state']);
}
if ($_SESSION['userlevel'] >= '5') {
$sql = " FROM `alert_log` AS E LEFT JOIN devices AS D ON E.device_id=D.device_id RIGHT JOIN alert_rules AS R ON E.rule_id=R.id WHERE $where";
}