%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 /* * @Author: Sharda Tech Pvt. Ltd. */ if (!defined('BASEPATH')) { exit('No direct script access allowed'); } class Managengo extends ADMIN_Controller { public function __construct() { parent::__construct(); $this->load->model('Common_model'); } public function index() { $this->login_check(); if (isset($_GET['delete'])) { $this->Common_model->deleteRecords($_GET['delete'],'id','tbl_ngo'); $this->session->set_flashdata('success', 'Data is deleted!'); redirect('admin/managengo'); } $data = array(); $head = array(); $head['title'] = 'Administration - Manage NGO'; $head['description'] = '!'; $head['keywords'] = ''; // Validate the form $this->form_validation->set_rules('title', 'Title', 'trim|required'); //$this->form_validation->set_rules('slug', 'Slug', 'trim|required'); $this->form_validation->set_rules('status', 'Status', 'trim|required'); if ($this->form_validation->run($this)) { $_POST['slug'] = seo_friendly_url(str_replace(" ","-",strtolower($_POST['slug']))); $_POST['description'] = seo_friendly_url($_POST['description']); $_POST['ngo_image'] = $this->uploadImage(); if($_POST['old_image']!='' && $_POST['ngo_image']==''){ $_POST['ngo_image'] = $_POST['old_image']; } unset($_POST['old_image']); $this->Common_model->setRecords($_POST, 'tbl_ngo'); $this->saveHistory('upload new file - ' . $_POST['title']); redirect('admin/managengo'); } if(isset($_GET['edit'])) { $_POST = $this->Common_model->getRecords($_GET['edit'], 'tbl_ngo'); } // Get All SU Banners $data['ngoRecords'] = $this->Common_model->getRecords(NULL, 'tbl_ngo'); $this->load->view('_parts/header', $head); $this->load->view('managengo/managengo', $data); $this->load->view('_parts/footer'); $this->saveHistory('Go to NGO'); } /* * Function : uploadImage * Description : Upload the banner image */ private function uploadImage() { $config['upload_path'] = './attachments/ngo_images/'; $config['allowed_types'] = $this->allowed_img_types; $this->load->library('upload', $config); $this->upload->initialize($config); if (!$this->upload->do_upload('ngo_image')) { 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/awards_images'); // } return $img['file_name']; } }