%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 if (!defined('BASEPATH')) { exit('No direct script access allowed'); } class Managecareer extends ADMIN_Controller { public function __construct() { parent::__construct(); $this->load->model(array('Common_model','Business_model')); } public function index() { $this->login_check(); $data = array(); $head = array(); $head['title'] = 'Administration - Manage Career'; $head['description'] = 'Administration - Manage Career'; $head['keywords'] = 'Administration - Manage Career'; // Delete business if (isset($_GET['delete'])) { $this->Common_model->deleteRecords($_GET['delete']); $this->session->set_flashdata('success', 'Position is deleted!'); $this->saveHistory('Delete Position id - ' . $_GET['delete']); redirect('admin/managecareer'); } // Get happenings $data['positions'] = $this->Common_model->getRecords(NULL, 'tbl_positions'); // Get Sections $data['categoryArray'] = $this->Business_model->getcategoryList('tbl_positions_category'); $this->load->view('_parts/header', $head); $this->load->view('managecareer/managecareer', $data); $this->load->view('_parts/footer'); $this->saveHistory('Go to Manage Career'); } public function addpositions() { $this->login_check(); $data = array(); $head = array(); $head['title'] = 'Administration - Add Positions'; $head['description'] = 'Administration - Add Positions'; $head['keywords'] = 'Administration - Add Positions'; if (isset($_POST['submit'])) { unset($_POST['submit']); $this->form_validation->set_rules('position_title', 'Title', 'trim|required'); $this->form_validation->set_rules('position_description', 'Description', 'trim|required'); $this->form_validation->set_rules('status', 'Status', 'trim|required'); if ($this->form_validation->run($this)) { $_POST['position_image'] = $this->uploadImage('position_image'); if($_POST['old_image']!='' && $_POST['position_image']==''){ $_POST['position_image'] = $_POST['old_image']; } unset($_POST['old_image']); $_POST['job_description_file'] = $this->uploadImage('job_description_file'); if($_POST['old_file']!='' && $_POST['job_description_file']==''){ $_POST['job_description_file'] = $_POST['old_file']; } unset($_POST['old_file']); $_POST['position_title'] = seo_friendly_url($_POST['position_title']); $_POST['position_description'] = seo_friendly_url_desc($_POST['position_description']); $_POST['slug'] = str_replace(array(" ","'","&",";",":","`"),"-",valid_seo_friendly_url(strtolower($_POST['slug']))); $this->Common_model->setRecords($_POST,'tbl_positions'); $this->session->set_flashdata('success', 'Position Added Successfully'); if ($id == 0) { $this->saveHistory('Position Added Successfully'); } else { $this->saveHistory('Position Updated Successfully'); } redirect('admin/managecareer'); } } // Get Position List if(isset($_GET['edit'])){ $_POST = $this->Common_model->getRecords($_GET['edit'],'tbl_positions'); } // Set Sections $data['categoryArray'] = $this->Business_model->getcategory('tbl_positions_category'); $this->load->view('_parts/header', $head); $this->load->view('managecareer/addpositions', $data); $this->load->view('_parts/footer'); $this->saveHistory('Go to Add New Position'); } /* * Function : sections */ public function managecategory() { $this->login_check(); $data = array(); $head = array(); $head['title'] = 'Administration - Manage Category'; $head['description'] = 'Administration - Manage Category'; $head['keywords'] = 'Administration - Manage Category'; // Delete Sections if (isset($_GET['delete'])) { $this->Business_model->delete_records('tbl_positions_category',$_GET['delete']); $this->session->set_flashdata('success', 'Category is deleted!'); $this->saveHistory('Delete Catgeory id - ' . $_GET['delete']); redirect('admin/managecareer/managecategory'); } // Set category $data['categoryArray'] = $this->Business_model->getAllcategories('tbl_positions_category'); $this->load->view('_parts/header', $head); $this->load->view('managecareer/managecategory', $data); $this->load->view('_parts/footer'); $this->saveHistory('Go to Manage Category'); } public function addcategory() { $this->login_check(); $data = array(); $head = array(); $head['title'] = 'Administration - Add Category'; $head['description'] = 'Administration - Add Category'; $head['keywords'] = 'Administration - Add Category'; if (isset($_POST['submit'])) { unset($_POST['submit']); $this->form_validation->set_rules('category_name', 'Category Name', 'trim|required'); $this->form_validation->set_rules('status', 'Status', 'trim|required'); if ($this->form_validation->run($this)) { $this->Common_model->setRecords($_POST,'tbl_positions_category'); $this->session->set_flashdata('success', 'Category Added Successfully'); if ($id == 0) { $this->saveHistory('Category Added Successfully'); } else { $this->saveHistory('Category Updated Successfully'); } redirect('admin/managecareer/managecategory'); } } if(isset($_GET['edit'])) { $_POST = $this->Business_model->getcategory('tbl_positions_category', $_GET['edit']); } $this->load->view('_parts/header', $head); $this->load->view('managecareer/addcategory', $data); $this->load->view('_parts/footer'); $this->saveHistory('Go to Add New Category'); } /* * Function : uploadImage */ private function uploadImage($image) { $config['upload_path'] = './attachments/position_images/'; $config['allowed_types'] = $this->allowed_img_types; $this->load->library('upload', $config); $this->upload->initialize($config); if (!$this->upload->do_upload($image)) { //log_message('error', 'Image Upload Error: ' . $this->upload->display_errors()); } $img = $this->upload->data(); // Resize Image if(!empty($img['file_name'])) { //resizeImage($img['file_name'],'250','250','attachments/happening_images'); } return $img['file_name']; } }