mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-07-21 19:23:32 +03:00
Implemented logs and zone searching.
This commit is contained in:
parent
4b5d4b02c9
commit
dde58c798c
3 changed files with 139 additions and 2 deletions
20
logs.php
20
logs.php
|
@ -27,7 +27,25 @@ case "list":
|
|||
if ($logging !== TRUE)
|
||||
jtable_respond(null, 'error', 'Logging is disabled');
|
||||
|
||||
jtable_respond(getlogs());
|
||||
$entries=getlogs();
|
||||
|
||||
if(!empty($_POST['user'])) {
|
||||
$entries=array_filter($entries,
|
||||
function ($val) {
|
||||
return(stripos($val['user'], $_POST['user']) !== FALSE);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if(!empty($_POST['entry'])) {
|
||||
$entries=array_filter($entries,
|
||||
function ($val) {
|
||||
return(stripos($val['log'], $_POST['entry']) !== FALSE);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
jtable_respond($entries);
|
||||
break;
|
||||
|
||||
case "delete":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue