<?php
include_once("include/main.inc.php");
$page_metatitle = "Video Gallery - " . COMPANY_NAME;
$page_metakey = "Video Gallery - " . COMPANY_NAME;
$page_metadesc = "Video Gallery - " . COMPANY_NAME;
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <?php include "app_top.php"; ?>
</head>

<body>
    <?php include "app_header.php"; ?>
    <section class="heading_banner" style="background-image: url(<?= site_url; ?>/designer/images/about-banner.jpg)">
        <div class="container">
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 text-center">
                    <h1 class="cat_title">Video Gallery</h1>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </section>
    <div class="inner_breadcrumb hidden_xs">
        <div class="container">
            <div class="row">
                <div class="col-xxl-12 col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                    <ul class="breadcrumb">
                        <li><a href="<?= site_url; ?>" title="Home">Home</a></li>
                        <li class="active">Video Gallery</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="gallery_page">
        <div class="container">
            <div class="title_1">Video Gallery</div>
            <div class="clearfix"></div>
            <div class="row g-2 row-cols-2 row-cols-md-3 row-cols-lg-5">
                <?php $gallery_video = mysqli_query($GLOBALS['dbconn'], "select slink_title,slink_url,id from video_tbl order by id desc");
                while ($video_res = mysqli_fetch_assoc($gallery_video)) {
                ?>
                    <div class="col">
                        <div class="youtube-player reel" data-id="<?= $video_res['slink_url']; ?>">
                            <div class="youtube-thumbnail">
                                <img loading="lazy" src="https://i.ytimg.com/vi/<?= $video_res['slink_url']; ?>/sddefault.jpg" 
                                alt="<?php echo $video_res['slink_title']; ?> Manufacturers in <?=$admin_res['targetlocation'];?>" 
                                title="<?php echo $video_res['slink_title']; ?> Manufacturers in <?=$admin_res['targetlocation'];?>">
                                <span><?php echo $video_res['slink_title']; ?></span>
                                <a href="https://www.youtube.com/watch?v=<?= $video_res['slink_url']; ?>" class="play" data-fancybox="video" aria-label="Play video" title="<?php echo $video_res['slink_title']; ?> Manufacturers in <?=$admin_res['targetlocation'];?>"></a>
                            </div>
                        </div>
                    </div>
                <?php } ?>
            </div>
        </div>
    </div>
    <?php include "app_footer.php"; ?>
    <?php include "app_bottom.php"; ?>
</body>

</html>