本文整理汇总了PHP中student::getacctType方法的典型用法代码示例。如果您正苦于以下问题:PHP student::getacctType方法的具体用法?PHP student::getacctType怎么用?PHP student::getacctType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类student
的用法示例。
在下文中一共展示了student::getacctType方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
protected function index()
{
global $user;
global $objPDO;
$student = new student($objPDO, $user->getuserId());
$headMenu = array("username" => $student->getName());
if ($user->checkAdmin() == true) {
$role = $student->getacctType();
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/temp_page.php';
} else {
if ($student->checkTeacher() == true) {
$role = $student->getacctType();
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/temp_page.php';
} else {
header('Location:http://localhost/cloud');
}
}
}
示例2: changepassword
protected function changepassword()
{
global $objPDO;
global $user;
$student = new student($objPDO, $user->getuserId());
$headMenu = array("username" => $student->getName());
$role = $student->getacctType();
include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/change_pass.php';
}
示例3: report
protected function report()
{
global $user;
global $objPDO;
$student = new student($objPDO, $user->getuserId());
$headMenu = array("username" => $student->getName());
if ($user->checkAdmin() == true || $student->checkTeacher() || $student->checkStudent()) {
$role = $student->getacctType();
$sid = NULL;
if ($student->checkStudent()) {
include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_profile_class.php';
$sid = $student->getID();
} else {
if (isset($_GET['uid'])) {
$sid = $_GET['uid'];
}
}
if ($sid) {
include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_profile_class.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/attendence_class.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_section_class.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/section_class.php';
$stu = new StudentProfile($objPDO);
$stu->loadByUserId($sid);
$roll_number = $stu->getRollNo();
$name = $stu->getName();
$section = new StudentSection($objPDO);
$section_id = $section->getByStudentId($sid);
$sec = new Section($objPDO, $section_id);
$section_name = $sec->getCode();
$att = new Attendence($objPDO);
$total_days = $att->getBySectionId($section_id);
$attendance = $att->getByStudentId($stu->getID());
$present = 0;
$absent = 0;
foreach ($attendance as $key => $value) {
if ($value['presence'] == 1) {
$present++;
} else {
if ($value['presence'] == 0) {
$absent++;
}
}
}
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/report_view.php';
} else {
echo 'error';
}
} else {
header('Location:http://localhost/cloud');
}
}
示例4: gettimetable
protected function gettimetable()
{
global $user;
global $objPDO;
$student = new student($objPDO, $user->getuserId());
$headMenu = array("username" => $student->getName());
if (($user->checkAdmin() == true || $student->checkTeacher()) && isset($_GET['uid']) && isset($_GET['ref'])) {
$role = $student->getacctType();
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/examination_section_subject_class.php';
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/exam_timetable_class.php';
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_class.php';
$sub = new Subject($objPDO);
$sub_names = $sub->getSubjectArray();
$section_id = $_GET['ref'];
$exam_id = $_GET['uid'];
$rel = new ExaminationSectionSubject($objPDO);
$sub_exam_id = $rel->getSectionExams($exam_id, $section_id);
$tt = new ExamTimetable($objPDO);
$dates = array();
$slots = array();
foreach ($sub_exam_id as $key => $value) {
$res = $tt->getByExamSubjectId($key);
$date = $res['date'];
if ($date != NULL) {
$dates[$key] = date('d-m-Y', strtotime($date));
} else {
$dates[$key] = 'N/A';
}
$slots[$key] = $res['slot'];
}
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/examination_timetable_list.php';
} else {
header('Location:http://localhost/cloud');
}
}
示例5: view
protected function view()
{
global $user;
global $objPDO;
$student = new student($objPDO, $user->getuserId());
$headMenu = array("username" => $student->getName());
if ($user->checkAdmin() == true || $student->checkTeacher()) {
$role = $student->getacctType();
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/timetable_section_view.php';
} else {
if ($student->checkStudent()) {
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_profile_class.php';
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_section_class.php';
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/section_class.php';
$role = $student->getacctType();
$stu_pro = new StudentProfile($objPDO);
$stu_pro->loadByUserId($student->getID());
$sec = new StudentSection($objPDO);
$s = new Section($objPDO);
$section_array = $s->getSectionArray();
$section_id = $sec->getByStudentId($stu_pro->getID());
$section = $section_array[$section_id];
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/timetable_student_view.php';
} else {
header('Location:http://localhost/cloud');
}
}
}
示例6: view
protected function view()
{
global $user;
global $objPDO;
$student = new student($objPDO, $user->getuserId());
$headMenu = array("username" => $student->getName());
if ($user->checkAdmin() == true || $student->checkTeacher()) {
$role = $student->getacctType();
require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_profile_class.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/parent_class.php';
$studentProfile = new StudentProfile($objPDO);
$parent = new StudentParent($objPDO);
$parent->loadByStudentId($_GET['uid']);
$studentProfile->loadByUserId($_GET['uid']);
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/viewstudent.php';
} else {
if ($student->checkStudent()) {
$role = $student->getacctType();
require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/student_profile_class.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/parent_class.php';
$studentProfile = new StudentProfile($objPDO);
$parent = new StudentParent($objPDO);
$student_id = $student->getID();
$parent->loadByStudentId($student_id);
$studentProfile->loadByUserId($student_id);
include $_SERVER['DOCUMENT_ROOT'] . '/cloud/view/viewstudent.php';
} else {
header('Location:http://localhost/cloud');
}
}
}