<?php
$tt_page_info = array(
  'Page_Info' =>   array(
    'Title' =>$the_video['VideoTitle'],
    'Description' => $the_video['Description'],
    'Keyword' =>$the_video['Description'],
  ),
  'Social_og' => array(
    'Image' => $the_video['FeaturedImage'],
    'Type' => 'website',
    'URL' => 'video/'.$the_video['ID'].'/',
  ),
);
require_once('./header.php'); // Include Footer
?>
<section class="  d-print-none  py-4">
  <div class="container">
    <?php
    $post_ads_1 = showAds($advancenews['PostAds1'], $advancenews['PostAdsCtl']);
    if ($post_ads_1 != '') {
      ?>
      <div class="  mb-3">
        <?php echo $post_ads_1 ?>
      </div>
      <?php
    }
    ?>
    <div class="row g-4 ">
      <div class="col-md-8">
        <div class="">
          <div class="video-container">
            <?php echo getVideoEmbed($the_video['VideoContent']) ?>
          </div>
          <?php
          $post_ads_2 = showAds($advancenews['PostAds2'], $advancenews['PostAdsCtl']);
          if ($post_ads_2 != '') {
            ?>
            <div class="tt-white my-3">
              <?php echo $post_ads_2 ?>
            </div>
            <?php
          }
          ?>
          <h1 class="my-3 h1 fw-bold tt-text" style="font-size:var(--tt_post_title_fs)"><?php echo htmlentities($the_video['VideoTitle'], ENT_QUOTES, 'utf-8'); ?></h1>
          <div class="py-2 border-top border-bottom">
            <div class="row g-4 align-items-center">
              <div class="col-12 col-md-6">
                <div class="d-flex align-items-center">
                  <div class="ms-2">
                    <span class="tt-text"> <i class="bi bi-clock"></i> প্রকাশ : <?php echo dokanDate($the_video['time']) ?></span>
                  </div>
                </div>
              </div>
              <!-- share -->
              <div class="col-12 col-md-6">
                <div class="myshare-mahamudfutureit">
                  <div class="sharethis-inline-share-buttons text-start text-lg-end"   data-title="<?php echo $the_video['VideoTitle'] ?>" data-url="<?php echo $site_domain ?>video/<?php echo $the_video['ID'] ?>"></div>
                </div>
              </div>
            </div>
          </div>
          <div class="story-details tt-text">
            <p>
              <?php
              echo articleContent($the_video['Description']);
              ?>
            </p>
          </div>
        </div>
        <?php
        $post_ads_3 = showAds($advancenews['PostAds3'], $advancenews['PostAdsCtl']);
        if ($post_ads_3 != '') {
          ?>
          <div class="tt-white mb-3">
            <?php echo $post_ads_3 ?>
          </div>
          <?php
        }
        ?>
        <div class="tt-white fb-comment  mt-3 ">
          <?php
          if ($advancenews['PostFbCommentTitle'] !='') {
            ?>
            <h2 class="m-0 p-md-3 p-2"> <?php echo $advancenews['PostFbCommentTitle'] ?></h2>
            <?php
          }
           ?>
          <div class="p-md-3 p-2 border">
            <?php
            if ($advancenews['PostFbComment'] == 'on' && $advancenews['PostFbCommentAppID'] !='') {
              ?>
              <div class="">
                <div id="fb-root"></div>
                <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v22.0&appId=<?php echo $advancenews['PostFbCommentAppID'] ?>"></script>
                <div class="fb-comments" data-width="100%" data-href="<?php echo articleLink($the_post['PostId']) ?>" data-numposts="5"></div>
              </div>
              <?php
            }
            ?>
          </div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="sidebar">
          <?php
          $post_ads_4 = showAds($advancenews['PostAds4'], $advancenews['PostAdsCtl']);
          if ($post_ads_4 != '') {
            ?>
            <div class="tt-white mb-3">
              <?php echo $post_ads_4 ?>
            </div>
            <?php
          }
          ?>
            <div class="row g-2">
              <div class="col-12">
                <?php
                  echo getBlockTitle('', 'ভিডিও  ',$site_domain.'video/');
                ?>
              </div>
              <?php
              $tt_recent_video = showAllttdata("mahamudfutureit_video", " ORDER BY  ID  DESC LIMIT 6");
              if (!empty($tt_recent_video)) {
                foreach ($tt_recent_video as $the_rvideo) {
                  ?>
                  <div class="col-6 ">
                    <div class="mahamudfutureit_vwraper">
                      <a href="<?php echo $site_domain ?>video/<?php echo $the_rvideo['ID'] ?>/" class="position-relative">
                        <i class="bi bi-play-circle"></i>
                        <img class="w-100" src="<?php echo $the_rvideo['FeaturedImage'] ?>" alt="<?php echo $the_rvideo['VideoTitle'] ?>">
                      </a>
                      <h3><a   href="<?php echo $site_domain ?>video/<?php echo $the_rvideo['ID'] ?>/"><?php echo $the_rvideo['VideoTitle'] ?></a></h3>
                    </div>
                  </div>
                  <?php
                }
              }else {
                ?>
                <div class="text-center p-2 bg-light rounded-t">
                  কোন ভিডিও নেই !
                </div>
                <?php
              }
              ?>
            </div>
          <?php
          $post_ads_5 = showAds($advancenews['PostAds5'], $advancenews['PostAdsCtl']);
          if ($post_ads_5 != '') {
            ?>
            <div class="tt-white my-3">
              <?php echo $post_ads_5 ?>
            </div>
            <?php
          }
          ?>
          <div class="most-recent mt-2">
            <?php require_once('template-part/most-recent-2.php');  ?>
          </div>
          <?php
          $post_ads_6 = showAds($advancenews['PostAds6'], $advancenews['PostAdsCtl']);
          if ($post_ads_6 != '') {
            ?>
            <div class="tt-white my-3">
              <?php echo $post_ads_6 ?>
            </div>
            <?php
          }
          ?>
          <div class="mahamudfutureit-archive mt-2">
            <?php require_once('template-part/archive.php');  ?>
          </div>
          <?php
          $post_ads_7 = showAds($advancenews['PostAds7'], $advancenews['PostAdsCtl']);
          if ($post_ads_7 != '') {
            ?>
            <div class="my-3">
              <?php echo $post_ads_7 ?>
            </div>
            <?php
          }
          ?>
        </div>
      </div>
    </div>
    <?php
    $post_ads_8 = showAds($advancenews['PostAds8'], $advancenews['PostAdsCtl']);
    if ($post_ads_8 != '') {
      ?>
      <div class="  my-3">
        <?php echo $post_ads_8 ?>
      </div>
      <?php
    }
    ?>
  </div>
</section> 
<?php
require_once('./footer.php'); // Include Footer
?>
