%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 CI_Controller { function __construct() { parent::__construct(); if((!isset($_SESSION['is_logged']))||($_SESSION['is_logged']==false)) { $_SESSION['redirect'] = base_url()."admin/career"; redirect(base_url().'admin/login'); } $this->load->model('career_model', 'career'); $this->load->model('Common_Model'); } public function index(){ // $this->module(); $data = array(); $data['records'] = $recordsArray = $this->Common_Model->getCommonQuery('sh_careers','*','',array('id'=>'DESC')); // print_r($data['records']); $this->load->view('admin/career',$data); } /* * Function : addmodule * For particular Record */ public function uploadImage() { $config['upload_path'] = './uploads/career'; $config['allowed_types'] = "*"; $this->load->library('upload', $config); $this->upload->initialize($config); if (!$this->upload->do_upload('file')) { log_message('error', 'Image Upload Error: ' . $this->upload->display_errors()); } $img = $this->upload->data(); // if(!empty($img['file_name'])) { // resizeImage($img['file_name'],'300','300','attachments/career_images'); // } return $img['file_name']; } public function addcareer($uid = '') { if($_POST){ $this->form_validation->set_rules('title','Title','trim|required'); $this->form_validation->set_rules('experience','Experience','trim|required'); $this->form_validation->set_rules('qualification','Qualification','trim|required'); if($this->form_validation->run()) { if($this->input->post('id')){ $id = $this->input->post('id'); $_POST['updated_at'] = date('y-m-d H:i:s'); $this->Common_Model->updateinfo($tbl_name='sh_careers',$_POST,'id',$id); } else { $_POST['created_at']= date('y-m-d H:i:s'); //print_r($_POST);die; $this->Common_Model->saveinfo($tbl_name='sh_careers',$_POST); } // setHistory('Module added Successfully'); redirect('admin/career'); } else { $this->load->view('admin/addcareer'); // setHistory('Validation error on Add/Edit module page'); } } else { $data['sd'] = $sd = $this->Common_Model->getSingleRecord('sh_careers',' * ', array('id'=>$uid)); $this->load->view('admin/addcareer',$data); // setHistory('Go to Add/Edit module page'); } } /* * Function : deletemodule * */ public function deletecareer($uid){ $this->Common_Model->removeAllItems("sh_careers",$uid,'id'); $this->session->set_flashdata('success', 'Data deleted'); redirect('admin/career'); // setHistory('advance setting record deleted successfully'); } public function career_applicant(){ // $this->module(); $data = array(); $careerArray = $this->Common_Model->getCommonQuery('sh_careers','*','',array('id'=>'DESC')); foreach($careerArray as $career){$nCareer[$career['id']] = $career['title'];} $data['career'] = $nCareer; $data['records'] = $recordsArray = $this->Common_Model->getCommonQuery('sh_careers_applicant','*','',array('id'=>'DESC')); //print_r($data['records']);die; $this->load->view('admin/careerapplicant',$data); } }