Public Member Functions | |
ilObjLdapGUI ($a_data, $a_id, $a_call_by_reference) | |
Constructor public. | |
viewObject () | |
list childs of current object |
Definition at line 38 of file class.ilObjLdapGUI.php.
ilObjLdapGUI::ilObjLdapGUI | ( | $ | a_data, | |
$ | a_id, | |||
$ | a_call_by_reference | |||
) |
Constructor public.
Definition at line 44 of file class.ilObjLdapGUI.php.
References ilObjectGUI::ilObjectGUI().
{ $this->type = "ldap"; $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference); }
ilObjLdapGUI::viewObject | ( | ) |
list childs of current object
public
Reimplemented from ilObjectGUI.
Definition at line 50 of file class.ilObjLdapGUI.php.
References $_POST, $settings, and sendInfo().
{ $this->lng->loadLanguageModule("ldap"); $this->tpl->addBlockFile("SYSTEMSETTINGS", "systemsettings", "tpl.ldap_basicdata.html"); $this->tpl->setCurrentBlock("systemsettings"); $settings = $this->ilias->getAllSettings(); if (isset($_POST["save_settings"])) // formular sent { //init checking var $form_valid = true; // do checks here!!!! if (!$form_valid) //required fields not satisfied. Set formular to already fill in values { // ldap $settings["ldap_enable"] = $_POST["ldap_enable"]; $settings["ldap_server"] = $_POST["ldap_server"]; $settings["ldap_port"] = $_POST["ldap_port"]; $settings["ldap_basedn"] = $_POST["ldap_basedn"]; } else // all required fields ok { // write new settings // ldap $this->ilias->setSetting("ldap_enable",$_POST["ldap_enable"]); $this->ilias->setSetting("ldap_server",$_POST["ldap_server"]); $this->ilias->setSetting("ldap_port",$_POST["ldap_port"]); $this->ilias->setSetting("ldap_basedn",$_POST["ldap_basedn"]); $settings = $this->ilias->getAllSettings(); // feedback sendInfo($this->lng->txt("saved_successfully")); } } // setting language vars // ldap $this->tpl->setVariable("TXT_LDAP", $this->lng->txt("ldap")); $this->tpl->setVariable("TXT_LDAP_ENABLE", $this->lng->txt("enable")); $this->tpl->setVariable("TXT_LDAP_SERVER", $this->lng->txt("server")); $this->tpl->setVariable("TXT_LDAP_PORT", $this->lng->txt("port")); $this->tpl->setVariable("TXT_LDAP_BASEDN", $this->lng->txt("basedn")); $this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save")); // display formula data // ldap if ($settings["ldap_enable"]) { $this->tpl->setVariable("LDAP_ENABLE","checked=\"checked\""); } $this->tpl->setVariable("LDAP_SERVER",$settings["ldap_server"]); $this->tpl->setVariable("LDAP_PORT",$settings["ldap_port"]); $this->tpl->setVariable("LDAP_BASEDN",$settings["ldap_basedn"]); $this->tpl->parseCurrentBlock(); }