%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 Feedback extends ADMIN_Controller { private $num_rows = 10; public function __construct() { parent::__construct(); $this->load->model(array('Feedback_model', 'Languages_model', 'Categories_model')); } public function index($page = 0) { $this->login_check(); $data = array(); $head = array(); $head['title'] = 'Administration - View products'; $head['description'] = '!'; $head['keywords'] = ''; if (isset($_GET['delete'])) { $this->Feedback_model->deleteProduct($_GET['delete']); $this->session->set_flashdata('result_delete', 'feedback is deleted!'); $this->saveHistory('Delete feedback id - ' . $_GET['delete']); redirect('admin/feedback'); } unset($_SESSION['filter']); $search_title = null; if ($this->input->get('search_title') !== NULL) { $search_title = $this->input->get('search_title'); $_SESSION['filter']['search_title'] = $search_title; $this->saveHistory('Search for product title - ' . $search_title); } $orderby = null; if ($this->input->get('order_by') !== NULL) { $orderby = $this->input->get('order_by'); $_SESSION['filter']['order_by '] = $orderby; } $category = null; if ($this->input->get('category') !== NULL) { $category = $this->input->get('category'); $_SESSION['filter']['category '] = $category; $this->saveHistory('Search for feedback type - ' . $category); } $vendor = null; if ($this->input->get('show_vendor') !== NULL) { $vendor = $this->input->get('show_vendor'); } $to_date = null; if ($this->input->get('to_date') !== NULL) { $to_date = $this->input->get('to_date'); } $from_date = null; if ($this->input->get('from_date') !== NULL) { $vendor = $this->input->get('from_date'); } if (isset($_POST['export'])) { header("Content-Disposition: attachment; filename=ShardaDiagnostics-feedback-".date('Y-m-d').".csv"); $feedback = $this->Feedback_model->getproducts('', '', $search_title, $orderby, $category, $vendor, $to_date, $from_date); //print_r($all_bookings);die; $file = fopen('php://output', 'w'); $header = array("Name","Email ID","Contact Number","Query Type","Message","Date"); fputcsv($file, $header); foreach ($feedback as $bookings){ $data=array($bookings->name, $bookings->email ,$bookings->contact,$bookings->type,$bookings->message,$total,$bookings->createdon); fputcsv($file,$data); } fclose($file); exit; } $data['products_lang'] = $products_lang = $this->session->userdata('admin_lang_products'); $rowscount = $this->Feedback_model->productsCount($search_title, $category); $page = $_GET['per_page']; $data['products'] = $this->Feedback_model->getproducts($this->num_rows, $page, $search_title, $orderby, $category, $vendor, $to_date, $from_date); $data['links_pagination'] = pagination('admin/feedback/feedback', $rowscount, $this->num_rows, 3); $data['num_shop_art'] = $this->Feedback_model->numShopproducts(); $data['languages'] = $this->Languages_model->getLanguages(); $data['shop_categories'] = $this->Categories_model->getShopCategories(null, null, 2); $this->saveHistory('Go to products'); $this->load->view('_parts/header', $head); $this->load->view('feedback/feedback', $data); $this->load->view('_parts/footer'); } public function getProductInfo($id) { $this->login_check(); return $this->Feedback_model->getOneProduct($id); } /* * called from ajax */ public function productStatusChange() { $this->login_check(); $result = $this->Feedback_model->productStatusChange($_POST['id'], $_POST['to_status']); if ($result == true) { echo 1; } else { echo 0; } $this->saveHistory('Change product id ' . $_POST['id'] . ' to status ' . $_POST['to_status']); } }