48 lines
2.0 KiB
PHP
Executable File
48 lines
2.0 KiB
PHP
Executable File
<?php
|
|
namespace start;
|
|
ini_set('display_errors', 1 );
|
|
require_once('api/php/db.php');
|
|
require_once('api/php/json.php');
|
|
require_once('api/php/core.php');
|
|
require_once('api/php/clean.php');
|
|
|
|
echo \DB::$type;
|
|
|
|
/* ----------------------------------------------------------------------
|
|
09.12.2022
|
|
Выбираем модуль по умолчанию
|
|
---------------------------------------------------------------------- */
|
|
$authModule=\core::getSettings('default_mod_auth');
|
|
$mod=($authModule?$authModule:\core::getSettings('default_mod'));
|
|
define('MOD', ( @$_GET['mod'] ? $_GET['mod'] : $mod ) );
|
|
|
|
/* ----------------------------------------------------------------------
|
|
12.12.2022
|
|
Подключаем инсталлятор
|
|
---------------------------------------------------------------------- */
|
|
|
|
if (file_exists('api/modules/' . MOD .'/install_' . \DB::$type . '.php'))require_once 'api/modules/' . MOD .'/install_' . \DB::$type . '.php';
|
|
|
|
/* ----------------------------------------------------------------------
|
|
09.12.2022
|
|
Определяем город
|
|
---------------------------------------------------------------------- */
|
|
|
|
if ( !@$_SESSION['city'] ) \core::geo();
|
|
|
|
require_once 'set/int.php';
|
|
/* ----------------------------------------------------------------------
|
|
09.12.2022
|
|
Авторизация по куки
|
|
---------------------------------------------------------------------- */
|
|
if ( !@$_SESSION['user_id'] ) \core::loginCookies();
|
|
/* ----------------------------------------------------------------------
|
|
09.12.2022
|
|
Выбираем шаблон модуля
|
|
---------------------------------------------------------------------- */
|
|
|
|
if (file_exists('skin/' . $_SERVER['SERVER_NAME'] . '/inc/mod/' . MOD . '/index.html'))
|
|
$smarty->display('skin/' . $_SERVER['SERVER_NAME'] . '/inc/mod/' . MOD . '/index.html', @$_GET['id']);
|
|
else
|
|
$smarty->display('api/modules/' . MOD . '/index.html', @$_GET['id']);
|
|
?>
|