Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: Sell.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Sell extends MY_Controller { public function __construct(){ parent::__construct(); $this->load->model('Ecomm_model'); $this->load->helper('ecomm_helper'); } public function index() { $this->data['cat_cnt'] = $this->Ecomm_model->getCount('tbl_gf_ecomm_category', array('parent_id' => 0)); $this->data['sub_cat_cnt'] = $this->Ecomm_model->getCount('tbl_gf_ecomm_category', array('parent_id !=' => 0)); $this->data['product_cnt'] = $this->Ecomm_model->getCount('tbl_gf_ecomm_product'); $this->data['user_cnt'] = $this->Ecomm_model->getCount('tbl_gf_users', ['UserArchived' => 0]); $this->data['order_cnt'] = $this->Ecomm_model->getCount('tbl_gf_ecomm_order_details'); $this->data['top_selling_products'] = $this->Ecomm_model->top_selling_products(); $this->data['todays_orders'] = $this->Ecomm_model->todays_orders(); $this->data['page_title'] = "Top Selling Products"; $this->data['view'] = 'admin/ecomm/top_selling_products'; $this->load->view('admin/layouts/default1', $this->data); } public function total_goods() { $this->data['total_products'] = $this->db->where('quantity >', '0')->get('tbl_gf_ecomm_product')->result(); //d($this->data['total_products']); $this->data['page_title'] = "Total Products"; $this->data['view'] = 'admin/ecomm/total_products'; $this->load->view('admin/layouts/default1', $this->data); } public function sub_cats($page = 1) { $this->data['page_title'] = 'Categories'; $this->data['current_page'] = 'Categories'; $cat_dropdown = category_dropdown(); $parent_cat_id = (int)0; $category_name = "Main Categories"; if($this->input->get('id')) { $parent_cat_id = $this->input->get('id'); } $row=$this->Ecomm_model->category_list('id','DESC','','','',$parent_cat_id); if($parent_cat_id) { $category_name = $this->db->select('category_name')->from('tbl_gf_ecomm_category')->where('id', $parent_cat_id)->get()->row()->category_name; } $config = array(); $config["base_url"] = base_url($this->config->item('apanel_name').'/ecomm/category'); $config["total_rows"] = count($row); $config["per_page"] = 12; $config['num_links'] = 4; $config['use_page_numbers'] = TRUE; $config['reuse_query_string'] = TRUE; $config['enable_query_strings'] = TRUE; $config['page_query_string'] = FALSE; $config['full_tag_open'] = '<ul class="pagination">'; $config['full_tag_close'] = '</ul>'; $config['first_link'] = '<i class="fa fa-angle-double-left"></i>'; $config['first_tag_open'] = '<li>'; $config['first_tag_close'] = '</li>'; $config['last_link'] = '<i class="fa fa-angle-double-right"></i>'; $config['last_tag_open'] = '<li>'; $config['last_tag_close'] = '</li>'; $config['next_link'] = ''; $config['next_tag_open'] = '<span class="nextlink">'; $config['next_tag_close'] = '</span>'; $config['prev_link'] = ''; $config['prev_tag_open'] = '<span class="prevlink">'; $config['prev_tag_close'] = '</span>'; $config['cur_tag_open'] = '<li class="active"><a href="#">'; $config['cur_tag_close'] = '<span class="sr-only">(current)</span></a></li>'; $config['num_tag_open'] = '<li style="margin:3px">'; $config['num_tag_close'] = '</li>'; $this->pagination->initialize($config); $page=($page-1) * $config["per_page"]; if($this->input->post('search_value')!=''){ $keyword=addslashes(trim($this->input->post('search_value'))); $this->data['category_list'] = $this->Ecomm_model->category_list('id', 'DESC', '', '', $keyword, $parent_cat_id); } else{ $this->data["links"] = $this->pagination->create_links(); $category_name = $this->db->select('*')->from('tbl_gf_ecomm_category')->where('parent_id !=', false)->get()->result(); foreach($category_name as $cat_id){ $list_ids[] = ($cat_id->parent_id); } } $ids = implode(',', $list_ids); $this->data['category_list'] = $this->Ecomm_model->category_list('OrderBy','ASC' , $config["per_page"], $page,'','', $list_ids); $this->data['category_name'] = $category_name; $this->data['categories_dropdown'] = $cat_dropdown; $this->data['view'] = 'admin/ecomm/category'; $this->load->view('admin/layouts/default1', $this->data); } }