@ -55,7 +55,7 @@ $_setting = array(
if (!empty($_POST['language_list'])) {
if (!empty($_POST['language_list'])) {
$search = array('../', '\\0');
$search = array('../', '\\0');
$install_language = str_replace($search, '', urldecode($_POST['language_list']));
$install_language = str_replace($search, '', urldecode($_POST['language_list']));
Session::write('install_language', $install_language);
Session::write('install_language', $install_language);
} elseif (isset($_SESSION['install_language']) & & $_SESSION['install_language']) {
} elseif (isset($_SESSION['install_language']) & & $_SESSION['install_language']) {
$install_language = $_SESSION['install_language'];
$install_language = $_SESSION['install_language'];
} else {
} else {
@ -185,7 +185,7 @@ if (@$_POST['step2_install'] || @$_POST['step2_update_8'] || @$_POST['step2_upda
if ($installType == 'update' & & in_array($my_old_version, $update_from_version_8)) {
if ($installType == 'update' & & in_array($my_old_version, $update_from_version_8)) {
// This is the main configuration file of the system before the upgrade.
// This is the main configuration file of the system before the upgrade.
include api_get_path(CONFIGURATION_PATH). 'configuration.php'; // Don't change to include_once
include api_get_path(CONFIGURATION_PATH) . 'configuration.php'; // Don't change to include_once
}
}
if (!isset($_GET['running'])) {
if (!isset($_GET['running'])) {
@ -219,7 +219,7 @@ if (!isset($_GET['running'])) {
$languageForm = api_get_interface_language();
$languageForm = api_get_interface_language();
$checkEmailByHashSent = 0;
$checkEmailByHashSent = 0;
$ShowEmailnotc heckedToStudent = 1;
$ShowEmailNotC heckedToStudent = 1;
$userMailCanBeEmpty = 1;
$userMailCanBeEmpty = 1;
$allowSelfReg = 1;
$allowSelfReg = 1;
$allowSelfRegProf = 1;
$allowSelfRegProf = 1;
@ -254,7 +254,7 @@ if (!$_POST) {
$current_step = 1;
$current_step = 1;
} elseif (!empty($_POST['language_list']) or !empty($_POST['step1']) or ((!empty($_POST['step2_update_8']) or (!empty($_POST['step2_update_6']))) & & ($emptyUpdatePath or $badUpdatePath))) {
} elseif (!empty($_POST['language_list']) or !empty($_POST['step1']) or ((!empty($_POST['step2_update_8']) or (!empty($_POST['step2_update_6']))) & & ($emptyUpdatePath or $badUpdatePath))) {
$current_step = 2;
$current_step = 2;
} elseif (!empty($_POST['step2']) or (!empty($_POST['step2_update_8']) or (!empty($_POST['step2_update_6'])) )) {
} elseif (!empty($_POST['step2']) or (!empty($_POST['step2_update_8']) or (!empty($_POST['step2_update_6'])))) {
$current_step = 3;
$current_step = 3;
} elseif (!empty($_POST['step3'])) {
} elseif (!empty($_POST['step3'])) {
$current_step = 4;
$current_step = 4;
@ -404,16 +404,16 @@ if ($encryptPassForm == '1') {
< form class = "form-horizontal" id = "install_form" method = "post" action = " <?php echo api_get_self (); ?> ?running=1&installType= <?php echo $installType ; ?> &updateFromConfigFile= <?php echo urlencode ( $updateFromConfigFile ); ?> " >
< form class = "form-horizontal" id = "install_form" method = "post" action = " <?php echo api_get_self (); ?> ?running=1&installType= <?php echo $installType ; ?> &updateFromConfigFile= <?php echo urlencode ( $updateFromConfigFile ); ?> " >
<?php
<?php
$instalation_type_label = '';
$instalation_type_label = '';
if ($installType == 'new'){
if ($installType == 'new') {
$instalation_type_label = get_lang('NewInstallation');
$instalation_type_label = get_lang('NewInstallation');
} elseif ($installType == 'update') {
} elseif ($installType == 'update') {
$update_from_version = isset($update_from_version) ? $update_from_version : null;
$update_from_version = isset($update_from_version) ? $update_from_version : null;
$instalation_type_label = get_lang('UpdateFromLMSVersion').(is_array($update_from_version) ? implode('|', $update_from_version) : '');
$instalation_type_label = get_lang('UpdateFromLMSVersion').(is_array($update_from_version) ? implode('|', $update_from_version) : '');
}
}
if (!empty($instalation_type_label) & & empty($_POST['step6'])) {
if (!empty($instalation_type_label) & & empty($_POST['step6'])) {
echo '< div class = "page-header" > < h2 > '.$instalation_type_label.'< / h2 > < / div > ';
echo '< div class = "page-header" > < h2 > '.$instalation_type_label.'< / h2 > < / div > ';
}
}
?>
?>
< input type = "hidden" name = "updatePath" value = " <?php if ( ! $badUpdatePath ) echo api_htmlentities ( $proposedUpdatePath , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "updatePath" value = " <?php if ( ! $badUpdatePath ) echo api_htmlentities ( $proposedUpdatePath , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "urlAppendPath" value = " <?php echo api_htmlentities ( $urlAppendPath , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "urlAppendPath" value = " <?php echo api_htmlentities ( $urlAppendPath , ENT_QUOTES ); ?> " />
@ -437,7 +437,7 @@ if ($encryptPassForm == '1') {
< input type = "hidden" name = "institutionForm" value = " <?php echo api_htmlentities ( $institutionForm , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "institutionForm" value = " <?php echo api_htmlentities ( $institutionForm , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "institutionUrlForm" value = " <?php echo api_stristr ( $institutionUrlForm , 'http://' , false ) ? api_htmlentities ( $institutionUrlForm , ENT_QUOTES ) : api_stristr ( $institutionUrlForm , 'https://' , false ) ? api_htmlentities ( $institutionUrlForm , ENT_QUOTES ) : 'http://' . api_htmlentities ( $institutionUrlForm , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "institutionUrlForm" value = " <?php echo api_stristr ( $institutionUrlForm , 'http://' , false ) ? api_htmlentities ( $institutionUrlForm , ENT_QUOTES ) : api_stristr ( $institutionUrlForm , 'https://' , false ) ? api_htmlentities ( $institutionUrlForm , ENT_QUOTES ) : 'http://' . api_htmlentities ( $institutionUrlForm , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "checkEmailByHashSent" value = " <?php echo api_htmlentities ( $checkEmailByHashSent , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "checkEmailByHashSent" value = " <?php echo api_htmlentities ( $checkEmailByHashSent , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "ShowEmailnotc heckedToStudent" value = " <?php echo api_htmlentities ( $ShowEmailnotc heckedToStudent , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "ShowEmailNotC heckedToStudent" value = " <?php echo api_htmlentities ( $ShowEmailNotC heckedToStudent , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "userMailCanBeEmpty" value = " <?php echo api_htmlentities ( $userMailCanBeEmpty , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "userMailCanBeEmpty" value = " <?php echo api_htmlentities ( $userMailCanBeEmpty , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "encryptPassForm" value = " <?php echo api_htmlentities ( $encryptPassForm , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "encryptPassForm" value = " <?php echo api_htmlentities ( $encryptPassForm , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "session_lifetime" value = " <?php echo api_htmlentities ( $session_lifetime , ENT_QUOTES ); ?> " />
< input type = "hidden" name = "session_lifetime" value = " <?php echo api_htmlentities ( $session_lifetime , ENT_QUOTES ); ?> " />
@ -472,28 +472,44 @@ if (@$_POST['step2']) {
);
);
$tmp = get_config_param_from_db('platformLanguage');
$tmp = get_config_param_from_db('platformLanguage');
if (!empty($tmp)) $languageForm = $tmp;
if (!empty($tmp)) {
$languageForm = $tmp;
}
$tmp = get_config_param_from_db('emailAdministrator');
$tmp = get_config_param_from_db('emailAdministrator');
if (!empty($tmp)) $emailForm = $tmp;
if (!empty($tmp)) {
$emailForm = $tmp;
}
$tmp = get_config_param_from_db('administratorName');
$tmp = get_config_param_from_db('administratorName');
if (!empty($tmp)) $adminFirstName = $tmp;
if (!empty($tmp)) {
$adminFirstName = $tmp;
}
$tmp = get_config_param_from_db('administratorSurname');
$tmp = get_config_param_from_db('administratorSurname');
if (!empty($tmp)) $adminLastName = $tmp;
if (!empty($tmp)) {
$adminLastName = $tmp;
}
$tmp = get_config_param_from_db('administratorTelephone');
$tmp = get_config_param_from_db('administratorTelephone');
if (!empty($tmp)) $adminPhoneForm = $tmp;
if (!empty($tmp)) {
$adminPhoneForm = $tmp;
}
$tmp = get_config_param_from_db('siteName');
$tmp = get_config_param_from_db('siteName');
if (!empty($tmp)) $campusForm = $tmp;
if (!empty($tmp)) {
$campusForm = $tmp;
}
$tmp = get_config_param_from_db('Institution');
$tmp = get_config_param_from_db('Institution');
if (!empty($tmp)) $institutionForm = $tmp;
if (!empty($tmp)) {
$institutionForm = $tmp;
}
$tmp = get_config_param_from_db('InstitutionUrl');
$tmp = get_config_param_from_db('InstitutionUrl');
if (!empty($tmp)) $institutionUrlForm = $tmp;
if (!empty($tmp)) {
$institutionUrlForm = $tmp;
}
// For version 1.9
// For version 1.9
$urlForm = $_configuration['root_web'];
$urlForm = $_configuration['root_web'];
@ -507,11 +523,15 @@ if (@$_POST['step2']) {
$allowSelfReg = false;
$allowSelfReg = false;
$tmp = get_config_param_from_db('allow_registration');
$tmp = get_config_param_from_db('allow_registration');
if (!empty($tmp)) $allowSelfReg = $tmp;
if (!empty($tmp)) {
$allowSelfReg = $tmp;
}
$allowSelfRegProf = false;
$allowSelfRegProf = false;
$tmp = get_config_param_from_db('allow_registration_as_teacher');
$tmp = get_config_param_from_db('allow_registration_as_teacher');
if (!empty($tmp)) $allowSelfRegProf = $tmp;
if (!empty($tmp)) {
$allowSelfRegProf = $tmp;
}
}
}
display_configuration_settings_form(
display_configuration_settings_form(
@ -542,11 +562,11 @@ if (@$_POST['step2']) {
<?php echo get_lang ( 'HereAreTheValuesYouEntered' ); ?>
<?php echo get_lang ( 'HereAreTheValuesYouEntered' ); ?>
< / div > < br / >
< / div > < br / >
<?php if ( $installType == 'new' ) : ?>
<?php
<?php echo get_lang ( 'AdminLogin' ) . ' : <strong>' . $loginForm ; ?> </ strong >< br />
if ($installType == 'new') {
<?php echo get_lang ( 'AdminPass' ) . ' : <strong>' . $passForm ; /* TODO: Maybe this password should be hidden too? */ ?> </ strong >< br />< br />
echo get_lang('AdminLogin') . ' : < strong > ' . $loginForm . '< / strong > < br / > ';
<?php else : ?>
echo get_lang('AdminPass') . ' : < strong > ' . $passForm . '< / strong > < br / > < br / > '; /* TODO: Maybe this password should be hidden too? */
<?php endif ;
}
if (api_is_western_name_order()) {
if (api_is_western_name_order()) {
echo get_lang('AdminFirstName').' : '.$adminFirstName, '< br / > ', get_lang('AdminLastName').' : '.$adminLastName, '< br / > ';
echo get_lang('AdminFirstName').' : '.$adminFirstName, '< br / > ', get_lang('AdminLastName').' : '.$adminLastName, '< br / > ';
@ -601,7 +621,7 @@ if (@$_POST['step2']) {
< / tr >
< / tr >
< / table >
< / table >
<?php
<?php
} elseif (@$_POST['step6']) {
} elseif (@$_POST['step6']) {
//STEP 6 : INSTALLATION PROCESS
//STEP 6 : INSTALLATION PROCESS
$current_step = 7;
$current_step = 7;
@ -733,12 +753,12 @@ if (@$_POST['step2']) {
display_language_selection();
display_language_selection();
}
}
?>
?>
< / form >
< / form >
< / div > <!-- col - md - 9 -->
< / div > <!-- col - md - 9 -->
< / div > <!-- row -->
< / div > <!-- row -->
< / div > <!-- main end -->
< / div > <!-- main end -->
< div class = "push" > < / div >
< div class = "push" > < / div >
< / div > <!-- wrapper end -->
< / div > <!-- wrapper end -->
< footer > < / footer >
< footer > < / footer >
< / body >
< / body >
< / html >
< / html >