mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:17:02 +02:00
added the webui to the tarball
This commit is contained in:
70
webui/controller/audit/audit.php
Normal file
70
webui/controller/audit/audit.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ControllerAuditAudit extends Controller {
|
||||
|
||||
public function index(){
|
||||
|
||||
$this->id = "content";
|
||||
$this->template = "audit/audit.tpl";
|
||||
$this->layout = "common/layout-search";
|
||||
|
||||
$request = Registry::get('request');
|
||||
$db = Registry::get('db');
|
||||
|
||||
$this->load->model('audit/audit');
|
||||
|
||||
|
||||
/*if(isset($this->request->post['searchterm'])) {
|
||||
$this->fixup_post_request();
|
||||
|
||||
$a = preg_replace("/\&loaded=1$/", "", $this->request->post['searchterm']);
|
||||
}*/
|
||||
|
||||
|
||||
$this->render();
|
||||
}
|
||||
|
||||
|
||||
private function fixup_post_request() {
|
||||
$i = 0;
|
||||
$a = array();
|
||||
|
||||
$this->data['blocks'] = array();
|
||||
|
||||
$this->data['searchterm'] = $this->request->post['searchterm'];
|
||||
|
||||
parse_str($this->request->post['searchterm'], $a);
|
||||
|
||||
foreach($a['f'] as $f) {
|
||||
$val = array_shift($a['v']);
|
||||
|
||||
if($val == '') { continue; }
|
||||
|
||||
if($i == 0) {
|
||||
$this->data['key0'] = 0;
|
||||
|
||||
if($f == 'user') { $this->data['key0'] = 0; }
|
||||
else if($f == 'ipaddr') { $this->data['key0'] = 1; }
|
||||
else if($f == 'ref') { $this->data['key0'] = 2; }
|
||||
|
||||
$this->data['val0'] = $val;
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
if(isset($a['date1'])) { $this->data['date1'] = $a['date1']; }
|
||||
if(isset($a['date2'])) { $this->data['date2'] = $a['date2']; }
|
||||
|
||||
if(isset($a['action'])) { $this->data['action'] = $a['action']; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user