$schooladmins = SchoolUser::getAdminSchools($session->user_id); if (count($schooladmins) > 0) { foreach ($schooladmins as $schooladmin) { echo "<option value='" . $schooladmin->schoolid . "'>" . School::get_by_id($schooladmin->schoolid)->name . "</option>"; } } else { echo "<option value='0'>NO SCHOOLS YET</option>"; } ?> </select> <select name="batchselect" id="batchselect"> <?php if (count($schooladmins) > 0) { $onlyschool = School::get_by_id($schooladmins[0]->schoolid); $batchadmins = BatchUser::getAdminBatchs($session->user_id, $onlyschool->id); if (count($batchadmins) > 0) { foreach ($batchadmins as $batchadmin) { $batchselect = Batch::get_by_id($batchadmin->batchid); echo "<option value='" . $batchadmin->batchid . "'>" . $batchselect->fromyear . "-" . ($batchselect->fromyear + 1) . "</option>"; } } else { echo "<option value='0'>NO BATCHS YET</option>"; } } ?> </select> <br/> <div class="accordion" id="accordion2">
<?php require_once "header.php"; $pathinfo = pathinfo($_SERVER["PHP_SELF"]); $basename = $pathinfo["basename"]; $currentFile = str_replace(".php", "", $basename); $sound = isset($_GET['success']) ? "positive" : ""; if ($session->is_logged_in()) { $user = User::get_by_id($session->user_id); if ($user->enabled == DISABLED) { header("location: index.php?disabled"); } else { $schoolsIAdminCount = count(SchoolUser::getAdminSchools($session->user_id)); $batchsIAdminCount = count(BatchUser::getAdminBatchs($session->user_id)); $sectionsIAdminCount = count(SectionUser::getAdminSections($session->user_id)); $iAdminSomething = false; if ($schoolsIAdminCount + $batchsIAdminCount + $sectionsIAdminCount > 0 || $user->is_super_admin()) { $iAdminSomething = true; } } } else { header("location: index.php?negative"); } ?> <div class="container-fluid"> <div class="row-fluid"> <ul class="nav nav-tabs"> <?php if ($user->is_super_admin()) { echo '<li><a id="userstab" href="#users" data-toggle="tab">Students</a></li>';
<?php require_once "../../includes/initialize.php"; global $session; if (!$session->is_logged_in()) { redirect_to("../../index.php"); } $page = $_GET['page']; $limit = $_GET['rows']; $sidx = $_GET['sidx']; $sord = $_GET['sord']; $user = User::get_by_id($session->user_id); $schoolusers = SchoolUser::getAdminSchools($user->id); $batchusers = BatchUser::getAdminBatchs($user->id); $criteria = "" . C_SECTION_ID . " IN (SELECT " . C_SECTIONUSER_SECTIONID . " FROM " . T_SECTIONUSERS . " \r\nWHERE " . C_SECTIONUSER_USERID . "=" . $session->user_id . " AND " . C_SECTIONUSER_LEVEL . "=1)"; if (count($batchusers) > 0) { $criteria = "" . C_SECTION_BATCHID . " IN (SELECT " . C_BATCHUSER_BATCHID . " FROM " . T_BATCHUSERS . " \r\n WHERE " . C_BATCHUSER_USERID . "=" . $session->user_id . " AND " . C_BATCHUSER_LEVEL . "=1)"; } if (count($schoolusers) > 0) { $criteria = "" . C_SECTION_SCHOOLID . " IN (SELECT " . C_SCHOOLUSER_SCHOOLID . " FROM " . T_SCHOOLUSERS . " \r\n WHERE " . C_SCHOOLUSER_USERID . "=" . $session->user_id . " AND " . C_SCHOOLUSER_LEVEL . "=1)"; } if ($user->is_super_admin()) { $sections_count = Section::get_by_sql("SELECT * FROM " . T_SECTIONS); } else { $sections_count = Section::get_by_sql("SELECT * FROM " . T_SECTIONS . " WHERE " . $criteria); } $count = count($sections_count); if ($count > 0 && $limit > 0) { $total_pages = ceil($count / $limit); } else { $total_pages = 0;
require_once "header.php"; if (!$session->is_logged_in()) { header("location: index.php?negative"); } else { $user = User::get_by_id($session->user_id); if ($user->enabled == DISABLED) { header("location: index.php?disabled"); } } $school = School::get_by_id(CSNTRID); $pathinfo = pathinfo($_SERVER["PHP_SELF"]); $basename = $pathinfo["basename"]; $currentFile = str_replace(".php", "", $basename); $schoolusers = SchoolUser::getAdminSchools($session->user_id); $batchusers = BatchUser::getAdminBatchs($session->user_id); $sectionusers = SectionUser::getAdminSections($session->user_id); if (count($schoolusers) == 0 && count($batchusers) == 0 && count($sectionusers) == 0) { header("location: index.php?negative"); } ?> <div class="container-fluid"> <div class="row-fluid"> <div class="span1"></div> <div class="span9"> <form id="theform" class="form-horizontal" method="post" action="#" enctype="multipart/form-data"> <fieldset> <legend> Create Student </legend>