%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 ContactUs extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/<method_name>
* @see https://codeigniter.com/user_guide/general/urls.html
*/
function __construct() {
parent::__construct();
if((!isset($_SESSION['is_logged']))||($_SESSION['is_logged']==false))
{
$_SESSION['redirect'] = base_url()."admin/ContactUs/view_entries";
redirect(base_url().'admin/login');
}
$this->load->model('contact_us_model', 'contacts');
}
public function index()
{
$this->view_entries();
}
public function view_entries($id=0)
{
$data = array();
$data['records'] = $this->contacts->get_entries();
if(!$data){
show_404();
}
$this->load->view('admin/ViewContactUsEntries',$data);
}
public function remove_entry($id)
{
$data = array();
if($this->contacts->delete_entry($id)){
$data['msg'] = 'Contact Us form entry deleted succesfully';
}
else{
$data['msg'] = 'Contact Us form entry could not be deleted';
}
$data['records'] = $this->contacts->get_entries();
if(!$data){
show_404();
}
$this->load->view('admin/ViewContactUsEntries',$data);
}
}