<!DOCTYPE html>
<html lang="en">
<?php include('header.php'); ?>
<head>
<!-- basic -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- mobile metas -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<!-- site metas -->
<title>Mlm Review</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="author" content="">	
<!-- bootstrap css -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<!-- style css -->
<link rel="stylesheet" type="text/css" href="css/style.css">
<!-- Responsive-->
<link rel="stylesheet" href="css/responsive.css">
<!-- fevicon -->
<link rel="icon" href="images/fevicon.png" type="image/gif" />
<!-- Scrollbar Custom CSS -->
<link rel="stylesheet" href="css/jquery.mCustomScrollbar.min.css">
<!-- Tweaks for older IEs-->
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
<!-- owl stylesheets --> 
<link rel="stylesheet" href="css/owl.carousel.min.css">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" media="screen">

</head>
<body>
	<!-- header section start -->
	<div class="header_section">
		<div class="container">
			<div class="row">
				<div class="col-sm-12 col-lg-3">
					<div class="logo"><a href="index.php"><img src="images/logo.png"></a></div>
				</div>
				<div class="col-sm-6">
					<nav class="navbar navbar-expand-lg navbar-light bg-light">
                        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
                        <span class="navbar-toggler-icon"></span>
                        </button>
                    <div class="collapse navbar-collapse" id="navbarNavAltMarkup">
                        <div class="navbar-nav">
                           <a class="nav-item nav-link" href="index.php">Home</a>
                           <a class="nav-item nav-link" href="about.php">About</a>
						   <a class="nav-item nav-link" href="system_list2.php">General Ads</a>
						   <a class="nav-item nav-link" href="package.php">Package</a>
                           <a class="nav-item nav-link" href="contact.php">Contact</a>
                        </div>
                    </div>
                    </nav>
				</div>
				<div class="col-sm-6 col-lg-3">
					<div class="search_main">
                    <button class="submit_bt"><a  target="_blank" href="admin/userhome.php"><span class="doctor"><img src="images/doctor-icon.png"></span>Submit Ads</a></button>
				    </div>
				</div>
			</div>
		</div>
	</div>
	<!-- header section end -->
	<!-- banner section start -->
	<div class="layout_padding banner_section">
		<div class="container">
			<div class="row">
				<div class="col-sm-12">
					<h1 class="banner_taital"  >All You Need Is Here & Classified </h1>
					
				</div>
			</div>
		</div>
	</div>
	<!-- banner section end -->
	<!-- search box start -->
<div class="layout_padding popular_section">
    	<div class="container">
    		<h3 class="popular_taital"  style="color:#0033FF">All General Ads</span></h3>
    		<div id="main_slider" class="carousel slide" data-ride="carousel">
            <div class="carousel-inner"> <div class="row">
          
        
        <?php
		$status = "Published";
        $vbs_topics_query = $conn->prepare('SELECT * FROM tbl_topics WHERE   category = :category  AND status = :status ORDER BY entryNum DESC LIMIT 20 ');
        $vbs_topics_query->execute(['category' => "VBS" , ':status' => $status ]  );
        while($vbs_topics_row=$vbs_topics_query->fetch()){
            
        $vbs_comment_query = $conn->prepare("SELECT * FROM tbl_comments WHERE topic_id='$vbs_topics_row[topic_id]'"); 
        ?>
               
          <div class="post col-md-2">
            <div class="post-thumbnail"><a href="instructions.php?topic_id=<?php echo $vbs_topics_row['topic_id']; ?>&category=VBS&entryNum=<?php echo $vbs_topics_row['entryNum']; ?>&viewer=Guest"><img src="admin/<?php echo $vbs_topics_row['img']; ?>" alt="..." class="img-fluid" /></a></div>
            <div class="post-details">
            
              <div class="post-meta d-flex justify-content-left">
                  <div class="date"><i class="icon-clock"></i> <?php echo $vbs_topics_row['datePublished']; ?></div>
                  <div class="views"><i class="icon-eye"></i> <?php echo $vbs_topics_row['totalViews']; ?></div>
                  <div class="views"><i class="fa fa-download"></i><?php echo $vbs_topics_row['totalDownloads']; ?></div>
                  <div class="comments meta-last"><i class="icon-comment"></i><?php echo $vbs_comment_query->rowCount(); ?></div>
              </div>
              
              <a href="instructions.php?topic_id=<?php echo $vbs_topics_row['topic_id']; ?>&category=VBS&entryNum=<?php echo $vbs_topics_row['entryNum']; ?>&viewer=Guest">
                <h3 class="h4"><?php echo $vbs_topics_row['title']; ?></h3></a>
              <p class="text-muted"><?php echo substr($vbs_topics_row['description'], 0, 50); ?><div class="category"><a href="instructions.php?topic_id=<?php echo $vbs_topics_row['topic_id']; ?>&category=VBS&entryNum=<?php echo $vbs_topics_row['entryNum']; ?>&viewer=Guest">Read More &raquo;</a></div></p>
            </div>
          </div>
          
        <?php } ?>
                </footer>
              </div>
            </div>
          </div>
          
    		        </div>
                </div>
            
      </div>
    </div>
    <?php include('footer.php'); ?>
    <?php include('script_files.php'); ?>
  </body>
</html>