%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Speciality extends CI_Controller { /** * Index Page for this controller. * * Maps to the following URL * http://example.com/index.php/welcome * - or - * http://example.com/index.php/welcome/index * - or - * Since this controller is set as the default controller in * config/routes.php, it's displayed at http://example.com/ * * So any other public methods not prefixed with an underscore will * map to /index.php/welcome/<method_name> * @see https://codeigniter.com/user_guide/general/urls.html */ function __construct() { parent::__construct(); $this->load->model('department_model', 'department'); } public function index($id=0) { if(!$id){ $this->view_specialities(); } else{ $this->view_speciality($id); } } public function view_specialities(){ $data['specialities'] = $this->department->get_departments_summary('',array('Speciality')); $data['title'] = 'Specialities|Sharda Hospital'; //To be used in header forms $data['departments_list']=$this->department->get_department_list( 'DepartmentType ASC', 'A'); $this->load->view('speciality',$data); } public function view_speciality($id){ $this->load->model('doctor_model', 'doctor'); $this->load->model('patient_story_model', 'patient_story'); $data = array(); $speciality_id = $id; if(is_numeric($id)){ $data['speciality'] = $this->department->get_department($id); } else{ $data['speciality'] = $this->department->get_department_by_slug($id); $speciality_id = $this->department->get_department_id($id)['DepartmentID']; echo '<script>console.log("Speciality ID: '.$speciality_id.'")</script>'; } $data['doctors'] = $this->doctor->get_doctors_by_department('',array($data['speciality']),'',array(),'','','A'); foreach($data['doctors'] as $doctor){ echo '<script>console.log("'.$doctor['DoctorName'].'")</script>'; } $data['success_stories'] = $this->patient_story->get_patient_stories('',$speciality_id,'',array(),'','A',4); //$data['page_title'] = $data['speciality']['DepartmentName'].'|Sharda Hospital'; $data['page_title'] = $data['speciality']['dep_title']; $data['page_description'] = $data['speciality']['dep_description']; $data['page_keyword'] = $data['speciality']['dep_keyword']; //To be used in header forms $data['departments_list']=$this->department->get_department_list( 'DepartmentType ASC', 'A'); $this->load->view('speciality_details',$data); } }