public function get_all()
 {
     $teacher_list = array();
     $this->db->connect();
     $sql = "SELECT * from tbl_teacher";
     $result = $this->db->fetchQuery($sql);
     if ($result->num_rows > 0) {
         while ($row = $result->fetch_assoc()) {
             $teacher = new teacher();
             $teacher->set_id($row['id']);
             $teacher->set_first_name($row['first_name']);
             $teacher->set_last_name($row['last_name']);
             $teacher->set_contact($row['contact']);
             $teacher->set_salary($row['salary']);
             $teacher->set_department_id($row['department_id']);
             array_push($teacher_list, $teacher);
         }
     }
     $this->db->close();
     return $teacher_list;
 }
Example #2
0
 public function work()
 {
     $teacher = new teacher();
     $teacher->working();
 }
Example #3
0
<?php

require_once 'core/init.php';
include "includes/header.php";
$token = Token::generate();
$teacher = new teacher();
if (Input::exists('get') && $teacher->data()->id) {
    $id = Input::get('taskmark');
    $data = $teacher->_taskOperation->taskFindById($id);
    $title = $data[0]->title;
    $type = $data[0]->type;
    $start = $data[0]->start_time;
    $end = $data[0]->end_time;
    $desc = $data[0]->context;
    $files = $teacher->_taskOperation->taskFindTaskFiles($id);
}
?>
<script src="js/ajaxfileupload.js"></script>
<script src="js/settask.js"></script>
<div class="main row">
    <div class="col-md-6 col-md-offset-3">
      	<form class="form-horizontal" role="form" method="post" action="<?php 
if (!Input::exists('get')) {
    echo 'insertTask_run.php';
} else {
    echo 'updateTask_run.php';
}
?>
"
      	enctype="multipart/form-data" >
        <input type="hidden" id="taskId" name="taskId" value="<?php 
        print "value of speed is ={$this->speed}<br>";
        print "value of daily is = {$this->daily}<br>";
        print "value of wages is = {$this->wages}<br><br>";
    }
}
class regular extends typist
{
    function display()
    {
        print "**** For regular ****<br>";
        print "value of code is = {$this->code}<br>";
        print "value of name is = {$this->name}<br>";
        print "value of speed is ={$this->speed}<br><br>";
    }
}
$myobj = new teacher();
$myobj->getdata("001", "krunal");
$myobj->getdata1("maths", "navneet-publication");
$myobj->display();
$myobj1 = new officer();
$myobj1->getdata("002", "kamal");
$myobj1->getdata2("A");
$myobj1->display();
$myobj2 = new casual();
$myobj2->getdata("003", "sanjay-typist");
$myobj2->getdata3("speed-40wpm");
$myobj2->getdata4("yes", "40rs");
$myobj2->display();
$myobj3 = new regular();
$myobj3->getdata("004", "vinay-typist");
$myobj3->getdata3("speed-80wpm");
Example #5
0
 function actionEditLesson($view)
 {
     $lesson = (int) $_GET['lesson'];
     $view->data = teacher::editLesson($lesson);
     echo $view->render('teacher.php');
 }
Example #6
0
 /**
  * Response when updating role succeed.
  */
 public function updateSucceed(teacher $teacher)
 {
     $message = trans('orchestra/control::response.roles.update', ['name' => $teacher->getAttribute('name')]);
     return $this->redirectWithMessage(handles('orchestra::teacher'), $message);
 }