当前位置: 首页>>代码示例>>PHP>>正文


PHP Teacher::getName方法代码示例

本文整理汇总了PHP中Teacher::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Teacher::getName方法的具体用法?PHP Teacher::getName怎么用?PHP Teacher::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Teacher的用法示例。


在下文中一共展示了Teacher::getName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: update

 public function update(Teacher $object)
 {
     $q = "UPDATE " . self::TABLE . " SET `name`='" . Singleton::create("NullConverter")->fromDOMtoDB($object->getName()) . "' WHERE teacherId='" . addslashes($object->getTeacherId()) . "'";
     $pk = $object->getTeacherId();
     if ($object->isNew()) {
         if (empty($pk)) {
             $q = "INSERT INTO " . self::TABLE . " (`name`) VALUES ('" . Singleton::create("NullConverter")->fromDOMtoDB($object->getName()) . "')";
         } else {
             $q = "INSERT INTO " . self::TABLE . " (`name`) VALUES ('" . Singleton::create("NullConverter")->fromDOMtoDB($object->getTeacherId()) . "', '" . Singleton::create("NullConverter")->fromDOMtoDB($object->getName()) . "')";
         }
     }
     $this->db->updateQuery($q);
     if (empty($pk)) {
         $pk = $this->db->selectQuery("SELECT teacherId from " . self::TABLE . " ORDER BY teacherId DESC limit 1")->getSingleton();
     }
     $result = $this->findByPrimaryKey($pk);
     parent::$dbCache->resetEntity("Teacher");
     parent::$dbCache->setSingle("Teacher", $pk, $result);
     return $result;
 }
开发者ID:aeberh,项目名称:php-movico,代码行数:20,代码来源:TeacherPersistence.php

示例2: 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

示例3: 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;
    ?>
);" >&nbsp;&nbsp;&nbsp;Edit&nbsp;&nbsp;&nbsp;</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 
}
开发者ID:mkrdip,项目名称:Management-Information-System,代码行数:31,代码来源:list_courses_appointed.php

示例4: makepdf

    public function makepdf()
    {
        global $user;
        // Get required files.
        require_once 'others/fpdf/fpdf.php';
        // Set some document variables
        $author = "eduCloud";
        $x = 35;
        $text = <<<EOT
Hello
EOT;
        // Create fpdf object
        $pdf = new FPDF('P', 'pt', 'Letter');
        // Set base font to start
        $pdf->SetFont('Arial', 'B', 16);
        // Add a new page to the document
        $pdf->addPage();
        $pdf->setLeftMargin($x);
        //page border
        $pdf->Line(35, 30, 35, 750);
        $pdf->Line(35, 30, 575, 30);
        $pdf->Line(575, 30, 575, 750);
        $pdf->Line(575, 750, 35, 750);
        //end of page border
        // Set the x,y coordinates of the cursor
        $pdf->SetXY($x + 20, 40);
        // Write 'Simple PDF' with a line height of 1 at the current position
        $pdf->Write(25, 'Employee Details');
        $pdf->Image($_SERVER['DOCUMENT_ROOT'] . '/cloud/images/school_logo.jpg', 500, 35, 50, 50, 'JPG');
        // Reset the font
        // Reset font, color, and coordinates
        $pdf->SetFont('Arial', '', 12);
        $pdf->SetTextColor(0, 0, 0);
        $pdf->SetLeftMargin($x + 50);
        $pdf->setXY($x + 50, 90);
        global $objPDO;
        require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/teacher_class.php';
        $record = new Teacher($objPDO);
        if ($user->checkAdmin()) {
            $eid = $_GET['uid'];
        } else {
            $student = new Student($objPDO, $user->getuserId());
            $eid = $student->getID();
        }
        $record->loadByUserId($eid);
        // Write out a long text blurb.
        //$array=$record->getAsArray();
        //$x=0;
        /* TEMPLATE 1 DESIGN*/
        $pdf->SetFont('Arial', '', 8);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Employee Id (reference) : ' . $record->getTeacherId(), 0, 1, 'L', true);
        $pdf->SetFont('Arial', '', 12);
        $pdf->setFillColor(50, 50, 50);
        $pdf->setTextColor(255, 255, 255);
        $pdf->cell(450, 20, 'Employee Details', 0, 1, 'C', true);
        $pdf->setTextColor(0, 0, 0);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Employee Name', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getName(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Qualification', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getQualification(), 0, 1, 'C', true);
        require_once $_SERVER['DOCUMENT_ROOT'] . '/cloud/model/subject_class.php';
        $subject_id = new Subject($objPDO);
        $subject_id->setID($record->getSubjectId());
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Subject', 0, 0, 'C', true);
        $pdf->cell(250, 20, $subject_id->getName(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Date Of Birth', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getDateOfBirth(), 0, 1, 'C', true);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Gender', 0, 0, 'C', true);
        $pdf->cell(250, 20, ucfirst($record->getGender()), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Blood Group', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getBloodGroup(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, '', 0, 0, 'C', true);
        $pdf->cell(250, 20, '', 0, 1, 'C', true);
        $pdf->setFillColor(50, 50, 50);
        $pdf->setTextColor(255, 255, 255);
        $pdf->cell(450, 20, 'Contact Details', 0, 1, 'C', true);
        $pdf->setTextColor(0, 0, 0);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'Correspondence Address', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondenceAddressLine1(), 0, 1, 'C', true);
        $pdf->cell(200, 20, '', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondenceAddressLine2(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'City', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondenceCity(), 0, 1, 'C', true);
        $pdf->setFillColor(221, 221, 221);
        $pdf->cell(200, 20, 'State', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondenceState(), 0, 1, 'C', true);
        $pdf->setFillColor(255, 255, 255);
        $pdf->cell(200, 20, 'Pincode', 0, 0, 'C', true);
        $pdf->cell(250, 20, $record->getCorrespondencePincode(), 0, 1, 'C', true);
        $pdf->setFillColor(221, 221, 221);
//.........这里部分代码省略.........
开发者ID:srinivasans,项目名称:educloud,代码行数:101,代码来源:teacherController.php

示例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;
     }
 }
开发者ID:mkrdip,项目名称:Management-Information-System,代码行数:87,代码来源:Approval.php


注:本文中的Teacher::getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。