%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'); error_reporting(0); class BookAppointment extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('appointment_model', 'appointment'); $this->load->library('email'); } public function index() { $data = array(); $success = ''; $error_msg = ''; date_default_timezone_set('Asia/Kolkata'); $currentTime = date( 'd-m-Y h:i:s A', time()); $post=$this->input->post(); if($post){ if($post['name']==''){ $this->form_validation->set_rules('RequestPatientName', 'Patient Name', 'required|trim|alpha_numeric_spaces'); $this->form_validation->set_rules('RequestPatientMobile', 'Patient Mobile Number', 'trim|required|numeric|min_length[10]'); $this->form_validation->set_rules('RequestDepartment', 'Department', 'required'); 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; } else{ $filename = $_FILES['uploadfile']['name']; if(!empty($filename)){ $filepath = 'uploads/bookappointment/'.time().'_'.$filename; $movefile = move_uploaded_file($_FILES["uploadfile"]["tmp_name"],$filepath); } else { $filepath = ''; } if($post['country_name']){ echo $Requestcountryname = $post['country_name']; } else { $Requestcountryname='';} $insert_data = array( 'RequestDoctor' => $post['RequestDoctor'], 'RequestPatientName' => $post['RequestPatientName'], 'RequestPatientMobile' => $post['RequestPatientMobile'], 'RequestPatientEmail' => $post['RequestPatientEmail'], 'RequestDepartment' => $post['RequestDepartment'], 'RequestLocation' => $post['RequestLocation'], 'Requestcountryname' => $Requestcountryname, 'Requestupload' => $filepath ); $success = $this->appointment->insert_appointment_request($insert_data); if($success&&($success!='')){ $_SESSION['submit_status_msg'] = "Your Appointment Request has been submitted successfully. We will contact you soon!"; $data = $this->appointment->get_appointment_request($success); $patientmail = $data['RequestPatientEmail']; $msg = $this->load->view("email_templates/appointment_request", $data, TRUE); $this->email->from('info@shardahospital.org', 'Appointment Request'); if($data['RequestLocation']=='International') { $to = 'queries@shardahospital.org'; } else { $to = 'marketing@shardahospital.org'; } $this->email->to($to); $this->email->bcc($patientmail); $this->email->cc('digital.marketing@shardahospital.org'); $this->email->subject('Book Appointment with sharda hospital'." | ".$currentTime); $this->email->set_mailtype("html"); $this->email->message($msg); $this->email->send(); echo '<script>console.log("'.$success.'");</script>'; //send_email_multiple("abdesh@futuretechin.com","marketing@shardahospital.org", "", "digital.marketing@shardahospital.org", "Appointment Request", $msg); // redirect(base_url()."success"); } else{ echo '<script>alert("Unable to submit your request. Kindly try again later.");</script>'; } } } } redirect(base_url()); } public function Countrybooklist(){ $data['getvalue'] = $_POST['getvalue']; $data['Country'] = $this->appointment->getbookappoint($getvalue); $this->load->view('bookappointcountrylist',$data); } }