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/welcome.php
<!-- BEGIN SLIDER -->
<section class="slider-style slider-style1">		
    <div class="lage-carousel">

        <?php foreach ($home_slideshow as $slideshow): ?>
        <div class="item">
            <div class="sl-wrap">
                <a href="<?= $slideshow->banner_link ?>">
                    <img class="img-responsive" src="<?= base_url() .
                    'uploads/banners/' .
                    $slideshow->image ?>" alt="img">
                </a>			    	
            </div>
        </div>
        <?php endforeach; ?>
		    
    </div>		
</section>
<!-- END SLIDER -->

<!-- BEGIN AVAILABILITY -->
<section class="availability margin-top-80">
    <div class="container availability-display">
        <div class="row">
            <div class="col-sm-4">
                <div class="availability-item">
                    <span class="availability-icon"><i class="fa fa-heart" aria-hidden="true"></i></span>
                    <h3 class="availability-title">Craftsmanship <small>Created with love</small></h3>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="availability-item">
                    <span class="availability-icon"><i class="fa fa-flag" aria-hidden="true"></i></span>
                    <h3 class="availability-title">Locally produced <small>100% made in Indonesia</small></h3>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="availability-item">
                    <span class="availability-icon"><i class="fa fa-tree" aria-hidden="true"></i></span>
                    <h3 class="availability-title">Materials <small>Only the good stuff</small></h3>
                </div>
            </div>
        </div>
    </div>
</section>
<!-- END AVAILABILITY -->

<!-- BEGIN NEW ARRIVALS -->
<section class="newarrivals margin-top-80">
    <div class="container">			
        <h3 class="title-product-box">New Arrivals<small>The Latest Home Goods to Shop</small></h3>			
        
        <div class="row margin-top-50">
            <?php foreach ($new_products as $item): ?>

                <?php
                    $this->db
                    ->select('price,discounted_price')
                    ->from('stocks')
                    ->where('product_id', $item->id_products)
                    ->where('stock !=', 0)
                    ->limit(1);
                    $cprice = $this->db->get();

                    $disc_price = 0;
                    if($cprice->num_rows() > 0) : 
                        if($cprice->row()->discounted_price > 0):
                            $disc_price = $cprice->row()->discounted_price;  
                        endif;
                    else:
                        if($item->discount_price > 0) :
                            $disc_price = $item->discount_price;
                        endif;
                    endif;
                ?>

                <div class="col-lg-3 col-md-3 col-sm-4 col-xs-6">
                    <div class="item">
                        <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: grey;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 ($disc_price > 0): ?>
                                        <div style="width: 50px;height: 50px;color: white !important;background: grey;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" style="width:100%" src="<?= base_url() .
                                    'uploads/product/small/' .
                                    $item->image1 ?>" alt="img">
                                    
                                <?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: 0;position: absolute;">
                                    <?php else: ?>
                                        <img id="nostockIcon" src="<?= base_url(
                                        'template/images/preorder.png'
                                        ) ?>" style="width:auto;bottom: 0;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: 0;position: absolute;">
                                    <?php endif; ?>
                                <?php endif; ?>

                                </a>	
                            </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
                                    $this->db
                                    ->select('brand, alias')
                                    ->from('brands')
                                    ->where('id_brands', $item->brand_id);
                                    $brand = $this->db->get()->row();
                                ?>

                                <a class="f-text-links" style="border:unset;" href="<?= base_url() .
                                    'brand/' .
                                    $brand->alias ?>"><?= ucwords(
                                $brand->brand
                                ) ?></a>


                                <?php
                                    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; ?>

                                <!----- 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; ?>    
        </div>
        <div class="row margin-top-10">
            <div class="col-md-12">
                <div class="loadmore-section">
                    <a href="<?=base_url()?>category/NEW" class="load-more-a"><i class="fa fa-refresh" aria-hidden="true"></i> Load more</a>
                </div>
            </div>
        </div>
        
    </div>
</section>
<!-- END NEW ARRIVALS -->

<!-- BEGIN COUNTDOWN TIMER -->
<?php if($sale_product->num_rows() > 0) : ?>

<section class="countdown-timer margin-top-80">
    <div class="container">	
        <div class="row">
            <div class="col-sm-4">
                <div class="ct-producst-left">
                    <?php
                        $products_sale = $sale_product->row();

                        $price = $products_sale->price;
                        $discount_price = $products_sale->discount_price;
                        $count = $price - $discount_price;
                        $count_percent = ($count/$price)*100;
                    ?>
                    <span class="ct-product-sale" style="margin-left:10px;">-<?= ceil($count_percent) ?><sup>%</sup></span>
                    <img class="width-100" src="<?= base_url() .
                                                    'uploads/product/large/' .
                                                    $products_sale->image1 ?>" alt="<?= $products_sale->alias ?>">
                    <div class="ct-product-prices-wrap" style="margin-right:10px;">
                        <span class="ct-product-sp">Special Price</span>
                        <span class="ct-product-prices"><ins>IDR <?= number_format($products_sale->discount_price) ?></ins><del>IDR <?= number_format($products_sale->price) ?></del></span>
                    </div>
                </div>
            </div>
            <div class="col-sm-8">
                <div class="ct-product-right">
                    <h2 class="ct-product-title"><?= ucwords($products_sale->title) ?></h2>
                    <p class="ct-product-des margin-top-50"><?= $products_sale->description ?></p>

                    <div class="clock-wrap margin-top-50">
                        <div id="clockdiv">
                            <div>
                                <span class="days"></span>
                                <div class="smalltext">Days</div>
                            </div>
                            <div>
                                <span class="hours"></span>
                                <div class="smalltext">Hours</div>
                            </div>
                            <div>
                                <span class="minutes"></span>
                                <div class="smalltext">Mins</div>
                            </div>
                            <div>
                                <span class="seconds"></span>
                                <div class="smalltext">Secs</div>
                            </div>
                        </div>
                    </div>
                    <div class="button-countdown margin-top-50">
                        <a class="btn-shopnow" href="<?= base_url() . 'product/' . $products_sale->alias ?>">Shop now</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<?php endif; ?>
<!-- END COUNTDOWN TIMER -->

<!-- BEGIN BANNER AD 1 -->
<?php if($promo->banner1 != '') : ?>
<section class="margin-top-80">
    <div class="container">	
        <div class="banner-ads">
            <?php if($promo->link1 != '' && $promo->link1 != null) : 
                $link = $promo->link1;
                if (strpos($link, 'http://') == false  && strpos($link, 'https://') == false && strpos($link, 'https//') !== false) { 
                    $link = 'https://'.$link;
                }
                if (strpos($link, 'http//') !== false){
                    $link = strreplace('http//','http://',$link);
                }
            ?>
                <a href="<?=$link?>" target="_blank" class="ad-opacity"><img src="<?= base_url() . 'uploads/promotion/' . $promo->banner1; ?>" alt="banner"></a>
            <?php else: ?>
                <a href="<?=base_url()?>first-promo" class="ad-opacity"><img src="<?= base_url() . 'uploads/promotion/' . $promo->banner1; ?>" alt="banner"></a>
            <?php endif;?>
        </div>
    </div>
</section>
<?php endif; ?>
<!-- END BANNER AD 1 -->	

<!-- BEGIN BEST SALE -->
<section class="newarrivals margin-top-80">
    <div class="container">			
        <h3 class="title-product-box">Pick of the month<small>The Best Sales to Shop</small></h3>			
        
        <div class="row margin-top-50">
            <?php foreach ($best_sale as $item): ?>

                <?php
                    $this->db
                    ->select('price,discounted_price')
                    ->from('stocks')
                    ->where('product_id', $item->id_products)
                    ->where('stock !=', 0)
                    ->limit(1);
                    $cprice = $this->db->get();

                    $disc_price = 0;
                    if($cprice->num_rows() > 0) : 
                        if($cprice->row()->discounted_price > 0):
                            $disc_price = $cprice->row()->discounted_price;  
                        endif;
                    else:
                        if($item->discount_price > 0) :
                            $disc_price = $item->discount_price;
                        endif;
                    endif;
                ?>

                <div class="col-lg-3 col-md-3 col-sm-4 col-xs-6">
                    <div class="item">
                        <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: grey;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 ($disc_price > 0): ?>
                                        <div style="width: 50px;height: 50px;color: white !important;background: grey;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" style="width:100%;" src="<?= base_url() .
                                    'uploads/product/small/' .
                                    $item->image1 ?>" alt="img">
                                    
                                <?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: 0;position: absolute;">
                                    <?php else: ?>
                                        <img id="nostockIcon" src="<?= base_url(
                                        'template/images/preorder.png'
                                        ) ?>" style="width:auto;bottom: 0;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: 0;position: absolute;">
                                    <?php endif; ?>
                                <?php endif; ?>

                                </a>
                            </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
                                    $this->db
                                    ->select('brand, alias')
                                    ->from('brands')
                                    ->where('id_brands', $item->brand_id);
                                    $brand = $this->db->get()->row();
                                ?>

                                <a class="f-text-links" style="border:unset;" href="<?= base_url() .
                                    'brand/' .
                                    $brand->alias ?>"><?= ucwords(
                                $brand->brand
                                ) ?></a>
                                

                                <?php

                                    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; ?>  

                                <!----- 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; ?> 
        </div>

    </div>
</section>
<!-- END BEST SALE -->

<!-- BEGIN HERO BANNER AD -->
<?php if($promo->banner2 != '') : ?>
<section class="margin-top-80">
    <div class="container">
        <div class="hero-ad-wrap">
            <div class="row">				
                <div class="col-sm-6">
                    <div class="hero-ad-texts">
                        <h3><?=$promo->title?> 
                            <?php if($promo->discount > 0) : ?>
                                <span><?=$promo->discount?> <sup>%</sup></span>
                            <?php endif; ?>
                        </h3>
                        <p class="margin-top-20"><?=$promo->description?></p>

                        <?php if($promo->link2 != '' && $promo->link2 != null) : 
                            $link = $promo->link2;
                            if (strpos($link, 'http://') == false  && strpos($link, 'https://') == false && strpos($link, 'https//') !== false) { 
                                $link = 'https://'.$link;
                            }
                            if (strpos($link, 'http//') !== false){
                                $link = strreplace('http//','http://',$link);
                            }
                        ?>
                            <a href="<?=$link?>" target="_blank" class="btn-right margin-top-50"><i class="fa fa-long-arrow-right" aria-hidden="true"></i></a>
                        <?php else: ?>
                            <a href="<?=base_url()?>second-promo" class="btn-right margin-top-50"><i class="fa fa-long-arrow-right" aria-hidden="true"></i></a>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="col-sm-6">
                    <a href="<?=base_url()?>second-promo" class="ad-border"><img class="width-100" src="<?= base_url() . 'uploads/promotion/' . $promo->banner2; ?>" alt="banner"></a>
                </div>
            </div>
        </div>
    </div>
</section>
<?php endif; ?>
<!-- END HERO BANNER AD -->

<!-- BEGIN FORM OUT BLOG -->
<section class="blogs-wrap margin-top-80">
    <div class="container">			
        <h3 class="title-product-box">FROM OUR BLOG<small>
            Read The Latest Update From Us</small></h3>			
        <div class="slider-products margin-top-50">
            <div class="slider-blogs slider-dot btrend-carousel">
                
                <?php foreach ($blogs as $blog): ?>

                    <div class="item">
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="slider-blogs-left">
                                    <a class="ad-border" style="height: 270px;" href="<?= base_url() . 'blog/get/' . $blog->alias; ?>">
                                        <img src="<?= base_url() . 'uploads/blog/' . $blog->image1; ?>" alt="<?= $blog->alias; ?>">
                                    </a>
                                    <?php
                                        $rev_date = explode('-',$blog->publish_date);
                                        $bln_blog = getBulan($rev_date[1]);
                                    ?>
                                    <div class="blogs-date-label"><span><?= $rev_date[2] ?></span><small><?= $bln_blog ?></small></div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="slider-blogs-right">
                                    <h3><a href="<?= base_url() . 'blog/get/' . $blog->alias; ?>"><?= $blog->blog; ?></a></h3>	
                                    <?php
                                        $content_blog = strip_tags($blog->description);
                                        $content_blog = limit_text($content_blog,20);
                                    ?>
                                    <p><?= $content_blog ?></p>
                                    <a href="<?= base_url() . 'blog/get/' . $blog->alias; ?>" class="slider-blogs-readmore">Read More</a>
                                </div>
                            </div>
                        </div>
                    </div>

                <?php endforeach; ?>

            </div>	
        </div>
    </div>
</section>
<!-- END FORM OUT BLOG -->

<!-- BEGIN SLIDER CLIENT -->
<section class="section-client">
<?php 
    $this->db->select('*')->from('brands')
    ->where("image is not null and image<>''")->order_by('brand', 'ASC');
    $qbrand = $this->db->get();
    if($qbrand->num_rows() > 0) :
?>
    <div class="container">
        <div class="slider-client-wrap">
            <div class="slider-client btrend-carousel">	
                <?php
                    foreach ($qbrand->result() as $brand) : 
                ?>
                    <div>
                        <img src="<?=base_url()?>uploads/brand/<?=$brand->image?>" alt="<?=$brand->brand?>">
                    </div>
                <?php endforeach; ?>
            </div>
        </div>
    </div>
<?php endif; ?>
</section>
<!-- END SLIDER CLIENT -->	

<!-- BEGIN SUBSCRIBE -->
<section class="section-subscribe margin-top-20">
    <div class="container">
        <h3 class="title-product-box" style="color:#f0f0f0">Subscribe<small style="color:#f0f0f0">Subscribe to the Kanva Home & Living mailing list to receive updates on new arrivals, <br>
special offers and other discount information.</small></h3>	
        <div class="row margin-top-80">
            <div class="col-sm-6 col-sm-offset-3">
                <form action="https://kanvakanva.us12.list-manage.com/subscribe/post?u=1b917e16290975f287caa578c&amp;id=123d20e4aa" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="form-subscribe">
                    <input type="email" value="" name="EMAIL" id="mce-EMAIL" placeholder="Enter address email" require>
                    <button type="submit"><i class="fa fa-send" aria-hidden="true"></i></button>
                </form>

            </div>
        </div>
    </div>
</section>
<!-- END SUBSCRIBE -->

<!-- BEGIN TESTIMONIAL -->
<?php if (count($testimonies) > 0): ?>

<section class="section-testimonial margin-top-80">
    <div class="container">
        <div class="slider-testimonial-wrap">
            <div class="slider-testimonial slider-dot btrend-carousel">	

            <?php foreach ($testimonies as $testimony): ?>
                <div>
                    <div class="row">
                        <div class="col-sm-6 col-sm-offset-3">
                            <div class="item-testimonial-content">
                                <div class="item-testimonial-img">
                                    <img src="<?= base_url() .
                                        'uploads/' .
                                        $testimony->image ?>" alt="avatar">
                                </div>
                                <div class="item-testimonial-text margin-top-50">
                                    <h4><?= ucwords($testimony->name) ?></h4>
                                    <p class="testi-quos"><?= $testimony->testimony ?></p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            <?php endforeach; ?>

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

<?php endif; ?>
<!-- END TESTIMONIAL -->

<?php
//get popupbanner parameters...
$this->db
  ->select('popup_image, popup_text, popup_active')
  ->from('home_centerbanners')
  ->where('id_home_centerbanners', 1);
$popup = $this->db->get()->row();
?>
<script>
	//disable submit button after submit, to prevent double submit
	$(document).ready(function () {
		$(".bottom_modal").click(function () {
			setTimeout(function () { disableButton(); }, 0);
		});
		function disableButton() {
			$(".bottom_modal").prop('disabled', true);
		}
	});
</script>

<style type="text/css">
  /* Extra small devices (phones, 600px and down) */
  @media only screen and (max-width: 600px) {
    .image_bg {
      width: 100%;
      height: auto;
    }
  }

  /* Small devices (portrait tablets and large phones, 600px and up) */
  @media only screen and (min-width: 600px) {
    .image_bg {
      width: 100%;
      height: auto;
    }
  }

  /* Medium devices (landscape tablets, 768px and up) */
  @media only screen and (min-width: 768px) {
    .image_bg {
      width: 100%;
      height: auto;
    }
  }

  /* Large devices (laptops/desktops, 992px and up) */
  @media only screen and (min-width: 992px) {
    .image_bg {
      width: 800px;
      height: 500px;
    }
  }

  /* Extra large devices (large laptops and desktops, 1200px and up) */
  @media only screen and (min-width: 1200px) {
    .image_bg {
      width: 800px;
      height: 500px;
    }
  }
.modal-dialog {
  display: block;
  margin-left: auto;
  margin-right: auto;
  top:50% !important;
  transform: translate(0, -50%) !important;
  -ms-transform: translate(0, -50%) !important;
  -webkit-transform: translate(0, -50%) !important;
  margin:auto;
}
#newsLetter {
    position: absolute;
}
#newsLetterInput {
  border:none;
  width:250px;
  padding:10px;
}

#newsletterButton {
  padding:10px;
  border:none;
  background:#a4684e;
  color:white;
}

#newsletterReject {
  margin-top:2rem;
}

@media  (max-width:600px) {
  #newsLetter {
    bottom:10px; right:50px;
  }
  #newsLetterInput {
    border:none;
    width:60%;
    padding:5px;
  }
  #newsletterButton {
    padding:5px;
  }
  #newsletterReject {
    margin-top:0.3rem;
  }
}

@media  (min-width:601px) and (max-width:768px) {
  #newsLetter {
    bottom:60px; right:150px;
  }
}

@media (min-width:769px) and (max-width:899px) {
  #newsLetter {
    bottom:60px; right:70px;
  }
}

@media (min-width:900px) and (max-width:1199px) {
  #newsLetter {
    bottom:60px; right:70px;
  }
}

@media (min-width:1200px) {
  #newsLetter {
    bottom:60px; right:65px;
  }

  .newsletterReject2 {
    position:absolute; bottom:30px; right: 110px;
  }
}
</style>

<?php if ($popup_voucher->active == "yes"): ?>
<div class="modal fade" id="myModal_voucher">
  <div class="modal-dialog image_bg">
    <div class="modal-content" style="position:relative;">
      <button class="close close_voucher" data-dismiss="modal" style="padding: 10px; position: absolute; right:10px;"><span>&times;</span></button>
      <img src="<?= base_url() .
        'uploads/popup_voucher/img/' .
        $popup_voucher->img_banner ?>" class ="image_bg">
      <?php if ($popup_voucher->email_input == "yes"): ?>
        <div id="newsLetter" style="text-align:center">
            
            <?php if (
              $this->session->userdata('already_subscribe') &&
              $this->session->userdata('already_subscribe') == 'yes'
            ): ?>
              <div id="vouchercodeResult">
                <h1>Your Code: <span id="voucherCode"><?= $popup_voucher->voucher_code ?></span> <button class="btn btn-default" onclick="copy()" title="Copy voucher code">
                    <i class="fa fa-copy"></i>
                  </button></h1>
                <a id="newsletterReject" data-dismiss="modal" href="#" style="text-decoration:underline; display:inline-block;">Close and dont show again.</a>  
                <script>
                  function copy() {
                    var copyText = document.getElementById("voucherCode");
                    var textArea = document.createElement("textarea");
                    textArea.value = copyText.textContent;
                    document.body.appendChild(textArea);
                    textArea.select();
                    document.execCommand("Copy");
                    textArea.remove();
                  }
                </script>
              </div>
            <?php else: ?>      
              <div id="newsletterForm" >
                <?= form_open('welcome/submit') ?>
                  <input id="newsLetterInput" type="email" name="email" placeholder="Put Your Email Here" required>
                  <button id="newsletterButton" type="submit" title="Submit">
                    SUBSCRIBE
                  </button>
                <?= form_close() ?>
                <a id="newsletterReject" data-dismiss="modal" href="#" style="text-decoration:underline; display:inline-block;">No Thanks. I dont like gifts.</a>
              </div>
            <?php endif; ?>  
        </div>    
      <?php else: ?>
        <a id="newsletterReject" class="newsletterReject2" data-dismiss="modal" href="#" style="text-decoration:underline; display:inline-block;">Dont show again.</a>
      <?php endif; ?>
    </div>
  </div>
</div>
<script>
$(document).ready(function() {
  if(!localStorage.getItem('newsletterActive')) {
    $("#myModal_voucher").modal("show");
  } 
});

const newsletterReject = document.getElementById('newsletterReject');

newsletterReject.addEventListener("click", (e) => {
  e.preventDefault();
  //add localstorage
  localStorage.setItem('newsletterActive', 'yes');  
}); 

</script>
<?php endif;
?>

https://t.me/RX1948 - 2025