getConfiguredTypes(); $profileClasses = array(); $profileClassesTemp = array(); foreach ($types as $type) { if ($type->isHidden() || !checkIfWriteAccessIsAllowed($type->getId())) { continue; } $profileClassesTemp[$type->getAlias()] = array( 'typeId' => $type->getId(), 'title' => $type->getAlias(), 'profiles' => ""); } $profileClassesKeys = array_keys($profileClassesTemp); natcasesort($profileClassesKeys); $profileClassesKeys = array_values($profileClassesKeys); for ($i = 0; $i < sizeof($profileClassesKeys); $i++) { $profileClasses[] = $profileClassesTemp[$profileClassesKeys[$i]]; } // check if user is logged in, if not go to login if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) { metaRefresh("../login.php"); exit; } // check if new profile should be created elseif (isset($_POST['createProfileButton'])) { metaRefresh("profilepage.php?type=" . htmlspecialchars($_POST['createProfile'])); exit; } // check if a profile should be edited for ($i = 0; $i < sizeof($profileClasses); $i++) { if (isset($_POST['editProfile_' . $profileClasses[$i]['typeId']]) || isset($_POST['editProfile_' . $profileClasses[$i]['typeId'] . '_x'])) { metaRefresh("profilepage.php?type=" . htmlspecialchars($profileClasses[$i]['typeId']) . "&edit=" . htmlspecialchars($_POST['profile_' . $profileClasses[$i]['typeId']])); exit; } } include '../main_header.php'; echo "