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