Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /proc/self/root/var/www/blue-sky.co.id/public_html/application/controllers/ |
Upload File : |
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Product extends Public_Controller { public function __construct() { parent::__construct(); } public function get($alias = NULL) { //check if product exist if($this->session->userdata('site_lang') == 'english') { $this->db->select('*')->from('products')->where('alias', $alias)->where('product_status', 1)->order_by('priority','ASC'); } else { $this->db->select('*')->from('products')->where('alias', $alias)->where('product_status', 1)->order_by('priority','ASC'); } $data['product'] = $this->db->get()->row_array(); if(empty($data['product']) || $alias == NULL) { show_404(); } //get this product data if($this->session->userdata('site_lang') == 'english') { $this->db->select('*')->from('products')->where('alias', $alias)->order_by('priority','ASC'); } else { $this->db->select('*')->from('products')->where('alias', $alias)->order_by('priority','ASC'); } $data['product'] = $this->db->get()->row_array(); $product_id = (int) $data['product']['id_products']; //LOAD LANGUAGE FILES if($this->session->userdata('site_lang') == 'english') { $this->lang->load('product_detail', 'english'); $this->lang->load('product_list', 'english'); } else { $this->lang->load('product_detail', 'indonesian'); $this->lang->load('product_list', 'indonesian'); } //get kategori ide produk if($this->session->userdata('site_lang') == 'english') { $data['categories'] = $this->db->select('category_en as category, alias_en as alias')->from('categories')->where('status', '1')->order_by('priority', 'ASC')->get()->result(); } else { $data['categories'] = $this->db->select('category, alias')->from('categories')->where('status', '1')->order_by('priority', 'ASC')->get()->result(); } $this->data_header['c_url_alias'] = $this->db ->select('alias') ->from('products')->where('id_products', $data['product']['id_products']) ->order_by('priority','ASC')->get()->row()->alias; $this->data_header['c_url_alias_ind'] = $this->db ->select('alias') ->from('products')->where('id_products', $data['product']['id_products']) ->order_by('priority','ASC')->get()->row()->alias; $data['testi_images'] = $this->db->order_by('priority','ASC')->get_where("testi_images",array("product_id"=>$data['product']['id_products'])); $data['product_images'] = $this->db->order_by('priority','ASC')->get_where("product_images",array("product_id"=>$data['product']['id_products'])); $this->data_header['phone'] = $data['product']['nomor_telepon']; $this->data_header['alamat'] = $data['product']['alamat']; //get SEO $this->data_header['browser_title'] = 'Product - ' . ucwords($data['product']['title']); $this->data_header['meta_description'] = $data['product']['meta_description']; $this->load->view("themes/$this->theme_no/header", $this->data_header); $this->load->view("themes/$this->theme_no/product", $data); $this->load->view("themes/$this->theme_no/footer", $this->data_footer); } public function form_product($alias = NULL){ //check if product exist if($this->session->userdata('site_lang') == 'english') { $this->db->select('*')->from('products')->where('alias_en', $alias)->where('product_status', 1)->order_by('priority','ASC'); } else { $this->db->select('*')->from('products')->where('alias', $alias)->where('product_status', 1)->order_by('priority','ASC'); } $data['product'] = $this->db->get()->row(); if(empty($data['product']) || $alias == NULL) { // echo "tes"; // exit(); show_404(); } //get this product data if($this->session->userdata('site_lang') == 'english') { $this->db->select('*')->from('products')->where('alias_en', $alias)->order_by('priority','ASC'); } else { $this->db->select('*')->from('products')->where('alias', $alias)->order_by('priority','ASC'); } $data['product'] = $this->db->get()->row(); $product_id = (int) $data['product']->id_products; $this->data['lounge_data']= $this->db->select('id_products, title, email, prefix')->from('products')->where('id_products',$this->input->post('lounge_id'))->where('booking_active', 'yes')->order_by('title', 'asc')->get()->row(); //LOAD LANGUAGE FILES if($this->session->userdata('site_lang') == 'english') { $this->lang->load('product_detail', 'english'); $this->lang->load('product_list', 'english'); } else { $this->lang->load('product_detail', 'indonesian'); $this->lang->load('product_list', 'indonesian'); } //get kategori ide produk if($this->session->userdata('site_lang') == 'english') { $data['categories'] = $this->db->select('category_en as category, alias_en as alias')->from('categories')->where('status', '1')->order_by('priority', 'ASC')->get()->result(); } else { $data['categories'] = $this->db->select('category, alias')->from('categories')->where('status', '1')->order_by('priority', 'ASC')->get()->result(); } //get SEO $this->data_header['browser_title'] = 'From Product - ' . ucwords($data['product']->title); $this->data_header['meta_description'] = 'From Product - '.$data['product']->meta_description; $this->load->view("themes/$this->theme_no/header", $this->data_header); $this->load->view("themes/$this->theme_no/iframe_form_product", $data); $this->load->view("themes/$this->theme_no/footer", $this->data_footer); } }