'user', 'title' => _('User profiles'), 'profiles' => ""), array('scope' => 'group', 'title' => _('Group profiles'), 'profiles' => ""), array('scope' => 'host', 'title' => _('Host profiles'), 'profiles' => "") ); // check if user is logged in, if not go to login if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) { metaRefresh("../login.php"); exit; } // check if user has pressed submit or abort button if ($_POST['submit']) { // on abort go back to main page if ($_POST['abort']) { metaRefresh("../lists/listusers.php"); } // on submit forward to other profile pages elseif ($_POST['submit']) { for ($i = 0; $i < sizeof($profileClasses); $i++) { // create new profile if ($_POST['profile'] == ("new" . $profileClasses[$i]['scope'])) { metaRefresh("profilepage.php?type=" . $profileClasses[$i]['scope']); } // edit profile elseif($_POST['profile'] == ("edit" . $profileClasses[$i]['scope'])) { metaRefresh("profilepage.php?type=" . $profileClasses[$i]['scope'] . "&edit=" . $_POST['e_' . $profileClasses[$i]['scope']]); } // delete profile elseif($_POST['profile'] == ("del" . $profileClasses[$i]['scope'])) { metaRefresh("profiledelete.php?type=" . $profileClasses[$i]['scope'] . "&del=" . $_POST['d_' . $profileClasses[$i]['scope']]); } } } exit; } // get list of profiles for each account type for ($i = 0; $i < sizeof($profileClasses); $i++) { $profileList = getAccountProfiles($profileClasses[$i]['scope']); $profiles = ""; for ($l = 0; $l < sizeof($profileList); $l++) { $profiles = $profiles . "\n"; } $profileClasses[$i]['profiles'] = $profiles; } echo $_SESSION['header']; echo "