| #0 | Phalcon\Mvc\Model\Query->execute() /home/dev.crusit.bg/public_html/common/models/Pages.php (239) <?php
/**
* @file Pages.php
* @package Framework v1.0
* @author Nikolay Mihaylov <n.mihayloff@gmail.com>
*/
namespace Models;
class Pages extends BaseModel
{
// Helper variables
private $_treeSelect;
public function beforeValidationOnCreate()
{
$this->ord = 0;
$this->is_inner_image_disabled = 0;
$this->author_id = $this->getDI()->getSession()->cms->id;
$this->is_expanded = 0;
}
public function afterCreate()
{
foreach ($this->getDI()->getConfig()->site->languages as $lang) {
$obj = new PagesI18n();
$obj->lang = $lang;
$obj->foreign_key = $this->id;
$obj->title = $this->title;
$obj->save();
}
}
public function afterSave()
{
parent::afterSave();
// Update cruise page relation when saving a Region
$id = $this->getDI()->getDispatcher()->getParam('id', 'int', 0);
if ($this->getDI()->getRequest()->has('type') AND $this->getDI()->getRequest()->getPost('type') == 3 AND $id > 0) {
\Models\CruiseRoutePoints::updateCruiseLandingPageRelationFromPagePov($id);
}
}
public static function getTypes()
{
return [
0 => 'Скрити (достъпни само чрез директен линк)',
1 => 'Статии',
2 => 'Документи за пътуване с круиз',
3 => 'Круизни Региони',
4 => 'Видове Круизи',
5 => 'Транспорт до началното пристанище',
6 => 'Системни (използват се на специфични места в сайта)',
7 => 'Полезно',
];
}
public static function getRouteNameByType($type = 'all')
{
$routesByType = [
0 => 'page',
1 => 'article',
2 => 'documents-detail',
3 => 'regions-detail',
4 => 'types-detail',
5 => 'transport-to-port-detail',
7 => 'useful-articles-detail',
];
return $type == 'all' ? $routesByType : $routesByType[$type];
}
public function afterDelete()
{
// Delete uploads
$forDeleting = Uploads::find('section = "pageImages" AND foreign_key = '. $this->id);
foreach ($forDeleting as $item) {
$item->delete();
}
}
public function getByTypeForSelect($type = 3, $includeInactive = false)
{
$lang = $this->getDI()->getSession()->language ?? $this->getDI()->getConfig()->site->defaultLanguage;
$cacheFile = 'pages-by-type-for-select-'. $lang .'-'. $type .'-'. (int) $includeInactive;
$builder = $this->modelsManager->createBuilder();
$builder->columns([
'main.id',
'main.parent_id AS parentId',
'main18.title',
]);
$builder->from(['main' => 'Models\Pages']);
$builder->leftJoin('Models\PagesI18n', 'main18.foreign_key = main.id', 'main18');
$builder->where('main.type = :type:', ['type' => $type]);
$builder->andWhere('main18.lang = :lang:', ['lang' => $lang]);
if ($includeInactive === false) {
$builder->andWhere('main18.is_active = 1');
}
$builder->orderBy('main18.title ASC');
$items = $builder->getQuery()->cache(['key' => $cacheFile])->execute();
$collection = [];
foreach ($items as $item) {
$collection[$item->id] = $item->title;
}
return $collection;
}
// Pages tree - for now only Regions have tree structure
public function getPageTree($type = 3, $onlyFormFilters = false)
{
$tree = [];
$nodeList = [];
$lang = $this->getDI()->getSession()->language ?? $this->getDI()->getConfig()->site->defaultLanguage;
$cacheFile = 'pages-tree-by-type-'. $lang .'-'. $type .'-'. (int) $onlyFormFilters;
$builder = $this->modelsManager->createBuilder();
$builder->columns([
'main.id',
'main.parent_id',
'main18.title',
]);
$builder->from(['main' => 'Models\Pages']);
$builder->leftJoin('Models\PagesI18n', 'main18.foreign_key = main.id', 'main18');
$builder->where('main.type = :type:', ['type' => $type]);
$builder->andWhere('main18.lang = :lang:', ['lang' => $lang]);
if ($onlyFormFilters === true) {
$builder->andWhere('main.is_form_filter = 1');
} else {
$builder->andWhere('main18.is_active = 1');
}
$builder->orderBy('main.ord ASC, main.parent_id ASC');
$items = $builder->getQuery()->cache(['key' => $cacheFile])->execute();
foreach ($items as $item) {
$nodeList[$item->id] = [
'id' => $item->id,
'title' => $item->title,
'parent_id' => $item->parent_id,
'sub' => []
];
}
foreach ($nodeList as $nodeId => &$node) {
if (!$node['parent_id'] OR !array_key_exists($node['parent_id'], $nodeList)) {
$tree[$node['id']] = &$node;
} else {
$nodeList[$node['parent_id']]['sub'][$node['id']] = &$node;
}
}
return $tree;
}
public function treeToSelect($items = [], $type = 3)
{
$data = empty($items) ? $this->getPageTree($type) : $items;
return $this->recursiveTree($data);
}
private function recursiveTree($items, $level = 0)
{
$indentSize = 4;
foreach ($items as $item) {
$level = ($item['parent_id'] == 0) ? 0 : $level;
$this->_treeSelect[$item['id']] = str_repeat(' ', $level) . $item['title'];
if ($item['sub']) {
$this->recursiveTree($item['sub'], $level + $indentSize);
}
}
return $this->_treeSelect;
}
// Get all regions ids and their children ids
public function regionsForApiSearch()
{
$file = 'regions-for-api-search';
$cache = $this->getDI()->getCache()->get($file);
if ($cache === null) {
$allRegions = (new \Models\Pages)->getPageTree(3, true);
$cache = $this->nestedRegionIdsForApi($allRegions);
$this->getDI()->getCache()->save($file, $cache);
}
return json_decode(json_encode($cache), true);
}
private function nestedRegionIdsForApi($items)
{
$collection = [];
foreach ($items as $levelOne) {
// Current level
$collection[$levelOne['id']][] = $levelOne['id'];
foreach ($levelOne['sub'] as $levelTwo) {
// Current level
$collection[$levelTwo['id']][] = $levelTwo['id'];
$collection[$levelTwo['parent_id']][] = $levelTwo['id'];
foreach ($levelTwo['sub'] as $levelThree) {
// Previous levels
$collection[$levelTwo['parent_id']][] = $levelThree['id'];
// Current level
$collection[$levelThree['id']][] = $levelThree['id'];
$collection[$levelThree['parent_id']][] = $levelThree['id'];
foreach ($levelThree['sub'] as $levelFour) {
// Previous levels
$collection[$levelTwo['parent_id']][] = $levelFour['id'];
$collection[$levelThree['parent_id']][] = $levelFour['id'];
// Current level
$collection[$levelFour['id']][] = $levelFour['id'];
$collection[$levelFour['parent_id']][] = $levelFour['id'];
foreach ($levelFour['sub'] as $levelFive) {
// Previous levels
$collection[$levelTwo['parent_id']][] = $levelFive['id'];
$collection[$levelThree['parent_id']][] = $levelFive['id'];
$collection[$levelFour['parent_id']][] = $levelFive['id'];
// Current level
$collection[$levelFive['id']][] = $levelFive['id'];
$collection[$levelFive['parent_id']][] = $levelFive['id'];
}
}
}
}
}
return $collection;
}
// Get static links (about, payments etc...)
public function getStaticLinks()
{
$lang = $this->getDI()->getSession()->language ?? $this->getDI()->getConfig()->site->defaultLanguage;
$cacheFile = 'pages-for-static-menus-'. $lang;
$items = $this->modelsManager->createBuilder()
->columns([
'main.id',
'main18.title',
'main18.slug',
])
->from(['main' => 'Models\Pages'])
->leftJoin('Models\PagesI18n', 'main18.foreign_key = main.id', 'main18')
->where('main.id IN(34, 35, 84, 104)')
->andWhere('main18.is_active = 1')
->andWhere('main18.lang = :lang:', ['lang' => $lang])
->getQuery()->cache(['key' => $cacheFile])->execute()->toArray();
$collection = [];
foreach ($items as $item) {
$collection[$item['id']] = $item;
}
return $collection;
}
// Get supermenu categories for cruise types/regions
public function getForSupermenu()
{
$lang = $this->getDI()->getSession()->language ?? $this->getDI()->getConfig()->site->defaultLanguage;
$cacheFile = 'pages-for-supermenu-'. $lang;
$items = $this->modelsManager->createBuilder()
->columns([
'main.id',
'main.type',
'main18.title',
'main18.slug',
])
->from(['main' => 'Models\Pages'])
->leftJoin('Models\PagesI18n', 'main18.foreign_key = main.id', 'main18')
->leftJoin('Models\Uploads', 'upload.foreign_key = main.id AND upload.section = "pageImages" AND upload.is_active = 1 AND upload.is_default = 1', 'upload')
->leftJoin('Models\UploadsI18n', 'upload18.foreign_key = upload.id AND upload18.lang = "'. $lang .'"', 'upload18')
->where('main.type IN(3, 4, 7)')
->andWhere('main.is_in_menu = 1')
->andWhere('main18.is_active = 1')
->andWhere('main18.lang = :lang:', ['lang' => $lang])
->orderBy('main.ord ASC')
->getQuery()->cache(['key' => $cacheFile])->execute()->toArray();
$menuKeys = [
3 => 'regions',
4 => 'types',
7 => 'useful'
];
$collection = [];
foreach ($items as $item) {
$collection[$menuKeys[$item['type']]][] = $item;
}
return $collection;
}
public function getPaged($perPage = 10, $type, $order = 'byDate')
{
$orderBy = $order == 'byOrder' ? 'main.ord ASC' : 'main.created_at DESC';
$lang = $this->getDI()->getSession()->language ?? $this->getDI()->getConfig()->site->defaultLanguage;
$builder = $this->modelsManager->createBuilder()
->columns([
'main18.title',
'main18.slug',
'main18.summary',
'upload.id AS uploadId',
'upload.filename AS uploadFilename',
'upload.ver AS uploadVersion',
'upload18.additional AS uploadAdditional',
])
->from(['main' => 'Models\Pages'])
->leftJoin('Models\PagesI18n', 'main18.foreign_key = main.id', 'main18')
->leftJoin('Models\Uploads', 'upload.foreign_key = main.id AND upload.section = "pageImages" AND upload.is_active = 1 AND upload.is_default = 1', 'upload')
->leftJoin('Models\UploadsI18n', 'upload18.foreign_key = upload.id AND upload18.lang = "'. $lang .'"', 'upload18')
->where('main.type = :type:', ['type' => $type])
->andWhere('main18.is_active = 1')
->andWhere('main18.lang = :lang:', ['lang' => $lang])
->orderBy($orderBy);
$paginator = new \Phalcon\Paginator\Adapter\QueryBuilder([
'builder' => $builder,
'limit' => $perPage,
'page' => $this->getDI()->getRequest()->get('page', 'int')
]);
return $paginator->getPaginate();
}
/**
* @param int $type
* @param string $slug
* @return object
*/
public function getPage($type, $slug)
{
$lang = $this->getDI()->getSession()->language ?? $this->getDI()->getConfig()->site->defaultLanguage;
$cacheFile = 'pages-one-'. md5($type . $slug . $lang);
return $this->modelsManager->createBuilder()
->columns([
'main.id',
'main.type',
'main.is_cc_licensed AS isCCLicensed',
'main.is_inner_image_disabled AS isInnerImageDisabled',
'main.is_expanded AS isExpanded',
'main.author_id AS authorId',
'main.created_at AS createdAt',
'main.updated_at AS updatedAt',
'author.names AS authorNames',
'main18.title',
'main18.slug',
'main18.summary',
'main18.content',
'main18.settings',
'main18.meta',
'upload.id AS uploadId',
'upload.filename AS uploadFilename',
'upload.ver AS uploadVersion',
'upload18.additional AS uploadAdditional',
])
->from(['main' => 'Models\Pages'])
->leftJoin('Models\PagesI18n', 'main18.foreign_key = main.id', 'main18')
->leftJoin('Models\AdminUsers', 'author.id = main.author_id', 'author')
->leftJoin('Models\Uploads', 'upload.foreign_key = main.id AND upload.section = "pageImages" AND upload.is_active = 1 AND upload.is_default = 1', 'upload')
->leftJoin('Models\UploadsI18n', 'upload18.foreign_key = upload.id AND upload18.lang = "'. $lang .'"', 'upload18')
->where('main.type = :type:', ['type' => $type])
->andWhere('main18.is_active = 1')
->andWhere('main18.lang = :lang:', ['lang' => $lang])
->andWhere('main18.slug = :slug:', ['slug' => $slug])
->getQuery()->cache(['key' => $cacheFile])->getSingleResult();
}
/**
* Fetch System page texts, activity does not matter
*
* @param int $id
* @return object
*/
public function getSystemPage($id)
{
$lang = $this->getDI()->getSession()->language ?? $this->getDI()->getConfig()->site->defaultLanguage;
$cacheFile = 'pages-system-'. md5($id . $lang);
return $this->modelsManager->createBuilder()
->columns([
'main.id',
'main18.title',
'main18.slug',
'main18.summary',
'main18.content',
'main18.meta',
'upload.id AS uploadId',
'upload.filename AS uploadFilename',
'upload.ver AS uploadVersion',
'upload18.additional AS uploadAdditional',
])
->from(['main' => 'Models\Pages'])
->leftJoin('Models\PagesI18n', 'main18.foreign_key = main.id', 'main18')
->leftJoin('Models\AdminUsers', 'author.id = main.author_id', 'author')
->leftJoin('Models\Uploads', 'upload.foreign_key = main.id AND upload.section = "pageImages" AND upload.is_active = 1 AND upload.is_default = 1', 'upload')
->leftJoin('Models\UploadsI18n', 'upload18.foreign_key = upload.id AND upload18.lang = "'. $lang .'"', 'upload18')
->where('main.type = 6')
->andWhere('main18.lang = :lang:', ['lang' => $lang])
->andWhere('main.id = :id:', ['id' => $id])
->getQuery()->cache(['key' => $cacheFile])->getSingleResult();
}
} |
| #1 | Models\Pages->getStaticLinks() /home/dev.crusit.bg/public_html/apps/frontend/controllers/BaseController.php (65) <?php
/**
* @file BaseController.php
* @package Framework v1.0
* @author Nikolay Mihaylov <n.mihayloff@gmail.com>
*/
namespace Frontend\Controllers;
class BaseController extends \Phalcon\Mvc\Controller
{
public $additionalAssets;
public function initialize()
{
// Restricted access to dev site
if ($this->config->isWebsiteIpRestricted AND !in_array($this->request->getServer('REMOTE_ADDR'), (array) $this->config->cms->ipRestriction)) {
//die('Forbidden');
}
// Detect language
$this->detectLanguage();
// Load global cache files
$this->loadCache();
// Cookie specific
$this->cookieSpecific();
// Current route name
$this->view->currentRouteName = '';
if ($this->router->getMatchedRoute()) {
$this->view->currentRouteName = $this->router->getMatchedRoute()->getName();
}
// Others..
$this->view->assetsVersion = $this->config->assetsVersion;
// Update: 2021-10-15: temporary disable live chat
// $this->view->isChatOperatorAvailable = date('G') >= 9 && date('G') < 19 && !in_array(date('l'), ['Saturday', 'Sunday']);
$this->view->isChatOperatorAvailable = false;
$this->view->globalSettings = (new \Models\Settings)->getAll();
// Countdown bar
if (
$this->config->site->countdownBar->isActive === true AND
time() >= strtotime($this->config->site->countdownBar->from) AND
time() <= strtotime($this->config->site->countdownBar->to)
) {
$this->view->countdownBar = $this->config->site->countdownBar;
$this->additionalAssets('js', 'countdown-timer');
$this->additionalAssets('css', 'countdown-timer');
}
}
// Cache
private function loadCache()
{
// Translations
$file = 'public-' . $this->session->language;
$this->loadLanguageFile('public', $file);
// Supermenu pages and Static menu links
$pages = new \Models\Pages();
$this->view->supermenu = $pages->getForSupermenu();
$this->view->staticMenuLinks = $pages->getStaticLinks();
// Form filters
$this->view->formFilters = \Helpers\Cruises::getFormFilters();
}
// Cookie specific actions
private function cookieSpecific()
{
// Newsletter popup - First time visiting Crusit from Usit
if (
!$this->cookies->has('firstVisitFromUsit') AND
strpos($this->request->getServer('HTTP_REFERER'), 'usitcolours') !== false
) {
$this->additionalAssets('script', 'first-visit-from-usit-popup');
$this->cookies->set('firstVisitFromUsit', 1, strtotime('+7 days'));
}
// Newsletter popup - First visit for a month
if (!$this->cookies->has('firstVisitThisMonth')) {
$this->additionalAssets('script', 'trigger-newsletter-popup');
}
// Special popup
// if (!$this->session->has('isSpecialPopupDisplayed')) {
// $this->session->isSpecialPopupDisplayed = 1;
// $this->additionalAssets('script', 'trigger-special-popup');
// }
// Cookies Assets
$this->additionalAssets('js', 'cookies-v2');
$this->additionalAssets('css', 'cookies-v2');
// Cookie consent settings
$this->view->cookiesSettings = \Helpers\CookiesConsent::get();
$this->view->cookiesSettingsAcceptedEverything = true;
// Facebook
if (isset($this->view->cookiesSettings['marketingFacebook']) AND $this->view->cookiesSettings['marketingFacebook'] == 1) {
$this->view->cookiesSettingsAllowFacebook = 1;
} else {
$this->view->cookiesSettingsAcceptedEverything = false;
}
// Google
if (isset($this->view->cookiesSettings['marketingGoogle']) AND $this->view->cookiesSettings['marketingGoogle'] == 1) {
$this->view->cookiesSettingsAllowGoogle = 1;
} else {
$this->view->cookiesSettingsAcceptedEverything = false;
}
// OpenX
if (isset($this->view->cookiesSettings['marketingOtherAdvertisers']) AND $this->view->cookiesSettings['marketingOtherAdvertisers'] == 1) {
$this->view->cookiesSettingsAllowBannerSystem = 1;
} else {
$this->view->cookiesSettingsAcceptedEverything = false;
}
// Statistics
if (isset($this->view->cookiesSettings['statisticsGoogleAnalytics']) AND $this->view->cookiesSettings['statisticsGoogleAnalytics'] == 1) {
$this->view->cookiesSettingsAllowStatistics = 1;
} else {
$this->view->cookiesSettingsAcceptedEverything = false;
}
// LiveChat (requires Google statistics too)
if (
isset($this->view->cookiesSettings['preferencesLiveChat']) AND
$this->view->cookiesSettings['preferencesLiveChat'] == 1 AND
isset($this->view->cookiesSettings['statisticsGoogleAnalytics']) AND
$this->view->cookiesSettings['statisticsGoogleAnalytics'] == 1
) {
$this->view->cookiesSettingsAllowLiveChat = 1;
} else {
$this->view->cookiesSettingsAcceptedEverything = false;
}
// Display Disclaimer?
if (!isset($this->view->cookiesSettings['displayDisclaimer']) OR $this->view->cookiesSettings['displayDisclaimer'] == 1) {
$this->view->cookiesDisplayDisclaimer = 1;
}
// REMOVE THIS LATER
// $this->view->gdprTesting = !in_array($_SERVER['REMOTE_ADDR'], ['94.155.221.220', '178.169.252.245', '178.169.255.197', '85.196.180.242']);
$this->view->gdprTesting = false; // Going LIVE for now. Remove checks from templates later!
}
// Flight search form - Autocomplete airports
public function airportAutocompleteAction()
{
$result = \Helpers\Airport::search($this->request->getPost('title'), $this->session->language, true);
$this->response->setContentType('application/json', 'UTF-8');
$this->response->setJsonContent($result, JSON_UNESCAPED_UNICODE);
return $this->response->send();
}
// Flight search form - Process submit
public function processFlightSearchFormAction()
{
$params = [
'fs' => 1,
'type' => 'O',
'adults' => $this->request->getPost('adults', 'int', 1),
'children' => $this->request->getPost('children', 'int', 0),
];
// From
$parsed = \Helpers\Airport::extractParams($this->request->getPost('airportFromClean', 'string'));
$params['from'] = $parsed['type'] . $parsed['airportCode'];
// To
$parsed = \Helpers\Airport::extractParams($this->request->getPost('airportToClean', 'string'));
$params['to'] = $parsed['type'] . $parsed['airportCode'];
// Date
$params['departure'] = date('Y-m-d', strtotime($this->request->getPost('departureDate', 'string')));
if (!empty($this->request->getPost('returnDate'))) {
$params['return'] = date('Y-m-d', strtotime($this->request->getPost('returnDate', 'string')));
$params['type'] = 'R';
}
// Multiple destinations?
if (
$this->request->getPost('searchType') == 'advanced' AND
!empty($this->request->getPost('airportFromTwoClean')) AND
!empty($this->request->getPost('airportToTwoClean'))
) {
unset($params['return']);
$params['type'] = 'M';
// From
$parsed = \Helpers\Airport::extractParams($this->request->getPost('airportFromTwoClean', 'string'));
$params['from1'] = 'C'. $parsed['airportCode']; // Always search by city
// To
$parsed = \Helpers\Airport::extractParams($this->request->getPost('airportToTwoClean', 'string'));
$params['to1'] = 'C'. $parsed['airportCode']; // Always search by city
// Date
$params['departure1'] = date('Y-m-d', strtotime($this->request->getPost('departureDateTwo', 'string')));
}
// Redirect to Amadeus
$url = 'https://flights.usitcolours.bg/?';
$url.= http_build_query($params);
return $this->response->redirect($url, true);
}
// Subscribe popup
public function subscribePopupAction()
{
$post = $this->request->getJsonRawBody();
$this->view->setRenderLevel(\Phalcon\Mvc\View::LEVEL_NO_RENDER);
$viewParams = [];
$html = $this->view->getRender('_layouts/parts', 'subscribe-popup', $viewParams, function($view) {
$view->setRenderLevel(\Phalcon\Mvc\View::LEVEL_ACTION_VIEW);
});
// Response
if ($this->request->isAjax()) {
return $this->response->setJsonContent(['html' => $html]);
} else {
return $this->response->setContent($html);
}
}
// 404
public function error404Action()
{
// Forbid indexing this page!
$this->view->searchIndexStatus = 'noindex';
$this->response->setStatusCode(404, 'Not Found');
$this->view->pick('_layouts/error-404');
$this->response->send();
}
/**
* Returns md5 hash for the current page.
*
* @param string $token
* @return string
*/
public function getCurrentShareToken($token)
{
return md5($token);
}
public function getUsitOffices($visibility = 'all')
{
return \Helpers\Common::getUsitOffices($this->session->language, $visibility);
}
// Update share counters
public function updateShareCounterAction()
{
$result = [];
$token = $this->request->getPost('token');
$action = $this->request->getPost('action');
$shared = $this->session->shared;
if (!$shared OR !isset($shared[$action][$token])) {
// Check for sneaky users
if (!in_array($action, ['facebook', 'twitter', 'google', 'print', 'email', 'viber', 'whatsapp', 'fbMessenger'])) {
return false;
}
$check = \Models\ShareCounters::findFirstByToken($token);
if ($check === false) {
$check = new \Models\ShareCounters();
$check->token = $token;
}
$check->{$action} = ($check->{$action} ?? 0) + 1;
$check->save();
// Update session
$shared[$action][$token] = 1;
$this->session->shared = $shared;
$result = [
'action' => $action,
'counter' => $check->{$action}
];
}
$this->response->setJsonContent($result);
return $this->response->send();
}
// Detect Language
private function detectLanguage()
{
// Single language => use default locale
$language = $this->config->site->defaultLanguage;
// Multi language site
if (count($this->config->site->languages) > 1 AND $this->dispatcher->getParam('language')) {
if (in_array($this->dispatcher->getParam('language'), (array) $this->config->site->languages)) {
// default language should not be in the url. Redirect in case someone wrote it manually
if ($this->dispatcher->getParam('language') == $language) {
$needle = '/'. $language .'/'; // Example: /bg/
$currentUrl = getCurrentUrl();
// Inner page (/bg/....) or Home (/bg)
if (strpos($currentUrl, $needle) !== false) {
$redirect = str_replace($needle, '/', $currentUrl);
} else {
$redirect = str_replace('/'. $language, '', $currentUrl);
}
return $this->response->redirect($redirect, true, 301)->send();
} else{
$language = $this->dispatcher->getParam('language');
}
} else {
// Locale is in URL but its not a valid config value. Redirect to home
return $this->response->redirect($this->config->site->url, true, 301)->send();
}
}
$this->session->language = $language;
}
/**
* Add additional scripts to header/footer templates
*
* @param string $type Available values: css|js|script
* @param string || array $fileNames Filenames to be included. File extension is added automatically
* @return void
*/
public function additionalAssets($type, $fileNames)
{
foreach ((array) $fileNames as $name) {
$this->additionalAssets[$type][] = $name;
}
$this->view->additionalAssets = $this->additionalAssets;
}
/**
* Check if user is logged.
* Redirect to login if not
*
* @return void
*/
/* public function checkLogged()
{
$exceptions = [
'profile/login',
'profile/logout',
];
$needle = $this->router->getControllerName() .'/'. $this->router->getActionName();
if (!$this->session->has('profile') AND !in_array($needle, $exceptions)) {
$this->flash->error($this->translations->public->general->loggedOnly);
return $this->response->redirect(
url(['for' => 'default', 'controller' => 'profile', 'action' => 'login'], ['return' => $this->request->getUri()]),
true
)->send();
}
}*/
public function loadLanguageFile($key, $file)
{
$obj = new \Models\Translations();
$translations = $obj->getCache($file);
if ($this->di->has('translations')) {
$temp = $this->translations;
} else {
$temp = new \stdClass();
}
$temp->{$key} = $translations;
$this->di->setShared('translations', $temp);
}
} |
| #2 | Frontend\Controllers\BaseController->loadCache() /home/dev.crusit.bg/public_html/apps/frontend/controllers/BaseController.php (24) <?php
/**
* @file BaseController.php
* @package Framework v1.0
* @author Nikolay Mihaylov <n.mihayloff@gmail.com>
*/
namespace Frontend\Controllers;
class BaseController extends \Phalcon\Mvc\Controller
{
public $additionalAssets;
public function initialize()
{
// Restricted access to dev site
if ($this->config->isWebsiteIpRestricted AND !in_array($this->request->getServer('REMOTE_ADDR'), (array) $this->config->cms->ipRestriction)) {
//die('Forbidden');
}
// Detect language
$this->detectLanguage();
// Load global cache files
$this->loadCache();
// Cookie specific
$this->cookieSpecific();
// Current route name
$this->view->currentRouteName = '';
if ($this->router->getMatchedRoute()) {
$this->view->currentRouteName = $this->router->getMatchedRoute()->getName();
}
// Others..
$this->view->assetsVersion = $this->config->assetsVersion;
// Update: 2021-10-15: temporary disable live chat
// $this->view->isChatOperatorAvailable = date('G') >= 9 && date('G') < 19 && !in_array(date('l'), ['Saturday', 'Sunday']);
$this->view->isChatOperatorAvailable = false;
$this->view->globalSettings = (new \Models\Settings)->getAll();
// Countdown bar
if (
$this->config->site->countdownBar->isActive === true AND
time() >= strtotime($this->config->site->countdownBar->from) AND
time() <= strtotime($this->config->site->countdownBar->to)
) {
$this->view->countdownBar = $this->config->site->countdownBar;
$this->additionalAssets('js', 'countdown-timer');
$this->additionalAssets('css', 'countdown-timer');
}
}
// Cache
private function loadCache()
{
// Translations
$file = 'public-' . $this->session->language;
$this->loadLanguageFile('public', $file);
// Supermenu pages and Static menu links
$pages = new \Models\Pages();
$this->view->supermenu = $pages->getForSupermenu();
$this->view->staticMenuLinks = $pages->getStaticLinks();
// Form filters
$this->view->formFilters = \Helpers\Cruises::getFormFilters();
}
// Cookie specific actions
private function cookieSpecific()
{
// Newsletter popup - First time visiting Crusit from Usit
if (
!$this->cookies->has('firstVisitFromUsit') AND
strpos($this->request->getServer('HTTP_REFERER'), 'usitcolours') !== false
) {
$this->additionalAssets('script', 'first-visit-from-usit-popup');
$this->cookies->set('firstVisitFromUsit', 1, strtotime('+7 days'));
}
// Newsletter popup - First visit for a month
if (!$this->cookies->has('firstVisitThisMonth')) {
$this->additionalAssets('script', 'trigger-newsletter-popup');
}
// Special popup
// if (!$this->session->has('isSpecialPopupDisplayed')) {
// $this->session->isSpecialPopupDisplayed = 1;
// $this->additionalAssets('script', 'trigger-special-popup');
// }
// Cookies Assets
$this->additionalAssets('js', 'cookies-v2');
$this->additionalAssets('css', 'cookies-v2');
// Cookie consent settings
$this->view->cookiesSettings = \Helpers\CookiesConsent::get();
$this->view->cookiesSettingsAcceptedEverything = true;
// Facebook
if (isset($this->view->cookiesSettings['marketingFacebook']) AND $this->view->cookiesSettings['marketingFacebook'] == 1) {
$this->view->cookiesSettingsAllowFacebook = 1;
} else {
$this->view->cookiesSettingsAcceptedEverything = false;
}
// Google
if (isset($this->view->cookiesSettings['marketingGoogle']) AND $this->view->cookiesSettings['marketingGoogle'] == 1) {
$this->view->cookiesSettingsAllowGoogle = 1;
} else {
$this->view->cookiesSettingsAcceptedEverything = false;
}
// OpenX
if (isset($this->view->cookiesSettings['marketingOtherAdvertisers']) AND $this->view->cookiesSettings['marketingOtherAdvertisers'] == 1) {
$this->view->cookiesSettingsAllowBannerSystem = 1;
} else {
$this->view->cookiesSettingsAcceptedEverything = false;
}
// Statistics
if (isset($this->view->cookiesSettings['statisticsGoogleAnalytics']) AND $this->view->cookiesSettings['statisticsGoogleAnalytics'] == 1) {
$this->view->cookiesSettingsAllowStatistics = 1;
} else {
$this->view->cookiesSettingsAcceptedEverything = false;
}
// LiveChat (requires Google statistics too)
if (
isset($this->view->cookiesSettings['preferencesLiveChat']) AND
$this->view->cookiesSettings['preferencesLiveChat'] == 1 AND
isset($this->view->cookiesSettings['statisticsGoogleAnalytics']) AND
$this->view->cookiesSettings['statisticsGoogleAnalytics'] == 1
) {
$this->view->cookiesSettingsAllowLiveChat = 1;
} else {
$this->view->cookiesSettingsAcceptedEverything = false;
}
// Display Disclaimer?
if (!isset($this->view->cookiesSettings['displayDisclaimer']) OR $this->view->cookiesSettings['displayDisclaimer'] == 1) {
$this->view->cookiesDisplayDisclaimer = 1;
}
// REMOVE THIS LATER
// $this->view->gdprTesting = !in_array($_SERVER['REMOTE_ADDR'], ['94.155.221.220', '178.169.252.245', '178.169.255.197', '85.196.180.242']);
$this->view->gdprTesting = false; // Going LIVE for now. Remove checks from templates later!
}
// Flight search form - Autocomplete airports
public function airportAutocompleteAction()
{
$result = \Helpers\Airport::search($this->request->getPost('title'), $this->session->language, true);
$this->response->setContentType('application/json', 'UTF-8');
$this->response->setJsonContent($result, JSON_UNESCAPED_UNICODE);
return $this->response->send();
}
// Flight search form - Process submit
public function processFlightSearchFormAction()
{
$params = [
'fs' => 1,
'type' => 'O',
'adults' => $this->request->getPost('adults', 'int', 1),
'children' => $this->request->getPost('children', 'int', 0),
];
// From
$parsed = \Helpers\Airport::extractParams($this->request->getPost('airportFromClean', 'string'));
$params['from'] = $parsed['type'] . $parsed['airportCode'];
// To
$parsed = \Helpers\Airport::extractParams($this->request->getPost('airportToClean', 'string'));
$params['to'] = $parsed['type'] . $parsed['airportCode'];
// Date
$params['departure'] = date('Y-m-d', strtotime($this->request->getPost('departureDate', 'string')));
if (!empty($this->request->getPost('returnDate'))) {
$params['return'] = date('Y-m-d', strtotime($this->request->getPost('returnDate', 'string')));
$params['type'] = 'R';
}
// Multiple destinations?
if (
$this->request->getPost('searchType') == 'advanced' AND
!empty($this->request->getPost('airportFromTwoClean')) AND
!empty($this->request->getPost('airportToTwoClean'))
) {
unset($params['return']);
$params['type'] = 'M';
// From
$parsed = \Helpers\Airport::extractParams($this->request->getPost('airportFromTwoClean', 'string'));
$params['from1'] = 'C'. $parsed['airportCode']; // Always search by city
// To
$parsed = \Helpers\Airport::extractParams($this->request->getPost('airportToTwoClean', 'string'));
$params['to1'] = 'C'. $parsed['airportCode']; // Always search by city
// Date
$params['departure1'] = date('Y-m-d', strtotime($this->request->getPost('departureDateTwo', 'string')));
}
// Redirect to Amadeus
$url = 'https://flights.usitcolours.bg/?';
$url.= http_build_query($params);
return $this->response->redirect($url, true);
}
// Subscribe popup
public function subscribePopupAction()
{
$post = $this->request->getJsonRawBody();
$this->view->setRenderLevel(\Phalcon\Mvc\View::LEVEL_NO_RENDER);
$viewParams = [];
$html = $this->view->getRender('_layouts/parts', 'subscribe-popup', $viewParams, function($view) {
$view->setRenderLevel(\Phalcon\Mvc\View::LEVEL_ACTION_VIEW);
});
// Response
if ($this->request->isAjax()) {
return $this->response->setJsonContent(['html' => $html]);
} else {
return $this->response->setContent($html);
}
}
// 404
public function error404Action()
{
// Forbid indexing this page!
$this->view->searchIndexStatus = 'noindex';
$this->response->setStatusCode(404, 'Not Found');
$this->view->pick('_layouts/error-404');
$this->response->send();
}
/**
* Returns md5 hash for the current page.
*
* @param string $token
* @return string
*/
public function getCurrentShareToken($token)
{
return md5($token);
}
public function getUsitOffices($visibility = 'all')
{
return \Helpers\Common::getUsitOffices($this->session->language, $visibility);
}
// Update share counters
public function updateShareCounterAction()
{
$result = [];
$token = $this->request->getPost('token');
$action = $this->request->getPost('action');
$shared = $this->session->shared;
if (!$shared OR !isset($shared[$action][$token])) {
// Check for sneaky users
if (!in_array($action, ['facebook', 'twitter', 'google', 'print', 'email', 'viber', 'whatsapp', 'fbMessenger'])) {
return false;
}
$check = \Models\ShareCounters::findFirstByToken($token);
if ($check === false) {
$check = new \Models\ShareCounters();
$check->token = $token;
}
$check->{$action} = ($check->{$action} ?? 0) + 1;
$check->save();
// Update session
$shared[$action][$token] = 1;
$this->session->shared = $shared;
$result = [
'action' => $action,
'counter' => $check->{$action}
];
}
$this->response->setJsonContent($result);
return $this->response->send();
}
// Detect Language
private function detectLanguage()
{
// Single language => use default locale
$language = $this->config->site->defaultLanguage;
// Multi language site
if (count($this->config->site->languages) > 1 AND $this->dispatcher->getParam('language')) {
if (in_array($this->dispatcher->getParam('language'), (array) $this->config->site->languages)) {
// default language should not be in the url. Redirect in case someone wrote it manually
if ($this->dispatcher->getParam('language') == $language) {
$needle = '/'. $language .'/'; // Example: /bg/
$currentUrl = getCurrentUrl();
// Inner page (/bg/....) or Home (/bg)
if (strpos($currentUrl, $needle) !== false) {
$redirect = str_replace($needle, '/', $currentUrl);
} else {
$redirect = str_replace('/'. $language, '', $currentUrl);
}
return $this->response->redirect($redirect, true, 301)->send();
} else{
$language = $this->dispatcher->getParam('language');
}
} else {
// Locale is in URL but its not a valid config value. Redirect to home
return $this->response->redirect($this->config->site->url, true, 301)->send();
}
}
$this->session->language = $language;
}
/**
* Add additional scripts to header/footer templates
*
* @param string $type Available values: css|js|script
* @param string || array $fileNames Filenames to be included. File extension is added automatically
* @return void
*/
public function additionalAssets($type, $fileNames)
{
foreach ((array) $fileNames as $name) {
$this->additionalAssets[$type][] = $name;
}
$this->view->additionalAssets = $this->additionalAssets;
}
/**
* Check if user is logged.
* Redirect to login if not
*
* @return void
*/
/* public function checkLogged()
{
$exceptions = [
'profile/login',
'profile/logout',
];
$needle = $this->router->getControllerName() .'/'. $this->router->getActionName();
if (!$this->session->has('profile') AND !in_array($needle, $exceptions)) {
$this->flash->error($this->translations->public->general->loggedOnly);
return $this->response->redirect(
url(['for' => 'default', 'controller' => 'profile', 'action' => 'login'], ['return' => $this->request->getUri()]),
true
)->send();
}
}*/
public function loadLanguageFile($key, $file)
{
$obj = new \Models\Translations();
$translations = $obj->getCache($file);
if ($this->di->has('translations')) {
$temp = $this->translations;
} else {
$temp = new \stdClass();
}
$temp->{$key} = $translations;
$this->di->setShared('translations', $temp);
}
} |
| #3 | Frontend\Controllers\BaseController->initialize() |
| #4 | Phalcon\Dispatcher->dispatch() |
| #5 | Phalcon\Mvc\Application->handle() /home/dev.crusit.bg/public_html/apps/Bootstrap.php (182) <?php
require_once __DIR__ . '/../common/lib/global-functions.php';
class Bootstrap
{
private $app;
public function __construct()
{
// Dependency Injector
$di = new \Phalcon\DI\FactoryDefault();
// Configuration
$config = loadConfigFile('config');
$databaseCredentials = $config->sensitive->database;
unset($config->sensitive);
$di->setShared('config', $config);
// 301 Redirects from CMS - must be before routes
$currentUrl = getCurrentUrl();
$redirectsCacheFile = $config->site->path->cache . 'site/redirects';
if ($config->cms->functionalities->redirects === true AND is_file($redirectsCacheFile)) {
$redirects = json_decode(
file_get_contents($redirectsCacheFile),
true
);
$url = str_replace($config->site->url, '', $currentUrl);
$url = strtok(rawurldecode($url), '?');
if (isset($redirects[$url])) {
return $di->getResponse()->redirect($redirects[$url]['url'], true, $redirects[$url]['code'])->send();
}
}
// 301 Redirect if /public/index.php
if (strpos($currentUrl, 'public/index.php') !== false) {
return $di->getResponse()->redirect($config->site->url, true, 301)->send();
}
// 301 Redirect if /public/ - Replace only the first occurance of /public/
$currentPath = str_replace($config->site->url, '', $currentUrl);
if (substr($currentPath, 0, 6) == 'public') {
$needle = '/public/';
$redirect = substr_replace($currentUrl, '/', strpos($currentUrl, $needle), strlen($needle));
return $di->getResponse()->redirect($redirect, true, 301)->send();
}
// Router
$di->setShared('router', function() use ($config) {
$router = new \Phalcon\Mvc\Router();
$router->setDefaultModule('frontend');
$router->removeExtraSlashes(true);
require_once $config->site->path->configs . 'routes.php';
// loadConfigFile('routes', true); // Why this was here? Am I getting too old?
return $router;
});
// Crypt
$di->setShared('crypt', function () use ($config) {
$crypt = new \Phalcon\Crypt();
$crypt->setKey('i$4^&/:%2@k%0ROQ<@{(e=*!<2u|rI~4');
return $crypt;
});
// URL component
$di->setShared('url', function() use ($config) {
$url = new \Phalcon\Mvc\Url();
$url->setBaseUri($config->site->url);
$url->setStaticBaseUri($config->site->staticUrl);
return $url;
});
// Session
$di->setShared('session', function() {
$session = new \Phalcon\Session\Adapter\Files();
$session->start();
return $session;
});
// Cache
$di->setShared('cache', function() use ($config) {
return new \Phalcon\Cache\Backend\File(
new \Phalcon\Cache\Frontend\Json(['lifetime' => 172800]), // 2d
['cacheDir' => $config->site->path->cache . 'site/']
);
});
// Database connection. Use set() if Transactions are needed
$di->setShared('db', function() use ($databaseCredentials) {
return new \Phalcon\Db\Adapter\Pdo\Mysql([
'host' => $databaseCredentials->host,
'username' => $databaseCredentials->username,
'password' => $databaseCredentials->password,
'dbname' => $databaseCredentials->name,
'charset' => 'utf8',
'options' => [
// attr syntax "SET query1, query2, query 3...." (Only 1 set and rest are comma separated).
// Disable latest mysql ONLY_FULL_GROUP_BY mode.
// \PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8, GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));",
// \PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8, CHARACTER SET utf8;",
\PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8;",
\PDO::ATTR_PERSISTENT => true,
\PDO::ATTR_STRINGIFY_FETCHES => false
]
]);
});
// Cache Model meta data only in production
if ($config->debug === false) {
$di->setShared('modelsMetadata', function() use ($config) {
return new \Phalcon\Mvc\Model\MetaData\Files([
'lifetime' => 86400,
'metaDataDir' => $config->site->path->cache . 'models-metadata/'
]);
});
}
// Models cache
$di->setShared('modelsCache', function() use ($config) {
$frontCache = new \Phalcon\Cache\Frontend\Data(['lifetime' => 7200]); // 2h
$cache = new \Phalcon\Cache\Backend\File($frontCache, [
'cacheDir' => $config->site->path->cache . 'queries/'
]);
if ($config->debug) {
$cache->flush();
}
return $cache;
});
$this->app = new \Phalcon\Mvc\Application();
$this->app->setDI($di);
}
public function run()
{
$modules = [
'frontend' => [
'className' => 'Frontend\Module',
'path' => __DIR__ .'/frontend/Module.php'
],
'backend' => [
'className' => 'Backend\Module',
'path' => __DIR__ .'/backend/Module.php'
]
];
// Is there an API?
$uri = $this->app->router->getRewriteUri();
if ($this->app->config->dev->hasApi === true) {
if (substr($uri, 0, 5) == '/api/') {
// Extract api version from url: /api/v1/robots...
$parts = array_filter(explode('/', $uri));
// Save API version
$this->app->config->apiVersion = $parts[2];
// Add to modules
$modules['api'] = [
'className' => 'Api\Module',
'path' => __DIR__ .'/api/'. $this->app->config->apiVersion .'/Module.php'
];
}
}
// Whitelabel app?
if (substr($uri, 0, 12) == '/whitelabel/') {
// Extract version from url: /whitelabel/v1/robots...
$parts = array_filter(explode('/', $uri));
// Save version
$this->app->config->whitelabelVersion = $parts[2];
// Add to modules
$modules['whitelabel'] = [
'className' => 'Whitelabel\Module',
'path' => __DIR__ .'/whitelabel/'. $this->app->config->whitelabelVersion .'/Module.php'
];
}
// Register application modules
$this->app->registerModules($modules);
echo $this->app->handle()->getContent();
}
public function getApp()
{
return $this->app;
}
} |
| #6 | Bootstrap->run() /home/dev.crusit.bg/public_html/public/index.php (7) <?php
try {
define('DEV', in_array($_SERVER['REMOTE_ADDR'], ['77.70.108.105', '::1']));
$root = str_replace('\\', '/', dirname(dirname(__FILE__))) . '/';
require_once $root . 'apps/Bootstrap.php';
$bootstrap = new Bootstrap();
$bootstrap->run();
} catch (\Exception $e) {
if ($bootstrap->getApp()->config->debug === true) {
$debug = new \Phalcon\Debug();
die($debug->listen()->onUncaughtException($e));
} else {
// Log the error
// $logFile = $bootstrap->getApp()->config->site->path->logs . 'errors/error-500_'. date('YmdHis') .'_'. mt_rand(1, 1000000) .'.txt';
// file_put_contents($logFile, var_export($e, true));
error_log($e);
// Output for user
header('HTTP/1.1 500 Internal Server Error');
die(file_get_contents('../apps/frontend/views/_layouts/error-500.phtml'));
}
} |
| Key | Value |
|---|---|
| _url | /assets/upload/1/3907/1000xAUTO_paluba-8-norwegian-pearl.png |
| Key | Value |
|---|---|
| USER | dev.crusit.bg |
| HOME | /home/dev.crusit.bg |
| 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_HOST | dev.crusit.bg |
| HTTPS | on |
| PATH_INFO | |
| SERVER_NAME | dev.crusit.bg |
| SERVER_PORT | 443 |
| SERVER_ADDR | 185.55.229.202 |
| REMOTE_PORT | 34534 |
| REMOTE_ADDR | 216.73.216.49 |
| SERVER_PROTOCOL | HTTP/2.0 |
| DOCUMENT_ROOT | /home/dev.crusit.bg/public_html/public |
| DOCUMENT_URI | /index.php |
| REQUEST_URI | /assets/upload/1/3907/1000xAUTO_paluba-8-norwegian-pearl.png |
| SCRIPT_NAME | /index.php |
| SCRIPT_FILENAME | /home/dev.crusit.bg/public_html/public/index.php |
| CONTENT_LENGTH | |
| CONTENT_TYPE | |
| REQUEST_METHOD | GET |
| QUERY_STRING | _url=/assets/upload/1/3907/1000xAUTO_paluba-8-norwegian-pearl.png& |
| SERVER_SOFTWARE | nginx |
| GATEWAY_INTERFACE | CGI/1.1 |
| FCGI_ROLE | RESPONDER |
| PHP_SELF | /index.php |
| REQUEST_TIME_FLOAT | 1769582771.832 |
| REQUEST_TIME | 1769582771 |
| # | Path |
|---|---|
| 0 | /home/dev.crusit.bg/public_html/public/index.php |
| 1 | /home/dev.crusit.bg/public_html/apps/Bootstrap.php |
| 2 | /home/dev.crusit.bg/public_html/common/lib/global-functions.php |
| 3 | /home/dev.crusit.bg/public_html/common/config/config.php |
| 4 | /home/dev.crusit.bg/public_html/common/config/routes.php |
| 5 | /home/dev.crusit.bg/public_html/common/config/routes-api.php |
| 6 | /home/dev.crusit.bg/public_html/common/config/routes-whitelabel.php |
| 7 | /home/dev.crusit.bg/public_html/apps/frontend/Module.php |
| 8 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Profiler.php |
| 9 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/ProfilerInterface.php |
| 10 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Aggregator/Database/QueryAggregator.php |
| 11 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Aggregator/AbstractAggregator.php |
| 12 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/AggregatorInterface.php |
| 13 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Aggregator/Cache/CacheAggregator.php |
| 14 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Plugin/Manager/Phalcon.php |
| 15 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Plugin/Phalcon/Db/AdapterPlugin.php |
| 16 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Plugin/PluginAbstract.php |
| 17 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Plugin/Phalcon/Mvc/DispatcherPlugin.php |
| 18 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Plugin/Phalcon/Mvc/ViewPlugin.php |
| 19 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Plugin/Phalcon/Mvc/ViewPluginInterface.php |
| 20 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Toolbar.php |
| 21 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Adapter/Psr/Log/Logger.php |
| 22 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Adapter/AdapterAbstract.php |
| 23 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/DataCollector/Request.php |
| 24 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/DataCollectorInterface.php |
| 25 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Benchmark/BenchmarkFactory.php |
| 26 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Benchmark/Benchmark.php |
| 27 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Benchmark/BenchmarkInterface.php |
| 28 | /home/dev.crusit.bg/public_html/apps/frontend/controllers/BaseController.php |
| 29 | /home/dev.crusit.bg/public_html/common/models/Translations.php |
| 30 | /home/dev.crusit.bg/public_html/common/models/BaseModel.php |
| 31 | /home/dev.crusit.bg/public_html/common/models/Pages.php |
| 32 | /home/dev.crusit.bg/public_html/common/models/PagesI18n.php |
| 33 | /home/dev.crusit.bg/public_html/common/models/Uploads.php |
| 34 | /home/dev.crusit.bg/public_html/common/models/UploadsI18n.php |
| 35 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Aggregator/Aggregation.php |
| 36 | /home/dev.crusit.bg/public_html/common/lib/Fabfuel/Prophiler/Aggregator/AggregationInterface.php |
| Memory | |
|---|---|
| Usage | 2097152 |