%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 CMS_Page 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('cms_model', 'cms'); $this->load->model('department_model', 'department'); $this->load->model('patient_story_model', 'patient_story'); } public function index($id=0) { if(!$id){ $this->load->view('error_404'); } else{ $this->view_cms_page($id); } } public function view_cms_page($id) { $data = array(); echo '<script>console("'.$id.'");</script>'; if(is_numeric($id)){ $data['cms_page'] = $this->cms->get_cms_page($id); echo '<script>console("numeric: '.$id.'");</script>'; } else{ $data['cms_page'] = $this->cms->get_cms_page_by_slug($id); echo '<script>console("slug: '.$id.'");</script>'; } if(!$data['cms_page']){ $this->load->view('error_404'); } else{ $data['page_title'] = $data['cms_page']['CMSPageTitle']; //To be used in header forms $data['departments_list']=$this->department->get_department_list( 'DepartmentType ASC', 'A'); $data['patient_stories']=$this->patient_story->get_patient_stories_summary('','','',array(),'','A',4); $data['coes'] = $this->department->get_departments_summary('',array('COE')); $this->load->view('cms_page',$data); } } public function blog($slug='') { $data = array(); $blog_titles = array('does-weight-loss-journey-go-through-dieting','9-facts-about-bariatric-surgery-that-may-surprise-you', 'lets-bust-the-misconceptions-about-chemotherapy','make-your-childs-tiffin-box-a-treasure-of-Health'); $data['page_title'] = 'Blog'; //To be used in header forms $data['departments_list']=$this->department->get_department_list( 'DepartmentType ASC', 'A'); $data['patient_stories']=$this->patient_story->get_patient_stories_summary('','','',array(),'','A',4); $data['coes'] = $this->department->get_departments_summary('',array('COE')); $data['js'] = '<!--masonry--><script src="'.base_url().'assets/js/mp.mansory.min.js"></script><!--masonry-->'; if($slug!=''){ if(in_array($slug,$blog_titles)){ $this->load->view('blogs/'.$slug,$data); } else{ $this->load->view('error_404'); } } else{ $this->load->view('blogs',$data); } } }