当前位置: 首页>>代码示例>>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;未经允许,请勿转载。