| Server IP : 68.178.202.69 / Your IP : 216.73.216.122 Web Server : Apache System : Linux 69.202.178.68.host.secureserver.net 3.10.0-1160.139.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Nov 3 13:30:41 UTC 2025 x86_64 User : ikioworld ( 1005) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/ikioworld/public_html/application/controllers/product/ |
Upload File : |
<?php
class Product extends CI_Controller {
public function __construct() {
parent::__construct ();
$this->load->helper('download');
defined('BASEPATH') or exit('No direct script access allowed');
require_once(APPPATH."third_party/PHPMailer/PHPMailerAutoload.php");
Header('Access-Control-Allow-Origin: *'); //for allow any domain, insecure
Header('Access-Control-Allow-Headers: *'); //for allow any headers, insecure
Header('Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE'); //method allowed
}
function index()
{
$this->load->helper(array('form', 'url', 'common'));
$this->load->library(array('session', 'pagination','cart'));
$this->load->model('productsdisplay', '', true);
$this->load->model('homemodel', '', true);
$sql=$this->db->query("SELECT * from page where page_name='Products'");
$result = $sql->result();
$title = $result[0]->page_title;
$meta_title = $result[0]->meta_title;
$meta_d =$result[0]->meta_description;
$image = $result[0]->page_image;
$data['title'] = $title ." || IKIO LED LIGHTING";
$data['meta_title'] = $meta_title ." || IKIO LED LIGHTING";
$data['meta_description'] = $meta_d ." || IKIO LED LIGHTING";
$data['image'] = $image;
$data['prod'] = $this->uri->segment(1);
$data['category'] = $this->homemodel->getCategory();
$data['subcategorys'] =$this->homemodel->getSubCategory();
$data['products'] = $this->productsdisplay->get_products();
$data['categorys'] =$this->productsdisplay->getCategories();
$data['subcategorys'] =$this->productsdisplay->getSubCategories();
$data['type'] = $this->productsdisplay->getAllType();
$data['application'] = $this->productsdisplay->getAllApps();
$data['variant'] = $this->productsdisplay->getAllVariant();
$data['features'] = $this->productsdisplay->getAllFeatures();
$data['rating'] = $this->productsdisplay->getAllRating();
$this->load->view('inc/header',$data);
$this->load->view('product/index',$data);
$this->load->view('inc/footer',$data);
}
function newLaunchProducts()
{
$this->load->helper(array('form', 'url', 'common'));
$this->load->library(array('session', 'pagination','cart'));
$this->load->model('productsdisplay', '', true);
$this->load->model('homemodel', '', true);
$sql=$this->db->query("SELECT * from page where page_name='Products'");
$result = $sql->result();
$title = $result[0]->page_title;
$meta_title = $result[0]->meta_title;
$meta_d =$result[0]->meta_description;
$image = $result[0]->page_image;
$data['title'] = $title ." || IKIO LED LIGHTING";
$data['meta_title'] = $meta_title ." || IKIO LED LIGHTING";
$data['meta_description'] = $meta_d ." || IKIO LED LIGHTING";
$data['image'] = $image;
$data['prod'] = $this->uri->segment(1);
$data['category'] = $this->homemodel->getCategory();
$data['subcategorys'] =$this->homemodel->getSubCategory();
$data['products'] = $this->productsdisplay->get_launch_products();
$data['categorys'] =$this->productsdisplay->getCategories();
$data['subcategorys'] =$this->productsdisplay->getSubCategories();
$data['type'] = $this->productsdisplay->getAllType();
$data['application'] = $this->productsdisplay->getAllApps();
$data['variant'] = $this->productsdisplay->getAllVariant();
$data['features'] = $this->productsdisplay->getAllFeatures();
$data['rating'] = $this->productsdisplay->getAllRating();
$this->load->view('inc/header',$data);
$this->load->view('product/new_launches',$data);
$this->load->view('inc/footer',$data);
}
public function user_enquiry()
{
$this->load->model('Mailmodel', '', true);
$this->load->helper(array('form', 'url', 'common'));
$this->load->library(array('session', 'pagination'));
$this->load->model('productsdisplay', '', true);
if (!empty($this->input->post()) && $_POST['product_name']!='' && $_POST['full_name']!='James' && $_POST['mobile_number']!='+1 213 425 1453' && isset($_POST['g-recaptcha-response'])) {
$prod = $_POST['product_name'];
$prod_Result = $this->productsdisplay->prod_Check($prod);
$insert_id = $this->productsdisplay->addEnquiry($this->input->post());
$sender_mail ='noreply@ikioledlighting.com';
$email = $this->input->post('email');
if($email!=''){
$sender_mail ='noreply@ikioledlighting.com';
$data['fullname'] = $this->input->post('fullname');
$message = "<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
</head>
<body style='background-color:#f6f6f6; box-sizing: border-box; font-family: 'Poppins', sans-serif;'>
<div style='margin:0px auto;background: #f3f3f3;padding: 10px;'>
<div style='border: 1px solid #ccc;background-color:#fff;clear:both;color:#666;line-height:32px;max-width:500px;margin:50px auto;border-radius:5px 5px 5px 5px'>
<div style='color:#fff;text-align:center;padding:0px 0px 10px 0px;background-repeat:no-repeat;background-position:center;background-size:183px;background-color:#000000;width:100%;height:auto;border-radius:5px 5px 0px 0px'>
<img src='".base_url()."/assets/img/logo.png' style=' display: block; margin: 0 auto;width: 140px; padding-top: 15px;'>
</div>
<div style='margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0px;padding-left:0;font-size:15px'>
<img src='".base_url()."/assets/img/message.png' style=' display: block; margin: 0 auto;width: 100px; padding-top: 15px;'>
<table cellpadding='0' cellspacing='0' style='width: 100%;margin: 8px 1px;font-size: 12px;font-size:12px'>
<tbody>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;'>
<p style='font-weight:bold;text-align: center;font-size: 14px;margin-bottom: 0;color: #fff;text-transform: capitalize; isplay:block; width:100% '></p>
<p style='font-weight:400;text-align: center;font-size: 14px;margin-bottom: 0; display:block; width:100%'><b>Thank You ".$data['fullname']." for writing in to us!</b><br>We at IKIO, value your consideration and interest. If required, someone from our team will get in touch with you within 2 to 3 working days.</p>
<p style='font-weight:400;text-align: center;font-size: 14px;margin-bottom: 0; display:block; width:100%'>In the meantime, please continue exploring our website.</p>
</td>
</tr>
</tbody>
</table>
<p style='padding: 10px 30px;font-weight: bold;text-align: center;font-size: 14px;margin-bottom: 0;background-repeat:no-repeat;background-position:center;background-color:#000000;background: #000000;color: #fff;'> © 2022 IKIO LED LIGHTING. All Rights Reserved.</p>
</div>
</div>
</div>
</div>
</body>
</html>";
$this->Mailmodel->sendMail( "IKIO Photometric Form", $email, $data['fullname'], $message );
}
$data['product_name'] = $this->input->post('product_name');
$data['full_name'] =$this->input->post('full_name');
$data['content'] = $this->input->post('message');
$data['mobile_number'] = $this->input->post('mobile_number');
$data['email'] =$this->input->post('email');
$message = "
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
</head>
<body style='background-color:#f6f6f6; box-sizing: border-box; font-family: 'Poppins', sans-serif;'>
<div style='margin:0px auto;background: #f3f3f3;padding: 10px;'>
<div style='border: 1px solid #ccc;background-color:#fff;clear:both;color:#666;line-height:32px;max-width:500px;margin:50px auto;border-radius:5px 5px 5px 5px'>
<div style='color:#fff;text-align:center;padding:0px 0px 10px 0px;background-repeat:no-repeat;background-position:center;background-size:183px;background-color:#000000;width:100%;height:auto;border-radius:5px 5px 0px 0px'>
<img src='".base_url()."/assets/img/logo.png' style=' display: block; margin: 0 auto;width: 140px; padding-top: 15px;'>
<p style='font-weight:bold;text-align: center;font-size: 14px;margin-bottom: 0;color: #fff;text-transform: capitalize; display:block; width:100% '>A New Product Inquiry is there !</b></p>
</div>
<div style='margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0px;padding-left:0;font-size:15px'>
<img src='".base_url()."/assets/img/message.png' style=' display: block; margin: 0 auto;width: 100px; padding-top: 15px;'>
<table cellpadding='0' cellspacing='0' style='width: 100%;margin: 8px 1px;font-size: 12px;font-size:12px'>
<tbody>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Product Name</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left; '> ".$data['product_name']." </td>
</tr>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Name</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left; '> ".$data['full_name']." </td>
</tr>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Email</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['email']."</td>
</tr>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Phone</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['mobile_number']."</td>
</tr>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Message</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['content']."</td>
</tr>
</tbody>
</table>
<p style='padding: 10px 30px;font-weight: bold;text-align: center;font-size: 14px;margin-bottom: 0;background-repeat:no-repeat;background-position:center;background-color:#000000;background: #000000;color: #fff;'> © 2022 IKIO LED LIGHTING. All Rights Reserved.</p>
</div>
</div>
</div>
</div>
</body>
</html>";
$this->Mailmodel->sendMail( "IKIO Enquiry Form", "info@ikioledlighting.com", $data['full_name'], $message );
}
}
function fetch_data()
{
sleep(1);
$this->load->model('productsdisplay','',TRUE);
$this->load->helper(array('form', 'url','common'));
$this->load->library(array('session', 'pagination','cart'));
$type=$this->input->post('type_checkbox');
$sort_by =$this->input->post('sort_by');
$limit = $this->input->post('limit');
$config = array();
$config["base_url"] = '#';
$config['total_rows'] = $this->productsdisplay->count_all($sort_by);
$config['per_page'] = $limit;
$config['uri_segment'] = 3;
$config['use_page_numbers'] = TRUE;
$config['full_tag_open'] = '<ul class="pagination">';
$config['full_tag_close'] = '</ul>';
$config['first_tag_open'] = '<li>';
$config['first_tag_close'] = '</li>';
$config['last_tag_open'] = '<li>';
$config['last_tag_close'] = '</li>';
$config['next_link'] = '>';
$config['next_tag_open'] = '<li>';
$config['next_tag_close'] = '</li>';
$config['prev_link'] = '<';
$config['prev_tag_open'] = '<li>';
$config['prev_tag_close'] = '</li>';
$config['cur_tag_open'] = "<li class='active'><a href='#'>";
$config['cur_tag_close'] = '</a></li>';
$config['num_tag_open'] = '<li>';
$config['num_tag_close'] = '</li>';
$config['num_links'] = 3;
$this->pagination->initialize($config);
$page = $this->uri->segment(3);
$start = ($page - 1) * $config['per_page'];
$output = array(
'pagination_link' => $this->pagination->create_links(),
'product_list' => $this->productsdisplay->fetch_data($config["per_page"], $start,$sort_by,$limit)
);
echo json_encode($output);
}
function launch_data()
{
sleep(1);
$this->load->model('productsdisplay','',TRUE);
$this->load->helper(array('form', 'url','common'));
$this->load->library(array('session', 'pagination','cart'));
$type=$this->input->post('type_checkbox');
$sort_by =$this->input->post('sort_by');
$limit = $this->input->post('limit');
$config = array();
$config["base_url"] = '#';
$config['total_rows'] = $this->productsdisplay->count_launch_all();
$config['per_page'] = $limit;
$config['uri_segment'] = 3;
$config['use_page_numbers'] = TRUE;
$config['full_tag_open'] = '<ul class="pagination">';
$config['full_tag_close'] = '</ul>';
$config['first_tag_open'] = '<li>';
$config['first_tag_close'] = '</li>';
$config['last_tag_open'] = '<li>';
$config['last_tag_close'] = '</li>';
$config['next_link'] = '>';
$config['next_tag_open'] = '<li>';
$config['next_tag_close'] = '</li>';
$config['prev_link'] = '<';
$config['prev_tag_open'] = '<li>';
$config['prev_tag_close'] = '</li>';
$config['cur_tag_open'] = "<li class='active'><a href='#'>";
$config['cur_tag_close'] = '</a></li>';
$config['num_tag_open'] = '<li>';
$config['num_tag_close'] = '</li>';
$config['num_links'] = 3;
$this->pagination->initialize($config);
$page = $this->uri->segment(3);
$start = ($page - 1) * $config['per_page'];
$output = array(
'pagination_link' => $this->pagination->create_links(),
'product_list' => $this->productsdisplay->launch_data($config["per_page"], $start,$limit)
);
echo json_encode($output);
}
function fetch_datasub()
{
$this->load->model('productsdisplay','',TRUE);
$this->load->model('Subcategorymodel', '', true);
$this->load->model('Categorymodel', '', true);
$this->load->helper(array('form', 'url','common'));
$this->load->library(array('session', 'pagination','cart'));
$cat = $this->input->post('subid'); // 1stsegment
$where['slug']=$cat;
$result = $this->Subcategorymodel->getWhereRow($where);
$subcatid = $result->id;
$type=$this->input->post('type_checkbox');
$application=$this->input->post('application_checkbox');
$rating=$this->input->post('rating_checkbox');
$feature=$this->input->post('feature_checkbox');
$variant=$this->input->post('variant_checkbox');
$sort_by =$this->input->post('sort_by');
$limit = $this->input->post('limit');
$where['product_subcategory']=$subcatid;
$where['status']='active';
$config = array();
$config["base_url"] = '#';
$config['total_rows'] = $this->productsdisplay->countWhere($where);
$config['per_page'] = $limit;
$config['uri_segment'] = 3;
$config['use_page_numbers'] = TRUE;
$config['full_tag_open'] = '<ul class="pagination">';
$config['full_tag_close'] = '</ul>';
$config['first_tag_open'] = '<li>';
$config['first_tag_close'] = '</li>';
$config['last_tag_open'] = '<li>';
$config['last_tag_close'] = '</li>';
$config['next_link'] = '>';
$config['next_tag_open'] = '<li>';
$config['next_tag_close'] = '</li>';
$config['prev_link'] = '<';
$config['prev_tag_open'] = '<li>';
$config['prev_tag_close'] = '</li>';
$config['cur_tag_open'] = "<li class='active'><a href='#'>";
$config['cur_tag_close'] = '</a></li>';
$config['num_tag_open'] = '<li>';
$config['num_tag_close'] = '</li>';
$config['num_links'] = 3;
$this->pagination->initialize($config);
$page = $this->uri->segment(3);
$start = ($page - 1) * $config['per_page'];
$output = array(
'filter' => $this->productsdisplay->variant_data($cat,$subcatid),
'pagination_link' => $this->pagination->create_links(),
'product_list' => $this->productsdisplay->fetch_data12($config["per_page"], $start,$rating, $feature, $variant, $application, $type,$sort_by,$subcatid,$limit)
);
echo json_encode($output);
}
function fetch_datasub1()
{
$this->load->model('productsdisplay','',TRUE);
$this->load->model('Subcategorymodel','',true);
$this->load->helper(array('form', 'url','common'));
$this->load->library(array('session', 'pagination','cart'));
$cat = $this->input->post('subid'); // 1stsegment
//$sql = $this->db->query("SELECT id from subcategory where slug='$cat'");
$where['slug'] =$cat;
$result =$this->Subcategorymodel->getWhereRow($where);
$subcatid = $result->id;
$type=$this->input->post('type_checkbox');
$application=$this->input->post('application_checkbox');
$rating=$this->input->post('rating_checkbox');
$feature=$this->input->post('feature_checkbox');
$variant=$this->input->post('variant_checkbox');
$sort_by =$this->input->post('sort_by');
$limit = $this->input->post('limit');
$config = array();
$config["base_url"] = '#';
$config['total_rows'] = $this->productsdisplay->count_all1($rating, $feature,$variant,$application,$type,$sort_by,$subcatid);
$config['per_page'] = $limit;
$config['uri_segment'] = 3;
$config['use_page_numbers'] = TRUE;
$config['full_tag_open'] = '<ul class="pagination">';
$config['full_tag_close'] = '</ul>';
$config['first_tag_open'] = '<li>';
$config['first_tag_close'] = '</li>';
$config['last_tag_open'] = '<li>';
$config['last_tag_close'] = '</li>';
$config['next_link'] = '>';
$config['next_tag_open'] = '<li>';
$config['next_tag_close'] = '</li>';
$config['prev_link'] = '<';
$config['prev_tag_open'] = '<li>';
$config['prev_tag_close'] = '</li>';
$config['cur_tag_open'] = "<li class='active'><a href='#'>";
$config['cur_tag_close'] = '</a></li>';
$config['num_tag_open'] = '<li>';
$config['num_tag_close'] = '</li>';
$config['num_links'] = 3;
$this->pagination->initialize($config);
$page = $this->uri->segment(3);
$start = ($page - 1) * $config['per_page'];
$output = array(
'subcat'=>$this->productsdisplay->fetch_data11($config["per_page"], $start,$rating, $feature, $variant, $application, $type,$sort_by,$subcatid,$limit),
'pagination_link' => $this->pagination->create_links(),
'product_list' => $this->productsdisplay->fetch_data13($config["per_page"], $start,$rating, $feature, $variant, $application, $type,$sort_by,$subcatid,$limit)
);
echo json_encode($output);
}
public function productdetail()
{
$this->load->helper(array('form', 'url', 'common'));
$this->load->library(array('session', 'pagination','cart'));
$this->load->library('email');
$this->load->model('productsdisplay', '', true);
$this->load->model('homemodel', '', true);
$this->load->model('Mailmodel', '', true);
$slug = $this->uri->segment(2);
$sql = $this->db->query("SELECT product_name,product_tagline,featured_image,id,meta_title,meta_description,product_subcategory,product_category from product where slug='$slug'");
$result = $sql->result();
$id = $result[0]->id;
$meta =$result[0]->meta_title;
$meta_description =$result[0]->meta_description;
$sub= $result[0]->product_subcategory;
$cat =$result[0]->product_category;
$image =$result[0]->featured_image;
$name =$result[0]->product_name;
$tag = $result[0]->product_tagline;
$qry = $this->db->query("SELECT count(*) from product_images where product_id='$id'");
$reslt = $qry->result();
if(isset($reslt[0]->image)){
$img = $reslt[0]->image;
}else{
$img ="";
}
$data['title'] = $name . " " . $tag . "|| IKIO";
$data['meta_title'] = $meta . " || IKIO";
$data['meta_description'] =$meta_description ." || IKIO";
$data['product_image'] =$image;
if (!empty($this->input->post()) && $_POST['product_name']!='' && $_POST['full_name']!='James' && $_POST['mobile_number']!='+1 213 425 1453' && isset($_POST['g-recaptcha-response'])) {
$prod = $this->input->post('product_name');
$insert_id = $this->productsdisplay->addEnquiry($this->input->post());
if($prod!=''){
$email = $this->input->post('email');
if($email!=''){
$sender_mail ='noreply@ikioledlighting.com';
$data['full_name'] =$this->input->post('full_name');
$message = "<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
</head>
<body style='background-color:#f6f6f6; box-sizing: border-box; font-family: 'Poppins', sans-serif;'>
<div style='margin:0px auto;background: #f3f3f3;padding: 10px;'>
<div style='border: 1px solid #ccc;background-color:#fff;clear:both;color:#666;line-height:32px;max-width:500px;margin:50px auto;border-radius:5px 5px 5px 5px'>
<div style='color:#fff;text-align:center;padding:0px 0px 10px 0px;background-repeat:no-repeat;background-position:center;background-size:183px;background-color:#000000;width:100%;height:auto;border-radius:5px 5px 0px 0px'>
<img src='".base_url()."/assets/img/logo.png' style=' display: block; margin: 0 auto;width: 140px; padding-top: 15px;'>
</div>
<div style='margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0px;padding-left:0;font-size:15px'>
<img src='".base_url()."/assets/img/message.png' style=' display: block; margin: 0 auto;width: 100px; padding-top: 15px;'>
<table cellpadding='0' cellspacing='0' style='width: 100%;margin: 8px 1px;font-size: 12px;font-size:12px'>
<tbody>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;'>
<p style='font-weight:bold;text-align: center;font-size: 14px;margin-bottom: 0;color: #fff;text-transform: capitalize; isplay:block; width:100% '></p>
<p style='font-weight:400;text-align: center;font-size: 14px;margin-bottom: 0; display:block; width:100%'><b>Thank You ".$data['full_name']."for the Product Inquiry !</b><br>We at IKIO, value your consideration and interest. If required, someone from our team will get in touch with you within 2 to 3 working days.</p>
<p style='font-weight:400;text-align: center;font-size: 14px;margin-bottom: 0; display:block; width:100%'>In the meantime, please continue exploring our website.</p>
</td>
</tr>
</tbody>
</table>
<p style='padding: 10px 30px;font-weight: bold;text-align: center;font-size: 14px;margin-bottom: 0;background-repeat:no-repeat;background-position:center;background-color:#000000;background: #000000;color: #fff;'> © 2022 IKIO LED LIGHTING. All Rights Reserved.</p>
</div>
</div>
</div>
</div>
</body>
</html>";
$this->Mailmodel->sendMail( "IKIO Product Enquiry Form", $email, $data['full_name'], $message );
}
$sender_mail ='noreply@ikioledlighting.com';
$data['product_name'] = $this->input->post('product_name');
$data['full_name'] =$this->input->post('full_name');
$data['content'] = $this->input->post('message');
$data['mobile_number'] = $this->input->post('mobile_number');
$data['email'] =$this->input->post('email');
$message="
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
</head>
<body style='background-color:#f6f6f6; box-sizing: border-box; font-family: 'Poppins', sans-serif;'>
<div style='margin:0px auto;background: #f3f3f3;padding: 10px;'>
<div style='border: 1px solid #ccc;background-color:#fff;clear:both;color:#666;line-height:32px;max-width:500px;margin:50px auto;border-radius:5px 5px 5px 5px'>
<div style='color:#fff;text-align:center;padding:0px 0px 10px 0px;background-repeat:no-repeat;background-position:center;background-size:183px;background-color:#000000;width:100%;height:auto;border-radius:5px 5px 0px 0px'>
<img src='".base_url()."/assets/img/logo.png' style=' display: block; margin: 0 auto;width: 140px; padding-top: 15px;'>
<p style='font-weight:bold;text-align: center;font-size: 14px;margin-bottom: 0;color: #fff;text-transform: capitalize; display:block; width:100% '>A New Product Inquiry is there !</b></p>
</div>
<div style='margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0px;padding-left:0;font-size:15px'>
<img src='".base_url()."/assets/img/message.png' style=' display: block; margin: 0 auto;width: 100px; padding-top: 15px;'>
<table cellpadding='0' cellspacing='0' style='width: 100%;margin: 8px 1px;font-size: 12px;font-size:12px'>
<tbody>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Product Name</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left; '> ".$data['product_name']." </td>
</tr>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Name</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left; '> ".$data['full_name']." </td>
</tr>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Email</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['email']."</td>
</tr>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Phone</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['mobile_number']."</td>
</tr>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Message</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['content']."</td>
</tr>
</tbody>
</table>
<p style='padding: 10px 30px;font-weight: bold;text-align: center;font-size: 14px;margin-bottom: 0;background-repeat:no-repeat;background-position:center;background-color:#000000;background: #000000;color: #fff;'> © 2022 IKIO LED LIGHTING. All Rights Reserved.</p>
</div>
</div>
</div>
</div>
</body>
</html>";
$this->Mailmodel->sendMail( "IKIO Enquiry Form", "info@ikioledlighting.com", "Ikio Led Lighting", $message );
}
}
$data['category'] = $this->homemodel->getCategory();
$data['subcategorys'] =$this->homemodel->getSubCategory();
$data['category'] =$this->productsdisplay->getCategories();
$data['subcategory'] =$this->productsdisplay->getSubCategories();
$data['record']=$this->productsdisplay->get_details($slug,$sub,$cat,$img);
$data['related']=$this->productsdisplay->get_Related($slug,$sub,$cat,$img);
$this->load->view('inc/header',$data);
$this->load->view('product/product-detail', $data);
$this->load->view('inc/footer',$data);
}
public function getcategory()
{
$this->load->helper(array('form', 'url', 'common'));
$this->load->library(array('session', 'pagination'));
$this->load->model('productsdisplay', '', true);
$this->load->model('homemodel', '', true);
$cat = $this->uri->segment(2); // 1stsegment
$sql = $this->db->query("SELECT id,category_name from category where slug='$cat'");
$result = $sql->result();
$catid = $result[0]->id;
$catname = $result[0]->category_name;
$data['catname'] = $result[0]->category_name;
$data['cat_slug'] =$cat;
$data['title'] = $catname . " || IKIO";
$data['meta_title'] = $catname ." || IKIO";
$data['meta_description'] = $catname . "|| IKIO";
$data['category'] = $this->homemodel->getCategory();
$data['subcategorys'] =$this->homemodel->getSubCategory();
$data['categorys'] =$this->productsdisplay->getCategories();
$data['subcategorys'] =$this->productsdisplay->getSubCategories();
$data['cat'] = $this->productsdisplay->getAllCategoryProduct($catid);
redirect(base_url());
}
public function getsubcategory()
{
$this->load->helper(array('form', 'url', 'common'));
$this->load->library(array('session', 'pagination'));
$this->load->model('productsdisplay', '', true);
$this->load->model('Subcategorymodel', '', true);
$this->load->model('Categorymodel', '', true);
$this->load->model('homemodel', '', true);
$cat = $this->uri->segment(2); // 1stsegment
$where['slug']=$cat;
$resultsubcat =$this->Subcategorymodel->getWhereRow($where);
$subcatid = $resultsubcat->id;
$subcatname = $resultsubcat->name;
$catname = $resultsubcat->category_type;
$resultscat = $this->Categorymodel->getRow($catname);
$data['catname'] = $resultscat->category_name;
$data['cat_slug'] = $resultscat->slug;
$data['subcatname'] = $resultsubcat->name;
$data['subslug'] = $resultsubcat->slug;
$data['title'] = $subcatname." || IKIO";
$data['meta_title'] = $subcatname ." || IKIO";
$data['meta_description'] =$subcatname." || IKIO";
$data['category'] = $this->homemodel->getCategory();
$data['subcategorys'] =$this->homemodel->getSubCategory();
$data['categorys'] =$this->productsdisplay->getCategories();
$data['subcategorys'] =$this->productsdisplay->getSubCategories();
$data['subcat'] = $this->productsdisplay->getAllSubcategoryProduct($subcatid);
$this->load->view('inc/header',$data);
$this->load->view('product/subcategory',$data);
$this->load->view('inc/footer',$data);
}
public function getcompany()
{
$this->load->helper(array('form', 'url', 'common'));
$this->load->library(array('session', 'pagination'));
$this->load->model('productsdisplay', '', true);
$this->load->model('homemodel', '', true);
$cat = $this->uri->segment(2); // 1stsegment
$sql = $this->db->query("SELECT id,name from company where slug='$cat'");
$result = $sql->result();
$catid = $result[0]->id;
$catname = $result[0]->name;
$data['catname'] = $result[0]->name;
$data['cat_slug'] =$cat;
$data['title'] = $catname . " || IKIO";
$data['meta_title'] = $catname ." || IKIO";
$data['meta_description'] = $catname . "|| IKIO";
$data['category'] = $this->homemodel->getCategory();
$data['subcategorys'] =$this->homemodel->getSubCategory();
$data['categorys'] =$this->productsdisplay->getCategories();
$data['subcategorys'] =$this->productsdisplay->getSubCategories();
$data['cat1'] = $this->productsdisplay->getAllCompanyProduct1($catid);
$data['cat2'] = $this->productsdisplay->getAllCompanyProduct2($catid);
$data['cat3'] = $this->productsdisplay->getAllCompanyProduct3($catid);
$data['cat4'] = $this->productsdisplay->getAllCompanyProduct4($catid);
$data['cat5'] = $this->productsdisplay->getAllCompanyProduct5($catid);
$this->load->view('inc/header',$data);
$this->load->view('product/company', $data);
$this->load->view('inc/footer',$data);
}
public function compproductdetail()
{
$this->load->helper(array('form', 'url', 'common'));
$this->load->library(array('session', 'pagination','cart'));
$this->load->library('email');
$this->load->model('productsdisplay', '', true);
$this->load->model('homemodel', '', true);
$this->load->model('Mailmodel', '', true);
$slug = $this->uri->segment(2);
$sql = $this->db->query("SELECT product_name,product_tagline,featured_image,id,meta_title,meta_description,product_subcategory,product_category from product where slug='$slug'");
$result = $sql->result();
$id = $result[0]->id;
$meta =$result[0]->meta_title;
$meta_description =$result[0]->meta_description;
$sub= $result[0]->product_subcategory;
$cat =$result[0]->product_category;
$image =$result[0]->featured_image;
$name =$result[0]->product_name;
$tag = $result[0]->product_tagline;
$qry = $this->db->query("SELECT count(*) from product_images where product_id='$id'");
$reslt = $qry->result();
if(isset($reslt[0]->image)){
$img = $reslt[0]->image;
}else{
$img ="";
}
$data['title'] = $name . " " . $tag . "|| IKIO";
$data['meta_title'] = $meta . " || IKIO";
$data['meta_description'] =$meta_description ." || IKIO";
$data['product_image'] =$image;
if (!empty($this->input->post()) && $_POST['product_name']!='' && $_POST['full_name']!='James' && $_POST['mobile_number']!='+1 213 425 1453' && isset($_POST['g-recaptcha-response'])) {
$prod = $this->input->post('product_name');
$insert_id = $this->productsdisplay->addEnquiry($this->input->post());
if($prod!=''){
$email = $this->input->post('email');
if($email!=''){
$sender_mail ='noreply@ikioledlighting.com';
$data['full_name'] =$this->input->post('full_name');
$message = "<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
</head>
<body style='background-color:#f6f6f6; box-sizing: border-box; font-family: 'Poppins', sans-serif;'>
<div style='margin:0px auto;background: #f3f3f3;padding: 10px;'>
<div style='border: 1px solid #ccc;background-color:#fff;clear:both;color:#666;line-height:32px;max-width:500px;margin:50px auto;border-radius:5px 5px 5px 5px'>
<div style='color:#fff;text-align:center;padding:0px 0px 10px 0px;background-repeat:no-repeat;background-position:center;background-size:183px;background-color:#000000;width:100%;height:auto;border-radius:5px 5px 0px 0px'>
<img src='".base_url()."/assets/img/logo.png' style=' display: block; margin: 0 auto;width: 140px; padding-top: 15px;'>
</div>
<div style='margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0px;padding-left:0;font-size:15px'>
<img src='".base_url()."/assets/img/message.png' style=' display: block; margin: 0 auto;width: 100px; padding-top: 15px;'>
<table cellpadding='0' cellspacing='0' style='width: 100%;margin: 8px 1px;font-size: 12px;font-size:12px'>
<tbody>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;'>
<p style='font-weight:bold;text-align: center;font-size: 14px;margin-bottom: 0;color: #fff;text-transform: capitalize; isplay:block; width:100% '></p>
<p style='font-weight:400;text-align: center;font-size: 14px;margin-bottom: 0; display:block; width:100%'><b>Thank You ".$data['full_name']."for the Product Inquiry !</b><br>We at IKIO, value your consideration and interest. If required, someone from our team will get in touch with you within 2 to 3 working days.</p>
<p style='font-weight:400;text-align: center;font-size: 14px;margin-bottom: 0; display:block; width:100%'>In the meantime, please continue exploring our website.</p>
</td>
</tr>
</tbody>
</table>
<p style='padding: 10px 30px;font-weight: bold;text-align: center;font-size: 14px;margin-bottom: 0;background-repeat:no-repeat;background-position:center;background-color:#000000;background: #000000;color: #fff;'> © 2022 IKIO LED LIGHTING. All Rights Reserved.</p>
</div>
</div>
</div>
</div>
</body>
</html>";
$this->Mailmodel->sendMail( "IKIO Product Enquiry Form", $email, $data['full_name'], $message );
}
$sender_mail ='noreply@ikioledlighting.com';
$data['product_name'] = $this->input->post('product_name');
$data['full_name'] =$this->input->post('full_name');
$data['content'] = $this->input->post('message');
$data['mobile_number'] = $this->input->post('mobile_number');
$data['email'] =$this->input->post('email');
$message="
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
</head>
<body style='background-color:#f6f6f6; box-sizing: border-box; font-family: 'Poppins', sans-serif;'>
<div style='margin:0px auto;background: #f3f3f3;padding: 10px;'>
<div style='border: 1px solid #ccc;background-color:#fff;clear:both;color:#666;line-height:32px;max-width:500px;margin:50px auto;border-radius:5px 5px 5px 5px'>
<div style='color:#fff;text-align:center;padding:0px 0px 10px 0px;background-repeat:no-repeat;background-position:center;background-size:183px;background-color:#000000;width:100%;height:auto;border-radius:5px 5px 0px 0px'>
<img src='".base_url()."/assets/img/logo.png' style=' display: block; margin: 0 auto;width: 140px; padding-top: 15px;'>
<p style='font-weight:bold;text-align: center;font-size: 14px;margin-bottom: 0;color: #fff;text-transform: capitalize; display:block; width:100% '>A New Product Inquiry is there !</b></p>
</div>
<div style='margin-top:0;margin-right:0;margin-bottom:0;margin-left:0;padding-top:0;padding-right:0;padding-bottom:0px;padding-left:0;font-size:15px'>
<img src='".base_url()."/assets/img/message.png' style=' display: block; margin: 0 auto;width: 100px; padding-top: 15px;'>
<table cellpadding='0' cellspacing='0' style='width: 100%;margin: 8px 1px;font-size: 12px;font-size:12px'>
<tbody>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Product Name</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left; '> ".$data['product_name']." </td>
</tr>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Name</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left; '> ".$data['full_name']." </td>
</tr>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Email</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['email']."</td>
</tr>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Phone</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['mobile_number']."</td>
</tr>
<tr>
<td style='border-bottom:1px solid #eeee;text-align:left;padding: 10px;color: #000;width: 171px;font-weight:bold;font-size: 15px;background: url(".base_url()."/assets/img/dots.png);background-size: 3px;background-repeat: no-repeat;background-position: right;'>Message</td>
<td style='border-bottom:1px solid #eeee;font-size: 17px;padding: 10px;color: #000;text-align: left;'>".$data['content']."</td>
</tr>
</tbody>
</table>
<p style='padding: 10px 30px;font-weight: bold;text-align: center;font-size: 14px;margin-bottom: 0;background-repeat:no-repeat;background-position:center;background-color:#000000;background: #000000;color: #fff;'> © 2022 IKIO LED LIGHTING. All Rights Reserved.</p>
</div>
</div>
</div>
</div>
</body>
</html>";
$this->Mailmodel->sendMail( "IKIO Enquiry Form", "info@ikioledlighting.com", "Ikio Led Lighting", $message );
}
}
$data['category'] = $this->homemodel->getCategory();
$data['subcategorys'] =$this->homemodel->getSubCategory();
$data['category'] =$this->productsdisplay->getCategories();
$data['subcategory'] =$this->productsdisplay->getSubCategories();
$data['record']=$this->productsdisplay->get_compdetails($slug,$sub,$cat,$img);
$data['related']=$this->productsdisplay->get_compRelated($slug,$sub,$cat,$img,$id);
$this->load->view('inc/header',$data);
$this->load->view('product/product-detail', $data);
$this->load->view('inc/footer',$data);
}
}