/* error_reporting(E_ALL); ini_set('display_errors', true); ini_set('html_errors', true); ini_set('error_reporting', E_ALL); */ // Определение префикса названий таблиц в БД PdoWrap::setEncoding(ENCODING); PdoWrap::setEncodingConnection(ENCODING_CONNECTION); PdoWrap::setPrefix($db_conf['db_table_prefix']); // Установка основных переменных класса Files::setDir(USERFILES); Files::setOrig(IMG_ORIGINAL); // Подключаем Smarty require_once DOC . 'vendors/smarty/Smarty.class.php'; $smarty = new Smarty(); System_Settings::setSmarty_template('.admin'); $smarty->setTemplateDir(System_Settings::getSmarty_template()); $smarty->setCompileDir(System_Settings::getSmarty_compile_dir()); $smarty->setCacheDir(System_Settings::getSmarty_cached_dir()); $smarty->debugging = System_Settings::getSmarty_debugging(); $smarty->caching = false; $smarty->cache_lifetime = 0; // Подключение функций. require_once DOC . 'functions/functions_list.php'; // Подключение функций для щаблонов require_once DOC . 'functions/smarty.functions.php'; $langs = array(); $langs_array = array(); // Список языков. if (defined('MULTILANG') && MULTILANG == 1) { // Получаем список доступных языков
} if (!defined('ENCODING_CONNECTION')) { define('ENCODING_CONNECTION', 'utf8_general_ci'); } // Директория для пользовательских файлов if (!defined('USERFILES')) { define('USERFILES', DOC . 'userfiles/'); } // Сохранение оригинального изображения после загрузки if (!defined('IMG_ORIGINAL')) { define('IMG_ORIGINAL', 'original'); } System_Settings::setLocalDBStr($db_conf); // Настройки для шаблонизатора System_Settings::setSmarty_template_dir(DOC . 'templates/'); System_Settings::setSmarty_template('site'); System_Settings::setSmarty_cached_dir('cache'); System_Settings::setSmarty_compile_dir('compile'); System_Settings::setSmarty_caching(true); System_Settings::setSmarty_compile_check(true); System_Settings::setSmarty_debugging(false); System_Settings::setSmarty_cache_lifetime(86400); // Название сайта. Для интерфейса адимнистрирования. $site_name = $_SERVER['SERVER_NAME']; // Мультиязычность. if (!defined('MULTILANG')) { define('MULTILANG', 1); } // Шаблон по умолчанию. $__template = 'site'; // Язык по умолчанию.