fixed session problems
This commit is contained in:
parent
86bafd04f6
commit
d434115c54
|
@ -32,6 +32,32 @@ session_save_path("../../sess");
|
|||
|
||||
setlanguage();
|
||||
|
||||
// remove settings from session
|
||||
session_unregister('passwd');
|
||||
session_unregister('passwd1');
|
||||
session_unregister('passwd2');
|
||||
session_unregister('serverurl');
|
||||
session_unregister('admins');
|
||||
session_unregister('suffusers');
|
||||
session_unregister('suffgroups');
|
||||
session_unregister('suffhosts');
|
||||
session_unregister('minUID');
|
||||
session_unregister('maxUID');
|
||||
session_unregister('minGID');
|
||||
session_unregister('maxGID');
|
||||
session_unregister('minMach');
|
||||
session_unregister('maxMach');
|
||||
session_unregister('usrlstattr');
|
||||
session_unregister('grplstattr');
|
||||
session_unregister('hstlstattr');
|
||||
session_unregister('maxlistentries');
|
||||
session_unregister('lang');
|
||||
session_unregister('scriptpath');
|
||||
session_unregister('scriptserver');
|
||||
session_unregister('samba3');
|
||||
session_unregister('domainSID');
|
||||
session_unregister('filename');
|
||||
|
||||
echo ("<?xml version=\"1.0\" encoding=\"ISO-8859-15\"?>");
|
||||
echo ("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">");
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ if ($_POST['back'] || $_POST['submitconf']){
|
|||
if ($_POST['grplstattr']) $grplstattr = $_POST['grplstattr'];
|
||||
if ($_POST['hstlstattr']) $hstlstattr = $_POST['hstlstattr'];
|
||||
if ($_POST['maxlistentries']) $maxlistentries = $_POST['maxlistentries'];
|
||||
if ($_POST['language']) $language = $_POST['language'];
|
||||
if ($_POST['lang']) $lang = $_POST['lang'];
|
||||
if ($_POST['scriptpath']) $scriptpath = $_POST['scriptpath'];
|
||||
if ($_POST['samba3']) $samba3 = $_POST['samba3'];
|
||||
if ($_POST['domainSID']) $domainSID = $_POST['domainSID'];
|
||||
|
@ -67,7 +67,7 @@ if ($_POST['back'] || $_POST['submitconf']){
|
|||
if ($_POST['filename']) $filename = $_POST['filename'];
|
||||
session_register('passwd', 'passwd1', 'passwd2', 'serverurl', 'admins', 'suffusers',
|
||||
'suffgroups', 'suffhosts', 'minUID', 'maxUID', 'minGID', 'maxGID', 'minMach',
|
||||
'maxMach', 'usrlstattr', 'grplstattr', 'hstlstattr', 'maxlistentries', 'language',
|
||||
'maxMach', 'usrlstattr', 'grplstattr', 'hstlstattr', 'maxlistentries', 'lang',
|
||||
'scriptpath', 'scriptserver', 'samba3', 'domainSID', 'filename');
|
||||
echo("<meta http-equiv=\"refresh\" content=\"0; URL=confsave.php\">");
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ if(is_file($languagefile))
|
|||
}
|
||||
fclose($file);
|
||||
// generate language list
|
||||
echo ("<select name=\"language\">");
|
||||
echo ("<select name=\"lang\">");
|
||||
for ($i = 0; $i < sizeof($languages); $i++) {
|
||||
$entry = explode(":", $languages[$i]);
|
||||
if ($_SESSION['config']->get_defaultLanguage() != $languages[$i]) echo("<option value=\"" . $languages[$i] . "\">" . $entry[2] . "</option>\n");
|
||||
|
|
|
@ -52,7 +52,7 @@ if ($_SESSION['usrlstattr']) $usrlstattr = $_SESSION['usrlstattr'];
|
|||
if ($_SESSION['grplstattr']) $grplstattr = $_SESSION['grplstattr'];
|
||||
if ($_SESSION['hstlstattr']) $hstlstattr = $_SESSION['hstlstattr'];
|
||||
if ($_SESSION['maxlistentries']) $maxlistentries = $_SESSION['maxlistentries'];
|
||||
if ($_SESSION['language']) $language = $_SESSION['language'];
|
||||
if ($_SESSION['lang']) $lang = $_SESSION['lang'];
|
||||
if ($_SESSION['scriptpath']) $scriptpath = $_SESSION['scriptpath'];
|
||||
if ($_SESSION['scriptserver']) $scriptserver = $_SESSION['scriptserver'];
|
||||
if ($_SESSION['samba3']) $samba3 = $_SESSION['samba3'];
|
||||
|
@ -153,7 +153,7 @@ if (!$maxlistentries) {
|
|||
exit;
|
||||
}
|
||||
|
||||
if (!$language) {
|
||||
if (!$lang) {
|
||||
echo ("<font color=\"red\"><b>" . _("Language is not defined!") . "</b></font>");
|
||||
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
|
||||
exit;
|
||||
|
@ -187,7 +187,7 @@ $conf->set_userlistAttributes($usrlstattr);
|
|||
$conf->set_grouplistAttributes($grplstattr);
|
||||
$conf->set_hostlistAttributes($hstlstattr);
|
||||
$conf->set_MaxListEntries($maxlistentries);
|
||||
$conf->set_defaultLanguage($language);
|
||||
$conf->set_defaultLanguage($lang);
|
||||
$conf->set_samba3($samba3);
|
||||
$conf->set_domainSID($domainSID);
|
||||
// optional
|
||||
|
@ -217,29 +217,29 @@ echo ("<br><br><br><br><br><a href=\"../login.php\" target=\"_top\">" . _("Back
|
|||
echo("</body></html>");
|
||||
|
||||
// remove settings from session
|
||||
unset($_SESSION['passwd']);
|
||||
unset($_SESSION['passwd1']);
|
||||
unset($_SESSION['passwd2']);
|
||||
unset($_SESSION['serverurl']);
|
||||
unset($_SESSION['admins']);
|
||||
unset($_SESSION['suffusers']);
|
||||
unset($_SESSION['suffgroups']);
|
||||
unset($_SESSION['suffhosts']);
|
||||
unset($_SESSION['minUID']);
|
||||
unset($_SESSION['maxUID']);
|
||||
unset($_SESSION['minGID']);
|
||||
unset($_SESSION['maxGID']);
|
||||
unset($_SESSION['minMach']);
|
||||
unset($_SESSION['maxMach']);
|
||||
unset($_SESSION['usrlstattr']);
|
||||
unset($_SESSION['grplstattr']);
|
||||
unset($_SESSION['hstlstattr']);
|
||||
unset($_SESSION['maxlistentries']);
|
||||
unset($_SESSION['language']);
|
||||
unset($_SESSION['scriptpath']);
|
||||
unset($_SESSION['scriptserver']);
|
||||
unset($_SESSION['samba3']);
|
||||
unset($_SESSION['domainSID']);
|
||||
unset($_SESSION['filename']);
|
||||
session_unregister('passwd');
|
||||
session_unregister('passwd1');
|
||||
session_unregister('passwd2');
|
||||
session_unregister('serverurl');
|
||||
session_unregister('admins');
|
||||
session_unregister('suffusers');
|
||||
session_unregister('suffgroups');
|
||||
session_unregister('suffhosts');
|
||||
session_unregister('minUID');
|
||||
session_unregister('maxUID');
|
||||
session_unregister('minGID');
|
||||
session_unregister('maxGID');
|
||||
session_unregister('minMach');
|
||||
session_unregister('maxMach');
|
||||
session_unregister('usrlstattr');
|
||||
session_unregister('grplstattr');
|
||||
session_unregister('hstlstattr');
|
||||
session_unregister('maxlistentries');
|
||||
session_unregister('lang');
|
||||
session_unregister('scriptpath');
|
||||
session_unregister('scriptserver');
|
||||
session_unregister('samba3');
|
||||
session_unregister('domainSID');
|
||||
session_unregister('filename');
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue