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


PHP Teacher::getTeacherArray方法代碼示例

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


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

示例1: dropDownListEditable

 public static function dropDownListEditable($val, $id, $name, $type, $class = NULL, $input = NULL, $textVal = NULL, $class_select = NULL)
 {
     Utility::editableSelectScript($id);
     global $objPDO;
     include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_class.php';
     include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/section_class.php';
     include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/teacher_class.php';
     $sec = new Section($objPDO);
     $section = $sec->getSectionArray();
     $tea = new Teacher($objPDO);
     $teacher = $tea->getTeacherArray($input);
     $sub = new Subject($objPDO);
     $subject = $sub->getSubjectArray();
     $numeric_level = array("select" => "--Select--", "0" => "0", "1" => "1", "2" => "2", "3" => "3", "4" => "4", "5" => "5", "6" => "6", "7" => "7", "8" => "8", "9" => "9", "10" => "10", "11" => "11", "12" => "12");
     $blood_group = array("select" => "--Select--", "A+" => "A+", "B+" => "B+", "O+" => "O+", "AB+" => "AB+", "A-" => "A-", "B-" => "B-", "O-" => "O-", "AB-" => "AB-");
     $category = array("select" => "--Select--", "OC" => "General(OC)", "SC" => "SC", "ST" => "ST", "OBC" => "OBC", "NRI" => "NRI", "Defence" => "Defence");
     if ($class == NULL) {
         $class = "text_editable";
     }
     $list = array();
     if ($type == "numeric_level") {
         $list = $numeric_level;
     } else {
         if ($type == "blood_group") {
             $list = $blood_group;
         } else {
             if ($type == "category") {
                 $list = $category;
             } else {
                 if ($type == "subject") {
                     $list = $subject;
                 } else {
                     if ($type == "section") {
                         $list = $section;
                     } else {
                         if ($type == "teacher") {
                             $list = $teacher;
                         }
                     }
                 }
             }
         }
     }
     $textVal = "";
     if (array_key_exists($val, $list)) {
         $textVal = $list[$val];
     }
     $html = '<input type="text" readonly="readonly" id="' . $id . '" class="' . $class . '" value="' . $textVal . '"/>';
     $html .= '<select class="' . $class_select . '" style="display:none" id="' . $id . '"  name="' . $name . '" >';
     foreach ($list as $key => $value) {
         if ($key == $val) {
             $html .= '<option class="' . $class_select . '" selected="selected" value="' . $key . '">' . $value . '</option>';
         } else {
             $html .= '<option value="' . $key . '">' . $value . '</option>';
         }
     }
     $html .= '</select>';
     echo $html;
 }
開發者ID:srinivasans,項目名稱:educloud,代碼行數:59,代碼來源:utility_class.php

示例2: employee

 protected function employee()
 {
     global $user;
     global $objPDO;
     $student = new student($objPDO, $user->getuserId());
     $headMenu = array("username" => $student->getName());
     if ($user->checkAdmin() == true) {
         include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/teacher_class.php';
         $emp = new Teacher($objPDO);
         $employees = $emp->getTeacherArray(0);
         include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/employee_attendance.php';
     } else {
         header('Location:http://localhost/cloud');
     }
 }
開發者ID:srinivasans,項目名稱:educloud,代碼行數:15,代碼來源:attendanceController.php


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