/**
  * set all template variables (images, scripts, target frames, ...)
  */
 function setTemplateVars()
 {
     global $rbacsystem, $lng, $ilias, $tree, $ilUser, $ilSetting, $ilPluginAdmin;
     if ($this->logo_only) {
         $this->tpl->setVariable("HEADER_ICON", ilUtil::getImagePath("HeaderIcon.png"));
         return;
     }
     // get user interface plugins
     $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
     // search
     include_once 'Services/Search/classes/class.ilSearchSettings.php';
     if ($rbacsystem->checkAccess('search', ilSearchSettings::_getSearchSettingRefId())) {
         include_once './Services/Search/classes/class.ilMainMenuSearchGUI.php';
         $main_search = new ilMainMenuSearchGUI();
         $html = "";
         // user interface plugin slot + default rendering
         include_once "./Services/UIComponent/classes/class.ilUIHookProcessor.php";
         $uip = new ilUIHookProcessor("Services/MainMenu", "main_menu_search", array("main_menu_gui" => $this, "main_menu_search_gui" => $main_search));
         if (!$uip->replaced()) {
             $html = $main_search->getHTML();
         }
         $html = $uip->getHTML($html);
         if (strlen($html)) {
             $this->tpl->setVariable('SEARCHBOX', $html);
         }
     }
     $this->renderStatusBox($this->tpl);
     // online help
     $this->renderHelpButtons();
     $mmle_html = "";
     // user interface plugin slot + default rendering
     include_once "./Services/UIComponent/classes/class.ilUIHookProcessor.php";
     $uip = new ilUIHookProcessor("Services/MainMenu", "main_menu_list_entries", array("main_menu_gui" => $this));
     if (!$uip->replaced()) {
         $mmle_tpl = new ilTemplate("tpl.main_menu_list_entries.html", true, true, "Services/MainMenu");
         $mmle_html = $this->renderMainMenuListEntries($mmle_tpl);
     }
     $mmle_html = $uip->getHTML($mmle_html);
     $this->tpl->setVariable("MAIN_MENU_LIST_ENTRIES", $mmle_html);
     $link_dir = defined("ILIAS_MODULE") ? "../" : "";
     if (!$this->small) {
         // login stuff
         if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID) {
             include_once 'Services/Registration/classes/class.ilRegistrationSettingsGUI.php';
             if (ilRegistrationSettings::_lookupRegistrationType() != IL_REG_DISABLED) {
                 $this->tpl->setCurrentBlock("registration_link");
                 $this->tpl->setVariable("TXT_REGISTER", $lng->txt("register"));
                 $this->tpl->setVariable("LINK_REGISTER", $link_dir . "register.php?client_id=" . rawurlencode(CLIENT_ID) . "&lang=" . $ilias->account->getCurrentLanguage());
                 $this->tpl->parseCurrentBlock();
             }
             // language selection
             $selection = self::getLanguageSelection();
             if ($selection) {
                 $this->tpl->setVariable("LANG_SELECT", $selection);
             }
             $this->tpl->setCurrentBlock("userisanonymous");
             $this->tpl->setVariable("TXT_NOT_LOGGED_IN", $lng->txt("not_logged_in"));
             $this->tpl->setVariable("TXT_LOGIN", $lng->txt("log_in"));
             $target_str = "";
             if ($this->getLoginTargetPar() != "") {
                 $target_str = $this->getLoginTargetPar();
             } else {
                 if ($_GET["ref_id"] != "") {
                     if ($tree->isInTree($_GET["ref_id"]) && $_GET["ref_id"] != $tree->getRootId()) {
                         $obj_id = ilObject::_lookupObjId($_GET["ref_id"]);
                         $type = ilObject::_lookupType($obj_id);
                         $target_str = $type . "_" . $_GET["ref_id"];
                     }
                 }
             }
             $this->tpl->setVariable("LINK_LOGIN", $link_dir . "login.php?target=" . $target_str . "&client_id=" . rawurlencode(CLIENT_ID) . "&cmd=force_login&lang=" . $ilias->account->getCurrentLanguage());
             $this->tpl->parseCurrentBlock();
         } else {
             $notificationSettings = new ilSetting('notifications');
             $chatSettings = new ilSetting('chatroom');
             /**
              * @var $tpl ilTemplate
              */
             global $tpl;
             if ($chatSettings->get('chat_enabled') && $notificationSettings->get('enable_osd')) {
                 $this->tpl->touchBlock('osd_enabled');
                 $this->tpl->touchBlock('osd_container');
                 include_once "Services/jQuery/classes/class.iljQueryUtil.php";
                 iljQueryUtil::initjQuery();
                 include_once 'Services/MediaObjects/classes/class.ilPlayerUtil.php';
                 ilPlayerUtil::initMediaElementJs();
                 $tpl->addJavaScript('Services/Notifications/templates/default/notifications.js');
                 $tpl->addCSS('Services/Notifications/templates/default/osd.css');
                 require_once 'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
                 $notifications = ilNotificationOSDHandler::getNotificationsForUser($ilUser->getId());
                 $this->tpl->setVariable('INITIAL_NOTIFICATIONS', json_encode($notifications));
                 $this->tpl->setVariable('OSD_POLLING_INTERVALL', $notificationSettings->get('osd_polling_intervall') ? $notificationSettings->get('osd_polling_intervall') : '5');
                 $this->tpl->setVariable('OSD_PLAY_SOUND', $chatSettings->get('play_invitation_sound') ? 'true' : 'false');
                 foreach ($notifications as $notification) {
                     if ($notification['type'] == 'osd_maint') {
                         continue;
                     }
                     $this->tpl->setCurrentBlock('osd_notification_item');
                     $this->tpl->setVariable('NOTIFICATION_ICON_PATH', $notification['data']->iconPath);
                     $this->tpl->setVariable('NOTIFICATION_TITLE', $notification['data']->title);
                     $this->tpl->setVariable('NOTIFICATION_LINK', $notification['data']->link);
                     $this->tpl->setVariable('NOTIFICATION_LINKTARGET', $notification['data']->linktarget);
                     $this->tpl->setVariable('NOTIFICATION_ID', $notification['notification_osd_id']);
                     $this->tpl->setVariable('NOTIFICATION_SHORT_DESCRIPTION', $notification['data']->shortDescription);
                     $this->tpl->parseCurrentBlock();
                 }
             }
             $this->tpl->setCurrentBlock("userisloggedin");
             $this->tpl->setVariable("TXT_LOGIN_AS", $lng->txt("login_as"));
             $this->tpl->setVariable("TXT_LOGOUT2", $lng->txt("logout"));
             $this->tpl->setVariable("LINK_LOGOUT2", $link_dir . "logout.php?lang=" . $ilias->account->getCurrentLanguage());
             $this->tpl->setVariable("USERNAME", $ilias->account->getFullname());
             $this->tpl->parseCurrentBlock();
         }
         include_once "./Modules/SystemFolder/classes/class.ilObjSystemFolder.php";
         $header_top_title = ilObjSystemFolder::_getHeaderTitle();
         if (trim($header_top_title) != "" && $this->tpl->blockExists("header_top_title")) {
             $this->tpl->setCurrentBlock("header_top_title");
             $this->tpl->setVariable("TXT_HEADER_TITLE", $header_top_title);
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
         $this->tpl->setVariable("TXT_LOGOUT", $lng->txt("logout"));
         $this->tpl->setVariable("HEADER_ICON", ilUtil::getImagePath("HeaderIcon.png"));
         $this->tpl->setVariable("HEADER_BG_IMAGE", ilUtil::getImagePath("HeaderBackground.png"));
         include_once "./Modules/SystemFolder/classes/class.ilObjSystemFolder.php";
         // set link to return to desktop, not depending on a specific position in the hierarchy
         //$this->tpl->setVariable("SCRIPT_START", $this->getScriptTarget("start.php"));
     } else {
         $this->tpl->setVariable("HEADER_ICON", ilUtil::getImagePath("HeaderIcon.png"));
     }
     $this->tpl->setVariable("TXT_MAIN_MENU", $lng->txt("main_menu"));
     $this->tpl->parseCurrentBlock();
 }
Ejemplo n.º 2
0
 /**
  * set all template variables (images, scripts, target frames, ...)
  */
 function setTemplateVars()
 {
     global $rbacsystem, $lng, $ilias, $tree, $ilUser, $ilSetting, $ilPluginAdmin;
     if ($this->logo_only) {
         $this->tpl->setVariable("HEADER_URL", $this->getHeaderURL());
         $this->tpl->setVariable("HEADER_ICON", ilUtil::getImagePath("HeaderIcon.svg"));
         return;
     }
     // get user interface plugins
     $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
     if ($this->getMode() != self::MODE_TOPBAR_REDUCED && $this->getMode() != self::MODE_TOPBAR_MEMBERVIEW) {
         // search
         include_once 'Services/Search/classes/class.ilSearchSettings.php';
         if ($rbacsystem->checkAccess('search', ilSearchSettings::_getSearchSettingRefId())) {
             include_once './Services/Search/classes/class.ilMainMenuSearchGUI.php';
             $main_search = new ilMainMenuSearchGUI();
             $html = "";
             // user interface plugin slot + default rendering
             include_once "./Services/UIComponent/classes/class.ilUIHookProcessor.php";
             $uip = new ilUIHookProcessor("Services/MainMenu", "main_menu_search", array("main_menu_gui" => $this, "main_menu_search_gui" => $main_search));
             if (!$uip->replaced()) {
                 $html = $main_search->getHTML();
             }
             $html = $uip->getHTML($html);
             if (strlen($html)) {
                 $this->tpl->setVariable('SEARCHBOX', $html);
             }
         }
         $this->renderStatusBox($this->tpl);
         // online help
         $this->renderHelpButtons();
     }
     if ($this->getMode() == self::MODE_FULL) {
         $mmle_html = "";
         // user interface plugin slot + default rendering
         include_once "./Services/UIComponent/classes/class.ilUIHookProcessor.php";
         $uip = new ilUIHookProcessor("Services/MainMenu", "main_menu_list_entries", array("main_menu_gui" => $this));
         if (!$uip->replaced()) {
             $mmle_tpl = new ilTemplate("tpl.main_menu_list_entries.html", true, true, "Services/MainMenu");
             $mmle_html = $this->renderMainMenuListEntries($mmle_tpl);
         }
         $mmle_html = $uip->getHTML($mmle_html);
         $this->tpl->setVariable("MAIN_MENU_LIST_ENTRIES", $mmle_html);
     }
     if ($this->getMode() != self::MODE_TOPBAR_MEMBERVIEW) {
         $link_dir = defined("ILIAS_MODULE") ? "../" : "";
         // login stuff
         if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID) {
             include_once 'Services/Registration/classes/class.ilRegistrationSettingsGUI.php';
             if (ilRegistrationSettings::_lookupRegistrationType() != IL_REG_DISABLED) {
                 $this->tpl->setCurrentBlock("registration_link");
                 $this->tpl->setVariable("TXT_REGISTER", $lng->txt("register"));
                 $this->tpl->setVariable("LINK_REGISTER", $link_dir . "register.php?client_id=" . rawurlencode(CLIENT_ID) . "&lang=" . $ilias->account->getCurrentLanguage());
                 $this->tpl->parseCurrentBlock();
             }
             // language selection
             $selection = self::getLanguageSelection();
             if ($selection) {
                 // bs-patch start
                 global $ilUser, $lng;
                 $this->tpl->setVariable("TXT_LANGSELECT", $lng->txt("language"));
                 // bs-patch end
                 $this->tpl->setVariable("LANG_SELECT", $selection);
             }
             $this->tpl->setCurrentBlock("userisanonymous");
             $this->tpl->setVariable("TXT_NOT_LOGGED_IN", $lng->txt("not_logged_in"));
             $this->tpl->setVariable("TXT_LOGIN", $lng->txt("log_in"));
             // #13058
             $target_str = $this->getLoginTargetPar() != "" ? $this->getLoginTargetPar() : ilTemplate::buildLoginTarget();
             $this->tpl->setVariable("LINK_LOGIN", $link_dir . "login.php?target=" . $target_str . "&client_id=" . rawurlencode(CLIENT_ID) . "&cmd=force_login&lang=" . $ilias->account->getCurrentLanguage());
             $this->tpl->parseCurrentBlock();
         } else {
             if ($this->getMode() != self::MODE_TOPBAR_REDUCED) {
                 $notificationSettings = new ilSetting('notifications');
                 $chatSettings = new ilSetting('chatroom');
                 /**
                  * @var $tpl ilTemplate
                  */
                 global $tpl;
                 if ($chatSettings->get('chat_enabled') && $notificationSettings->get('enable_osd')) {
                     $this->tpl->touchBlock('osd_enabled');
                     $this->tpl->touchBlock('osd_container');
                     include_once "Services/jQuery/classes/class.iljQueryUtil.php";
                     iljQueryUtil::initjQuery();
                     include_once 'Services/MediaObjects/classes/class.ilPlayerUtil.php';
                     ilPlayerUtil::initMediaElementJs();
                     $tpl->addJavaScript('Services/Notifications/templates/default/notifications.js');
                     $tpl->addCSS('Services/Notifications/templates/default/osd.css');
                     require_once 'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
                     require_once 'Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php';
                     $notifications = ilNotificationOSDHandler::getNotificationsForUser($ilUser->getId());
                     $this->tpl->setVariable('NOTIFICATION_CLOSE_HTML', json_encode(ilGlyphGUI::get(ilGlyphGUI::CLOSE, $lng->txt('close'))));
                     $this->tpl->setVariable('INITIAL_NOTIFICATIONS', json_encode($notifications));
                     $this->tpl->setVariable('OSD_POLLING_INTERVALL', $notificationSettings->get('osd_polling_intervall') ? $notificationSettings->get('osd_polling_intervall') : '5');
                     $this->tpl->setVariable('OSD_PLAY_SOUND', $chatSettings->get('play_invitation_sound') && $ilUser->getPref('chat_play_invitation_sound') ? 'true' : 'false');
                     foreach ($notifications as $notification) {
                         if ($notification['type'] == 'osd_maint') {
                             continue;
                         }
                         $this->tpl->setCurrentBlock('osd_notification_item');
                         $this->tpl->setVariable('NOTIFICATION_ICON_PATH', $notification['data']->iconPath);
                         $this->tpl->setVariable('NOTIFICATION_TITLE', $notification['data']->title);
                         $this->tpl->setVariable('NOTIFICATION_LINK', $notification['data']->link);
                         $this->tpl->setVariable('NOTIFICATION_LINKTARGET', $notification['data']->linktarget);
                         $this->tpl->setVariable('NOTIFICATION_ID', $notification['notification_osd_id']);
                         $this->tpl->setVariable('NOTIFICATION_SHORT_DESCRIPTION', $notification['data']->shortDescription);
                         $this->tpl->parseCurrentBlock();
                     }
                 }
             }
             $this->tpl->setCurrentBlock("userisloggedin");
             $this->tpl->setVariable("TXT_LOGIN_AS", $lng->txt("login_as"));
             $user_img_src = $ilias->account->getPersonalPicturePath("small", true);
             $user_img_alt = $ilias->account->getFullname();
             $this->tpl->setVariable("USER_IMG", ilUtil::img($user_img_src, $user_img_alt));
             $this->tpl->setVariable("USR_LINK_PROFILE", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToProfile");
             $this->tpl->setVariable("USR_TXT_PROFILE", $lng->txt("personal_profile"));
             $this->tpl->setVariable("USR_LINK_SETTINGS", "ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSettings");
             $this->tpl->setVariable("USR_TXT_SETTINGS", $lng->txt("personal_settings"));
             $this->tpl->setVariable("TXT_LOGOUT2", $lng->txt("logout"));
             $this->tpl->setVariable("LINK_LOGOUT2", $link_dir . "logout.php?lang=" . $ilias->account->getCurrentLanguage());
             $this->tpl->setVariable("USERNAME", $ilias->account->getFullname());
             $this->tpl->setVariable("LOGIN", $ilias->account->getLogin());
             $this->tpl->setVariable("MATRICULATION", $ilias->account->getMatriculation());
             $this->tpl->setVariable("EMAIL", $ilias->account->getEmail());
             $this->tpl->parseCurrentBlock();
         }
     } else {
         // member view info
         $this->tpl->setVariable("TOPBAR_CLASS", " ilMemberViewMainHeader");
         $this->tpl->setVariable("MEMBER_VIEW_INFO", $lng->txt("mem_view_long"));
     }
     if (!$this->topbar_back_url) {
         include_once "./Modules/SystemFolder/classes/class.ilObjSystemFolder.php";
         $header_top_title = ilObjSystemFolder::_getHeaderTitle();
         if (trim($header_top_title) != "" && $this->tpl->blockExists("header_top_title")) {
             $this->tpl->setCurrentBlock("header_top_title");
             $this->tpl->setVariable("TXT_HEADER_TITLE", $header_top_title);
             $this->tpl->parseCurrentBlock();
         }
     } else {
         $this->tpl->setCurrentBlock("header_back_bl");
         $this->tpl->setVariable("URL_HEADER_BACK", $this->topbar_back_url);
         $this->tpl->setVariable("TXT_HEADER_BACK", $this->topbar_back_caption ? $this->topbar_back_caption : $lng->txt("back"));
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     if ($this->getMode() == self::MODE_FULL) {
         // $this->tpl->setVariable("TXT_LOGOUT", $lng->txt("logout"));
         $this->tpl->setVariable("HEADER_URL", $this->getHeaderURL());
         $this->tpl->setVariable("HEADER_ICON", ilUtil::getImagePath("HeaderIcon.svg"));
     }
     include_once "./Modules/SystemFolder/classes/class.ilObjSystemFolder.php";
     // set link to return to desktop, not depending on a specific position in the hierarchy
     //$this->tpl->setVariable("SCRIPT_START", $this->getScriptTarget("start.php"));
     /*
     else
     {
     	$this->tpl->setVariable("HEADER_URL", $this->getHeaderURL());
     	$this->tpl->setVariable("HEADER_ICON", ilUtil::getImagePath("HeaderIcon.svg"));
     }
     */
     $this->tpl->setVariable("TXT_MAIN_MENU", $lng->txt("main_menu"));
     $this->tpl->parseCurrentBlock();
 }
Ejemplo n.º 3
0
 /**
  * This method enriches the global template with some user interface elements (language selection, headlines, back buttons, ...) for public service views
  * @param mixed   $a_tmpl The template file as a string of as an array (index 0: template file, index 1: template directory)
  * @param bool    $a_show_back
  * @param bool    $a_show_logout
  */
 public static function initStartUpTemplate($a_tmpl, $a_show_back = false, $a_show_logout = false)
 {
     /**
      * @var $tpl       ilTemplate
      * @var $lng       ilLanguage
      * @var $ilCtrl    ilCtrl
      * @var $ilSetting ilSetting
      * @var $ilAccess  ilAccessHandler
      */
     global $tpl, $lng, $ilCtrl, $ilSetting, $ilAccess;
     // #13574 - basic.js is included with ilTemplate, so jQuery is needed, too
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQuery();
     // framework is needed for language selection
     include_once "./Services/UICore/classes/class.ilUIFramework.php";
     ilUIFramework::init();
     $tpl->addBlockfile('CONTENT', 'content', 'tpl.startup_screen.html', 'Services/Init');
     $tpl->setVariable('HEADER_ICON', ilUtil::getImagePath('HeaderIcon.svg'));
     if ($a_show_back) {
         // #13400
         $param = 'client_id=' . $_COOKIE['ilClientId'] . '&lang=' . $lng->getLangKey();
         $tpl->setCurrentBlock('link_item_bl');
         $tpl->setVariable('LINK_TXT', $lng->txt('login_to_ilias'));
         $tpl->setVariable('LINK_URL', 'login.php?cmd=force_login&' . $param);
         $tpl->parseCurrentBlock();
         if ($ilSetting->get('pub_section') && $ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID, 'read', '', ROOT_FOLDER_ID)) {
             $tpl->setVariable('LINK_URL', 'index.php?' . $param);
             $tpl->setVariable('LINK_TXT', $lng->txt('home'));
             $tpl->parseCurrentBlock();
         }
     } else {
         if ($a_show_logout) {
             $tpl->setCurrentBlock('link_item_bl');
             $tpl->setVariable('LINK_TXT', $lng->txt('logout'));
             $tpl->setVariable('LINK_URL', ILIAS_HTTP_PATH . '/logout.php');
             $tpl->parseCurrentBlock();
         }
     }
     if (is_array($a_tmpl)) {
         $template_file = $a_tmpl[0];
         $template_dir = $a_tmpl[1];
     } else {
         $template_file = $a_tmpl;
         $template_dir = 'Services/Init';
     }
     //Header Title
     include_once "./Modules/SystemFolder/classes/class.ilObjSystemFolder.php";
     $header_top_title = ilObjSystemFolder::_getHeaderTitle();
     if (trim($header_top_title) != "" && $tpl->blockExists("header_top_title")) {
         $tpl->setCurrentBlock("header_top_title");
         $tpl->setVariable("TXT_HEADER_TITLE", $header_top_title);
         $tpl->parseCurrentBlock();
     }
     // language selection
     $selection = self::getLanguageSelection();
     if ($selection) {
         $tpl->setCurrentBlock("lang_select");
         $tpl->setVariable("TXT_LANGSELECT", $lng->txt("language"));
         $tpl->setVariable("LANG_SELECT", $selection);
         $tpl->parseCurrentBlock();
     }
     $tpl->addBlockFile('STARTUP_CONTENT', 'startup_content', $template_file, $template_dir);
 }
Ejemplo n.º 4
0
 /**
  * Launch jnlp
  */
 protected function fileManagerLaunchObject()
 {
     global $ilUser;
     $tpl = new ilTemplate('tpl.fm_launch_ws.html', false, false, 'Services/WebServices/FileManager');
     $tpl->setVariable('JNLP_URL', ILIAS_HTTP_PATH . '/Services/WebServices/FileManager/lib/dist/FileManager.jnlp');
     $tpl->setVariable('SESSION_ID', $_COOKIE['PHPSESSID'] . '::' . CLIENT_ID);
     $tpl->setVariable('UID', $ilUser->getId());
     $tpl->setVariable('REF_ID', $this->object->getRefId());
     $tpl->setVariable('WSDL_URI', ILIAS_HTTP_PATH . '/webservice/soap/server.php?wsdl');
     $tpl->setVariable('LOCAL_FRAME', ilFMSettings::getInstance()->isLocalFSEnabled() ? 1 : 0);
     $tpl->setVariable('REST_URI', ILIAS_HTTP_PATH . '/Services/WebServices/Rest/server.php');
     $tpl->setVariable('FILE_LOCKS', 0);
     $tpl->setVariable('UPLOAD_FILESIZE', ilFMSettings::getInstance()->getMaxFileSize());
     include_once "./Modules/SystemFolder/classes/class.ilObjSystemFolder.php";
     $header_top_title = ilObjSystemFolder::_getHeaderTitle();
     $tpl->setVariable('HEADER_TITLE', $header_top_title ? $header_top_title : '');
     echo $tpl->get();
     exit;
 }
 function _getHeaderTitleDescription()
 {
     global $ilDB;
     $id = ilObjSystemFolder::_getId();
     $q = "SELECT title,description FROM object_translation " . "WHERE obj_id = " . $ilDB->quote($id, 'integer') . " " . "AND lang_default = 1";
     $r = $this->ilias->db->query($q);
     $row = $r->fetchRow(DB_FETCHMODE_OBJECT);
     $description = $row->description;
     $q = "SELECT title,description FROM object_translation " . "WHERE obj_id = " . $ilDB->quote($id, 'integer') . " " . "AND lang_code = " . $ilDB->quote($this->ilias->account->getPref("language"), 'text') . " " . "AND NOT lang_default = 1";
     $r = $this->ilias->db->query($q);
     $row = $r->fetchRow(DB_FETCHMODE_OBJECT);
     if ($row) {
         $description = ilUtil::shortenText($row->description, MAXLENGTH_OBJ_DESC, true);
     }
     return $description;
 }
 /**
  * displays ILIAS basic settings form
  *
  * @access	private
  */
 function displayBasicSettings()
 {
     global $rbacsystem, $ilCtrl, $ilClientIniFile;
     $this->tpl->addBlockFile("SYSTEMSETTINGS", "systemsettings", "tpl.adm_basicdata.html", "Modules/SystemFolder");
     $settings = $this->ilias->getAllSettings();
     // temp wiki stuff
     $this->tpl->setVariable("HREF_CREATE_WIKI_TABLE", $ilCtrl->getLinkTarget($this, "createWikiTables"));
     $this->tpl->setVariable("TXT_BASIC_DATA", $this->lng->txt("basic_data"));
     ////////////////////////////////////////////////////////////
     // setting language vars
     // basic data
     $this->tpl->setVariable("TXT_ILIAS_VERSION", $this->lng->txt("ilias_version"));
     $this->tpl->setVariable("TXT_DB_VERSION", $this->lng->txt("db_version"));
     $this->tpl->setVariable("TXT_CLIENT_ID", $this->lng->txt("client_id"));
     $this->tpl->setVariable("TXT_INST_ID", $this->lng->txt("inst_id"));
     $this->tpl->setVariable("TXT_ACTIVATE_HTTPS", $this->lng->txt('activate_https'));
     $this->tpl->setVariable("TXT_HOSTNAME", $this->lng->txt("host"));
     $this->tpl->setVariable("TXT_IP_ADDRESS", $this->lng->txt("ip_address"));
     $this->tpl->setVariable("TXT_SERVER_DATA", $this->lng->txt("server_data"));
     $this->tpl->setVariable("TXT_SERVER_PORT", $this->lng->txt("port"));
     $this->tpl->setVariable("TXT_SERVER_SOFTWARE", $this->lng->txt("server_software"));
     $this->tpl->setVariable("TXT_HTTP_PATH", $this->lng->txt("http_path"));
     $this->tpl->setVariable("TXT_ABSOLUTE_PATH", $this->lng->txt("absolute_path"));
     $this->tpl->setVariable("TXT_INST_NAME", $this->lng->txt("inst_name"));
     $this->tpl->setVariable("TXT_INST_INFO", $this->lng->txt("inst_info"));
     //$this->tpl->setVariable("TXT_OPEN_VIEWS_INSIDE_FRAMESET", $this->lng->txt("open_views_inside_frameset"));
     $this->tpl->setVariable("TXT_FEEDBACK_RECIPIENT", $this->lng->txt("feedback_recipient"));
     $this->tpl->setVariable("TXT_ERROR_RECIPIENT", $this->lng->txt("error_recipient"));
     $this->tpl->setVariable("TXT_HEADER_TITLE", $this->lng->txt("header_title"));
     $this->tpl->setVariable("TXT_SHORT_NAME", $this->lng->txt("short_inst_name"));
     $this->tpl->setVariable("TXT_SHORT_NAME_INFO", $this->lng->txt("short_inst_name_info"));
     $this->tpl->setVariable("VAL_SHORT_INST_NAME", $settings['short_inst_name']);
     $this->tpl->setVariable("TXT_CHANGE", $this->lng->txt("change"));
     $this->tpl->setVariable("LINK_HEADER_TITLE", $this->ctrl->getLinkTarget($this, "changeHeaderTitle"));
     $this->tpl->setVariable("VAL_HEADER_TITLE", ilObjSystemFolder::_getHeaderTitle());
     include_once "./Services/Database/classes/class.ilDBUpdate.php";
     $dbupdate = new ilDBUpdate($this->ilias->db, true);
     if (!$dbupdate->getDBVersionStatus()) {
         $this->tpl->setVariable("TXT_DB_UPDATE", "&nbsp;(<span class=\"warning\">" . $this->lng->txt("db_need_update") . "</span>)");
     }
     //$this->tpl->setVariable("TXT_MODULES", $this->lng->txt("modules"));
     $this->tpl->setVariable("TXT_PUB_SECTION", $this->lng->txt("pub_section"));
     $this->tpl->setVariable('TXT_SEARCH_ENGINE', $this->lng->txt('search_engine'));
     $this->tpl->setVariable('TXT_ENABLE_SEARCH_ENGINE', $this->lng->txt('enable_search_engine'));
     include_once 'Services/PrivacySecurity/classes/class.ilRobotSettings.php';
     $robot_settings = ilRobotSettings::_getInstance();
     $error_se = false;
     if (!$robot_settings->checkModRewrite()) {
         $error_se = true;
         $this->tpl->setVariable('OPEN_GOOGLE_CHECKED', 'disabled="disabled"');
         $this->tpl->setCurrentBlock('search_engine_alert');
         $this->tpl->setVariable('SE_ALERT_IMG', ilUtil::getImagePath('icon_alert_s.png'));
         $this->tpl->setVariable('SE_ALT_ALERT', $this->lng->txt('alert'));
         $this->tpl->setVariable('TXT_SE_ALERT', $this->lng->txt('mod_rewrite_disabled'));
         $this->tpl->parseCurrentBlock();
     } elseif (!$robot_settings->checkRewrite()) {
         $error_se = true;
         $this->tpl->setVariable('OPEN_GOOGLE_CHECKED', 'disabled="disabled"');
         $this->tpl->setCurrentBlock('search_engine_alert');
         $this->tpl->setVariable('SE_ALERT_IMG', ilUtil::getImagePath('icon_alert_s.png'));
         $this->tpl->setVariable('SE_ALT_ALERT', $this->lng->txt('alert'));
         $this->tpl->setVariable('TXT_SE_ALERT', $this->lng->txt('allow_override_alert'));
         $this->tpl->parseCurrentBlock();
     }
     if ($settings['open_google'] and !$error_se) {
         $this->tpl->setVariable('OPEN_GOOGLE_CHECKED', 'checked="checked"');
     }
     $this->tpl->setVariable("TXT_DEFAULT_REPOSITORY_VIEW", $this->lng->txt("def_repository_view"));
     $this->tpl->setVariable("TXT_FLAT", $this->lng->txt("flatview"));
     $this->tpl->setVariable("TXT_TREE", $this->lng->txt("treeview"));
     $this->tpl->setVariable("TXT_ENABLE_PASSWORD_ASSISTANCE", $this->lng->txt("enable_password_assistance"));
     $this->tpl->setVariable("TXT_PASSWORD_AUTO_GENERATE_INFO", $this->lng->txt('passwd_generation_info'));
     //rku:	password assistent should be availabe always, even in mixed mode.
     /*	if (AUTH_DEFAULT != AUTH_LOCAL)
     		{
     			$this->tpl->setVariable("DISABLE_PASSWORD_ASSISTANCE", 'disabled=\"disabled\"');
     			$this->tpl->setVariable("TXT_PASSWORD_ASSISTANCE_DISABLED", $this->lng->txt("password_assistance_disabled"));
     		}*/
     $this->tpl->setVariable("TXT_PASSWORD_ASSISTANCE_INFO", $this->lng->txt("password_assistance_info"));
     $this->tpl->setVariable("TXT_ENABLE_PASSWORD_GENERATION", $this->lng->txt('passwd_generation'));
     // File Suffix Replacements
     $this->tpl->setVariable("TXT_FILE_SUFFIX_REPL", $this->lng->txt("file_suffix_repl"));
     $this->tpl->setVariable("INFO_FILE_SUFFIX_REPL", $this->lng->txt("file_suffix_repl_info") . " " . SUFFIX_REPL_DEFAULT);
     $this->tpl->setVariable("TXT_DYNAMIC_LINKS", $this->lng->txt('links_dynamic'));
     $this->tpl->setVariable("INFO_DYNAMIC_LINKS", $this->lng->txt('links_dynamic_info'));
     $this->tpl->setVariable("TXT_ENABLE_TRASH", $this->lng->txt('enable_trash'));
     $this->tpl->setVariable("INFO_ENABLE_TRASH", $this->lng->txt('enable_trash_info'));
     $this->tpl->setVariable('TXT_SESSION_REMINDER', $this->lng->txt('session_reminder'));
     $this->tpl->setVariable('INFO_SESSION_REMINDER', $this->lng->txt('session_reminder_info'));
     $expires = ilSession::getSessionExpireValue();
     $time = ilFormat::_secondsToString($expires, true);
     $this->tpl->setVariable('SESSION_REMINDER_SESSION_DURATION', sprintf($this->lng->txt('session_reminder_session_duration'), $time));
     // paths
     $this->tpl->setVariable("TXT_SOFTWARE", $this->lng->txt("3rd_party_software"));
     $this->tpl->setVariable("TXT_CONVERT_PATH", $this->lng->txt("path_to_convert"));
     $this->tpl->setVariable("TXT_ZIP_PATH", $this->lng->txt("path_to_zip"));
     $this->tpl->setVariable("TXT_UNZIP_PATH", $this->lng->txt("path_to_unzip"));
     $this->tpl->setVariable("TXT_JAVA_PATH", $this->lng->txt("path_to_java"));
     $this->tpl->setVariable("TXT_HTMLDOC_PATH", $this->lng->txt("path_to_htmldoc"));
     $this->tpl->setVariable("TXT_MKISOFS_PATH", $this->lng->txt("path_to_mkisofs"));
     $this->tpl->setVariable("TXT_LATEX_URL", $this->lng->txt("url_to_latex"));
     // Cron
     $this->tpl->setVariable("TXT_CRON", $this->lng->txt('cron_jobs'));
     $this->tpl->setVariable("TXT_CRON_DESC", $this->lng->txt('cron_jobs_desc'));
     $this->tpl->setVariable("TXT_CRON_USER_ACCOUNTS", $this->lng->txt('check_user_accounts'));
     $this->tpl->setVariable("CRON_USER_ACCOUNTS_DESC", $this->lng->txt('check_user_accounts_desc'));
     $this->tpl->setVariable("TXT_CRON_LINK_CHECK", $this->lng->txt('check_link'));
     $this->tpl->setVariable("CRON_LINK_CHECK_DESC", $this->lng->txt('check_link_desc'));
     $this->tpl->setVariable("TXT_CRON_WEB_RESOURCE_CHECK", $this->lng->txt('check_web_resources'));
     $this->tpl->setVariable("CRON_WEB_RESOURCE_CHECK_DESC", $this->lng->txt('check_web_resources_desc'));
     $this->tpl->setVariable("TXT_CRON_LUCENE_INDEX", $this->lng->txt('cron_lucene_index'));
     $this->tpl->setVariable("TXT_CRON_LUCENE_INDEX_INFO", $this->lng->txt('cron_lucene_index_info'));
     $this->tpl->setVariable("TXT_CRON_FORUM_NOTIFICATION", $this->lng->txt('cron_forum_notification'));
     $this->tpl->setVariable("TXT_CRON_FORUM_NOTIFICATION_NEVER", $this->lng->txt('cron_forum_notification_never'));
     $this->tpl->setVariable("TXT_CRON_FORUM_NOTIFICATION_DIRECTLY", $this->lng->txt('cron_forum_notification_directly'));
     $this->tpl->setVariable("TXT_CRON_FORUM_NOTIFICATION_CRON", $this->lng->txt('cron_forum_notification_cron'));
     $this->tpl->setVariable("CRON_FORUM_NOTIFICATION_DESC", $this->lng->txt('cron_forum_notification_desc'));
     $this->tpl->setVariable("TXT_CRON_MAIL_NOTIFICATION", $this->lng->txt('cron_mail_notification'));
     $this->tpl->setVariable("TXT_CRON_MAIL_NOTIFICATION_NEVER", $this->lng->txt('cron_mail_notification_never'));
     $this->tpl->setVariable("TXT_CRON_MAIL_NOTIFICATION_CRON", $this->lng->txt('cron_mail_notification_cron'));
     $this->tpl->setVariable("CRON_MAIL_NOTIFICATION_DESC", $this->lng->txt('cron_mail_notification_desc'));
     $this->tpl->setVariable("TXT_CRON_MAIL_MESSAGE_CHECK", $this->lng->txt('cron_mail_notification_message'));
     $this->tpl->setVariable("CRON_MAIL_MESSAGE_CHECK", $this->lng->txt('cron_mail_notification_message_enabled'));
     $this->tpl->setVariable("CRON_MAIL_MESSAGE_CHECK_DESC", $this->lng->txt('cron_mail_notification_message_desc'));
     $this->tpl->setVariable("TXT_NEVER", $this->lng->txt('never'));
     $this->tpl->setVariable("TXT_DAILY", $this->lng->txt('daily'));
     $this->tpl->setVariable("TXT_WEEKLY", $this->lng->txt('weekly'));
     $this->tpl->setVariable("TXT_MONTHLY", $this->lng->txt('monthly'));
     $this->tpl->setVariable("TXT_QUARTERLY", $this->lng->txt('quarterly'));
     $this->tpl->setVariable("TXT_WEBSERVICES", $this->lng->txt('webservices'));
     $this->tpl->setVariable("TXT_SOAP_USER_ADMINISTRATION", $this->lng->txt('soap_user_administration'));
     $this->tpl->setVariable("TXT_SOAP_USER_ADMINISTRATION_DESC", $this->lng->txt('soap_user_administration_desc') . $this->lng->txt('soap_user_administration_desc_extended'));
     $this->tpl->setVariable("TXT_JAVA_SERVER", $this->lng->txt('java_server'));
     $this->tpl->setVariable("TXT_JAVA_SERVER_HOST", $this->lng->txt('java_server_host'));
     $this->tpl->setVariable("TXT_JAVA_SERVER_PORT", $this->lng->txt('java_server_port'));
     $this->tpl->setVariable("TXT_JAVA_SERVER_INFO", $this->lng->txt('java_server_info'));
     $this->tpl->setVariable("TXT_JAVA_SERVER_README", $this->lng->txt('java_server_readme'));
     /*		$this->tpl->setVariable("TXT_DATA_PRIVACY",$this->lng->txt('data_privacy'));
     		$this->tpl->setVariable("TXT_ENABLE_FORA_STATISTICS",$this->lng->txt('enable_fora_statistics'));
     		$this->tpl->setVariable("TXT_ENABLE_FORA_STATISTICS_DESC",$this->lng->txt('enable_fora_statistics_desc')); */
     // forums
     $this->tpl->setVariable("TXT_FORUMS", $this->lng->txt('obj_frm'));
     $this->tpl->setVariable("TXT_STATUS_NEW", $this->lng->txt('frm_status_new'));
     $this->tpl->setVariable("TXT_STATUS_NEW_DESC", $this->lng->txt('frm_status_new_desc'));
     $this->tpl->setVariable("TXT_ONE_WEEK", "1 " . $this->lng->txt('week'));
     $this->tpl->setVariable("TXT_TWO_WEEKS", "2 " . $this->lng->txt('weeks'));
     $this->tpl->setVariable("TXT_FOUR_WEEKS", "4 " . $this->lng->txt('weeks'));
     $this->tpl->setVariable("TXT_EIGHT_WEEKS", "8 " . $this->lng->txt('weeks'));
     // contact
     $this->tpl->setVariable("TXT_CONTACT_DATA", $this->lng->txt("contact_data"));
     $this->tpl->setVariable("TXT_REQUIRED_FIELDS", $this->lng->txt("required_field"));
     $this->tpl->setVariable("TXT_ADMIN", $this->lng->txt("administrator"));
     $this->tpl->setVariable("TXT_FIRSTNAME", $this->lng->txt("firstname"));
     $this->tpl->setVariable("TXT_LASTNAME", $this->lng->txt("lastname"));
     $this->tpl->setVariable("TXT_TITLE", $this->lng->txt("title"));
     $this->tpl->setVariable("TXT_POSITION", $this->lng->txt("position"));
     $this->tpl->setVariable("TXT_INSTITUTION", $this->lng->txt("institution"));
     $this->tpl->setVariable("TXT_STREET", $this->lng->txt("street"));
     $this->tpl->setVariable("TXT_ZIPCODE", $this->lng->txt("zipcode"));
     $this->tpl->setVariable("TXT_CITY", $this->lng->txt("city"));
     $this->tpl->setVariable("TXT_COUNTRY", $this->lng->txt("country"));
     $this->tpl->setVariable("TXT_PHONE", $this->lng->txt("phone"));
     $this->tpl->setVariable("TXT_EMAIL", $this->lng->txt("email"));
     $this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
     ///////////////////////////////////////////////////////////
     // display formula data
     // basic data
     $this->tpl->setVariable("FORMACTION_BASICDATA", $this->ctrl->getFormAction($this));
     $this->tpl->setVariable("HTTP_PATH", ILIAS_HTTP_PATH);
     $this->tpl->setVariable("ABSOLUTE_PATH", ILIAS_ABSOLUTE_PATH);
     $this->tpl->setVariable("HOSTNAME", $_SERVER["SERVER_NAME"]);
     $this->tpl->setVariable("SERVER_PORT", $_SERVER["SERVER_PORT"]);
     $this->tpl->setVariable("SERVER_ADMIN", $_SERVER["SERVER_ADMIN"]);
     // not used
     $this->tpl->setVariable("SERVER_SOFTWARE", $_SERVER["SERVER_SOFTWARE"]);
     $this->tpl->setVariable("IP_ADDRESS", $_SERVER["SERVER_ADDR"]);
     $this->tpl->setVariable("DB_VERSION", $settings["db_version"]);
     $this->tpl->setVariable("ILIAS_VERSION", $settings["ilias_version"]);
     $this->tpl->setVariable("INST_ID", $settings["inst_id"]);
     $this->tpl->setVariable("CLIENT_ID", CLIENT_ID);
     $this->tpl->setVariable("INST_NAME", $this->ilias->ini->readVariable("client", "name"));
     $this->tpl->setVariable("INST_INFO", $this->ilias->ini->readVariable("client", "description"));
     $this->tpl->setVariable("FEEDBACK_RECIPIENT", $settings["feedback_recipient"]);
     $this->tpl->setVariable("ERROR_RECIPIENT", $settings["error_recipient"]);
     $this->tpl->setVariable("PHP_INFO_LINK", $this->ctrl->getLinkTarget($this, "showPHPInfo"));
     // get all templates
     if ($settings["pub_section"]) {
         $this->tpl->setVariable("PUB_SECTION", "checked=\"checked\"");
     }
     if ($settings["default_repository_view"] == "tree") {
         $this->tpl->setVariable("TREESELECTED", "selected=\"1\"");
     } else {
         $this->tpl->setVariable("FLATSELECTED", "selected=\"1\"");
     }
     if ($settings['password_assistance']) {
         $this->tpl->setVariable("PASSWORD_ASSISTANCE", "checked=\"checked\"");
     }
     $this->tpl->setVariable("VAL_SHORT_NAME", $settings['short_inst_title']);
     if ($settings['passwd_auto_generate']) {
         $this->tpl->setVariable("PASSWORD_AUTO_GENERATE", "checked=\"checked\"");
     }
     $this->tpl->setVariable("SUFFIX_REPL_ADDITIONAL", ilUtil::prepareFormOutput($settings['suffix_repl_additional']));
     if ($settings['links_dynamic']) {
         $this->tpl->setVariable("LINKS_DYNAMIC_CHECKED", "checked=\"checked\"");
     }
     if ($settings['enable_trash']) {
         $this->tpl->setVariable("ENABLE_TRASH_CHECKED", "checked=\"checked\"");
     }
     if ($settings['session_reminder_enabled']) {
         $this->tpl->setVariable('SESSION_REMINDER_ENABLED', 'checked=checked');
     }
     if ($settings["require_login"]) {
         $this->tpl->setVariable("REQUIRE_LOGIN", "checked=\"checked\"");
     }
     if ($settings["require_passwd"]) {
         $this->tpl->setVariable("REQUIRE_PASSWD", "checked=\"checked\"");
     }
     if ($settings["require_passwd2"]) {
         $this->tpl->setVariable("REQUIRE_PASSWD2", "checked=\"checked\"");
     }
     if ($settings["require_firstname"]) {
         $this->tpl->setVariable("REQUIRE_FIRSTNAME", "checked=\"checked\"");
     }
     if ($settings["require_gender"]) {
         $this->tpl->setVariable("REQUIRE_GENDER", "checked=\"checked\"");
     }
     if ($settings["require_lastname"]) {
         $this->tpl->setVariable("REQUIRE_LASTNAME", "checked=\"checked\"");
     }
     if ($settings["require_institution"]) {
         $this->tpl->setVariable("REQUIRE_INSTITUTION", "checked=\"checked\"");
     }
     if ($settings["require_department"]) {
         $this->tpl->setVariable("REQUIRE_DEPARTMENT", "checked=\"checked\"");
     }
     if ($settings["require_street"]) {
         $this->tpl->setVariable("REQUIRE_STREET", "checked=\"checked\"");
     }
     if ($settings["require_city"]) {
         $this->tpl->setVariable("REQUIRE_CITY", "checked=\"checked\"");
     }
     if ($settings["require_zipcode"]) {
         $this->tpl->setVariable("REQUIRE_ZIPCODE", "checked=\"checked\"");
     }
     if ($settings["require_country"]) {
         $this->tpl->setVariable("REQUIRE_COUNTRY", "checked=\"checked\"");
     }
     if ($settings["require_phone_office"]) {
         $this->tpl->setVariable("REQUIRE_PHONE_OFFICE", "checked=\"checked\"");
     }
     if ($settings["require_phone_home"]) {
         $this->tpl->setVariable("REQUIRE_PHONE_HOME", "checked=\"checked\"");
     }
     if ($settings["require_phone_mobile"]) {
         $this->tpl->setVariable("REQUIRE_PHONE_MOBILE", "checked=\"checked\"");
     }
     if ($settings["require_fax"]) {
         $this->tpl->setVariable("REQUIRE_FAX", "checked=\"checked\"");
     }
     if ($settings["require_email"]) {
         $this->tpl->setVariable("REQUIRE_EMAIL", "checked=\"checked\"");
     }
     if ($settings["require_hobby"]) {
         $this->tpl->setVariable("REQUIRE_HOBBY", "checked=\"checked\"");
     }
     if ($settings["require_default_role"]) {
         $this->tpl->setVariable("REQUIRE_DEFAULT_ROLE", "checked=\"checked\"");
     }
     if ($settings["require_referral_comment"]) {
         $this->tpl->setVariable("REQUIRE_REFERRAL_COMMENT", "checked=\"checked\"");
     }
     if ($settings["require_matriculation"]) {
         $this->tpl->setVariable("REQUIRE_MATRICULATION", "checked=\"checked\"");
     }
     if ($settings["cron_user_check"]) {
         $this->tpl->setVariable("CRON_USER_CHECK", "checked=\"checked\"");
     }
     if ($settings["cron_link_check"]) {
         $this->tpl->setVariable("CRON_LINK_CHECK", "checked=\"checked\"");
     }
     if ($settings["cron_lucene_index"]) {
         $this->tpl->setVariable("CRON_LUCENE_INDEX", "checked=\"checked\"");
     }
     if ($settings["forum_notification"] == 0) {
         $this->tpl->setVariable("CRON_FORUM_NOTIFICATION_NEVER_SELECTED", " selected");
     } else {
         if ($settings["forum_notification"] == 1) {
             $this->tpl->setVariable("CRON_FORUM_NOTIFICATION_DIRECTLY_SELECTED", " selected");
         } else {
             if ($settings["forum_notification"] == 2) {
                 $this->tpl->setVariable("CRON_FORUM_NOTIFICATION_CRON_SELECTED", " selected");
             }
         }
     }
     if ($settings["mail_notification"] == 0) {
         $this->tpl->setVariable("CRON_MAIL_NOTIFICATION_NEVER_SELECTED", " selected=\"selected\"");
     } else {
         if ($settings["mail_notification"] == 1) {
             $this->tpl->setVariable("CRON_MAIL_NOTIFICATION_CRON_SELECTED", " selected=\"selected\"");
             if ($settings["mail_notification_message"] == 1) {
                 $this->tpl->setVariable("CRON_MAIL_MESSAGE_CHECK", "checked=\"checked\"");
             } else {
                 $this->tpl->setVariable("CRON_MAIL_MESSAGE_CHECK_DISABLED", "DISABLED");
             }
         }
     }
     if ($val = $settings["cron_web_resource_check"]) {
         switch ($val) {
             case 1:
                 $this->tpl->setVariable("D_SELECT", 'selected="selected"');
                 break;
             case 2:
                 $this->tpl->setVariable("W_SELECT", 'selected="selected"');
                 break;
             case 3:
                 $this->tpl->setVariable("M_SELECT", 'selected="selected"');
                 break;
             case 4:
                 $this->tpl->setVariable("Q_SELECT", 'selected="selected"');
                 break;
         }
     }
     switch ($settings['frm_store_new']) {
         case 1:
             $this->tpl->setVariable("ONE_SELECT", 'selected="selected"');
             break;
         case 2:
             $this->tpl->setVariable("TWO_SELECT", 'selected="selected"');
             break;
         case 4:
             $this->tpl->setVariable("FOUR_SELECT", 'selected="selected"');
             break;
         case 8:
         default:
             $this->tpl->setVariable("EIGHT_SELECT", 'selected="selected"');
             break;
     }
     if ($settings["soap_user_administration"]) {
         $this->tpl->setVariable("SOAP_USER_ADMINISTRATION_CHECK", "checked=\"checked\"");
     }
     $this->tpl->setVariable("JAVA_SERVER_HOST", $settings["rpc_server_host"]);
     $this->tpl->setVariable("JAVA_SERVER_PORT", $settings["rpc_server_port"]);
     /*  if ($settings["enable_fora_statistics"])
         {
             $this->tpl->setVariable("ENABLE_FORA_STATISTICS_CHECK","checked=\"checked\"");
         }*/
     // paths to tools
     $not_set = $this->lng->txt("path_not_set");
     $this->tpl->setVariable("CONVERT_PATH", PATH_TO_CONVERT ? PATH_TO_CONVERT : $not_set);
     $this->tpl->setVariable("ZIP_PATH", PATH_TO_ZIP ? PATH_TO_ZIP : $not_set);
     $this->tpl->setVariable("UNZIP_PATH", PATH_TO_UNZIP ? PATH_TO_UNZIP : $not_set);
     $this->tpl->setVariable("JAVA_PATH", PATH_TO_JAVA ? PATH_TO_JAVA : $not_set);
     $this->tpl->setVariable("HTMLDOC_PATH", PATH_TO_HTMLDOC ? PATH_TO_HTMLDOC : $not_set);
     $this->tpl->setVariable("MKISOFS_PATH", PATH_TO_MKISOFS ? PATH_TO_MKISOFS : $not_set);
     $this->tpl->setVariable("LATEX_URL", URL_TO_LATEX ? URL_TO_LATEX : $not_set);
     // contact
     $this->tpl->setVariable("ADMIN_FIRSTNAME", $settings["admin_firstname"]);
     $this->tpl->setVariable("ADMIN_LASTNAME", $settings["admin_lastname"]);
     $this->tpl->setVariable("ADMIN_TITLE", $settings["admin_title"]);
     $this->tpl->setVariable("ADMIN_POSITION", $settings["admin_position"]);
     $this->tpl->setVariable("ADMIN_INSTITUTION", $settings["admin_institution"]);
     $this->tpl->setVariable("ADMIN_STREET", $settings["admin_street"]);
     $this->tpl->setVariable("ADMIN_ZIPCODE", $settings["admin_zipcode"]);
     $this->tpl->setVariable("ADMIN_CITY", $settings["admin_city"]);
     $this->tpl->setVariable("ADMIN_COUNTRY", $settings["admin_country"]);
     $this->tpl->setVariable("ADMIN_PHONE", $settings["admin_phone"]);
     $this->tpl->setVariable("ADMIN_EMAIL", $settings["admin_email"]);
     $this->tpl->parseCurrentBlock();
 }
 /**
  * fill an ILIAS field
  * @param $a_field
  * @return unknown_type
  */
 private function fillIliasField($a_field)
 {
     global $ilias, $ilUser, $ilSetting, $ilAccess, $ilClientIniFile;
     switch ($a_field['field_name']) {
         // object information
         case "ILIAS_REF_ID":
             $value = $this->getRefId();
             break;
         case "ILIAS_TITLE":
             $value = $this->getTitle();
             break;
         case "ILIAS_DESCRIPTION":
             $value = $this->getDescription();
             break;
         case "ILIAS_INSTRUCTIONS":
             $value = $this->getInstructions();
             break;
             // object context
         // object context
         case "ILIAS_CONTEXT_ID":
             $context = $this->getContext();
             $value = $context['id'];
             break;
         case "ILIAS_CONTEXT_TYPE":
             $context = $this->getContext();
             $value = $context['type'];
             break;
         case "ILIAS_CONTEXT_TITLE":
             $context = $this->getContext();
             $value = $context['title'];
             break;
             // call-time imformation
         // call-time imformation
         case "ID":
             $value = $this->selectID();
             break;
         case "ILIAS_REMOTE_ADDR":
             $value = $_SERVER["REMOTE_ADDR"];
             break;
         case "ILIAS_TIME":
             $value = date('Y-m-d H:i:s', time());
             break;
         case "ILIAS_TIMESTAMP":
             $value = time();
             break;
         case "ILIAS_SESSION_ID":
             $value = session_id();
             break;
         case "ILIAS_TOKEN":
             $value = $this->fillToken($a_field);
             break;
         case "ILIAS_RESULT_ID":
             if ($this->getLPMode() == self::LP_ACTIVE) {
                 $this->plugin->includeClass('class.ilExternalContentResult.php');
                 $result = ilExternalContentResult::getByKeys($this->getId(), $ilUser->getId(), true);
                 $value = $result->id;
             } else {
                 $value = "";
             }
             break;
             // service urls
         // service urls
         case "ILIAS_CALLBACK_URL":
             $value = ILIAS_HTTP_PATH . "/Customizing/global/plugins/Services/Repository/RepositoryObject/ExternalContent/callback.php";
             break;
         case "ILIAS_EVENT_LOG_URL":
             $value = ILIAS_HTTP_PATH . "/Customizing/global/plugins/Services/Repository/RepositoryObject/ExternalContent/event_log.php";
             break;
         case "ILIAS_RETURN_URL":
             $value = $this->getReturnUrl();
             break;
         case "ILIAS_RESULT_URL":
             if ($this->getLPMode() == self::LP_ACTIVE) {
                 $value = ILIAS_HTTP_PATH . "/Customizing/global/plugins/Services/Repository/RepositoryObject/ExternalContent/result.php" . '?client_id=' . CLIENT_ID;
             } else {
                 $value = '';
             }
             break;
             // user information
         // user information
         case "ILIAS_USER_ID":
             $value = $ilUser->getId();
             break;
         case "ILIAS_USER_CODE":
             $value = sha1($ilUser->getId() . $ilUser->getCreateDate());
             break;
         case "ILIAS_USER_LOGIN":
             $value = $ilUser->getLogin();
             break;
         case "ILIAS_USER_FIRSTNAME":
             $value = $ilUser->getFirstname();
             break;
         case "ILIAS_USER_LASTNAME":
             $value = $ilUser->getLastname();
             break;
         case "ILIAS_USER_FULLNAME":
             $value = $ilUser->getFullname();
             break;
         case "ILIAS_USER_EMAIL":
             $value = $ilUser->getEmail();
             break;
         case "ILIAS_USER_IMAGE":
             $value = ILIAS_HTTP_PATH . "/" . $ilUser->getPersonalPicturePath("small");
             break;
         case "ILIAS_USER_LANG":
             $value = $this->lng->getLangKey();
             break;
         case "ILIAS_USER_WRITE_ACCESS":
             $value = $ilAccess->checkAccess('write', '', $this->getRefId()) ? "1" : "0";
             break;
             // platform information
         // platform information
         case "ILIAS_VERSION":
             $value = $ilias->getSetting("ilias_version");
             break;
         case "ILIAS_CONTACT_EMAIL":
             $value = $ilSetting->get("admin_email");
             break;
         case "ILIAS_CLIENT_ID":
             $value = CLIENT_ID;
             break;
         case "ILIAS_HTTP_PATH":
             $value = ILIAS_HTTP_PATH;
             break;
         case "ILIAS_LMS_URL":
             require_once './Services/Link/classes/class.ilLink.php';
             $value = ilLink::_getLink(ROOT_FOLDER_ID, "root");
             break;
         case "ILIAS_LMS_GUID":
             $parsed = parse_url(ILIAS_HTTP_PATH);
             $value = CLIENT_ID . "." . implode(".", array_reverse(explode("/", $parsed["path"]))) . $parsed["host"];
             break;
         case "ILIAS_LMS_NAME":
             if (!($value = $ilSetting->get("short_inst_name"))) {
                 $value = $ilClientIniFile->readVariable('client', 'name');
             }
             break;
         case "ILIAS_LMS_DESCRIPTION":
             require_once "Modules/SystemFolder/classes/class.ilObjSystemFolder.php";
             if (!($value = ilObjSystemFolder::_getHeaderTitle())) {
                 $value = $ilClientIniFile->readVariable('client', 'description');
             }
             break;
         default:
             $value = "";
             break;
     }
     return $value;
 }