<?php 
   include 'topre.php';
    $que = $ks->prepare('SELECT *FROM tbl_tv WHERE tv_sts=1 AND tvid="'.$_REQUEST['tv'].'"');
    $que->execute();
    $fque = $que->fetch();
    $tid = $fque['tvid'];
    $tname = $fque['tv_name'];
    $t_thumb = $fque['thumbnail_tv'];
    $tvlink = $fque['tvlink'];
?>
  
  <!-- ##### TV Start ##### -->
    <section class="hero--area section-padding-80">
        <div class="container">
            <div class="row no-gutters">
                
                <div class="col-12">
                    <div class="sidebar-area">
                        <!-- ***** Single Widget ***** -->
                        <div class="single-widget latest-video-widget mb-50">
                            <!-- Section Heading -->
                            <div class="section-heading style-2 mb-30">
                                <h4>TV Show</h4>
                                <div class="line"></div>
                            </div>

                            <div class="single-video-area">
                                <iframe src="<?php echo $tvlink;?>" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
                             
                             <div class="post-content">
                             <a href="telvshow?tv=<?php echo $tid;?>" class="post-title"><h4><?php echo $tname;?></h4></a>
                             </div>
                             
                            </div>
                            <!-- Single TV POST -->
                            <?php
                              $stmtv = $ks->prepare('SELECT *FROM tbl_tv WHERE tv_sts=1 AND tvid!="'.$_REQUEST['tv'].'"');
                              $stmtv->execute();
                              while($roww = $stmtv->fetch()){
                              $tvid = $roww['tvid']; 
                              $tvname = $roww['tv_name']; 
                            ?>
                            <div class="single-blog-post style-3 d-flex mb-50">
                                <div class="post-thumbnail">
                                    <img src="img/tv-thumbnail/<?php echo $roww['thumbnail_tv'];?>" alt="">
                                </div>
                                <div class="post-content">
                                    <a href="telvshow?tv=<?php echo $tvid;?>" class="post-title"><?php echo $tvname;?></a>
                                </div>
                            </div>
                            <?php }?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- ##### TV End ##### -->
    
<?php 
   include 'btmsrc.php';
?>