protected function mark() { $section = $_GET['uid']; $date = NULL; if (isset($_GET['ref'])) { $date = $_GET['ref']; } global $user; global $objPDO; $student = new student($objPDO, $user->getuserId()); $headMenu = array("username" => $student->getName()); if ($user->checkAdmin() == true || $student->checkTeacher()) { include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_section_class.php'; include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_profile_class.php'; include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/attendence_class.php'; $stusec = new Studentsection($objPDO); $stupro = new StudentProfile($objPDO); $att = new Attendence($objPDO); $stu = $stusec->getBySectionId($section); $students = array(); foreach ($stu as $key => $value) { $stupro->setID($value['student_id']); $stupro->load(); $students[] = $stupro->getAsArray(); } $marked = $att->getBySectionDateArray($section, $date); require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/student_attendence_view.php'; } else { header('Location:http://localhost/cloud'); } }