Example #1
0
 /**
  * Get HTML of ILIAS login page editor
  * @return string html
  */
 protected function getLoginPageEditorHTML()
 {
     global $lng, $tpl;
     include_once './Services/Authentication/classes/class.ilAuthLoginPageEditorSettings.php';
     $lpe = ilAuthLoginPageEditorSettings::getInstance();
     $active_lang = $lpe->getIliasEditorLanguage($lng->getLangKey());
     if (!$active_lang) {
         return '';
     }
     // if page does not exist, return nothing
     include_once './Services/COPage/classes/class.ilPageUtil.php';
     if (!ilPageUtil::_existsAndNotEmpty('auth', ilLanguage::lookupId($active_lang))) {
         return '';
     }
     include_once './Services/Authentication/classes/class.ilLoginPage.php';
     include_once './Services/Authentication/classes/class.ilLoginPageGUI.php';
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     // get page object
     $page_gui = new ilLoginPageGUI(ilLanguage::lookupId($active_lang));
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $page_gui->setStyleId(0, 'auth');
     $page_gui->setPresentationTitle("");
     $page_gui->setTemplateOutput(false);
     $page_gui->setHeader("");
     $ret = $page_gui->showPage();
     return $ret;
 }