$enableEditing = false; } } echo "<input id='batchid' type='hidden' value='" . $batch->id . "'>"; ?> <script> var lastClickedPage = ""; </script> <div id="pageExplorer" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="width: 1000px; margin-left: -500px;"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="myModalLabel">Open a Page</h3> </div> <div class="modal-body"> <select name="schoolselect" id="schoolselect"> <?php $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);
<?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;
<?php 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"); } } $pathinfo = pathinfo($_SERVER["PHP_SELF"]); $basename = $pathinfo["basename"]; $currentFile = str_replace(".php", "", $basename); $batchusers = BatchUser::getBatchsIAdminInSchool($session->user_id, CSNTRID); $schoolusersX = SchoolUser::getAdminSchools($session->user_id); $batchusersX = BatchUser::getAdminBatchs($session->user_id); if (count($schoolusersX) == 0 && count($batchusersX) == 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 a Section </legend>