����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/adimi/application/modules/web/views/themes/shatu/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/adimi/application/modules/web/views/themes/shatu/brand_product.php
<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
<?php 
    $is_aff = false;
    if(check_module_status('affiliate_products') == 1){
        $is_aff = true;
    }
?>
<div class="page-breadcrumbs">
<div class="container">
<ol class="breadcrumb">
    <li><a href="<?php echo base_url() ?>"><?php echo display('home') ?></a></li>
    <li class="active"><?php echo html_escape($brand_name) ?></li>
</ol>
</div>
</div>
<!-- /.End of page breadcrumbs -->
<div class="category-content hidden-xs">
<div class="container">
<div class="row">
    <div class="col-sm-3 leftSidebar hidden-xs">
        <div class="sidebar-widget">
            <!-- /.End of accessories -->
            <div class="sidebar-widget-title">
                <?php
                if ($max_value) {
                    ?>
                    <div class="price-Pips">
                        <?php echo form_open('', array('id' => 'priceForm')); ?>  
                            <h3 class="sidebar-title"><?php echo display('by_price') ?></h3>
                            <input type="text" class="price-range" value="price-range" name="price-range"/>
                        <?php echo form_close(); ?>
                    </div>
                    <?php
                }
                if ($variant_list) {
                    ?>
                    <div class="product-size">
                        <h3 class="sidebar-title"><?php echo display('by_variant') ?>:</h3>
                        <?php
                        if ($variant_list) {
                            $i = 1;
                            foreach ($variant_list as $variant) {
                                ?>
                                <input type="radio" class="size1" name="size" id="<?php echo $i ?>" value="<?php
                                $currentURL = current_url();
                                $params = $_SERVER['QUERY_STRING'];
                                $size = $this->input->get('size',TRUE);
                                if ($params) {
                                    if ($size) {
                                        $new_param = str_replace("size=" . $size, "size=" . $variant['variant_id'], $params);
                                        echo $fullURL = $currentURL . '?' . $new_param;
                                    } else {
                                        echo $fullURL = $currentURL . '?' . $params . '&size=' . $variant['variant_id'];
                                    }
                                } else {
                                    echo $fullURL = $currentURL . '?size=' . $variant['variant_id'];
                                }
                                ?>" <?php if ($size == $variant['variant_id']) {
                                    echo "checked";
                                } ?>/>
                                <label for="<?php echo $i ?>"><span
                                            class="size"><?php echo html_escape($variant['variant_name']) ?></span></label>
                                <?php
                                $i++;
                            }
                        }
                        ?>
                    </div>
                    <!--  /.End of product color selector -->
                    <?php
                }
                $lang_id = 0;
                $user_lang = $this->session->userdata('language');
                if (empty($user_lang)) {
                    $lang_id = 'english';
                } else {
                    $lang_id = $user_lang;
                }
                ?>
                <div class="sidebar-review">
                    <h3 class="sidebar-title"><?php echo display('rating') ?>:</h3>
                    <div class="checkbox checkbox-success">
                        <input id="rating1" type="checkbox" class="check_value" value="<?php
                        $currentURL = current_url();
                        $params = $_SERVER['QUERY_STRING'];
                        $rate = $this->input->get('rate',TRUE);
                        if ($params) {
                            if ($rate) {
                                $new_param = str_replace("rate=" . $rate, "rate=4-5", $params);
                                echo $fullURL = $currentURL . '?' . $new_param;
                            } else {
                                echo $fullURL = $currentURL . '?' . $params . '&rate=4-5';
                            }
                        } else {
                            echo $fullURL = $currentURL . '?rate=4-5';
                        }
                        ?>" <?php if ($this->input->get('rate',TRUE) == '4-5') {
                            echo("checked");
                        } ?>>
                        <label for="rating1">
                            <span class="product-rating">
                                <span class="star-rating">
                                    <i class="fa fa-star"></i>
                                    <i class="fa fa-star"></i>
                                    <i class="fa fa-star"></i>
                                    <i class="fa fa-star"></i>
                                    <i class="fa fa-star-o"></i>
                                </span>
                                <a href="javascript:void(0)" class="review-link">
                                    <span class="count">(<?php echo display('4') . '-' . display('5'); ?>)</span>
                                </a>
                            </span>
                        </label>
                    </div>
                    <div class="checkbox checkbox-success">
                        <input id="rating2" type="checkbox" class="check_value" value="<?php
                        $currentURL = current_url();
                        $params = $_SERVER['QUERY_STRING'];
                        $rate = $this->input->get('rate',TRUE);
                        if ($params) {
                            if ($rate) {
                                $new_param = str_replace("rate=" . $rate, "rate=3-5", $params);
                                echo $fullURL = $currentURL . '?' . $new_param;
                            } else {
                                echo $fullURL = $currentURL . '?' . $params . '&rate=3-5';
                            }
                        } else {
                            echo $fullURL = $currentURL . '?rate=3-5';
                        }
                        ?>" <?php if ($this->input->get('rate',TRUE) == '3-5') {
                            echo("checked");
                        } ?>>
                        <label for="rating2">
                            <span class="product-rating">
                                <span class="star-rating">
                                    <i class="fa fa-star"></i>
                                    <i class="fa fa-star"></i>
                                    <i class="fa fa-star"></i>
                                    <i class="fa fa-star-o"></i>
                                    <i class="fa fa-star-o"></i>
                                </span>
                                <a href="javascript:void(0)" class="review-link">
                                    <span class="count">(<?php echo display('3') . '-' . display('5'); ?>)</span>
                                </a>
                            </span>
                        </label>
                    </div>
                    <div class="checkbox checkbox-success">
                        <input id="rating3" type="checkbox" class="check_value" value="<?php
                        $currentURL = current_url();
                        $params = $_SERVER['QUERY_STRING'];
                        $rate = $this->input->get('rate',TRUE);
                        if ($params) {
                            if ($rate) {
                                $new_param = str_replace("rate=" . $rate, "rate=2-5", $params);
                                echo $fullURL = $currentURL . '?' . $new_param;
                            } else {
                                echo $fullURL = $currentURL . '?' . $params . '&rate=2-5';
                            }
                        } else {
                            echo $fullURL = $currentURL . '?rate=2-5';
                        }
                        ?>" <?php if ($this->input->get('rate',TRUE) == '2-5') {
                            echo("checked");
                        } ?>>
                        <label for="rating3">
                            <span class="product-rating">
                                <span class="star-rating">
                                    <i class="fa fa-star"></i>
                                    <i class="fa fa-star"></i>
                                    <i class="fa fa-star-o"></i>
                                    <i class="fa fa-star-o"></i>
                                    <i class="fa fa-star-o"></i>
                                </span>
                                <a href="javascript:void(0)" class="review-link">
                                    <span class="count">(<?php echo display('2') . '-' . display('5'); ?>)</span>
                                </a>
                            </span>
                        </label>
                    </div>
                    <div class="checkbox checkbox-success">
                        <input id="rating4" type="checkbox" class="check_value" value="<?php
                        $currentURL = current_url();
                        $params = $_SERVER['QUERY_STRING'];
                        $rate = $this->input->get('rate',TRUE);
                        if ($params) {
                            if ($rate) {
                                $new_param = str_replace("rate=" . $rate, "rate=1-5", $params);
                                echo $fullURL = $currentURL . '?' . $new_param;
                            } else {
                                echo $fullURL = $currentURL . '?' . $params . '&rate=1-5';
                            }
                        } else {
                            echo $fullURL = $currentURL . '?rate=1-5';
                        }
                        ?>" <?php if ($this->input->get('rate',TRUE) == '1-5') {
                            echo("checked");
                        } ?>>
                        <label for="rating4">
                            <span class="product-rating">
                                <span class="star-rating">
                                    <i class="fa fa-star"></i>
                                    <i class="fa fa-star-o"></i>
                                    <i class="fa fa-star-o"></i>
                                    <i class="fa fa-star-o"></i>
                                    <i class="fa fa-star-o"></i>
                                </span>
                                <a href="javascript:void(0)" class="review-link">
                                    <span class="count">(<?php echo display('1') . '-' . display('5'); ?>)</span>
                                </a>
                            </span>
                        </label>
                    </div>
                </div>
                <!--  /.End of review rating -->

            </div>
        </div>
    </div>
    <div class="col-sm-9 content">
        <div class="filter-row align-items-center justify-content-between">
            <div class="filter-title">
                <h1><?php echo html_escape($brand_name) . ' - ' ?></h1>
                <span>
                <?php
                echo $item = count($brand_product);
                if ($item <= 0) {
                    echo " " . display('item_found');
                } elseif ($item > 0) {
                    echo " " . display('items');
                }
                ?>
                </span>
            </div>
        </div>
        <!-- /.End of filter summary -->
        <div class="row mr-0 product_slider">
            <?php
            $CI = &get_instance();
            $CI->load->model('web/Categories');
            ?>
            <?php
            $page = !empty($_GET['page']) ? (int)$_GET['page'] : 1;
            $total = count($brand_product); //total items in array
            $limit = 16; //per page
            $totalPages = ceil($total / $limit); //calculate total pages
            $page = max($page, 1); //get 1 page when $_GET['page'] <= 0
            $page = min($page, $totalPages); //get last page when $_GET['page'] > $totalPages
            $offset = ($page - 1) * $limit;
            if ($offset < 0) $offset = 0;

            $brand_product = array_slice($brand_product, $offset, $limit);

            if ($brand_product) {
                foreach ($brand_product as $product) {
                    $select_single_category = $CI->Categories->select_single_category_by_id($product['category_id']);
                    ?>
                    <div class="col-xs-6 col-sm-6 col-lg-3 col-md-4 pr-0">
                        <div class="item boxed mb-16">
                            <div class="item_inner pos-rel">
                                <a href="<?php echo base_url('product_details/' . remove_space($product['product_name']) . '/'
                                    . $product['product_id']) ?>" class="item_title2">
                                    <div class="item_image">
                                        <img src="<?php echo((base_url() . $product['image_thumb']) ? base_url() . $product['image_thumb'] : base_url() . 'my-assets/image/no-image.jpg'); ?>"
                                             alt="product-image">
                                    </div>
                                </a>
                                <div class="item_info text-center">
                                    <a href="<?php echo base_url('category/p/' . remove_space($product['category_name']) . '/'
                                        . $product['category_id']) ?>">
                                        <p class="category-name text-capitalize"><?php echo html_escape($product['category_name']);
                                            ?></p>
                                    </a>
                                    <a href="<?php echo base_url('product_details/' . remove_space($product['product_name']) . '/'
                                        . $product['product_id']) ?>"
                                       class="item_title2"><?php echo html_escape($product['product_name']) ?></a>
                                    <div class="rating_stars">
                                        <div class="rating-wrap m-0-auto">
                                            <?php
                                            $result = $this->db->select('sum(rate) as rates')
                                                ->from('product_review')
                                                ->where('product_id', $product['product_id'])
                                                ->get()
                                                ->row();

                                            $rater = $this->db->select('rate')
                                                ->from('product_review')
                                                ->where('product_id', $product['product_id'])
                                                ->get()
                                                ->num_rows();
                                            if ($result->rates != null) {
                                                $total_rate = $result->rates / $rater;
                                                if (gettype($total_rate) == 'integer') {
                                                    for ($t = 1; $t <= $total_rate; $t++) {
                                                        echo "<i class=\"fa fa-star\"></i>";
                                                    }
                                                    for ($tt = $total_rate; $tt < 5; $tt++) {
                                                        echo "<i class=\"fa fa-star-o\"></i>";
                                                    }
                                                } elseif (gettype($total_rate) == 'double') {
                                                    $pieces = explode(".", $total_rate);
                                                    for ($q = 1; $q <= $pieces[0]; $q++) {
                                                        echo "<i class=\"fa fa-star\"></i>";
                                                        if ($pieces[0] == $q) {
                                                            echo "<i class=\"fa fa-star-half-o\"></i>";
                                                            for ($qq = $pieces[0]; $qq < 4; $qq++) {
                                                                echo "<i class=\"fa fa-star-o\"></i>";
                                                            }
                                                        }
                                                    }

                                                } else {
                                                    for ($w = 0; $w <= 4; $w++) {
                                                        echo "<i class=\"fa fa-star-o\"></i>";
                                                    }
                                                }
                                            } else {
                                                for ($o = 0; $o <= 4; $o++) {
                                                    echo "<i class=\"fa fa-star-o\"></i>";
                                                }
                                            }
                                            ?>
                                        </div>
                                    </div>
                                    <?php
                                    $default_currency_id = $this->session->userdata('currency_id');
                                    $currency_new_id = $this->session->userdata('currency_new_id');

                                    if (empty($currency_new_id)) {
                                        $result = $cur_info = $this->db->select('*')
                                            ->from('currency_info')
                                            ->where('default_status', '1')
                                            ->get()
                                            ->row();
                                        $currency_new_id = $result->currency_id;
                                    }

                                    if (!empty($currency_new_id)) {
                                        $cur_info = $this->db->select('*')
                                            ->from('currency_info')
                                            ->where('currency_id', $currency_new_id)
                                            ->get()
                                            ->row();

                                        $target_con_rate = $cur_info->convertion_rate;
                                        $position1 = $cur_info->currency_position;
                                        $currency1 = $cur_info->currency_icon;
                                    }
                                    ?>
      

                                    <?php
                                    $currency_new_id = $this->session->userdata('currency_new_id');

                                    if (empty($currency_new_id)) {
                                        $result = $cur_info = $this->db->select('*')
                                            ->from('currency_info')
                                            ->where('default_status', '1')
                                            ->get()
                                            ->row();
                                        $currency_new_id = $result->currency_id;
                                    }

                                    if (!empty($currency_new_id)) {
                                        $cur_info = $this->db->select('*')
                                            ->from('currency_info')
                                            ->where('currency_id', $currency_new_id)
                                            ->get()
                                            ->row();

                                        $target_con_rate = $cur_info->convertion_rate;
                                        $position1 = $cur_info->currency_position;
                                        $currency1 = $cur_info->currency_icon;
                                    }
                                    ?>

                                    <?php if ($product['onsale'] == 1 && !empty($product['onsale_price'])) { ?>
                                        <span class="price">
                                        <span class="price-amount">
                                            <ins><span class="amount">
                                            <?php

                                            if ($target_con_rate > 1) {
                                                $price = $product['onsale_price'] * $target_con_rate;
                                                echo(($position1 == 0) ? $currency1 . " " . number_format($price, 2, '.', ',') : number_format($price, 2, '.', ',') . " " . $currency1);
                                            }
                                            if ($target_con_rate <= 1) {
                                                $price = $product['onsale_price'] * $target_con_rate;
                                                echo(($position1 == 0) ? $currency1 . " " . number_format($price, 2, '.', ',') : number_format($price, 2, '.', ',') . " " . $currency1);
                                            }
                                            ?>
                                            </span></ins>
                                            <del><span class="amount">
                                            <?php
                                            if ($target_con_rate > 1) {
                                                $price = $product['price'] * $target_con_rate;
                                                echo(($position1 == 0) ? $currency1 . " " . number_format($price, 2, '.', ',') : number_format($price, 2, '.', ',') . " " . $currency1);
                                            }

                                            if ($target_con_rate <= 1) {
                                                $price = $product['price'] * $target_con_rate;
                                                echo(($position1 == 0) ? $currency1 . " " . number_format($price, 2, '.', ',') : number_format($price, 2, '.', ',') . " " . $currency1);
                                            }
                                            ?>
                                            </span></del>
                                            <span class="amount"> </span>
                                        </span>
                                    </span><!-- /.Price -->
                                        <?php
                                    } else {
                                        ?>
                                        <span class="price">
                                        <span class="price-amount">
                                            <ins><span class="amount">
                                               <?php
                                               if ($target_con_rate > 1) {
                                                   $price = $product['price'] * $target_con_rate;
                                                   echo(($position1 == 0) ? $currency1 . " " . number_format($price, 2, '.', ',') : number_format($price, 2, '.', ',') . " " . $currency1);
                                               }

                                               if ($target_con_rate <= 1) {
                                                   $price = $product['price'] * $target_con_rate;
                                                   echo(($position1 == 0) ? $currency1 . " " . number_format($price, 2, '.', ',') : number_format($price, 2, '.', ',') . " " . $currency1);
                                               }
                                               ?>
                                            </span></ins>
                                            <span class="amount"> </span>
                                        </span>
                                    </span><!-- /.Price -->
                                        <?php
                                    }
                                    ?>
                                    <div class="hover_content">
                                        <ul class="nav">
                                            <li>
                                                <a href="#" class="wishlist"
                                                   name="<?php echo html_escape($product['product_id']); ?>"
                                                   title="<?php echo display('add_to_wishlist') ?>"><i
                                                            class="fa fa-heart"></i></a>
                                            </li>
                                            <li>
                                                <?php if($is_aff){ if($product['is_affiliate'] == 1 ){ ?>
                                                        <a href="<?php echo html_escape($product['affiliate_url']) ?>" target="0" title="<?php echo display('buy_now') ?>" id="affiliate_btn">
                                                            <i class="fa fa-shopping-bag"></i>
                                                        </a>
                                                <?php }else{ ?> 
                                                    <a href="javascript:void(0)" title="<?php echo display('add_to_cart') ?>"
                                                   onclick="add_to_cart_item('<?php echo html_escape($product['product_id']); ?>',  '<?php echo  remove_space($product['product_name']); ?>', '<?php echo html_escape($product['default_variant']); ?>', <?php echo $product['variant_price']; ?>)">
                                                       <i class="fa fa-shopping-bag"></i>
                                                    </a>
                                                <?php } }else{ ?>
                                                    <a href="javascript:void(0)" title="<?php echo display('add_to_cart') ?>"
                                                   onclick="add_to_cart_item('<?php echo html_escape($product['product_id']); ?>',  '<?php echo  remove_space($product['product_name']); ?>', '<?php echo html_escape($product['default_variant']); ?>', <?php echo $product['variant_price']; ?>)">
                                                       <i class="fa fa-shopping-bag"></i>
                                                    </a>
                                                <?php }  ?>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                <?php }
            } ?>
            <?php
            if ($total > 0) {
                ?>
                <div class="col-xs-12 col-sm-12">
                    <div class="pagination-widget">
                        <?php
                        $start = (($page - $total) > 0) ? $page - $total : 1;
                        $end = (($page + $total) < $totalPages) ? $page + $total : $totalPages;

                        $html = '<ul class="pagination">';
                        $class = ($page == 1) ? "disabled" : "";
                        $html .= '<li class="' . $class . '"><a href="?page=' . ($page - 1) . '">⇽</a></li>';

                        if ($start > 1) {
                            $html .= '<li><a href="?page=1">1</a></li>';
                            $html .= '<li class="disabled"><span>...</span></li>';
                        }

                        for ($i = $start; $i <= $end; $i++) {
                            $class = ($page == $i) ? "active" : "";
                            $html .= '<li class="' . $class . '"><a href="?page=' . $i . '">' . $i . '</a></li>';
                        }

                        if ($end < $totalPages) {
                            $html .= '<li class="disabled"><span>...</span></li>';
                            $html .= '<li><a href="?page=' . $totalPages . '">' . $totalPages . '</a></li>';
                        }

                        $class = ($page == $totalPages) ? "disabled" : "";
                        $html .= '<li class="' . $class . '"><a href="?page=' . ($page + 1) . '">⇾</a></li>';

                        echo $html .= '</ul>';
                        ?>
                    </div>
                </div>
                <!-- /.End of pagination -->
                <?php
            }
            ?>
        </div>
    </div>
</div>
</div>
</div>
<!-- /.End of category content -->
<div class="category-mobile">
<div class="mobile-filter-nav align-items-center justify-content-between">

<div class="col-xs-12 filter text-center">
    <button type="button" class="" data-toggle="modal" data-target=".filter-modal"><i class="fa fa-filter"
                                                                                      aria-hidden="true"></i><?php echo display('filter') ?>
    </button>
</div>
</div>
<div class="modal filter-modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
        <!-- /.End of accessories -->
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">×</span>
        </button>
        <div class="sidebar-widget-title">
            <?php
            if ($max_value) {
                ?>
                <div class="price-Pips">
                    <?php echo form_open('', array('id' => 'priceForm1')); ?> 
                        <h3 class="sidebar-title"><?php echo display('by_price') ?></h3>
                        <input type="text" class="price-range" value="price-range" name="price-range"/>
                    <?php echo form_close(); ?>
                </div>
                <?php
            }
            if ($variant_list) {
                ?>
                <div class="product-size">
                    <h3 class="sidebar-title"><?php echo display('by_variant') ?>:</h3>
                    <?php
                    if ($variant_list) {
                        $i = 1;
                        foreach ($variant_list as $variant) {
                            ?>
                            <input type="radio" class="size1" name="size" id="<?php echo $i ?>" value="<?php
                            $currentURL = current_url();
                            $params = $_SERVER['QUERY_STRING'];
                            $size = $this->input->get('size',TRUE);
                            if ($params) {
                                if ($size) {
                                    $new_param = str_replace("size=" . $size, "size=" . $variant['variant_id'], $params);
                                    echo $fullURL = $currentURL . '?' . $new_param;
                                } else {
                                    echo $fullURL = $currentURL . '?' . $params . '&size=' . $variant['variant_id'];
                                }
                            } else {
                                echo $fullURL = $currentURL . '?size=' . $variant['variant_id'];
                            }
                            ?>" <?php if ($size == $variant['variant_id']) {
                                echo "checked";
                            } ?>/>
                            <label for="<?php echo $i ?>"><span
                                        class="size"><?php echo html_escape($variant['variant_name']) ?></span></label>
                            <?php
                            $i++;
                        }
                    }
                    ?>
                </div>
                <!--  /.End of product color selector -->
                <?php
            }
            $lang_id = 0;
            $user_lang = $this->session->userdata('language');
            if (empty($user_lang)) {
                $lang_id = 'english';
            } else {
                $lang_id = $user_lang;
            }
            ?>
            <div class="sidebar-review">
                <h3 class="sidebar-title"><?php echo display('rating') ?>:</h3>
                <div class="checkbox checkbox-success">
                    <input id="rating1" type="checkbox" class="check_value" value="<?php
                    $currentURL = current_url();
                    $params = $_SERVER['QUERY_STRING'];
                    $rate = $this->input->get('rate',TRUE);
                    if ($params) {
                        if ($rate) {
                            $new_param = str_replace("rate=" . $rate, "rate=4-5", $params);
                            echo $fullURL = $currentURL . '?' . $new_param;
                        } else {
                            echo $fullURL = $currentURL . '?' . $params . '&rate=4-5';
                        }
                    } else {
                        echo $fullURL = $currentURL . '?rate=4-5';
                    }
                    ?>" <?php if ($this->input->get('rate',TRUE) == '4-5') {
                        echo("checked");
                    } ?>>
                    <label for="rating1">
                        <span class="product-rating">
                            <span class="star-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-o"></i>
                            </span>
                            <a href="javascript:void(0)" class="review-link">
                                <span class="count">(<?php echo display('4') . '-' . display('5'); ?>)</span>
                            </a>
                        </span>
                    </label>
                </div>
                <div class="checkbox checkbox-success">
                    <input id="rating2" type="checkbox" class="check_value" value="<?php
                    $currentURL = current_url();
                    $params = $_SERVER['QUERY_STRING'];
                    $rate = $this->input->get('rate',TRUE);
                    if ($params) {
                        if ($rate) {
                            $new_param = str_replace("rate=" . $rate, "rate=3-5", $params);
                            echo $fullURL = $currentURL . '?' . $new_param;
                        } else {
                            echo $fullURL = $currentURL . '?' . $params . '&rate=3-5';
                        }
                    } else {
                        echo $fullURL = $currentURL . '?rate=3-5';
                    }
                    ?>" <?php if ($this->input->get('rate',TRUE) == '3-5') {
                        echo("checked");
                    } ?>>
                    <label for="rating2">
                        <span class="product-rating">
                            <span class="star-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-o"></i>
                                <i class="fa fa-star-o"></i>
                            </span>
                            <a href="javascript:void(0)" class="review-link">
                                <span class="count">(<?php echo display('3') . '-' . display('5'); ?>)</span>
                            </a>
                        </span>
                    </label>
                </div>
                <div class="checkbox checkbox-success">
                    <input id="rating3" type="checkbox" class="check_value" value="<?php
                    $currentURL = current_url();
                    $params = $_SERVER['QUERY_STRING'];
                    $rate = $this->input->get('rate',TRUE);
                    if ($params) {
                        if ($rate) {
                            $new_param = str_replace("rate=" . $rate, "rate=2-5", $params);
                            echo $fullURL = $currentURL . '?' . $new_param;
                        } else {
                            echo $fullURL = $currentURL . '?' . $params . '&rate=2-5';
                        }
                    } else {
                        echo $fullURL = $currentURL . '?rate=2-5';
                    }
                    ?>" <?php if ($this->input->get('rate',TRUE) == '2-5') {
                        echo("checked");
                    } ?>>
                    <label for="rating3">
                        <span class="product-rating">
                            <span class="star-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-o"></i>
                                <i class="fa fa-star-o"></i>
                                <i class="fa fa-star-o"></i>
                            </span>
                            <a href="javascript:void(0)" class="review-link">
                                <span class="count">(<?php echo display('2') . '-' . display('5'); ?>)</span>
                            </a>
                        </span>
                    </label>
                </div>
                <div class="checkbox checkbox-success">
                    <input id="rating4" type="checkbox" class="check_value" value="<?php
                    $currentURL = current_url();
                    $params = $_SERVER['QUERY_STRING'];
                    $rate = $this->input->get('rate',TRUE);
                    if ($params) {
                        if ($rate) {
                            $new_param = str_replace("rate=" . $rate, "rate=1-5", $params);
                            echo $fullURL = $currentURL . '?' . $new_param;
                        } else {
                            echo $fullURL = $currentURL . '?' . $params . '&rate=1-5';
                        }
                    } else {
                        echo $fullURL = $currentURL . '?rate=1-5';
                    }
                    ?>" <?php if ($this->input->get('rate',TRUE) == '1-5') {
                        echo("checked");
                    } ?>>
                    <label for="rating4">
                        <span class="product-rating">
                            <span class="star-rating">
                                <i class="fa fa-star"></i>
                                <i class="fa fa-star-o"></i>
                                <i class="fa fa-star-o"></i>
                                <i class="fa fa-star-o"></i>
                                <i class="fa fa-star-o"></i>
                            </span>
                            <a href="javascript:void(0)" class="review-link">
                                <span class="count">(<?php echo display('1') . '-' . display('5'); ?>)</span>
                            </a>
                        </span>
                    </label>
                </div>
            </div>
            <!--  /.End of review rating -->


        </div>
    </div>
</div>
</div>

<ul class="category">
<?php
if ($brand_product) {
    foreach ($brand_product as $product) {
        $select_single_category = $this->Categories->select_single_category_by_id($product['category_id']);
        ?>
        <li class="col-xs-4">
            <div class="product-box">
                <div class="imagebox">
                    <span class="product-cat"><a
                                href="<?php echo base_url('category/p/' . remove_space($select_single_category->category_name) . '/' . $product['category_id']) ?>"><?php echo html_escape($select_single_category->category_name) ?></a></span>
                    <a href="<?php echo base_url('product_details/' . remove_space($product['product_name']) . '/' . $product['product_id']) ?>">
                        <h3 class="product-name"><?php echo html_escape($product['product_name']) ?></h3>
                        <div class="product-thumb">
                            <img src="<?php echo base_url() . $product['image_thumb'] ?>"
                                 data-src="<?php echo base_url() . $product['image_thumb'] ?>" alt="">
                        </div>
                    </a>
                    <span>
                <b>
                <?php
                if ($product['brand_name']) {
                    echo html_escape($product['brand_name']);
                } else {
                    echo html_escape($product['first_name'] . ' ' . $product['last_name']);
                }
                ?>
                </b>
            </span>
                    <div class="price-cart">
                        <?php
                        $currency_new_id = $this->session->userdata('currency_new_id');

                        if (empty($currency_new_id)) {
                            $result = $cur_info = $this->db->select('*')
                                ->from('currency_info')
                                ->where('default_status', '1')
                                ->get()
                                ->row();
                            $currency_new_id = $result->currency_id;
                        }

                        if (!empty($currency_new_id)) {
                            $cur_info = $this->db->select('*')
                                ->from('currency_info')
                                ->where('currency_id', $currency_new_id)
                                ->get()
                                ->row();

                            $target_con_rate = $cur_info->convertion_rate;
                            $position1 = $cur_info->currency_position;
                            $currency1 = $cur_info->currency_icon;
                        }
                        ?>

                        <?php if ($product['onsale'] == 1 && !empty($product['onsale_price'])) { ?>
                            <span class="price">
                    <span class="price-amount">
                        <ins><span class="amount">
                        <?php
                        if ($target_con_rate > 1) {
                            $price = $product['onsale_price'] * $target_con_rate;
                            echo(($position1 == 0) ? $currency1 . " " . number_format($price, 2, '.', ',') : number_format($price, 2, '.', ',') . " " . $currency1);
                        }

                        if ($target_con_rate <= 1) {
                            $price = $product['onsale_price'] * $target_con_rate;
                            echo(($position1 == 0) ? $currency1 . " " . number_format($price, 2, '.', ',') : number_format($price, 2, '.', ',') . " " . $currency1);
                        }
                        ?>
                        </span></ins>
                        <del><span class="amount">
                        <?php
                        if ($target_con_rate > 1) {
                            $price = $product['price'] * $target_con_rate;
                            echo(($position1 == 0) ? $currency1 . " " . number_format($price, 2, '.', ',') : number_format($price, 2, '.', ',') . " " . $currency1);
                        }

                        if ($target_con_rate <= 1) {
                            $price = $product['price'] * $target_con_rate;
                            echo(($position1 == 0) ? $currency1 . " " . number_format($price, 2, '.', ',') : number_format($price, 2, '.', ',') . " " . $currency1);
                        }
                        ?>
                        </span></del>
                        <span class="amount"> </span>
                    </span>
                </span><!-- /.Price -->
                            <?php
                        } else {
                            ?>
                            <span class="price">
                    <span class="price-amount">
                        <ins><span class="amount">
                        <?php
                        if ($target_con_rate > 1) {
                            $price = $product['price'] * $target_con_rate;
                            echo(($position1 == 0) ? $currency1 . " " . number_format($price, 2, '.', ',') : number_format($price, 2, '.', ',') . " " . $currency1);
                        }

                        if ($target_con_rate <= 1) {
                            $price = $product['price'] * $target_con_rate;
                            echo(($position1 == 0) ? $currency1 . " " . number_format($price, 2, '.', ',') : number_format($price, 2, '.', ',') . " " . $currency1);
                        }
                        ?>
                        </span></ins>
                        <span class="amount"> </span>
                    </span>
                </span><!-- /.Price -->
                            <?php
                        }
                        ?>
                        <div class="rating_stars">
                            <div class="rating-wrap">
                                <?php
                                $result = $this->db->select('sum(rate) as rates')
                                    ->from('product_review')
                                    ->where('product_id', $product['product_id'])
                                    ->get()
                                    ->row();

                                $rater = $this->db->select('rate')
                                    ->from('product_review')
                                    ->where('product_id', $product['product_id'])
                                    ->get()
                                    ->num_rows();
                                if ($result->rates != null) {
                                    $total_rate = $result->rates / $rater;
                                    if (gettype($total_rate) == 'integer') {
                                        for ($t = 1; $t <= $total_rate; $t++) {
                                            echo "<i class=\"fa fa-star\"></i>";
                                        }
                                        for ($tt = $total_rate; $tt < 5; $tt++) {
                                            echo "<i class=\"fa fa-star-o\"></i>";
                                        }
                                    } elseif (gettype($total_rate) == 'double') {
                                        $pieces = explode(".", $total_rate);
                                        for ($q = 1; $q <= $pieces[0]; $q++) {
                                            echo "<i class=\"fa fa-star\"></i>";
                                            if ($pieces[0] == $q) {
                                                echo "<i class=\"fa fa-star-half-o\"></i>";
                                                for ($qq = $pieces[0]; $qq < 4; $qq++) {
                                                    echo "<i class=\"fa fa-star-o\"></i>";
                                                }
                                            }
                                        }

                                    } else {
                                        for ($w = 0; $w <= 4; $w++) {
                                            echo "<i class=\"fa fa-star-o\"></i>";
                                        }
                                    }
                                } else {
                                    for ($o = 0; $o <= 4; $o++) {
                                        echo "<i class=\"fa fa-star-o\"></i>";
                                    }
                                }
                                ?>
                            </div>
                            <div class="total-rating">(<?php echo html_escape($rater) ?>)</div>
                        </div><!-- Rating -->
                    </div><!-- /.price-add-to-cart -->
                </div>
            </div>
            <!-- /.End of product box -->
        </li>
        <?php
    }
}
?>
</ul>
<div class="pagination-widget">
<?php
if ($links) {
    ?>
    <div class="col-xs-12 col-sm-12">
        <div class="pagination-widget">
            <?php echo htmlspecialchars_decode($links); ?>
        </div>
    </div>
    <?php
}
?>
</div>
</div>
<input type="hidden" id="min_value" value="<?php echo html_escape($min_value)?>">
<input type="hidden" id="max_value" value="<?php echo html_escape($max_value)?>">
<input type="hidden" id="from_price" value="<?php echo (($from_price == 0)?0:html_escape($from_price))?>">
<input type="hidden" id="to_price" value="<?php echo (($to_price == 0)?100:html_escape($to_price))?>">
<input type="hidden" id="default_currency_icon" value="<?php echo html_escape($default_currency_icon)?>">
<script src="<?php echo THEME_URL.'shatu/assets/ajaxs/brand_product.js'; ?>"></script>

ZeroDay Forums Mini