Esempio n. 1
0
$pathinfo = pathinfo($_SERVER["PHP_SELF"]);
$basename = $pathinfo["basename"];
$currentFile = str_replace(".php", "", $basename);
$pageURL = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
echo "<input id='studentid' type='hidden'  value='" . $_GET['id'] . "'>";
if (isset($_GET['id'])) {
    $user = User::get_by_id($_GET['id']);
    $batchusers = BatchUser::getBatchsImIn($user->id);
    $sectionsImIn = SectionUser::getSectionsImIn($user->id);
    $sectionIDsImIn = array();
    if (count($sectionsImIn) > 0) {
        foreach ($sectionsImIn as $sectionuser) {
            array_push($sectionIDsImIn, $sectionuser->sectionid);
        }
    }
    $mates = SectionUser::getUsersInMultipleSections($sectionIDsImIn);
    if ($session->is_logged_in()) {
        if (!User::get_by_id($session->user_id)->is_super_admin()) {
            if ($user->pending == 1 || $user->enabled == 0) {
                header("location: index.php?negative");
            }
        }
    } else {
        if ($user->pending == 1 || $user->enabled == 0) {
            header("location: index.php?negative");
        }
    }
} else {
    header("location: index.php?negative");
}
$orgbyuser = SchoolUser::getSchoolsImIn($user->id);