%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 ContactUs 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('contact_us_model', 'contact'); $this->load->model('department_model', 'department'); } public function index() { $data = array(); $success = ''; $post=$this->input->post(); if($post){ if($post['ContactSource']==''){ $this->form_validation->set_rules('ContactFirstName', 'First Name', 'required|trim|alpha_numeric_spaces'); $this->form_validation->set_rules('ContactLastName', 'Last Name', 'trim|alpha_numeric_spaces'); $this->form_validation->set_rules('ContactEmail', 'Email ID', 'trim|required|valid_email'); $this->form_validation->set_rules('ContactPhone', 'Contact Number', 'trim|alpha_numeric_spaces'); $this->form_validation->set_rules('ContactSubject', 'Subject', 'trim'); $this->form_validation->set_rules('ContactMessage', 'Message', 'trim|required|htmlspecialchars'); $this->form_validation->set_rules('ContactLocation', 'City', 'trim|alpha_numeric_spaces'); if ($this->form_validation->run() == FALSE) { $error = $this->form_validation->error_array(); $error_msg = implode('\n',$error); $_SESSION['submit_status_msg'] = 'Your Request could not be submitted:\n'.$error_msg; redirect(base_url().'ContactUs'); } else{ $insert_data = array( 'ContactFirstName' => $post['ContactFirstName'], 'ContactLastName' => $post['ContactLastName'], 'ContactEmail' => $post['ContactEmail'], 'ContactPhone' => $post['ContactPhone'], 'ContactSubject' => $post['ContactSubject'], 'ContactMessage' => $post['ContactMessage'], 'ContactLocation' => $post['ContactLocation'], ); $success = $this->contact->insert_entry($insert_data); if($success&&($success!='')){ $_SESSION['submit_status_msg'] = "Thankyou for contacting us. We will revert to you soon!"; $data = $this->contact->get_entry($success); $msg = $this->load->view("email_templates/contactus_entry", $data, TRUE); // send_email_multiple("shruti.maheshwari@sharda.ac.in","", "", "digital.marketing@shardahospital.org", "Contact Us Form Entry", $msg); send_email_multiple("abdesh@futuretechin.com","marketing@shardahospital.org", "", "digital.marketing@shardahospital.org", "Contact Us Form Entry", $msg); } else{ echo '<script>alert("Unable to submit your request. Kindly try again later.");</script>'; } } } redirect(base_url()); } $data['page_title'] = 'Contact Us|Sharda Hospital'; //To be used in header forms $data['departments_list']=$this->department->get_department_list( 'DepartmentType ASC', 'A'); $data['coes'] = $this->department->get_departments_summary('',array('COE')); $this->load->view('booking',$data); } public function emergency(){ $data = array(); $data['page_title'] = '24 Hour Service|Sharda Hospital'; //To be used in header forms $data['departments_list']=$this->department->get_department_list( 'DepartmentType ASC', 'A'); $data['coes'] = $this->department->get_departments_summary('',array('COE')); $this->load->view('24hour_service',$data); } }