function build($context = NULL) { $this->invalid_credentials = false; $this->Headers->append('Content-Type', 'text/html; charset=UTF-8'); $this->Html->setAttribute('lang', Symphony::lang()); $meta = $this->createElement('meta'); $this->insertNodeIntoHead($meta); $meta->setAttribute('http-equiv', 'Content-Type'); $meta->setAttribute('content', 'text/html; charset=UTF-8'); $this->insertNodeIntoHead($this->createStylesheetElement(ADMIN_URL . '/assets/css/peripheral.css')); parent::setTitle(__('%1$s – %2$s', array(__('Symphony'), __('Login')))); ## Build the form $this->Form = $this->createElement('form'); $this->Form->setAttribute('action', Administration::instance()->getCurrentPageURL()); $this->Form->setAttribute('method', 'POST'); $this->Form->setAttribute('class', 'panel'); $this->Body->appendChild($this->Form); $this->Form->appendChild($this->createElement('h1', __('Symphony'))); if ($context) { $this->_context = $context; } if (isset($_REQUEST['action'])) { $this->action(); } $this->view(); }
function __construct(&$parent) { parent::__construct(); $this->_Parent = $parent; $this->_invalidPassword = false; $this->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8'); $this->Html->setElementStyle('html'); $this->Html->setDTD('<!DOCTYPE html>'); //PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" $this->Html->setAttribute('lang', Symphony::lang()); $this->addElementToHead(new XMLElement('meta', NULL, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0); $this->addStylesheetToHead(URL . '/symphony/assets/login.css', 'screen', 40); $this->setTitle(__('%1$s – %2$s', array(__('Symphony'), __('Login')))); $this->_Parent->Profiler->sample('Page template created', PROFILE_LAP); }
function build($context = NULL) { $this->_context = $context; if (!$this->canAccessPage()) { $this->_Parent->customError(E_USER_ERROR, __('Access Denied'), __('You are not authorised to access this page.')); exit; } $this->Html->setDTD('<!DOCTYPE html>'); $this->Html->setAttribute('lang', Symphony::lang()); $this->addElementToHead(new XMLElement('meta', NULL, array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8')), 0); $this->addStylesheetToHead(URL . '/symphony/assets/symphony.duplicator.css', 'screen', 70); $this->addScriptToHead(URL . '/symphony/assets/jquery.js', 50); $this->addScriptToHead(URL . '/symphony/assets/symphony.collapsible.js', 60); $this->addScriptToHead(URL . '/symphony/assets/symphony.orderable.js', 61); $this->addScriptToHead(URL . '/symphony/assets/symphony.duplicator.js', 62); $this->addScriptToHead(URL . '/symphony/assets/admin.js', 70); ### # Delegate: InitaliseAdminPageHead # Description: Allows developers to insert items into the page HEAD. Use $context['parent']->Page # for access to the page object $this->_Parent->ExtensionManager->notifyMembers('InitaliseAdminPageHead', '/backend/'); $this->addHeaderToPage('Content-Type', 'text/html; charset=UTF-8'); if (isset($_REQUEST['action'])) { $this->action(); $this->_Parent->Profiler->sample('Page action run', PROFILE_LAP); } ## Build the form $this->Form = Widget::Form($this->_Parent->getCurrentPageURL(), 'post'); $h1 = new XMLElement('h1'); $h1->appendChild(Widget::Anchor(Symphony::Configuration()->get('sitename', 'general'), rtrim(URL, '/') . '/')); $this->Form->appendChild($h1); $this->appendNavigation(); $this->view(); ### # Delegate: AppendElementBelowView # Description: Allows developers to add items just above the page footer. Use $context['parent']->Page # for access to the page object $this->_Parent->ExtensionManager->notifyMembers('AppendElementBelowView', '/backend/'); $this->appendFooter(); $this->appendAlert(); $this->_Parent->Profiler->sample('Page content created', PROFILE_LAP); }
/** * Load all language files (core and extensions) * * It may be possible that there are only translations for an extension, * so don't stop if there is no core translation as Symphony will always display the English strings. */ public static function loadAll() { // Load localisation file for the Symphony core $file = Lang::findLanguagePath(Symphony::lang()) . '/lang.%s.php'; $path = sprintf($file, Symphony::lang()); if (is_file($path)) { Lang::load($file, Symphony::lang(), true); } // Load localisation files for extensions foreach (new ExtensionIterator(ExtensionIterator::FLAG_STATUS, Extension::STATUS_ENABLED) as $extension) { $path = Extension::getPathFromClass(get_class($extension)) . '/lang/lang.%s.php'; if (is_file(sprintf($path, Symphony::lang()))) { Lang::add($path, Symphony::lang()); } } /*foreach(ExtensionManager::instance()->listAll() as $handle => $e){ $path = ExtensionManager::instance()->__getClassPath($handle) . '/lang/lang.%s.php'; if($e['status'] == Extension::ENABLED && file_exists(sprintf($path, Symphony::lang()))){ Lang::add($path, Symphony::lang()); } }*/ }
/** * Load all language files (core and extensions) * * It may be possible that there are only translations for an extension, * so don't stop if there is no core translation as Symphony will always display the English strings. */ public static function loadAll($ExtensionManager) { // Load localisation file for the Symphony core $file = Lang::findLanguagePath(Symphony::lang(), $ExtensionManager) . '/lang.%s.php'; $path = sprintf($file, Symphony::lang()); if (file_exists($path)) { Lang::load($file, Symphony::lang(), true); } // Load localisation files for extensions foreach ($ExtensionManager->listAll() as $handle => $e) { $path = $ExtensionManager->__getClassPath($handle) . '/lang/lang.%s.php'; if ($e['status'] == EXTENSION_ENABLED && file_exists(sprintf($path, Symphony::lang()))) { Lang::add($path, Symphony::lang()); } } }