diff --git a/system/distributor.php b/system/distributor.php index 69a2fe4..15c5e12 100644 --- a/system/distributor.php +++ b/system/distributor.php @@ -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); diff --git a/system/library/control/control.php b/system/library/control/control.php index 72d0f57..736f127 100644 --- a/system/library/control/control.php +++ b/system/library/control/control.php @@ -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'); diff --git a/system/library/html.php b/system/library/html.php index 81a2416..6364077 100644 --- a/system/library/html.php +++ b/system/library/html.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 ' . $namefile . '.html not found in: ' . $dir . ''); - } - $this->template = file_get_contents($this->dir . '/' . $name . '.html'); $this->select_template = $this->template; diff --git a/system/library/system.php b/system/library/system.php index 04bb9bc..a486a28 100644 --- a/system/library/system.php +++ b/system/library/system.php @@ -101,12 +101,7 @@ class sys $html->set('home', $cfg['http']); if (is_array($notice)) { - global $device; - - if ($device == '!mobile') - $html->set('notice', '
' . $notice['text'] . '
'); - else - $html->set('notice', '
' . $notice['text'] . '
'); + $html->set('notice', '
' . $notice['text'] . '
'); } 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)); } diff --git a/system/sections/user/recovery.php b/system/sections/user/recovery.php index 7c877ec..db4549b 100644 --- a/system/sections/user/recovery.php +++ b/system/sections/user/recovery.php @@ -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');