Update view_log.php

This commit is contained in:
jakani24
2024-01-21 16:38:10 +01:00
parent f032302f18
commit e289cd9638

View File

@@ -97,16 +97,32 @@ if($perms[2]!=="1"){
$result = $stmt->get_result(); $result = $stmt->get_result();
$row = $result->fetch_assoc(); $row = $result->fetch_assoc();
$last_id=$row["id"]; $last_id=$row["id"];
$loglevel=$row["username"]; $loglevel=$row["loglevel"];
$logtext=$row["email"]; $logtext=$row["logtext"];
$machine_id=$row["perms"]; $machine_id=$row["machine_id"];
echo('<tr>'); $show=true;
echo('<td>'.$last_id.'</td>'); if(isset($_GET["loglevel"])){
echo('<td>'.$loglevel.'</td>'); if(!strpos($loglevel,$_GET["loglevel"])){
echo('<td>'.$logtext.'</td>'); $show=false;
echo('<td>'.$machine_id.'</td>'); }
//echo('<td><a href="user_list.php?delete='.$last_id.'">delete</a></td>'); }if(isset($_GET["logtext"])){
echo('</tr>'); if(!strpos($logtext,$_GET["logtext"])){
$show=false;
}
}if(isset($_GET["machine_id"])){
if(!strpos($machine_id,$_GET["machine_id"])){
$show=false;
}
}
if($show==true){
echo('<tr>');
echo('<td>'.$last_id.'</td>');
echo('<td>'.$loglevel.'</td>');
echo('<td>'.$logtext.'</td>');
echo('<td>'.$machine_id.'</td>');
//echo('<td><a href="user_list.php?delete='.$last_id.'">delete</a></td>');
echo('</tr>');
}
$stmt->close(); $stmt->close();
$num_of_log_entrys--; $num_of_log_entrys--;
} }