Update view_log.php
This commit is contained in:
@@ -101,6 +101,23 @@ if($perms[2]!=="1"){
|
|||||||
echo '<tbody>';
|
echo '<tbody>';
|
||||||
|
|
||||||
while($row = $result->fetch_assoc()) {
|
while($row = $result->fetch_assoc()) {
|
||||||
|
// Apply filters
|
||||||
|
$show_entry = true;
|
||||||
|
if(isset($_GET["loglevel"]) && $_GET["loglevel"] !== "" && strpos($row["loglevel"], $_GET["loglevel"]) === false) {
|
||||||
|
$show_entry = false;
|
||||||
|
}
|
||||||
|
if(isset($_GET["logtext"]) && $_GET["logtext"] !== "" && strpos($row["logtext"], $_GET["logtext"]) === false) {
|
||||||
|
$show_entry = false;
|
||||||
|
}
|
||||||
|
if(isset($_GET["machine_id"]) && $_GET["machine_id"] !== "" && strpos($row["machine_id"], $_GET["machine_id"]) === false) {
|
||||||
|
$show_entry = false;
|
||||||
|
}
|
||||||
|
if(isset($_GET["time"]) && $_GET["time"] !== "" && strpos($row["time"], $_GET["time"]) === false) {
|
||||||
|
$show_entry = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Display the entry if it matches the filters
|
||||||
|
if($show_entry) {
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td>' . $row["id"] . '</td>';
|
echo '<td>' . $row["id"] . '</td>';
|
||||||
echo '<td>' . $row["loglevel"] . '</td>';
|
echo '<td>' . $row["loglevel"] . '</td>';
|
||||||
@@ -110,6 +127,7 @@ if($perms[2]!=="1"){
|
|||||||
echo '<td><a href="view_log.php?delete=' . $row["id"] . '">delete</a></td>';
|
echo '<td><a href="view_log.php?delete=' . $row["id"] . '">delete</a></td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo '</tbody>';
|
echo '</tbody>';
|
||||||
echo '</table>';
|
echo '</table>';
|
||||||
|
|||||||
Reference in New Issue
Block a user