<?php
require('header.php');
$countryId = 1; //lebanon default
$banners = $o->findSql("SELECT * FROM homepage_banners WHERE country=$countryId");
$solutions = $o->findSql("SELECT * FROM solutions");
$partners = $o->findSql("SELECT * FROM partners");

$partnersText = getPage(3);
$industriesText = getPage(4);
$solutionsText = getPage(5);

?>


    <div class="main">
        <div class="main__container">
            <div class="main__content">
                <div class="main__slider__holder">
                    <div class="main__slider__container">
                        <div id="slider1" class="corousel slide main__slider" data-ride="corousel" data-interval="5000"
                             data-pause="hover" data-wrap="true">
                            <div class="carousel-inner main__slider__inner">
                                <?php foreach ($banners AS $k => $v) { ?>
                                    <div class="carousel-item <?php if ($k == 0) {
                                        echo 'active';
                                    } ?>">
                                        <img src="<?= $v['image']; ?>" alt="<?= $v['title']; ?>"
                                             title="<?= $v['title']; ?>" class="no-stretch">
                                        <div class="carousel-caption">
                                            <h2 class="carousel-caption__head" style="line-height: 1.2"><?= $v['title']; ?></h2>
                                            <p class="carousel-caption__text"><?= $v['subtitle']; ?></p>
                                            <a href="<?= $v['cta_link']?>"
                                               class="carousel-caption__btn main-btn"><span><?= $v['cta_text']; ?></span></a>
                                        </div>
                                    </div>
                                <?php } ?>

                            </div>
                            <a class="carousel-control-prev main__carousel-control-prev" href="#" data-slide="prev">
                                <span class="carousel-control-prev-icon main__carousel-control-prev-icon"></span>
                            </a>
                            <a class="carousel-control-next main__carousel-control-next" href="#" data-slide="next">
                                <span class="carousel-control-next-icon main__carousel-control-next-icon"></span>
                            </a>
                        </div>
                        <div class="slider__bottom">
                            <div class="wrapper slider__bottom__container">
                                <div class="slider__bottom__item">
                                    <div class="slider__bottom__item__container">
                                        <span class="round"><label><span id="years"></span></label>Years</span>
                                        <!--                                                <p class="slider__bottom__item__text">Our expertise spans data, networking, voice, video, security, cloud and software, offering a 360° ICT vision to empower your business.</p>-->
                                    </div>
                                </div>
                                <div class="slider__bottom__item">
                                    <div class="slider__bottom__item__container">
                                        <span class="round"><label><span id="customers"></span>+</label>Customers</span>
                                        <!--                                                <p class="slider__bottom__item__text">Over the years, Libatel has built an impressive list of clients across a wide variety of industries.</p>-->
                                    </div>
                                </div>
                                <div class="slider__bottom__item">
                                    <div class="slider__bottom__item__container">
                                        <span class="round"><label><span id="engineers"></span>+</label>Engineers</span>
                                        <!--                                                <p class="slider__bottom__item__text">Our team, with proven technical expertise and industry knowledge, is dedicated to customer satisfaction.</p>-->
                                    </div>
                                </div>
                                <div class="slider__bottom__item">
                                    <div class="slider__bottom__item__container">
                                        <span class="round"><label><span id="partners"></span>+</label>Partners</span>
                                        <!--                                                <p class="slider__bottom__item__text">Our commitment to offer first rate ICT solutions has won us multiple Awards. We are Platinum Partner across vendors.</p>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                        <script>

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

                <div class="main__solutions">
                    <div class="solutions__wrapper wrapper">
                        <div class="solutions__head head">
                            <h3 class="partners__title title">our solutions</h3>
                            <?=$solutionsText['text'];?>
                        </div>
                    </div>
                    <div class="solutions__slider__wrapper">
                        <div class="owl-carousel owl-theme solutions__slider">
                            <?php foreach ($solutions AS $s) { ?>
                                <a href="solution.php?id=<?= $s['id'] ?>" class="item solutions__item">
                                    <img src="<?= thumbnailLink($s['cover_image'], 280, 180); ?>"
                                         alt="<?= $s['title']; ?>" title="<?= $s['title']; ?>"/>
                                    <div class="solutions__item__entry">
                                        <span class="entry__text"></span>
                                    </div>
                                    <div class="title-in-links"><?= $s['title'] ?></div>
                                </a>

                            <?php } ?>

                        </div>
                    </div>
                    <div class="solutions__btn-holder wrapper">
                        <a href="solutions.php" class="solutions__btn main-btn"><span>View All Solutions</span></a>
                    </div>
                </div>


                <div class="main__industries">
                    <div class="wrapper">
                        <div class="industries__head head">
                            <h3 class="industries__title title">industries we serve</h3>
                            <!--                            <p>Experience the difference, with Libatel turn your communication system into an asset</p>-->
                        </div>
                        <div class="industries__content-holder">
                            <div class="industries__content industries__content--left">
                                <img src="images/home/00-Libatel-Home-00.jpg" alt="Libatel" title="Libatel"/>
                            </div>
                            <div class="industries__content industries__content--rigth">
                                <div class="industries__content__desc">
                                    <?=$industriesText['text'];?>
                                </div>

                                <a href="industries.php"
                                   class="industries__btn main-btn"><span>View All Industries</span></a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="main__partners">
                    <div class="wrapper">
                        <div class="partners__head head">
                            <h3 class="partners__title title">strength through our partnership</h3>
                            <!--                            <p>Experience the difference, with Libatel turn your communication system into an asset</p>-->
                        </div>
                        <div class="partners__content-holder">
                            <div class="partners__content__item partners__content__item--left">
                                <div class="partners__text">
                                    <?=$partnersText['text'];?>
                                </div>
                                <a href="partners.php" class="partners__btn main-btn"><span>View All Partners</span></a>
                            </div>
                            <div class="home__partners__slider_container"  style="">
                                <div class="owl-carousel owl-theme home__partners__slider auto-scroll">
                                    <?php foreach ($partners AS $p) { ?>

                                        <img class="-logo-stretch" src="<?= thumbnailLink($p['image'], 200, 200, false); ?>"
                                             alt="<?= $p['title']; ?>"
                                             title="<?= $p['title']; ?>"/>

                                    <?php } ?>
                                </div>

                            </div>
                            <!--<div class="partners__content__item partners__content__item--right">

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

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

<?php require('footer.php') ?>