nagiosql/admin/mutdialog.php

65 lines
2.3 KiB
PHP
Raw Normal View History

2017-05-22 11:24:21 +02:00
<?php
///////////////////////////////////////////////////////////////////////////////
//
// NagiosQL
//
///////////////////////////////////////////////////////////////////////////////
//
2019-04-17 11:40:50 +02:00
// (c) 2005-2018 by Martin Willisegger
2017-05-22 11:24:21 +02:00
//
// Project : NagiosQL
// Component : Admin timeperiod definitions
2019-04-17 11:40:50 +02:00
// Website : https://sourceforge.net/projects/nagiosql/
// Date : $LastChangedDate: 2018-04-10 10:48:30 +0200 (Tue, 10 Apr 2018) $
2017-05-22 11:24:21 +02:00
// Author : $LastChangedBy: martin $
2019-04-17 11:40:50 +02:00
// Version : 3.4.0
// GIT Repo : https://gitlab.com/wizonet/NagiosQL
2017-05-22 11:24:21 +02:00
//
///////////////////////////////////////////////////////////////////////////////
//
2019-04-17 11:40:50 +02:00
// Path settings
// ===================
$strPattern = '(admin/[^/]*.php)';
$preRelPath = preg_replace($strPattern, '', filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_STRING));
$preBasePath = preg_replace($strPattern, '', filter_input(INPUT_SERVER, 'SCRIPT_FILENAME', FILTER_SANITIZE_STRING));
//
2017-05-22 11:24:21 +02:00
// Define common variables
// =======================
2019-04-17 11:40:50 +02:00
$preContent = 'admin/mutdialog.htm.tpl';
2017-05-22 11:24:21 +02:00
//
// Process post parameters
// =======================
2019-04-17 11:40:50 +02:00
$intExclude = filter_input(INPUT_GET, 'exclude', FILTER_VALIDATE_INT, array('options' => array('default' => 0)));
$chkObject = filter_input(INPUT_GET, 'object', FILTER_SANITIZE_STRING);
2017-05-22 11:24:21 +02:00
//
// Include preprocessing file
// ==========================
$preAccess = 1;
$preFieldvars = 1;
$preNoMain = 1;
2019-04-17 11:40:50 +02:00
require $preBasePath.'functions/prepend_adm.php';
2017-05-22 11:24:21 +02:00
//
// Include content
// ===============
2019-04-17 11:40:50 +02:00
$conttp->setVariable('BASE_PATH', $_SESSION['SETS']['path']['base_url']);
$conttp->setVariable('OPENER_FIELD', $chkObject);
$conttp->parse('header');
$conttp->show('header');
2017-05-22 11:24:21 +02:00
//
// Form
// ====
2019-04-17 11:40:50 +02:00
foreach ($arrDescription as $elem) {
$conttp->setVariable($elem['name'], $elem['string']);
2017-05-22 11:24:21 +02:00
}
2019-04-17 11:40:50 +02:00
$conttp->setVariable('OPENER_FIELD', $chkObject);
$conttp->setVariable('ACTION_INSERT', filter_input(INPUT_SERVER, 'PHP_SELF', FILTER_SANITIZE_STRING));
$conttp->setVariable('IMAGE_PATH', $_SESSION['SETS']['path']['base_url']. 'images/');
$conttp->setVariable('AVAILABLE', translate('Available'));
$conttp->setVariable('SELECTED', translate('Selected'));
2017-05-22 11:24:21 +02:00
if (($intExclude == 1) || ($intVersion < 3)) {
2019-04-17 11:40:50 +02:00
$conttp->setVariable('DISABLE_HTML_BEGIN', '<!--');
$conttp->setVariable('DISABLE_HTML_END', '-->');
2017-05-22 11:24:21 +02:00
}
2019-04-17 11:40:50 +02:00
$conttp->parse('datainsert');
$conttp->show('datainsert');