<?php defined('BASEPATH') OR exit('No direct script access allowed');
$this->load->view('top');
?>
<div class="home_slider">
    <div id="slider" class="owl-carousel">
        <?php
        $sn = 0;
        foreach ($banner as $key => $value) {
            ?>

            <div class="slide">
                <?php echo ($value['banner_url'] != '') ? '<a href="' . $value['banner_url'] . '" title="' . $value['banner_title'] . '">' : ''; ?>
                <img src="<?php echo get_image('banner', $value['banner_image'], '', '', 'R'); ?>" alt="<?php echo imagealtTitle('', $value['banner_title'], ''); ?>" title="<?php echo imagealtTitle('', $value['banner_title'], ''); ?>">
            <?php echo ($value['banner_url'] != '') ? '</a>' : ''; ?>
            </div>
            <?php
            $sn++;
        }
        ?>
    </div>
</div>
<div class="offer_section">
    <div class="container">
        <ul class="FreeInsllation">
            <li><span>FREE DELIVERY &amp; Installation</span>
                Across all major cities
            </li>
            <li><span>GOOD QUALITY PRODUCTS</span>
                Made with latest technology</li>
            <li><span>LARGE DISTRIBUTION NETWORK</span>
                Team across India
            </li>
        </ul>
    </div>
</div>
<section class="text_desc bottom_div">
    <div class="container wow fadeInUp home" data-wow-delay=".2s">
        <!-- <h1><?php echo $homeHeading; ?></h1> -->
<?php echo $home; ?>
    </div>
</section>

<?php if (is_array($home_cat1) && !empty($home_cat1)) { ?>
    <section class="category_section">
        <div class="container">
            <div class="title_catgeory text-center wow zoomIn" data-wow-delay=".1s">
                <div class="content_title"> TOP QUALITY Categories</div>               
            </div>

            <div class="row">
                <div class="col-lg-12 col-md-12">
                    <div id="quality" class="owl-carousel">
    <?php foreach ($home_cat1 as $val) { ?>
                            <div class="item">
                                <div class="wow fadeInUp" data-wow-delay=".2s">
                                    <div class="catagory_box">
                                        <a href="<?= site_url($val['friendly_url']); ?>" title="<?php echo imagealtTitle('', $val['category_name'], ''); ?>">
                                            <div class="category_image">
                                                <img src="<?php echo get_image_with_name($val['category_name'], 'category', $val['category_image'], '400', '400', 'R'); ?>" alt="<?php echo imagealtTitle('', $val['category_name'], ''); ?>" title="<?php echo imagealtTitle('', $val['category_name'], ''); ?>">
                                            </div>
                                            <div class="category_content">
                                                <div class="tt"><span><?php echo $val['category_name']; ?></span></div>
                                            </div>
                                        </a>
                                    </div>
                                </div>
                            </div>
    <?php } ?>                 
                    </div>
                    <div class="text-center">
                        <a class="content_link" href="<?php echo site_url(); ?>our-products">View All</a>
                    </div>
                </div>
            </div>
        </div>
    </section>
<?php } ?>
<section class="top_selling_products">
    <div class="container">
        <div class="title wow zoomIn" data-wow-delay=".1s">Top Selling Products</div>
<?php if (is_array($new_products) && !empty($new_products)) { ?>
            <div class="row">
                <div class="col-lg-12 col-md-12">
                    <div id="popular" class="owl-carousel">
    <?php foreach ($new_products as $val) { ?>
                            <div class="top_product wow fadeInUp" data-wow-delay=".2s">
                                <a href="<?php echo base_url($val['friendly_url']); ?>" title="<?php echo $val['product_name']; ?>">
                                    <div class="top_product_image">
                                        <div class="image">
                                            <img src="<?php echo get_image_with_name($val['product_name'], 'products', $val['media'], '400', '400', 'R'); ?>" alt="<?php echo $val['product_name']; ?>" title="<?php echo $val['product_name']; ?>"> 
                                        </div>
                                    </div>

                                    <div class="top_product_title">
                                        <div class="tt"><?php echo char_limiter($val['product_name'], 40); ?></div>
                                    </div>
                                </a>
                            </div>
    <?php } ?>

                    </div>
                </div>
            </div>
<?php } ?>
        <div class="text-center">
            <a class="content_link" href="<?php echo site_url(); ?>our-products">View All</a>
        </div>

    </div>
</section>

<?php if (is_array($home_cat) && !empty($home_cat)) { ?>    
    <section class="category_section">
        <div class="container">
            <div class="title_catgeory text-center wow zoomIn" data-wow-delay=".1s">
                <div class="title">Shop By Categories</div>
                <br>
            </div>
            <div class="row">
    <?php foreach ($home_cat as $val) { ?>
                    <div class="col-lg-3 col-md-3">
                        <div class="catagory_box">
                            <a href="<?= site_url($val['friendly_url']); ?>" title="<?php echo imagealtTitle('', $val['category_name'], ''); ?>">
                                <div class="category_image">
                                    <img src="<?php echo get_image_with_name($val['category_name'], 'category', $val['category_image'], '400', '400', 'R'); ?>" alt="<?php echo imagealtTitle('', $val['category_name'], ''); ?>" title="<?php echo imagealtTitle('', $val['category_name'], ''); ?>">
                                </div>
                                <div class="category_content">
                                    <span style="text-align:center;color:#000;display:block;"><?php echo $val['category_name']; ?></span>
                                </div>
                            </a>
                        </div>
                    </div>
    <?php } ?>

            </div>

        </div>
    </section>
<?php } ?>

<section class="category_collection_1">
    <div class="container">
        <div class="row">
            <div class="col-lg-6 col-md-12 col-sm-10">
                <div class="cat-banner-item banner-animation">
                    <div class="thumb">
                        <a href="<?php echo site_url(); ?><?= $bottomBanner1['banner_url']; ?>"><img src="<?php echo get_image('banner', $bottomBanner1['banner_image'], '570', '524', 'R'); ?>" alt=""></a>
                    </div>
                    <div class="content left_image_1">
                        <span>NEW COLLECTION</span>
                        <div class="tt"><a href="<?php echo site_url(); ?><?= $bottomBanner1['banner_url']; ?>"><?php echo $bottomBanner1['banner_title']; ?></a></div>
                        <a href="<?php echo site_url(); ?><?= $bottomBanner1['banner_url']; ?>" class="btn">View More</a>
                    </div>
                </div>
            </div>
            <div class="col-lg-6 col-md-12 col-sm-10 col-xs-12">
                <div class="row">
                    <div class="col-md-6 col-xs-12">
                        <div class="cat-banner-item banner-animation">
                            <div class="thumb">
                                <img src="<?php echo get_image('banner', $bottomBanner2['banner_image'], '400', '400', 'R'); ?>" alt="<?php echo imagealtTitle('', ucwords(strtolower($bottomBanner2['banner_title'])), ''); ?>" title="<?php echo imagealtTitle('', ucwords(strtolower($bottomBanner2['banner_title'])), ''); ?>">
                            </div>
                            <div class="content">
                                <span>NEW COLLECTION</span>
                                <div class="tt"><a href="<?php echo site_url(); ?><?= $bottomBanner2['banner_url']; ?>"><?php echo $bottomBanner2['banner_title']; ?></a></div>
                                <a href="<?php echo site_url(); ?><?= $bottomBanner2['banner_url']; ?>" class="btn">View More</a>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6 col-xs-12">
                        <div class="cat-banner-item banner-animation">
                            <div class="thumb">
                                <a href="<?php echo site_url(); ?><?= $bottomBanner3['banner_url']; ?>"><img src="<?php echo get_image('banner', $bottomBanner3['banner_image'], '400', '400', 'R'); ?>" alt=""></a>
                            </div>
                            <div class="content">
                                <span>NEW COLLECTION</span>
                                <div class="tt"><a href="<?php echo site_url(); ?><?= $bottomBanner3['banner_url']; ?>"><?php echo $bottomBanner3['banner_title']; ?></a></div>
                                <a href="<?php echo site_url(); ?><?= $bottomBanner3['banner_url']; ?>" class="btn">View More</a>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-12 col-xs-12">
                        <div class="cat-banner-item style-two banner-animation">
                            <div class="thumb">
                                <a href="<?php echo site_url(); ?><?= $bottomBanner4['banner_url']; ?>">
                                    <img src="<?php echo get_image('banner', $bottomBanner4['banner_image'], '870', '390', 'R'); ?>" alt=""></a>
                            </div>
                            <div class="content">
                                <span>NEW COLLECTION</span>
                                <div class="tt"><a href="<?php echo site_url(); ?><?= $bottomBanner4['banner_url']; ?>"><?php echo $bottomBanner4['banner_title']; ?></a></div>
                                <a href="<?php echo site_url(); ?><?= $bottomBanner4['banner_url']; ?>" class="btn">View More</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<?php if (is_array($middlebanner1) && !empty($middlebanner1)) { ?>
    <div class="banner_section">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <a href="<?php echo site_url(); ?><?php echo $middlebanner1['banner_url']; ?>" title="<?php echo imagealtTitle('', $middlebanner1['banner_title'], ''); ?>">

                        <div class="banner_1" style="background-image: url(<?php echo get_image('banner', $middlebanner1['banner_image'], '', '', 'R'); ?>);">
                            <div class="row">
                                <div class="col-lg-6 col-md-6 col-lg-push-6 col-md-push-6">
                                    <div class="banner_content">
                                        <p class="normal-text">Custom-Made</p>
                                        <p class="color-text">Mother & Infants Wrist Bands</p>
                                        <p class="underline-text">Ensure Safety & Security of Your New-Born Baby</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                </div>
            </div>
        </div>
    </div>
<?php } ?>

<section class="trendy_section">
    <div class="container">
        <div class="title wow zoomIn animated" data-wow-delay=".1s">MOST TRUSTED AND LEADING Products</div>
        <div class="row">
            <div class="col-lg-12 col-md-12">
                <div id="trendy" class="owl-carousel">
<?php foreach ($new_products as $val) { ?>
                                    <div class="top_product wow fadeInUp" data-wow-delay=".3s">
                                        <a href="<?php echo base_url($val['friendly_url']); ?>" title="<?php echo imagealtTitle('', ucwords(strtolower($val['product_name'])), ''); ?>">
                                            <div class="top_product_image">
                                                <div class="image">
                                                    <img src="<?php echo get_image('products', $val['media'], 400, 400, 'AR'); ?>" alt="<?php echo imagealtTitle('', ucwords(strtolower($val['product_name'])), ''); ?>">
                                                </div>
                                            </div>
                                            <div class="top_product_title">
                                                <h4 class="tt"><?php echo char_limiter($val['product_name'], 40); ?></h4>
                                            </div>
                                        </a>
                                    </div>
<?php } ?>
                    </div>
                </div>
            </div>
        </div>

</section>




<!-- <?php if (count($blogs) > 0) { ?>
    <section class="home_blog">
        <div class="container">
            <h2 class="title wow zoomIn animated" data-wow-delay=".1s" style="visibility: visible; animation-delay: 0.1s; animation-name: zoomIn;">Latest Blogs</h2>
            <div class="row">

    <?php foreach ($blogs as $val) { ?>
                    <div class="col-lg-4 col-md-6 col-sm-9 home_blog_item">
                        <div class="blog-post-item">
                            <a href="<?= site_url($val['friendly_url']); ?>">
                                <div class="blog-post-thumb">
                                    <img style="width: 100%;" src="<?php echo get_image('blog', $val['article_image'], '400', '290', 'R'); ?>" alt="<?= $val['article_title']; ?>" title="<?= $val['article_title']; ?>">
                                </div>
                                <div class="blog-post-content">
                                    <h3><span><?= $val['article_title']; ?></span></h3>
                                    <div class="blog-post-meta">
                                        <ul>
                                            <li><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" class="bi bi-person" viewBox="0 0 16 16"><path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4zm-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332-.678.678-.83 1.418-.832 1.664h10z"></path></svg> <?= $val['blog_author']; ?></li>
                                            <li><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" viewBox="0 0 16 16"><path d="M11 6.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1zm-3 0a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1zm-5 3a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1zm3 0a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1z"></path><path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"></path></svg> <?php echo getDateFormat($val['post_date'], 3); ?></li>
                                            <li class="read-more"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M3.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L9.293 8 3.646 2.354a.5.5 0 0 1 0-.708z"></path><path fill-rule="evenodd" d="M7.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L13.293 8 7.646 2.354a.5.5 0 0 1 0-.708z"></path></svg></li>
                                        </ul>
                                    </div>
                                </div>
                            </a>
                        </div>
                    </div>
    <?php } ?>

            </div>
        </div>
    </section>
<?php } ?> -->


<?php if (is_array($gallery) && !empty($gallery)) { ?>
    <section class="home-gallery-area">
        <div class="container"> 
            <div class="title wow zoomIn animated" data-wow-delay=".1s" style="visibility: visible; animation-delay: 0.1s; animation-name: zoomIn;">Photo Gallery </div>
            <div id="gallery-photo" class="owl-carousel home-gallery">
    <?php foreach ($gallery as $value) { ?>
                    <div class="item">
                        <div class="portfolio_block">
                            <a href="<?php echo get_image_with_name($value['gallery_name'], 'gallery', $value['gallery_image'], '', '', 'R'); ?>" data-fancybox="gallery" title="<?php echo $value['gallery_name']; ?>" data-caption="<?php echo $value['gallery_name']; ?>">
                                <div class="image-box">
                                    <figure class="image">
                                        <img src="<?php echo get_image_with_name($value['gallery_name'], 'gallery', $value['gallery_image'], '292', '280', 'R'); ?>" alt="<?php echo $value['gallery_name']; ?>" title="<?php echo $value['gallery_name']; ?>">
                                    </figure>
                                    <div class="overlay">
                                        <span class="fa fa-expand"></span>
                                        <div class="title-box">
                                            <div class="tt"><?php echo $value['gallery_name']; ?></div>
                                        </div>
                                    </div>
                                </div>
                            </a>
                        </div>
                    </div>
    <?php } ?>    
            </div>
        </div>      
    </section>
<?php } ?>



<div class="clearfix"></div>
                <!-- <section class="w-p-s-home-feture">
    <div class="container">
        <h2 class="title wow zoomIn animated" data-wow-delay=".1s" style="visibility: visible; animation-delay: 0.1s; animation-name: zoomIn;">Why Life Optoelectronics</h2>
        <div class="row">
            <div class="col-md-4 col-xs-12 wow fadeInDown animated" data-wow-delay=".2s" style="visibility: visible; animation-delay: 0.2s; animation-name: fadeInDown;">
                <div class="wprt-icon-text">
                    <div class="icon">
                       <img src="<?php echo theme_url();?>images/huge-distribution-network.png" alt="Strong Distribution Network" title="Strong Distribution Network" >
                    </div>
                    <h3><a href="javascript:void();">Strong Distribution Network </a></h3>
                    <p>Pan-India reach through direct & indirect <br>channels</p>
                </div>
            </div>

            <div class="col-md-4 col-xs-12 wow fadeInDown animated" data-wow-delay=".3s" style="visibility: visible; animation-delay: 0.3s; animation-name: fadeInDown;">
                <div class="wprt-icon-text">
                    <div class="icon">
                         <img src="<?php echo theme_url();?>images/quality-focussed.png" alt="Quality Focussed" title="Quality Focussed" >
                    </div>
                    <h3><a href="javascript:void();">Quality Focussed</a></h3>
                    <p>We follow patient-first approach through continuous improvements and innovative solutions </p>
                </div>
            </div>

            <div class="col-md-4 col-xs-12 wow fadeInDown animated" data-wow-delay=".4s" style="visibility: visible; animation-delay: 0.4s; animation-name: fadeInDown;">
                <div class="wprt-icon-text">
                    <div class="icon">
                         <img src="<?php echo theme_url();?>images/medical-expertise.png" alt="Medical Expertise" title="Medical Expertise" >
                    </div>
                    <h3><a href="javascript:void();">Medical Expertise</a></h3>
                    <p>Helping clients through consultative approach & vast years of experience in medical technology </p>
                </div>
            </div>         

        </div>
    </div>
</section> -->
<?php if (is_array($testimonial) && !empty($testimonial)) { ?>
    <section class="home_testimonials_webpulse">
        <div class="container">
            <div class="row">
                <div class="col-lg-12 col-md-12 col-sm-12 wow fadeInLeft animated" data-wow-delay=".4s">
                    <div class="tt">Testimonials </div>

                    <div class="web-pulse-testimonials">
                        <div id="testimonial" class="owl-carousel">
    <?php foreach ($testimonial as $val) { ?>
                                <div class="item">
                                    <div class="testimonial-block-two">
                                        <div class="inner-box">
                                            <div class="quote-icon">
                                                <span class="fa fa-quote-left"></span>
                                            </div>
                                            <div class="text">
        <?php echo html_entity_decode($val['testimonial_description']); ?>
                                            </div>
                                            <div class="lower-box">
                                                <div class="author-box">
                                                    <div class="author-inner">
                                                        <div class="image">
                                                            <img src="<?php echo get_image_with_name($val['poster_name'], 'testimonial', $val['testimonial_image'], '70', '70', 'R'); ?>" alt="<?php echo $val['poster_name']; ?>" title="<?php echo $val['poster_name']; ?>" >

                                                        </div>
                                                        <span><?php echo ($val['poster_name']); ?></span>
                                                        <div class="designation"><?php echo ($val['designation']); ?></div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
    <?php } ?>

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

              <!--  <div class="col-lg-6 col-md-6 col-sm-6 wow fadeInLeft animated" data-wow-delay=".4s">
                    <h3>Our Clients</h3>
                    <div class="Tickerlogo">
                        <div class="logo_wrapper">
                            <div class="logo_slide">
                                <div class="logo_content">
    <?php foreach ($client as $value) { ?>
                                        <div class="logo_item">
                                            <div class="logo_image">
                                                <li>
                                                    <img src="<?php echo get_image_with_name($value['gallery_name'], 'gallery', $value['gallery_image'], '160', '48', 'R'); ?>" alt="<?php echo $value['gallery_name']; ?>" title="<?php echo $value['gallery_name']; ?>">
                                                </li>
                                            </div>
                                        </div>
    <?php } ?>

                                </div>
                            </div>
                        </div>
                    </div>
                </div> -->
            </div>
        </div>
    </section>
<?php } ?>



<?php $this->load->view('bottom'); ?>