<?php require('header.php');
$id = (int)$_GET['id'];
$m = reset($o->findSql("SELECT * FROM solutions WHERE id = $id"));
$sub = ($o->findSql("SELECT * FROM solution_subsolutions WHERE solution_id = $id"));

?>

    <div class="media-details__holder">

        <div class="section__head">
            <div class="wrapper head__wrapper">
                <h1 class="section__title media-details__section__title"><?= $m['title']; ?></h1>
                <div class="section__head__links">
                    <a href="index.php" class="section__head__link">Home</a>
                    <span class="section__head__link__text head__link__separator">Solutions</span>
                </div>
            </div>
        </div>
        <section class="page__top" style="padding-bottom: 0">
            <div class="wrapper">
                <div class="head top__head">
                    <div class="top__text text--colored"><?= $m['quote']; ?></div>

                </div>
            </div>
        </section>
        <div class="wrapper">

            <div class="media-detailes__container" style="padding-top: 0">
                <div class="media-detailes__item ">
                    <div class="media-detailes__content">
                        <div class="media-detailes__image-holder">
                            <img src="<?= thumbnailLink($m['cover_image'], 400, 400, false); ?>"
                                 alt="<?= $m['title']; ?>" title="<?= $m['title']; ?>"/>
                        </div>
                        <div class="media-detailes__text-holder">
                            <div class="media-detailes__text"><?= $m['text']; ?></div>
                        </div>
                    </div>
                </div>


                <!--<div class="media-detailes__item media-detailes__item--right">
                    <div class="media-detailes__right__item media-detailes__right__first">
                        <h3 class="media-detailes__right__title">Voice & Multimedia</h3>
                        <span class="media-detailes__right__text">Avaya</span>
                        <span class="media-detailes__right__text">Hoistlocatel</span>
                        <span class="media-detailes__right__text">globitel</span>
                    </div>
                    <div class="media-detailes__right__item media-detailes__right__last">
                        <h3 class="media-detailes__right__title">Voice & Multimedia</h3>
                        <span class="media-detailes__right__text">Avaya</span>
                        <span class="media-detailes__right__text">Hoistlocatel</span>
                        <span class="media-detailes__right__text">globitel</span>
                    </div>
                </div>-->
            </div>
        </div>
    </div>

    <div class="wrapper">
<!--        <div>We offer a variety of solutions:</div>-->


                <div class="head top__head">
                    <h2 class="top__title title text--colored"><?= $m['why_libatel']; ?></h2>
                </div>


        <div class="sol-page__content">
            <?php if (!empty($sub)) { ?>
                <?php foreach ($sub AS $s) { ?>
                    <div class="sol-page__item">
                        <img src="<?= thumbnailLink($s['image'], 300, 300); ?>"
                             alt="<?= $s['title']; ?>"
                             title="<?= $s['title']; ?>"/>

                        <h2 class="sol-page__item__title">
                            <span class="sol-page__item__title__link"><?= $s['title']; ?></span>
                        </h2>
                    </div>
                <?php }
            }
            ?>
        </div>
        <div class="">
            <a href="contact-us.php" class="btn footer__link" style="margin: 10px auto"><?= $m['btn_text'] ?></a>
        </div>
    </div>

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