core/index.php

26 lines
1.1 KiB
PHP
Raw Normal View History

2022-12-11 13:55:49 +05:00
<?php
namespace start;
ini_set('display_errors', 0 );
require_once('api/php/db.php');
require_once('api/php/json.php');
require_once('api/php/core.php');
require_once('api/php/clean.php');
if ( !@$_SESSION['city'] ) \core::geo();
/* ----------------------------------------------------------------------
09.12.2022
Выбираем модуль по умолчанию
---------------------------------------------------------------------- */
$authModule=\core::getSettings('default_mod_auth');
$mod=($authModule?$authModule:\core::getSettings('default_mod'));
define('MOD', ( @$_GET['mod'] ? $_GET['mod'] : $mod ) );
require_once 'set/int.php';
/* ----------------------------------------------------------------------
09.12.2022
Авторизация по куки
---------------------------------------------------------------------- */
if ( !@$_SESSION['user_id'] ) \core::loginCookies();
if (file_exists('skin/inc/mod/' . MOD . '/index.html'))
$smarty->display('skin/inc/mod/' . MOD . '/index.html', @$_GET['id']);
else
$smarty->display('api/modules/' . MOD . '/index.html', @$_GET['id']);
?>