Removed dependencies, after removing the mobile version
This commit is contained in:
parent
ad7df7e0fa
commit
cc042e28e6
5 changed files with 11 additions and 33 deletions
|
@ -2,7 +2,6 @@
|
|||
if (!DEFINED('EGP'))
|
||||
exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
|
||||
|
||||
$device = '!mobile';
|
||||
// Подключение filp/whoops
|
||||
$whoops = new \Whoops\Run;
|
||||
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
|
||||
|
|
|
@ -215,7 +215,7 @@ class ctrl
|
|||
|
||||
public static function route($server, $inc, $go)
|
||||
{
|
||||
global $device, $start_point;
|
||||
global $start_point;
|
||||
|
||||
if (in_array($server['status'], array('install', 'reinstall', 'update', 'recovery'))) {
|
||||
if ($go)
|
||||
|
@ -232,7 +232,7 @@ class ctrl
|
|||
|
||||
public static function cpulist($unit, $core, $count = false)
|
||||
{
|
||||
global $device, $start_point;
|
||||
global $start_point;
|
||||
|
||||
include(LIB . 'ssh.php');
|
||||
|
||||
|
|
|
@ -56,23 +56,11 @@ class html
|
|||
|
||||
public function get($name, $path = '')
|
||||
{
|
||||
global $device, $cfg;
|
||||
|
||||
$path_root = $device == '!mobile' ? '' : 'megp/';
|
||||
|
||||
$path = $path_root . $path;
|
||||
global $cfg;
|
||||
|
||||
if ($path != '')
|
||||
$name = str_replace('//', '/', $path . '/' . $name);
|
||||
|
||||
if (!file_exists($this->dir . '/' . $name . '.html')) {
|
||||
$route = explode('/', $name);
|
||||
$namefile = end($route);
|
||||
$dir = $this->dir . str_replace($namefile, '', $name);
|
||||
|
||||
die('Error: html file <u>' . $namefile . '.html</u> not found in: <u>' . $dir . '</u>');
|
||||
}
|
||||
|
||||
$this->template = file_get_contents($this->dir . '/' . $name . '.html');
|
||||
$this->select_template = $this->template;
|
||||
|
||||
|
|
|
@ -101,12 +101,7 @@ class sys
|
|||
$html->set('home', $cfg['http']);
|
||||
|
||||
if (is_array($notice)) {
|
||||
global $device;
|
||||
|
||||
if ($device == '!mobile')
|
||||
$html->set('notice', '<div class="informer ' . $notice['color'] . ' topifon">' . $notice['text'] . '</div><div class="space"></div>');
|
||||
else
|
||||
$html->set('notice', '<div class="heading-style-1 container"><div class="smaller-text color-' . $notice['color'] . '-light">' . $notice['text'] . '</div><div class="heading-decoration bg-' . $notice['color'] . '-light" style="margin-top: 0px"></div></div>');
|
||||
$html->set('notice', '<div class="informer ' . $notice['color'] . ' topifon">' . $notice['text'] . '</div><div class="space"></div>');
|
||||
} else
|
||||
$html->set('notice', '');
|
||||
|
||||
|
@ -144,9 +139,9 @@ class sys
|
|||
|
||||
public static function route($server, $inc, $go, $all = false)
|
||||
{
|
||||
global $device, $start_point;
|
||||
global $start_point;
|
||||
|
||||
$dir = $device == '!mobile' ? '' : 'megp/';
|
||||
$dir = '';
|
||||
$use = true;
|
||||
|
||||
if (in_array($inc, array('plugins', 'ftp', 'console', 'graph', 'copy', 'web'))) {
|
||||
|
@ -225,12 +220,12 @@ class sys
|
|||
|
||||
public static function outhtml($text, $time = 3, $url = false, $cache = false)
|
||||
{
|
||||
global $device, $mcache, $html, $cfg;
|
||||
global $mcache, $html, $cfg;
|
||||
|
||||
if ($cache)
|
||||
$mcache->delete($cache);
|
||||
|
||||
$tpl = $device == '!mobile' ? '' : '/megp';
|
||||
$tpl = '';
|
||||
|
||||
$html->get('out');
|
||||
|
||||
|
@ -451,9 +446,7 @@ class sys
|
|||
if ($go)
|
||||
sys::outjs(array('e' => sys::text('output', 'auth')));
|
||||
|
||||
global $device;
|
||||
|
||||
$link = $device == '!mobile' ? 'user/section/lk' : '';
|
||||
$link = 'user/section/lk';
|
||||
|
||||
exit(header('Refresh: 0; URL=' . $cfg['http'] . $link));
|
||||
}
|
||||
|
@ -469,9 +462,7 @@ class sys
|
|||
if ($go)
|
||||
sys::outjs(array('e' => sys::text('output', 'noauth')));
|
||||
|
||||
global $device;
|
||||
|
||||
$link = $device == '!mobile' ? 'user/section/auth' : 'auth';
|
||||
$link = 'user/section/auth';
|
||||
|
||||
exit(header('Refresh: 0; URL=' . $cfg['http'] . $link));
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ if ($go) {
|
|||
|
||||
$user = $sql->get();
|
||||
|
||||
$link = $device == '!mobile' ? 'user/section/recovery/confirm/' : 'recovery/confirm/';
|
||||
$link = 'user/section/recovery/confirm/';
|
||||
|
||||
// Проверка подачи запроса на восстановление
|
||||
$sql->query('SELECT `id`, `key` FROM `recovery` WHERE `user`="' . $user['id'] . '" LIMIT 1');
|
||||
|
|
Loading…
Reference in a new issue