-
Notifications
You must be signed in to change notification settings - Fork 2
/
monitor.php
41 lines (34 loc) · 974 Bytes
/
monitor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* @package EndlessMonitor
* @version 1.0
* @author OsipXD
* @copyright (c) 2015, Osip Fatkullin. All Rights Reserved.
* @link http://endlesscode.ru/
* @license GNU/GPLv2
*/
if (empty($_GET['server'])) {
die(' Empty params! ');
}
define('_EMRUN', true);
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', dirname(__FILE__) . DS);
require_once(ROOT . 'helpers/include.php');
defined('_HINC') or die(' System files are missing! ');
$info = '';
$tmploptions = '';
if (!empty($_GET['to'])) {
$tmploptions = $_GET['to'];
}
if (!empty($_GET['demo'])) {
$info = System::getDemoInfo($_GET['server']);
include(ROOT . 'tmpl/default.php');
die;
}
if (!file_exists('config.ini.php')) {
echo('Configuration doesn\'t exists.');
die;
}
$info = System::getInfo(System::secureId($_GET['server']));
/** @noinspection PhpIncludeInspection */
include(ROOT . 'tmpl/' . Config::get('system.template') . '.php');