瀏覽代碼

Merge pull request #78 from EngineGPDev/EGPv3-develop

Merging branches and rebuilding work with GIT
Sergei Solovev 1 年之前
父節點
當前提交
37cf709222
共有 100 個文件被更改,包括 524 次插入139 次删除
  1. 3 1
      .gitignore
  2. 1 1
      acp/index.php
  3. 3 1
      composer.json
  4. 127 1
      composer.lock
  5. 1 1
      cron.php
  6. 89 0
      enginegp.sql
  7. 1 1
      index.php
  8. 2 2
      system/acp/distributor.php
  9. 1 1
      system/acp/engine/addons.php
  10. 1 1
      system/acp/engine/boost.php
  11. 2 2
      system/acp/engine/cashback.php
  12. 1 1
      system/acp/engine/control.php
  13. 1 1
      system/acp/engine/hosting.php
  14. 3 3
      system/acp/engine/index.php
  15. 1 1
      system/acp/engine/jobs.php
  16. 1 1
      system/acp/engine/letter.php
  17. 1 1
      system/acp/engine/logs.php
  18. 1 1
      system/acp/engine/news.php
  19. 1 1
      system/acp/engine/notice.php
  20. 1 1
      system/acp/engine/pages.php
  21. 1 1
      system/acp/engine/promo.php
  22. 9 1
      system/acp/engine/servers.php
  23. 1 1
      system/acp/engine/system.php
  24. 1 1
      system/acp/engine/tarifs.php
  25. 1 1
      system/acp/engine/units.php
  26. 1 1
      system/acp/engine/users.php
  27. 1 1
      system/acp/engine/web.php
  28. 1 1
      system/acp/engine/wiki.php
  29. 3 2
      system/acp/sections/addons/addcat.php
  30. 2 2
      system/acp/sections/addons/addpl.php
  31. 1 1
      system/acp/sections/addons/cats.php
  32. 1 1
      system/acp/sections/addons/delete.php
  33. 1 1
      system/acp/sections/addons/index.php
  34. 6 5
      system/acp/sections/addons/plugin.php
  35. 4 4
      system/acp/sections/addons/search.php
  36. 6 5
      system/acp/sections/addons/update.php
  37. 3 3
      system/acp/sections/addons/updmp.php
  38. 1 1
      system/acp/sections/boost/index.php
  39. 3 3
      system/acp/sections/boost/search.php
  40. 1 1
      system/acp/sections/boost/service.php
  41. 1 1
      system/acp/sections/control/delete.php
  42. 1 1
      system/acp/sections/control/index.php
  43. 1 1
      system/acp/sections/control/overdue.php
  44. 3 3
      system/acp/sections/control/search.php
  45. 1 1
      system/acp/sections/control/server.php
  46. 1 1
      system/acp/sections/jobs/add.php
  47. 1 1
      system/acp/sections/jobs/edit.php
  48. 1 1
      system/acp/sections/jobs/index.php
  49. 1 1
      system/acp/sections/jobs/request.php
  50. 1 1
      system/acp/sections/letter/index.php
  51. 1 1
      system/acp/sections/letter/send.php
  52. 1 1
      system/acp/sections/logs/buy.php
  53. 1 1
      system/acp/sections/logs/cashout.php
  54. 1 1
      system/acp/sections/logs/extend.php
  55. 1 1
      system/acp/sections/logs/index.php
  56. 1 1
      system/acp/sections/logs/part.php
  57. 1 1
      system/acp/sections/logs/replenish.php
  58. 3 3
      system/acp/sections/logs/search.php
  59. 3 3
      system/acp/sections/logs/sysearch.php
  60. 1 1
      system/acp/sections/news/add.php
  61. 1 1
      system/acp/sections/news/delete.php
  62. 1 1
      system/acp/sections/news/index.php
  63. 1 1
      system/acp/sections/news/news.php
  64. 3 3
      system/acp/sections/news/search.php
  65. 1 1
      system/acp/sections/notice/add.php
  66. 1 1
      system/acp/sections/notice/delete.php
  67. 1 1
      system/acp/sections/notice/end.php
  68. 1 1
      system/acp/sections/notice/index.php
  69. 1 1
      system/acp/sections/notice/notice.php
  70. 3 3
      system/acp/sections/notice/search.php
  71. 1 1
      system/acp/sections/pages/add.php
  72. 1 1
      system/acp/sections/pages/delete.php
  73. 1 1
      system/acp/sections/pages/index.php
  74. 1 1
      system/acp/sections/pages/page.php
  75. 1 1
      system/acp/sections/promo/add.php
  76. 1 1
      system/acp/sections/promo/delete.php
  77. 1 1
      system/acp/sections/promo/end.php
  78. 1 1
      system/acp/sections/promo/index.php
  79. 1 1
      system/acp/sections/promo/promo.php
  80. 3 3
      system/acp/sections/promo/search.php
  81. 1 1
      system/acp/sections/promo/stats.php
  82. 1 1
      system/acp/sections/servers/crmp.php
  83. 1 1
      system/acp/sections/servers/cs.php
  84. 75 0
      system/acp/sections/servers/cs2.php
  85. 1 1
      system/acp/sections/servers/csgo.php
  86. 1 1
      system/acp/sections/servers/css.php
  87. 1 1
      system/acp/sections/servers/cssold.php
  88. 1 1
      system/acp/sections/servers/delete.php
  89. 1 1
      system/acp/sections/servers/index.php
  90. 1 1
      system/acp/sections/servers/mc.php
  91. 1 1
      system/acp/sections/servers/mta.php
  92. 1 1
      system/acp/sections/servers/overdue.php
  93. 75 0
      system/acp/sections/servers/rust.php
  94. 1 1
      system/acp/sections/servers/samp.php
  95. 4 4
      system/acp/sections/servers/search.php
  96. 1 1
      system/acp/sections/servers/server.php
  97. 3 2
      system/acp/sections/tarifs/add.php
  98. 5 5
      system/acp/sections/tarifs/copy.php
  99. 1 1
      system/acp/sections/tarifs/delete.php
  100. 6 2
      system/acp/sections/tarifs/index.php

+ 3 - 1
.gitignore

@@ -1,2 +1,4 @@
 .idea
 .idea
-.vscode
+.vscode
+vendor
+composer.phar

+ 1 - 1
acp/index.php

@@ -5,7 +5,7 @@ date_default_timezone_set('Europe/Moscow');
 
 
 @ini_set('display_errors', FALSE);
 @ini_set('display_errors', FALSE);
 @ini_set('html_errors', FALSE);
 @ini_set('html_errors', FALSE);
-@ini_set('error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE ^ E_STRICT);
+@ini_set('error_reporting', E_ALL);
 
 
 DEFINE('EGP', TRUE);
 DEFINE('EGP', TRUE);
 DEFINE('ROOT', '../');
 DEFINE('ROOT', '../');

+ 3 - 1
composer.json

@@ -2,6 +2,8 @@
   "require": {
   "require": {
     "symfony/polyfill": "1.28.0",
     "symfony/polyfill": "1.28.0",
     "filp/whoops": "2.15.4",
     "filp/whoops": "2.15.4",
-    "monolog/monolog": "2.9.2"
+    "monolog/monolog": "2.9.2",
+    "xpaw/php-source-query-class": "2.1.0",
+    "szymach/c-pchart": "3.0.17"
   }
   }
 }
 }

+ 127 - 1
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
         "This file is @generated automatically"
     ],
     ],
-    "content-hash": "e729e310e2cc298a9957e1ae8869db7f",
+    "content-hash": "9fe541d20000bad8bcc7a6f093bd89a1",
     "packages": [
     "packages": [
         {
         {
             "name": "filp/whoops",
             "name": "filp/whoops",
@@ -342,6 +342,132 @@
                 }
                 }
             ],
             ],
             "time": "2023-08-25T17:27:34+00:00"
             "time": "2023-08-25T17:27:34+00:00"
+        },
+        {
+            "name": "szymach/c-pchart",
+            "version": "v3.0.17",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/szymach/c-pchart.git",
+                "reference": "c022568da78f73bb7acf7db7a974934a434d47d7"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/szymach/c-pchart/zipball/c022568da78f73bb7acf7db7a974934a434d47d7",
+                "reference": "c022568da78f73bb7acf7db7a974934a434d47d7",
+                "shasum": ""
+            },
+            "require": {
+                "ext-gd": "*",
+                "php": "^5.4|^7.0|^8.0"
+            },
+            "require-dev": {
+                "codeception/codeception": "^4.1.22",
+                "codeception/module-asserts": "^1.3",
+                "codeception/module-filesystem": "^1.0",
+                "phpunit/phpunit": "^5.7|^9.5",
+                "squizlabs/php_codesniffer": "^3.4"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0.x-dev",
+                    "2.0": "2.0.x-dev"
+                }
+            },
+            "autoload": {
+                "files": [
+                    "constants.php"
+                ],
+                "psr-4": {
+                    "CpChart\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "GPL-3.0-only"
+            ],
+            "authors": [
+                {
+                    "name": "Jean-Damien Pogolotti",
+                    "homepage": "http://www.pchart.net",
+                    "role": "Creator of the original pChart library"
+                },
+                {
+                    "name": "Piotr Szymaszek",
+                    "homepage": "https://github.com/szymach",
+                    "role": "Developer of the CpChart wrapper package"
+                }
+            ],
+            "description": "Port of \"pChart\" library into PHP 5+",
+            "homepage": "https://github.com/szymach/c-pchart",
+            "keywords": [
+                "CpChart",
+                "c-pChart",
+                "charts",
+                "pchart",
+                "statistics"
+            ],
+            "support": {
+                "issues": "https://github.com/szymach/c-pchart/issues",
+                "source": "https://github.com/szymach/c-pchart/tree/v3.0.17"
+            },
+            "time": "2023-05-27T11:12:02+00:00"
+        },
+        {
+            "name": "xpaw/php-source-query-class",
+            "version": "2.1.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/xPaw/PHP-Source-Query.git",
+                "reference": "673e572233c3ab4b70b302d648ebaf5a8d9ba32b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/xPaw/PHP-Source-Query/zipball/673e572233c3ab4b70b302d648ebaf5a8d9ba32b",
+                "reference": "673e572233c3ab4b70b302d648ebaf5a8d9ba32b",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.4"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "9.2",
+                "vimeo/psalm": "^3.12"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "xPaw\\SourceQuery\\": "SourceQuery/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "LGPL-2.1"
+            ],
+            "description": "PHP library to query and send RCON commands to servers based on \"Source Engine Query\" protocol",
+            "homepage": "https://github.com/xPaw/PHP-Source-Query",
+            "keywords": [
+                "ark",
+                "counter-strike",
+                "csgo",
+                "gmod",
+                "minecraft",
+                "rcon",
+                "rust",
+                "starbound",
+                "team fortress"
+            ],
+            "support": {
+                "source": "https://github.com/xPaw/PHP-Source-Query/tree/2.1.0"
+            },
+            "funding": [
+                {
+                    "url": "https://github.com/xPaw",
+                    "type": "github"
+                }
+            ],
+            "time": "2020-12-04T08:20:42+00:00"
         }
         }
     ],
     ],
     "packages-dev": [],
     "packages-dev": [],

+ 1 - 1
cron.php

@@ -3,7 +3,7 @@ date_default_timezone_set('Europe/Moscow');
 
 
 @ini_set('display_errors', TRUE);
 @ini_set('display_errors', TRUE);
 @ini_set('html_errors', TRUE);
 @ini_set('html_errors', TRUE);
-@ini_set('error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE ^ E_STRICT);
+@ini_set('error_reporting', E_ALL);
 
 
 DEFINE('EGP', TRUE);
 DEFINE('EGP', TRUE);
 DEFINE('DIR', dirname('index.php'));
 DEFINE('DIR', dirname('index.php'));

+ 89 - 0
enginegp.sql

@@ -98,6 +98,27 @@ CREATE TABLE `admins_csgo` (
 
 
 -- --------------------------------------------------------
 -- --------------------------------------------------------
 
 
+-- --------------------------------------------------------
+
+--
+-- Структура таблицы `admins_cs2`
+--
+
+CREATE TABLE `admins_cs2` (
+  `id` int(11) NOT NULL,
+  `server` int(11) NOT NULL,
+  `active` tinyint(1) NOT NULL,
+  `value` varchar(50) NOT NULL,
+  `passwd` char(32) NOT NULL,
+  `flags` varchar(50) NOT NULL,
+  `immunity` int(11) NOT NULL,
+  `time` int(11) NOT NULL,
+  `text` varchar(100) NOT NULL,
+  `info` varchar(100) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
 --
 --
 -- Структура таблицы `admins_css`
 -- Структура таблицы `admins_css`
 --
 --
@@ -136,6 +157,25 @@ CREATE TABLE `admins_cssold` (
 
 
 -- --------------------------------------------------------
 -- --------------------------------------------------------
 
 
+--
+-- Структура таблицы `admins_rust`
+--
+
+CREATE TABLE `admins_rust` (
+  `id` int(11) NOT NULL,
+  `server` int(11) NOT NULL,
+  `active` tinyint(1) NOT NULL,
+  `value` varchar(50) NOT NULL,
+  `passwd` char(32) NOT NULL,
+  `flags` varchar(50) NOT NULL,
+  `immunity` int(11) NOT NULL,
+  `time` int(11) NOT NULL,
+  `text` varchar(100) NOT NULL,
+  `info` varchar(100) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
 --
 --
 -- Структура таблицы `admins_mc`
 -- Структура таблицы `admins_mc`
 --
 --
@@ -318,6 +358,25 @@ CREATE TABLE `control_admins_csgo` (
 
 
 -- --------------------------------------------------------
 -- --------------------------------------------------------
 
 
+--
+-- Структура таблицы `control_admins_cs2`
+--
+
+CREATE TABLE `control_admins_cs2` (
+  `id` int(11) NOT NULL,
+  `server` int(11) NOT NULL,
+  `active` tinyint(1) NOT NULL,
+  `value` varchar(50) NOT NULL,
+  `passwd` char(32) NOT NULL,
+  `flags` varchar(50) NOT NULL,
+  `immunity` int(11) NOT NULL,
+  `time` int(11) NOT NULL,
+  `text` varchar(100) NOT NULL,
+  `info` varchar(100) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
 --
 --
 -- Структура таблицы `control_admins_css`
 -- Структура таблицы `control_admins_css`
 --
 --
@@ -1246,8 +1305,10 @@ CREATE TABLE `units` (
   `sql_ftp` char(20) NOT NULL,
   `sql_ftp` char(20) NOT NULL,
   `cs` tinyint(1) NOT NULL DEFAULT '0',
   `cs` tinyint(1) NOT NULL DEFAULT '0',
   `cssold` tinyint(1) NOT NULL DEFAULT '0',
   `cssold` tinyint(1) NOT NULL DEFAULT '0',
+  `rust` tinyint(1) NOT NULL DEFAULT '0',
   `css` tinyint(1) NOT NULL DEFAULT '0',
   `css` tinyint(1) NOT NULL DEFAULT '0',
   `csgo` tinyint(1) NOT NULL DEFAULT '0',
   `csgo` tinyint(1) NOT NULL DEFAULT '0',
+  `cs2` tinyint(1) NOT NULL DEFAULT '0',
   `samp` tinyint(1) NOT NULL DEFAULT '0',
   `samp` tinyint(1) NOT NULL DEFAULT '0',
   `crmp` tinyint(1) NOT NULL DEFAULT '0',
   `crmp` tinyint(1) NOT NULL DEFAULT '0',
   `mta` tinyint(1) NOT NULL DEFAULT '0',
   `mta` tinyint(1) NOT NULL DEFAULT '0',
@@ -1400,6 +1461,12 @@ ALTER TABLE `admins_cs`
 ALTER TABLE `admins_csgo`
 ALTER TABLE `admins_csgo`
   ADD PRIMARY KEY (`id`);
   ADD PRIMARY KEY (`id`);
 
 
+--
+-- Индексы таблицы `admins_cs2`
+--
+ALTER TABLE `admins_cs2`
+  ADD PRIMARY KEY (`id`);
+
 --
 --
 -- Индексы таблицы `admins_css`
 -- Индексы таблицы `admins_css`
 --
 --
@@ -1412,6 +1479,12 @@ ALTER TABLE `admins_css`
 ALTER TABLE `admins_cssold`
 ALTER TABLE `admins_cssold`
   ADD PRIMARY KEY (`id`);
   ADD PRIMARY KEY (`id`);
 
 
+--
+-- Индексы таблицы `admins_rust`
+--
+ALTER TABLE `admins_rust`
+  ADD PRIMARY KEY (`id`);
+
 --
 --
 -- Индексы таблицы `admins_mc`
 -- Индексы таблицы `admins_mc`
 --
 --
@@ -1484,6 +1557,12 @@ ALTER TABLE `control_admins_cs`
 ALTER TABLE `control_admins_csgo`
 ALTER TABLE `control_admins_csgo`
   ADD PRIMARY KEY (`id`);
   ADD PRIMARY KEY (`id`);
 
 
+--
+-- Индексы таблицы `control_admins_cs2`
+--
+ALTER TABLE `control_admins_cs2`
+  ADD PRIMARY KEY (`id`);
+
 --
 --
 -- Индексы таблицы `control_admins_css`
 -- Индексы таблицы `control_admins_css`
 --
 --
@@ -1856,6 +1935,11 @@ ALTER TABLE `admins_cs`
 ALTER TABLE `admins_csgo`
 ALTER TABLE `admins_csgo`
   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 --
 --
+-- AUTO_INCREMENT для таблицы `admins_cs2`
+--
+ALTER TABLE `admins_cs2`
+    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
+--
 -- AUTO_INCREMENT для таблицы `admins_css`
 -- AUTO_INCREMENT для таблицы `admins_css`
 --
 --
 ALTER TABLE `admins_css`
 ALTER TABLE `admins_css`
@@ -1866,6 +1950,11 @@ ALTER TABLE `admins_css`
 ALTER TABLE `admins_cssold`
 ALTER TABLE `admins_cssold`
   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
   MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
 --
 --
+-- AUTO_INCREMENT для таблицы `admins_rust`
+--
+ALTER TABLE `admins_rust`
+    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
+--
 -- AUTO_INCREMENT для таблицы `admins_mc`
 -- AUTO_INCREMENT для таблицы `admins_mc`
 --
 --
 ALTER TABLE `admins_mc`
 ALTER TABLE `admins_mc`

+ 1 - 1
index.php

@@ -6,7 +6,7 @@ date_default_timezone_set('Europe/Moscow');
 
 
 @ini_set('display_errors', TRUE);
 @ini_set('display_errors', TRUE);
 @ini_set('html_errors', TRUE);
 @ini_set('html_errors', TRUE);
-@ini_set('error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE ^ E_STRICT);
+@ini_set('error_reporting', E_ALL);
 
 
 DEFINE('EGP', TRUE);
 DEFINE('EGP', TRUE);
 DEFINE('DIR', dirname('index.php'));
 DEFINE('DIR', dirname('index.php'));

+ 2 - 2
system/acp/distributor.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 // Подключение filp/whoops
 // Подключение filp/whoops
 $whoops = new \Whoops\Run;
 $whoops = new \Whoops\Run;
@@ -14,7 +14,7 @@ $whoops->pushHandler($loggingInConsole);
 // Логи в файл
 // Логи в файл
 $loggingInFile = new \Whoops\Handler\PlainTextHandler();
 $loggingInFile = new \Whoops\Handler\PlainTextHandler();
 $loggingInFile->loggerOnly(true);
 $loggingInFile->loggerOnly(true);
-$loggingInFile->setLogger((new \Monolog\Logger('EngineGP', [(new \Monolog\Handler\StreamHandler(DIR . 'logs/enginegp.log'))->setFormatter((new \Monolog\Formatter\LineFormatter(null, null, true)))])));
+$loggingInFile->setLogger((new \Monolog\Logger('EngineGP', [(new \Monolog\Handler\StreamHandler(ROOT . '/logs/enginegp.log'))->setFormatter((new \Monolog\Formatter\LineFormatter(null, null, true)))])));
 $whoops->pushHandler($loggingInFile);
 $whoops->pushHandler($loggingInFile);
 
 
 $device = '!mobile';
 $device = '!mobile';

+ 1 - 1
system/acp/engine/addons.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-cubes"></i> Управление дополнениями';
 $info = '<i class="fa fa-cubes"></i> Управление дополнениями';
 
 

+ 1 - 1
system/acp/engine/boost.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 include(DATA . 'boost.php');
 include(DATA . 'boost.php');
 
 

+ 2 - 2
system/acp/engine/cashback.php

@@ -1,10 +1,10 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 @ini_set('display_errors', TRUE);
 @ini_set('display_errors', TRUE);
 @ini_set('html_errors', TRUE);
 @ini_set('html_errors', TRUE);
-@ini_set('error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE ^ E_STRICT);
+@ini_set('error_reporting', E_ALL);
 
 
 $nmc = 'cashback_' . $id;
 $nmc = 'cashback_' . $id;
 
 

+ 1 - 1
system/acp/engine/control.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-dropbox"></i> Контроль';
 $info = '<i class="fa fa-dropbox"></i> Контроль';
 
 

+ 1 - 1
system/acp/engine/hosting.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-globe"></i> Список вирт. хостингов';
 $info = '<i class="fa fa-globe"></i> Список вирт. хостингов';
 
 

+ 3 - 3
system/acp/engine/index.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $mcache_name = 'acp_main';
 $mcache_name = 'acp_main';
 
 
@@ -35,8 +35,8 @@ if ($html->arr['main'] == '') {
     $sql->query('SELECT `id`, `game`, `slots` FROM `servers`');
     $sql->query('SELECT `id`, `game`, `slots` FROM `servers`');
     $servers = $sql->num();
     $servers = $sql->num();
 
 
-    $aSlots = array('cs' => 0, 'cssold' => 0, 'css' => 0, 'csgo' => 0, 'samp' => 0, 'crmp' => 0, 'mta' => 0, 'mc' => 0);
-    $aServers = array('cs' => 0, 'cssold' => 0, 'css' => 0, 'csgo' => 0, 'samp' => 0, 'crmp' => 0, 'mta' => 0, 'mc' => 0);
+    $aSlots = array('cs' => 0, 'cssold' => 0, 'css' => 0, 'csgo' => 0, 'cs2' => 0, 'rust' => 0, 'samp' => 0, 'crmp' => 0, 'mta' => 0, 'mc' => 0);
+    $aServers = array('cs' => 0, 'cssold' => 0, 'css' => 0, 'csgo' => 0, 'cs2' => 0, 'rust' => 0, 'samp' => 0, 'crmp' => 0, 'mta' => 0, 'mc' => 0);
 
 
     while ($server = $sql->get()) {
     while ($server = $sql->get()) {
         $aSlots[$server['game']] += $server['slots'];
         $aSlots[$server['game']] += $server['slots'];

+ 1 - 1
system/acp/engine/jobs.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-envelope-open"></i> Вакансии';
 $info = '<i class="fa fa-envelope-open"></i> Вакансии';
 
 

+ 1 - 1
system/acp/engine/letter.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-envelope-open"></i> Рассылка новостей';
 $info = '<i class="fa fa-envelope-open"></i> Рассылка новостей';
 
 

+ 1 - 1
system/acp/engine/logs.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-clipboard"></i> Логи операций';
 $info = '<i class="fa fa-clipboard"></i> Логи операций';
 
 

+ 1 - 1
system/acp/engine/news.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-newspaper-o"></i> Управление новостями';
 $info = '<i class="fa fa-newspaper-o"></i> Управление новостями';
 
 

+ 1 - 1
system/acp/engine/notice.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-bullhorn"></i> Управление уведомлениями';
 $info = '<i class="fa fa-bullhorn"></i> Управление уведомлениями';
 
 

+ 1 - 1
system/acp/engine/pages.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-file-text-o"></i> Управление старницами';
 $info = '<i class="fa fa-file-text-o"></i> Управление старницами';
 
 

+ 1 - 1
system/acp/engine/promo.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-gift"></i> Управление акциями';
 $info = '<i class="fa fa-gift"></i> Управление акциями';
 
 

+ 9 - 1
system/acp/engine/servers.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-gamepad"></i> Список серверов';
 $info = '<i class="fa fa-gamepad"></i> Список серверов';
 
 
@@ -10,6 +10,8 @@ $aSection = array(
     'cssold',
     'cssold',
     'css',
     'css',
     'csgo',
     'csgo',
+    'cs2',
+    'rust',
     'samp',
     'samp',
     'crmp',
     'crmp',
     'mta',
     'mta',
@@ -48,6 +50,12 @@ $html->set('css', $sql->num());
 $sql->query('SELECT `id` FROM `servers` WHERE `user`!="-1" AND `game`="csgo"');
 $sql->query('SELECT `id` FROM `servers` WHERE `user`!="-1" AND `game`="csgo"');
 $html->set('csgo', $sql->num());
 $html->set('csgo', $sql->num());
 
 
+$sql->query('SELECT `id` FROM `servers` WHERE `user`!="-1" AND `game`="cs2"');
+$html->set('cs2', $sql->num());
+
+$sql->query('SELECT `id` FROM `servers` WHERE `user`!="-1" AND `game`="rust"');
+$html->set('rust', $sql->num());
+
 $sql->query('SELECT `id` FROM `servers` WHERE `user`!="-1" AND `game`="samp"');
 $sql->query('SELECT `id` FROM `servers` WHERE `user`!="-1" AND `game`="samp"');
 $html->set('samp', $sql->num());
 $html->set('samp', $sql->num());
 
 

+ 1 - 1
system/acp/engine/system.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($go) {
 if ($go) {
     $sql->query('SELECT `address`, `passwd` FROM `panel` LIMIT 1');
     $sql->query('SELECT `address`, `passwd` FROM `panel` LIMIT 1');

+ 1 - 1
system/acp/engine/tarifs.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-shopping-bag"></i> Управление тарифами';
 $info = '<i class="fa fa-shopping-bag"></i> Управление тарифами';
 
 

+ 1 - 1
system/acp/engine/units.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-server"></i> Управление локациями';
 $info = '<i class="fa fa-server"></i> Управление локациями';
 
 

+ 1 - 1
system/acp/engine/users.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-users"></i> Управление пользователями';
 $info = '<i class="fa fa-users"></i> Управление пользователями';
 
 

+ 1 - 1
system/acp/engine/web.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-cloud"></i> Список бесплатных услуг';
 $info = '<i class="fa fa-cloud"></i> Список бесплатных услуг';
 
 

+ 1 - 1
system/acp/engine/wiki.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $info = '<i class="fa fa-cubes"></i> Управление википедией';
 $info = '<i class="fa fa-cubes"></i> Управление википедией';
 
 

+ 3 - 2
system/acp/sections/addons/addcat.php

@@ -1,9 +1,9 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($go) {
 if ($go) {
-    $aGames = array('cs', 'cssold', 'css', 'csgo', 'samp', 'crmp', 'mta', 'mc');
+    $aGames = array('cs', 'cssold', 'css', 'csgo', 'cs2', 'samp', 'crmp', 'mta', 'mc');
 
 
     $aData = array();
     $aData = array();
 
 
@@ -12,6 +12,7 @@ if ($go) {
     $aData['cssold'] = isset($_POST['cssold']) ? $_POST['cssold'] : 0;
     $aData['cssold'] = isset($_POST['cssold']) ? $_POST['cssold'] : 0;
     $aData['css'] = isset($_POST['css']) ? $_POST['css'] : 0;
     $aData['css'] = isset($_POST['css']) ? $_POST['css'] : 0;
     $aData['csgo'] = isset($_POST['csgo']) ? $_POST['csgo'] : 0;
     $aData['csgo'] = isset($_POST['csgo']) ? $_POST['csgo'] : 0;
+    $aData['cs2'] = isset($_POST['cs2']) ? $_POST['cs2'] : 0;
     $aData['samp'] = isset($_POST['samp']) ? $_POST['samp'] : 0;
     $aData['samp'] = isset($_POST['samp']) ? $_POST['samp'] : 0;
     $aData['crmp'] = isset($_POST['crmp']) ? $_POST['crmp'] : 0;
     $aData['crmp'] = isset($_POST['crmp']) ? $_POST['crmp'] : 0;
     $aData['mta'] = isset($_POST['mta']) ? $_POST['mta'] : 0;
     $aData['mta'] = isset($_POST['mta']) ? $_POST['mta'] : 0;

+ 2 - 2
system/acp/sections/addons/addpl.php

@@ -1,8 +1,8 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
-$aGames = array('cs', 'cssold', 'css', 'csgo', 'samp', 'crmp', 'mta', 'mc');
+$aGames = array('cs', 'cssold', 'css', 'csgo', 'cs2', 'samp', 'crmp', 'mta', 'mc');
 $types = array('cfg', 'txt', 'ini', 'js');
 $types = array('cfg', 'txt', 'ini', 'js');
 
 
 if (isset($url['get'])) {
 if (isset($url['get'])) {

+ 1 - 1
system/acp/sections/addons/cats.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $cats = $sql->query('SELECT `id`, `game`, `name`, `sort` FROM `plugins_category` ORDER BY `game` ASC');
 $cats = $sql->query('SELECT `id`, `game`, `name`, `sort` FROM `plugins_category` ORDER BY `game` ASC');
 while ($cat = $sql->get($cats)) {
 while ($cat = $sql->get($cats)) {

+ 1 - 1
system/acp/sections/addons/delete.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (!isset($url['type']))
 if (!isset($url['type']))
     exit;
     exit;

+ 1 - 1
system/acp/sections/addons/index.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['subsection']) and $url['subsection'] == 'search')
 if (isset($url['subsection']) and $url['subsection'] == 'search')
     include(SEC . 'addons/search.php');
     include(SEC . 'addons/search.php');

+ 6 - 5
system/acp/sections/addons/plugin.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('SELECT * FROM `plugins` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('SELECT * FROM `plugins` WHERE `id`="' . $id . '" LIMIT 1');
 $plugin = $sql->get();
 $plugin = $sql->get();
@@ -10,6 +10,7 @@ $aGames = array(
     'cssold' => 'Counter-Strike: Source v34',
     'cssold' => 'Counter-Strike: Source v34',
     'css' => 'Counter-Strike: Source',
     'css' => 'Counter-Strike: Source',
     'csgo' => 'Counter-Strike: Global Offensive',
     'csgo' => 'Counter-Strike: Global Offensive',
+    'cs2' => 'Counter-Strike: 2',
     'samp' => 'San Andreas Multiplayer',
     'samp' => 'San Andreas Multiplayer',
     'crmp' => 'GTA: Criminal Russia',
     'crmp' => 'GTA: Criminal Russia',
     'mta' => 'Multi Theft Auto',
     'mta' => 'Multi Theft Auto',
@@ -58,7 +59,7 @@ if ($go) {
     foreach ($aPacks as $packs)
     foreach ($aPacks as $packs)
         $spacks .= trim($packs) . ':';
         $spacks .= trim($packs) . ':';
 
 
-    $spacks = isset($spacks{0}) ? substr($spacks, 0, -1) : '';
+    $spacks = isset($spacks[0]) ? substr($spacks, 0, -1) : '';
 
 
     $aData['packs'] = $spacks == '' ? 'all' : $spacks;
     $aData['packs'] = $spacks == '' ? 'all' : $spacks;
 
 
@@ -75,7 +76,7 @@ if ($go) {
         $incoms .= intval($incom) . ':';
         $incoms .= intval($incom) . ':';
     }
     }
 
 
-    $incoms = isset($incoms{0}) ? substr($incoms, 0, -1) : '';
+    $incoms = isset($incoms[0]) ? substr($incoms, 0, -1) : '';
 
 
     $aData['incompatible'] = $incoms;
     $aData['incompatible'] = $incoms;
 
 
@@ -98,7 +99,7 @@ if ($go) {
         $choice .= ' ';
         $choice .= ' ';
     }
     }
 
 
-    $choice = isset($choice{0}) ? substr(trim($choice), 0, -1) : '';
+    $choice = isset($choice[0]) ? substr(trim($choice), 0, -1) : '';
 
 
     $aData['choice'] = $choice;
     $aData['choice'] = $choice;
 
 
@@ -115,7 +116,7 @@ if ($go) {
         $requis .= intval($requi) . ':';
         $requis .= intval($requi) . ':';
     }
     }
 
 
-    $requis = isset($requis{0}) ? substr($requis, 0, -1) : '';
+    $requis = isset($requis[0]) ? substr($requis, 0, -1) : '';
 
 
     $aData['required'] = $requis;
     $aData['required'] = $requis;
 
 

+ 4 - 4
system/acp/sections/addons/search.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 
 
@@ -15,7 +15,7 @@ if (is_array($cache)) {
     sys::outjs($cache);
     sys::outjs($cache);
 }
 }
 
 
-if (!isset($text{2})) {
+if (!isset($text[2])) {
     if ($go)
     if ($go)
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
 
 
@@ -25,9 +25,9 @@ if (!isset($text{2})) {
 if (substr($text, 0, 5) == 'game=') {
 if (substr($text, 0, 5) == 'game=') {
     $game = trim(substr($text, 5));
     $game = trim(substr($text, 5));
 
 
-    if (in_array($game, array('cs', 'cssold', 'css', 'csgo', 'samp', 'crmp', 'mta', 'mc')))
+    if (in_array($game, array('cs', 'cssold', 'css', 'csgo', 'cs2', 'samp', 'crmp', 'mta', 'mc')))
         $plugins = $sql->query('SELECT `id`, `cat`, `game`, `name`, `status` FROM `plugins` WHERE `game`="' . $game . '" ORDER BY `id` ASC');
         $plugins = $sql->query('SELECT `id`, `cat`, `game`, `name`, `status` FROM `plugins` WHERE `game`="' . $game . '" ORDER BY `id` ASC');
-} elseif ($text{0} == 'i' and $text{1} == 'd')
+} elseif ($text[0] == 'i' and $text[1] == 'd')
     $plugins = $sql->query('SELECT `id`, `cat`, `game`, `name`, `status` FROM `plugins` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
     $plugins = $sql->query('SELECT `id`, `cat`, `game`, `name`, `status` FROM `plugins` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
 else {
 else {
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

+ 6 - 5
system/acp/sections/addons/update.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('SELECT * FROM `plugins_update` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('SELECT * FROM `plugins_update` WHERE `id`="' . $id . '" LIMIT 1');
 $plugin = $sql->get();
 $plugin = $sql->get();
@@ -10,6 +10,7 @@ $aGames = array(
     'cssold' => 'Counter-Strike: Source v34',
     'cssold' => 'Counter-Strike: Source v34',
     'css' => 'Counter-Strike: Source',
     'css' => 'Counter-Strike: Source',
     'csgo' => 'Counter-Strike: Global Offensive',
     'csgo' => 'Counter-Strike: Global Offensive',
+    'cs2' => 'Counter-Strike: 2',
     'samp' => 'San Andreas Multiplayer',
     'samp' => 'San Andreas Multiplayer',
     'crmp' => 'GTA: Criminal Russia',
     'crmp' => 'GTA: Criminal Russia',
     'mta' => 'Multi Theft Auto',
     'mta' => 'Multi Theft Auto',
@@ -61,7 +62,7 @@ if ($go) {
         $spacks .= intval($packs) . ':';
         $spacks .= intval($packs) . ':';
     }
     }
 
 
-    $spacks = isset($spacks{0}) ? substr($spacks, 0, -1) : '';
+    $spacks = isset($spacks[0]) ? substr($spacks, 0, -1) : '';
 
 
     $aData['packs'] = $spacks == '' ? $spacks : 'all';
     $aData['packs'] = $spacks == '' ? $spacks : 'all';
 
 
@@ -78,7 +79,7 @@ if ($go) {
         $incoms .= intval($incom) . ':';
         $incoms .= intval($incom) . ':';
     }
     }
 
 
-    $incoms = isset($incoms{0}) ? substr($incoms, 0, -1) : '';
+    $incoms = isset($incoms[0]) ? substr($incoms, 0, -1) : '';
 
 
     $aData['incompatible'] = $incoms;
     $aData['incompatible'] = $incoms;
 
 
@@ -101,7 +102,7 @@ if ($go) {
         $choice .= ' ';
         $choice .= ' ';
     }
     }
 
 
-    $choice = isset($choice{0}) ? substr(trim($choice), 0, -1) : '';
+    $choice = isset($choice[0]) ? substr(trim($choice), 0, -1) : '';
 
 
     $aData['choice'] = $choice;
     $aData['choice'] = $choice;
 
 
@@ -118,7 +119,7 @@ if ($go) {
         $requis .= intval($requi) . ':';
         $requis .= intval($requi) . ':';
     }
     }
 
 
-    $requis = isset($requis{0}) ? substr($requis, 0, -1) : '';
+    $requis = isset($requis[0]) ? substr($requis, 0, -1) : '';
 
 
     $aData['required'] = $requis;
     $aData['required'] = $requis;
 
 

+ 3 - 3
system/acp/sections/addons/updmp.php

@@ -1,12 +1,12 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['get']) and $url['get'] == 'list') {
 if (isset($url['get']) and $url['get'] == 'list') {
     $unit = isset($url['unit']) ? sys::int($url['unit']) : sys::out();
     $unit = isset($url['unit']) ? sys::int($url['unit']) : sys::out();
     $game = isset($url['game']) ? $url['game'] : sys::out();
     $game = isset($url['game']) ? $url['game'] : sys::out();
 
 
-    if (!in_array($game, array('cs', 'cssold', 'css', 'csgo')))
+    if (!in_array($game, array('cs', 'cssold', 'css', 'csgo', 'cs2')))
         sys::out();
         sys::out();
 
 
     $maps = '';
     $maps = '';
@@ -30,7 +30,7 @@ if ($go) {
     if (!$unit)
     if (!$unit)
         sys::outjs(array('e' => 'Необходимо выбрать локацию'));
         sys::outjs(array('e' => 'Необходимо выбрать локацию'));
 
 
-    if (!in_array($game, array('cs', 'cssold', 'css', 'csgo')))
+    if (!in_array($game, array('cs', 'cssold', 'css', 'csgo', 'cs2')))
         sys::outjs(array('e' => 'Необходимо выбрать игру'));
         sys::outjs(array('e' => 'Необходимо выбрать игру'));
 
 
     include(LIB . 'ssh.php');
     include(LIB . 'ssh.php');

+ 1 - 1
system/acp/sections/boost/index.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['subsection']) and $url['subsection'] == 'search')
 if (isset($url['subsection']) and $url['subsection'] == 'search')
     include(SEC . 'boost/sysearch.php');
     include(SEC . 'boost/sysearch.php');

+ 3 - 3
system/acp/sections/boost/search.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 
 
@@ -15,7 +15,7 @@ if (is_array($cache)) {
     sys::outjs($cache);
     sys::outjs($cache);
 }
 }
 
 
-if (!isset($text{2})) {
+if (!isset($text[2])) {
     if ($go)
     if ($go)
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
 
 
@@ -35,7 +35,7 @@ if (in_array($check[0], array('server', 'user'))) {
         case 'user':
         case 'user':
             $sql->query('SELECT * FROM `boost` WHERE `user`="' . sys::int($val) . '" ORDER BY `id` DESC');
             $sql->query('SELECT * FROM `boost` WHERE `user`="' . sys::int($val) . '" ORDER BY `id` DESC');
     }
     }
-} elseif ($text{0} == 'i' and $text{1} == 'd')
+} elseif ($text[0] == 'i' and $text[1] == 'd')
     $sql->query('SELECT * FROM `boost` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
     $sql->query('SELECT * FROM `boost` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
 else {
 else {
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

+ 1 - 1
system/acp/sections/boost/service.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['subsection']) and $url['subsection'] == 'search')
 if (isset($url['subsection']) and $url['subsection'] == 'search')
     include(SEC . 'boost/sysearch.php');
     include(SEC . 'boost/sysearch.php');

+ 1 - 1
system/acp/sections/control/delete.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('UPDATE `control` set `user`="-1", `status`="overdue", `time`="0", `overdue`="0" WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('UPDATE `control` set `user`="-1", `status`="overdue", `time`="0", `overdue`="0" WHERE `id`="' . $id . '" LIMIT 1');
 
 

+ 1 - 1
system/acp/sections/control/index.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['subsection']) and $url['subsection'] == 'search')
 if (isset($url['subsection']) and $url['subsection'] == 'search')
     include(SEC . 'control/search.php');
     include(SEC . 'control/search.php');

+ 1 - 1
system/acp/sections/control/overdue.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($id)
 if ($id)
     include(SEC . 'control/server.php');
     include(SEC . 'control/server.php');

+ 3 - 3
system/acp/sections/control/search.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 
 
@@ -15,7 +15,7 @@ if (is_array($cache)) {
     sys::outjs($cache);
     sys::outjs($cache);
 }
 }
 
 
-if (!isset($text{2})) {
+if (!isset($text[2])) {
     if ($go)
     if ($go)
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
 
 
@@ -46,7 +46,7 @@ if (in_array($check[0], array('limit', 'price', 'user', 'status'))) {
             if (in_array($val, array('working', 'error', 'reboot', 'overdue', 'blocked', 'install')))
             if (in_array($val, array('working', 'error', 'reboot', 'overdue', 'blocked', 'install')))
                 $ctrls = $sql->query('SELECT ' . $select . ' `status`="' . $val . '" ORDER BY `id` ASC');
                 $ctrls = $sql->query('SELECT ' . $select . ' `status`="' . $val . '" ORDER BY `id` ASC');
     }
     }
-} elseif ($text{0} == 'i' and $text{1} == 'd')
+} elseif ($text[0] == 'i' and $text[1] == 'd')
     $ctrls = $sql->query('SELECT ' . $select . ' `id`="' . sys::int($text) . '" LIMIT 1');
     $ctrls = $sql->query('SELECT ' . $select . ' `id`="' . sys::int($text) . '" LIMIT 1');
 else {
 else {
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

+ 1 - 1
system/acp/sections/control/server.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('SELECT `time`, `overdue` FROM `control` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('SELECT `time`, `overdue` FROM `control` WHERE `id`="' . $id . '" LIMIT 1');
 $ctrl = $sql->get();
 $ctrl = $sql->get();

+ 1 - 1
system/acp/sections/jobs/add.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($go) {
 if ($go) {
     $aData = [];
     $aData = [];

+ 1 - 1
system/acp/sections/jobs/edit.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('SELECT * FROM `jobs` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('SELECT * FROM `jobs` WHERE `id`="' . $id . '" LIMIT 1');
 if (!$sql->num())
 if (!$sql->num())

+ 1 - 1
system/acp/sections/jobs/index.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($url['edit']) {
 if ($url['edit']) {
     include(SEC . 'jobs/edit.php');
     include(SEC . 'jobs/edit.php');

+ 1 - 1
system/acp/sections/jobs/request.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($id) {
 if ($id) {
     $sql->query('SELECT * FROM `jobs_app` WHERE `id`="' . $id . '" LIMIT 1');
     $sql->query('SELECT * FROM `jobs_app` WHERE `id`="' . $id . '" LIMIT 1');

+ 1 - 1
system/acp/sections/letter/index.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $group = array('user' => 'Пользователь', 'support' => 'Тех.поддержка', 'admin' => 'Администратор');
 $group = array('user' => 'Пользователь', 'support' => 'Тех.поддержка', 'admin' => 'Администратор');
 $list = '';
 $list = '';

+ 1 - 1
system/acp/sections/letter/send.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 set_time_limit(1200);
 set_time_limit(1200);
 
 

+ 1 - 1
system/acp/sections/logs/buy.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $list = '';
 $list = '';
 
 

+ 1 - 1
system/acp/sections/logs/cashout.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $list = '';
 $list = '';
 
 

+ 1 - 1
system/acp/sections/logs/extend.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $list = '';
 $list = '';
 
 

+ 1 - 1
system/acp/sections/logs/index.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['subsection']) and $url['subsection'] == 'search')
 if (isset($url['subsection']) and $url['subsection'] == 'search')
     include(SEC . 'logs/sysearch.php');
     include(SEC . 'logs/sysearch.php');

+ 1 - 1
system/acp/sections/logs/part.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $list = '';
 $list = '';
 
 

+ 1 - 1
system/acp/sections/logs/replenish.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $list = '';
 $list = '';
 
 

+ 3 - 3
system/acp/sections/logs/search.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 
 
@@ -15,7 +15,7 @@ if (is_array($cache)) {
     sys::outjs($cache);
     sys::outjs($cache);
 }
 }
 
 
-if (!isset($text{2})) {
+if (!isset($text[2])) {
     if ($go)
     if ($go)
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
 
 
@@ -37,7 +37,7 @@ if (in_array($check[0], array('server', 'user'))) {
         case 'user':
         case 'user':
             $sql->query('SELECT ' . $select . ' WHERE `user`="' . sys::int($val) . '" ORDER BY `id` DESC');
             $sql->query('SELECT ' . $select . ' WHERE `user`="' . sys::int($val) . '" ORDER BY `id` DESC');
     }
     }
-} elseif ($text{0} == 'i' and $text{1} == 'd')
+} elseif ($text[0] == 'i' and $text[1] == 'd')
     $sql->query('SELECT `id`, `user`, `text`, `date`, `type`, `money` FROM `logs` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
     $sql->query('SELECT `id`, `user`, `text`, `date`, `type`, `money` FROM `logs` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
 else {
 else {
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

+ 3 - 3
system/acp/sections/logs/sysearch.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 
 
@@ -15,7 +15,7 @@ if (is_array($cache)) {
     sys::outjs($cache);
     sys::outjs($cache);
 }
 }
 
 
-if (!isset($text{2})) {
+if (!isset($text[2])) {
     if ($go)
     if ($go)
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
 
 
@@ -37,7 +37,7 @@ if (in_array($check[0], array('server', 'user'))) {
         case 'user':
         case 'user':
             $sql->query('SELECT ' . $select . ' WHERE `user`="' . sys::int($val) . '" ORDER BY `id` DESC');
             $sql->query('SELECT ' . $select . ' WHERE `user`="' . sys::int($val) . '" ORDER BY `id` DESC');
     }
     }
-} elseif ($text{0} == 'i' and $text{1} == 'd')
+} elseif ($text[0] == 'i' and $text[1] == 'd')
     $sql->query('SELECT ' . $select . ' WHERE `id`="' . sys::int($text) . '" LIMIT 1');
     $sql->query('SELECT ' . $select . ' WHERE `id`="' . sys::int($text) . '" LIMIT 1');
 else {
 else {
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

+ 1 - 1
system/acp/sections/news/add.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($go) {
 if ($go) {
     $aData = array();
     $aData = array();

+ 1 - 1
system/acp/sections/news/delete.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('DELETE FROM `news` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('DELETE FROM `news` WHERE `id`="' . $id . '" LIMIT 1');
 
 

+ 1 - 1
system/acp/sections/news/index.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['subsection']) and $url['subsection'] == 'search')
 if (isset($url['subsection']) and $url['subsection'] == 'search')
     include(SEC . 'news/search.php');
     include(SEC . 'news/search.php');

+ 1 - 1
system/acp/sections/news/news.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('SELECT `name`, `text`, `full_text`, `tags` FROM `news` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('SELECT `name`, `text`, `full_text`, `tags` FROM `news` WHERE `id`="' . $id . '" LIMIT 1');
 $news = $sql->get();
 $news = $sql->get();

+ 3 - 3
system/acp/sections/news/search.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 
 
@@ -15,14 +15,14 @@ if (is_array($cache)) {
     sys::outjs($cache);
     sys::outjs($cache);
 }
 }
 
 
-if (!isset($text{2})) {
+if (!isset($text[2])) {
     if ($go)
     if ($go)
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
 
 
     sys::outjs(array('e' => ''));
     sys::outjs(array('e' => ''));
 }
 }
 
 
-if ($text{0} == 'i' and $text{1} == 'd')
+if ($text[0] == 'i' and $text[1] == 'd')
     $sql->query('SELECT `id`, `name`, `tags`, `views`, `date` FROM `news` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
     $sql->query('SELECT `id`, `name`, `tags`, `views`, `date` FROM `news` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
 else {
 else {
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

+ 1 - 1
system/acp/sections/notice/add.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($go) {
 if ($go) {
     $aData = array();
     $aData = array();

+ 1 - 1
system/acp/sections/notice/delete.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('DELETE FROM `notice` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('DELETE FROM `notice` WHERE `id`="' . $id . '" LIMIT 1');
 
 

+ 1 - 1
system/acp/sections/notice/end.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['subsection']) and $url['subsection'] == 'search')
 if (isset($url['subsection']) and $url['subsection'] == 'search')
     include(SEC . 'notice/search.php');
     include(SEC . 'notice/search.php');

+ 1 - 1
system/acp/sections/notice/index.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['subsection']) and $url['subsection'] == 'search')
 if (isset($url['subsection']) and $url['subsection'] == 'search')
     include(SEC . 'notice/search.php');
     include(SEC . 'notice/search.php');

+ 1 - 1
system/acp/sections/notice/notice.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('SELECT * FROM `notice` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('SELECT * FROM `notice` WHERE `id`="' . $id . '" LIMIT 1');
 $notice = $sql->get();
 $notice = $sql->get();

+ 3 - 3
system/acp/sections/notice/search.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 
 
@@ -15,14 +15,14 @@ if (is_array($cache)) {
     sys::outjs($cache);
     sys::outjs($cache);
 }
 }
 
 
-if (!isset($text{2})) {
+if (!isset($text[2])) {
     if ($go)
     if ($go)
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
 
 
     sys::outjs(array('e' => ''));
     sys::outjs(array('e' => ''));
 }
 }
 
 
-if ($text{0} == 'i' and $text{1} == 'd')
+if ($text[0] == 'i' and $text[1] == 'd')
     $notices = $sql->query('SELECT `id`, `unit`, `server`, `text`, `time` FROM `notice` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
     $notices = $sql->query('SELECT `id`, `unit`, `server`, `text`, `time` FROM `notice` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
 else {
 else {
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

+ 1 - 1
system/acp/sections/pages/add.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($go) {
 if ($go) {
     $aData = array();
     $aData = array();

+ 1 - 1
system/acp/sections/pages/delete.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('SELECT `file` FROM `pages` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('SELECT `file` FROM `pages` WHERE `id`="' . $id . '" LIMIT 1');
 $page = $sql->get();
 $page = $sql->get();

+ 1 - 1
system/acp/sections/pages/index.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($id)
 if ($id)
     include(SEC . 'pages/page.php');
     include(SEC . 'pages/page.php');

+ 1 - 1
system/acp/sections/pages/page.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('SELECT `name`, `file` FROM `pages` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('SELECT `name`, `file` FROM `pages` WHERE `id`="' . $id . '" LIMIT 1');
 $page = $sql->get();
 $page = $sql->get();

+ 1 - 1
system/acp/sections/promo/add.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($go) {
 if ($go) {
     $aData = array();
     $aData = array();

+ 1 - 1
system/acp/sections/promo/delete.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('DELETE FROM `promo` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('DELETE FROM `promo` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('DELETE FROM `promo_use` WHERE `promo`="' . $id . '" LIMIT 1');
 $sql->query('DELETE FROM `promo_use` WHERE `promo`="' . $id . '" LIMIT 1');

+ 1 - 1
system/acp/sections/promo/end.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['subsection']) and $url['subsection'] == 'search')
 if (isset($url['subsection']) and $url['subsection'] == 'search')
     include(SEC . 'promo/search.php');
     include(SEC . 'promo/search.php');

+ 1 - 1
system/acp/sections/promo/index.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['subsection']) and $url['subsection'] == 'search')
 if (isset($url['subsection']) and $url['subsection'] == 'search')
     include(SEC . 'promo/search.php');
     include(SEC . 'promo/search.php');

+ 1 - 1
system/acp/sections/promo/promo.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('SELECT * FROM `promo` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('SELECT * FROM `promo` WHERE `id`="' . $id . '" LIMIT 1');
 $promo = $sql->get();
 $promo = $sql->get();

+ 3 - 3
system/acp/sections/promo/search.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 
 
@@ -15,14 +15,14 @@ if (is_array($cache)) {
     sys::outjs($cache);
     sys::outjs($cache);
 }
 }
 
 
-if (!isset($text{2})) {
+if (!isset($text[2])) {
     if ($go)
     if ($go)
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
 
 
     sys::outjs(array('e' => ''));
     sys::outjs(array('e' => ''));
 }
 }
 
 
-if ($text{0} == 'i' and $text{1} == 'd')
+if ($text[0] == 'i' and $text[1] == 'd')
     $promos = $sql->query('SELECT `id`, `cod`, `value`, `discount`, `use`, `extend`, `tarif`, `time` FROM `promo` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
     $promos = $sql->query('SELECT `id`, `cod`, `value`, `discount`, `use`, `extend`, `tarif`, `time` FROM `promo` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
 else {
 else {
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

+ 1 - 1
system/acp/sections/promo/stats.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['delete'])) {
 if (isset($url['delete'])) {
     $sql->query('DELETE FROM `promo_use` WHERE `id`="' . sys::int($url['delete']) . '" LIMIT 1');
     $sql->query('DELETE FROM `promo_use` WHERE `id`="' . sys::int($url['delete']) . '" LIMIT 1');

+ 1 - 1
system/acp/sections/servers/crmp.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($id)
 if ($id)
     include(SEC . 'servers/server.php');
     include(SEC . 'servers/server.php');

+ 1 - 1
system/acp/sections/servers/cs.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($id)
 if ($id)
     include(SEC . 'servers/server.php');
     include(SEC . 'servers/server.php');

+ 75 - 0
system/acp/sections/servers/cs2.php

@@ -0,0 +1,75 @@
+<?php
+if (!DEFINED('EGP'))
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
+
+if ($id)
+    include(SEC . 'servers/server.php');
+else {
+    $list = '';
+
+    $status = array(
+        'working' => '<span class="text-green">Работает</span>',
+        'off' => '<span class="text-red">Выключен</span>',
+        'start' => 'Запускается',
+        'restart' => 'Перезапускается',
+        'change' => 'Смена карты',
+        'install' => 'Устанавливается',
+        'reinstall' => 'Переустанавливается',
+        'update' => 'Обновляется',
+        'recovery' => 'Восстанавливается',
+        'overdue' => 'Просрочен',
+        'blocked' => 'Заблокирован'
+    );
+
+    $select = 'WHERE `user`!="-1"';
+    $url_search = '';
+
+    if (isset($url['search']) and in_array($url['search'], array('unit', 'tarif'))) {
+        $select = 'WHERE `' . $url['search'] . '`="' . sys::int($url[$url['search']]) . '" AND `user`!="-1"';
+        $url_search = '/search/' . $url['search'] . '/' . $url['search'] . '/' . $url[$url['search']];
+    }
+
+    $sql->query('SELECT `id` FROM `servers` ' . $select . ' AND `game`="cs2"');
+
+    $aPage = sys::page($page, $sql->num(), 20);
+
+    sys::page_gen($aPage['ceil'], $page, $aPage['page'], 'acp/servers/section/cs2' . $url_search);
+
+    $servers = $sql->query('SELECT `id`, `unit`, `tarif`, `user`, `address`, `game`, `status`, `slots`, `name`, `time` FROM `servers` ' . $select . ' AND `game`="cs2" ORDER BY `id` ASC LIMIT ' . $aPage['num'] . ', 20');
+    while ($server = $sql->get($servers)) {
+        $sql->query('SELECT `name` FROM `units` WHERE `id`="' . $server['unit'] . '" LIMIT 1');
+        $unit = $sql->get();
+
+        $sql->query('SELECT `name` FROM `tarifs` WHERE `id`="' . $server['tarif'] . '" LIMIT 1');
+        $tarif = $sql->get();
+
+        $list .= '<tr>';
+        $list .= '<td class="text-center">' . $server['id'] . '</td>';
+        $list .= '<td><a href="' . $cfg['http'] . 'acp/servers/id/' . $server['id'] . '">' . $server['name'] . '</a></td>';
+        $list .= '<td><a href="' . $cfg['http'] . 'acp/servers/search/unit/unit/' . $server['unit'] . '">#' . $server['unit'] . ' ' . $unit['name'] . '</a></td>';
+        $list .= '<td class="text-center">' . $server['slots'] . ' шт.</td>';
+        $list .= '<td class="text-center">' . strtoupper($server['game']) . '</td>';
+        $list .= '<td class="text-center"><a href="' . $cfg['http'] . 'servers/id/' . $server['id'] . '" target="_blank">Перейти</a></td>';
+        $list .= '</tr>';
+
+        $list .= '<tr>';
+        $list .= '<td class="text-center"><a href="' . $cfg['http'] . 'acp/users/id/' . $server['user'] . '">USER_' . $server['user'] . '</a></td>';
+        $list .= '<td>' . $server['address'] . '</td>';
+        $list .= '<td><a href="' . $cfg['http'] . 'acp/servers/search/tarif/tarif/' . $server['tarif'] . '">#' . $server['tarif'] . ' ' . $tarif['name'] . '</a></td>';
+        $list .= '<td class="text-center">' . $status[$server['status']] . '</td>';
+        $list .= '<td class="text-center">' . date('d.m.Y - H:i:s', $server['time']) . '</td>';
+        $list .= '<td class="text-center"><a href="#" onclick="return servers_delete(\'' . $server['id'] . '\')" class="text-red">Удалить</a></td>';
+        $list .= '</tr>';
+    }
+
+    $html->get('index', 'sections/servers');
+
+    $html->set('list', $list);
+
+    $html->set('url_search', $url_search);
+
+    $html->set('pages', isset($html->arr['pages']) ? $html->arr['pages'] : '');
+
+    $html->pack('main');
+}
+?>

+ 1 - 1
system/acp/sections/servers/csgo.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($id)
 if ($id)
     include(SEC . 'servers/server.php');
     include(SEC . 'servers/server.php');

+ 1 - 1
system/acp/sections/servers/css.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($id)
 if ($id)
     include(SEC . 'servers/server.php');
     include(SEC . 'servers/server.php');

+ 1 - 1
system/acp/sections/servers/cssold.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($id)
 if ($id)
     include(SEC . 'servers/server.php');
     include(SEC . 'servers/server.php');

+ 1 - 1
system/acp/sections/servers/delete.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('UPDATE `servers` set `user`="-1", `status`="overdue", `time`="0", `overdue`="0" WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('UPDATE `servers` set `user`="-1", `status`="overdue", `time`="0", `overdue`="0" WHERE `id`="' . $id . '" LIMIT 1');
 
 

+ 1 - 1
system/acp/sections/servers/index.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['subsection']) and $url['subsection'] == 'search')
 if (isset($url['subsection']) and $url['subsection'] == 'search')
     include(SEC . 'servers/search.php');
     include(SEC . 'servers/search.php');

+ 1 - 1
system/acp/sections/servers/mc.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($id)
 if ($id)
     include(SEC . 'servers/server.php');
     include(SEC . 'servers/server.php');

+ 1 - 1
system/acp/sections/servers/mta.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($id)
 if ($id)
     include(SEC . 'servers/server.php');
     include(SEC . 'servers/server.php');

+ 1 - 1
system/acp/sections/servers/overdue.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($id)
 if ($id)
     include(SEC . 'servers/server.php');
     include(SEC . 'servers/server.php');

+ 75 - 0
system/acp/sections/servers/rust.php

@@ -0,0 +1,75 @@
+<?php
+if (!DEFINED('EGP'))
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
+
+if ($id)
+    include(SEC . 'servers/server.php');
+else {
+    $list = '';
+
+    $status = array(
+        'working' => '<span class="text-green">Работает</span>',
+        'off' => '<span class="text-red">Выключен</span>',
+        'start' => 'Запускается',
+        'restart' => 'Перезапускается',
+        'change' => 'Смена карты',
+        'install' => 'Устанавливается',
+        'reinstall' => 'Переустанавливается',
+        'update' => 'Обновляется',
+        'recovery' => 'Восстанавливается',
+        'overdue' => 'Просрочен',
+        'blocked' => 'Заблокирован'
+    );
+
+    $select = 'WHERE `user`!="-1"';
+    $url_search = '';
+
+    if (isset($url['search']) and in_array($url['search'], array('unit', 'tarif'))) {
+        $select = 'WHERE `' . $url['search'] . '`="' . sys::int($url[$url['search']]) . '" AND `user`!="-1"';
+        $url_search = '/search/' . $url['search'] . '/' . $url['search'] . '/' . $url[$url['search']];
+    }
+
+    $sql->query('SELECT `id` FROM `servers` ' . $select . ' AND `game`="rust"');
+
+    $aPage = sys::page($page, $sql->num(), 20);
+
+    sys::page_gen($aPage['ceil'], $page, $aPage['page'], 'acp/servers/section/rust' . $url_search);
+
+    $servers = $sql->query('SELECT `id`, `unit`, `tarif`, `user`, `address`, `game`, `status`, `slots`, `name`, `time` FROM `servers` ' . $select . ' AND `game`="rust" ORDER BY `id` ASC LIMIT ' . $aPage['num'] . ', 20');
+    while ($server = $sql->get($servers)) {
+        $sql->query('SELECT `name` FROM `units` WHERE `id`="' . $server['unit'] . '" LIMIT 1');
+        $unit = $sql->get();
+
+        $sql->query('SELECT `name` FROM `tarifs` WHERE `id`="' . $server['tarif'] . '" LIMIT 1');
+        $tarif = $sql->get();
+
+        $list .= '<tr>';
+        $list .= '<td class="text-center">' . $server['id'] . '</td>';
+        $list .= '<td><a href="' . $cfg['http'] . 'acp/servers/id/' . $server['id'] . '">' . $server['name'] . '</a></td>';
+        $list .= '<td><a href="' . $cfg['http'] . 'acp/servers/search/unit/unit/' . $server['unit'] . '">#' . $server['unit'] . ' ' . $unit['name'] . '</a></td>';
+        $list .= '<td class="text-center">' . $server['slots'] . ' шт.</td>';
+        $list .= '<td class="text-center">' . strtoupper($server['game']) . '</td>';
+        $list .= '<td class="text-center"><a href="' . $cfg['http'] . 'servers/id/' . $server['id'] . '" target="_blank">Перейти</a></td>';
+        $list .= '</tr>';
+
+        $list .= '<tr>';
+        $list .= '<td class="text-center"><a href="' . $cfg['http'] . 'acp/users/id/' . $server['user'] . '">USER_' . $server['user'] . '</a></td>';
+        $list .= '<td>' . $server['address'] . '</td>';
+        $list .= '<td><a href="' . $cfg['http'] . 'acp/servers/search/tarif/tarif/' . $server['tarif'] . '">#' . $server['tarif'] . ' ' . $tarif['name'] . '</a></td>';
+        $list .= '<td class="text-center">' . $status[$server['status']] . '</td>';
+        $list .= '<td class="text-center">' . date('d.m.Y - H:i:s', $server['time']) . '</td>';
+        $list .= '<td class="text-center"><a href="#" onclick="return servers_delete(\'' . $server['id'] . '\')" class="text-red">Удалить</a></td>';
+        $list .= '</tr>';
+    }
+
+    $html->get('index', 'sections/servers');
+
+    $html->set('list', $list);
+
+    $html->set('url_search', $url_search);
+
+    $html->set('pages', isset($html->arr['pages']) ? $html->arr['pages'] : '');
+
+    $html->pack('main');
+}
+?>

+ 1 - 1
system/acp/sections/servers/samp.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($id)
 if ($id)
     include(SEC . 'servers/server.php');
     include(SEC . 'servers/server.php');

+ 4 - 4
system/acp/sections/servers/search.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 $text = isset($_POST['text']) ? trim($_POST['text']) : '';
 
 
@@ -15,7 +15,7 @@ if (is_array($cache)) {
     sys::outjs($cache);
     sys::outjs($cache);
 }
 }
 
 
-if (!isset($text{2})) {
+if (!isset($text[2])) {
     if ($go)
     if ($go)
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
         sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
 
 
@@ -34,7 +34,7 @@ if (in_array($check[0], array('game', 'unit', 'core', 'tarif', 'user', 'status',
 
 
     switch ($check[0]) {
     switch ($check[0]) {
         case 'game':
         case 'game':
-            if (in_array($val, array('cs', 'cssold', 'css', 'csgo', 'samp', 'crmp', 'mta', 'mc')))
+            if (in_array($val, array('cs', 'cssold', 'css', 'csgo',' cs2', 'samp', 'crmp', 'mta', 'mc')))
                 $servers = $sql->query('SELECT ' . $select . ' FROM `servers` WHERE `user`!="-1" AND `game`="' . $val . '" ORDER BY `id` ASC');
                 $servers = $sql->query('SELECT ' . $select . ' FROM `servers` WHERE `user`!="-1" AND `game`="' . $val . '" ORDER BY `id` ASC');
             break;
             break;
 
 
@@ -63,7 +63,7 @@ if (in_array($check[0], array('game', 'unit', 'core', 'tarif', 'user', 'status',
             $servers = $sql->query('SELECT ' . $select . ' `slots`="' . sys::int($val) . '" ORDER BY `id` ASC');
             $servers = $sql->query('SELECT ' . $select . ' `slots`="' . sys::int($val) . '" ORDER BY `id` ASC');
             break;
             break;
     }
     }
-} elseif ($text{0} == 'i' and $text{1} == 'd')
+} elseif ($text[0] == 'i' and $text[1] == 'd')
     $servers = $sql->query('SELECT ' . $select . ' `id`="' . sys::int($text) . '" LIMIT 1');
     $servers = $sql->query('SELECT ' . $select . ' `id`="' . sys::int($text) . '" LIMIT 1');
 else {
 else {
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'
     $like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

+ 1 - 1
system/acp/sections/servers/server.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('SELECT `time`, `overdue` FROM `servers` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('SELECT `time`, `overdue` FROM `servers` WHERE `id`="' . $id . '" LIMIT 1');
 $server = $sql->get();
 $server = $sql->get();

+ 3 - 2
system/acp/sections/tarifs/add.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if ($go) {
 if ($go) {
     $aData = array();
     $aData = array();
@@ -47,7 +47,7 @@ if ($go) {
     if (!$sql->num())
     if (!$sql->num())
         sys::outjs(array('e' => 'Необходимо указать локацию'));
         sys::outjs(array('e' => 'Необходимо указать локацию'));
 
 
-    if (!in_array($aData['game'], array('cs', 'cssold', 'css', 'csgo', 'samp', 'crmp', 'mta', 'mc')))
+    if (!in_array($aData['game'], array('cs', 'cssold', 'css', 'csgo', 'cs2', 'rust', 'samp', 'crmp', 'mta', 'mc')))
         sys::outjs(array('e' => 'Необходимо указать игру'));
         sys::outjs(array('e' => 'Необходимо указать игру'));
 
 
     $aSlots = explode('-', $aData['slots']);
     $aSlots = explode('-', $aData['slots']);
@@ -328,6 +328,7 @@ if ($go) {
             break;
             break;
 
 
         case 'css':
         case 'css':
+        case 'cs2':
         case 'csgo':
         case 'csgo':
             if (count(explode(':', $aData['tickrate'])) != count(explode(':', $aData['price'])))
             if (count(explode(':', $aData['tickrate'])) != count(explode(':', $aData['price'])))
                 sys::outjs(array('e' => 'Неправильно указано поле "Цена"'));
                 sys::outjs(array('e' => 'Неправильно указано поле "Цена"'));

+ 5 - 5
system/acp/sections/tarifs/copy.php

@@ -1,12 +1,12 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('SELECT * FROM `tarifs` WHERE `id`="' . $id . '" LIMIT 1');
 $sql->query('SELECT * FROM `tarifs` WHERE `id`="' . $id . '" LIMIT 1');
 $tarif = $sql->get();
 $tarif = $sql->get();
 
 
 $games = '<option value="cs">Counter-Strike: 1.6</option><option value="cssold">Counter-Strike: Source v34</option><option value="css">Counter-Strike: Source</option>'
 $games = '<option value="cs">Counter-Strike: 1.6</option><option value="cssold">Counter-Strike: Source v34</option><option value="css">Counter-Strike: Source</option>'
-    . '<option value="csgo">Counter-Strike: Global Offensive</option><option value="samp">San Andreas Multiplayer</option><option value="crmp">GTA: Criminal Russia</option>'
+    . '<option value="csgo">Counter-Strike: Global Offensive</option><option value="cs2">Counter-Strike: 2</option><option value="rust">RUST</option><option value="samp">San Andreas Multiplayer</option><option value="crmp">GTA: Criminal Russia</option>'
     . '<option value="mta">Multi Theft Auto</option><option value="mc">Minecraft</option>';
     . '<option value="mta">Multi Theft Auto</option><option value="mc">Minecraft</option>';
 
 
 $fix = $tarif['param_fix'] ? '<option value="1">Фиксированные параметры</option><option value="0">Не фиксированные параметры</option>' : '<option value="0">Не фиксированные параметры</option><option value="1">Фиксированные параметры</option>';
 $fix = $tarif['param_fix'] ? '<option value="1">Фиксированные параметры</option><option value="0">Не фиксированные параметры</option>' : '<option value="0">Не фиксированные параметры</option><option value="1">Фиксированные параметры</option>';
@@ -33,7 +33,7 @@ if ($tarif['game'] == 'cssold') {
     foreach ($aPrice as $price)
     foreach ($aPrice as $price)
         $sprice .= $price . ':';
         $sprice .= $price . ':';
 
 
-    $sprice = isset($sprice{0}) ? substr($sprice, 0, -1) : '';
+    $sprice = isset($sprice[0]) ? substr($sprice, 0, -1) : '';
 
 
     $tarif['price'] = $sprice;
     $tarif['price'] = $sprice;
 }
 }
@@ -63,7 +63,7 @@ $aPacks = sys::b64djs($tarif['packs']);
 foreach ($aPacks as $name => $fullname)
 foreach ($aPacks as $name => $fullname)
     $packs .= '"' . $name . '":"' . $fullname . '",';
     $packs .= '"' . $name . '":"' . $fullname . '",';
 
 
-$packs = isset($packs{0}) ? substr($packs, 0, -1) : '';
+$packs = isset($packs[0]) ? substr($packs, 0, -1) : '';
 
 
 $html->set('packs', $packs);
 $html->set('packs', $packs);
 
 
@@ -74,7 +74,7 @@ $aPlugins = sys::b64djs($tarif['plugins_install']);
 foreach ($aPlugins as $pack => $list)
 foreach ($aPlugins as $pack => $list)
     $plugins .= '"' . $pack . '":"' . $list . '",';
     $plugins .= '"' . $pack . '":"' . $list . '",';
 
 
-$plugins = isset($plugins{0}) ? substr($plugins, 0, -1) : '';
+$plugins = isset($plugins[0]) ? substr($plugins, 0, -1) : '';
 
 
 $html->set('plugins_install', $plugins);
 $html->set('plugins_install', $plugins);
 
 

+ 1 - 1
system/acp/sections/tarifs/delete.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 $sql->query('SELECT `id` FROM `servers` WHERE `tarif`="' . $id . '" LIMIT 1');
 $sql->query('SELECT `id` FROM `servers` WHERE `tarif`="' . $id . '" LIMIT 1');
 if ($sql->num())
 if ($sql->num())

+ 6 - 2
system/acp/sections/tarifs/index.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 if (!DEFINED('EGP'))
 if (!DEFINED('EGP'))
-    exit(header('Refresh: 0; URL=http://' . $_SERVER['SERVER_NAME'] . '/404'));
+    exit(header('Refresh: 0; URL=http://' . $_SERVER['HTTP_HOST'] . '/404'));
 
 
 if (isset($url['subsection']) and $url['subsection'] == 'search')
 if (isset($url['subsection']) and $url['subsection'] == 'search')
     include(SEC . 'tarifs/search.php');
     include(SEC . 'tarifs/search.php');
@@ -39,7 +39,11 @@ else {
         $list .= '<tr>';
         $list .= '<tr>';
         $list .= '<td>' . $tarif['id'] . '</td>';
         $list .= '<td>' . $tarif['id'] . '</td>';
         $list .= '<td><a href="' . $cfg['http'] . 'acp/tarifs/id/' . $tarif['id'] . '">' . $tarif['name'] . '</a></td>';
         $list .= '<td><a href="' . $cfg['http'] . 'acp/tarifs/id/' . $tarif['id'] . '">' . $tarif['name'] . '</a></td>';
-        $list .= '<td>#' . $tarif['unit'] . ' ' . $unit['name'] . '</td>';
+        if ($unit) {
+            $list .= '<td>#' . $tarif['unit'] . ' ' . $unit['name'] . '</td>';
+        } else {
+            $list .= '<td>Локация отсутствует</td>';
+        }
         $list .= '<td>' . $tarif['slots_min'] . '-' . $tarif['slots_max'] . '</td>';
         $list .= '<td>' . $tarif['slots_min'] . '-' . $tarif['slots_max'] . '</td>';
         $list .= '<td>' . $tarif['port_min'] . '-' . $tarif['port_max'] . '</td>';
         $list .= '<td>' . $tarif['port_min'] . '-' . $tarif['port_max'] . '</td>';
         $list .= '<td>' . strtoupper($tarif['game']) . '</td>';
         $list .= '<td>' . strtoupper($tarif['game']) . '</td>';

部分文件因文件數量過多而無法顯示