<?php
require_once __DIR__ . '/common.php'; Moto\Features::enable('engine_settings__analytics', Moto\System\Brand::getInstance()->getName() === 'motocms'); $twig = Moto\Render::getInstance('admin'); $user = Moto\Authentication\Service::getUser(); $twig->addGlobal('config', Moto\Config::getPublic()); $twig->addGlobal('BRAND', Moto\System\Brand::getInstance()); $twig->addGlobal('SYSTEM', Moto\System\Settings::get()); $twig->addGlobal('user', $user); if ($user) { $template = $twig->loadTemplate('application/index.html'); } else { $template = $twig->loadTemplate('application/guest.html'); } $analytics = null; if (Moto\System::getUser() && Moto\Util::getValue(Moto\Website\Settings::get('control_panel_analytics'), 'enabled') && Moto\Features::isEnabled('engine_settings__analytics')) { $analytics = Moto\Config::get('controlPanelAnalytics'); } echo $template->render(array( 'analytics' => $analytics, )); 