https://t.me/RX1948
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 :  /var/www/kanvakanva.com/public_html/application/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/kanvakanva.com/public_html/application/views/brand.php
<!-- BEGIN CONTENT PAGE -->
<section class="all-content-page">	
        <!-- Banner Categories -->					
        <div class="baner-top-categories" style="background-image:url('<?=base_url()?>assets/frontend_new/images/banner/11-1.jpg');">
            <div class="categories-text-hero" style="position:unset;padding-top:0;padding-bottom:0;font-size: 15px;">
            <?php if ($brand->image != NULL) : ?>
                <img src="<?= base_url() . 'uploads/brand/' . $brand->image; ?>" alt="banner" style="height:100px;margin-top:30px;margin-bottom:15px;">
            <?php else: ?>
                <h1><?=$brand->brand?></h1>
            <?php endif; ?>
                <?php if (!empty($brand->description)) : ?>     
                    <?= $brand->description; ?>
                <?php endif; ?>
            </div>
        </div>					
        <!-- End Banner Categories -->		
        <div class="container">								
            <!-- Breadcrumbs -->				
            <div class="breadcrumbs">
                <a href="<?=base_url()?>">Home</a>
                <span><?=$brand->brand?></span>
            </div>					
            <!-- End Breadcrumbs -->
            <div class="row">
                <!--/////////////////-->					
                <div class="col-xs-12 col-sm-8 col-md-9 float-r">
                    <div class="content-wrap">
                        <div class="row">								
                            <div class="col-sm-12">
                                <div class="top-shop-view">
                                    <div class="tsv-left">
                                        
                                    </div>
                                    <div class="tsv-right">
                                        <div class="short-wapper">
                                            <?= form_open('brand/' . $brand->alias); ?> 
                                            <select name="sort_product" class="short" onchange="this.form.submit();">
                                                <option value=""
                                                <?php if ($sort_product_by == '') : ?>
                                                selected
                                                <?php endif; ?>
                                                >Sort Products</option>
                                                <option value="price-asc"
                                                <?php if ($sort_product_by == 'price-asc') : ?>
                                                selected
                                                <?php endif; ?>
                                                >Price Low-High</option>
                                                <option value="price-desc"
                                                <?php if ($sort_product_by == 'price-desc') : ?>
                                                selected
                                                <?php endif; ?>
                                                >Price High-Low</option>
                                                <option value="name-asc"
                                                <?php if ($sort_product_by == 'name-asc') : ?>
                                                selected
                                                <?php endif; ?>
                                                >Product Name A-Z</option>
                                                <option value="name-desc"
                                                <?php if ($sort_product_by == 'name-desc') : ?>
                                                selected
                                                <?php endif; ?>
                                                >Product Name Z-A</option>
                                            </select>
                                            <?= form_close(); ?>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <?php foreach ($products as $item) : ?>
                                
                                <?php
                                    //get lowest price
                                    $this->db->select('min(price) as price,min(discounted_price) as discounted_price')
                                    ->from('stocks')->where('product_id', $item->id_products)->where('price !=', 0);
                                    $qprice = $this->db->get();

                                    $lowest_price = $qprice->row()->price;
                                    $lowesr_disc = $qprice->row()->discounted_price;

                                    //get highest price
                                    $this->db->select('max(price) as price,max(discounted_price) as discounted_price')
                                    ->from('stocks')->where('product_id', $item->id_products)->where('price !=', 0);
                                    $qprice = $this->db->get();

                                    $highest_price = $qprice->row()->price;
                                    $highest_disc = $qprice->row()->discounted_price;
                                ?>

                                <div class="col-sm-6 col-md-4 col-xs-6">
                                <div class="item item-cate">
                                    <div class="product-wrap">
                                        <div class="img-products">
                                            <a href="<?= base_url() . 'product/' . $item->alias; ?>">
                                                <?php if ($item->new_arrival == 'yes'): ?>
                                                    <div style="width: 50px;height: 50px;color: white !important;background: #cba884;display: block;line-height: 40px;text-align: center;font-weight: bold;position: absolute;left: 1px;padding-top: 5px;z-index:1;">
                                                    NEW
                                                </div>
                                                <?php endif; ?>
                                                <?php if ($lowesr_disc > 0 || $highest_disc > 0): ?>
                                                    <div style="width: 50px;height: 50px;color: white !important;background: #cba884;display: block;line-height: 40px;text-align: center;font-weight: bold;position: absolute;right: 1px;padding-top: 5px;z-index:1;">
                                                        SALE
                                                    </div>
                                                <?php endif; ?>
                                                <img class="img-responsive image-default" style="width:100%;" src="<?= base_url() . 'uploads/product/small/' . $item->image1; ?>" alt="img">
                                            </a>
                                            <?php if($item->image2 != '' && $item->image2 != null) : ?>
                                            <a class="images-last" href="<?= base_url() . 'product/' . $item->alias; ?>">
                                                <img class="img-responsive image-default" src="<?= base_url() . 'uploads/product/small/' . $item->image2; ?>" alt="img">
                                            </a>
                                            <?php endif; ?>
                                            <?php
                                                //check if item out of stock
                                                $this->db->select('id_stocks')->from('stocks')->where('product_id', $item->id_products)->where('stock !=', 0);
                                                $count_current_stock = $this->db->get()->num_rows();
                                            ?>
                                            <?php if ($count_current_stock == 0): ?>
                                            <?php if ($item->preorder == '0'): ?>
                                                <img id="nostockIcon" src="<?= base_url(
                                                'template/images/outofstock.png'
                                                ) ?>" style="width:auto;bottom: 0px;position: absolute;">
                                            <?php else: ?>
                                                <img id="nostockIcon" src="<?= base_url(
                                                'template/images/preorder.png'
                                                ) ?>" style="width:auto;bottom: 0px;position: absolute;">
                                            <?php endif; ?>
                                            <?php else : ?>
                                            <?php if ($item->preorder == '1'): ?>
                                                <img id="nostockIcon" src="<?= base_url(
                                                'template/images/preorder.png'
                                                ) ?>" style="width:auto;bottom: 0px;position: absolute;">
                                            <?php endif; ?>
                                            <?php endif; ?>
                                        </div>	
                                        <div class="product-des text-align-center margin-top-30">
                                            <h2><a href="<?= base_url() . 'product/' . $item->alias; ?>"><?= ucwords($item->title); ?></a></h2>
                                            <?php
                                                //get brand name
                                                $this->db->select('brand, alias')->from('brands')->where('id_brands', $item->brand_id);
                                                $brand = $this->db->get()->row();
                                            ?>
                                            <a class="f-text-links" href="<?= base_url() . 'brand/' . $brand->alias; ?>"><?= ucwords($brand->brand); ?></a>

                                         
                                            <?php if($lowest_price != 0 && $highest_price != 0 && $lowest_price != $highest_price) : ?>
                                                <span class="mc-price">
                                                    <?php if($lowesr_disc > 0) : ?>
                                                        <ins class="price">IDR <?= number_format($lowesr_disc); ?><ins> 
                                                        <del class="disc_price"><?= number_format($lowest_price); ?></del>
                                                    <?php else: ?>    
                                                        <ins class="price">IDR <?= number_format($lowest_price); ?><ins> 
                                                    <?php endif; ?>
                                                
                                                    - 
                                                    
                                                    <?php if($highest_disc > 0) : ?>
                                                        <ins class="price">IDR <?= number_format($highest_disc); ?><ins> 
                                                        <del class="disc_price"><?= number_format($highest_price); ?></del>
                                                    <?php else: ?>    
                                                        <ins class="price">IDR <?= number_format($highest_price); ?><ins> 
                                                    <?php endif; ?>
                                                </span>
                                            <?php else : ?>
                                                
                                                <?php
                                                    $this->db
                                                    ->select('price,discounted_price')
                                                    ->from('stocks')
                                                    ->where('product_id', $item->id_products)
                                                    ->where('stock !=', 0)
                                                    ->limit(1);
                                                    $cprice = $this->db->get();

                                                    if($cprice->num_rows() > 0) : 
                                                        $price = $cprice->row()->price;   
                                                        $disc_price =  $cprice->row()->discounted_price; 
                                                ?>
                                                        <?php if($disc_price > 0) : ?>
                                                            <span class="mc-price"><ins>IDR <?= number_format($disc_price) ?></ins>&nbsp;<del>IDR <?= number_format($price) ?></del></span>
                                                        <?php else : ?>
                                                            <span class="mc-price"><ins>IDR <?= number_format($price) ?></ins></span>
                                                        <?php endif; ?>
                                                <?php       
                                                    else : 
                                                ?>
                                                    <?php if ($item->discount_price > 0): ?>
                                                    <span class="mc-price"><ins>IDR <?= number_format($item->discount_price) ?></ins>&nbsp;<del>IDR <?= number_format($item->price) ?></del></span>
                                                    <?php else: ?>
                                                    <span class="mc-price"><ins>IDR <?= number_format($item->price) ?></ins></span>
                                                    <?php endif; ?>

                                                <?php endif; ?> 

                                            <?php endif; ?>

                                            <!----- RATING ----->
                                            <?php
                                                $this->db
                                                ->select('floor(AVG(rating)) as rating,count(id_rating) as jum')
                                                ->from('rating')
                                                ->where('item_id', $item->id_products);
                                                $rating = $this->db->get();

                                                if($rating->num_rows() > 0) {
                                                    $jum_rating = $rating->row('jum');
                                                    if($rating->row('rating') == 5){
                                                        echo '
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                        ';
                                                    }
                                                    if($rating->row('rating') == 4){
                                                        echo '
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                        ';
                                                    }
                                                    if($rating->row('rating') == 3){
                                                        echo '
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                        ';
                                                    }
                                                    if($rating->row('rating') == 2){
                                                        echo '
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                        ';
                                                    }
                                                    if($rating->row('rating') == 1){
                                                        echo '
                                                            <span style="color:#cda486;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                        ';
                                                    }
                                                    if($rating->row('rating') == 0){
                                                        echo '
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                            <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                        ';
                                                    }
                                                    echo "<span style='color:#808080;font-size:17px;'>($jum_rating)</span>";
                                                }else{
                                                    echo '
                                                        <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                        <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                        <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                        <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                        <span style="color:#e6e6e6;font-size:17px;">&#9733;</span>
                                                        <span style="color:#808080;font-size:17px;">(0)</span>
                                                    ';
                                                }
                                            ?>
                                            <!----- /RATING ----->

                                        </div>	

                                    </div>
                                </div>
                            </div>
                            
                            <?php endforeach; ?>

                            <!-- page nav -->
                            <!-- <div class="col-md-12">
                                <div class="pag-nav">
                                    <ul>
                                        <li><a href="#"><i class="fa fa-angle-left" aria-hidden="true"></i></a></li>
                                        <li class="active"><a href="#">1</a></li>
                                        <li><a href="#">2</a></li>
                                        <li><a href="#">3</a></li>
                                        <li><a href="#">...</a></li>
                                        <li><a href="#">6</a></li>
                                        <li><a href="#">7</a></li>
                                        <li><a href="#"><i class="fa fa-angle-right" aria-hidden="true"></i></a></li>
                                    </ul>
                                </div>
                            </div> -->
                            <!-- End page nav -->
                        </div>	
                    </div>
                </div>
                <!-- SIDE BAR -->
                <div class="col-xs-12 col-sm-4 col-md-3 float-l">
                    <div class="sidebar-items">	
                        <div class="in-sidebar-item">
                            <h4 class="sidebar-title margin-top-30"><a href="">Brands</a></h4>
                            <ul class="sidebar-list-links">

                            <?php
                                //get all artist or brands
                                $brands = $this->db->select('a.id_brands, a.brand, a.alias,count(b.id_products) as total_product')
                                    ->from('brands a')
                                    ->join('products b','a.id_brands=b.brand_id','left')
                                    ->where('a.status','1')
                                    ->group_by('a.id_brands')
                                    ->order_by('a.brand','ASC')
                                    ->get(); 
                            ?>
                            <?php foreach ($brands->result() as $item) : ?>
                                <li><a href="<?= base_url() . 'brand/' . $item->alias; ?>"><?= $item->brand; ?> <span class="float-r"><?=$item->total_product?></span> </a></li>
                            <?php endforeach; ?>

                            </ul>
                        </div>
                       
                    </div>
                </div>
                <!--/////////////////-->
            </div>
        </div>
    </section>
    <!-- END CONTENT PAGE -->

https://t.me/RX1948 - 2025