2022-06-06 21:30:34 +00:00
|
|
|
|
<?php
|
2022-08-11 10:38:38 +00:00
|
|
|
|
|
2022-12-20 01:57:09 +00:00
|
|
|
|
use Core\Config;
|
|
|
|
|
use Insallah\Tournaments\Tournament;
|
|
|
|
|
|
2022-06-06 21:30:34 +00:00
|
|
|
|
error_reporting(E_ALL ^ E_NOTICE);
|
|
|
|
|
ini_set('display_errors', 'Off');
|
|
|
|
|
date_default_timezone_set('Europe/Moscow');
|
|
|
|
|
|
2022-12-19 18:26:14 +00:00
|
|
|
|
header('Cache-Control: no-cache, no-store, must-revalidate');
|
|
|
|
|
header('Pragma: no-cache');
|
|
|
|
|
header('Expires: 0');
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
2022-12-19 18:26:14 +00:00
|
|
|
|
require_once 'mysql_override.php';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
2022-12-19 18:26:14 +00:00
|
|
|
|
// Для всех доработок, пока нет автозагрузки классов.
|
2022-07-01 12:45:43 +00:00
|
|
|
|
require_once 'class/Insallah/Config.php';
|
|
|
|
|
|
2022-12-19 18:26:14 +00:00
|
|
|
|
// Попробуем в автозагрузку.
|
|
|
|
|
// Никогда не заработает с такими названиями классов и файлов!
|
|
|
|
|
// "На потом."
|
2022-08-11 10:38:38 +00:00
|
|
|
|
spl_autoload_register(function ($className) {
|
|
|
|
|
# 1 with namespaces
|
|
|
|
|
# 2 without
|
|
|
|
|
$fileName = [
|
|
|
|
|
__DIR__ . '/class/' . str_replace('\\', '/', $className . '.php'),
|
|
|
|
|
__DIR__ . '/class/' . $className . '.php'
|
|
|
|
|
];
|
2022-12-19 18:26:14 +00:00
|
|
|
|
foreach ($fileName as $file) {
|
|
|
|
|
if (file_exists($file)) {
|
|
|
|
|
require_once $file;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2022-08-11 10:38:38 +00:00
|
|
|
|
}
|
|
|
|
|
});
|
2022-12-19 18:26:14 +00:00
|
|
|
|
|
|
|
|
|
$code = '1';
|
2022-12-20 01:57:09 +00:00
|
|
|
|
Config::init();
|
|
|
|
|
$c = Config::get();
|
|
|
|
|
|
|
|
|
|
//Tournament::startAllBattles();
|
2022-12-19 20:16:24 +00:00
|
|
|
|
|