本文整理汇总了PHP中Teacher::getInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Teacher::getInfo方法的具体用法?PHP Teacher::getInfo怎么用?PHP Teacher::getInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Teacher
的用法示例。
在下文中一共展示了Teacher::getInfo方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Department
?>
</td>
<td><?php
$d = new Department();
$d->getInfo($course->course_dep);
echo $d->getDepName();
unset($d);
?>
</td>
<td><?php
echo $course->course_sem;
?>
</td>
<td><?php
$t = new Teacher();
$t->getInfo($course->teacher_id);
echo $t->getName();
unset($t);
?>
</td>
<td><button class="btn btn-default" onClick="edit_assigned_feild(<?php
echo $course->id . ',\'' . $course->course_code . '\',' . $course->course_dep . ',' . $course->course_sem;
?>
);" > Edit </button>
<button class="btn btn-danger" onClick="delete_assigned(<?php
echo $course->id . ',\'' . $course->course_code . '\',' . $course->course_dep . ',' . $course->course_sem;
?>
);" >Remove</button>
</td>
</tr>
<?php
示例2: appointCourse
public function appointCourse($teacher_id = '', $course_code = '', $course_sem = '', $course_dep = '')
{
if (loggedIn() && (privilege() === 'teacher' || privilege() === 'dppc' || privilege() === 'dupc' || privilege() == NULL)) {
return 0;
}
if (loggedIn()) {
$this->_connect();
$course_code = $this->_db->real_escape_string(escape($course_code));
$course_sem = $this->_db->real_escape_string(escape($course_sem));
$course_dep = $this->_db->real_escape_string(escape($course_dep));
$teacher_id = $this->_db->real_escape_string(escape($teacher_id));
if ($this->appointError($teacher_id, $course_code, $course_dep)) {
return 2;
} else {
$t = new Teacher();
$t->getInfo($teacher_id);
if (!$t->getApproved()) {
unset($t);
return 3;
}
$query = "INSERT INTO courses_appointed (teacher_id,course_code,course_sem,course_dep) VALUES ('" . $teacher_id . "','" . $course_code . "','" . $course_sem . "','" . $course_dep . "')";
$result = $this->_db->query($query);
if ($this->_db->affected_rows) {
if ($this->_db->error == '') {
return 1;
} else {
die($this->_db->error);
}
} else {
return 0;
}
}
} else {
if (!loggedIn()) {
return 0;
}
}
}
示例3: Teacher
<?php
require_once 'core/init.php';
if (!loggedIn()) {
die;
}
if (!Input::exists('get')) {
die;
} else {
$t = new Teacher();
$tt = $t->getInfo(Input::get('tid'));
?>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript" src="js/edit_teacher.js"></script>
<form id="edit_teacher" method="post">
<legend>Edit Details</legend>
<table class="table table-bordered table-striped">
<tbody>
<tr>
<th>Name</th>
<td><input type='hidden' name='t_id' value='<?php
echo Input::get('tid');
?>
'>
<input type="text" placeholder="Name of Teacher" class="" value="<?php
echo $t->getName();
?>
" name="name"/>
</td>
</tr>
<tr>
示例4: Teacher
<?php
require_once '../core/init.php';
if (Input::exists('get') || !Input::exists() || privilege() == NULL) {
die;
}
$type = Input::get('examtype');
$t = new Teacher();
$tt = $t->getInfo(Session::get('teacher_id'));
if (!Input::get('course_id')) {
?>
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">Please Select Course</h3>
</div> <!-- ./box header -->
</div>
<?php
die;
}
if (!Input::get('examtype')) {
?>
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">Please Select Exam Type</h3>
</div> <!-- ./box header -->
</div>
<?php
die;
}
示例5: reject
public function reject($tid, $cid, $did, $reject_msg)
{
if (!loggedIn()) {
return 0;
}
$this->_connect();
$this->_teacher_id = $this->_db->real_escape_string($tid);
$tid = $this->_db->real_escape_string($tid);
$this->_course_code = $this->_db->real_escape_string($cid);
$this->_course_dep = $this->_db->real_escape_string($did);
if ($this->approved($cid, $did)) {
if ($this->_status_level == '-1') {
die('This result is already rejected.');
}
if ($this->_status_level < 5) {
$approved_by = explode(',', $this->_approved_by);
$t = new Teacher();
$t->getInfo(Session::get('teacher_id'));
$reject_msg = 'By ' . $t->getName() . '. ' . $reject_msg;
$this->_reject_msg = $this->_db->real_escape_string($reject_msg);
if (Session::get('privilege') === 'teacher') {
$i = 0;
while (isset($approved_by[$i])) {
if ($approved_by[$i] == $tid) {
return 2;
break;
} else {
$i++;
}
}
} else {
if (Session::get('privilege') === 'dupc' || Session::get('privilege') === 'dppc') {
$i = 1;
if ($this->_status_level >= 3) {
die("You cannot reject because all DUPC or DPPC members have approved!");
}
if ($t->getDep() != $this->_course_dep) {
die("Sorry! You cannot reject this result!");
}
while (isset($approved_by[$i])) {
if ($approved_by[$i] == $tid) {
return 2;
break;
} else {
$i++;
}
}
} else {
if (Session::get('privilege') === 'hod' && $this->_status_level == 3) {
if ($t->getDep() != $this->_course_dep) {
die("Sorry! You cannot reject this result!");
}
} else {
if (Session::get('privilege') === 'hod' && $this->_status_level < 3) {
die("You cannot approve/reject this result being HOD because DUPC or DPPC members have not approved/rejected this result yet.");
} else {
if (Session::get('privilege') === 'hod' && $this->_status_level > 3) {
die("You have already approved this result being HOD. So you cannot reject.");
} else {
if (Session::get('privilege') === 'dean' && $this->_status_level < 4) {
die("You cannot approve/reject this result being DEAN because HOD or DUPC or DPPC members have not approved/rejected this result yet.");
}
}
}
}
}
}
$approved_by = '';
$status_level = '-1';
$query = "UPDATE approval SET reject_msg='" . $this->_reject_msg . "',status_level='" . $status_level . "', approved_by='" . $approved_by . "' WHERE teacher_id='" . $this->_teacher_id . "' AND course_code='" . $this->_course_code . "' AND course_dep='" . $this->_course_dep . "' AND timestamp>='" . Session::get('semester_timestamp') . "'";
} else {
die("Cannot Reject!");
}
} else {
die("Reject Error");
}
$result = $this->_db->query($query);
if ($this->_db->affected_rows) {
if ($this->_db->error == '') {
return 1;
} else {
die($this->_db->error);
}
} else {
return 2;
}
}