Вход Регистрация
Файл: index.php
Строк: 29
<?php 

/**
 * Буферация
 */
ob_start(); 

/**
 * Подключаем ядро
 */
require_once ('system/main.php'); 

/**
 * Подключаем smarty
 */
require_once H.('/system/smarty/Smarty.class.php');

/**
 * Настройка smarty
 */
$smarty = new Smarty();
$smarty->template_dir H.'/libs/tpl/';
$smarty->compile_dir H.'/libs/tpl/compile/';
$smarty->config_dir H.'/libs/tpl/config/';
$smarty->cache_dir H.'/libs/tpl/cache/';

/**
 * Проверяем есть ли логин в URL
 */
if (isset($_GET['url']) && $db->query("SELECT * FROM `users` WHERE `login` = '".core::input($_GET['url'])."'  LIMIT 1")->num_rows != 0)
{
    require_once (
H.'/plugins/user/profile.php');
    
    exit;
}

/**
 * Проверка на наличия запроса
 */
if (isset($_GET['url']))
{
    
# Фильтрация запроса
    
$module core::text($_GET['url']);

    
# Проверка наличия файла в запросе
    
if (preg_match('/.php$/i'$module)) $module_file true;
    else 
$module_file false;
} else
    
$module false;

if (!empty(
$module))
{
    if (
file_exists(H.'/plugins/'$module) && $module_file == true)
    {
        require_once(
H.'/plugins/'$module);
    }
    else if (
file_exists(H.'/plugins/'$module) && $module_file == false)
    {
        if (
file_exists(H.'/plugins/'$module .'/index.php'))
        {
            require_once(
H.'/plugins/'$module .'/index.php');
        }
        else
        {
            require_once(
H.'/plugins/index.php');
        }
    }
    else
    {
        require_once(
H.'/plugins/page/404.php');
    }
}
else
{
    require_once(
H.'/plugins/index.php');
}
Онлайн: 1
Реклама