ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilSetupGUI Class Reference

Setup GUI class. More...

+ Collaboration diagram for ilSetupGUI:

Public Member Functions

 ilSetupGUI ()
 Constructor. More...
 
 cmdInstall ()
 process valid commands for pre-installation status More...
 
 cmdAdmin ()
 process valid commands for admins More...
 
 cmdClient ()
 process valid commands for all clients More...
 
 setDisplayMode ($a_mode)
 set display mode to 'view' or 'setup' 'setup' -> show status panel and (prev/next) navigation buttons 'view' -> show overall status and tabs under title bar More...
 
 displayHeader ()
 display header with admin links and language flags More...
 
 displayFooter ()
 page output and set title More...
 
 displayNavButtons ()
 display navigation buttons More...
 
 SetButtonPrev ($a_cmd=0, $a_lng=0)
 set previous navigation button More...
 
 SetButtonNext ($a_cmd, $a_lng=0)
 set next navigation button More...
 
 displayClientOverview ()
 display client overview panel More...
 
 initClientOverviewForm ()
 Init client overview form. More...
 
 displayPreliminaries ()
 display preliminaries page More...
 
 displayMasterSetup ($a_omit_init=false)
 display master setup form & process form input More...
 
 changeMasterSettings ($a_omit_init=false)
 display master settings and process form input More...
 
 initBasicSettingsForm ($a_install=false)
 Init basic settings form. More...
 
 getBasicSettingsValues ()
 Get current values for basic settings from. More...
 
 saveBasicSettings ()
 Save basic settings form. More...
 
 updateBasicSettings ()
 Update basic settings form. More...
 
 loginClient ()
 login to a client More...
 
 displayLogin ($a_omit_minit=false, $a_omit_cinit=false)
 display login form and process form More...
 
 performMLogin ()
 Master Login. More...
 
 performLogin ()
 Login. More...
 
 initClientLoginForm ()
 Init client login form. More...
 
 initMasterLoginForm ()
 Init master login form. More...
 
 displayClientList ()
 display client list and process form input More...
 
 determineToolsPath ()
 Determine tools paths. More...
 
 determineToolsPathInstall ()
 Determine tools paths. More...
 
 determineTools ($a_tools="")
 Determine Tools. More...
 
 selectDBType ()
 Select database type. More...
 
 initDBSelectionForm ()
 Init db selection form. More...
 
 displayIni ($a_omit_form_init=false)
 display setup in step More...
 
 initClientIniForm ()
 Init client ini form. More...
 
 getClientIniValues ()
 Get current values for client ini from. More...
 
 saveClientIni ()
 Save client ini form. More...
 
 displayError ($a_message)
 display error page More...
 
 displayLogout ()
 display logout page More...
 
 displayProcessPanel ()
 display process panel More...
 
 displayStatusPanel ()
 display status panel More...
 
 checkDisplayMode ($a_title="")
 determine display mode and load according html layout More...
 
 displaySubTabs ()
 Show subtabs. More...
 
 checkPanelMode ()
 determine display mode and load correct panel More...
 
 displayStartup ()
 display intro page for the first client installation More...
 
 displayDatabase ()
 display database form and process form input More...
 
 displayDatabaseSlave ($a_from_save=false)
 Display database slave. More...
 
 initDbSlaveForm ()
 Init db slave form. More...
 
 saveDbSlave ()
 Save db slave form. More...
 
 setDbSubtabs ($a_subtab_id="db")
 Set db subtabs. More...
 
 initClientDbForm ($a_install=true, $dbupdate=null, $db_status=false, $hotfix_available=false, $custom_updates_available=false)
 Init client db form. More...
 
 getClientDbFormValues ($dbupdate=null)
 Get current values for client db from. More...
 
 installDatabase ()
 Install the database. More...
 
 updateDatabase ()
 Update database. More...
 
 showHotfixSteps ()
 Show hotfix steps. More...
 
 showUpdateSteps ($a_hotfix=false)
 Update database. More...
 
 applyHotfix ()
 Apply hotfixes. More...
 
 displaySessions ()
 display sessions form and process form input More...
 
 displayLanguages ()
 display language form and process form input More...
 
 saveLanguages ()
 Save languages. More...
 
 displayContactData ($a_omit_init=false)
 display contact data form and process form input More...
 
 initContactDataForm ()
 Init contact data form. More...
 
 getContactValues ()
 Get current values for contact from. More...
 
 saveContact ()
 Save contact form. More...
 
 displayNIC ($a_omit_init=false)
 display nic registration form and process form input More...
 
 initRegistrationForm ($a_mode="edit")
 Init registration form. More...
 
 getRegistrationValues ()
 Get current values for registration from. More...
 
 saveRegistration ()
 Save registration form. More...
 
 displayTools ()
 display tools More...
 
 initTreeImplementationForm ()
 
 switchTree ()
 
 initControlStructureForm ()
 Init the form to reload the control structure. More...
 
 reloadControlStructure ()
 reload control structure More...
 
 initSettingsTypeForm ()
 Init the form to change the settings value type. More...
 
 changeSettingsType ()
 change the type of the value field in settings table More...
 
 showLongerSettings ()
 show a list of setting values that are loger than 4000 characters More...
 
 changeMasterPassword ()
 display change password form and process form input More...
 
 displayFinishSetup ()
 display finish setup page More...
 
 displayDeleteConfirmation ()
 display delete client confirmation form and process form input More...
 
 changeAccessMode ($a_back)
 enable/disable access to a client More...
 
 changeDefaultClient ()
 set defualt client More...
 
 validateSetup ()
 validatesetup status again and set access mode of the first client to online More...
 
 jumpToFirstUnfinishedSetupStep ()
 if setting up a client was not finished, jump back to the first uncompleted setup step More...
 
 toggleClientList ()
 enable/disable client list on index page More...
 
 applyCustomUpdates ()
 
 cloneInitForm ()
 Initialize clone form. More...
 
 cloneSelectSource ()
 
 cloneSaveSource ()
 
 displayProxy ($a_omit_init=false)
 
 saveProxy ()
 Save proxy settings. More...
 

Data Fields

 $tpl
 
 $lng
 
 $log
 
 $btn_prev_on = false
 
 $btn_prev_cmd
 
 $btn_prev_lng
 
 $btn_next_on = false
 
 $btn_next_cmd
 
 $btn_next_lng
 
 $revision
 
 $version
 
 $lang
 
 $cmd
 
 $display_mode = "view"
 

Private Member Functions

 initProxyForm ()
 

Detailed Description

Setup GUI class.

class to setup ILIAS first and maintain the ini-settings and the database

Author
Sascha Hofmann shofm.nosp@m.ann@.nosp@m.datab.nosp@m.ay.d.nosp@m.e
Version
$Id$

Definition at line 14 of file class.ilSetupGUI.php.

Member Function Documentation

◆ applyCustomUpdates()

ilSetupGUI::applyCustomUpdates ( )

Definition at line 4037 of file class.ilSetupGUI.php.

4038 {
4040
4041 $ilCtrlStructureReader->setIniFile($this->setup->getClient()->ini);
4042
4043 include_once "./Services/Database/classes/class.ilDBUpdate.php";
4044 include_once "./Services/AccessControl/classes/class.ilRbacAdmin.php";
4045 include_once "./Services/AccessControl/classes/class.ilRbacReview.php";
4046 include_once "./Services/AccessControl/classes/class.ilRbacSystem.php";
4047 include_once "./Services/Tree/classes/class.ilTree.php";
4048 include_once "./Services/Xml/classes/class.ilSaxParser.php";
4049 include_once "./Services/Object/classes/class.ilObjectDefinition.php";
4050
4051 // referencing db handler in language class
4052 $ilDB = $this->setup->getClient()->db;
4053 $this->lng->setDbHandler($ilDB);
4054
4055 // run dbupdate
4056 $dbupdate = new ilDBUpdate($ilDB);
4057 $dbupdate->applyCustomUpdates();
4058
4059 if ($dbupdate->updateMsg == "no_changes")
4060 {
4061 $message = $this->lng->txt("no_changes").". ".$this->lng->txt("database_is_uptodate");
4062 }
4063 else
4064 {
4065 $sep = "";
4066 foreach ($dbupdate->updateMsg as $row)
4067 {
4068 if ($row["msg"] == "update_applied")
4069 {
4070 $a_message.= $sep.$row["nr"];
4071 $sep = ", ";
4072 }
4073 else
4074 {
4075 $e_message.= "<br/>".$this->lng->txt($row["msg"]).": ".$row["nr"];
4076 }
4077 }
4078 if ($a_message != "")
4079 {
4080 $a_message = $this->lng->txt("update_applied").": ".$a_message;
4081 }
4082 }
4083
4084 ilUtil::sendInfo($a_message.$e_message, true);
4085 ilUtil::redirect("setup.php?cmd=displayDatabase");
4086 }
Database Update class.
static redirect($a_script)
http redirect to other script
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$ilCtrlStructureReader
global $ilDB

References $ilCtrlStructureReader, $ilDB, $row, ilUtil\redirect(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ applyHotfix()

ilSetupGUI::applyHotfix ( )

Apply hotfixes.

Definition at line 2787 of file class.ilSetupGUI.php.

2788 {
2790
2791 $ilCtrlStructureReader->setIniFile($this->setup->getClient()->ini);
2792
2793 include_once "./Services/Database/classes/class.ilDBUpdate.php";
2794 include_once "./Services/AccessControl/classes/class.ilRbacAdmin.php";
2795 include_once "./Services/AccessControl/classes/class.ilRbacReview.php";
2796 include_once "./Services/AccessControl/classes/class.ilRbacSystem.php";
2797 include_once "./Services/Tree/classes/class.ilTree.php";
2798 include_once "./Services/Xml/classes/class.ilSaxParser.php";
2799 include_once "./Services/Object/classes/class.ilObjectDefinition.php";
2800
2801 // referencing db handler in language class
2802 $ilDB = $this->setup->getClient()->db;
2803 $this->lng->setDbHandler($ilDB);
2804
2805 // run dbupdate
2806 $dbupdate = new ilDBUpdate($ilDB);
2807 $dbupdate->applyHotfix();
2808
2809 if ($dbupdate->updateMsg == "no_changes")
2810 {
2811 $message = $this->lng->txt("no_changes").". ".$this->lng->txt("database_is_uptodate");
2812 }
2813 else
2814 {
2815 $sep = "";
2816 foreach ($dbupdate->updateMsg as $row)
2817 {
2818 if ($row["msg"] == "update_applied")
2819 {
2820 $a_message.= $sep.$row["nr"];
2821 $sep = ", ";
2822 }
2823 else
2824 {
2825 $e_message.= "<br/>".$this->lng->txt($row["msg"]).": ".$row["nr"];
2826 }
2827 }
2828 if ($a_message != "")
2829 {
2830 $a_message = $this->lng->txt("update_applied").": ".$a_message;
2831 }
2832 }
2833
2834 ilUtil::sendInfo($a_message.$e_message, true);
2835 ilUtil::redirect("setup.php?cmd=displayDatabase");
2836 }

References $ilCtrlStructureReader, $ilDB, $row, ilUtil\redirect(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ changeAccessMode()

ilSetupGUI::changeAccessMode (   $a_back)

enable/disable access to a client

Parameters
stringjump back to this script

Definition at line 3879 of file class.ilSetupGUI.php.

3880 {
3881 if ($this->setup->getClient()->status["finish"]["status"])
3882 {
3883 $val = ($this->setup->getClient()->ini->readVariable("client","access")) ? "0" : true;
3884 $this->setup->getClient()->ini->setVariable("client","access",$val);
3885 $this->setup->getClient()->ini->write();
3886 $message = "client_access_mode_changed";
3887 }
3888 else
3889 {
3890 $message = "client_setup_not_finished";
3891 }
3892
3893 ilUtil::sendInfo($this->lng->txt($message),true);
3894
3895 ilUtil::redirect("setup.php?cmd=".$a_back);
3896 }

References ilUtil\redirect(), and ilUtil\sendInfo().

Referenced by cmdClient().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ changeDefaultClient()

ilSetupGUI::changeDefaultClient ( )

set defualt client

Definition at line 3901 of file class.ilSetupGUI.php.

3902 {
3903 if ($_POST["form"])
3904 {
3905 $client = new ilClient($_POST["form"]["default"], $this->setup->db_connections);
3906
3907 if (!$client->init())
3908 {
3909 $this->setup->raiseError($this->lng->txt("no_valid_client_id"),$this->setup->error_obj->MESSAGE);
3910 }
3911
3912 $status = $this->setup->getStatus($client);
3913
3914 if ($status["finish"]["status"])
3915 {
3916 $this->setup->ini->setVariable("clients","default",$client->getId());
3917 $this->setup->ini->write();
3918 $message = "default_client_changed";
3919 }
3920 else
3921 {
3922 $message = "client_setup_not_finished";
3923 }
3924 }
3925
3926 ilUtil::sendInfo($this->lng->txt($message),true);
3927
3928 ilUtil::redirect("setup.php");
3929 }
Client Management.
$_POST['username']
Definition: cron.php:12

References $_POST, $client, ilUtil\redirect(), and ilUtil\sendInfo().

Referenced by cmdAdmin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ changeMasterPassword()

ilSetupGUI::changeMasterPassword ( )

display change password form and process form input

Definition at line 3714 of file class.ilSetupGUI.php.

3715 {
3716 $this->tpl->addBlockFile("CONTENT","content","tpl.std_layout.html", "setup");
3717
3718 $this->tpl->setVariable("TXT_INFO", $this->lng->txt("info_text_password"));
3719
3720 // formular sent
3721 if ($_POST["form"])
3722 {
3723 $pass_old = $this->setup->getPassword();
3724
3725 if (empty($_POST["form"]["pass_old"]))
3726 {
3727 $message = $this->lng->txt("password_enter_old");
3728 $this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);
3729 }
3730
3731 if (md5($_POST["form"]["pass_old"]) != $pass_old)
3732 {
3733 $message = $this->lng->txt("password_old_wrong");
3734 $this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);
3735 }
3736
3737 if (empty($_POST["form"]["pass"]))
3738 {
3739 $message = $this->lng->txt("password_empty");
3740 $this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);
3741 }
3742
3743 if ($_POST["form"]["pass"] != $_POST["form"]["pass2"])
3744 {
3745 $message = $this->lng->txt("password_not_match");
3746 $this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);
3747 }
3748
3749 if (md5($_POST["form"]["pass"]) == $pass_old)
3750 {
3751 $message = $this->lng->txt("password_same");
3752 $this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);
3753 }
3754
3755 if (!$this->setup->setPassword($_POST["form"]["pass"]))
3756 {
3757 $message = $this->lng->txt("save_error");
3758 $this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);
3759 }
3760
3761 ilUtil::sendInfo($this->lng->txt("password_changed"),true);
3762 ilUtil::redirect("setup.php");
3763 }
3764
3765 // output
3766 $this->tpl->addBlockFile("SETUP_CONTENT","setup_content","tpl.form_change_admin_password.html", "setup");
3767
3768 $this->tpl->setVariable("TXT_HEADER",$this->lng->txt("password_new_master"));
3769
3770 // pass form
3771 $this->tpl->setVariable("FORMACTION", "setup.php?cmd=gateway");
3772 $this->tpl->setVariable("TXT_REQUIRED_FIELDS", $this->lng->txt("required_field"));
3773 $this->tpl->setVariable("TXT_PASS_TITLE",$this->lng->txt("change_password"));
3774 $this->tpl->setVariable("TXT_PASS_OLD",$this->lng->txt("set_oldpasswd"));
3775 $this->tpl->setVariable("TXT_PASS",$this->lng->txt("set_newpasswd"));
3776 $this->tpl->setVariable("TXT_PASS2",$this->lng->txt("password_retype"));
3777 $this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
3778 }

References $_POST, ilUtil\redirect(), and ilUtil\sendInfo().

Referenced by cmdAdmin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ changeMasterSettings()

ilSetupGUI::changeMasterSettings (   $a_omit_init = false)

display master settings and process form input

Definition at line 967 of file class.ilSetupGUI.php.

968 {
969 $this->tpl->addBlockFile("CONTENT","content","tpl.std_layout.html", "setup");
970 $this->tpl->setVariable("TXT_HEADER", $this->lng->txt("basic_settings"));
971 $this->tpl->setVariable("TXT_INFO", $this->lng->txt("info_text_pathes"));
972
973 $this->btn_next_on = true;
974 $this->btn_next_lng = $this->lng->txt("create_new_client")."...";
975 $this->btn_next_cmd = "newclient";
976
977 if (!$a_omit_init)
978 {
979 $this->initBasicSettingsForm();
980 $this->getBasicSettingsValues();
981 }
982 $this->tpl->setVariable("SETUP_CONTENT", "<br>".$this->form->getHTML()."<br>");
983 }
getBasicSettingsValues()
Get current values for basic settings from.
initBasicSettingsForm($a_install=false)
Init basic settings form.

References getBasicSettingsValues(), and initBasicSettingsForm().

Referenced by cmdAdmin(), and updateBasicSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ changeSettingsType()

ilSetupGUI::changeSettingsType ( )

change the type of the value field in settings table

Definition at line 3668 of file class.ilSetupGUI.php.

3669 {
3670 include_once("./Services/Administration/classes/class.ilSetting.php");
3671 $old_type = ilSetting::_getValueType();
3672
3673 if ($old_type == "clob")
3674 {
3675 $longer_settings = ilSetting::_getLongerSettings();
3676 if (count($longer_settings))
3677 {
3678 $this->longer_settings = $longer_settings;
3679 ilUtil::sendFailure($this->lng->txt("settings_too_long"));
3680 }
3681 else
3682 {
3684 }
3685 }
3686 else
3687 {
3689 }
3690
3691 if ($changed)
3692 {
3693 ilUtil::sendInfo($this->lng->txt("settings_type_changed"));
3694 }
3695
3696 $this->displayTools();
3697 }
static _getLongerSettings($a_limit='4000')
get a list of setting records with values loger than a limit
static _getValueType()
get the type of the value column in the database
static _changeValueType($a_new_type='text')
change the type of the value column in the database
displayTools()
display tools
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

References $changed, ilSetting\_changeValueType(), ilSetting\_getLongerSettings(), ilSetting\_getValueType(), displayTools(), ilUtil\sendFailure(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ checkDisplayMode()

ilSetupGUI::checkDisplayMode (   $a_title = "")

determine display mode and load according html layout

Parameters
stringset title for display mode 'setup'

Definition at line 2028 of file class.ilSetupGUI.php.

2029 {
2030 switch ($this->display_mode)
2031 {
2032 case "view":
2033 $this->tpl->addBlockFile("CONTENT","content","tpl.clientview.html", "setup");
2034 // display tabs
2035 include "./setup/include/inc.client_tabs.php";
2036 $client_name = ($this->setup->getClient()->getName()) ? $this->setup->getClient()->getName() : $this->lng->txt("no_client_name");
2037 $this->tpl->setVariable("TXT_HEADER",$client_name." (".$this->lng->txt("client_id").": ".$this->setup->getClient()->getId().")");
2038 break;
2039
2040 case "setup":
2041 $this->tpl->addBlockFile("CONTENT","content","tpl.clientsetup.html", "setup");
2042 $this->tpl->setVariable("TXT_HEADER",$this->lng->txt($a_title));
2043 break;
2044
2045 default:
2046 $this->displayError($this->lng->txt("unknown_display_mode"));
2047 exit();
2048 break;
2049 }
2050 }
displayError($a_message)
display error page
exit
Definition: login.php:54

References displayError(), and exit.

Referenced by cloneInitForm(), displayClientOverview(), displayContactData(), displayDatabase(), displayDatabaseSlave(), displayDeleteConfirmation(), displayFinishSetup(), displayIni(), displayLanguages(), displayNIC(), displayProxy(), displaySessions(), displayTools(), selectDBType(), and showUpdateSteps().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkPanelMode()

ilSetupGUI::checkPanelMode ( )

determine display mode and load correct panel

Definition at line 2072 of file class.ilSetupGUI.php.

2073 {
2074 switch ($this->display_mode)
2075 {
2076 case "view":
2077 $this->displayStatusPanel();
2078 break;
2079
2080 case "setup":
2081 $this->displayProcessPanel();
2082 break;
2083 }
2084 }
displayProcessPanel()
display process panel
displayStatusPanel()
display status panel

References displayProcessPanel(), and displayStatusPanel().

Referenced by displayContactData(), displayDatabase(), displayDatabaseSlave(), displayDeleteConfirmation(), displayFinishSetup(), displayIni(), displayLanguages(), displayNIC(), displayProxy(), displaySessions(), and selectDBType().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneInitForm()

ilSetupGUI::cloneInitForm ( )

Initialize clone form.

Definition at line 4091 of file class.ilSetupGUI.php.

4092 {
4093 global $lng, $ilCtrl;
4094
4095 $this->checkDisplayMode();
4096
4097 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
4098 $this->form = new ilPropertyFormGUI();
4099
4100 $this->form->setId("clone_form");
4101 $this->form->setFormAction("setup.php?cmd=gateway");
4102
4103 if ($this->setup->getClient()->status["access"]["status"] === false and stripos($this->setup->getClient()->getName(),"master") === false and $this->setup->getClient()->getdbType() == "mysql" and $this->setup->getClient()->db_exists )
4104 {
4105 $this->form->setTitle($this->lng->txt("clone_source"));
4106 $clients = array();
4107 $clientlist = new ilClientList($this->setup->db_connections);
4108 $list = $clientlist->getClients();
4109 $clientlistarray = array();
4110
4111 foreach ($list as $key => $client){
4112 if ((strcmp($key, $this->setup->getClient()->getId()) != '0') && ($client->getDbType() == 'mysql')) { // You cannot clone yourself
4113 $clientlistarray[$client->id] = $client->id;
4114 }
4115 }
4116
4117 $si = new ilSelectInputGUI($lng->txt("clone_selectsource"), "source");
4118
4119 $si->setOptions(array_merge(
4120 array("" => "-- ".$lng->txt("please_select")." --"),
4121 $clientlistarray));
4122 $si->setRequired(true);
4123 $this->form->addItem($si);
4124
4125 $cb = new ilCheckboxInputGUI($lng->txt("clone_areyousure"), "iamsure");
4126 $cb->setRequired(true);
4127 $this->form->addItem($cb);
4128
4129 $this->form->addCommandButton("cloneSaveSource", $lng->txt("cloneit"));
4130 } else {
4131 $disabledmessage = "<h1>" . $this->lng->txt("clone_disabledmessage") ."</h1><br>";
4132 if (!$this->setup->getClient()->status["access"]["status"] === false) {
4133 $disabledmessage .= $this->lng->txt("clone_clientnotdisabled") . "<br>";
4134 }
4135 if (!stripos($this->setup->getClient()->getName(),"aster") === false) {
4136 $disabledmessage .= $this->lng->txt("clone_clientismaster") . "<br>";
4137 }
4138 if ($this->setup->getClient()->getdbType() != "mysql") {
4139 $disabledmessage .= $this->lng->txt("clone_clientisnotmysql") . "<br>";
4140 }
4141 if (!$this->setup->getClient()->db_exists) {
4142 $disabledmessage .= $this->lng->txt("clone_clientnodatabase") . "<br>";
4143 }
4144 $this->form->setTitle($disabledmessage);
4145 }
4146 }
This class represents a checkbox property in a property form.
client management
This class represents a property form user interface.
This class represents a selection list property in a property form.
checkDisplayMode($a_title="")
determine display mode and load according html layout
global $ilCtrl
Definition: ilias.php:18

References $client, $ilCtrl, $lng, $si, and checkDisplayMode().

Referenced by cloneSaveSource(), and cloneSelectSource().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneSaveSource()

ilSetupGUI::cloneSaveSource ( )

Definition at line 4161 of file class.ilSetupGUI.php.

4162 {
4163 global $lng, $ilCtrl;
4164
4165 if (!$this->setup->isAdmin())
4166 {
4167 return;
4168 }
4169
4170 $this->cloneInitForm();
4171
4172 if ($this->form->checkInput())
4173 {
4174 if ($this->form->getInput("iamsure") != "1")
4175 {
4176 $message = $this->lng->txt("clone_youmustcheckiamsure");
4177 $this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);
4178 }
4179 if (!$this->setup->cloneFromSource($this->form->getInput("source")))
4180 {
4181 $message = $this->lng->txt("clone_error");
4182 $this->setup->raiseError($message . " -> " . $this->setup->error,$this->setup->error_obj->MESSAGE);
4183 }
4184
4185 ilUtil::sendInfo($this->lng->txt("client_cloned"),true);
4186 // ilUtil::redirect("setup.php");
4187 }
4188 $this->form->setValuesByPost();
4189 $this->tpl->setVariable("TXT_INFO", $this->lng->txt("info_text_clone"));
4190 $this->tpl->setVariable("SETUP_CONTENT", $this->form->getHTML());
4191 }
cloneInitForm()
Initialize clone form.

References $ilCtrl, $lng, cloneInitForm(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ cloneSelectSource()

ilSetupGUI::cloneSelectSource ( )

Definition at line 4148 of file class.ilSetupGUI.php.

4148 {
4149
4150 if (!$this->setup->isAdmin())
4151 {
4152 return;
4153 }
4154
4155 $this->cloneInitForm();
4156 $this->form->setValuesByPost();
4157 $this->tpl->setVariable("TXT_INFO", $this->lng->txt("info_text_clone"));
4158 $this->tpl->setVariable("SETUP_CONTENT", $this->form->getHTML());
4159 }

References cloneInitForm().

+ Here is the call graph for this function:

◆ cmdAdmin()

ilSetupGUI::cmdAdmin ( )

process valid commands for admins

Definition at line 205 of file class.ilSetupGUI.php.

206 {
208
209 switch ($this->cmd)
210 {
211 case NULL:
212 case "clientlist":
213 $this->setDisplayMode("view");
214 $this->displayClientList();
215 $this->active_tab = "clientlist";
216 break;
217
218 case "changepassword":
219 $this->setDisplayMode("view");
220 $this->changeMasterPassword();
221 $this->active_tab = "password";
222 break;
223
224 case "mastersettings":
225 $this->setDisplayMode("view");
226 $this->changeMasterSettings();
227 $this->active_tab = "basicsettings";
228 break;
229
230 case "determineToolsPath":
231 $this->setDisplayMode("view");
232 $this->determineToolsPath();
233 break;
234
235 case "changedefault":
236 $this->changeDefaultClient();
237 break;
238
239 case "newclient":
240 $this->cmd = "selectdb";
241 $this->setDisplayMode("setup");
242 $this->setup->ini_client_exists = $this->setup->newClient();
243 $this->selectDBType();
244 break;
245
246 case "selectdbtype":
247 case "displayIni":
248 $this->cmd = "ini";
249 $this->setDisplayMode("setup");
250 //$this->setup->ini_client_exists = $this->setup->newClient($this->client_id);
251 $this->displayIni();
252 break;
253
254 case "startup":
255 $this->setDisplayMode("setup");
256 $this->setup->ini_client_exists = $this->setup->newClient();
257 $this->displayStartup();
258 break;
259
260 case "delete":
261 $this->setDisplayMode("view");
263 break;
264
265 case "togglelist":
266 $this->setDisplayMode("view");
267 $this->toggleClientList();
268 break;
269
270 case "preliminaries":
271 $this->setup->checkPreliminaries();
272 $this->displayPreliminaries();
273 $this->active_tab = "preliminaries";
274 break;
275
276 case "updateBasicSettings":
277 case "performLogin":
278 case "performMLogin":
279 $this->$cmd();
280 break;
281
282 default:
283 $this->cmdClient();
284 break;
285 }
286 }
displayClientList()
display client list and process form input
changeMasterPassword()
display change password form and process form input
setDisplayMode($a_mode)
set display mode to 'view' or 'setup' 'setup' -> show status panel and (prev/next) navigation buttons...
displayDeleteConfirmation()
display delete client confirmation form and process form input
displayIni($a_omit_form_init=false)
display setup in step
displayStartup()
display intro page for the first client installation
displayPreliminaries()
display preliminaries page
selectDBType()
Select database type.
changeDefaultClient()
set defualt client
determineToolsPath()
Determine tools paths.
toggleClientList()
enable/disable client list on index page
cmdClient()
process valid commands for all clients
changeMasterSettings($a_omit_init=false)
display master settings and process form input

References $cmd, changeDefaultClient(), changeMasterPassword(), changeMasterSettings(), cmdClient(), determineToolsPath(), displayClientList(), displayDeleteConfirmation(), displayIni(), displayPreliminaries(), displayStartup(), selectDBType(), setDisplayMode(), and toggleClientList().

Referenced by ilSetupGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cmdClient()

ilSetupGUI::cmdClient ( )

process valid commands for all clients

Definition at line 291 of file class.ilSetupGUI.php.

292 {
294 switch ($this->cmd)
295 {
296 case NULL:
297 case "view":
298 if ($this->setup->getClient()->db_installed)
299 {
300 $this->setDisplayMode("view");
301 $this->displayClientOverview();
302 }
303 else
304 {
305 $this->cmd = "db";
306 $this->displayDatabase();
307 }
308 break;
309
310 case "ini":
311 // only allow access to ini if db does not exist yet
312 //if ($this->setup->getClient()->db_installed)
313 //{
314 // $this->cmd = "db";
315 // $this->displayDatabase();
316 //}
317 //else
318 //{
319 $this->displayIni();
320 //}
321 break;
322
323 case "db":
324 $this->displayDatabase();
325 break;
326
327 case "dbslave":
328 $this->displayDatabaseSlave();
329 break;
330
331 case "sess":
332 if (!isset($_GET["lang"]) and !$this->setup->getClient()->status["finish"]["status"] and $_GET["cmd"] == "sess" and $this->setup->error === true)
333 {
335 }
336 else
337 {
338 $this->displaySessions();
339 }
340 break;
341
342 case "lang":
343 if (!isset($_GET["lang"]) and !$this->setup->getClient()->status["finish"]["status"] and $_GET["cmd"] == "lang" and $this->setup->error === true)
344 {
346 }
347 else
348 {
349 $this->displayLanguages();
350 }
351 break;
352
353 case "contact":
354 if (!isset($_GET["lang"]) and !$this->setup->getClient()->status["finish"]["status"] and $_GET["cmd"] == "contact")
355 {
357 }
358 else
359 {
360 $this->displayContactData();
361 }
362 break;
363
364 case "proxy":
365 if (!isset($_GET["lang"]) and !$this->setup->getClient()->status["finish"]["status"] and $_GET["cmd"] == "proxy")
366 {
368 }
369 else
370 {
371 $this->displayProxy();
372 }
373 break;
374
375 case "cache":
376 $this->displayCache();
377 break;
378
379
380 case "nic":
381 if (!isset($_GET["lang"]) and !$this->setup->getClient()->status["finish"]["status"] and $_GET["cmd"] == "nic")
382 {
384 }
385 else
386 {
387 $this->displayNIC();
388 }
389 break;
390
391 case "finish":
392 if (!isset($_GET["lang"]) and !$this->setup->getClient()->status["finish"]["status"] and $_GET["cmd"] == "finish")
393 {
395 }
396 else
397 {
398 $this->displayFinishSetup();
399 }
400 break;
401
402 case "changeaccess":
403 $this->changeAccessMode($_GET["back"]);
404 break;
405
406 case "logout":
407 $this->displayLogout();
408 break;
409
410 case "login":
411 session_destroy();
412 ilUtil::redirect(ILIAS_HTTP_PATH."/login.php?client_id=".$this->setup->getClient()->getId());
413 break;
414
415 case "login_new":
416 if ($this->setup->getClient()->ini->readVariable("client","access") != "1")
417 {
418 $this->setup->getClient()->ini->setVariable("client","access","1");
419 $this->setup->getClient()->ini->write();
420 }
421
422 session_destroy();
423 ilUtil::redirect(ILIAS_HTTP_PATH."/login.php?client_id=".$this->setup->getClient()->getId());
424 break;
425
426 case "tools":
427 $this->displayTools();
428 break;
429
430 case "reloadStructure":
431 $this->reloadControlStructure();
432 break;
433
434 case 'switchTree':
435 $this->switchTree();
436 break;
437
438 case "saveClientIni":
439 case "installDatabase":
440 case "displayDatabase":
441 case "updateDatabase":
442 case "showUpdateSteps":
443 case "saveLanguages":
444 case "saveContact":
445 case "displayContactData":
446 case "displayNIC":
447 case "saveRegistration":
448 case "applyHotfix":
449 case "showHotfixSteps":
450 case "applyCustomUpdates":
451 case "changeSettingsType":
452 case "showLongerSettings":
453 case "cloneSelectSource":
454 case "cloneSaveSource":
455 case "saveProxy":
456 case "displayPassword":
457 case "savePassword":
458 case "saveDbSlave":
459 case "saveCache":
460 $this->$cmd();
461 break;
462
463 default:
464 $this->displayError($this->lng->txt("unknown_command"));
465 break;
466 }
467 }
$_GET["client_id"]
displayContactData($a_omit_init=false)
display contact data form and process form input
displayClientOverview()
display client overview panel
displayFinishSetup()
display finish setup page
reloadControlStructure()
reload control structure
jumpToFirstUnfinishedSetupStep()
if setting up a client was not finished, jump back to the first uncompleted setup step
changeAccessMode($a_back)
enable/disable access to a client
displayNIC($a_omit_init=false)
display nic registration form and process form input
displaySessions()
display sessions form and process form input
displayDatabase()
display database form and process form input
displayLanguages()
display language form and process form input
displayLogout()
display logout page
displayDatabaseSlave($a_from_save=false)
Display database slave.
displayProxy($a_omit_init=false)

References $_GET, $cmd, changeAccessMode(), displayClientOverview(), displayContactData(), displayDatabase(), displayDatabaseSlave(), displayError(), displayFinishSetup(), displayIni(), displayLanguages(), displayLogout(), displayNIC(), displayProxy(), displaySessions(), displayTools(), jumpToFirstUnfinishedSetupStep(), ilUtil\redirect(), reloadControlStructure(), setDisplayMode(), and switchTree().

Referenced by cmdAdmin(), and ilSetupGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cmdInstall()

ilSetupGUI::cmdInstall ( )

process valid commands for pre-installation status

Definition at line 173 of file class.ilSetupGUI.php.

174 {
176 switch ($this->cmd)
177 {
178 case NULL:
179 case "preliminaries":
180 $this->setup->checkPreliminaries();
181 $this->displayPreliminaries();
182 break;
183
184 case "install":
185 $this->displayMasterSetup();
186 break;
187
188 case "determineToolsPathInstall":
190 break;
191
192 case "saveBasicSettings":
193 $this->$cmd();
194 break;
195
196 default:
197 $this->displayError($this->lng->txt("unknown_command"));
198 break;
199 }
200 }
displayMasterSetup($a_omit_init=false)
display master setup form & process form input
determineToolsPathInstall()
Determine tools paths.

References $cmd, determineToolsPathInstall(), displayError(), displayMasterSetup(), and displayPreliminaries().

Referenced by ilSetupGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determineTools()

ilSetupGUI::determineTools (   $a_tools = "")

Determine Tools.

Definition at line 1519 of file class.ilSetupGUI.php.

1520 {
1521 $cwd = ilUtil::isWindows()
1522 ? str_replace("\\", "/", getcwd())
1523 : getcwd();
1524 if (!ilUtil::isWindows())
1525 {
1526 $tools = array("convert" => "convert",
1527 "zip" => "zip", "unzip" => "unzip", "ghostscript" => "gs",
1528 "java" => "java", "htmldoc" => "htmldoc", "ffmpeg" => "ffmpeg");
1529 $dirs = array("/usr/local", "/usr/local/bin", "/usr/bin", "/bin", "/sw/bin", "/usr/bin");
1530 }
1531 else
1532 {
1533 $tools = array("convert" => "convert.exe",
1534 "zip" => "zip.exe", "unzip" => "unzip.exe");
1535 $dirs = array($cwd."/Services/Windows/bin32/zip",
1536 $cwd."/Services/Windows/bin32/unzip",
1537 $cwd."/Services/Windows/bin32/convert");
1538 }
1539 foreach($tools as $k => $tool)
1540 {
1541 // try which command
1542 unset($ret);
1543 @exec("which ".$tool, $ret);
1544 if (substr($ret[0], 0, 3) != "no " && substr($ret[0], 0, 1) == "/")
1545 {
1546 $a_tools[$k."_path"] = $ret[0];
1547 continue;
1548 }
1549
1550 // try common directories
1551 foreach($dirs as $dir)
1552 {
1553 if (@is_file($dir."/".$tool))
1554 {
1555 $a_tools[$k."_path"] = $dir."/".$tool;
1556 continue;
1557 }
1558 }
1559 }
1560 return $a_tools;
1561 }
static isWindows()
check wether the current client system is a windows system
$dirs

References $dirs, $ret, and ilUtil\isWindows().

Referenced by determineToolsPath(), and initBasicSettingsForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determineToolsPath()

ilSetupGUI::determineToolsPath ( )

Determine tools paths.

Definition at line 1502 of file class.ilSetupGUI.php.

1503 {
1504 $_POST = $this->determineTools($_POST);
1505 $this->updateBasicSettings();
1506 }
determineTools($a_tools="")
Determine Tools.
updateBasicSettings()
Update basic settings form.

References $_POST, determineTools(), and updateBasicSettings().

Referenced by cmdAdmin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determineToolsPathInstall()

ilSetupGUI::determineToolsPathInstall ( )

Determine tools paths.

Definition at line 1511 of file class.ilSetupGUI.php.

1512 {
1513 $this->displayMasterSetup(true);
1514 }

References displayMasterSetup().

Referenced by cmdInstall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayClientList()

ilSetupGUI::displayClientList ( )

display client list and process form input

Definition at line 1476 of file class.ilSetupGUI.php.

1477 {
1478 $_SESSION["ClientId"] = "";
1479
1480 $this->tpl->addBlockFile("CONTENT","content","tpl.clientlist.html", "setup");
1481 $this->tpl->setVariable("TXT_INFO", $this->lng->txt("info_text_list"));
1483
1484 // common
1485 $this->tpl->setVariable("TXT_HEADER",$this->lng->txt("list_clients"));
1486 $this->tpl->setVariable("TXT_LISTSTATUS",($this->setup->ini->readVariable("clients","list")) ? $this->lng->txt("display_clientlist") : $this->lng->txt("hide_clientlist"));
1487 $this->tpl->setVariable("TXT_TOGGLELIST",($this->setup->ini->readVariable("clients","list")) ? $this->lng->txt("disable") : $this->lng->txt("enable"));
1488
1489 include_once("./setup/classes/class.ilClientListTableGUI.php");
1490 $tab = new ilClientListTableGUI($this->setup);
1491 $this->tpl->setVariable("CLIENT_LIST", $tab->getHTML());
1492
1493 // create new client button
1494 $this->btn_next_on = true;
1495 $this->btn_next_lng = $this->lng->txt("create_new_client")."...";
1496 $this->btn_next_cmd = "newclient";
1497 }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

References $_SESSION, $tab, and ilUtil\sendInfo().

Referenced by cmdAdmin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayClientOverview()

ilSetupGUI::displayClientOverview ( )

display client overview panel

Definition at line 702 of file class.ilSetupGUI.php.

703 {
704 $this->checkDisplayMode();
705
706 // disable/enable button
707 $btpl = new ilTemplate("tpl.buttons.html", true, true, "setup");
708 $btpl->setCurrentBlock("btn");
709 $btpl->setVariable("CMD", "changeaccess");
710 $access_button = ($this->setup->getClient()->status["access"]["status"]) ? "disable" : "enable";
711 $btpl->setVariable("TXT", $this->lng->txt($access_button));
712 $btpl->setVariable("FORMACTION", "setup.php?cmd=gateway");
713 $btpl->parseCurrentBlock();
714 $this->tpl->setVariable("BUTTONS", $btpl->get());
715
716 $this->initClientOverviewForm();
717 $this->tpl->setVariable("SETUP_CONTENT", $this->form->getHTML());
718
719 $this->displayStatusPanel();
720 }
initClientOverviewForm()
Init client overview form.
special template class to simplify handling of ITX/PEAR

References checkDisplayMode(), displayStatusPanel(), and initClientOverviewForm().

Referenced by cmdClient().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayContactData()

ilSetupGUI::displayContactData (   $a_omit_init = false)

display contact data form and process form input

Definition at line 3081 of file class.ilSetupGUI.php.

3082 {
3083 $this->checkDisplayMode("setup_contact_data");
3084 $settings = $this->setup->getClient()->getAllSettings();
3085
3086 if (!$a_omit_init)
3087 {
3088 $this->initContactDataForm();
3089 $this->getContactValues();
3090 }
3091 $this->tpl->setVariable("SETUP_CONTENT", $this->form->getHTML());
3092 $this->tpl->setVariable("TXT_INFO", $this->lng->txt("info_text_contact"));
3093 $this->setButtonPrev("lang");
3094
3095 $check = $this->setup->checkClientContact($this->setup->client);
3096
3097 $this->setup->getClient()->status["contact"]["status"] = $check["status"];
3098 $this->setup->getClient()->status["contact"]["comment"] = $check["comment"];
3099
3100 if ($check["status"])
3101 {
3102 $this->setButtonNext("proxy");
3103 }
3104
3105 $this->checkPanelMode();
3106 }
getContactValues()
Get current values for contact from.
initContactDataForm()
Init contact data form.
checkPanelMode()
determine display mode and load correct panel

References checkDisplayMode(), checkPanelMode(), getContactValues(), and initContactDataForm().

Referenced by cmdClient(), jumpToFirstUnfinishedSetupStep(), and saveContact().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayDatabase()

ilSetupGUI::displayDatabase ( )

display database form and process form input

Definition at line 2108 of file class.ilSetupGUI.php.

2109 {
2110 global $ilErr,$ilDB,$ilLog;
2111
2112 $this->checkDisplayMode("setup_database");
2113
2114 //$this->tpl->addBlockFile("SETUP_CONTENT","setup_content","tpl.clientsetup_db.html", "setup");
2115
2116 // database is intalled
2117 if ($this->setup->getClient()->db_installed)
2118 {
2119 $this->setDbSubTabs("db");
2120
2121 $ilDB = $this->setup->getClient()->db;
2122 $this->lng->setDbHandler($ilDB);
2123 include_once "./Services/Database/classes/class.ilDBUpdate.php";
2124 $dbupdate = new ilDBUpdate($ilDB);
2125 $db_status = $dbupdate->getDBVersionStatus();
2126 $hotfix_available = $dbupdate->hotfixAvailable();
2127 $custom_updates_available = $dbupdate->customUpdatesAvailable();
2128 $this->initClientDbForm(false, $dbupdate, $db_status, $hotfix_available, $custom_updates_available);
2129 $this->getClientDbFormValues($dbupdate);
2130 $this->tpl->setVariable("SETUP_CONTENT", $this->form->getHTML());
2131
2132 if ($db_status)
2133 {
2134 $this->setButtonNext("lang");
2135 }
2136 }
2137 else // database is not installed
2138 {
2139 $this->tpl->setVariable("TXT_INFO", $this->lng->txt("info_text_db")."<br />".
2140 "<p><code>CREATE DATABASE &lt;your_db&gt; CHARACTER SET utf8 COLLATE &lt;your_collation&gt;</code></p>".
2141 "<p><b>".$this->lng->txt("info_text_db2")."</b></p><br/>");
2142
2143 $this->initClientDbForm();
2144 $this->getClientDbFormValues();
2145 $this->tpl->setVariable("SETUP_CONTENT", $this->form->getHTML());
2146 $this->setButtonPrev("ini");
2147 }
2148
2149 $this->checkPanelMode();
2150
2151 $this->displaySubTabs();
2152 }
displaySubTabs()
Show subtabs.
initClientDbForm($a_install=true, $dbupdate=null, $db_status=false, $hotfix_available=false, $custom_updates_available=false)
Init client db form.
getClientDbFormValues($dbupdate=null)
Get current values for client db from.

References $ilDB, $ilErr, $ilLog, checkDisplayMode(), checkPanelMode(), displaySubTabs(), getClientDbFormValues(), and initClientDbForm().

Referenced by cmdClient(), and jumpToFirstUnfinishedSetupStep().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayDatabaseSlave()

ilSetupGUI::displayDatabaseSlave (   $a_from_save = false)

Display database slave.

Definition at line 2232 of file class.ilSetupGUI.php.

2233 {
2234 global $ilErr,$ilDB,$ilLog;
2235
2236 $this->checkDisplayMode("setup_database");
2237
2238 //$this->tpl->addBlockFile("SETUP_CONTENT","setup_content","tpl.clientsetup_db.html", "setup");
2239
2240 // database is intalled
2241 if (!$this->setup->getClient()->db_installed)
2242 {
2243 return;
2244 }
2245
2246 $this->setDbSubTabs("repl");
2247
2248 if (!$a_from_save)
2249 {
2250 $ilDB = $this->setup->getClient()->db;
2251 $this->lng->setDbHandler($ilDB);
2252 }
2253
2254 ilUtil::sendInfo($this->lng->txt("mysql_replication_info_alpha"));
2255
2256 if (!$a_from_save)
2257 {
2258 $this->initDbSlaveForm();
2259 }
2260
2261 $this->tpl->setVariable("SETUP_CONTENT", $this->form->getHTML());
2262
2263 $this->checkPanelMode();
2264
2265 $this->displaySubTabs();
2266 }
initDbSlaveForm()
Init db slave form.

References $ilDB, $ilErr, $ilLog, checkDisplayMode(), checkPanelMode(), displaySubTabs(), initDbSlaveForm(), and ilUtil\sendInfo().

Referenced by cmdClient(), and saveDbSlave().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayDeleteConfirmation()

ilSetupGUI::displayDeleteConfirmation ( )

display delete client confirmation form and process form input

Definition at line 3823 of file class.ilSetupGUI.php.

3824 {
3825 $this->checkDisplayMode();
3826
3827 // formular sent
3828 if ($_POST["form"]["delete"])
3829 {
3830 $ini = true;
3831 $db = false;
3832 $files = false;
3833
3834 /* disabled
3835 switch ($_POST["form"]["delete"])
3836 {
3837 case 1:
3838 $ini = true;
3839 break;
3840
3841 case 2:
3842 $ini = true;
3843 $db = true;
3844 break;
3845
3846 case 3:
3847 $ini = true;
3848 $db = true;
3849 $files = true;
3850 break;
3851 }
3852 */
3853
3854 $msg = $this->setup->getClient()->delete($ini,$db,$files);
3855
3856 ilUtil::sendInfo($this->lng->txt("client_deleted"),true);
3857 ilUtil::redirect("setup.php");
3858 }
3859
3860 $this->tpl->setVariable("TXT_INFO", $this->lng->txt("info_text_delete"));
3861
3862 // output
3863 $this->tpl->addBlockFile("SETUP_CONTENT","setup_content","tpl.form_delete_client.html", "setup");
3864
3865 // delete panel
3866 $this->tpl->setVariable("FORMACTION", "setup.php?cmd=gateway");
3867 $this->tpl->setVariable("TXT_DELETE", $this->lng->txt("delete"));
3868 $this->tpl->setVariable("TXT_DELETE_CONFIRM", $this->lng->txt("delete_confirm"));
3869 $this->tpl->setVariable("TXT_DELETE_INFO", $this->lng->txt("delete_info"));
3870
3871 $this->checkPanelMode();
3872 }
$ini

References $_POST, $ini, checkDisplayMode(), checkPanelMode(), ilUtil\redirect(), and ilUtil\sendInfo().

Referenced by cmdAdmin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayError()

ilSetupGUI::displayError (   $a_message)

display error page

Parameters
stringerror message

Definition at line 1894 of file class.ilSetupGUI.php.

1895 {
1896 $this->tpl->addBlockFile("CONTENT", "content", "tpl.error.html", "setup");
1897
1898 $this->tpl->setCurrentBlock("content");
1899 $this->tpl->setVariable("FORMACTION", $_SESSION["referer"]);
1900 $this->tpl->setVariable("TXT_BACK", $this->lng->txt("back"));
1901 $this->tpl->setVariable("ERROR_MESSAGE",($a_message));
1902 $this->tpl->parseCurrentBlock();
1903
1904 $this->tpl->show();
1905 exit();
1906 }

References $_SESSION, and exit.

Referenced by checkDisplayMode(), cmdClient(), and cmdInstall().

+ Here is the caller graph for this function:

◆ displayFinishSetup()

ilSetupGUI::displayFinishSetup ( )

display finish setup page

Definition at line 3783 of file class.ilSetupGUI.php.

3784 {
3785 $this->checkDisplayMode("finish_setup");
3786 $this->no_second_nav = true;
3787//echo "<b>1</b>";
3788 if ($this->validateSetup())
3789 {
3790 $txt_info = $this->lng->txt("info_text_finish1")."<br /><br />".
3791 "<p>".$this->lng->txt("user").": <b>root</b><br />".
3792 $this->lng->txt("password").": <b>homer</b></p>";
3793 $this->setButtonNext("login_new","login");
3794//echo "<b>2</b>";
3795 $this->setup->getClient()->reconnect(); // if this is not done, the writing of
3796 // the setup_ok fails (with MDB2 and a larger
3797 // client list), alex 17.1.2008
3798 $this->setup->getClient()->setSetting("setup_ok",1);
3799//$this->setup->getClient()->setSetting("zzz", "Z");
3800//echo "<b>3</b>";
3801 $this->setup->getClient()->status["finish"]["status"] = true;
3802//echo "<b>4</b>";
3803 }
3804 else
3805 {
3806 $txt_info = $this->lng->txt("info_text_finish2");
3807 }
3808
3809//echo "<b>5</b>";
3810 // output
3811 $this->tpl->addBlockFile("SETUP_CONTENT","setup_content","tpl.clientsetup_finish.html", "setup");
3812 $this->tpl->setVariable("TXT_INFO",$txt_info);
3813
3814 $this->setButtonPrev("nic");
3815//echo "<b>6</b>";
3816 $this->checkPanelMode();
3817//echo "<b>7</b>";
3818 }
validateSetup()
validatesetup status again and set access mode of the first client to online

References checkDisplayMode(), checkPanelMode(), and validateSetup().

Referenced by cmdClient(), and jumpToFirstUnfinishedSetupStep().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayFooter()

ilSetupGUI::displayFooter ( )

page output and set title

Definition at line 607 of file class.ilSetupGUI.php.

608 {
609 // footer (not really)
610 if ($this->cmd != "logout")
611 {
612 if ($this->setup->ini_ilias_exists and $this->display_mode == "setup" and $this->setup->getClient()->getId() != "")
613 {
614 $this->tpl->setVariable("TXT_ACCESS_MODE","(".$this->lng->txt("client_id").": ".$this->setup->getClient()->getId().")");
615 }
616 elseif ($this->setup->isAdmin())
617 {
618 $this->tpl->setVariable("TXT_ACCESS_MODE","(".$this->lng->txt("root_access").")");
619 }
620
621 $this->displayNavButtons();
622 }
623
624 $this->tpl->show();
625 }
displayNavButtons()
display navigation buttons

References displayNavButtons().

Referenced by ilSetupGUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayHeader()

ilSetupGUI::displayHeader ( )

display header with admin links and language flags

Definition at line 500 of file class.ilSetupGUI.php.

501 {
502 $languages = $this->lng->getLanguages();
503
504 $count = (int) round(count($languages) / 2);
505 $num = 1;
506
507 foreach ($languages as $lang_key)
508 {
509 /*
510 if ($num === $count)
511 {
512 $this->tpl->touchBlock("lng_new_row");
513 }
514 */
515 $this->tpl->setCurrentBlock("languages");
516 $this->tpl->setVariable("LINK_LANG", "./setup.php?cmd=".$this->cmd."&amp;lang=".$lang_key);
517 $this->tpl->setVariable("LANG_NAME", $this->lng->txt("meta_l_".$lang_key));
518 $this->tpl->setVariable("LANG_ICON", $lang_key);
519 $this->tpl->setVariable("LANG_KEY", $lang_key);
520 $this->tpl->setVariable("BORDER", 0);
521 $this->tpl->setVariable("VSPACE", 0);
522 $this->tpl->parseCurrentBlock();
523
524 $num++;
525 }
526
527 if (count($languages) % 2)
528 {
529 $this->tpl->touchBlock("lng_empty_cell");
530 }
531
532 if ($this->cmd != "logout" and $this->setup->isInstalled() and $this->setup->isAuthenticated())
533 {
534 // add client link
535 if ($this->setup->isAdmin())
536 {
537 if ($this->display_mode == "view" or $this->cmd == "clientlist" or $this->cmd == "changepassword" or $this->cmd == "mastersettings")
538 {
539 $this->tpl->setCurrentBlock("add_client");
540 $this->tpl->setVariable("TXT_ADD_CLIENT",ucfirst($this->lng->txt("new_client")));
541 $this->tpl->parseCurrentBlock();
542 }
543
544 // client list link
545 $class = ($this->active_tab == "clientlist")
546 ? "ilSMActive"
547 : "ilSMInactive";
548 $this->tpl->setCurrentBlock("display_list");
549 $this->tpl->setVariable("TXT_LIST",ucfirst($this->lng->txt("list_clients")));
550 $this->tpl->setVariable("TAB_CLASS", $class);
551 $this->tpl->parseCurrentBlock();
552
553 // edit paths link
554 $class = ($this->active_tab == "basicsettings")
555 ? "ilSMActive"
556 : "ilSMInactive";
557 $this->tpl->setCurrentBlock("edit_pathes");
558 $this->tpl->setVariable("TXT_EDIT_PATHES",$this->lng->txt("basic_settings"));
559 $this->tpl->setVariable("TAB_CLASS", $class);
560 $this->tpl->parseCurrentBlock();
561
562 // preliminaries
563 $class = ($this->active_tab == "preliminaries")
564 ? "ilSMActive"
565 : "ilSMInactive";
566 $this->tpl->setCurrentBlock("preliminaries");
567 $this->tpl->setVariable("TXT_PRELIMINARIES",$this->lng->txt("preliminaries"));
568 $this->tpl->setVariable("TAB_CLASS", $class);
569 $this->tpl->parseCurrentBlock();
570
571 // change password link
572 $class = ($this->active_tab == "password")
573 ? "ilSMActive"
574 : "ilSMInactive";
575 $this->tpl->setCurrentBlock("change_password");
576 $this->tpl->setVariable("TXT_CHANGE_PASSWORD",ucfirst($this->lng->txt("password")));
577 $this->tpl->setVariable("TAB_CLASS", $class);
578 $this->tpl->parseCurrentBlock();
579 }
580
581 // logout link
582 if ($this->setup->isAuthenticated())
583 {
584 $this->tpl->setCurrentBlock("logout");
585 $this->tpl->setVariable("TXT_LOGOUT",$this->lng->txt("logout"));
586 $this->tpl->parseCurrentBlock();
587 }
588 }
589
590 $this->tpl->setVariable("VAL_CMD", $_GET["cmd"]);
591 $this->tpl->setVariable("TXT_OK",$this->lng->txt("change"));
592 $this->tpl->setVariable("TXT_CHOOSE_LANGUAGE",$this->lng->txt("choose_language"));
593 $this->tpl->setVariable("PAGETITLE","Setup");
594 //$this->tpl->setVariable("LOCATION_STYLESHEET","./templates/blueshadow.css");
595 $this->tpl->setVariable("LOCATION_STYLESHEET","../templates/default/delos.css");
596 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET","./css/setup.css");
597 $this->tpl->setVariable("TXT_ILIAS_VERSION", "ILIAS ".ILIAS_VERSION);
598 $this->tpl->setVariable("TXT_SETUP",$this->lng->txt("setup"));
599 $this->tpl->setVariable("VERSION", $this->version);
600 $this->tpl->setVariable("TXT_VERSION", $this->lng->txt("version"));
601 $this->tpl->setVariable("LANG", $this->lang);
602 }
const ILIAS_VERSION

References $_GET, and ILIAS_VERSION.

Referenced by ilSetupGUI().

+ Here is the caller graph for this function:

◆ displayIni()

ilSetupGUI::displayIni (   $a_omit_form_init = false)

display setup in step

Definition at line 1637 of file class.ilSetupGUI.php.

1638 {
1639 $this->checkDisplayMode("create_new_client");
1640
1641 if ($_POST["db_type"] != "")
1642 {
1643 $_SESSION["db_type"] = $_POST["db_type"];
1644 }
1645 else
1646 {
1647 $_POST["db_type"] = $_SESSION["db_type"];
1648 }
1649
1650 $this->tpl->setVariable("TXT_INFO", $this->lng->txt("info_text_ini"));
1651 if (!$a_omit_form_init)
1652 {
1653 $this->initClientIniForm();
1654 $this->getClientIniValues();
1655 }
1656 $this->tpl->setVariable("SETUP_CONTENT",
1657 $this->form->getHTML());
1658
1659 if ($this->setup->getClient()->status["ini"]["status"])
1660 {
1661 $this->setButtonNext("db");
1662 }
1663
1664 $this->checkPanelMode();
1665 }
getClientIniValues()
Get current values for client ini from.
initClientIniForm()
Init client ini form.

References $_POST, $_SESSION, checkDisplayMode(), checkPanelMode(), getClientIniValues(), and initClientIniForm().

Referenced by cmdAdmin(), cmdClient(), and saveClientIni().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayLanguages()

ilSetupGUI::displayLanguages ( )

display language form and process form input

Definition at line 2984 of file class.ilSetupGUI.php.

2985 {
2986 $this->checkDisplayMode("setup_languages");
2987
2988 if (!$this->setup->getClient()->db_installed)
2989 {
2990 // program should never come to this place
2991 $message = "No database found! Please install database first.";
2992 ilUtil::sendFailure($message);
2993 }
2994
2995 include_once("./setup/classes/class.ilSetupLanguageTableGUI.php");
2996 $tab = new ilSetupLanguageTableGUI($this->setup->getClient());
2997 $this->tpl->setVariable("SETUP_CONTENT", $tab->getHTML());
2998
2999 $this->tpl->setVariable("TXT_SETUP_TITLE",ucfirst(trim($this->lng->txt("setup_languages"))));
3000 $this->tpl->setVariable("TXT_INFO", $this->lng->txt("info_text_lang"));
3001
3002 $installed_langs = $this->lng->getInstalledLanguages();
3003 $lang_count = count($installed_langs);
3004 if ($lang_count > 0)
3005 {
3006 $this->setup->getClient()->status["lang"]["status"] = true;
3007 $this->setup->getClient()->status["lang"]["comment"] = $lang_count." ".$this->lng->txt("languages_installed");
3008 }
3009 else
3010 {
3011 $this->setup->getClient()->status["lang"]["status"] = false;
3012 $this->setup->getClient()->status["lang"]["comment"] = $this->lng->txt("lang_none_installed");
3013 }
3014
3015 $this->setButtonPrev("lang");
3016
3017 if ($lang_count > 0)
3018 {
3019 $this->setButtonNext("contact");
3020 }
3021
3022 $this->checkPanelMode();
3023 }

References $tab, checkDisplayMode(), checkPanelMode(), and ilUtil\sendFailure().

Referenced by cmdClient(), and jumpToFirstUnfinishedSetupStep().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayLogin()

ilSetupGUI::displayLogin (   $a_omit_minit = false,
  $a_omit_cinit = false 
)

display login form and process form

Definition at line 1334 of file class.ilSetupGUI.php.

1335 {
1336 global $lng;
1337 $this->tpl->setVariable("SETUP_LOGIN_CLASS", " ilSetupLogin");
1338 $this->tpl->addBlockFile("CONTENT","content","tpl.std_layout.html", "setup");
1339
1340 if ($a_omit_minit)
1341 {
1342 $m_form = $this->form->getHTML();
1343 }
1344 if (!$a_omit_cinit)
1345 {
1346 $this->initClientLoginForm();
1347 }
1348 $cl_form = $this->form->getHTML();
1349 if (!$a_omit_minit)
1350 {
1351 $this->initMasterLoginForm();
1352 $m_form = $this->form->getHTML();
1353 }
1354 $this->tpl->setVariable("SETUP_CONTENT", $cl_form."<br>".$m_form);
1355 $this->tpl->setVariable("TXT_HEADER", $lng->txt("login"));
1356 }
initMasterLoginForm()
Init master login form.
initClientLoginForm()
Init client login form.

References $lng, initClientLoginForm(), and initMasterLoginForm().

Referenced by ilSetupGUI(), performLogin(), and performMLogin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayLogout()

ilSetupGUI::displayLogout ( )

display logout page

Definition at line 1911 of file class.ilSetupGUI.php.

1912 {
1913 $this->tpl->addBlockFile("CONTENT","content","tpl.logout.html", "setup");
1914
1915 session_destroy();
1916
1917 $this->logged_out = true;
1918 $this->tpl->setVariable("TXT_HEADER",$this->lng->txt("logged_out"));
1919 $this->tpl->setCurrentBlock("home_link");
1920 $this->tpl->setVariable("TXT_INDEX",$this->lng->txt("ilias_homepage"));
1921 $this->tpl->setVariable("LNK_INDEX",ILIAS_HTTP_PATH."/index.php");
1922 $this->tpl->parseCurrentBlock();
1923 }

Referenced by cmdClient().

+ Here is the caller graph for this function:

◆ displayMasterSetup()

ilSetupGUI::displayMasterSetup (   $a_omit_init = false)

display master setup form & process form input

Definition at line 943 of file class.ilSetupGUI.php.

944 {
945 $this->tpl->addBlockFile("CONTENT","content","tpl.std_layout.html", "setup");
946 $this->tpl->setVariable("TXT_HEADER", $this->lng->txt("basic_settings"));
947 $this->tpl->setVariable("TXT_INFO",
948 $this->lng->txt("info_text_first_install")."<br/>".$this->lng->txt("info_text_pathes"));
949
950 $this->setButtonPrev("preliminaries");
951
952 if ($this->setup->isInstalled())
953 {
954 $this->setButtonNext("list");
955 }
956
957 if (!$a_omit_init)
958 {
959 $this->initBasicSettingsForm(true);
960 }
961 $this->tpl->setVariable("SETUP_CONTENT", "<br>".$this->form->getHTML()."<br>");
962 }

References initBasicSettingsForm().

Referenced by cmdInstall(), determineToolsPathInstall(), and saveBasicSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayNavButtons()

ilSetupGUI::displayNavButtons ( )

display navigation buttons

Returns
boolean false if both buttons are deactivated

Definition at line 632 of file class.ilSetupGUI.php.

633 {
634 if (!$this->btn_prev_on and !$this->btn_next_on)
635 {
636 return false;
637 }
638
639 $ntpl = new ilTemplate("tpl.navbuttons.html", true, true, "setup");
640 //$this->tpl->addBlockFile("NAVBUTTONS","navbuttons","tpl.navbuttons.html", "setup");
641
642 $ntpl->setVariable("FORMACTION_BUTTONS","setup.php?cmd=gateway");
643
644 if ($this->btn_prev_on)
645 {
646 $ntpl->setCurrentBlock("btn_back");
647 $ntpl->setVariable("TXT_PREV", $this->btn_prev_lng);
648 $ntpl->setVariable("CMD_PREV", $this->btn_prev_cmd);
649 $ntpl->parseCurrentBlock();
650 }
651
652 if ($this->btn_next_on)
653 {
654 $ntpl->setCurrentBlock("btn_forward");
655 $ntpl->setVariable("TXT_NEXT", $this->btn_next_lng);
656 $ntpl->setVariable("CMD_NEXT", $this->btn_next_cmd);
657 $ntpl->parseCurrentBlock();
658 }
659
660 $nav_html = $ntpl->get();
661 $this->tpl->setVariable("NAVBUTTONS", $nav_html);
662 if (!$this->no_second_nav)
663 {
664 $this->tpl->setVariable("NAVBUTTONS2", $nav_html);
665 }
666 return true;
667 }

Referenced by displayFooter().

+ Here is the caller graph for this function:

◆ displayNIC()

ilSetupGUI::displayNIC (   $a_omit_init = false)

display nic registration form and process form input

Definition at line 3266 of file class.ilSetupGUI.php.

3267 {
3268 $this->checkDisplayMode("nic_registration");
3269 $settings = $this->setup->getClient()->getAllSettings();
3270 $nic_key = $this->setup->getClient()->getNICkey();
3271
3272 // reload settings
3273 $settings = $this->setup->getClient()->getAllSettings();
3274//var_dump($settings);
3275 if ($settings["nic_enabled"] == "1" && $settings["inst_id"] > 0)
3276 {
3277 $this->no_second_nav = true;
3278 $this->tpl->setVariable("TXT_INFO",$this->lng->txt("info_text_nic3")." ".$settings["inst_id"].".");
3279 }
3280 else
3281 {
3282 // reload settings
3283 $settings = $this->setup->getClient()->getAllSettings();
3284
3285 $this->tpl->setVariable("TXT_INFO", $this->lng->txt("info_text_nic"));
3286 if (!$a_omit_init)
3287 {
3288 $this->initRegistrationForm();
3289 $this->getRegistrationValues();
3290 }
3291 $this->tpl->setVariable("SETUP_CONTENT", $this->form->getHTML());
3292
3293 if (isset($settings["nic_enabled"]))
3294 {
3295 $this->setup->getClient()->status["nic"]["status"] = true;
3296 }
3297
3298 }
3299
3300 $this->setButtonPrev("proxy");
3301
3302 if ($this->setup->getClient()->status["nic"]["status"])
3303 {
3304 $this->setButtonNext("finish","finish");
3305 }
3306
3307 $this->checkPanelMode();
3308 }
initRegistrationForm($a_mode="edit")
Init registration form.
getRegistrationValues()
Get current values for registration from.

References checkDisplayMode(), checkPanelMode(), getRegistrationValues(), and initRegistrationForm().

Referenced by cmdClient(), jumpToFirstUnfinishedSetupStep(), and saveRegistration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayPreliminaries()

ilSetupGUI::displayPreliminaries ( )

display preliminaries page

Definition at line 855 of file class.ilSetupGUI.php.

856 {
857 $OK = "<font color=\"green\"><strong>OK</strong></font>";
858 $FAILED = "<strong><font color=\"red\">FAILED</font></strong>";
859
860 $this->tpl->addBlockFile("CONTENT","content","tpl.preliminaries.html", "setup");
861
862 $this->tpl->setVariable("TXT_SETUP_TITLE",$this->lng->txt("ilias_setup"));
863 $this->tpl->setVariable("TXT_SETUP_WELCOME", $this->lng->txt("setup_welcome"));
864 $this->tpl->setVariable("TXT_SETUP_INIFILE_DESC", $this->lng->txt("setup_inifile_desc"));
865 $this->tpl->setVariable("TXT_SETUP_DATABASE_DESC", $this->lng->txt("setup_database_desc"));
866 $this->tpl->setVariable("TXT_SETUP_LANGUAGES_DESC", $this->lng->txt("setup_languages_desc"));
867 $this->tpl->setVariable("TXT_SETUP_PASSWORD_DESC", $this->lng->txt("setup_password_desc"));
868 $this->tpl->setVariable("TXT_SETUP_NIC_DESC", $this->lng->txt("setup_nic_desc"));
869
870 $server_os = php_uname();
871 $server_web = $_SERVER["SERVER_SOFTWARE"];
872 $environment = $this->lng->txt("env_using")." ".$server_os." <br/>".$this->lng->txt("with")." ".$server_web;
873
874 if ((stristr($server_os,"linux") || stristr($server_os,"windows")) && stristr($server_web,"apache"))
875 {
876 $env_comment = $this->lng->txt("env_ok");
877 }
878 else
879 {
880 $env_comment = "<font color=\"red\">".$this->lng->txt("env_warning")."</font>";
881 }
882
883 $this->tpl->setVariable("TXT_ENV_TITLE", $this->lng->txt("environment"));
884 $this->tpl->setVariable("TXT_ENV_INTRO", $environment);
885 $this->tpl->setVariable("TXT_ENV_COMMENT", $env_comment);
886
887 $this->tpl->setVariable("TXT_PRE_TITLE", $this->lng->txt("preliminaries"));
888 $this->tpl->setVariable("TXT_PRE_INTRO", $this->lng->txt("pre_intro"));
889
890 $preliminaries = array("php", "root", "folder_create",
891 "cookies_enabled", "dom", "xsl", "gd", "memory");
892 if ($this->setup->hasOpCacheEnabled()) {
893 $preliminaries[] = 'load_comments';
894 }
895
896 foreach ($preliminaries as $preliminary)
897 {
898 $this->tpl->setCurrentBlock("preliminary");
899 $this->tpl->setVariable("TXT_PRE", $this->lng->txt("pre_".$preliminary));
900 if ($this->setup->preliminaries_result[$preliminary]["status"] == true)
901 {
902 $this->tpl->setVariable("STATUS_PRE", $OK);
903 }
904 else
905 {
906 $this->tpl->setVariable("STATUS_PRE", $FAILED);
907 }
908 $this->tpl->setVariable("COMMENT_PRE", $this->setup->preliminaries_result[$preliminary]["comment"]);
909 $this->tpl->parseCurrentBlock();
910 }
911
912 // summary
913 if ($this->setup->preliminaries === true)
914 {
915 if ($this->setup->isInstalled())
916 {
917 $cmd = "mastersettings";
918 }
919 else
920 {
921 $cmd = "install";
922 }
923 $btn_text = ($this->cmd == "preliminaries") ? "" : "installation";
924//echo "-".$this->display_mode."-";
925 $this->setButtonNext($cmd,$btn_text);
926 }
927 else
928 {
929 $this->tpl->setCurrentBlock("premessage");
930 $this->tpl->setVariable("TXT_PRE_ERR", sprintf($this->lng->txt("pre_error"),
931 "http://www.ilias.de/docu/goto.php?target=pg_6531_367&client_id=docu"));
932 $this->tpl->parseCurrentBlock();
933 }
934 }

References $cmd.

Referenced by cmdAdmin(), and cmdInstall().

+ Here is the caller graph for this function:

◆ displayProcessPanel()

ilSetupGUI::displayProcessPanel ( )

display process panel

Definition at line 1928 of file class.ilSetupGUI.php.

1929 {
1930 include_once("./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php");
1931 $checklist = new ilChecklistGUI();
1932 $checklist->setHeading($this->lng->txt("setup_process_status"));
1933
1934
1935 $OK = "<font color=\"green\"><strong>OK</strong></font>";
1936
1937 $steps = array();
1938 $steps = $this->setup->getStatus();
1939
1940 // remove access step
1941 unset($steps["access"]);
1942
1943 $steps["ini"]["text"] = $this->lng->txt("setup_process_step_ini");
1944 $steps["db"]["text"] = $this->lng->txt("setup_process_step_db");
1945 //$steps["sess"]["text"] = $this->lng->txt("setup_process_step_sess");
1946 $steps["lang"]["text"] = $this->lng->txt("setup_process_step_lang");
1947 $steps["contact"]["text"] = $this->lng->txt("setup_process_step_contact");
1948 $steps["proxy"]["text"] = $this->lng->txt("setup_process_step_proxy");
1949 $steps["nic"]["text"] = $this->lng->txt("setup_process_step_nic");
1950 $steps["finish"]["text"] = $this->lng->txt("setup_process_step_finish");
1951
1952 $stpl = new ilTemplate("tpl.process_panel.html", true, true, "setup");
1953
1954 $num = 1;
1955
1956 foreach ($steps as $key => $val)
1957 {
1958 $stpl->setCurrentBlock("menu_row");
1959 $stpl->setVariable("TXT_STEP",$this->lng->txt("step")." ".$num.": &nbsp;");
1960 $stpl->setVariable("TXT_ACTION",$val["text"]);
1961 $stpl->setVariable("IMG_ARROW", "spacer.png");
1962
1963 if ($this->cmd == $key and isset($this->cmd))
1964 {
1965 $stpl->setVariable("HIGHLIGHT", " style=\"font-weight:bold;\"");
1966 }
1967
1968 $status = ($val["status"]) ? $OK : "";
1969
1970 $stpl->setVariable("TXT_STATUS",$status);
1971 $stpl->parseCurrentBlock();
1972
1973 $checklist->addEntry($num.". ".$val["text"], "",
1974 ($val["status"]) ?
1976 ($this->cmd == $key and isset($this->cmd)),
1977 "");
1978
1979 $num++;
1980 }
1981
1982 $stpl->setVariable("TXT_SETUP_PROCESS_STATUS",$this->lng->txt("setup_process_status"));
1983
1984 $this->tpl->setVariable("PROCESS_MENU", $checklist->getHTML());
1985 }
$steps
Definition: latex.php:3

References $steps, ilChecklistGUI\STATUS_NOT_OK, and ilChecklistGUI\STATUS_OK.

Referenced by checkPanelMode(), and displayStartup().

+ Here is the caller graph for this function:

◆ displayProxy()

ilSetupGUI::displayProxy (   $a_omit_init = false)

Definition at line 4193 of file class.ilSetupGUI.php.

4194 {
4195 $this->checkDisplayMode("proxy");
4196 $settings = $this->setup->getClient()->getAllSettings();
4197
4198 if (!$a_omit_init)
4199 {
4200 include_once("./Services/Administration/classes/class.ilSetting.php");
4201 $this->initProxyForm();
4202 $this->form->setValuesByArray(array(
4203 'proxy_status' => (bool)$settings['proxy_status'],
4204 'proxy_host' => $settings['proxy_host'],
4205 'proxy_port' => $settings['proxy_port']
4206 ));
4207 if((bool)$settings['proxy_status'])
4208 {
4209 $this->setup->printProxyStatus($this->setup->client);
4210 }
4211 }
4212 $this->tpl->setVariable("SETUP_CONTENT", $this->form->getHTML());
4213 $this->tpl->setVariable("TXT_INFO", $this->lng->txt("info_text_proxy"));
4214
4215
4216 $check = $this->setup->checkClientProxySettings($this->setup->client);
4217
4218 $this->setup->getClient()->status["proxy"]["status"] = $check["status"];
4219 $this->setup->getClient()->status["proxy"]["comment"] = $check["comment"];
4220 $this->setup->getClient()->status["proxy"]["text"] = $check["comment"];
4221
4222 if ($check["status"])
4223 {
4224 $this->setButtonNext("nic");
4225 }
4226
4227 $this->setButtonPrev("contact");
4228 $this->checkPanelMode();
4229 }

References checkDisplayMode(), checkPanelMode(), and initProxyForm().

Referenced by cmdClient(), jumpToFirstUnfinishedSetupStep(), and saveProxy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displaySessions()

ilSetupGUI::displaySessions ( )

display sessions form and process form input

Definition at line 2845 of file class.ilSetupGUI.php.

2846 {
2847 require_once('Services/Authentication/classes/class.ilSessionControl.php');
2848
2849 $this->checkDisplayMode("setup_sessions");
2850
2851 if (!$this->setup->getClient()->db_installed)
2852 {
2853 // program should never come to this place
2854 $message = "No database found! Please install database first.";
2855 ilUtil::sendInfo($message);
2856 }
2857
2858 $setting_fields = ilSessionControl::getSettingFields();
2859
2860 $valid = true;
2861 $settings = array();
2862
2863 foreach( $setting_fields as $field )
2864 {
2865 if( $field == 'session_allow_client_maintenance' )
2866 {
2867 if( isset($_POST[$field]) ) $_POST[$field] = '1';
2868 else $_POST[$field] = '0';
2869 }
2870
2871 if( isset($_POST[$field]) && $_POST[$field] != '' )
2872 {
2873 $settings[$field] = $_POST[$field];
2874 }
2875 else
2876 {
2877 $valid = false;
2878 break;
2879 }
2880
2881 }
2882
2883 if($valid) $this->setup->setSessionSettings($settings);
2884
2885 $settings = $this->setup->getSessionSettings();
2886
2887 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
2888 $form = new ilPropertyFormGUI();
2889
2890 include_once 'Services/Authentication/classes/class.ilSession.php';
2891
2892 // BEGIN SESSION SETTINGS
2893 // create session handling radio group
2894 $ssettings = new ilRadioGroupInputGUI($this->lng->txt('sess_mode'), 'session_handling_type');
2895 $ssettings->setValue($settings['session_handling_type'], ilSession::SESSION_HANDLING_FIXED);
2896
2897 // first option, fixed session duration
2898 $fixed = new ilRadioOption($this->lng->txt('sess_fixed_duration'), ilSession::SESSION_HANDLING_FIXED);
2899
2900 // add session handling to radio group
2901 $ssettings->addOption($fixed);
2902
2903 // second option, session control
2904 $ldsh = new ilRadioOption($this->lng->txt('sess_load_dependent_session_handling'), ilSession::SESSION_HANDLING_LOAD_DEPENDENT);
2905
2906 // this is the max count of active sessions
2907 // that are getting started simlutanously
2908 $ti = new ilTextInputGUI($this->lng->txt('sess_max_session_count'), "session_max_count");
2909 $ti->setInfo($this->lng->txt('sess_max_session_count_info'));
2910 $ti->setMaxLength(5);
2911 $ti->setSize(5);
2912 $ti->setValue($settings['session_max_count']);
2913 $ldsh->addSubItem($ti);
2914
2915 // after this (min) idle time the session can be deleted,
2916 // if there are further requests for new sessions,
2917 // but max session count is reached yet
2918 $ti = new ilTextInputGUI($this->lng->txt('sess_min_session_idle'), "session_min_idle");
2919 $ti->setInfo($this->lng->txt('sess_min_session_idle_info'));
2920 $ti->setMaxLength(5);
2921 $ti->setSize(5);
2922 $ti->setValue($settings['session_min_idle']);
2923 $ldsh->addSubItem($ti);
2924
2925 // after this (max) idle timeout the session expires
2926 // and become invalid, so it is not considered anymore
2927 // when calculating current count of active sessions
2928 $ti = new ilTextInputGUI($this->lng->txt('sess_max_session_idle'), "session_max_idle");
2929 $ti->setInfo($this->lng->txt('sess_max_session_idle_info'));
2930 $ti->setMaxLength(5);
2931 $ti->setSize(5);
2932 $ti->setValue($settings['session_max_idle']);
2933 $ldsh->addSubItem($ti);
2934
2935 // this is the max duration that can elapse between the first and the secnd
2936 // request to the system before the session is immidietly deleted
2937 $ti = new ilTextInputGUI($this->lng->txt('sess_max_session_idle_after_first_request'), "session_max_idle_after_first_request");
2938 $ti->setInfo($this->lng->txt('sess_max_session_idle_after_first_request_info'));
2939 $ti->setMaxLength(5);
2940 $ti->setSize(5);
2941 $ti->setValue($settings['session_max_idle_after_first_request']);
2942 $ldsh->addSubItem($ti);
2943
2944 // add session control to radio group
2945 $ssettings->addOption($ldsh);
2946
2947 $form->addItem($ssettings);
2948
2949 // controls the ability t maintenance the following
2950 // settings in client administration
2951 $chkb = new ilCheckboxInputGUI($this->lng->txt('sess_allow_client_maintenance'), "session_allow_client_maintenance");
2952 $chkb->setInfo($this->lng->txt('sess_allow_client_maintenance_info'));
2953 $chkb->setChecked($settings['session_allow_client_maintenance'] ? true : false);
2954 $form->addItem($chkb);
2955 // END SESSION SETTINGS
2956
2957 // save and cancel commands
2958 $form->addCommandButton("sess", $this->lng->txt('save'));
2959
2960 $form->setTitle($this->lng->txt("sess_sessions"));
2961 $form->setFormAction('setup.php?client_id='.$this->client_id.'&cmd=sess');
2962
2963 $this->tpl->setVariable("TXT_SETUP_TITLE",ucfirst(trim($this->lng->txt('sess_sessions'))));
2964 $this->tpl->setVariable("TXT_INFO", '');
2965 $this->tpl->setVariable("SETUP_CONTENT", $form->getHTML());
2966
2967 /*$this->setButtonPrev("db");
2968
2969 if($this->setup->checkClientSessionSettings($this->client,true))
2970 {
2971 $this->setButtonNext("lang");
2972 }*/
2973
2974 $this->checkPanelMode();
2975 }
This class represents a property in a property form.
This class represents an option in a radio group.
static getSettingFields()
returns the array of setting fields
const SESSION_HANDLING_LOAD_DEPENDENT
const SESSION_HANDLING_FIXED
This class represents a text property in a property form.
$valid

References $_POST, $valid, checkDisplayMode(), checkPanelMode(), ilSessionControl\getSettingFields(), ilUtil\sendInfo(), ilSession\SESSION_HANDLING_FIXED, and ilSession\SESSION_HANDLING_LOAD_DEPENDENT.

Referenced by cmdClient().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayStartup()

ilSetupGUI::displayStartup ( )

display intro page for the first client installation

Definition at line 2089 of file class.ilSetupGUI.php.

2090 {
2091 $this->tpl->addBlockFile("CONTENT","content","tpl.clientsetup.html", "setup");
2092
2093 $this->tpl->setVariable("TXT_INFO",$this->lng->txt("info_text_first_client"));
2094 $this->tpl->setVariable("TXT_HEADER",$this->lng->txt("setup_first_client"));
2095
2096 $this->displayProcessPanel();
2097
2098 $this->setButtonNext("ini");
2099 }

References displayProcessPanel().

Referenced by cmdAdmin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayStatusPanel()

ilSetupGUI::displayStatusPanel ( )

display status panel

Definition at line 1990 of file class.ilSetupGUI.php.

1991 {
1992 include_once("./Services/UIComponent/Checklist/classes/class.ilChecklistGUI.php");
1993 $checklist = new ilChecklistGUI();
1994 $checklist->setHeading($this->lng->txt("overall_status"));
1995
1996 $OK = "<font color=\"green\"><strong>OK</strong></font>";
1997
1998 //$this->tpl->addBlockFile("STATUS_PANEL","status_panel","tpl.status_panel.html", "setup");
1999
2000 $this->tpl->setVariable("TXT_OVERALL_STATUS", $this->lng->txt("overall_status"));
2001 // display status
2002 if ($this->setup->getClient()->status)
2003 {
2004 foreach ($this->setup->getClient()->status as $key => $val)
2005 {
2006 $status = ($val["status"]) ? $OK : "&nbsp;";
2007// $this->tpl->setCurrentBlock("status_row");
2008// $this->tpl->setVariable("TXT_STEP", $this->lng->txt("step_".$key));
2009// $this->tpl->setVariable("TXT_STATUS",$status);
2010
2011
2012// $this->tpl->setVariable("TXT_COMMENT",$val["comment"]);
2013// $this->tpl->parseCurrentBlock();
2014
2015 $checklist->addEntry($this->lng->txt("step_".$key), "",
2016 ($val["status"]) ?
2018 }
2019 }
2020 $this->tpl->setVariable("STATUS_PANEL", $checklist->getHTML());
2021 }

References ilChecklistGUI\STATUS_NO_STATUS, and ilChecklistGUI\STATUS_OK.

Referenced by checkPanelMode(), and displayClientOverview().

+ Here is the caller graph for this function:

◆ displaySubTabs()

ilSetupGUI::displaySubTabs ( )

Show subtabs.

Parameters

return

Definition at line 2058 of file class.ilSetupGUI.php.

2059 {
2060 $sub_tab_html = $this->tabs->getSubTabHTML();
2061 if ($sub_tab_html != "")
2062 {
2063 $this->tpl->setVariable("SUBTABS", $sub_tab_html);
2064 }
2065
2066 }

Referenced by displayDatabase(), and displayDatabaseSlave().

+ Here is the caller graph for this function:

◆ displayTools()

ilSetupGUI::displayTools ( )

display tools

Definition at line 3431 of file class.ilSetupGUI.php.

3432 {
3433 $this->checkDisplayMode();
3434
3435 // output
3437
3438 // use property forms and add the settings type switch
3439 $ctrl_structure_form = $this->initControlStructureForm();
3440 $settings_type_form = $this->initSettingsTypeForm();
3441 $mp_ns_form = $this->initTreeImplementationForm();
3442
3443 $this->tpl->setVariable("SETUP_CONTENT",
3444 $ctrl_structure_form->getHTML() . "<br />" .
3445 $settings_type_form->getHTML().'<br />'.
3446 $mp_ns_form->getHTML());
3447
3448 }
initControlStructureForm()
Init the form to reload the control structure.
initSettingsTypeForm()
Init the form to change the settings value type.

References checkDisplayMode(), initControlStructureForm(), initSettingsTypeForm(), initTreeImplementationForm(), and ilUtil\sendInfo().

Referenced by changeSettingsType(), cmdClient(), reloadControlStructure(), showLongerSettings(), and switchTree().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBasicSettingsValues()

ilSetupGUI::getBasicSettingsValues ( )

Get current values for basic settings from.

Definition at line 1188 of file class.ilSetupGUI.php.

1189 {
1190 $values = array();
1191
1192 $values["webspace_dir"] = getcwd()."/data";
1193 $values["data_dir"] = $this->setup->ini->readVariable("clients","datadir");
1194 $values["convert_path"] = $this->setup->ini->readVariable("tools","convert");
1195 $values["zip_path"] = $this->setup->ini->readVariable("tools","zip");
1196 $values["unzip_path"] = $this->setup->ini->readVariable("tools","unzip");
1197 $values["ghostscript_path"] = $this->setup->ini->readVariable("tools","ghostscript");
1198 $values["java_path"] = $this->setup->ini->readVariable("tools","java");
1199 $values["htmldoc_path"] = $this->setup->ini->readVariable("tools","htmldoc");
1200 //$values["mkisofs_path"] = $this->setup->ini->readVariable("tools","mkisofs");
1201 $values["ffmpeg_path"] = $this->setup->ini->readVariable("tools","ffmpeg");
1202 $values["latex_url"] = $this->setup->ini->readVariable("tools","latex");
1203 $values["fop_path"] = $this->setup->ini->readVariable("tools","fop");
1204 $values["vscanner_type"] = $this->setup->ini->readVariable("tools", "vscantype");
1205 $values["scan_command"] = $this->setup->ini->readVariable("tools", "scancommand");
1206 $values["clean_command"] = $this->setup->ini->readVariable("tools", "cleancommand");
1207 $values["log_path"] = $this->setup->ini->readVariable("log","path")."/".
1208 $this->setup->ini->readVariable("log","file");
1209 $values["chk_log_status"] = !$this->setup->ini->readVariable("log","enabled");
1210 $values["time_zone"] = $this->setup->ini->readVariable("server", "timezone");
1211
1212 // https settings
1213 $values["auto_https_detect_enabled"] = $this->setup->ini->readVariable("https", "auto_https_detect_enabled");
1214 $values["auto_https_detect_header_name"] = $this->setup->ini->readVariable("https", "auto_https_detect_header_name");
1215 $values["auto_https_detect_header_value"] = $this->setup->ini->readVariable("https", "auto_https_detect_header_value");
1216
1217 $this->form->setValuesByArray($values);
1218 }

Referenced by changeMasterSettings().

+ Here is the caller graph for this function:

◆ getClientDbFormValues()

ilSetupGUI::getClientDbFormValues (   $dbupdate = null)

Get current values for client db from.

Definition at line 2593 of file class.ilSetupGUI.php.

2594 {
2595 global $lng;
2596
2597 $values = array();
2598
2599 $values["db_host"] = $this->setup->getClient()->getDbHost();
2600 $values["db_name"] = $this->setup->getClient()->getDbName();
2601 $values["db_user"] = $this->setup->getClient()->getDbUser();
2602 $values["db_port"] = $this->setup->getClient()->getDbPort();
2603 $values["db_type"] = $lng->txt("db_".$this->setup->getClient()->getDbType());
2604 if (is_object($dbupdate))
2605 {
2606 $values["update_break"] = $dbupdate->fileVersion;
2607 if (($dbupdate->fileVersion - $dbupdate->currentVersion) >= 200)
2608 {
2609 $values["update_break"] = $dbupdate->currentVersion + 200 -
2610 ($dbupdate->currentVersion % 100);
2611 }
2612 }
2613
2614 $this->form->setValuesByArray($values);
2615 }

References $lng.

Referenced by displayDatabase().

+ Here is the caller graph for this function:

◆ getClientIniValues()

ilSetupGUI::getClientIniValues ( )

Get current values for client ini from.

Definition at line 1750 of file class.ilSetupGUI.php.

1751 {
1752 $values = array();
1753
1754 $values["db_host"] = $this->setup->getClient()->getDbHost();
1755 $values["db_user"] = $this->setup->getClient()->getDbUser();
1756 $values["db_port"] = $this->setup->getClient()->getDbPort();
1757 $values["db_pass"] = $this->setup->getClient()->getDbPass();
1758 $values["db_name"] = $this->setup->getClient()->getDbName();
1759 $values["client_id"] = $this->setup->getClient()->getId();
1760
1761 $this->form->setValuesByArray($values);
1762 }

Referenced by displayIni().

+ Here is the caller graph for this function:

◆ getContactValues()

ilSetupGUI::getContactValues ( )

Get current values for contact from.

Definition at line 3205 of file class.ilSetupGUI.php.

3206 {
3207
3208 $settings = $this->setup->getClient()->getAllSettings();
3209
3210 $values = $settings;
3211
3212 $values["inst_name"] = ($this->setup->getClient()->getName())
3213 ? $this->setup->getClient()->getName()
3214 : $this->setup->getClient()->getId();
3215 $values["inst_info"] = $this->setup->getClient()->getDescription();
3216
3217 $this->form->setValuesByArray($values);
3218 }

Referenced by displayContactData().

+ Here is the caller graph for this function:

◆ getRegistrationValues()

ilSetupGUI::getRegistrationValues ( )

Get current values for registration from.

Definition at line 3338 of file class.ilSetupGUI.php.

3339 {
3340 $settings = $this->setup->getClient()->getAllSettings();
3341 $nic_key = $this->setup->getClient()->getNICkey();
3342
3343
3344 $values = array();
3345
3346 if (!isset($settings["nic_enabled"]) or $settings["nic_enabled"] == "1")
3347 {
3348 $values["register"] = 1;
3349 }
3350 /*elseif ($settings["nic_enabled"] == "2")
3351 {
3352 $this->tpl->setVariable("EMAIL",$checked);
3353 }*/
3354 else
3355 {
3356 $values["register"] = 0;
3357 }
3358
3359 $this->form->setValuesByArray($values);
3360 }

Referenced by displayNIC().

+ Here is the caller graph for this function:

◆ ilSetupGUI()

ilSetupGUI::ilSetupGUI ( )

Constructor.

Definition at line 39 of file class.ilSetupGUI.php.

40 {
41 global $tpl, $lng;
42
43 $this->tpl = $tpl;
44 $this->lng = $lng;
45
46 // note: this is currently only used for subtabs, alex 8.1.2012
47 include_once("./Services/UIComponent/Tabs/classes/class.ilTabsGUI.php");
48 $this->tabs = new ilTabsGUI();
49 $this->tabs->setSetupMode(true);
50
51 include_once("./Services/jQuery/classes/class.iljQueryUtil.php");
52 iljQueryUtil::initjQuery($this->tpl);
53 include_once("./Services/YUI/classes/class.ilYuiUtil.php");
55
56 $tpl->addJavaScript("./Services/JavaScript/js/Basic.js", 0);
57
58 include_once("./Services/UICore/classes/class.ilUIFramework.php");
59 ilUIFramework::init($this->tpl);
60
61 // CVS - REVISION - DO NOT MODIFY
62 $this->revision = '$Revision$';
63 $this->version = "2 ".substr(substr($this->revision,1),0,-2);
64 $this->lang = $this->lng->lang_key;
65
66 // init setup
67 $this->setup = new ilSetup($_SESSION["auth"],$_SESSION["access_mode"]);
68
69 // init client object if exists
70 $client_id = ($_GET["client_id"]) ? $_GET["client_id"] : $_SESSION["ClientId"];
71 if ($_POST["client_id"] != "")
72 {
73 $client_id = $_POST["client_id"];
74 }
75
76/*if ($_POST["client_id"] == "")
77{
78echo "<br>+".$_GET["client_id"];
79echo "<br>+".$_POST["client_id"];
80echo "<br>+".$_SESSION["ClientId"];
81echo "<br>+".$client_id;
82}*/
83 // for security
84 if (!$this->setup->isAdmin() and $client_id != $_SESSION["ClientId"])
85 {
86 $client_id = $_SESSION["ClientId"];
87 }
88
89 $this->client_id = $client_id;
90
91 $this->setup->ini_client_exists = $this->setup->newClient($client_id);
92 if (is_object($this->setup->getClient()))
93 {
94 $this->setup->getClient()->status = $this->setup->getStatus($client_id);
95 }
96
97 // determine command
98 if (($this->cmd = $_GET["cmd"]) == "gateway")
99 {
100 // surpress warning if POST is not set
101 @$this->cmd = key($_POST["cmd"]);
102 }
103
104 // determine display mode here
105 // TODO: depending on previous setting (session)
106 // OR switch to 'setup'-mode if someone logs in as client and client's setup wasn't finished (-> entry in settings table does not exist)
107 if ($this->setup->isAuthenticated() and !$this->setup->getClient()->status["finish"]["status"] and $this->cmd != "clientlist" and $this->cmd != "")
108 {
109 $this->setDisplayMode("setup");
110 }
111 else
112 {
113 $this->setDisplayMode($_SESSION["display_mode"]);
114 }
115
116 // output starts here
117
118
119 // main cmd handling
120 if (!$this->setup->isAuthenticated() or !$this->setup->isInstalled())
121 {
122 // check for first time installation or migrate an old one first
123 if (!$this->setup->isInstalled() or !($this->setup->ini->readVariable("clients","path")))
124 {
125 $this->cmdInstall();
126 }
127 else
128 {
129 if ($this->cmd == "performLogin" || $this->cmd == "performMLogin")
130 {
132 $this->$cmd();
133 }
134 else
135 {
136 $this->displayLogin();
137 }
138 }
139 }
140 else
141 {
142 if ($this->setup->isAdmin())
143 {
144 $this->cmdAdmin();
145 }
146 else
147 {
148 $this->cmdClient();
149 }
150 }
151
152 // display header
153 $this->displayHeader();
154
155 if (DEBUG)
156 {
157 echo "cmd: ".$this->cmd." | access: ".$this->setup->access_mode." | display: ".$this->display_mode;
158 var_dump($this->setup->getClient()->status);
159 }
160
161 // display footer
162 $this->displayFooter();
163
164 // end output
165
166 } // end constructor
cmdInstall()
process valid commands for pre-installation status
displayHeader()
display header with admin links and language flags
displayLogin($a_omit_minit=false, $a_omit_cinit=false)
display login form and process form
cmdAdmin()
process valid commands for admins
displayFooter()
page output and set title
Setup class.
Tabs GUI.
init($a_tpl=null)
Init.
static initDomEvent()
Init YUI DomEvent.
static initjQuery($a_tpl=null)
Init jQuery.
$client_id
const DEBUG

References $_GET, $_POST, $_SESSION, $client_id, $cmd, $display_mode, $lng, $tpl, cmdAdmin(), cmdClient(), cmdInstall(), DEBUG, displayFooter(), displayHeader(), displayLogin(), ilUIFramework\init(), ilYuiUtil\initDomEvent(), iljQueryUtil\initjQuery(), and setDisplayMode().

+ Here is the call graph for this function:

◆ initBasicSettingsForm()

ilSetupGUI::initBasicSettingsForm (   $a_install = false)

Init basic settings form.

Definition at line 988 of file class.ilSetupGUI.php.

989 {
990 global $lng, $ilCtrl;
991
992 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
993 $this->form = new ilPropertyFormGUI();
994
995 // webspace dir
996 $ne = new ilNonEditableValueGUI($lng->txt("data_directory_in_ws"), "webspace_dir");
997 if ($a_install)
998 {
999 $ne->setInfo($this->lng->txt("data_directory_in_ws_info"));
1000 }
1001 $cwd = ilUtil::isWindows()
1002 ? str_replace("\\", "/", getcwd())
1003 : getcwd();
1004
1005 $ne->setValue($cwd."/data");
1006 $this->form->addItem($ne);
1007
1008 // data dir
1009 if ($a_install)
1010 {
1011 $ti = new ilTextInputGUI($lng->txt("data_directory_outside_ws"), "datadir_path");
1012 $ti->setInfo($lng->txt("data_directory_info"));
1013 $ti->setRequired(true);
1014 $this->form->addItem($ti);
1015 }
1016 else
1017 {
1018 $ne = new ilNonEditableValueGUI($lng->txt("data_directory_outside_ws"), "data_dir");
1019 $this->form->addItem($ne);
1020 }
1021
1022 $lvext = (ilUtil::isWindows())
1023 ? "_win"
1024 : "";
1025
1026
1027 // logging
1028 $sh = new ilFormSectionHeaderGUI();
1029 $sh->setTitle($lng->txt("logging"));
1030 $this->form->addItem($sh);
1031
1032 // path to log file
1033 $ti = new ilTextInputGUI($lng->txt("log_path"), "log_path");
1034 $ti->setInfo($lng->txt("log_path_comment".$lvext));
1035 $this->form->addItem($ti);
1036
1037 // disable logging
1038 $cb = new ilCheckboxInputGUI($lng->txt("disable_logging"), "chk_log_status");
1039 $this->form->addItem($cb);
1040
1041 // server settings
1042 $sh = new ilFormSectionHeaderGUI();
1043 $sh->setTitle($lng->txt("server_settings"));
1044 $this->form->addItem($sh);
1045
1046 // time zone
1047 include_once("./Services/Calendar/classes/class.ilCalendarUtil.php");
1048 $si = new ilSelectInputGUI($lng->txt("time_zone"), "time_zone");
1049 $si->setOptions(array_merge(
1050 array("" => "-- ".$lng->txt("please_select")." --"),
1052 $si->setRequired(true);
1053 $this->form->addItem($si);
1054
1055 // https settings
1056 $sh = new ilFormSectionHeaderGUI();
1057 $sh->setTitle($lng->txt("https_settings"));
1058 $this->form->addItem($sh);
1059
1060 $check = new ilCheckboxInputGUI($lng->txt('ps_auto_https'),'auto_https_detect_enabled');
1061 $check->setOptionTitle($lng->txt('ps_auto_https_description'));
1062 $check->setValue(1);
1063
1064 $text = new ilTextInputGUI($lng->txt('ps_auto_https_header_name'),'auto_https_detect_header_name');
1065 $text->setSize(24);
1066 $text->setMaxLength(64);
1067 $text->setRequired(true);
1068 $check->addSubItem($text);
1069
1070 $text = new ilTextInputGUI($lng->txt('ps_auto_https_header_value'),'auto_https_detect_header_value');
1071 $text->setSize(24);
1072 $text->setMaxLength(64);
1073 $text->setRequired(true);
1074 $check->addSubItem($text);
1075
1076 $this->form->addItem($check);
1077
1078 // required 3rd party tools
1079 $sh = new ilFormSectionHeaderGUI();
1080 $sh->setTitle($lng->txt("3rd_party_software_req"));
1081 $this->form->addItem($sh);
1082
1083 // convert path
1084 $ti = new ilTextInputGUI($lng->txt("convert_path"), "convert_path");
1085 $ti->setInfo($lng->txt("convert_path_comment".$lvext));
1086 $ti->setRequired(true);
1087 $this->form->addItem($ti);
1088
1089 // zip path
1090 $ti = new ilTextInputGUI($lng->txt("zip_path"), "zip_path");
1091 $ti->setInfo($lng->txt("zip_path_comment".$lvext));
1092 $ti->setRequired(true);
1093 $this->form->addItem($ti);
1094
1095 // unzip path
1096 $ti = new ilTextInputGUI($lng->txt("unzip_path"), "unzip_path");
1097 $ti->setInfo($lng->txt("unzip_path_comment".$lvext));
1098 $ti->setRequired(true);
1099 $this->form->addItem($ti);
1100
1101 // optional 3rd party tools
1102 $sh = new ilFormSectionHeaderGUI();
1103 $sh->setTitle($lng->txt("3rd_party_software_opt"));
1104 $this->form->addItem($sh);
1105
1106 // ghostscript path
1107 $ti = new ilTextInputGUI($lng->txt("ghostscript_path"), "ghostscript_path");
1108 $ti->setInfo($lng->txt("ghostscript_path_comment".$lvext));
1109 $this->form->addItem($ti);
1110
1111 // java path
1112 $ti = new ilTextInputGUI($lng->txt("java_path"), "java_path");
1113 $ti->setInfo($lng->txt("java_path_comment".$lvext));
1114 $this->form->addItem($ti);
1115
1116 // htmldoc path
1117 $ti = new ilTextInputGUI($lng->txt("htmldoc_path"), "htmldoc_path");
1118 $ti->setInfo($lng->txt("htmldoc_path_comment".$lvext));
1119 $this->form->addItem($ti);
1120
1121 // ffmpeg path
1122 $ti = new ilTextInputGUI($lng->txt("ffmpeg_path"), "ffmpeg_path");
1123 $ti->setInfo($lng->txt("ffmpeg_path_comment"));
1124 $this->form->addItem($ti);
1125
1126 // latex
1127 $ti = new ilTextInputGUI($lng->txt("url_to_latex"), "latex_url");
1128 $ti->setInfo($lng->txt("latex_url_comment"));
1129 $this->form->addItem($ti);
1130
1131 // virus scanner
1132 $options = array(
1133 "none" => $lng->txt("none"),
1134 "sophos" => $lng->txt("sophos"),
1135 "antivir" => $lng->txt("antivir"),
1136 "clamav" => $lng->txt("clamav")
1137 );
1138 $si = new ilSelectInputGUI($lng->txt("virus_scanner"), "vscanner_type");
1139 $si->setOptions($options);
1140 $this->form->addItem($si);
1141
1142 // scan command
1143 $ti = new ilTextInputGUI($lng->txt("scan_command"), "scan_command");
1144 $this->form->addItem($ti);
1145
1146 // clean command
1147 $ti = new ilTextInputGUI($lng->txt("clean_command"), "clean_command");
1148 $this->form->addItem($ti);
1149
1150 if ($a_install)
1151 {
1152 $sh = new ilFormSectionHeaderGUI();
1153 $sh->setTitle($lng->txt("master_password"));
1154 $this->form->addItem($sh);
1155
1156 // password
1157 $pi = new ilPasswordInputGUI($lng->txt("password"), "password");
1158 $pi->setRequired(true);
1159 $pi->setSkipSyntaxCheck(true);
1160 $pi->setInfo($lng->txt("password_info"));
1161 $this->form->addItem($pi);
1162 }
1163
1164 if ($a_install)
1165 {
1166 $this->form->addCommandButton("saveBasicSettings", $lng->txt("save"));
1167 }
1168 else
1169 {
1170 $this->form->addCommandButton("updateBasicSettings", $lng->txt("save"));
1171 $this->form->addCommandButton("determineToolsPath", $lng->txt("determine_tools_paths"));
1172 }
1173
1174 $this->form->setTitle($lng->txt("data_directories"));
1175 $this->form->setFormAction("setup.php?cmd=gateway");
1176
1177 if ($a_install)
1178 {
1179 $det = $this->determineTools();
1180 $this->form->setValuesByArray($det);
1181 }
1182
1183 }
static _getShortTimeZoneList()
get short timezone list
This class represents a section header in a property form.
This class represents a non editable value in a property form.
This class represents a password property in a property form.
if(!is_array($argv)) $options

References $ilCtrl, $lng, $options, $si, ilCalendarUtil\_getShortTimeZoneList(), determineTools(), and ilUtil\isWindows().

Referenced by changeMasterSettings(), displayMasterSetup(), saveBasicSettings(), and updateBasicSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initClientDbForm()

ilSetupGUI::initClientDbForm (   $a_install = true,
  $dbupdate = null,
  $db_status = false,
  $hotfix_available = false,
  $custom_updates_available = false 
)

Init client db form.

Definition at line 2396 of file class.ilSetupGUI.php.

2397 {
2398 global $lng, $ilCtrl;
2399
2400 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
2401 $this->form = new ilPropertyFormGUI();
2402
2403 // type
2404 $ne = new ilNonEditableValueGUI($lng->txt("db_type"), "db_type");
2405 $this->form->addItem($ne);
2406
2407 // version
2408 if ($this->setup->getClient()->getDBType() == "mysql" ||
2409 $this->setup->getClient()->getDBType() == "innodb")
2410 {
2411 $ne = new ilNonEditableValueGUI($lng->txt("version"), "db_version");
2412 $ilDB = $this->setup->getClient()->db;
2413 $ne->setValue($ilDB->getDBVersion());
2414 $this->form->addItem($ne);
2415 }
2416
2417 // host
2418 $ne = new ilNonEditableValueGUI($lng->txt("host"), "db_host");
2419 $this->form->addItem($ne);
2420
2421 // name
2422 $ne = new ilNonEditableValueGUI($lng->txt("name"), "db_name");
2423 $this->form->addItem($ne);
2424
2425 // user
2426 $ne = new ilNonEditableValueGUI($lng->txt("user"), "db_user");
2427 $this->form->addItem($ne);
2428
2429 // port
2430 $ne = new ilNonEditableValueGUI($lng->txt("port"), "db_port");
2431 $this->form->addItem($ne);
2432
2433 // creation / collation for mysql
2434 if (($this->setup->getClient()->getDBType() == "mysql" ||
2435 $this->setup->getClient()->getDBType() == "innodb") && $a_install)
2436 {
2437 // create database
2438 $cb = new ilCheckboxInputGUI($lng->txt("database_create"), "chk_db_create");
2439
2440 // collation
2441 $collations = array
2442 (
2443 "utf8_unicode_ci",
2444 "utf8_general_ci",
2445 "utf8_czech_ci",
2446 "utf8_danish_ci",
2447 "utf8_estonian_ci",
2448 "utf8_icelandic_ci",
2449 "utf8_latvian_ci",
2450 "utf8_lithuanian_ci",
2451 "utf8_persian_ci",
2452 "utf8_polish_ci",
2453 "utf8_roman_ci",
2454 "utf8_romanian_ci",
2455 "utf8_slovak_ci",
2456 "utf8_slovenian_ci",
2457 "utf8_spanish2_ci",
2458 "utf8_spanish_ci",
2459 "utf8_swedish_ci",
2460 "utf8_turkish_ci"
2461 );
2462 foreach($collations as $collation)
2463 {
2464 $options[$collation] = $collation;
2465 }
2466 $si = new ilSelectInputGUI($lng->txt("collation"), "collation");
2467 $si->setOptions($options);
2468 $si->setInfo($this->lng->txt("info_text_db_collation2")." ".
2469 "<a target=\"_new\" href=\"http://dev.mysql.com/doc/mysql/en/charset-unicode-sets.html\">".
2470 " MySQL Reference Manual :: 10.11.1 Unicode Character Sets</a>");
2471 $cb->addSubItem($si);
2472
2473 $this->form->addItem($cb);
2474 }
2475
2476 if ($a_install)
2477 {
2478 $this->form->addCommandButton("installDatabase", $lng->txt("database_install"));
2479 }
2480 else
2481 {
2482 $ilDB = $this->setup->getClient()->db;
2483 $this->lng->setDbHandler($ilDB);
2484 $dbupdate = new ilDBUpdate($ilDB);
2485
2486 // database version
2487 $ne = new ilNonEditableValueGUI($lng->txt("database_version"), "curv");
2488 $ne->setValue($dbupdate->currentVersion);
2489 $this->form->addItem($ne);
2490
2491 // file version
2492 $ne = new ilNonEditableValueGUI($lng->txt("file_version"), "filev");
2493 $ne->setValue($dbupdate->fileVersion);
2494 $this->form->addItem($ne);
2495
2496 if (!$db_status = $dbupdate->getDBVersionStatus())
2497 {
2498 // next update step
2499 $options = array();
2500 for ($i = $dbupdate->currentVersion + 1; $i <= $dbupdate->fileVersion; $i++)
2501 {
2502 $options[$i] = $i;
2503 }
2504 if (count($options) > 1)
2505 {
2506 $si = new ilSelectInputGUI($lng->txt("next_update_break"), "update_break");
2507 $si->setOptions($options);
2508 $si->setInfo($lng->txt("next_update_break_info"));
2509 $this->form->addItem($si);
2510 }
2511
2512 if ($dbupdate->getRunningStatus() > 0)
2513 {
2514 ilUtil::sendFailure($this->lng->txt("db_update_interrupted")."<br /><br />".
2515 $this->lng->txt("db_update_interrupted_avoid"));
2516 }
2517 else
2518 {
2519 ilUtil::sendInfo($this->lng->txt("database_needs_update"));
2520 }
2521 $this->form->addCommandButton("updateDatabase", $lng->txt("database_update"));
2522 $this->form->addCommandButton("showUpdateSteps", $lng->txt("show_update_steps"));
2523 }
2524 else if ($hotfix_available)
2525 {
2526 // hotfix current version
2527 $ne = new ilNonEditableValueGUI($lng->txt("applied_hotfixes"), "curhf");
2528 $ne->setValue($dbupdate->getHotfixCurrentVersion());
2529 $this->form->addItem($ne);
2530
2531 // hotfix file version
2532 $ne = new ilNonEditableValueGUI($lng->txt("available_hotfixes"), "filehf");
2533 $ne->setValue($dbupdate->getHotfixFileVersion());
2534 $this->form->addItem($ne);
2535
2536 $this->form->addCommandButton("applyHotfix", $lng->txt("apply_hotfixes"));
2537 $this->form->addCommandButton("showHotfixSteps", $lng->txt("show_update_steps"));
2538 ilUtil::sendInfo($this->lng->txt("database_needs_update"));
2539 }
2540 elseif($custom_updates_available)
2541 {
2542 // custom updates current version
2543 $ne = new ilNonEditableValueGUI($lng->txt("applied_custom_updates"), "curcu");
2544 $ne->setValue($dbupdate->getCustomUpdatesCurrentVersion());
2545 $this->form->addItem($ne);
2546
2547 // custom updates file version
2548 $ne = new ilNonEditableValueGUI($lng->txt("available_custom_updates"), "filecu");
2549 $ne->setValue($dbupdate->getCustomUpdatesFileVersion());
2550 $this->form->addItem($ne);
2551
2552 $this->form->addCommandButton("applyCustomUpdates", $lng->txt("apply_custom_updates"));
2553 ilUtil::sendInfo($this->lng->txt("database_needs_update"));
2554 }
2555 else
2556 {
2557 if ($dbupdate->getHotfixFileVersion() > 0)
2558 {
2559 // hotfix current version
2560 $ne = new ilNonEditableValueGUI($lng->txt("applied_hotfixes"), "curhf");
2561 $ne->setValue($dbupdate->getHotfixCurrentVersion());
2562 $this->form->addItem($ne);
2563
2564 // hotfix file version
2565 $ne = new ilNonEditableValueGUI($lng->txt("available_hotfixes"), "filehf");
2566 $ne->setValue($dbupdate->getHotfixFileVersion());
2567 $this->form->addItem($ne);
2568 }
2569 if ($dbupdate->getCustomUpdatesFileVersion() > 0)
2570 {
2571 // custom updates current version
2572 $ne = new ilNonEditableValueGUI($lng->txt("applied_custom_updates"), "curcu");
2573 $ne->setValue($dbupdate->getCustomUpdatesCurrentVersion());
2574 $this->form->addItem($ne);
2575
2576 // custom updates file version
2577 $ne = new ilNonEditableValueGUI($lng->txt("available_custom_updates"), "filecu");
2578 $ne->setValue($dbupdate->getCustomUpdatesFileVersion());
2579 $this->form->addItem($ne);
2580 }
2581 ilUtil::sendSuccess($this->lng->txt("database_is_uptodate"));
2582 }
2583 }
2584
2585 $this->form->setTitle($lng->txt("database"));
2586 $this->form->setFormAction("setup.php?cmd=gateway");
2587 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References $ilCtrl, $ilDB, $lng, $options, $si, ilUtil\sendFailure(), ilUtil\sendInfo(), and ilUtil\sendSuccess().

Referenced by displayDatabase().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initClientIniForm()

ilSetupGUI::initClientIniForm ( )

Init client ini form.

Definition at line 1670 of file class.ilSetupGUI.php.

1671 {
1672 global $lng, $ilCtrl;
1673
1674 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1675 $this->form = new ilPropertyFormGUI();
1676
1677 // client id
1678 if ($this->setup->ini_client_exists)
1679 {
1680 $hi = new ilHiddenInputGUI("client_id");
1681 $hi->setValue($this->client_id);
1682 $this->form->addItem($hi);
1683
1684 $ne = new ilNonEditableValueGUI($lng->txt("client_id"), "hh");
1685 $ne->setValue($this->client_id);
1686 $this->form->addItem($ne);
1687 }
1688 else
1689 {
1690 $ti = new ilTextInputGUI($lng->txt("client_id"), "client_id");
1691 $ti->setMaxLength(32);
1692 $ti->setRequired(true);
1693 $this->form->addItem($ti);
1694 }
1695
1696 // database connection
1697 $sh = new ilFormSectionHeaderGUI();
1698 $sh->setTitle($lng->txt("db_conn"));
1699 $this->form->addItem($sh);
1700
1701 // db type
1702 $ne = new ilNonEditableValueGUI($lng->txt("db_type"), "dbt");
1703 $ne->setValue($lng->txt("db_".$_SESSION["db_type"]));
1704 $this->form->addItem($ne);
1705
1706 // db host
1707 $ti = new ilTextInputGUI($lng->txt("db_host"), "db_host");
1708 $ti->setMaxLength(120);
1709 $ti->setRequired(true);
1710 $this->form->addItem($ti);
1711
1712 // db name
1713 if (in_array($_SESSION["db_type"], array("mysql", "postgres", "innodb")))
1714 {
1715 $ti = new ilTextInputGUI($lng->txt("db_name"), "db_name");
1716 $ti->setRequired(true);
1717 }
1718 else
1719 {
1720 $ti = new ilTextInputGUI($lng->txt("db_service_name"), "db_name");
1721 }
1722 $ti->setMaxLength(40);
1723 $this->form->addItem($ti);
1724
1725 // db user
1726 $ti = new ilTextInputGUI($lng->txt("db_user"), "db_user");
1727 $ti->setMaxLength(40);
1728 $ti->setRequired(true);
1729 $this->form->addItem($ti);
1730
1731 // db port
1732 $ti = new ilTextInputGUI($lng->txt("db_port"), "db_port");
1733 $ti->setMaxLength(8);
1734 $this->form->addItem($ti);
1735
1736 // db password
1737 $ti = new ilTextInputGUI($lng->txt("db_pass"), "db_pass");
1738 $ti->setMaxLength(40);
1739 $this->form->addItem($ti);
1740
1741 $this->form->addCommandButton("saveClientIni", $lng->txt("save"));
1742
1743 $this->form->setTitle($lng->txt("inst_identification"));
1744 $this->form->setFormAction("setup.php?cmd=gateway");
1745 }
This class represents a hidden form property in a property form.

References $_SESSION, $ilCtrl, and $lng.

Referenced by displayIni(), and saveClientIni().

+ Here is the caller graph for this function:

◆ initClientLoginForm()

ilSetupGUI::initClientLoginForm ( )

Init client login form.

Definition at line 1413 of file class.ilSetupGUI.php.

1414 {
1415 global $lng, $ilCtrl;
1416
1417 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1418 $this->form = new ilPropertyFormGUI();
1419 $this->form->setId("client_login");
1420
1421 // client id
1422 $ti = new ilTextInputGUI($lng->txt("client_id"), "client_id");
1423 $ti->setMaxLength(32);
1424 $ti->setSize(20);
1425 $this->form->addItem($ti);
1426
1427 // username
1428 $ti = new ilTextInputGUI($lng->txt("username"), "username");
1429 $ti->setSize(20);
1430 $this->form->addItem($ti);
1431
1432 // password
1433 $pi = new ilPasswordInputGUI($lng->txt("password"), "password");
1434 $pi->setSize(20);
1435 $pi->setRetype(false);
1436 $pi->setSkipSyntaxCheck(true);
1437 $this->form->addItem($pi);
1438
1439 $this->form->addCommandButton("performLogin", $lng->txt("login"));
1440
1441 $this->form->setTitle($lng->txt("client_login"));
1442 $this->form->setFormAction("setup.php?cmd=gateway");
1443 }

References $ilCtrl, and $lng.

Referenced by displayLogin(), and performLogin().

+ Here is the caller graph for this function:

◆ initClientOverviewForm()

ilSetupGUI::initClientOverviewForm ( )

Init client overview form.

Definition at line 725 of file class.ilSetupGUI.php.

726 {
727 global $lng, $ilCtrl;
728
729 $settings = $this->setup->getClient()->getAllSettings();
730
731 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
732 $this->form = new ilPropertyFormGUI();
733
734 $this->form->setTitle($lng->txt("client_info"));
735
736 // installation name
737 $ne = new ilNonEditableValueGUI($lng->txt("inst_name"), "inst_name");
738 $ne->setValue(($this->setup->getClient()->getName())
739 ? $this->setup->getClient()->getName()
740 : "&lt;".$this->lng->txt("no_client_name")."&gt;");
741 $ne->setInfo($this->setup->getClient()->getDescription());
742 $this->form->addItem($ne);
743
744 // client id
745 $ne = new ilNonEditableValueGUI($lng->txt("client_id"), "client_id");
746 $ne->setValue($this->setup->getClient()->getId());
747 $this->form->addItem($ne);
748
749 // nic id
750 $ne = new ilNonEditableValueGUI($lng->txt("ilias_nic_id"), "nic_id");
751 $ne->setValue(($this->setup->getClient()->db_installed)
752 ? $settings["inst_id"]
753 : $txt_no_database);
754 $this->form->addItem($ne);
755
756 // database version
757 $ne = new ilNonEditableValueGUI($lng->txt("db_version"), "db_vers");
758 $ne->setValue(($this->setup->getClient()->db_installed)
759 ? $settings["db_version"]
760 : $txt_no_database);
761 $this->form->addItem($ne);
762
763 // access status
764 $ne = new ilNonEditableValueGUI($lng->txt("access_status"), "status");
765 //$access_link = "&nbsp;&nbsp;[<a href=\"setup.php?cmd=changeaccess&client_id=".$this->setup->getClient()->getId()."&back=view\">".$this->lng->txt($access_button)."</a>]";
766 $access_status = ($this->setup->getClient()->status["access"]["status"]) ? "online" : "disabled";
767 $ne->setValue($this->lng->txt($access_status).$access_link);
768 $this->form->addItem($ne);
769
770 // server information
771 $sh = new ilFormSectionHeaderGUI();
772 $sh->setTitle($this->lng->txt("server_info"));
773 $this->form->addItem($sh);
774
775 // ilias version
776 $ne = new ilNonEditableValueGUI($lng->txt("ilias_version"), "il_vers");
777 $ne->setValue(ILIAS_VERSION);
778 $this->form->addItem($ne);
779
780 // host
781 $ne = new ilNonEditableValueGUI($lng->txt("host"), "host");
782 $ne->setValue($_SERVER["SERVER_NAME"]);
783 $this->form->addItem($ne);
784
785 // ip address and port
786 $ne = new ilNonEditableValueGUI($lng->txt("ip_address")." & ".
787 $lng->txt("port"));
788 $ne->setValue($_SERVER["SERVER_ADDR"].":".$_SERVER["SERVER_PORT"]);
789 $this->form->addItem($ne);
790
791 // server software
792 $ne = new ilNonEditableValueGUI($lng->txt("server_software"), "server_softw");
793 $ne->setValue($_SERVER["SERVER_SOFTWARE"]);
794 $this->form->addItem($ne);
795
796 // http path
797 $ne = new ilNonEditableValueGUI($lng->txt("http_path"), "http_path");
798 $ne->setValue(ILIAS_HTTP_PATH);
799 $this->form->addItem($ne);
800
801 // absolute path
802 $ne = new ilNonEditableValueGUI($lng->txt("absolute_path"), "absolute_path");
803 $ne->setValue(ILIAS_ABSOLUTE_PATH);
804 $this->form->addItem($ne);
805
806 // third party tools
807 $sh = new ilFormSectionHeaderGUI();
808 $sh->setTitle($this->lng->txt("3rd_party_software"));
809 $this->form->addItem($sh);
810
811 $tools = array("convert", "zip", "unzip", "ghostscript", "java", "htmldoc", "ffmpeg");
812
813 foreach ($tools as $tool)
814 {
815 // tool
816 $ne = new ilNonEditableValueGUI($lng->txt($tool."_path"), $tool."_path");
817 $p = $this->setup->ini->readVariable("tools", $tool);
818 $ne->setValue($p ? $p : $this->lng->txt("not_configured"));
819 $this->form->addItem($ne);
820 }
821
822 // latex
823 $ne = new ilNonEditableValueGUI($lng->txt("url_to_latex"), "latex_url");
824 $p = $this->setup->ini->readVariable("tools", "latex"); // #13109
825 $ne->setValue($p ? $p : $this->lng->txt("not_configured"));
826 $this->form->addItem($ne);
827
828 // virus scanner
829 $ne = new ilNonEditableValueGUI($lng->txt("virus_scanner"), "vscan");
830 $ne->setValue($this->setup->ini->readVariable("tools","vscantype"));
831 $this->form->addItem($ne);
832
833 // scan command
834 $ne = new ilNonEditableValueGUI($lng->txt("scan_command"), "scan");
835 $p = $this->setup->ini->readVariable("tools","scancommand");
836 $ne->setValue($p ? $p : $this->lng->txt("not_configured"));
837 $this->form->addItem($ne);
838
839 // clean command
840 $ne = new ilNonEditableValueGUI($lng->txt("clean_command"), "clean");
841 $p = $this->setup->ini->readVariable("tools","cleancommand");
842 $ne->setValue($p ? $p : $this->lng->txt("not_configured"));
843 $this->form->addItem($ne);
844
845 $this->form->setFormAction("setup.php?cmd=gateway");
846 }
const ILIAS_ABSOLUTE_PATH

References $ilCtrl, $lng, ILIAS_ABSOLUTE_PATH, and ILIAS_VERSION.

Referenced by displayClientOverview().

+ Here is the caller graph for this function:

◆ initContactDataForm()

ilSetupGUI::initContactDataForm ( )

Init contact data form.

Parameters
int$a_modeEdit Mode

Definition at line 3113 of file class.ilSetupGUI.php.

3114 {
3115 global $lng, $ilCtrl;
3116
3117 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
3118 $this->form = new ilPropertyFormGUI();
3119
3120 // name
3121 $ti = new ilTextInputGUI($lng->txt("name"), "inst_name");
3122 $ti->setMaxLength(64);
3123 $ti->setSize(30);
3124 $ti->setRequired(true);
3125 $this->form->addItem($ti);
3126
3127 // description
3128 $ti = new ilTextInputGUI($lng->txt("client_info"), "inst_info");
3129 $ti->setMaxLength(64);
3130 $ti->setSize(30);
3131 $this->form->addItem($ti);
3132
3133 // institution
3134 $ti = new ilTextInputGUI($lng->txt("client_institution"), "inst_institution");
3135 $ti->setMaxLength(64);
3136 $ti->setSize(30);
3137 $this->form->addItem($ti);
3138
3139 // contact data
3140 $sh = new ilFormSectionHeaderGUI();
3141 $sh->setTitle($lng->txt("contact_data"));
3142 $this->form->addItem($sh);
3143
3144 // first name
3145 $ti = new ilTextInputGUI($lng->txt("firstname"), "admin_firstname");
3146 $ti->setMaxLength(64);
3147 $ti->setSize(30);
3148 $ti->setRequired(true);
3149 $this->form->addItem($ti);
3150
3151 // last name
3152 $ti = new ilTextInputGUI($lng->txt("lastname"), "admin_lastname");
3153 $ti->setMaxLength(64);
3154 $ti->setSize(30);
3155 $ti->setRequired(true);
3156 $this->form->addItem($ti);
3157
3158 $fs = array (
3159 "title" => array("max" => 64, "size" => 30),
3160 "position" => array("max" => 64, "size" => 30),
3161 "institution" => array("max" => 200, "size" => 30),
3162 "street" => array("max" => 64, "size" => 30),
3163 "zipcode" => array("max" => 10, "size" => 5),
3164 "city" => array("max" => 64, "size" => 30),
3165 "country" => array("max" => 64, "size" => 30),
3166 "phone" => array("max" => 64, "size" => 30)
3167 );
3168 foreach ($fs as $f => $op)
3169 {
3170 // field
3171 $ti = new ilTextInputGUI($lng->txt($f), "admin_".$f);
3172 $ti->setMaxLength($op["max"]);
3173 $ti->setSize($op["size"]);
3174 $ti->setInfo($lng->txt(""));
3175 $this->form->addItem($ti);
3176 }
3177
3178 // email
3179 $ti = new ilEmailInputGUI($lng->txt("email"), "admin_email");
3180 $ti->setRequired(true);
3181 $ti->allowRFC822(true);
3182 $this->form->addItem($ti);
3183
3184 // feedback recipient
3185 $ti = new ilEmailInputGUI($lng->txt("feedback_recipient"), "feedback_recipient");
3186 $ti->setInfo($lng->txt("feedback_recipient_info"));
3187 $ti->setRequired(true);
3188 $ti->allowRFC822(true);
3189 $this->form->addItem($ti);
3190
3191 // error recipient
3192 $ti = new ilEmailInputGUI($lng->txt("error_recipient"), "error_recipient");
3193 $ti->allowRFC822(true);
3194 $this->form->addItem($ti);
3195
3196 $this->form->addCommandButton("saveContact", $lng->txt("save"));
3197
3198 $this->form->setTitle($lng->txt("client_data"));
3199 $this->form->setFormAction("setup.php?cmd=gateway");
3200 }

References $ilCtrl, and $lng.

Referenced by displayContactData(), and saveContact().

+ Here is the caller graph for this function:

◆ initControlStructureForm()

ilSetupGUI::initControlStructureForm ( )

Init the form to reload the control structure.

Returns
object property form to reload control structure

Definition at line 3524 of file class.ilSetupGUI.php.

3525 {
3526 include_once ("Services/Form/classes/class.ilPropertyFormGUI.php");
3527 $form = new ilPropertyFormGUI();
3528
3529 $form->setId("control_structure");
3530 $form->setTitle($this->lng->txt("ctrl_structure"));
3531 $form->setFormAction("setup.php?cmd=gateway");
3532
3533 $ilDB = $this->setup->getClient()->db;
3534 $cset = $ilDB->query("SELECT count(*) as cnt FROM ctrl_calls");
3535 $crec = $ilDB->fetchAssoc($cset);
3536
3537 $item = new ilCustomInputGUI($this->lng->txt("ctrl_structure_reload"));
3538 if ($crec["cnt"] == 0)
3539 {
3540 $item->setInfo($this->lng->txt("ctrl_missing_desc"));
3541 }
3542 else
3543 {
3544 $item->setInfo($this->lng->txt("ctrl_structure_desc"));
3545 }
3546 $form->addItem($item);
3547
3548 $form->addCommandButton("reloadStructure", $this->lng->txt("reload"));
3549 return $form;
3550 }
This class represents a custom property in a property form.

References $ilDB.

Referenced by displayTools().

+ Here is the caller graph for this function:

◆ initDBSelectionForm()

ilSetupGUI::initDBSelectionForm ( )

Init db selection form.

Definition at line 1605 of file class.ilSetupGUI.php.

1606 {
1607 global $lng, $ilCtrl;
1608
1609 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1610 $this->form = new ilPropertyFormGUI();
1611
1612 // db type
1613 $options = array(
1614 "mysql" => "MySQL 5.0.x or higher (MyISAM engine)",
1615 "innodb" => "MySQL 5.0.x or higher (InnoDB engine)",
1616 "oracle" => "Oracle 10g or higher",
1617 "postgres" => "Postgres (experimental)"
1618 );
1619 $si = new ilSelectInputGUI($lng->txt("db_type"), "db_type");
1620 $si->setOptions($options);
1621 $si->setInfo($lng->txt(""));
1622 $this->form->addItem($si);
1623
1624 $this->form->addCommandButton("selectdbtype", $lng->txt("save"));
1625
1626 $this->form->setTitle($lng->txt("db_selection"));
1627 $this->form->setFormAction("setup.php?cmd=gateway");
1628 }

References $ilCtrl, $lng, $options, and $si.

Referenced by selectDBType().

+ Here is the caller graph for this function:

◆ initDbSlaveForm()

ilSetupGUI::initDbSlaveForm ( )

Init db slave form.

Definition at line 2271 of file class.ilSetupGUI.php.

2272 {
2273 global $lng, $ilCtrl, $ilDB;
2274
2275 $client = $this->setup->getClient();
2276
2277 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
2278 $this->form = new ilPropertyFormGUI();
2279
2280 // db type
2281 $ne = new ilNonEditableValueGUI($lng->txt("db_type"), "slave_type");
2282 $ne->setValue($lng->txt("db_".$ilDB->getDbType()));
2283 $this->form->addItem($ne);
2284
2285 // activate slave
2286 $act = new ilCheckboxInputGUI($this->lng->txt("db_active"), "slave_active");
2287 $act->setChecked($client->getDbSlaveActive());
2288 $this->form->addItem($act);
2289
2290 // slave host
2291 $ti = new ilTextInputGUI($lng->txt("db_host"), "slave_host");
2292 $ti->setValue($client->getDbSlaveHost());
2293 $ti->setMaxLength(120);
2294 $ti->setRequired(true);
2295 $act->addSubItem($ti);
2296
2297 // slave name
2298 $ti = new ilTextInputGUI($lng->txt("db_name"), "slave_name");
2299 $ti->setValue($client->getDbSlaveName());
2300 $ti->setRequired(true);
2301 $ti->setMaxLength(40);
2302 $act->addSubItem($ti);
2303
2304 // slave user
2305 $ti = new ilTextInputGUI($lng->txt("db_user"), "slave_user");
2306 $ti->setValue($client->getDbSlaveUser());
2307 $ti->setMaxLength(40);
2308 $ti->setRequired(true);
2309 $act->addSubItem($ti);
2310
2311 // slave port
2312 $ti = new ilTextInputGUI($lng->txt("db_port"), "slave_port");
2313 $ti->setValue($client->getDbSlavePort());
2314 $ti->setMaxLength(8);
2315 $act->addSubItem($ti);
2316
2317 // set password
2318 $set_pw = new ilCheckboxInputGUI($this->lng->txt("db_set_password"), "set_slave_password");
2319 $act->addSubItem($set_pw);
2320
2321 // slave password
2322 $ti = new ilTextInputGUI($lng->txt("db_pass"), "slave_pass");
2323 $ti->setMaxLength(40);
2324 $set_pw->addSubItem($ti);
2325
2326 $this->form->addCommandButton("saveDbSlave", $lng->txt("save"));
2327
2328 $this->form->setTitle($lng->txt("db_slave_settings"));
2329 $this->form->setFormAction("setup.php?cmd=gateway");
2330 }

References $client, $ilCtrl, $ilDB, and $lng.

Referenced by displayDatabaseSlave(), and saveDbSlave().

+ Here is the caller graph for this function:

◆ initMasterLoginForm()

ilSetupGUI::initMasterLoginForm ( )

Init master login form.

Definition at line 1448 of file class.ilSetupGUI.php.

1449 {
1450 global $lng, $ilCtrl;
1451
1452 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1453 $this->form = new ilPropertyFormGUI();
1454 $this->form->setId("master_login");
1455 // password
1456 $pi = new ilPasswordInputGUI($lng->txt("password"), "mpassword");
1457 $pi->setSize(20);
1458 $pi->setRetype(false);
1459 $pi->setSkipSyntaxCheck(true);
1460 $this->form->addItem($pi);
1461
1462 $this->form->addCommandButton("performMLogin", $lng->txt("login"));
1463
1464 $this->form->setTitle($lng->txt("admin_login"));
1465 $this->form->setFormAction("setup.php?cmd=gateway");
1466
1467 }

References $ilCtrl, and $lng.

Referenced by displayLogin(), and performMLogin().

+ Here is the caller graph for this function:

◆ initProxyForm()

ilSetupGUI::initProxyForm ( )
private

Definition at line 4230 of file class.ilSetupGUI.php.

4231 {
4232 global $lng;
4233
4234 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
4235 $this->form = new ilPropertyFormGUI();
4236 $this->form->setFormAction("setup.php?cmd=gateway");
4237
4238 // Proxy status
4239 $proxs = new ilCheckboxInputGUI($lng->txt('proxy_status'), 'proxy_status');
4240 $proxs->setInfo($lng->txt('proxy_status_info'));
4241 $proxs->setValue(1);
4242 $this->form->addItem($proxs);
4243
4244 // Proxy availability
4245 $proxa = new ilCustomInputGUI('', 'proxy_availability');
4246 $proxs->addSubItem($proxa);
4247
4248 // Proxy
4249 $prox = new ilTextInputGUI($lng->txt('proxy_host'), 'proxy_host');
4250 $prox->setInfo($lng->txt('proxy_host_info'));
4251 $proxs->addSubItem($prox);
4252
4253 // Proxy Port
4254 $proxp = new ilTextInputGUI($lng->txt('proxy_port'), 'proxy_port');
4255 $proxp->setInfo($lng->txt('proxy_port_info'));
4256 $proxp->setSize(10);
4257 $proxp->setMaxLength(10);
4258 $proxs->addSubItem($proxp);
4259
4260 // save and cancel commands
4261 $this->form->addCommandButton('saveProxy', $lng->txt('save'));
4262 }

References $lng.

Referenced by displayProxy(), and saveProxy().

+ Here is the caller graph for this function:

◆ initRegistrationForm()

ilSetupGUI::initRegistrationForm (   $a_mode = "edit")

Init registration form.

Parameters
int$a_modeEdit Mode

Definition at line 3315 of file class.ilSetupGUI.php.

3316 {
3317 global $lng, $ilCtrl;
3318
3319 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
3320 $this->form = new ilPropertyFormGUI();
3321
3322 // registration type
3323 $radg = new ilRadioGroupInputGUI($lng->txt("nic_registration"), "register");
3324 $radg->setValue(1);
3325 $op1 = new ilRadioOption($lng->txt("nic_reg_online"), 1);
3326 $radg->addOption($op1);
3327 $op1 = new ilRadioOption($lng->txt("nic_reg_disable"), 0, $lng->txt("nic_reg_disable_info"));
3328 $radg->addOption($op1);
3329 $this->form->addItem($radg);
3330
3331 $this->form->addCommandButton("saveRegistration", $lng->txt("save"));
3332 $this->form->setFormAction("setup.php?cmd=gateway");
3333 }

References $ilCtrl, and $lng.

Referenced by displayNIC(), and saveRegistration().

+ Here is the caller graph for this function:

◆ initSettingsTypeForm()

ilSetupGUI::initSettingsTypeForm ( )

Init the form to change the settings value type.

Returns
object property form to change settings type

Definition at line 3613 of file class.ilSetupGUI.php.

3614 {
3615 include_once("./Services/Administration/classes/class.ilSetting.php");
3616 $type = ilSetting::_getValueType();
3617
3618 include_once ("Services/Form/classes/class.ilPropertyFormGUI.php");
3619 $form = new ilPropertyFormGUI();
3620
3621 $form->setId("settings_type");
3622 $form->setTitle($this->lng->txt("settings_type"));
3623 $form->setFormAction("setup.php?cmd=gateway");
3624
3625 $item = new ilNonEditableValueGUI($this->lng->txt('settings_type_current'));
3626 $item->setValue(strtoupper($type));
3627
3628 if ($type == "clob")
3629 {
3630 $item->setInfo($this->lng->txt('settings_info_clob'));
3631 $form->addCommandButton("showLongerSettings", $this->lng->txt("settings_show_longer"));
3632 $form->addCommandButton("changeSettingsType", $this->lng->txt("settings_change_text"));
3633 }
3634 else
3635 {
3636 $item->setInfo($this->lng->txt('settings_info_text'));
3637 $form->addCommandButton("changeSettingsType", $this->lng->txt("settings_change_clob"));
3638 }
3639 $form->addItem($item);
3640
3641 if (is_array($this->longer_settings))
3642 {
3643 $item = new ilCustomInputGUI($this->lng->txt('settings_longer_values'));
3644
3645 if (count($this->longer_settings))
3646 {
3647 foreach ($this->longer_settings as $row)
3648 {
3649 $subitem = new ilCustomInputGUI(sprintf($this->lng->txt('settings_key_info'), $row['module'], $row['keyword']));
3650 $subitem->setInfo($row['value']);
3651 $item->addSubItem($subitem);
3652 }
3653 }
3654 else
3655 {
3656 $item->setHTML($this->lng->txt('settings_no_longer_values'));
3657 }
3658 $form->addItem($item);
3659 }
3660
3661 return $form;
3662 }

References $row, and ilSetting\_getValueType().

Referenced by displayTools().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTreeImplementationForm()

ilSetupGUI::initTreeImplementationForm ( )

Definition at line 3450 of file class.ilSetupGUI.php.

3451 {
3452 include_once ("Services/Form/classes/class.ilPropertyFormGUI.php");
3453 $form = new ilPropertyFormGUI();
3454
3455 $form->setId('tree_impl');
3456 $form->setTitle($this->lng->txt('tree_implementation'));
3457 $form->setFormAction('setup.php?cmd=gateway');
3458
3459
3460 $options = new ilRadioGroupInputGUI('', 'tree_impl_type');
3461 #$options->setRequired(true);
3462
3463 $set = new ilSetting('common');
3464 $type = ($set->get('main_tree_impl','ns') == 'ns' ? 'ns' : 'mp');
3465
3466
3467 $options->setValue($type);
3468
3469 $ns = new ilRadioOption($this->lng->txt('tree_implementation_ns'), 'ns');
3470 $options->addOption($ns);
3471
3472 $mp = new ilRadioOption($this->lng->txt('tree_implementation_mp'),'mp');
3473 $options->addOption($mp);
3474
3475 $form->addItem($options);
3476 $form->addCommandButton('switchTree', $this->lng->txt('tree_implementation_switch_btn'));
3477 $form->setShowTopButtons(false);
3478
3479 return $form;
3480
3481 }
ILIAS Setting Class.

References $options.

Referenced by displayTools().

+ Here is the caller graph for this function:

◆ installDatabase()

ilSetupGUI::installDatabase ( )

Install the database.

Parameters

return

Definition at line 2627 of file class.ilSetupGUI.php.

2628 {
2629 if (!$this->setup->getClient()->db_exists)
2630 {
2631 if ($_POST["chk_db_create"])
2632 {
2633 if (!$this->setup->createDatabase($_POST["collation"]))
2634 {
2635 ilUtil::sendFailure($this->lng->txt($this->setup->getError()), true);
2636 ilUtil::redirect("setup.php?cmd=displayDatabase");
2637 }
2638 }
2639 else
2640 {
2641 ilUtil::sendFailure($this->lng->txt("database_not_exists_create_first"), true);
2642 ilUtil::redirect("setup.php?cmd=displayDatabase");
2643 }
2644 }
2645 if (!$this->setup->installDatabase())
2646 {
2647 ilUtil::sendFailure($this->lng->txt($this->setup->getError()), true);
2648 }
2649 else
2650 {
2651 ilUtil::sendSuccess($this->lng->txt("database_installed"), true);
2652 }
2653 ilUtil::redirect("setup.php?cmd=displayDatabase");
2654 }

References $_POST, ilUtil\redirect(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ jumpToFirstUnfinishedSetupStep()

ilSetupGUI::jumpToFirstUnfinishedSetupStep ( )

if setting up a client was not finished, jump back to the first uncompleted setup step

Definition at line 3968 of file class.ilSetupGUI.php.

3969 {
3970 if (!$this->setup->getClient()->status["db"]["status"])
3971 {
3972 $this->cmd = "db";
3973 ilUtil::sendInfo($this->lng->txt("finish_initial_setup_first"),true);
3974 $this->displayDatabase();
3975 }
3976 elseif (!$this->setup->getClient()->status["lang"]["status"])
3977 {
3978 $this->cmd = "lang";
3979 ilUtil::sendInfo($this->lng->txt("finish_initial_setup_first"),true);
3980 $this->displayLanguages();
3981 }
3982 elseif (!$this->setup->getClient()->status["contact"]["status"])
3983 {
3984 $this->cmd = "contact";
3985 ilUtil::sendInfo($this->lng->txt("finish_initial_setup_first"),true);
3986 $this->displayContactData();
3987 }
3988 elseif(!$this->setup->getClient()->status['proxy']['status'])
3989 {
3990 $this->cmd = "proxy";
3991 ilUtil::sendInfo($this->lng->txt("finish_initial_setup_first"),true);
3992 $this->displayProxy();
3993 }
3994 elseif (!$this->setup->getClient()->status["nic"]["status"])
3995 {
3996 $this->cmd = "nic";
3997 ilUtil::sendInfo($this->lng->txt("finish_initial_setup_first"),true);
3998 $this->displayNIC();
3999 }
4000 elseif (!$this->setup->getClient()->status["finish"]["status"])
4001 {
4002 $this->cmd = "finish";
4003 ilUtil::sendInfo($this->lng->txt("finish_initial_setup_first"),true);
4004 $this->displayFinishSetup();
4005 }
4006 else
4007 {
4008 return false;
4009 }
4010 }

References displayContactData(), displayDatabase(), displayFinishSetup(), displayLanguages(), displayNIC(), displayProxy(), and ilUtil\sendInfo().

Referenced by cmdClient().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loginClient()

ilSetupGUI::loginClient ( )

login to a client

Definition at line 1324 of file class.ilSetupGUI.php.

1325 {
1326 session_destroy();
1327
1328 ilUtil::redirect(ILIAS_HTTP_PATH."/login.php?client_id=".$this->setup->getClient()->getId());
1329 }

References ilUtil\redirect().

+ Here is the call graph for this function:

◆ performLogin()

ilSetupGUI::performLogin ( )

Login.

Definition at line 1386 of file class.ilSetupGUI.php.

1387 {
1388 $this->initClientLoginForm();
1389 if ($this->form->checkInput())
1390 {
1391 $i = $this->form->getItemByPostVar("password");
1392 if (!$this->setup->loginAsClient(
1393 array("client_id" => $_POST["client_id"],
1394 "username" => $_POST["username"], "password" => $_POST["password"])))
1395 {
1396 $i->setAlert($this->setup->getError());
1397 }
1398 else
1399 {
1400 // everything ok -> we are authenticated
1401 ilUtil::redirect("setup.php");
1402 }
1403 }
1404
1405 // something wrong -> display login again
1406 $this->form->setValuesByPost();
1407 $this->displayLogin(false, true);
1408 }

References $_POST, displayLogin(), initClientLoginForm(), and ilUtil\redirect().

+ Here is the call graph for this function:

◆ performMLogin()

ilSetupGUI::performMLogin ( )

Master Login.

Definition at line 1361 of file class.ilSetupGUI.php.

1362 {
1363 $this->initMasterLoginForm();
1364 if ($this->form->checkInput())
1365 {
1366 $i = $this->form->getItemByPostVar("mpassword");
1367 if (!$this->setup->loginAsAdmin($_POST["mpassword"]))
1368 {
1369 $i->setAlert($this->lng->txt("login_invalid"));
1370 }
1371 else
1372 {
1373 // everything ok -> we are authenticated
1374 ilUtil::redirect("setup.php");
1375 }
1376 }
1377
1378 // something wrong -> display login again
1379 $this->form->setValuesByPost();
1380 $this->displayLogin(true);
1381 }

References $_POST, displayLogin(), initMasterLoginForm(), and ilUtil\redirect().

+ Here is the call graph for this function:

◆ reloadControlStructure()

ilSetupGUI::reloadControlStructure ( )

reload control structure

Definition at line 3556 of file class.ilSetupGUI.php.

3557 {
3559
3560 if (!$this->setup->getClient()->db_installed)
3561 {
3562 ilUtil::sendInfo($this->lng->txt("no_db"), true);
3563 $this->displayTools();
3564 return;
3565 }
3566
3567 // referencing does not work in dbupdate-script
3568 $GLOBALS["ilDB"] = $this->setup->getClient()->getDB();
3569// BEGIN WebDAV
3570 // read module and service information into db
3571 require_once "./setup/classes/class.ilModuleReader.php";
3572 require_once "./setup/classes/class.ilServiceReader.php";
3573 require_once "./setup/classes/class.ilCtrlStructureReader.php";
3574
3575 require_once "./Services/Component/classes/class.ilModule.php";
3576 require_once "./Services/Component/classes/class.ilService.php";
3579
3580 // clear tables
3581 $mr = new ilModuleReader("", "", "");
3582 $mr->clearTables();
3583 foreach($modules as $module)
3584 {
3585 $mr = new ilModuleReader(ILIAS_ABSOLUTE_PATH."/Modules/".$module["subdir"]."/module.xml",
3586 $module["subdir"], "Modules");
3587 $mr->getModules();
3588 unset($mr);
3589 }
3590
3591 // clear tables
3592 $sr = new ilServiceReader("", "", "");
3593 $sr->clearTables();
3594 foreach($services as $service)
3595 {
3596 $sr = new ilServiceReader(ILIAS_ABSOLUTE_PATH."/Services/".$service["subdir"]."/service.xml",
3597 $service["subdir"], "Services");
3598 $sr->getServices();
3599 unset($sr);
3600 }
3601// END WebDAV
3602
3603 $ilCtrlStructureReader->readStructure(true);
3604 ilUtil::sendInfo($this->lng->txt("ctrl_structure_reloaded"), true);
3605 $this->displayTools();
3606 }
Class ilModuleReader.
static getAvailableCoreModules()
Get all available core modules.
Class ilServiceReader.
static getAvailableCoreServices()
Get all available core services.
$GLOBALS['ct_recipient']

References $GLOBALS, $ilCtrlStructureReader, displayTools(), ilModule\getAvailableCoreModules(), ilService\getAvailableCoreServices(), ILIAS_ABSOLUTE_PATH, and ilUtil\sendInfo().

Referenced by cmdClient().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveBasicSettings()

ilSetupGUI::saveBasicSettings ( )

Save basic settings form.

Definition at line 1223 of file class.ilSetupGUI.php.

1224 {
1225 global $tpl, $lng, $ilCtrl;
1226
1227 $this->initBasicSettingsForm(true);
1228
1229 if ($this->form->checkInput())
1230 {
1231 // correct paths on windows
1232 if (ilUtil::isWindows())
1233 {
1234 $fs = array("datadir_path", "log_path", "convert_path", "zip_path",
1235 "unzip_path", "ghostscript_path", "java_path", "htmldoc_path", "ffmpeg_path");
1236 foreach ($fs as $f)
1237 {
1238 $_POST[$f] = str_replace("\\", "/", $_POST[$f]);
1239 }
1240 }
1241
1242 $_POST["setup_pass"] = $_POST["password"];
1243 $_POST["setup_pass2"] = $_POST["password_retype"];
1244 if (!$this->setup->checkDataDirSetup($_POST))
1245 {
1246 $i = $this->form->getItemByPostVar("datadir_path");
1247 $i->setAlert($this->lng->txt($this->setup->getError()));
1248 ilUtil::sendFailure($this->lng->txt("form_input_not_valid"),true);
1249 }
1250 else if (!$this->setup->checkLogSetup($_POST))
1251 {
1252 $i = $this->form->getItemByPostVar("log_path");
1253 $i->setAlert($this->lng->txt($this->setup->getError()));
1254 ilUtil::sendFailure($this->lng->txt("form_input_not_valid"),true);
1255 }
1256 else if (!$this->setup->checkPasswordSetup($_POST))
1257 {
1258 ilUtil::sendFailure($this->lng->txt($this->setup->getError()),true);
1259 }
1260 else if (!$this->setup->saveMasterSetup($_POST))
1261 {
1262 ilUtil::sendFailure($this->lng->txt($this->setup->getError()),true);
1263 }
1264 else
1265 {
1266 ilUtil::sendSuccess($this->lng->txt("settings_saved"),true);
1267 ilUtil::redirect("setup.php?cmd=mastersettings");
1268 }
1269 }
1270
1271 $this->form->setValuesByPost();
1272 $this->displayMasterSetup(true);
1273 }

References $_POST, $ilCtrl, $lng, $tpl, displayMasterSetup(), initBasicSettingsForm(), ilUtil\isWindows(), ilUtil\redirect(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveClientIni()

ilSetupGUI::saveClientIni ( )

Save client ini form.

Definition at line 1767 of file class.ilSetupGUI.php.

1768 {
1769 global $tpl, $lng, $ilCtrl;
1770
1771 $this->initClientIniForm();
1772 if ($this->form->checkInput())
1773 {
1774 if (strlen($_POST["client_id"]) != strlen(urlencode(($_POST["client_id"])))
1775 || is_int(strpos($_POST["client_id"], "_")))
1776 {
1777 $i = $this->form->getItemByPostVar("client_id");
1778 $i->setAlert($this->lng->txt("ini_client_id_invalid"));
1779 ilUtil::sendFailure($this->lng->txt("ini_client_id_invalid"),true);
1780 }
1781 else if (strlen($_POST["client_id"]) < 4)
1782 {
1783 $i = $this->form->getItemByPostVar("client_id");
1784 $i->setAlert($this->lng->txt("ini_client_id_too_short"));
1785 ilUtil::sendFailure($this->lng->txt("ini_client_id_too_short"),true);
1786 }
1787 else if (strlen($_POST["client_id"]) > 32)
1788 {
1789 $i = $this->form->getItemByPostVar("client_id");
1790 $i->setAlert($this->lng->txt("ini_client_id_too_long"));
1791 ilUtil::sendFailure($this->lng->txt("ini_client_id_too_long"),true);
1792 }
1793 else if (!$this->setup->ini_client_exists && file_exists(ILIAS_ABSOLUTE_PATH."/".ILIAS_WEB_DIR."/".$_POST["client_id"]))
1794 {
1795 $i = $this->form->getItemByPostVar("client_id");
1796 $i->setAlert($this->lng->txt("ini_client_id_exists"));
1797 ilUtil::sendFailure($this->lng->txt("ini_client_id_exists"),true);
1798 }
1799 else
1800 {
1801
1802 // save some old values
1803 $old_db_name = $this->setup->getClient()->getDbName();
1804 $old_db_type = $this->setup->getClient()->getDbType();
1805 $old_client_id = $this->setup->getClient()->getId();
1806
1807 // create new client object if it does not exist
1808 if (!$this->setup->ini_client_exists)
1809 {
1810 $client_id = $_POST["client_id"];
1811 $this->setup->newClient($client_id);
1812 }
1813
1814 // set client data
1815 $this->setup->getClient()->setId($_POST["client_id"]);
1816 $this->setup->getClient()->setDbHost($_POST["db_host"]);
1817 $this->setup->getClient()->setDbName($_POST["db_name"]);
1818 $this->setup->getClient()->setDbUser($_POST["db_user"]);
1819 $this->setup->getClient()->setDbPort($_POST["db_port"]);
1820 $this->setup->getClient()->setDbPass($_POST["db_pass"]);
1821 $this->setup->getClient()->setDbType($_SESSION["db_type"]);
1822 $this->setup->getClient()->setDSN();
1823
1824 // try to connect to database
1825 if (!$this->setup->getClient()->checkDatabaseHost())
1826 {
1827 $i = $this->form->getItemByPostVar("db_host");
1828 $i->setAlert($this->lng->txt($this->setup->getClient()->getError()));
1829 ilUtil::sendFailure($this->setup->getClient()->getError(),true);
1830 }
1831 else
1832 {
1833 // check if db exists
1834 $db_installed = $this->setup->getClient()->checkDatabaseExists();
1835
1836 if ($db_installed and (!$this->setup->ini_ilias_exists or ($this->setup->getClient()->getDbName() != $old_db_name)))
1837 {
1838 $_POST["db_name"] = $old_db_name;
1839 $message = ucfirst($this->lng->txt("database"))." \"".$this->setup->getClient()->getDbName()."\" ".$this->lng->txt("ini_db_name_exists");
1840 $i = $this->form->getItemByPostVar("db_name");
1841 $i->setAlert($message);
1842 ilUtil::sendFailure($message, true);
1843 }
1844 else
1845 {
1846 // all ok. create client.ini and save posted data
1847 if (!$this->setup->ini_client_exists)
1848 {
1849 if ($this->setup->saveNewClient())
1850 {
1851 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
1852 $this->setup->getClient()->status["ini"]["status"] = true;
1853 $_SESSION["ClientId"] = $client_id;
1854 ilUtil::redirect("setup.php?cmd=displayIni&client_id=".$client_id);
1855 }
1856 else
1857 {
1858 $err = $this->setup->getError();
1859 ilUtil::sendFailure($this->lng->txt("save_error").": ".$err, true);
1860 $this->setup->getClient()->status["ini"]["status"] = false;
1861 $this->setup->getClient()->status["ini"]["comment"] = $err;
1862 }
1863 }
1864 else
1865 {
1866 if ($this->setup->getClient()->ini->write())
1867 {
1868 ilUtil::sendSuccess($this->lng->txt("settings_changed"));
1869 $this->setup->getClient()->status["ini"]["status"] = true;
1870 ilUtil::redirect("setup.php?cmd=displayIni");
1871 }
1872 else
1873 {
1874 $err = $this->setup->getClient()->ini->getError();
1875 ilUtil::sendFailure($this->lng->txt("save_error").": ".$err, true);
1876 $this->setup->getClient()->status["ini"]["status"] = false;
1877 $this->setup->getClient()->status["ini"]["comment"] = $err;
1878 }
1879 }
1880 }
1881 }
1882 }
1883 }
1884
1885 $this->form->setValuesByPost();
1886 $this->displayIni(true);
1887 }
const ILIAS_WEB_DIR

References $_POST, $_SESSION, $client_id, $ilCtrl, $lng, $tpl, displayIni(), ILIAS_ABSOLUTE_PATH, ILIAS_WEB_DIR, initClientIniForm(), ilUtil\redirect(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveContact()

ilSetupGUI::saveContact ( )

Save contact form.

Definition at line 3223 of file class.ilSetupGUI.php.

3224 {
3225 global $tpl, $lng, $ilCtrl;
3226
3227 $this->initContactDataForm();
3228 if ($this->form->checkInput())
3229 {
3230 $this->setup->getClient()->setSetting("admin_firstname", $_POST["admin_firstname"]);
3231 $this->setup->getClient()->setSetting("admin_lastname", $_POST["admin_lastname"]);
3232 $this->setup->getClient()->setSetting("admin_title", $_POST["admin_title"]);
3233 $this->setup->getClient()->setSetting("admin_position", $_POST["admin_position"]);
3234 $this->setup->getClient()->setSetting("admin_institution", $_POST["admin_institution"]);
3235 $this->setup->getClient()->setSetting("admin_street", $_POST["admin_street"]);
3236 $this->setup->getClient()->setSetting("admin_zipcode", $_POST["admin_zipcode"]);
3237 $this->setup->getClient()->setSetting("admin_city", $_POST["admin_city"]);
3238 $this->setup->getClient()->setSetting("admin_country", $_POST["admin_country"]);
3239 $this->setup->getClient()->setSetting("admin_phone", $_POST["admin_phone"]);
3240 $this->setup->getClient()->setSetting("admin_email", $_POST["admin_email"]);
3241 $this->setup->getClient()->setSetting("inst_institution", $_POST["inst_institution"]);
3242 $this->setup->getClient()->setSetting("inst_name", $_POST["inst_name"]);
3243 $this->setup->getClient()->setSetting("feedback_recipient", $_POST["feedback_recipient"]);
3244 $this->setup->getClient()->setSetting("error_recipient", $_POST["error_recipient"]);
3245
3246 // update client.ini
3247 $this->setup->getClient()->setName($_POST["inst_name"]);
3248 $this->setup->getClient()->setDescription($_POST["inst_info"]);
3249 $this->setup->getClient()->ini->write();
3250
3251 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
3252 ilUtil::redirect("setup.php?cmd=displayContactData");
3253 }
3254
3255 $this->form->setValuesByPost();
3256 $this->displayContactData(true);
3257 }

References $_POST, $ilCtrl, $lng, $tpl, displayContactData(), initContactDataForm(), ilUtil\redirect(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveDbSlave()

ilSetupGUI::saveDbSlave ( )

Save db slave form.

Definition at line 2335 of file class.ilSetupGUI.php.

2336 {
2337 global $tpl, $lng, $ilCtrl, $ilDB;
2338
2339 $client = $this->setup->getClient();
2340
2341 $ilDB = $this->setup->getClient()->db;
2342 $this->lng->setDbHandler($ilDB);
2343
2344 $this->initDbSlaveForm();
2345 if ($this->form->checkInput())
2346 {
2347 $client->setDbSlaveActive($this->form->getInput("slave_active"));
2348 if ($this->form->getInput("slave_active"))
2349 {
2350 $client->setDbSlaveHost($this->form->getInput("slave_host"));
2351 $client->setDbSlaveUser($this->form->getInput("slave_user"));
2352 $client->setDbSlavePort($this->form->getInput("slave_port"));
2353 $client->setDbSlaveName($this->form->getInput("slave_name"));
2354 if ($this->form->getInput("set_slave_password"))
2355 {
2356 $client->setDbSlavePass($this->form->getInput("slave_pass"));
2357 }
2358 }
2359 $client->writeIni();
2360
2361 ilUtil::sendSuccess($lng->txt("saved_successfully"), true);
2362 ilUtil::redirect("setup.php?cmd=dbslave");
2363 }
2364 else
2365 {
2366 $this->form->setValuesByPost();
2367 $this->displayDatabaseSlave(true);
2368 }
2369 }

References $client, $ilCtrl, $ilDB, $lng, $tpl, displayDatabaseSlave(), initDbSlaveForm(), ilUtil\redirect(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveLanguages()

ilSetupGUI::saveLanguages ( )

Save languages.

Parameters

return

Definition at line 3031 of file class.ilSetupGUI.php.

3032 {
3033 if (empty($_POST["form"]["lang_id"]))
3034 {
3035 ilUtil::sendFailure($this->lng->txt("lang_min_one_language"), true);
3036 ilUtil::redirect("setup.php?cmd=lang");
3037 }
3038
3039 if (!in_array($_POST["form"]["lang_default"],$_POST["form"]["lang_id"]))
3040 {
3041 ilUtil::sendFailure($this->lng->txt("lang_not_installed_default"), true);
3042 ilUtil::redirect("setup.php?cmd=lang");
3043 }
3044
3045 $result = $this->lng->installLanguages($_POST["form"]["lang_id"], $_POST["form"]["lang_local"]);
3046
3047 if (is_array($result))
3048 {
3049 $count = count($result);
3050 $txt = "tet";
3051
3052 foreach ($result as $key => $lang_key)
3053 {
3054 $list .= $this->lng->txt("lang_".$lang_key);
3055
3056 if ($count > $key + 1)
3057 {
3058 $list .= ", ";
3059 }
3060 }
3061 }
3062
3063 $this->setup->getClient()->setDefaultLanguage($_POST["form"]["lang_default"]);
3064 $message = $this->lng->txt("languages_installed");
3065
3066 if ($result !== true)
3067 {
3068 $message .= "<br/>(".$this->lng->txt("langs_not_valid_not_installed").": ".$list.")";
3069 }
3070 ilUtil::sendInfo($message, true);
3071 ilUtil::redirect("setup.php?cmd=lang");
3072 }
$result
$txt
Definition: error.php:10

References $_POST, $result, $txt, ilUtil\redirect(), ilUtil\sendFailure(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ saveProxy()

ilSetupGUI::saveProxy ( )

Save proxy settings.

@access public

Definition at line 4271 of file class.ilSetupGUI.php.

4272 {
4273 global $lng;
4274
4275 $this->initProxyForm();
4276 $isFormValid = $this->form->checkInput();
4277
4278 $new_settings['proxy_status'] = (int)$this->form->getInput('proxy_status');
4279 $new_settings['proxy_host'] = trim($this->form->getInput('proxy_host'));
4280 $new_settings['proxy_port'] = trim($this->form->getInput('proxy_port'));
4281
4282 if($isFormValid)
4283 {
4284 if($new_settings['proxy_status'] == true)
4285 {
4286 if(!strlen($new_settings['proxy_host']))
4287 {
4288 $isFormValid = false;
4289 $this->form->getItemByPostVar('proxy_host')->setAlert($lng->txt('msg_input_is_required'));
4290 }
4291 if(!strlen($new_settings['proxy_port']))
4292 {
4293 $isFormValid = false;
4294 $this->form->getItemByPostVar('proxy_port')->setAlert($lng->txt('msg_input_is_required'));
4295 }
4296 if(!preg_match('/[0-9]{1,}/', $new_settings['proxy_port']) ||
4297 $new_settings['proxy_port'] < 0 ||
4298 $new_settings['proxy_port'] > 65535)
4299 {
4300 $isFormValid = false;
4301 $this->form->getItemByPostVar('proxy_port')->setAlert($lng->txt('proxy_port_numeric'));
4302 }
4303 }
4304
4305 if($isFormValid)
4306 {
4307 $this->setup->saveProxySettings($new_settings);
4308
4309 ilUtil::sendSuccess($lng->txt('saved_successfully'));
4310 $settings = $this->setup->getClient()->getAllSettings();
4311 if($settings['proxy_status'] == true)
4312 {
4313 $this->setup->printProxyStatus($this->setup->client);
4314 }
4315 }
4316 else
4317 {
4318 ilUtil::sendFailure($lng->txt('form_input_not_valid'));
4319 }
4320 }
4321
4322 $this->form->setValuesByPost();
4323 $this->tpl->setVariable("SETUP_CONTENT", $this->form->getHTML());
4324
4325
4326 $this->displayProxy(true);
4327 }

References $lng, displayProxy(), initProxyForm(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveRegistration()

ilSetupGUI::saveRegistration ( )

Save registration form.

Definition at line 3365 of file class.ilSetupGUI.php.

3366 {
3367 global $tpl, $lng, $ilCtrl;
3368
3369 $this->initRegistrationForm();
3370 if ($this->form->checkInput())
3371 {
3372 // check register option
3373 if ($_POST["register"] == 1)
3374 {
3375 // update nic
3376 $this->setup->getClient()->updateNIC($this->setup->ilias_nic_server);
3377//var_dump($this->setup->getClient()->nic_status);
3378 // online registration failed
3379 if (empty($this->setup->getClient()->nic_status[2]))
3380 {
3381 $this->setup->getClient()->setSetting("nic_enabled","-1");
3382 ilUtil::sendFailure($this->lng->txt("nic_reg_failed"), true);
3383 ilUtil::redirect("setup.php?cmd=displayNIC");
3384 }
3385 else
3386 {
3387 $this->setup->getClient()->setSetting("inst_id",$this->setup->getClient()->nic_status[2]);
3388 $this->setup->getClient()->setSetting("nic_enabled","1");
3389 $this->setup->getClient()->status["nic"]["status"] = true;
3390 ilUtil::sendSuccess($this->lng->txt("nic_reg_enabled"), true);
3391 ilUtil::redirect("setup.php?cmd=displayNIC");
3392 }
3393 }
3394 /*elseif ($_POST["form"]["register"] == 2)
3395 {
3396 $nic_by_email = (int) $_POST["form"]["nic_id"];
3397
3398 $checksum = md5($nic_key.$nic_by_email);
3399
3400 if (!$nic_by_email or $_POST["form"]["nic_checksum"] != $checksum)
3401 {
3402 $message = $this->lng->txt("nic_reg_enter_correct_id");
3403 }
3404 else
3405 {
3406 $this->setup->getClient()->setSetting("inst_id",$nic_by_email);
3407 $this->setup->getClient()->setSetting("nic_enabled","1");
3408 $message = $this->lng->txt("nic_reg_enabled");
3409 }
3410 }*/
3411 else
3412 {
3413 $this->setup->getClient()->setSetting("inst_id","0");
3414 $this->setup->getClient()->setSetting("nic_enabled","0");
3415 ilUtil::sendSuccess($this->lng->txt("nic_reg_disabled"), true);
3416 ilUtil::redirect("setup.php?cmd=displayNIC");
3417 }
3418 }
3419
3420 $this->form->setValuesByPost();
3421 $this->displayNIC(true);
3422 }

References $_POST, $ilCtrl, $lng, $tpl, displayNIC(), initRegistrationForm(), ilUtil\redirect(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ selectDBType()

ilSetupGUI::selectDBType ( )

Select database type.

Definition at line 1572 of file class.ilSetupGUI.php.

1573 {
1574 $this->checkDisplayMode("create_new_client");
1575
1576
1577if (true)
1578{
1579 $this->initDBSelectionForm();
1580 $this->tpl->setVariable("SETUP_CONTENT", $this->form->getHTML());
1581}
1582else
1583{
1584 // output
1585
1586 $this->tpl->addBlockFile("SETUP_CONTENT","setup_content","tpl.clientsetup_select_db.html", "setup");
1587
1588 $this->tpl->setVariable("FORMACTION", "setup.php?cmd=gateway");
1589 $this->tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
1590
1591 $this->tpl->setVariable("TXT_DB_TYPE", $this->lng->txt("db_type"));
1592 $this->tpl->setVariable("TXT_DB_SELECTION", $this->lng->txt("db_selection"));
1593}
1594 if ($this->setup->getClient()->status["ini"]["status"])
1595 {
1596 $this->setButtonNext("db");
1597 }
1598
1599 $this->checkPanelMode();
1600 }
initDBSelectionForm()
Init db selection form.

References checkDisplayMode(), checkPanelMode(), and initDBSelectionForm().

Referenced by cmdAdmin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetButtonNext()

ilSetupGUI::SetButtonNext (   $a_cmd,
  $a_lng = 0 
)

set next navigation button

Parameters
stringcommand to process on click
stringbutton label

Definition at line 688 of file class.ilSetupGUI.php.

689 {
690 $this->btn_next_on = true;
691 $this->btn_next_cmd = ($a_cmd) ? $a_cmd : "gateway";
692 $this->btn_next_lng = ($a_lng) ? $this->lng->txt($a_lng) : $this->lng->txt("next");
693 }

◆ SetButtonPrev()

ilSetupGUI::SetButtonPrev (   $a_cmd = 0,
  $a_lng = 0 
)

set previous navigation button

Parameters
stringcommand to process on click
stringbutton label

Definition at line 675 of file class.ilSetupGUI.php.

676 {
677 $this->btn_prev_on = true;
678 $this->btn_prev_cmd = ($a_cmd) ? $a_cmd : "gateway";
679 $this->btn_prev_lng = ($a_lng) ? $this->lng->txt($a_lng) : $this->lng->txt("prev");
680 }

◆ setDbSubtabs()

ilSetupGUI::setDbSubtabs (   $a_subtab_id = "db")

Set db subtabs.

Parameters

return

Definition at line 2378 of file class.ilSetupGUI.php.

2379 {
2380 global $ilDB;
2381
2382 if ($ilDB->getDbType() == "mysql")
2383 {
2384 $this->tabs->addSubTab("db", $this->lng->txt("db_master"), "setup.php?client_id=".$this->client_id."&cmd=db");
2385 $this->tabs->addSubTab("repl", $this->lng->txt("db_slave"), "setup.php?client_id=".$this->client_id."&cmd=dbslave");
2386 }
2387
2388 $this->tabs->activateSubTab($a_subtab_id);
2389 }

References $ilDB.

◆ setDisplayMode()

ilSetupGUI::setDisplayMode (   $a_mode)

set display mode to 'view' or 'setup' 'setup' -> show status panel and (prev/next) navigation buttons 'view' -> show overall status and tabs under title bar

Parameters
stringdisplay mode
Returns
boolean true if display mode was successfully set

Definition at line 483 of file class.ilSetupGUI.php.

484 {
485 // security
486 if ($a_mode != "view" and $a_mode != "setup")
487 {
488 return false;
489 }
490
491 $this->display_mode = $a_mode;
492 $_SESSION["display_mode"] = $this->display_mode;
493
494 return true;
495 }

References $_SESSION, and $display_mode.

Referenced by cmdAdmin(), cmdClient(), and ilSetupGUI().

+ Here is the caller graph for this function:

◆ showHotfixSteps()

ilSetupGUI::showHotfixSteps ( )

Show hotfix steps.

Parameters

return

Definition at line 2735 of file class.ilSetupGUI.php.

2736 {
2737 $this->showUpdateSteps(true);
2738 }
showUpdateSteps($a_hotfix=false)
Update database.

References showUpdateSteps().

+ Here is the call graph for this function:

◆ showLongerSettings()

ilSetupGUI::showLongerSettings ( )

show a list of setting values that are loger than 4000 characters

Definition at line 3704 of file class.ilSetupGUI.php.

3705 {
3706 include_once("./Services/Administration/classes/class.ilSetting.php");
3707 $this->longer_settings = ilSetting::_getLongerSettings();
3708 $this->displayTools();
3709 }

References ilSetting\_getLongerSettings(), and displayTools().

+ Here is the call graph for this function:

◆ showUpdateSteps()

ilSetupGUI::showUpdateSteps (   $a_hotfix = false)

Update database.

Definition at line 2744 of file class.ilSetupGUI.php.

2745 {
2747
2748 $this->checkDisplayMode("setup_database");
2749
2750 //$this->tpl->addBlockFile("SETUP_CONTENT","setup_content","tpl.clientsetup_db.html", "setup");
2751
2752 // database is intalled
2753 if ($this->setup->getClient()->db_installed)
2754 {
2755 $ilDB = $this->setup->getClient()->db;
2756 $this->lng->setDbHandler($ilDB);
2757 $dbupdate = new ilDBUpdate($ilDB);
2758 $db_status = $dbupdate->getDBVersionStatus();
2759 $hotfix_available = $dbupdate->hotfixAvailable();
2760 $custom_updates_available = $dbupdate->customUpdatesAvailable();
2761// $this->initClientDbForm(false, $dbupdate, $db_status, $hotfix_available, $custom_updates_available);
2762// $this->getClientDbFormValues($dbupdate);
2763
2764 $ntpl = new ilTemplate("tpl.setup_steps.html", true, true, "setup");
2765 if ($a_hotfix)
2766 {
2767 $ntpl->setVariable("CONTENT", $dbupdate->getHotfixSteps());
2768 }
2769 else
2770 {
2771 $ntpl->setVariable("CONTENT", $dbupdate->getUpdateSteps($_POST["update_break"]));
2772 }
2773 $ntpl->setVariable("BACK", $this->lng->txt("back"));
2774 $ntpl->setVariable("HREF_BACK", "./setup.php?client_id=&cmd=db");
2775 $this->tpl->setVariable("SETUP_CONTENT", $ntpl->get());
2776 }
2777 }

References $_POST, $ilCtrlStructureReader, $ilDB, and checkDisplayMode().

Referenced by showHotfixSteps().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ switchTree()

ilSetupGUI::switchTree ( )

Definition at line 3483 of file class.ilSetupGUI.php.

3484 {
3485 $set = new ilSetting('common');
3486 $type = ($set->get('main_tree_impl','ns') == 'ns' ? 'ns' : 'mp');
3487
3488 if($type == 'ns' and $_POST['tree_impl_type'] == 'mp')
3489 {
3490 // To mp
3491 include_once './Services/Tree/classes/class.ilMaterializedPathTree.php';
3493
3494 $GLOBALS['ilDB']->dropIndexByFields('tree',array('lft'));
3495 $GLOBALS['ilDB']->dropIndexByFields('tree',array('path'));
3496 $GLOBALS['ilDB']->addIndex('tree',array('path'),'i4');
3497
3498 $set->set('main_tree_impl', 'mp');
3499
3500 }
3501 elseif($type == 'mp' and $_POST['tree_impl_type'] == 'ns')
3502 {
3503 include_once './Services/Tree/classes/class.ilTree.php';
3504 $GLOBALS['ilSetting'] = $set;
3505 $tree = new ilTree(1);
3506 $tree->renumber(1);
3507
3508 $GLOBALS['ilDB']->dropIndexByFields('tree',array('lft'));
3509 $GLOBALS['ilDB']->dropIndexByFields('tree',array('path'));
3510 $GLOBALS['ilDB']->addIndex('tree',array('lft'),'i4');
3511
3512 $set->set('main_tree_impl', 'ns');
3513 }
3514
3515 ilUtil::sendInfo($this->lng->txt("tree_implementation_switched"), true);
3516 $this->displayTools();
3517 }
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...

References $_POST, $GLOBALS, ilMaterializedPathTree\createFromParentReleation(), displayTools(), and ilUtil\sendInfo().

Referenced by cmdClient().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleClientList()

ilSetupGUI::toggleClientList ( )

enable/disable client list on index page

Definition at line 4015 of file class.ilSetupGUI.php.

4016 {
4017 if ($this->setup->ini->readVariable("clients","list"))
4018 {
4019 $this->setup->ini->setVariable("clients","list","0");
4020 $this->setup->ini->write();
4021 ilUtil::sendInfo($this->lng->txt("list_disabled"),true);
4022 }
4023 else
4024 {
4025 $this->setup->ini->setVariable("clients","list","1");
4026 $this->setup->ini->write();
4027 ilUtil::sendInfo($this->lng->txt("list_enabled"),true);
4028 }
4029
4030 ilUtil::redirect("setup.php");
4031 }

References ilUtil\redirect(), and ilUtil\sendInfo().

Referenced by cmdAdmin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateBasicSettings()

ilSetupGUI::updateBasicSettings ( )

Update basic settings form.

Definition at line 1278 of file class.ilSetupGUI.php.

1279 {
1280 global $tpl, $lng, $ilCtrl;
1281
1282 $this->initBasicSettingsForm();
1283
1284 if ($this->form->checkInput())
1285 {
1286 if (ilUtil::isWindows())
1287 {
1288 $fs = array("datadir_path", "log_path", "convert_path", "zip_path",
1289 "unzip_path", "ghostscript_path", "java_path", "htmldoc_path", "ffmpeg_path");
1290 foreach ($fs as $f)
1291 {
1292 $_POST[$f] = str_replace("\\", "/", $_POST[$f]);
1293 }
1294 }
1295
1296 if (!$this->setup->checkLogSetup($_POST))
1297 {
1298 $i = $this->form->getItemByPostVar("log_path");
1299 $i->setAlert($this->lng->txt($this->setup->getError()));
1300 ilUtil::sendFailure($this->lng->txt("form_input_not_valid"),true);
1301 }
1302 else if (!$this->setup->updateMasterSettings($_POST))
1303 {
1304 ilUtil::sendFailure($this->lng->txt($this->setup->getError()),true);
1305 }
1306 else
1307 {
1308 ilUtil::sendSuccess($this->lng->txt("settings_saved"),true);
1309 ilUtil::redirect("setup.php?cmd=mastersettings");
1310 }
1311 }
1312
1313 $this->form->setValuesByPost();
1314 $this->changeMasterSettings(true);
1315 }

References $_POST, $ilCtrl, $lng, $tpl, changeMasterSettings(), initBasicSettingsForm(), ilUtil\isWindows(), ilUtil\redirect(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

Referenced by determineToolsPath().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateDatabase()

ilSetupGUI::updateDatabase ( )

Update database.

Definition at line 2663 of file class.ilSetupGUI.php.

2664 {
2666
2667 $ilCtrlStructureReader->setIniFile($this->setup->getClient()->ini);
2668
2669 include_once "./Services/Database/classes/class.ilDBUpdate.php";
2670 include_once "./Services/AccessControl/classes/class.ilRbacAdmin.php";
2671 include_once "./Services/AccessControl/classes/class.ilRbacReview.php";
2672 include_once "./Services/AccessControl/classes/class.ilRbacSystem.php";
2673 include_once "./Services/Tree/classes/class.ilTree.php";
2674 include_once "./Services/Xml/classes/class.ilSaxParser.php";
2675 include_once "./Services/Object/classes/class.ilObjectDefinition.php";
2676
2677 // #9019: init timezone
2678 $tz = $this->setup->ini->readVariable("server","timezone");
2679 if ($tz != "")
2680 {
2681 if (function_exists('date_default_timezone_set'))
2682 {
2683 date_default_timezone_set($tz);
2684 }
2685 define ("IL_TIMEZONE", $tz);
2686 }
2687
2688 // referencing db handler in language class
2689 $ilDB = $this->setup->getClient()->db;
2690 $this->lng->setDbHandler($ilDB);
2691
2692 // run dbupdate
2693 $dbupdate = new ilDBUpdate($ilDB);
2694 $dbupdate->applyUpdate((int) $_POST["update_break"]);
2695
2696 if ($dbupdate->updateMsg == "no_changes")
2697 {
2698 $message = $this->lng->txt("no_changes").". ".$this->lng->txt("database_is_uptodate");
2699 }
2700 else
2701 {
2702 $sep = "";
2703 foreach ($dbupdate->updateMsg as $row)
2704 {
2705 if ($row["msg"] == "update_applied")
2706 {
2707 $a_message.= $sep.$row["nr"];
2708 $sep = ", ";
2709 }
2710 else
2711 {
2712 $e_message.= "<br/>".$this->lng->txt($row["msg"]).": ".$row["nr"];
2713 }
2714 }
2715 if ($a_message != "")
2716 {
2717 $a_message = $this->lng->txt("update_applied").": ".$a_message;
2718 }
2719 }
2720
2721 ilUtil::sendInfo($a_message.$e_message, true);
2722 ilUtil::redirect("setup.php?cmd=displayDatabase");
2723 }

References $_POST, $ilCtrlStructureReader, $ilDB, $row, ilUtil\redirect(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ validateSetup()

ilSetupGUI::validateSetup ( )

validatesetup status again and set access mode of the first client to online

Definition at line 3935 of file class.ilSetupGUI.php.

3936 {
3937 foreach ($this->setup->getClient()->status as $key => $val)
3938 {
3939 if ($key != "finish" and $key != "access")
3940 {
3941 if ($val["status"] != true)
3942 {
3943 return false;
3944 }
3945 }
3946 }
3947
3948//$this->setup->getClient()->setSetting("zzz", "V");
3949 $clientlist = new ilClientList($this->setup->db_connections);
3950//$this->setup->getClient()->setSetting("zzz", "W");
3951 $list = $clientlist->getClients();
3952//$this->setup->getClient()->setSetting("zzz", "X");
3953 if (count($list) == 1)
3954 {
3955 $this->setup->ini->setVariable("clients","default",$this->setup->getClient()->getId());
3956 $this->setup->ini->write();
3957
3958 $this->setup->getClient()->ini->setVariable("client","access",1);
3959 $this->setup->getClient()->ini->write();
3960 }
3961//$this->setup->getClient()->setSetting("zzz", "Y");
3962 return true;
3963 }

Referenced by displayFinishSetup().

+ Here is the caller graph for this function:

Field Documentation

◆ $btn_next_cmd

ilSetupGUI::$btn_next_cmd

Definition at line 25 of file class.ilSetupGUI.php.

◆ $btn_next_lng

ilSetupGUI::$btn_next_lng

Definition at line 26 of file class.ilSetupGUI.php.

◆ $btn_next_on

ilSetupGUI::$btn_next_on = false

Definition at line 24 of file class.ilSetupGUI.php.

◆ $btn_prev_cmd

ilSetupGUI::$btn_prev_cmd

Definition at line 21 of file class.ilSetupGUI.php.

◆ $btn_prev_lng

ilSetupGUI::$btn_prev_lng

Definition at line 22 of file class.ilSetupGUI.php.

◆ $btn_prev_on

ilSetupGUI::$btn_prev_on = false

Definition at line 20 of file class.ilSetupGUI.php.

◆ $cmd

ilSetupGUI::$cmd

◆ $display_mode

ilSetupGUI::$display_mode = "view"

Definition at line 33 of file class.ilSetupGUI.php.

Referenced by ilSetupGUI(), and setDisplayMode().

◆ $lang

ilSetupGUI::$lang

Definition at line 30 of file class.ilSetupGUI.php.

◆ $lng

◆ $log

ilSetupGUI::$log

Definition at line 18 of file class.ilSetupGUI.php.

◆ $revision

ilSetupGUI::$revision

Definition at line 28 of file class.ilSetupGUI.php.

◆ $tpl

◆ $version

ilSetupGUI::$version

Definition at line 29 of file class.ilSetupGUI.php.


The documentation for this class was generated from the following file: