protected function teasubrel()
 {
     $class = $_GET['uid'];
     global $objPDO;
     $subject = array();
     include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_relations_class.php';
     $sec = new SubjectRelations($objPDO);
     include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_class.php';
     include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_class.php';
     $subject_array = array();
     $teacher_id = array();
     $teacher = array();
     $subject = $sec->getByClassId($class);
     for ($i = 0; $i < count($subject); $i++) {
         $subject_array[$subject[$i]] = Subject::getSubjectName($subject[$i]);
         if ($val = $this->getteasubrel($class, $subject[$i])) {
             $teacher_id[$subject[$i]] = $val;
             $teacher_profile = new Teacher($objPDO, $teacher_id[$subject[$i]]);
             $teacher[$teacher_id[$subject[$i]]] = $teacher_profile->getName($teacher_id[$subject[$i]]);
         }
     }
     include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/teacher_relation_template.php';
 }
 protected function selectsubjects()
 {
     global $user;
     global $objPDO;
     $student = new student($objPDO, $user->getuserId());
     $headMenu = array("username" => $student->getName());
     if ($user->checkAdmin() == true) {
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/section_class.php';
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_relations_class.php';
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_class.php';
         $sec = new Section($objPDO);
         $sections = $sec->getSectionArray();
         $rel = new SubjectRelations($objPDO);
         $subjects = array();
         foreach ($sections as $key => $value) {
             $subjects[$key] = $rel->getByClassId($key);
         }
         $sub = new Subject($objPDO);
         $subject_name = $sub->getSubjectArray();
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/examination_subjects.php';
     } else {
         header('Location:http://localhost/cloud');
     }
 }