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:
33
webui/controller/common/error.php
Normal file
33
webui/controller/common/error.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ControllerCommonError extends Controller {
|
||||
|
||||
public function index(){
|
||||
|
||||
$this->id = "content";
|
||||
$this->template = "common/error.tpl";
|
||||
$this->layout = "common/layout";
|
||||
|
||||
$this->document->title = $this->data['text_error'];
|
||||
|
||||
$this->data['errortitle'] = $this->data['text_error'];
|
||||
|
||||
if(isset($_SESSION['error'])){
|
||||
$this->data['errorstring'] = $_SESSION['error'];
|
||||
unset($_SESSION['error']);
|
||||
}
|
||||
else {
|
||||
$this->data['errorstring'] = "this is the errorstring";
|
||||
}
|
||||
|
||||
|
||||
$this->render();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
18
webui/controller/common/footer.php
Normal file
18
webui/controller/common/footer.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ControllerCommonFooter extends Controller {
|
||||
|
||||
protected function index() {
|
||||
|
||||
$this->id = "footer";
|
||||
$this->template = "common/footer.tpl";
|
||||
|
||||
|
||||
$this->render();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
16
webui/controller/common/layout-empty.php
Normal file
16
webui/controller/common/layout-empty.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
class ControllerCommonLayoutempty extends Controller {
|
||||
|
||||
protected function index() {
|
||||
|
||||
$this->template = "common/layout-empty.tpl";
|
||||
|
||||
$this->render();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
26
webui/controller/common/layout-health.php
Normal file
26
webui/controller/common/layout-health.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
class ControllerCommonLayoutHealth extends Controller {
|
||||
|
||||
protected function index() {
|
||||
|
||||
|
||||
$this->data['title'] = $this->document->title;
|
||||
|
||||
$this->template = "common/layout-health.tpl";
|
||||
|
||||
|
||||
$this->children = array(
|
||||
"common/menu",
|
||||
"common/footer"
|
||||
);
|
||||
|
||||
$this->render();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
37
webui/controller/common/layout-search.php
Normal file
37
webui/controller/common/layout-search.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
class ControllerCommonLayoutSearch extends Controller {
|
||||
|
||||
protected function index() {
|
||||
|
||||
|
||||
$this->data['title'] = $this->document->title;
|
||||
|
||||
$this->template = "common/layout-search.tpl";
|
||||
|
||||
$this->data['search_args'] = '';
|
||||
|
||||
$this->data['open_saved_search_box'] = 0;
|
||||
|
||||
|
||||
if(isset($_SERVER['REQUEST_URI'])) {
|
||||
$this->data['search_args'] = preg_replace("/\/([\w]+)\.php\?{0,1}/", "", $_SERVER['REQUEST_URI']);
|
||||
|
||||
if(preg_match("/\&a\=1/", $this->data['search_args'])) { $this->data['open_saved_search_box'] = 1; }
|
||||
}
|
||||
|
||||
|
||||
$this->children = array(
|
||||
"common/menu",
|
||||
"common/footer"
|
||||
);
|
||||
|
||||
$this->render();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
26
webui/controller/common/layout.php
Normal file
26
webui/controller/common/layout.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
class ControllerCommonLayout extends Controller {
|
||||
|
||||
protected function index() {
|
||||
|
||||
|
||||
$this->data['title'] = $this->document->title;
|
||||
|
||||
$this->template = "common/layout.tpl";
|
||||
|
||||
|
||||
$this->children = array(
|
||||
"common/menu",
|
||||
"common/footer"
|
||||
);
|
||||
|
||||
$this->render();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
30
webui/controller/common/menu.php
Normal file
30
webui/controller/common/menu.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ControllerCommonMenu extends Controller {
|
||||
|
||||
protected function index() {
|
||||
|
||||
$this->id = "menu";
|
||||
$this->template = "common/menu.tpl";
|
||||
|
||||
|
||||
$db = Registry::get('db');
|
||||
|
||||
$this->data['admin_user'] = Registry::get('admin_user');
|
||||
$this->data['auditor_user'] = Registry::get('auditor_user');
|
||||
$this->data['readonly_admin'] = Registry::get('readonly_admin');
|
||||
|
||||
if($this->data['admin_user'] == 1) { $this->template = "common/menu-admin.tpl"; }
|
||||
|
||||
$this->render();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
23
webui/controller/common/not_found.php
Normal file
23
webui/controller/common/not_found.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ControllerCommonNotfound extends Controller {
|
||||
|
||||
public function index(){
|
||||
|
||||
$this->id = "content";
|
||||
$this->template = "common/not_found.tpl";
|
||||
$this->layout = "common/layout";
|
||||
|
||||
$this->document->title = $this->data['title_not_found'];
|
||||
|
||||
|
||||
$this->render();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
Reference in New Issue
Block a user