當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Teacher::getID方法代碼示例

本文整理匯總了PHP中Teacher::getID方法的典型用法代碼示例。如果您正苦於以下問題:PHP Teacher::getID方法的具體用法?PHP Teacher::getID怎麽用?PHP Teacher::getID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Teacher的用法示例。


在下文中一共展示了Teacher::getID方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: employeelist

 protected function employeelist()
 {
     global $user;
     global $objPDO;
     $student = new student($objPDO, $user->getuserId());
     $headMenu = array("username" => $student->getName());
     if ($user->checkAdmin() == true && isset($_GET['uid']) || $student->checkTeacher()) {
         if ($user->checkAdmin()) {
             $emp_id = $_GET['uid'];
         } else {
             include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/teacher_class.php';
             $teacher = new Teacher($objPDO);
             $teacher->loadByUserId($student->getID());
             $emp_id = $teacher->getID();
         }
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/employee_attendance_class.php';
         $att = new EmployeeAttendence($objPDO);
         $employee_att = $att->getByEmployeeId($emp_id);
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/employee_attendance_list.php';
     } else {
         header('Location:http://localhost/cloud');
     }
 }
開發者ID:srinivasans,項目名稱:educloud,代碼行數:23,代碼來源:attendanceController.php

示例2: teacherview

 protected function teacherview()
 {
     global $user;
     global $objPDO;
     $student = new student($objPDO, $user->getuserId());
     $headMenu = array("username" => $student->getName());
     if ($user->checkAdmin() == true || $student->checkTeacher()) {
         if ($user->checkAdmin()) {
             $teacher = $_GET['uid'];
         } else {
             require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/teacher_class.php';
             $teacherProfile = new Teacher($objPDO);
             $teacherProfile->loadByUserId($student->getID());
             $teacher = $teacherProfile->getID();
         }
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/timetable_settings_class.php';
         $sett = new TimetableSettings($objPDO);
         $slots = $sett->getAllSlots();
         if (!isset($slots)) {
             $num_slots = 0;
         } else {
             $num_slots = count($slots);
         }
         include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_class.php';
         include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/timetable_class.php';
         include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/section_class.php';
         $tt = new Timetable($objPDO);
         $sec = new Section($objPDO);
         $timetable = $tt->getByTeacherId($teacher);
         $subject = $tt->getTeacherSubject($teacher);
         $section = $sec->getSectionArray();
         $total = 0;
         $count = array();
         foreach ($timetable as $key => $value) {
             $total++;
             if (array_key_exists($value, $count)) {
                 $count[$value]++;
             } else {
                 $count[$value] = 1;
             }
         }
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/teacher_timetable_view_template.php';
     } else {
         header('Location:http://localhost/cloud');
     }
 }
開發者ID:srinivasans,項目名稱:educloud,代碼行數:46,代碼來源:timetableController.php


注:本文中的Teacher::getID方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。