removed session_(un)register(...), minor bug fixes

This commit is contained in:
Roland Gruber 2003-08-09 10:56:46 +00:00
parent f28f522507
commit 55cbfebe12
8 changed files with 144 additions and 133 deletions

View File

@ -143,7 +143,7 @@ class Ldap{
} }
} }
// add root suffix if needed // add root suffix if needed
$found == false; $found = false;
for ($i = 0; $i < sizeof($ret); $i++) { // search suffix case-intensitive for ($i = 0; $i < sizeof($ret); $i++) { // search suffix case-intensitive
if (strtolower($suffix) == strtolower($ret[$i])) { if (strtolower($suffix) == strtolower($ret[$i])) {
$found = true; $found = true;

View File

@ -33,30 +33,30 @@ session_save_path("../../sess");
setlanguage(); setlanguage();
// remove settings from session // remove settings from session
session_unregister('passwd'); unset($_SESSION['passwd']);
session_unregister('passwd1'); unset($_SESSION['passwd1']);
session_unregister('passwd2'); unset($_SESSION['passwd2']);
session_unregister('serverurl'); unset($_SESSION['serverurl']);
session_unregister('admins'); unset($_SESSION['admins']);
session_unregister('suffusers'); unset($_SESSION['suffusers']);
session_unregister('suffgroups'); unset($_SESSION['suffgroups']);
session_unregister('suffhosts'); unset($_SESSION['suffhosts']);
session_unregister('minUID'); unset($_SESSION['minUID']);
session_unregister('maxUID'); unset($_SESSION['maxUID']);
session_unregister('minGID'); unset($_SESSION['minGID']);
session_unregister('maxGID'); unset($_SESSION['maxGID']);
session_unregister('minMach'); unset($_SESSION['minMach']);
session_unregister('maxMach'); unset($_SESSION['maxMach']);
session_unregister('usrlstattr'); unset($_SESSION['usrlstattr']);
session_unregister('grplstattr'); unset($_SESSION['grplstattr']);
session_unregister('hstlstattr'); unset($_SESSION['hstlstattr']);
session_unregister('maxlistentries'); unset($_SESSION['maxlistentries']);
session_unregister('lang'); unset($_SESSION['lang']);
session_unregister('scriptpath'); unset($_SESSION['scriptpath']);
session_unregister('scriptserver'); unset($_SESSION['scriptserver']);
session_unregister('samba3'); unset($_SESSION['samba3']);
session_unregister('domainSID'); unset($_SESSION['domainSID']);
session_unregister('filename'); unset($_SESSION['filename']);
echo $_SESSION['header']; echo $_SESSION['header'];

View File

@ -38,39 +38,34 @@ if ($_POST['back'] || $_POST['submitconf']){
if ($_POST['submitconf']){ if ($_POST['submitconf']){
// save HTTP-POST variables in session // save HTTP-POST variables in session
// get data if register_globals is off // get data if register_globals is off
if ($_POST['passwd']) $passwd = $_POST['passwd']; if ($_POST['passwd']) $_SESSION['passwd'] = $_POST['passwd'];
if ($_POST['passwd1']) $passwd1 = $_POST['passwd1']; if ($_POST['passwd1']) $_SESSION['passwd1'] = $_POST['passwd1'];
if ($_POST['passwd2']) $passwd2 = $_POST['passwd2']; if ($_POST['passwd2']) $_SESSION['passwd2'] = $_POST['passwd2'];
if ($_POST['serverurl']) $serverurl = $_POST['serverurl']; if ($_POST['serverurl']) $_SESSION['serverurl'] = $_POST['serverurl'];
if ($_POST['admins']) $admins = $_POST['admins']; if ($_POST['admins']) $_SESSION['admins'] = $_POST['admins'];
if ($_POST['suffusers']) $suffusers = $_POST['suffusers']; if ($_POST['suffusers']) $_SESSION['suffusers'] = $_POST['suffusers'];
if ($_POST['suffgroups']) $suffgroups = $_POST['suffgroups']; if ($_POST['suffgroups']) $_SESSION['suffgroups'] = $_POST['suffgroups'];
if ($_POST['suffhosts']) $suffhosts = $_POST['suffhosts']; if ($_POST['suffhosts']) $_SESSION['suffhosts'] = $_POST['suffhosts'];
if ($_POST['suffdomains']) $suffdomains = $_POST['suffdomains']; if ($_POST['suffdomains']) $_SESSION['suffdomains'] = $_POST['suffdomains'];
// if ($_POST['suffmap']) $suffmap = $_POST['suffmap']; // if ($_POST['suffmap']) $suffmap = $_POST['suffmap'];
if ($_POST['minUID']) $minUID = $_POST['minUID']; if ($_POST['minUID']) $_SESSION['minUID'] = $_POST['minUID'];
if ($_POST['maxUID']) $maxUID = $_POST['maxUID']; if ($_POST['maxUID']) $_SESSION['maxUID'] = $_POST['maxUID'];
if ($_POST['minGID']) $minGID = $_POST['minGID']; if ($_POST['minGID']) $_SESSION['minGID'] = $_POST['minGID'];
if ($_POST['maxGID']) $maxGID = $_POST['maxGID']; if ($_POST['maxGID']) $_SESSION['maxGID'] = $_POST['maxGID'];
if ($_POST['minMach']) $minMach = $_POST['minMach']; if ($_POST['minMach']) $_SESSION['minMach'] = $_POST['minMach'];
if ($_POST['maxMach']) $maxMach = $_POST['maxMach']; if ($_POST['maxMach']) $_SESSION['maxMach'] = $_POST['maxMach'];
if ($_POST['usrlstattr']) $usrlstattr = $_POST['usrlstattr']; if ($_POST['usrlstattr']) $_SESSION['usrlstattr'] = $_POST['usrlstattr'];
if ($_POST['grplstattr']) $grplstattr = $_POST['grplstattr']; if ($_POST['grplstattr']) $_SESSION['grplstattr'] = $_POST['grplstattr'];
if ($_POST['hstlstattr']) $hstlstattr = $_POST['hstlstattr']; if ($_POST['hstlstattr']) $_SESSION['hstlstattr'] = $_POST['hstlstattr'];
if ($_POST['maxlistentries']) $maxlistentries = $_POST['maxlistentries']; if ($_POST['maxlistentries']) $_SESSION['maxlistentries'] = $_POST['maxlistentries'];
if ($_POST['lang']) $lang = $_POST['lang']; if ($_POST['lang']) $_SESSION['lang'] = $_POST['lang'];
if ($_POST['scriptpath']) $scriptpath = $_POST['scriptpath']; if ($_POST['samba3']) $_SESSION['samba3'] = $_POST['samba3'];
if ($_POST['samba3']) $samba3 = $_POST['samba3']; if ($_POST['domainSID']) $_SESSION['domainSID'] = $_POST['domainSID'];
if ($_POST['domainSID']) $domainSID = $_POST['domainSID']; if ($_POST['scriptpath']) $_SESSION['scriptpath'] = $_POST['scriptpath'];
if ($_POST['scriptpath']) $scriptpath = $_POST['scriptpath']; else $_SESSION['scriptpath'] = "";
else $scriptpath = ""; if ($_POST['scriptserver']) $_SESSION['scriptserver'] = $_POST['scriptserver'];
if ($_POST['scriptserver']) $scriptserver = $_POST['scriptserver']; else $_SESSION['scriptserver'] = "";
else $scriptserver = ""; if ($_POST['filename']) $_SESSION['filename'] = $_POST['filename'];
if ($_POST['filename']) $filename = $_POST['filename'];
session_register('passwd', 'passwd1', 'passwd2', 'serverurl', 'admins', 'suffusers',
'suffgroups', 'suffhosts', 'suffdomains', 'minUID', 'maxUID', 'minGID',
'maxGID', 'minMach', 'maxMach', 'usrlstattr', 'grplstattr', 'hstlstattr', 'maxlistentries',
'lang', '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\">");
} }
// back to login // back to login

View File

@ -239,31 +239,31 @@ 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
session_unregister('passwd'); unset($_SESSION['passwd']);
session_unregister('passwd1'); unset($_SESSION['passwd1']);
session_unregister('passwd2'); unset($_SESSION['passwd2']);
session_unregister('serverurl'); unset($_SESSION['serverurl']);
session_unregister('admins'); unset($_SESSION['admins']);
session_unregister('suffusers'); unset($_SESSION['suffusers']);
session_unregister('suffgroups'); unset($_SESSION['suffgroups']);
session_unregister('suffhosts'); unset($_SESSION['suffhosts']);
session_unregister('suffdomains'); unset($_SESSION['suffdomains']);
//session_unregister('suffmap'); //unset($_SESSION['suffmap']);
session_unregister('minUID'); unset($_SESSION['minUID']);
session_unregister('maxUID'); unset($_SESSION['maxUID']);
session_unregister('minGID'); unset($_SESSION['minGID']);
session_unregister('maxGID'); unset($_SESSION['maxGID']);
session_unregister('minMach'); unset($_SESSION['minMach']);
session_unregister('maxMach'); unset($_SESSION['maxMach']);
session_unregister('usrlstattr'); unset($_SESSION['usrlstattr']);
session_unregister('grplstattr'); unset($_SESSION['grplstattr']);
session_unregister('hstlstattr'); unset($_SESSION['hstlstattr']);
session_unregister('maxlistentries'); unset($_SESSION['maxlistentries']);
session_unregister('lang'); unset($_SESSION['lang']);
session_unregister('scriptpath'); unset($_SESSION['scriptpath']);
session_unregister('scriptserver'); unset($_SESSION['scriptserver']);
session_unregister('samba3'); unset($_SESSION['samba3']);
session_unregister('domainSID'); unset($_SESSION['domainSID']);
session_unregister('filename'); unset($_SESSION['filename']);
?> ?>

View File

@ -39,9 +39,7 @@ $sort = $_GET['sort'];
$_POST = $_POST + $_GET; $_POST = $_POST + $_GET;
$dom_info = $_SESSION['dom_info']; $dom_info = $_SESSION['dom_info'];
session_register('dom_info');
$dom_units = $_SESSION['dom_units']; $dom_units = $_SESSION['dom_units'];
session_register('dom_units');
// check if button was pressed and if we have to add/delete a domain // check if button was pressed and if we have to add/delete a domain
if ($_POST['new_domain'] || $_POST['del_domain']){ if ($_POST['new_domain'] || $_POST['del_domain']){
@ -77,8 +75,8 @@ else
// generate attribute and description tables // generate attribute and description tables
$attr_array; // list of LDAP attributes to show $attr_array = array(); // list of LDAP attributes to show
$desc_array; // list of descriptions for the attributes $desc_array = array(); // list of descriptions for the attributes
$attr_array[] = "sambaDomainName"; $attr_array[] = "sambaDomainName";
$attr_array[] = "sambaSID"; $attr_array[] = "sambaSID";
$attr_array[] = "dn"; $attr_array[] = "dn";
@ -90,15 +88,16 @@ $desc_array[] = "DN";
if ($_POST['dom_suffix']) $dom_suffix = $_POST['dom_suffix']; // new suffix selected via combobox if ($_POST['dom_suffix']) $dom_suffix = $_POST['dom_suffix']; // new suffix selected via combobox
elseif ($_SESSION['dom_suffix']) $dom_suffix = $_SESSION['dom_suffix']; // old suffix from session elseif ($_SESSION['dom_suffix']) $dom_suffix = $_SESSION['dom_suffix']; // old suffix from session
else $dom_suffix = $_SESSION["config"]->get_DomainSuffix(); // default suffix else $dom_suffix = $_SESSION["config"]->get_DomainSuffix(); // default suffix
session_register('dom_suffix');
// first time page is shown
if (! $_GET['norefresh']) { if (! $_GET['norefresh']) {
// configure search filter // configure search filter
$filter = "(objectClass=sambaDomain)"; $filter = "(objectClass=sambaDomain)";
$attrs = $attr_array; $attrs = $attr_array;
$sr = @ldap_search($_SESSION["ldap"]->server(), $sr = @ldap_search($_SESSION["ldap"]->server(), $dom_suffix, $filter, $attrs);
$dom_suffix, if (ldap_errno($_SESSION["ldap"]->server()) == 4) {
$filter, $attrs); StatusMessage("WARN", _("LDAP sizelimit exceeded, not all entries are shown."), "See README.openldap to solve this problem.");
}
if ($sr) { if ($sr) {
$dom_info = ldap_get_entries($_SESSION["ldap"]->server, $sr); $dom_info = ldap_get_entries($_SESSION["ldap"]->server, $sr);
ldap_free_result($sr); ldap_free_result($sr);
@ -110,6 +109,7 @@ if (! $_GET['norefresh']) {
} }
else StatusMessage("ERROR", _("LDAP Search failed! Please check your preferences."), _("No Samba Domains found!")); else StatusMessage("ERROR", _("LDAP Search failed! Please check your preferences."), _("No Samba Domains found!"));
} }
// use search result from session
else { else {
if (sizeof($dom_info) == 0) StatusMessage("WARN", "", _("No Samba Domains found!")); if (sizeof($dom_info) == 0) StatusMessage("WARN", "", _("No Samba Domains found!"));
// sort rows by sort column ($sort) // sort rows by sort column ($sort)
@ -251,4 +251,10 @@ function cmp_array($a, $b) {
else return -1; else return -1;
} }
// save variables to session
$_SESSION['dom_info'] = $dom_info;
$_SESSION['dom_units'] = $dom_units;
$_SESSION['dom_suffix'] = $dom_suffix;
?> ?>

View File

@ -39,9 +39,7 @@ $sort = $_GET['sort'];
$_POST = $_POST + $_GET; $_POST = $_POST + $_GET;
$grp_info = $_SESSION['grp_info']; $grp_info = $_SESSION['grp_info'];
session_register('grp_info');
$grp_units = $_SESSION['grp_units']; $grp_units = $_SESSION['grp_units'];
session_register('grp_units');
// check if button was pressed and if we have to add/delete a group // check if button was pressed and if we have to add/delete a group
if ($_POST['new_group'] || $_POST['del_group']){ if ($_POST['new_group'] || $_POST['del_group']){
@ -67,8 +65,8 @@ echo "</head><body>\n";
echo "<script src=\"../../lib/functions.js\" type=\"text/javascript\" language=\"javascript\"></script>\n"; echo "<script src=\"../../lib/functions.js\" type=\"text/javascript\" language=\"javascript\"></script>\n";
// generate attribute-description table // generate attribute-description table
$attr_array; // list of LDAP attributes to show $attr_array = array(); // list of LDAP attributes to show
$desc_array; // list of descriptions for the attributes $desc_array = array(); // list of descriptions for the attributes
$attr_string = $_SESSION["config"]->get_grouplistAttributes(); $attr_string = $_SESSION["config"]->get_grouplistAttributes();
$temp_array = explode(";", $attr_string); $temp_array = explode(";", $attr_string);
$hash_table = $_SESSION["ldap"]->attributeGroupArray(); $hash_table = $_SESSION["ldap"]->attributeGroupArray();
@ -102,7 +100,6 @@ for ($i = 0; $i < sizeof($temp_array); $i++) {
if ($_POST['grp_suffix']) $grp_suffix = $_POST['grp_suffix']; // new suffix selected via combobox if ($_POST['grp_suffix']) $grp_suffix = $_POST['grp_suffix']; // new suffix selected via combobox
elseif ($_SESSION['grp_suffix']) $grp_suffix = $_SESSION['grp_suffix']; // old suffix from session elseif ($_SESSION['grp_suffix']) $grp_suffix = $_SESSION['grp_suffix']; // old suffix from session
else $grp_suffix = $_SESSION["config"]->get_GroupSuffix(); // default suffix else $grp_suffix = $_SESSION["config"]->get_GroupSuffix(); // default suffix
session_register('grp_suffix');
// generate search filter for sort links // generate search filter for sort links
$searchfilter = ""; $searchfilter = "";
@ -126,9 +123,10 @@ if (! $_GET['norefresh']) {
} }
$filter = $filter . ")"; $filter = $filter . ")";
$attrs = $attr_array; $attrs = $attr_array;
$sr = @ldap_search($_SESSION["ldap"]->server(), $sr = @ldap_search($_SESSION["ldap"]->server(), $grp_suffix, $filter, $attrs);
$grp_suffix, if (ldap_errno($_SESSION["ldap"]->server()) == 4) {
$filter, $attrs); StatusMessage("WARN", _("LDAP sizelimit exceeded, not all entries are shown."), "See README.openldap to solve this problem.");
}
if ($sr) { if ($sr) {
$grp_info = ldap_get_entries($_SESSION["ldap"]->server, $sr); $grp_info = ldap_get_entries($_SESSION["ldap"]->server, $sr);
ldap_free_result($sr); ldap_free_result($sr);
@ -309,4 +307,9 @@ function cmp_array($a, $b) {
else return -1; else return -1;
} }
// save variables to session
$_SESSION['grp_info'] = $grp_info;
$_SESSION['grp_units'] = $grp_units;
$_SESSION['grp_suffix'] = $grp_suffix;
?> ?>

View File

@ -39,9 +39,7 @@ $sort = $_GET['sort'];
$_POST = $_POST + $_GET; $_POST = $_POST + $_GET;
$hst_info = $_SESSION['hst_info']; $hst_info = $_SESSION['hst_info'];
session_register('hst_info');
$hst_units = $_SESSION['hst_units']; $hst_units = $_SESSION['hst_units'];
session_register('hst_units');
// check if button was pressed and if we have to add/delete a host // check if button was pressed and if we have to add/delete a host
if ($_POST['new_host'] || $_POST['del_host']){ if ($_POST['new_host'] || $_POST['del_host']){
@ -67,8 +65,8 @@ echo "</head><body>\n";
echo "<script src=\"../../lib/functions.js\" type=\"text/javascript\" language=\"javascript\"></script>\n"; echo "<script src=\"../../lib/functions.js\" type=\"text/javascript\" language=\"javascript\"></script>\n";
// generate attribute-description table // generate attribute-description table
$attr_array; // list of LDAP attributes to show $attr_array = array(); // list of LDAP attributes to show
$desc_array; // list of descriptions for the attributes $desc_array = array(); // list of descriptions for the attributes
$attr_string = $_SESSION["config"]->get_hostlistAttributes(); $attr_string = $_SESSION["config"]->get_hostlistAttributes();
$temp_array = explode(";", $attr_string); $temp_array = explode(";", $attr_string);
$hash_table = $_SESSION["ldap"]->attributeHostArray(); $hash_table = $_SESSION["ldap"]->attributeHostArray();
@ -102,7 +100,6 @@ else {
if ($_POST['hst_suffix']) $hst_suffix = $_POST['hst_suffix']; // new suffix selected via combobox if ($_POST['hst_suffix']) $hst_suffix = $_POST['hst_suffix']; // new suffix selected via combobox
elseif ($_SESSION['hst_suffix']) $hst_suffix = $_SESSION['hst_suffix']; // old suffix from session elseif ($_SESSION['hst_suffix']) $hst_suffix = $_SESSION['hst_suffix']; // old suffix from session
else $hst_suffix = $_SESSION["config"]->get_HostSuffix(); // default suffix else $hst_suffix = $_SESSION["config"]->get_HostSuffix(); // default suffix
session_register('hst_suffix');
// generate search filter for sort links // generate search filter for sort links
$searchfilter = ""; $searchfilter = "";
@ -132,9 +129,10 @@ if (! $_GET['norefresh']) {
} }
$filter = $filter . ")"; $filter = $filter . ")";
$attrs = $attr_array; $attrs = $attr_array;
$sr = @ldap_search($_SESSION["ldap"]->server(), $sr = @ldap_search($_SESSION["ldap"]->server(), $hst_suffix, $filter, $attrs);
$hst_suffix, if (ldap_errno($_SESSION["ldap"]->server()) == 4) {
$filter, $attrs); StatusMessage("WARN", _("LDAP sizelimit exceeded, not all entries are shown."), "See README.openldap to solve this problem.");
}
if ($sr) { if ($sr) {
$hst_info = ldap_get_entries($_SESSION["ldap"]->server, $sr); $hst_info = ldap_get_entries($_SESSION["ldap"]->server, $sr);
ldap_free_result($sr); ldap_free_result($sr);
@ -301,4 +299,9 @@ function cmp_array($a, $b) {
else return -1; else return -1;
} }
// save variables to session
$_SESSION['hst_info'] = $hst_info;
$_SESSION['hst_units'] = $hst_units;
$_SESSION['hst_suffix'] = $hst_suffix;
?> ?>

View File

@ -37,7 +37,6 @@ setlanguage();
$_POST = $_POST + $_GET; $_POST = $_POST + $_GET;
$usr_units = $_SESSION['usr_units']; $usr_units = $_SESSION['usr_units'];
session_register('usr_units');
// check if button was pressed and if we have to add/delete a user // check if button was pressed and if we have to add/delete a user
if ($_POST['new_user'] || $_POST['del_user']){ if ($_POST['new_user'] || $_POST['del_user']){
@ -64,8 +63,8 @@ echo "</head><body>\n";
echo "<script src=\"../../lib/functions.js\" type=\"text/javascript\" language=\"javascript\"></script>\n"; echo "<script src=\"../../lib/functions.js\" type=\"text/javascript\" language=\"javascript\"></script>\n";
// generate attribute-description table // generate attribute-description table
$attr_array; // list of LDAP attributes to show $attr_array = array(); // list of LDAP attributes to show
$desc_array; // list of descriptions for the attributes $desc_array = array(); // list of descriptions for the attributes
$attr_string = $_SESSION["config"]->get_userlistAttributes(); $attr_string = $_SESSION["config"]->get_userlistAttributes();
$temp_array = explode(";", $attr_string); $temp_array = explode(";", $attr_string);
$hash_table = $_SESSION["ldap"]->attributeUserArray(); $hash_table = $_SESSION["ldap"]->attributeUserArray();
@ -103,7 +102,6 @@ if (!$sortattrib)
if ($_POST['usr_suffix']) $usr_suffix = $_POST['usr_suffix']; // new suffix selected via combobox if ($_POST['usr_suffix']) $usr_suffix = $_POST['usr_suffix']; // new suffix selected via combobox
elseif ($_SESSION['usr_suffix']) $usr_suffix = $_SESSION['usr_suffix']; // old suffix from session elseif ($_SESSION['usr_suffix']) $usr_suffix = $_SESSION['usr_suffix']; // old suffix from session
else $usr_suffix = $_SESSION["config"]->get_UserSuffix(); // default suffix else $usr_suffix = $_SESSION["config"]->get_UserSuffix(); // default suffix
session_register('usr_suffix');
// generate search filter for sort links // generate search filter for sort links
@ -140,25 +138,27 @@ $filter = $filter . ")";
if ($_SESSION["userlist"] && $_GET["norefresh"]) { if ($_SESSION["userlist"] && $_GET["norefresh"]) {
usort ($_SESSION["userlist"], "cmp_array"); usort ($_SESSION["userlist"], "cmp_array");
$userinfo = $_SESSION["userlist"]; $userinfo = $_SESSION["userlist"];
} else { }
else {
$attrs = $attr_array; $attrs = $attr_array;
$sr = @ldap_search($_SESSION["ldap"]->server(), $sr = @ldap_search($_SESSION["ldap"]->server(), $usr_suffix, $filter, $attrs);
$usr_suffix, if (ldap_errno($_SESSION["ldap"]->server()) == 4) {
$filter, $attrs); StatusMessage("WARN", _("LDAP sizelimit exceeded, not all entries are shown."), "See README.openldap to solve this problem.");
}
if ($sr) { if ($sr) {
$userinfo = ldap_get_entries ($_SESSION["ldap"]->server, $sr); $userinfo = ldap_get_entries ($_SESSION["ldap"]->server, $sr);
ldap_free_result ($sr); ldap_free_result ($sr);
if ($userinfo["count"] == 0) StatusMessage("WARN", "", _("No Users found!")); if ($userinfo["count"] == 0) StatusMessage("WARN", "", _("No Users found!"));
// delete first array entry which is "count" // delete first array entry which is "count"
array_shift($userinfo); array_shift($userinfo);
usort ($userinfo, "cmp_array"); usort ($userinfo, "cmp_array");
$_SESSION["userlist"] = $userinfo; $_SESSION["userlist"] = $userinfo;
} }
else else {
StatusMessage("ERROR", StatusMessage("ERROR",
_("LDAP Search failed! Please check your preferences."), _("LDAP Search failed! Please check your preferences."),
_("No Users found!")); _("No Users found!"));
}
} }
$user_count = sizeof ($_SESSION["userlist"]); $user_count = sizeof ($_SESSION["userlist"]);
@ -325,4 +325,8 @@ function cmp_array($a, $b) {
else return -1; else return -1;
} }
// save variables to session
$_SESSION['usr_units'] = $usr_units;
$_SESSION['usr_suffix'] = $usr_suffix;
?> ?>