#0 | Phalcon\Mvc\Model\Query->execute() |
#1 | Phalcon\Mvc\Model::findFirst(Array([0] => block='social_items_list', [cache] => Array([lifetime] => 120, [key] => b1d632204204a64b8901f783d47229d52d5ff28fcebc))) /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Mvc/Helper.php (60) <?php namespace Application\Mvc; use Application\Mvc\Router\DefaultRouter; use Cms\Model\Language; class Helper extends \Phalcon\Mvc\User\Component { const StaticBlockDefaultOptions = [ 'lifetime' => 120 ]; private $translate = null; private $admin_translate = null; public $menu; public function __construct() { $this->menu = \Menu\Helper\Menu::getInstance(); } /** * Мультиязычный перевод строки по сайту/пользовательской_части */ public function translate($string, $placeholders = null) { if (!$this->translate) { $this->translate = $this->getDi()->get('translate'); } return $this->translate->query($string, $placeholders); } /** * Мультиязычный перевод строки по админке */ public function at($string, $placeholders = null) { if (!$this->admin_translate) { $this->admin_translate = $this->getDi()->get('admin_translate'); } return $this->admin_translate->query($string, $placeholders); } public function widget($namespace = 'Index', array $params = []) { return new \Application\Widget\Proxy($namespace, $params); } /** * Вызов выджета из модуля blockID * @param $id - идентификатор блока, например "phone" */ public function blockID($id, $params = []) { $mergeConfig = array_merge(self::StaticBlockDefaultOptions, $params); $widget = \Widget\Model\Widget::findFirst(["block='{$id}'", "cache" => ["lifetime" => $mergeConfig["lifetime"], "key" => HOST_HASH . md5("Widget::findFirst({$id})")]]); if ($widget) { return $widget->getHtml(); } } public function currentUrl($curLang) { $href = Language::findFirst("iso='{$curLang}'"); if ($href) { if ($href->getPrimary() == 0) { $url = '/'.$href->getUrl().'/'; } else { $url = '/'; } return $url; } } public function langUrl($params) { $routeName = $params['for']; $routeName = DefaultRouter::ML_PREFIX . $routeName . '_' . LANG; $params['for'] = $routeName; return $this->url->get($params); } public function languages() { return Language::findCachedLanguages(); } public function langSwitcher($lang, $string) { $helper = new \Application\Mvc\Helper\LangSwitcher(); return $helper->render($lang, $string); } public function cacheExpire($seconds) { $response = $this->getDi()->get('response'); $expireDate = new \DateTime(); $expireDate->modify("+$seconds seconds"); $response->setExpires($expireDate); $response->setHeader('Cache-Control', "max-age=$seconds"); } public function isAdminSession() { $session = $this->getDi()->get('session'); $auth = $session->get('auth'); if ($auth) { if ($auth->admin_session == true) { return true; } } } public function error($code = 404) { $helper = new \Application\Mvc\Helper\ErrorReporting(); return $helper->{'error' . $code}(); } public function title($title = null, $h1 = false) { return \Application\Mvc\Helper\Title::getInstance($title, $h1); } public function meta() { return \Application\Mvc\Helper\Meta::getInstance(); } public function addActiveMenu($url) { $getUrl = $_SERVER['REQUEST_URI']; if($getUrl == $url){ return 'current'; } } public function activeMenu() { return \Application\Mvc\Helper\ActiveMenu::getInstance(); } public function announce($incomeString, $num) { $object = new \Application\Mvc\Helper\Announce(); return $object->getString($incomeString, $num); } public function dbProfiler() { $object = new \Application\Mvc\Helper\DbProfiler(); return $object->DbOutput(); } public function constant($name) { return get_defined_constants()[$name]; } public function image($args, $attributes = []) { $imageFilter = new \Image\Storage($args, $attributes); return $imageFilter; } public function querySymbol() { $object = new \Application\Mvc\Helper\RequestQuery(); return $object->getSymbol(); } public function javascript($id) { $javascript = \Cms\Model\Javascript::findCachedById($id); if ($javascript) { return $javascript->getText(); } } public function favicon() { $favicon = \Cms\Model\Settings::findFirst(1); if ($favicon) { return $favicon->getFavicon(); } } public function logo() { $logo = \Cms\Model\Settings::findFirst(1); if ($logo) { return $logo->getLogo(); } } public function base_url() { if(isset($_SERVER['HTTPS'])) $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != "off") ? "https" : "http"; else $protocol = 'http'; return $protocol . "://" . $_SERVER['HTTP_HOST']; } public function modulePartial($template, $data, $module = null) { $view = clone $this->getDi()->get('view'); $partialsDir = ''; if ($module) { $moduleName = \Application\Utils\ModuleName::camelize($module); $partialsDir = '../../../modules/' . $moduleName . '/views/'; } $view->setPartialsDir($partialsDir); return $view->partial($template, $data); } } |
#2 | Application\Mvc\Helper->blockID(social_items_list) /var/www/vhosts/kamazleasing.uz/truckleasing.uz/data/cache/volt/%%var%%www%%vhosts%%kamazleasing.uz%%truckleasing.uz%%app%%views%%partials%%main%%footer.volt.php (12) <footer id="footer"> <?php $url = $this->helper->currentUrl(constant('LANG')); ?> <div class="wrapp_feedback clearfix"> <!--<div class="feedback_box"> <a href="#" class="btn_red reg modal_btn" data-modal="modal-contact"><?= $this->helper->translate('Ask question on site') ?></a> </div>--> <div class="feedback_box"> <?= $this->helper->blockID('footer_infos') ?> </div> <div class="feedback_box social_item"> <ul class="social_list clearfix" style="padding-top:0;"> <?= $this->helper->blockID('social_items_list') ?> </ul> </div> </div> <div class="text-center"><span class="copyright"><?php echo date('Y') ?> © <?= $this->helper->translate('SITE NAME') ?></span></div> </footer> <div style="display: none;"> <div id="call_back" class="modal_style"> <div class="arcticmodal-close modal_close">×</div> <div class="form-wrapper"> <h4>Введите данные</h4> <form id="callback-form" class="js-callback-form" action="/site/message/callback" method="post"><input type="hidden" name="_csrf" value="PIiLd8B78lEc9av2w9OEpgSbTYE13IbVekyc7YspLnFm4PxAhyrGJkqywL31ofXrNdUCs1KD94RLOdvb2UxkEg=="> <div class="form_box field-callbackform-name required"><input type="text" id="callbackform-name" class="form-control" name="CallbackForm[name]" placeholder="Имя *" aria-required="true"> <div class="help-block"></div> </div> <div class="form_box--medium-margin form_box field-callbackform-phone required"><input type="text" id="callbackform-phone" class="phone_mask" name="CallbackForm[phone]" placeholder="Телефон *" aria-required="true"> <div class="help-block"></div> </div> <div class="form_box field-callbackform-agreement required"><input type="hidden" name="CallbackForm[agreement]" value="0"><input type="checkbox" id="callbackform-agreement" class="checkbox checkbox_text" name="CallbackForm[agreement]" value="1"><label class="control-label" for="callbackform-agreement">Я согласен с <a href="./uploads/policy/KJecEbvCKDZ-_1571986635.pdf" target="_blank">условиями обработки персональных данных</a></label> <div class="help-block"></div> </div> <div class="clearfix"> <div class="form_box alignleft"><button type="submit" class="btn_blue">Заказать</button> </div> <div class="form_box alignleft"> <p class="time_call_message" data-endday="17">Уже поздно, мы Вам <br>перезвоним на следующий день.</p> </div> </div> </form> </div> <div class="callback-success"> <p>Сообщение успешно отправлено!</p> <p>Наш менеджер свяжется с Вами в ближайшее время.</p> </div> </div> <?= $this->helper->widget('Webform')->message() ?> <?= $this->helper->widget('Webform')->ask() ?> <div id="modal-help" class="modal_style"> <div class="arcticmodal-close modal_close">×</div> <div class="form-wrapper"> <h4>Помощь в оформлении</h4> <form id="form-help" class="js-callback-form" action="/site/message/help" method="post"><input type="hidden" name="_csrf" value="PIiLd8B78lEc9av2w9OEpgSbTYE13IbVekyc7YspLnFm4PxAhyrGJkqywL31ofXrNdUCs1KD94RLOdvb2UxkEg=="> <div class="form_box field-helpform-name required"><input type="text" id="helpform-name" class="form-control" name="HelpForm[name]" placeholder="Имя *" aria-required="true"> <div class="help-block"></div> </div> <div class="form_box field-helpform-email required"><input type="text" id="helpform-email" class="form-control" name="HelpForm[email]" placeholder="Почта *" aria-required="true"> <div class="help-block"></div> </div> <div class="form_box field-helpform-phone"><input type="text" id="helpform-phone" class="phone_mask" name="HelpForm[phone]" placeholder="Телефон"> <div class="help-block"></div> </div> <div class="form_box field-helpform-city_id"><select id="helpform-city_id" class="js-city-select" name="HelpForm[city_id]"></select> <div class="help-block"></div> </div> <div class="form_box--small-margin form_box field-helpform-message required"><textarea id="helpform-message" class="form-control" name="HelpForm[message]" placeholder="Сообщение *" aria-required="true"></textarea> <div class="help-block"></div> </div> <div class="form_box field-helpform-agreement required"><input type="hidden" name="HelpForm[agreement]" value="0"><input type="checkbox" id="helpform-agreement" class="checkbox checkbox_text" name="HelpForm[agreement]" value="1"><label class="control-label" for="helpform-agreement">Я согласен с <a href="./uploads/policy/KJecEbvCKDZ-_1571986635.pdf" target="_blank">условиями обработки персональных данных</a></label> <div class="help-block"></div> </div><button type="submit" class="btn_blue">Отправить</button> </form> </div> <div class="callback-success"> <p>Сообщение успешно отправлено!</p> <p>Наш менеджер свяжется с Вами в ближайшее время.</p> </div> </div> <?= $this->helper->widget('Webform')->application() ?> <div id="entry" class="modal_style"> <div class="arcticmodal-close modal_close">×</div> <h4>Войти</h4> <form id="login-form" class="validateform validateform3" action="https://kamazleasing.ru/lk/login" method="post"><input type="hidden" name="_csrf" value="PIiLd8B78lEc9av2w9OEpgSbTYE13IbVekyc7YspLnFm4PxAhyrGJkqywL31ofXrNdUCs1KD94RLOdvb2UxkEg=="> <div class="message"></div> <div class="form"> <div class="form_box"> <div class="form-group field-loginform-email required"><label class="control-label" for="loginform-email">Email</label><input type="text" id="loginform-email" class="form-control" name="LoginForm[email]" aria-required="true"> <div class="help-block"></div> </div> </div> <div class="form_box"> <div class="form-group field-loginform-password required"><label class="control-label" for="loginform-password">Пароль</label><input type="password" id="loginform-password" class="form-control" name="LoginForm[password]" aria-required="true"> <div class="help-block"></div> </div> </div> <div class="clearfix"> <div class="form_box alignleft"><button type="submit" class="btn_blue">Войти</button> </div> <div class="pull-right text-right"><a href="javascript:;" class="modal_btn" data-modal="recovery">Забыл пароль?</a><br><a href="/reg">Регистрация</a></div> </div> </div> </form> </div> <div id="recovery" class="modal_style"> <div class="arcticmodal-close modal_close">×</div> <h4>Восстановление пароля</h4> <form id="recovery-form" class="validateform validateform3" action="https://kamazleasing.ru/lk/recovery" method="post"><input type="hidden" name="_csrf" value="PIiLd8B78lEc9av2w9OEpgSbTYE13IbVekyc7YspLnFm4PxAhyrGJkqywL31ofXrNdUCs1KD94RLOdvb2UxkEg=="> <div class="message"></div> <div class="form"> <div class="form_box"> <div class="form-group field-recoveryform-email required"><label class="control-label" for="recoveryform-email">Email</label><input type="text" id="recoveryform-email" class="form-control" name="RecoveryForm[email]" aria-required="true"> <div class="help-block"></div> </div> </div> <div class="clearfix"> <div class="form_box alignleft"><button type="submit" class="btn_blue">Восстановить</button> </div> </div> </div> </form> </div> </div> |
#3 | unknown |
#4 | Phalcon\Mvc\View\Engine\Volt->render(/var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Faq/views/../../../views//partials/main/footer.volt, Array([title] => Вопросы-Ответы, [entries] => Object(Faq\Model\Faq), [id] => 694), false) |
#5 | Phalcon\Mvc\View->_engineRender(Array([.volt] => Object(Application\Mvc\View\Engine\Volt), [.phtml] => Object(Phalcon\Mvc\View\Engine\Php)), ../../../views//partials/main/footer, false, false) |
#6 | Phalcon\Mvc\View->partial(main/footer, null) |
#7 | Phalcon\Mvc\View\Engine->partial(main/footer) /var/www/vhosts/kamazleasing.uz/truckleasing.uz/data/cache/volt/%%var%%www%%vhosts%%kamazleasing.uz%%truckleasing.uz%%app%%modules%%faq%%views%%index%%view.volt.php (13) <section class="section_box"> <div class="section_offset"> <h1><?= $entries->getTitle() ?></h1> <div class="blue_box"> <h3><?= $this->helper->translate('Answer') ?></h3> <p><?= $entries->getText() ?></p> </div> <div class="section_offset_bottom"> <a class="link_bottom" href="<?= $this->helper->currentUrl(constant('LANG')) ?>faq"><?= $this->helper->translate('Read all faq') ?></a> </div> <?= $this->helper->widget('Webform')->faq() ?> </div> <?= $this->partial('main/footer') ?> </section> |
#8 | unknown |
#9 | Phalcon\Mvc\View\Engine\Volt->render(/var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Faq/views/index/view.volt, Array([title] => Вопросы-Ответы, [entries] => Object(Faq\Model\Faq), [id] => 694), true) |
#10 | Phalcon\Mvc\View->_engineRender(Array([.volt] => Object(Application\Mvc\View\Engine\Volt), [.phtml] => Object(Phalcon\Mvc\View\Engine\Php)), index/view, true, true, null) |
#11 | Phalcon\Mvc\View->render(index, view, Array([id] => 694)) /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/Bootstrap.php (332) <?php namespace Eskiz; use Application\Cache\Manager as CacheManager; /** * Bootstrap */ class Bootstrap { public function run() { $di = new \Phalcon\DI\FactoryDefault(); // Config require_once APPLICATION_PATH . '/modules/Cms/Config.php'; $config = \Cms\Config::get(); $di->set('config', $config); // Registry $registry = new \Phalcon\Registry(); $di->set('registry', $registry); // Loader $loader = new \Phalcon\Loader(); $loader->registerNamespaces($config->loader->namespaces->toArray()); $loader->registerDirs([APPLICATION_PATH . "/plugins/"]); $loader->register(); require_once APPLICATION_PATH . '/../vendor/autoload.php'; // Database $db = new \Phalcon\Db\Adapter\Pdo\Mysql([ "host" => $config->database->host, "username" => $config->database->username, "password" => $config->database->password, "dbname" => $config->database->dbname, "charset" => $config->database->charset, ]); $di->set('db', $db); // View $this->initView($di); // URL $url = new \Phalcon\Mvc\Url(); $url->setBasePath($config->base_path); $url->setBaseUri($config->base_path); $di->set('url', $url); // Cache $this->initCache($di); // CMS $cmsModel = new \Cms\Model\Configuration(); $registry->cms = $cmsModel->getConfig(); // Отправляем в Registry // Application $application = new \Phalcon\Mvc\Application(); $application->registerModules($config->modules->toArray()); // Events Manager, Dispatcher $this->initEventManager($di); // Session $session = new \Phalcon\Session\Adapter\Files(); $session->start(); $di->set('session', $session); $acl = new \Application\Acl\DefaultAcl(); $di->set('acl', $acl); // JS Assets $this->initAssetsManager($di); // Flash helper $flash = new \Phalcon\Flash\Session([ 'error' => 'ui red inverted segment', 'success' => 'ui green inverted segment', 'notice' => 'ui blue inverted segment', 'warning' => 'ui orange inverted segment', ]); $di->set('flash', $flash); $di->set('helper', new \Application\Mvc\Helper()); // Routing $this->initRouting($application, $di); $application->setDI($di); // Main dispatching process $this->dispatch($di); } private function initRouting($application, $di) { $router = new \Application\Mvc\Router\DefaultRouter(); $router->setDi($di); foreach ($application->getModules() as $module) { $routesClassName = str_replace('Module', 'Routes', $module['className']); if (class_exists($routesClassName)) { $routesClass = new $routesClassName(); $router = $routesClass->init($router); } $initClassName = str_replace('Module', 'Init', $module['className']); if (class_exists($initClassName)) { new $initClassName(); } } $di->set('router', $router); } private function initAssetsManager($di) { $config = $di->get('config'); $assetsManager = new \Application\Assets\Manager(); $js_collection = $assetsManager->collection('js') ->setLocal(true) ->addFilter(new \Phalcon\Assets\Filters\Jsmin()) ->setTargetPath(ROOT . '/assets/admin/js/js.js') ->setTargetUri('assets/admin/js/js.js') ->join(true); if ($config->assets->js) { foreach ($config->assets->js as $js) { $js_collection->addJs(ROOT . '/' . $js); } } // Admin JS Assets $assetsManager->collection('modules-admin-js') ->setLocal(true) ->addFilter(new \Phalcon\Assets\Filters\Jsmin()) ->setTargetPath(ROOT . '/assets/admin/js/modules-admin.js') ->setTargetUri('assets/admin/js/modules-admin.js') ->join(true); // Admin LESS Assets $assetsManager->collection('modules-admin-less') ->setLocal(true) ->addFilter(new \Application\Assets\Filter\Less()) ->setTargetPath(ROOT . '/assets/admin/js/modules-admin.less') ->setTargetUri('assets/admin/js/modules-admin.less') ->join(true) ->addCss(APPLICATION_PATH . '/modules/Admin/assets/admin.less'); $di->set('assets', $assetsManager); } private function initEventManager($di) { $eventsManager = new \Phalcon\Events\Manager(); $dispatcher = new \Phalcon\Mvc\Dispatcher(); $eventsManager->attach("dispatch:beforeDispatchLoop", function ($event, $dispatcher) use ($di) { new \Eskiz\Plugin\CheckPoint($di->get('request')); new \Eskiz\Plugin\Localization($dispatcher); new \Eskiz\Plugin\AdminLocalization($di->get('config')); new \Eskiz\Plugin\Acl($di->get('acl'), $dispatcher, $di->get('view')); new \Eskiz\Plugin\MobileDetect($di->get('session'), $di->get('view'), $di->get('request')); }); $eventsManager->attach("dispatch:afterDispatchLoop", function ($event, $dispatcher) use ($di) { new \Eskiz\Plugin\Title($di); }); // Profiler $registry = $di->get('registry'); if ($registry->cms['PROFILER']) { $profiler = new \Phalcon\Db\Profiler(); $di->set('profiler', $profiler); $eventsManager->attach('db', function ($event, $db) use ($profiler) { if ($event->getType() == 'beforeQuery') { $profiler->startProfile($db->getSQLStatement()); } if ($event->getType() == 'afterQuery') { $profiler->stopProfile(); } }); } $db = $di->get('db'); $db->setEventsManager($eventsManager); $dispatcher->setEventsManager($eventsManager); $di->set('dispatcher', $dispatcher); } private function initView($di) { $view = new \Phalcon\Mvc\View(); define('MAIN_VIEW_PATH', '../../../views/'); $view->setMainView(MAIN_VIEW_PATH . 'main'); $view->setLayoutsDir(MAIN_VIEW_PATH . '/layouts/'); $view->setLayout('main'); $view->setPartialsDir(MAIN_VIEW_PATH . '/partials/'); // Volt $volt = new \Application\Mvc\View\Engine\Volt($view, $di); $volt->setOptions(['compiledPath' => APPLICATION_PATH . '/../data/cache/volt/']); $volt->initCompiler(); $phtml = new \Phalcon\Mvc\View\Engine\Php($view, $di); $viewEngines = [ ".volt" => $volt, ".phtml" => $phtml, ]; $view->registerEngines($viewEngines); $ajax = $di->get('request')->getQuery('_ajax'); if ($ajax) { $view->setRenderLevel(\Phalcon\Mvc\View::LEVEL_LAYOUT); } $di->set('view', $view); return $view; } private function initCache($di) { $config = $di->get('config'); $cacheFrontend = new \Phalcon\Cache\Frontend\Data([ "lifetime" => 60, "prefix" => HOST_HASH, ]); $cache = null; switch ($config->cache) { case 'file': $cache = new \Phalcon\Cache\Backend\File($cacheFrontend, [ "cacheDir" => APPLICATION_PATH . "/../data/cache/backend/" ]); break; case 'memcache': $cache = new \Phalcon\Cache\Backend\Memcache( $cacheFrontend, [ "host" => $config->memcache->host, "port" => $config->memcache->port, ]); break; case 'memcached': $cache = new \Phalcon\Cache\Backend\Libmemcached( $cacheFrontend, [ "host" => $config->memcached->host, "port" => $config->memcached->port, ]); break; } $di->set('cache', $cache, true); $di->set('modelsCache', $cache, true); \Application\Widget\Proxy::$cache = $cache; // Modules Widget System $modelsMetadata = new \Phalcon\Mvc\Model\Metadata\Memory(); $di->set('modelsMetadata', $modelsMetadata); $di->set('cacheManager', new CacheManager()); } private function dispatch($di) { $router = $di['router']; $router->removeExtraSlashes(true); $router->handle(); $view = $di['view']; $dispatcher = $di['dispatcher']; $response = $di['response']; $dispatcher->setModuleName($router->getModuleName()); $dispatcher->setControllerName($router->getControllerName()); $dispatcher->setActionName($router->getActionName()); $dispatcher->setParams($router->getParams()); $moduleName = \Application\Utils\ModuleName::camelize($router->getModuleName()); $params = $router->getParams(); if($params){ if(isset($params['slug'])){ $params = $params['slug']; $lang = \Cms\Model\Language::findFirst("iso='{$params}'"); if($lang){ $dispatcher->setParams(array('lang'=>$lang->getIso(),'slug'=>'index')); $moduleName = \Application\Utils\ModuleName::camelize('index'); } } } $ModuleClassName = $moduleName . '\Module'; if (class_exists($ModuleClassName)) { $module = new $ModuleClassName; $module->registerAutoloaders(); $module->registerServices($di); } $view->start(); $registry = $di['registry']; if ($registry->cms['DEBUG_MODE']) { $debug = new \Phalcon\Debug(); $debug->listen(); $dispatcher->dispatch(); } else { try { $dispatcher->dispatch(); } catch (\Phalcon\Exception $e) { // Errors catching $view->setViewsDir(__DIR__ . '/modules/Index/views/'); $view->setPartialsDir(''); $view->e = $e; if ($e instanceof \Phalcon\Mvc\Dispatcher\Exception) { $response->setStatusCode(404, 'Not Found'); $view->partial('error/error404'); } else { $response->setStatusCode(503, 'Service Unavailable'); $view->partial('error/error503'); } $response->sendHeaders(); echo $response->getContent(); return; } } $view->render( $dispatcher->getControllerName(), $dispatcher->getActionName(), $dispatcher->getParams() ); $view->finish(); $response = $di['response']; // AJAX $request = $di['request']; $_ajax = $request->getQuery('_ajax'); if ($_ajax) { $contents = $view->getContent(); $return = new \stdClass(); $return->html = $contents; $return->title = $di->get('helper')->title()->get(); $return->success = true; if ($view->bodyClass) { $return->bodyClass = $view->bodyClass; } $headers = $response->getHeaders()->toArray(); if (isset($headers[404]) || isset($headers[503])) { $return->success = false; } $response->setContentType('application/json', 'UTF-8'); $response->setContent(json_encode($return)); } else { $response->setContent($view->getContent()); } $response->sendHeaders(); echo $response->getContent(); } } |
#12 | Eskiz\Bootstrap->dispatch(null) /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/Bootstrap.php (94) <?php namespace Eskiz; use Application\Cache\Manager as CacheManager; /** * Bootstrap */ class Bootstrap { public function run() { $di = new \Phalcon\DI\FactoryDefault(); // Config require_once APPLICATION_PATH . '/modules/Cms/Config.php'; $config = \Cms\Config::get(); $di->set('config', $config); // Registry $registry = new \Phalcon\Registry(); $di->set('registry', $registry); // Loader $loader = new \Phalcon\Loader(); $loader->registerNamespaces($config->loader->namespaces->toArray()); $loader->registerDirs([APPLICATION_PATH . "/plugins/"]); $loader->register(); require_once APPLICATION_PATH . '/../vendor/autoload.php'; // Database $db = new \Phalcon\Db\Adapter\Pdo\Mysql([ "host" => $config->database->host, "username" => $config->database->username, "password" => $config->database->password, "dbname" => $config->database->dbname, "charset" => $config->database->charset, ]); $di->set('db', $db); // View $this->initView($di); // URL $url = new \Phalcon\Mvc\Url(); $url->setBasePath($config->base_path); $url->setBaseUri($config->base_path); $di->set('url', $url); // Cache $this->initCache($di); // CMS $cmsModel = new \Cms\Model\Configuration(); $registry->cms = $cmsModel->getConfig(); // Отправляем в Registry // Application $application = new \Phalcon\Mvc\Application(); $application->registerModules($config->modules->toArray()); // Events Manager, Dispatcher $this->initEventManager($di); // Session $session = new \Phalcon\Session\Adapter\Files(); $session->start(); $di->set('session', $session); $acl = new \Application\Acl\DefaultAcl(); $di->set('acl', $acl); // JS Assets $this->initAssetsManager($di); // Flash helper $flash = new \Phalcon\Flash\Session([ 'error' => 'ui red inverted segment', 'success' => 'ui green inverted segment', 'notice' => 'ui blue inverted segment', 'warning' => 'ui orange inverted segment', ]); $di->set('flash', $flash); $di->set('helper', new \Application\Mvc\Helper()); // Routing $this->initRouting($application, $di); $application->setDI($di); // Main dispatching process $this->dispatch($di); } private function initRouting($application, $di) { $router = new \Application\Mvc\Router\DefaultRouter(); $router->setDi($di); foreach ($application->getModules() as $module) { $routesClassName = str_replace('Module', 'Routes', $module['className']); if (class_exists($routesClassName)) { $routesClass = new $routesClassName(); $router = $routesClass->init($router); } $initClassName = str_replace('Module', 'Init', $module['className']); if (class_exists($initClassName)) { new $initClassName(); } } $di->set('router', $router); } private function initAssetsManager($di) { $config = $di->get('config'); $assetsManager = new \Application\Assets\Manager(); $js_collection = $assetsManager->collection('js') ->setLocal(true) ->addFilter(new \Phalcon\Assets\Filters\Jsmin()) ->setTargetPath(ROOT . '/assets/admin/js/js.js') ->setTargetUri('assets/admin/js/js.js') ->join(true); if ($config->assets->js) { foreach ($config->assets->js as $js) { $js_collection->addJs(ROOT . '/' . $js); } } // Admin JS Assets $assetsManager->collection('modules-admin-js') ->setLocal(true) ->addFilter(new \Phalcon\Assets\Filters\Jsmin()) ->setTargetPath(ROOT . '/assets/admin/js/modules-admin.js') ->setTargetUri('assets/admin/js/modules-admin.js') ->join(true); // Admin LESS Assets $assetsManager->collection('modules-admin-less') ->setLocal(true) ->addFilter(new \Application\Assets\Filter\Less()) ->setTargetPath(ROOT . '/assets/admin/js/modules-admin.less') ->setTargetUri('assets/admin/js/modules-admin.less') ->join(true) ->addCss(APPLICATION_PATH . '/modules/Admin/assets/admin.less'); $di->set('assets', $assetsManager); } private function initEventManager($di) { $eventsManager = new \Phalcon\Events\Manager(); $dispatcher = new \Phalcon\Mvc\Dispatcher(); $eventsManager->attach("dispatch:beforeDispatchLoop", function ($event, $dispatcher) use ($di) { new \Eskiz\Plugin\CheckPoint($di->get('request')); new \Eskiz\Plugin\Localization($dispatcher); new \Eskiz\Plugin\AdminLocalization($di->get('config')); new \Eskiz\Plugin\Acl($di->get('acl'), $dispatcher, $di->get('view')); new \Eskiz\Plugin\MobileDetect($di->get('session'), $di->get('view'), $di->get('request')); }); $eventsManager->attach("dispatch:afterDispatchLoop", function ($event, $dispatcher) use ($di) { new \Eskiz\Plugin\Title($di); }); // Profiler $registry = $di->get('registry'); if ($registry->cms['PROFILER']) { $profiler = new \Phalcon\Db\Profiler(); $di->set('profiler', $profiler); $eventsManager->attach('db', function ($event, $db) use ($profiler) { if ($event->getType() == 'beforeQuery') { $profiler->startProfile($db->getSQLStatement()); } if ($event->getType() == 'afterQuery') { $profiler->stopProfile(); } }); } $db = $di->get('db'); $db->setEventsManager($eventsManager); $dispatcher->setEventsManager($eventsManager); $di->set('dispatcher', $dispatcher); } private function initView($di) { $view = new \Phalcon\Mvc\View(); define('MAIN_VIEW_PATH', '../../../views/'); $view->setMainView(MAIN_VIEW_PATH . 'main'); $view->setLayoutsDir(MAIN_VIEW_PATH . '/layouts/'); $view->setLayout('main'); $view->setPartialsDir(MAIN_VIEW_PATH . '/partials/'); // Volt $volt = new \Application\Mvc\View\Engine\Volt($view, $di); $volt->setOptions(['compiledPath' => APPLICATION_PATH . '/../data/cache/volt/']); $volt->initCompiler(); $phtml = new \Phalcon\Mvc\View\Engine\Php($view, $di); $viewEngines = [ ".volt" => $volt, ".phtml" => $phtml, ]; $view->registerEngines($viewEngines); $ajax = $di->get('request')->getQuery('_ajax'); if ($ajax) { $view->setRenderLevel(\Phalcon\Mvc\View::LEVEL_LAYOUT); } $di->set('view', $view); return $view; } private function initCache($di) { $config = $di->get('config'); $cacheFrontend = new \Phalcon\Cache\Frontend\Data([ "lifetime" => 60, "prefix" => HOST_HASH, ]); $cache = null; switch ($config->cache) { case 'file': $cache = new \Phalcon\Cache\Backend\File($cacheFrontend, [ "cacheDir" => APPLICATION_PATH . "/../data/cache/backend/" ]); break; case 'memcache': $cache = new \Phalcon\Cache\Backend\Memcache( $cacheFrontend, [ "host" => $config->memcache->host, "port" => $config->memcache->port, ]); break; case 'memcached': $cache = new \Phalcon\Cache\Backend\Libmemcached( $cacheFrontend, [ "host" => $config->memcached->host, "port" => $config->memcached->port, ]); break; } $di->set('cache', $cache, true); $di->set('modelsCache', $cache, true); \Application\Widget\Proxy::$cache = $cache; // Modules Widget System $modelsMetadata = new \Phalcon\Mvc\Model\Metadata\Memory(); $di->set('modelsMetadata', $modelsMetadata); $di->set('cacheManager', new CacheManager()); } private function dispatch($di) { $router = $di['router']; $router->removeExtraSlashes(true); $router->handle(); $view = $di['view']; $dispatcher = $di['dispatcher']; $response = $di['response']; $dispatcher->setModuleName($router->getModuleName()); $dispatcher->setControllerName($router->getControllerName()); $dispatcher->setActionName($router->getActionName()); $dispatcher->setParams($router->getParams()); $moduleName = \Application\Utils\ModuleName::camelize($router->getModuleName()); $params = $router->getParams(); if($params){ if(isset($params['slug'])){ $params = $params['slug']; $lang = \Cms\Model\Language::findFirst("iso='{$params}'"); if($lang){ $dispatcher->setParams(array('lang'=>$lang->getIso(),'slug'=>'index')); $moduleName = \Application\Utils\ModuleName::camelize('index'); } } } $ModuleClassName = $moduleName . '\Module'; if (class_exists($ModuleClassName)) { $module = new $ModuleClassName; $module->registerAutoloaders(); $module->registerServices($di); } $view->start(); $registry = $di['registry']; if ($registry->cms['DEBUG_MODE']) { $debug = new \Phalcon\Debug(); $debug->listen(); $dispatcher->dispatch(); } else { try { $dispatcher->dispatch(); } catch (\Phalcon\Exception $e) { // Errors catching $view->setViewsDir(__DIR__ . '/modules/Index/views/'); $view->setPartialsDir(''); $view->e = $e; if ($e instanceof \Phalcon\Mvc\Dispatcher\Exception) { $response->setStatusCode(404, 'Not Found'); $view->partial('error/error404'); } else { $response->setStatusCode(503, 'Service Unavailable'); $view->partial('error/error503'); } $response->sendHeaders(); echo $response->getContent(); return; } } $view->render( $dispatcher->getControllerName(), $dispatcher->getActionName(), $dispatcher->getParams() ); $view->finish(); $response = $di['response']; // AJAX $request = $di['request']; $_ajax = $request->getQuery('_ajax'); if ($_ajax) { $contents = $view->getContent(); $return = new \stdClass(); $return->html = $contents; $return->title = $di->get('helper')->title()->get(); $return->success = true; if ($view->bodyClass) { $return->bodyClass = $view->bodyClass; } $headers = $response->getHeaders()->toArray(); if (isset($headers[404]) || isset($headers[503])) { $return->success = false; } $response->setContentType('application/json', 'UTF-8'); $response->setContent(json_encode($return)); } else { $response->setContent($view->getContent()); } $response->sendHeaders(); echo $response->getContent(); } } |
#13 | Eskiz\Bootstrap->run() /var/www/vhosts/kamazleasing.uz/truckleasing.uz/public/index.php (20) <?php chdir(dirname(__DIR__)); define('ROOT', __DIR__); define('HOST_HASH', substr(md5($_SERVER['HTTP_HOST']), 0, 12)); if (isset($_SERVER['APPLICATION_ENV'])) { $applicationEnv = ($_SERVER['APPLICATION_ENV'] ? $_SERVER['APPLICATION_ENV'] : 'production'); } else { $applicationEnv = (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'); } define('APPLICATION_ENV', $applicationEnv); define('APPLICATION_PATH', __DIR__ . '/../app'); require_once APPLICATION_PATH . '/Bootstrap.php'; $bootstrap = new Eskiz\Bootstrap(); $bootstrap->run(); |
Key | Value |
---|---|
_url | /faq/694 |
Key | Value |
---|---|
USER | kamazlea |
HOME | /var/www/vhosts/kamazleasing.uz |
SCRIPT_NAME | /public/index.php |
REQUEST_URI | /faq/694 |
QUERY_STRING | _url=/faq/694 |
REQUEST_METHOD | GET |
SERVER_PROTOCOL | HTTP/1.0 |
GATEWAY_INTERFACE | CGI/1.1 |
REDIRECT_URL | /public/faq/694 |
REDIRECT_QUERY_STRING | _url=/faq/694 |
REMOTE_PORT | 37956 |
SCRIPT_FILENAME | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/public/index.php |
SERVER_ADMIN | root@localhost |
CONTEXT_DOCUMENT_ROOT | /var/www/vhosts/kamazleasing.uz/truckleasing.uz |
CONTEXT_PREFIX | |
REQUEST_SCHEME | https |
DOCUMENT_ROOT | /var/www/vhosts/kamazleasing.uz/truckleasing.uz |
REMOTE_ADDR | 3.144.30.109 |
SERVER_PORT | 443 |
SERVER_ADDR | 80.80.218.230 |
SERVER_NAME | truckleasing.uz |
SERVER_SOFTWARE | Apache |
SERVER_SIGNATURE | |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin |
HTTP_ACCEPT_ENCODING | gzip, br, zstd, deflate |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
HTTP_ACCEPT | */* |
HTTP_CONNECTION | close |
HTTP_X_ACCEL_INTERNAL | /internal-nginx-static-location |
HTTP_X_REAL_IP | 3.144.30.109 |
HTTP_HOST | truckleasing.uz |
proxy-nokeepalive | 1 |
HTTPS | on |
PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY | 0 |
PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY | 0 |
PERL5LIB | /usr/share/awstats/lib:/usr/share/awstats/plugins |
SCRIPT_URI | https://truckleasing.uz/faq/694 |
SCRIPT_URL | /faq/694 |
UNIQUE_ID | aARtCNJl8COrOvkpcD3QwAAAANE |
REDIRECT_STATUS | 200 |
REDIRECT_HTTPS | on |
REDIRECT_PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY | 0 |
REDIRECT_PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY | 0 |
REDIRECT_PERL5LIB | /usr/share/awstats/lib:/usr/share/awstats/plugins |
REDIRECT_SCRIPT_URI | https://truckleasing.uz/faq/694 |
REDIRECT_SCRIPT_URL | /faq/694 |
REDIRECT_UNIQUE_ID | aARtCNJl8COrOvkpcD3QwAAAANE |
REDIRECT_REDIRECT_STATUS | 200 |
REDIRECT_REDIRECT_HTTPS | on |
REDIRECT_REDIRECT_PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY | 0 |
REDIRECT_REDIRECT_PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY | 0 |
REDIRECT_REDIRECT_PERL5LIB | /usr/share/awstats/lib:/usr/share/awstats/plugins |
REDIRECT_REDIRECT_SCRIPT_URI | https://truckleasing.uz/faq/694 |
REDIRECT_REDIRECT_SCRIPT_URL | /faq/694 |
REDIRECT_REDIRECT_UNIQUE_ID | aARtCNJl8COrOvkpcD3QwAAAANE |
FCGI_ROLE | RESPONDER |
PHP_SELF | /public/index.php |
REQUEST_TIME_FLOAT | 1745120520.9263 |
REQUEST_TIME | 1745120520 |
# | Path |
---|---|
0 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/public/index.php |
1 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/Bootstrap.php |
2 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Cms/Config.php |
3 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/config/environment/production.php |
4 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/config/global.php |
5 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/config/modules.php |
6 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Loader/Modules.php |
7 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/vendor/autoload.php |
8 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/vendor/composer/autoload_real.php |
9 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/vendor/composer/ClassLoader.php |
10 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/vendor/composer/autoload_static.php |
11 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/vendor/symfony/polyfill-mbstring/bootstrap.php |
12 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/vendor/swiftmailer/swiftmailer/lib/swift_required.php |
13 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php |
14 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/vendor/vanchelo/phalcon-mailer/src/helpers.php |
15 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Mvc/View/Engine/Volt.php |
16 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Widget/Proxy.php |
17 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Cache/Manager.php |
18 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Cms/Model/Configuration.php |
19 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Acl/DefaultAcl.php |
20 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/config/acl.php |
21 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Assets/Manager.php |
22 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Assets/Filter/Less.php |
23 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Mvc/Helper.php |
24 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Menu/Helper/Menu.php |
25 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Mvc/Router/DefaultRouter.php |
26 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Index/Routes.php |
27 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Mvc/Helper/CmsCache.php |
28 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Admin/Routes.php |
29 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Page/Routes.php |
30 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Publication/Routes.php |
31 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Publication/Model/Type.php |
32 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Mvc/Model/Model.php |
33 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Menu/Init.php |
34 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Menu/Helper/Helper.php |
35 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Seo/Routes.php |
36 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Api/Routes.php |
37 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Employee/Routes.php |
38 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Webform/Routes.php |
39 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Portfolio/Routes.php |
40 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Search/Routes.php |
41 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Products/Routes.php |
42 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Products/Model/Category.php |
43 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Faq/Routes.php |
44 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Partner/Routes.php |
45 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Partner/Model/Category.php |
46 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Newsletter/Routes.php |
47 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Documentation/Routes.php |
48 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Botstatistic/Routes.php |
49 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Utils/ModuleName.php |
50 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Faq/Module.php |
51 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/plugins/CheckPoint.php |
52 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/plugins/Localization.php |
53 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Cms/Model/Translate.php |
54 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/plugins/AdminLocalization.php |
55 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/data/translations/admin/ru.php |
56 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/plugins/Acl.php |
57 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/plugins/MobileDetect.php |
58 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/vendor/mobiledetect/mobiledetectlib/Mobile_Detect.php |
59 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Faq/Controller/IndexController.php |
60 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Mvc/Controller.php |
61 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Faq/Model/Faq.php |
62 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Faq/Model/Translate/FaqTranslate.php |
63 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Mvc/Model/Translate.php |
64 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Mvc/Helper/Title.php |
65 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Mvc/Helper/Meta.php |
66 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/plugins/Title.php |
67 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/data/cache/volt/%%var%%www%%vhosts%%kamazleasing.uz%%truckleasing.uz%%app%%modules%%faq%%views%%index%%view.volt.php |
68 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Cms/Model/Language.php |
69 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Webform/Widget/WebformWidget.php |
70 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Widget/AbstractWidget.php |
71 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Webform/Form/FeedbackForm.php |
72 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Application/Form/Form.php |
73 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/data/cache/volt/%%var%%www%%vhosts%%kamazleasing.uz%%truckleasing.uz%%app%%modules%%webform%%views%%faq.volt.php |
74 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/data/cache/volt/%%var%%www%%vhosts%%kamazleasing.uz%%truckleasing.uz%%app%%views%%partials%%main%%footer.volt.php |
75 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Widget/Model/Widget.php |
76 | /var/www/vhosts/kamazleasing.uz/truckleasing.uz/app/modules/Widget/Model/Translate/WidgetTranslate.php |
Memory | |
---|---|
Usage | 2097152 |