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


PHP Subject::getSubjectName方法代碼示例

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


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

示例1: teasubrel

 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';
 }
開發者ID:srinivasans,項目名稱:educloud,代碼行數:23,代碼來源:subjectclassController.php

示例2: newtime

 protected function newtime()
 {
     $class = $_GET['uid'];
     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/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/section_teacher_subject_class.php';
         include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/timetable_class.php';
         $rel = new SectionTeacherSubjectRelations($objPDO);
         $teasubrel = $rel->getByClass($class);
         $subjects = array();
         for ($i = 0; $i < count($teasubrel); $i++) {
             $subjects[$teasubrel[$i]['subject_id']] = Subject::getSubjectName($teasubrel[$i]['subject_id']);
         }
         $tt = new Timetable($objPDO);
         $timetable = $tt->getBySection($class);
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/section_timetable.php';
     } else {
         header('Location:http://localhost/cloud');
     }
 }
開發者ID:srinivasans,項目名稱:educloud,代碼行數:32,代碼來源:timetableController.php

示例3: searchBySubject

 public function searchBySubject($subject)
 {
     $subject_id = Subject::getSubjectNameLike($subject);
     $strQuery = "SELECT * FROM `" . $this->strTableName . "` WHERE `subject_id`='" . $subject_id . "' ;";
     $objStatement = $this->objPDO->prepare($strQuery);
     $objStatement->execute();
     $search_res = array();
     while ($arRow = $objStatement->fetch(PDO::FETCH_ASSOC)) {
         $sub_name = Subject::getSubjectName($arRow['subject_id']);
         $arRow['subject_id'] = $sub_name;
         $search_res[] = $arRow;
     }
     return $search_res;
 }
開發者ID:srinivasans,項目名稱:educloud,代碼行數:14,代碼來源:teacher_class.php


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