public static function AddAutoloadClasses($module, $arParams = array()) { if ($module === '') { $module = null; } \Freetrix\Main\Loader::registerAutoLoadClasses($module, $arParams); return true; }
<?php /** * @package: Freetrix Core * Main file for launch base libs * **/ error_reporting(E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_PARSE); require_once $_SERVER["DOCUMENT_ROOT"] . '/freetrix/modules/main/SetCorePath.php'; include_once $_SERVER["DOCUMENT_ROOT"] . "/freetrix/modules/main/lib/loader.php"; require_once $_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/Helpers.php"; \Freetrix\Main\Loader::registerAutoLoadClasses("main", array("freetrix\\main\\application" => "lib/application.php", "freetrix\\main\\httpapplication" => "lib/httpapplication.php", "freetrix\\main\\argumentexception" => "lib/exception.php", "freetrix\\main\\argumentnullexception" => "lib/exception.php", "freetrix\\main\\argumentoutofrangeexception" => "lib/exception.php", "freetrix\\main\\argumenttypeexception" => "lib/exception.php", "freetrix\\main\notimplementedexception" => "lib/exception.php", "freetrix\\main\notsupportedexception" => "lib/exception.php", "freetrix\\main\\objectpropertyexception" => "lib/exception.php", "freetrix\\main\\systemexception" => "lib/exception.php", "freetrix\\main\\context" => "lib/context.php", "freetrix\\main\\httpcontext" => "lib/httpcontext.php", "freetrix\\mainvent" => "lib/event.php", "freetrix\\mainventmanager" => "lib/eventmanager.php", "freetrix\\mainventresult" => "lib/eventresult.php", "freetrix\\main\request" => "lib/request.php", "freetrix\\main\\httprequest" => "lib/httprequest.php", "freetrix\\main\response" => "lib/response.php", "freetrix\\main\\httpresponse" => "lib/httpresponse.php", "freetrix\\main\\modulemanager" => "lib/modulemanager.php", "freetrix\\main\\server" => "lib/server.php", "freetrix\\main\\config\\configuration" => "lib/config/configuration.php", "freetrix\\main\\config\\option" => "lib/config/option.php", "freetrix\\main\\context\\culture" => "lib/context/culture.php", "freetrix\\main\\context\\site" => "lib/context/site.php", "freetrix\\main\\data\\connection" => "lib/data/connection.php", "freetrix\\main\\data\\connectionpool" => "lib/data/connectionpool.php", "freetrix\\main\\data\\hsphpreadconnection" => "lib/data/hsphpreadconnection.php", "freetrix\\main\\data\nosqlconnection" => "lib/data/nosqlconnection.php", "freetrix\\main\\db\\arrayresult" => "lib/db/arrayresult.php", "freetrix\\main\\db\result" => "lib/db/result.php", "freetrix\\main\\db\\connection" => "lib/db/connection.php", "freetrix\\main\\db\\sqlexception" => "lib/db/sqlexception.php", "freetrix\\main\\db\\sqlqueryexception" => "lib/db/sqlexception.php", "freetrix\\main\\db\\sqlexpression" => "lib/db/sqlexpression.php", "freetrix\\main\\db\\sqlhelper" => "lib/db/sqlhelper.php", "freetrix\\main\\db\\mysqlconnection" => "lib/db/mysqlconnection.php", "freetrix\\main\\db\\mysqlresult" => "lib/db/mysqlresult.php", "freetrix\\main\\db\\mysqlsqlhelper" => "lib/db/mysqlsqlhelper.php", "freetrix\\main\\db\\mysqliconnection" => "lib/db/mysqliconnection.php", "freetrix\\main\\db\\mysqliresult" => "lib/db/mysqliresult.php", "freetrix\\main\\db\\mysqlisqlhelper" => "lib/db/mysqlisqlhelper.php", "freetrix\\main\\diag\\httpexceptionhandleroutput" => "lib/diag/httpexceptionhandleroutput.php", "freetrix\\main\\diag\fileexceptionhandlerlog" => "lib/diag/fileexceptionhandlerlog.php", "freetrix\\main\\diagxceptionhandler" => "lib/diag/exceptionhandler.php", "freetrix\\main\\diag\\iexceptionhandleroutput" => "lib/diag/iexceptionhandleroutput.php", "freetrix\\main\\diagxceptionhandlerlog" => "lib/diag/exceptionhandlerlog.php", "freetrix\\main\\io\file" => "lib/io/file.php", "freetrix\\main\\io\fileentry" => "lib/io/fileentry.php", "freetrix\\main\\io\\path" => "lib/io/path.php", "freetrix\\main\\io\filesystementry" => "lib/io/filesystementry.php", "freetrix\\main\\io\\ifilestream" => "lib/io/ifilestream.php", "freetrix\\main\\localization\\loc" => "lib/localization/loc.php", "freetrix\\main\text\\converter" => "lib/text/converter.php", "freetrix\\main\textmptyconverter" => "lib/text/emptyconverter.php", "freetrix\\main\textncoding" => "lib/text/encoding.php", "freetrix\\main\text\\htmlconverter" => "lib/text/htmlconverter.php", "freetrix\\main\text\\string" => "lib/text/string.php", "freetrix\\main\text\\xmlconverter" => "lib/text/xmlconverter.php", "freetrix\\main\type\\collection" => "lib/type/collection.php", "freetrix\\main\type\\datetime" => "lib/type/datetime.php", "freetrix\\main\type\\dictionary" => "lib/type/dictionary.php", "freetrix\\main\type\filterabledictionary" => "lib/type/filterabledictionary.php", "freetrix\\main\type\\parameterdictionary" => "lib/type/parameterdictionary.php", "freetrix\\main\\web\\cookie" => "lib/web/cookie.php", "freetrix\\main\\web\\uri" => "lib/web/uri.php", 'CTimeZone' => 'classes/general/time.php')); $application = \Freetrix\Main\HttpApplication::getInstance(); $application->initializeBasicKernel(); define("B_PROLOG_INCLUDED", true); /* Влияет на добавление типов инфоблока и просмотра инфоблоков */ FormDecode(); define("FX_UTF", true); define("FX_FILE_PERMISSIONS", 0644); define("FX_DIR_PERMISSIONS", 0755); @umask(~FX_DIR_PERMISSIONS); define("FX_DISABLE_INDEX_PAGE", true); define("FX_UTF_PCRE_MODIFIER", "u"); define("POST_FORM_ACTION_URI", htmlspecialcharsbx("/" . ltrim($_SERVER["REQUEST_URI"], "/"))); $connectionSettings = \Freetrix\Main\Config\Configuration::getValue('connections'); $DBType = $connectionSettings['default']['dbType']; $DBHost = $connectionSettings['default']['host']; $DBLogin = $connectionSettings['default']['login']; $DBPassword = $connectionSettings['default']['password']; $DBName = $connectionSettings['default']['database']; $DBDebug = $connectionSettings['default']['debug'];
$appContext->setCulture(new \Freetrix\Main\Context\Culture($definedLang)); $Application->start(); $GLOBALS["APPLICATION"]->reinitPath(); $GLOBALS["MESS"] = array(); $GLOBALS["ALL_LANG_FILES"] = array(); IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/Helpers.php"); IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/date_format.php"); IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/classes/general/database.php"); IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/classes/general/main.php"); IncludeModuleLangFile(__FILE__); error_reporting(COption::GetOptionInt("main", "error_reporting", E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_PARSE) & ~E_STRICT); require_once $_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/filter_tools.php"; require_once $_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/ajax_tools.php"; $GLOBALS["arCustomTemplateEngines"] = array(); require_once $_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/classes/general/urlrewriter.php"; \Freetrix\Main\Loader::registerAutoLoadClasses("main", array("CSiteTemplate" => "classes/general/site_template.php", "CFreetrixComponent" => "classes/general/component.php", "CComponentEngine" => "classes/general/component_engine.php", "CComponentAjax" => "classes/general/component_ajax.php", "CFreetrixComponentTemplate" => "classes/general/component_template.php", "CComponentUtil" => "classes/general/component_util.php", "CControllerClient" => "classes/general/controller_member.php", "PHPParser" => "classes/general/php_parser.php", "CDiskQuota" => "classes/" . $DBType . "/quota.php", "CEventLog" => "classes/general/event_log.php", "CEventMain" => "classes/general/event_log.php", "CAdminFileDialog" => "classes/general/file_dialog.php", "WLL_User" => "classes/general/liveid.php", "WLL_ConsentToken" => "classes/general/liveid.php", "WindowsLiveLogin" => "classes/general/liveid.php", "CAllFile" => "classes/general/file.php", "CFile" => "classes/" . $DBType . "/file.php", "CTempFile" => "classes/general/file_temp.php", "CFavorites" => "classes/" . $DBType . "/favorites.php", "CUserOptions" => "classes/general/user_options.php", "CGridOptions" => "classes/general/grids.php", "CUndo" => "/classes/general/undo.php", "CAutoSave" => "/classes/general/undo.php", "CRatings" => "classes/" . $DBType . "/ratings.php", "CRatingsComponentsMain" => "classes/" . $DBType . "/ratings_components.php", "CRatingRule" => "classes/general/rating_rule.php", "CRatingRulesMain" => "classes/" . $DBType . "/rating_rules.php", "CTopPanel" => "public/top_panel.php", "CEditArea" => "public/edit_area.php", "CComponentPanel" => "public/edit_area.php", "CTextParser" => "classes/general/textparser.php", "CDataXML" => "classes/general/xml.php", "CXMLFileStream" => "classes/general/xml.php", "CRsaProvider" => "classes/general/rsasecurity.php", "CRsaSecurity" => "classes/general/rsasecurity.php", "CRsaBcmathProvider" => "classes/general/rsabcmath.php", "CRsaOpensslProvider" => "classes/general/rsaopenssl.php", "CASNReader" => "classes/general/asn.php", "CBXShortUri" => "classes/" . $DBType . "/short_uri.php", "CFinder" => "classes/general/finder.php", "CAccess" => "classes/general/access.php", "CAuthProvider" => "classes/general/authproviders.php", "IProviderInterface" => "classes/general/authproviders.php", "CGroupAuthProvider" => "classes/general/authproviders.php", "CUserAuthProvider" => "classes/general/authproviders.php", "CTableSchema" => "classes/general/table_schema.php", "CCSVData" => "classes/general/csv_data.php", "CSmile" => "classes/general/smile.php", "CSmileSet" => "classes/general/smile.php", "CUserCounter" => "classes/" . $DBType . "/user_counter.php", "CHotKeys" => "classes/general/hot_keys.php", "CHotKeysCode" => "classes/general/hot_keys.php", "CBXSanitizer" => "classes/general/sanitizer.php", "CBXArchive" => "classes/general/archive.php", "CAdminNotify" => "classes/general/admin_notify.php", "CBXFavAdmMenu" => "classes/general/favorites.php", "CSiteCheckerTest" => "classes/general/site_checker.php", "CSqlUtil" => "classes/general/sql_util.php")); require_once $_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/classes/" . $DBType . "/agent.php"; require_once $_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/classes/" . $DBType . "/user.php"; require_once $_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/classes/" . $DBType . "/event.php"; require_once $_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/classes/general/menu.php"; require_once $_SERVER["DOCUMENT_ROOT"] . FX_ROOT . "/modules/main/classes/" . $DBType . "/usertype.php"; $GLOBALS["APPLICATION"]->AddJSKernelInfo("main", array("/freetrix/js/main/core/core.js", "/freetrix/js/main/core/core_ajax.js", "/freetrix/js/main/json/json2.min.js", "/freetrix/js/main/core/core_ls.js", "/freetrix/js/main/core/core_popup.js", "/freetrix/js/main/core/core_tooltip.js", "/freetrix/js/main/core/core_fx.js", "/freetrix/js/main/core/core_window.js", "/freetrix/js/main/core/core_autosave.js", "/freetrix/js/main/rating_like.js", "/freetrix/js/main/session.js", "/freetrix/js/main/dd.js", "/freetrix/js/main/utils.js", "/freetrix/js/main/core/core_dd.js")); $GLOBALS["APPLICATION"]->AddCSSKernelInfo("main", array("/freetrix/js/main/core/css/core.css", "/freetrix/js/main/core/css/core_popup.css", "/freetrix/js/main/core/css/core_tooltip.css", "/freetrix/js/main/core/css/core_date.css", "/freetrix/js/main/core/css/core_date.css/popup.css")); if (file_exists($init_php = $_SERVER["DOCUMENT_ROOT"] . "/freetrix/init.php")) { include_once $init_php; } if (($init_phpinterface = getLocalPath("php_interface/init.php", FX_PERSONAL_ROOT)) !== false) { include_once $_SERVER["DOCUMENT_ROOT"] . $init_phpinterface; } if (($siteid_php_init = getLocalPath("php_interface/" . SITE_ID . "/init.php", FX_PERSONAL_ROOT)) !== false) { include_once $_SERVER["DOCUMENT_ROOT"] . $siteid_php_init;