%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 Career extends MY_Controller { public function __construct() { parent::__construct(); $this->load->model(array('Common_model')); } public function index() { $data = array(); $head = array(); $head['title'] = 'Career | RSPL'; $head['keywords'] = 'Career | RSPL'; $head['description'] = 'Career | RSPL'; //Get banner details $data['bannerArray'] = $this->Common_model->getSingleRecord('tbl_banners','*',array('is_deleted'=>'0','status'=>'1','banner_type'=>'7')); // Get Career Content $page = 'career'; $page = $this->Public_model->getOnePage($page); // $this->goOut($page); $data['title'] = $page['name']; $data['content'] = $page['content']; // Get exceptional-team Content $page1 = 'exceptional-team'; $page1 = $this->Public_model->getOnePage($page1); // $this->goOut($page1); $data['exceptional_team_title'] = $page1['name']; $data['exceptional_team_content'] = $page1['content']; // Get work-balance Content $page2 = 'work-balance'; $page2 = $this->Public_model->getOnePage($page2); // $this->goOut($page2); $data['work_balance_title'] = $page2['name']; $data['work_balance_content'] = $page2['content']; $data['positionArray'] = $this->Common_model->getAllRecords('tbl_positions','*', array('status'=>'1', 'is_deleted'=>'0')); $this->render('career', $head, $data); } public function detail() { $data = array(); $head = array(); $slug = $this->uri->segment(3); $data['positionsArray'] = $this->Common_model->getSingleRecord('tbl_positions','*',array('is_deleted'=>'0','status'=>'1','slug'=>$slug)); $head['title'] = $data['positionsArray']['position_title']; $head['keywords'] = $data['positionsArray']['position_title']; $head['description'] = $data['positionsArray']['position_title']; $this->render('careerdetail', $head, $data); } /* * Function : goOut */ private function goOut($page) { if ($page == null) { redirect(); } } /* * function : registrationsuccessful */ public function registrationsuccessful(){ if(@$_POST['submit']=='Submit') { $name = $_POST['name']; //$business = $_POST['business']; $email = $_POST['email']; $phone = $_POST['mobile']; $position_description = $_POST['position_description']; $message = $_POST['message']; $resume= $_POST['resume']; $post = $this->input->post(); // $req = array('required'=>'%s required.', 'is_unique'=>'This %s is already registered', 'integer'=>'This %s is invalid'); $params = array(); $params['status'] = '1'; $params['notice_period'] = $_POST['notice_period']; $params['relocate'] = $_POST['relocate']; $params['total_exp'] = $_POST['total_exp']; $params['current_address'] = $_POST['current_address']; $params['current_org'] = $_POST['current_org']; $params['permanent_address'] = $_POST['permanent_address']; $params['qualification'] = $_POST['qualification']; $params['email'] = $email; $params['name'] = $name; $params['phone'] = $phone; $params['message'] = $message; //$params['business'] = $business; $params['resume'] = $resume; $params['position_description'] = $position_description; $params['created'] = date('Y-m-d H:i:s'); $params['modified'] = date('Y-m-d H:i:s'); unset($_POST['submit']); $this->Common_model->saveinfo('tbl_job_application_form',$params); // Send Email $to_emails = 'hr@rishavshelters.com'; $subject = 'A candidate has expressed interest to join your team for - '.$position_description; $message = $this->load->view('emailer/emailer',$params,true); $this->send_email_pepipost($to_emails, $subject, $message); // Send Email End Here $data['success_msg'] = '<p style="color:red;">You have Successfully registered.</p>'; echo '1002'; } } public function uploadFiles(){ $filetype = array('jpeg','jpg','png','pdf','txt','docx','PDF'); foreach ($_FILES as $key ) { $date = time(); // echo filesize($key['tmp_name']); $file_ext = pathinfo($key['name'], PATHINFO_EXTENSION); $file_name = pathinfo($key['name'], PATHINFO_FILENAME); $name = $date.'_'.$file_name.'.'.$file_ext; $name1 = preg_replace('/\s+/', '_',$name); $path= 'attachments/job_files/'.$name1; if(in_array(strtolower($file_ext), $filetype)) { if(filesize($key['tmp_name'])<2000000) { @move_uploaded_file($key['tmp_name'],$path); echo $name1; } else { echo "FILE_SIZE_ERROR"; } } else { echo "FILE_TYPE_ERROR"; } exit(); } } /* * Function : sendSMTPCommonEmail */ public function sendSMTPCommonEmail($to, $subject, $message) { $CI =& get_instance(); $CI->load->library('email'); $mail=$CI->email; $mail->clear(); $from_email = 'info@rishavshelters.com'; $from_name = 'RISHAV SHELTERS'; $config['charset'] = 'utf-8'; $config['wordwrap'] = TRUE; $config['mailtype'] = 'html'; $config['protocol'] = "smtp"; $config['smtp_host'] = 'ssl://smtp.gmail.com'; $config['smtp_user'] = 'quizbyte@sharda.ac.in'; $config['smtp_pass'] = 'quizbyte@2021'; $config['smtp_port'] = '465'; $config['_auth_smtp'] = TRUE; $config['newline'] = "\r\n"; $config['crlf'] = "\r\n"; $mail->initialize($config); $mail->from($from_email, $from_name); $mail->to($to); $mail->reply_to($from_email, $from_name); $mail->subject($subject); $mail->message($message); //print_r($mail); die; return $mail->send(); } /* * Function : send_email_pepipost * Description : Send Email */ function send_email_pepipost($to_emails, $subject, $message, $fromname='', $fromemail='', $replyto=''){ $fromname=$fromname?$fromname:'RISHAV SHELTERS'; $fromemail=$fromemail?$fromemail:'rishavshelters@shardauniversity.com'; //Change This Email ID; $replyto=$replyto?$replyto:'noreply@sharda.ac.in'; //Change the Email ID; if(!$to_emails){ return; } if(is_string($to_emails)){ $to_emails=explode(",", $to_emails); } foreach($to_emails as $to){ $d=array ( 'personalizations' => array (0 => array ('recipient' => $to)), 'from' => array ('fromEmail' => $fromemail, 'fromName' => $fromname), 'replyToId'=>$replyto, 'subject' => $subject, 'content' => $message, ); $email_jason_data=json_encode($d); $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.pepipost.com/v2/sendEmail", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $email_jason_data, CURLOPT_HTTPHEADER => array( "api_key: c77184012dcf9bd5cd1886b4e0a2bb89", // "api_key: aab3f77715e90569034f0c6e5d912714", "content-type: application/json" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } } } }