New upstream version 0.6.27

This commit is contained in:
geos_one
2025-08-06 18:11:51 +02:00
parent a6b4158f1f
commit 56a986c0ba
563 changed files with 45811 additions and 35282 deletions

View File

@@ -1,80 +1,103 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
<?php
// phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
// phpcs:disable PSR1.Files.SideEffects
defined('SYSPATH') or die('No direct access allowed.');
// phpcs:enable PSR1.Files.SideEffects
// phpcs:disable Squiz.Classes.ValidClassName.NotCamelCaps
/**
* Graph controller.
*
* @package PNP4Nagios
* @author Joerg Linge
* @license GPL
* @package PNP4Nagios
* @author Joerg Linge
* @license GPL
*/
class Page_Controller extends System_Controller {
class Page_Controller extends System_Controller
{
public $is_authorized = '';
public function __construct(){
public $page = '';
public $pages = '';
public function __construct()
{
parent::__construct();
$this->template = $this->add_view('template');
$this->template->page = $this->add_view('page');
$this->template->zoom_header = $this->add_view('zoom_header');
$this->template->zoom_header->graph_width = ($this->config->conf['graph_width'] + 140);
$this->template->zoom_header->graph_height = ($this->config->conf['graph_height'] + 230);
$this->template->page->graph_content = $this->add_view('graph_content');
$this->template->page->graph_content->graph_width = ($this->config->conf['graph_width'] + 85);
$this->template = $this->add_view('template');
$this->template->page = $this->add_view('page');
$this->template->zoom_header = $this->add_view('zoom_header');
$this->template->zoom_header->graph_width = ($this->config->conf['zgraph_width'] + 140);
$this->template->zoom_header->graph_height = ($this->config->conf['zgraph_height'] + 230);
$this->template->page->graph_content = $this->add_view('graph_content');
$this->template->page->graph_content->graph_width = ($this->config->conf['graph_width'] + 85);
$this->template->page->graph_content->timerange_select = $this->add_view('timerange_select');
$this->template->page->header = $this->add_view('header');
$this->template->page->search_box = $this->add_view('search_box');
$this->template->page->logo_box = $this->add_view('logo_box');
$this->is_authorized=TRUE;
$this->template->page->header = $this->add_view('header');
$this->template->page->search_box = $this->add_view('search_box');
$this->template->page->logo_box = $this->add_view('logo_box');
$this->is_authorized = true;
}
//end __construct()
public function index(){
if( !$this->isAuthorizedFor('pages') ){
public function index()
{
if (!$this->isAuthorizedFor('pages')) {
throw new Kohana_Exception('error.auth-pages');
}
$this->page = pnp::clean($this->input->get('page'));
if($this->page == ""){
if ($this->page == '') {
$this->page = $this->data->getFirstPage();
}
if($this->page == ""){
if ($this->page == '') {
throw new Kohana_Exception('error.page-config-dir', $this->config->conf['page_dir']);
}
if($this->view == ""){
if ($this->view == '') {
$this->view = $this->config->conf['overview-range'];
}
$this->data->buildPageStruct($this->page,$this->view);
$this->template->page->header->title = Kohana::lang('common.page',$this->data->PAGE_DEF['page_name']);
$this->data->buildPageStruct($this->page, $this->view);
$this->template->page->header->title = Kohana::lang('common.page', $this->data->PAGE_DEF['page_name']);
$this->url = "?page&page=$this->page";
// Timerange Box Vars
$this->template->page->timerange_box = $this->add_view('timerange_box');
$this->template->page->timerange_box = $this->add_view('timerange_box');
$this->template->page->timerange_box->timeranges = $this->data->TIMERANGE;
// Pages Box
$this->pages = $this->data->getPages();
$this->template->page->pages_box = $this->add_view('pages_box');
$this->template->page->pages_box->pages = $this->pages;
$this->template->page->pages_box = $this->add_view('pages_box');
$this->template->page->pages_box->pages = $this->pages;
// Basket Box
$this->template->page->basket_box = $this->add_view('basket_box');
// Icon Box
$this->template->page->basket_box = $this->add_view('basket_box');
// Icon Box
$this->template->page->icon_box = $this->add_view('icon_box');
$this->template->page->icon_box->position = "page";
$this->template->page->icon_box->position = 'page';
}
//end index()
public function basket(){
$basket = $this->session->get("basket");
if(is_array($basket) && sizeof($basket) > 0){
$this->data->buildBasketStruct($basket,$this->view);
$this->template->page->basket_box = $this->add_view('basket_box');
$this->template->page->header->title = Kohana::lang('common.page-basket');
$this->url = "basket?";
public function basket()
{
$basket = $this->session->get('basket');
if (is_array($basket) && (!empty($basket))) {
$this->data->buildBasketStruct($basket, $this->view);
$this->template->page->basket_box = $this->add_view('basket_box');
$this->template->page->header->title = Kohana::lang('common.page-basket');
$this->url = 'basket?';
// Timerange Box Vars
$this->template->page->timerange_box = $this->add_view('timerange_box');
$this->template->page->timerange_box = $this->add_view('timerange_box');
$this->template->page->timerange_box->timeranges = $this->data->TIMERANGE;
// Pages Box
$this->pages = $this->data->getPages();
$this->template->page->pages_box = $this->add_view('pages_box');
$this->template->page->pages_box->pages = $this->pages;
// Icon Box
$this->template->page->pages_box = $this->add_view('pages_box');
$this->template->page->pages_box->pages = $this->pages;
// Icon Box
$this->template->page->icon_box = $this->add_view('icon_box');
$this->template->page->icon_box->position = "basket";
}else{
url::redirect("start", 302);
$this->template->page->icon_box->position = 'basket';
} else {
url::redirect('start', 302);
}
}
//end basket()
}
//end class