本文整理汇总了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;
}
示例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');
}
}