mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-06-07 00:47:00 +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
27
zones.php
27
zones.php
|
@ -188,6 +188,31 @@ case "listrecords":
|
|||
$zone = new Zone();
|
||||
$zone->parse($zonedata);
|
||||
$records = $zone->rrsets2records();
|
||||
|
||||
if(!empty($_POST['label'])) {
|
||||
$records=array_filter($records,
|
||||
function ($val) {
|
||||
return(stripos($val['name'], $_POST['label']) !== FALSE);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if(!empty($_POST['type'])) {
|
||||
$records=array_filter($records,
|
||||
function ($val) {
|
||||
return($val['type'] == $_POST['type']);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if(!empty($_POST['content'])) {
|
||||
$records=array_filter($records,
|
||||
function ($val) {
|
||||
return(stripos($val['content'], $_POST['content']) !== FALSE);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($_GET['jtSorting'])) {
|
||||
list($scolumn, $sorder) = preg_split("/ /", $_GET['jtSorting']);
|
||||
switch ($scolumn) {
|
||||
|
@ -488,4 +513,4 @@ default:
|
|||
}
|
||||
} catch (Exception $e) {
|
||||
jtable_respond(null, 'error', $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue