Ejemplo n.º 1
0
 /**
  * @access public
  * @global array $registry
  * @return render Template with Employee List
  */
 function index()
 {
     global $registry;
     $this->registry['template']->data('title', 'Employee List');
     $this->registry['template']->render('header');
     $employee_object = new Employees();
     $employees = $employee_object->listEmployees();
     if ($employees) {
         $this->registry['template']->data('employees', $employees);
     }
     $this->registry['template']->render('employee/list');
     $this->registry['template']->render('footer');
 }
Ejemplo n.º 2
0
 /**
  * @access public
  * @global array $registry
  * @return render pop-up with appointment details
  */
 public function showDetails()
 {
     if (isset($_POST['schedule_id'])) {
         global $registry;
         $schedule = new Schedules();
         $appointment = $schedule->getAppointment($_POST['schedule_id']);
         $this->registry['template']->data('info', $appointment[0]);
         $employee_object = new Employees();
         $employees = $employee_object->listEmployees();
         if ($employees) {
             $this->registry['template']->data('employees', $employees);
         }
         echo $this->registry['template']->render('schedule/popup');
     }
 }