<?php require("inc/classes/class.main.php");
$obj=new main();
  $getMenu=$obj->getMenuType();
 $menu=$getMenu[0]['menutype'];
$k=0;
?>
<?php 
          $actual_link = "$_SERVER[REQUEST_URI]";
		  $params = $_SERVER['QUERY_STRING'];
		  $id = substr($actual_link, -1); 
    ?>
<?php
 $homeflag="0";
 $homeflag=($page[0]['permalink'] == $defaulthome[0]['permalink'])?"1":"0";
    $url=basename($_SERVER['REQUEST_URI']);

  //require("inc/classes/class.main.php");
   $protocol = @$_SERVER['HTTPS'] == 'on' ? 'https' : 'http';
	$address= $protocol.'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
 // echo "DDF".$_SERVER['HTTP_REFERER'];
    $con_obj=new controller();
 	
   $page=$con_obj->controller($url); 

    $defaulthome= $obj->getDefaultHome();
    $homeflag="0";
	
       if(count($page)==0 || $page[0]['permalink']=="home") {
	   $page=$defaulthome; $homeflag="1";
	   $content=$page[0]['content'];
	   $banner=$page[0]['banner'];
	  }else{
		 $content=$page[0]['content'];
		 $banner=$page[0]['banner'];
		 
 	  }
	 $cnt=$obj->getthumbgalleryById();
	  $vid=$obj->getvideoById();
	  $news=$obj->getnewsById();
 	 
	   include("inc/inc_top.php");  
 
  				?>
<body>

<!--<div class="hide316"><strong>Sorry!</strong> Website is not supported for this device</div>--> 
<!--<div class="close_container close"><span class="close_btn"><a href="#">Block Ads -<small>Click here</small></a></span></div>-->
<?php
 include("inc/banners.php");  
 
?>
<div class="bmd_ban_left"></div>
<div class="container"> 
  <!--------------- Header menu ------------------->
  <?php
 include("inc/inc_header.php");  
 
?>
  <div class="gal_bg">
    <div class="ban_latest_right">
      <h1><a href="all_news.php?cat_id=16">top stories</a>
        <div class="red_line"></div>
      </h1>
      <div class="clearflx"></div>
      <ul>
        <?php 
$resultss = mysql_query("select * from news where category_id='16' order by id desc");
		  // $qr = mysql_num_rows($resultss);
		   while($ress = mysql_fetch_array($resultss)) {
		   
		   ?>
        <li><a href="news_page.php?news_id=<?= $ress['id'];?>" >
          <?= $ress['title'];?>
          </a></li>
        <?php } ?>
      </ul>
      <span class="read"><a href="all_news.php?cat_id=16">Read more...</a></span> </div>
    <div class="ban_latest_left">
      <div class="news_block">
        <?php
 $i=1;
$resultss = mysql_query("select * from inner_gallery where publish='1' order by id desc limit 0,1 ");
		  // $qr = mysql_num_rows($resultss);
		   while($ress = mysql_fetch_array($resultss)) {
		  
		   ?>
        <div class="news_block_<?= $i++?>" style="background:url(<?= $ress['href'];?>) no-repeat center center; background-size:cover;">
          <div class="news_img">
            <h3><a href="news_page.php?hgall_id=<?= $ress['id']?>">
              <?= $ress['title'];?>
              ... read more</a></h3>
          </div>
        </div>
        <? } ?>
        <ul id="slides" class="news_block_2">
			<? 
$resultss = mysql_query("select * from events where publish='1' order by id desc");
		  // $qr = mysql_num_rows($resultss);
		   while($ress = mysql_fetch_array($resultss)) { 
		   $id= $ress['id'];
		   $rw = mysql_query("select * from event_gallery where event_id='$id' order by dateAdded desc LIMIT 0,1 ");
		  // echo "select * from event_gallery where id='$id'";
		  // $qr = mysql_num_rows($resultss);
		   $row = mysql_fetch_array($rw);
		   ?>
		   
		   
          <li class="slide showing"><a href="all_gallery.php?evt_gall=<?= $id; ?>"> <img src="<?= $row['href']?>" height="250" width="100%"/></a>
          <h3><?= $ress['title']?></h3> </a></li>
		  <? } ?>
        
        </ul>
        <div class="clearflx"></div>
      </div>
      
      <!--------------- gallery end -------------------> 
      
      <!--------------- latestnews ------------------->
      <div class="clearflx"></div>
      <div class="latest_news">
        <h1><a href="all_news.php?cat_id=1">latest Movie Reviews</a>
          <div class="red_line"></div>
        </h1>
        <div class="clearflx"></div>
        <?php
$j=1;
$resultss = mysql_query("select * from news where category_id='1' and  publish='1' order by id desc limit 0,3");
		  // $qr = mysql_num_rows($resultss);
		   while($ress = mysql_fetch_array($resultss)) {
		   $j++;
		   ?>
        <div class="news_list <? if($j=='4') { ?>lost <? } ?>"><div class="text_news_block_img"><img src="<?= $ress['href'];?>" width="80"></div><a href="news_page.php?news_id=<?= $ress['id'];?>">
          <?= $ress['title'];?>
          </a> 
          
          <!--<p><?= $ress['content'];?></p>--> 
          <span class="read"><a href="news_page.php?news_id=<?= $ress['id'];?>">Read more...</a></span></div>
        <? } ?>
        <div class="clearflx"></div>
      </div>
      <div class="clearflx"></div>
    </div>
  </div>
  <div class="clearflx"></div>
  <!--------------- End latestnews ------------------->
  <div class="bmd_banners top_sp"> <a href="http://qvedutech.com/" target="_blank"> <img src="images/QV_erp1.gif" alt="QV ERP" class="close" title="QV ERP" > </a> <a href="https://bookmydarshan.online" target="_blank"> <img src="images/bmd_main.gif" alt="Bookmydarshan" class="close" title="Bookmydarshan" > </a> </div>
  <!--------------- Newsheadlines ------------------->
  <div class="clearflx"></div>
  <div class="news_headlines_block_left">
    <div class="headlines_block">
      <h1><a href="all_news.php?cat_id=2">headlines</a>
        <div class="red_line"></div>
      </h1>
      <div class="clearflx"></div>
      <? 
$resultss = mysql_query("select * from news where category_id='2' and publish='1' order by id desc limit 0,4");
		  // $qr = mysql_num_rows($resultss);
		   while($ress = mysql_fetch_array($resultss)) {
		   
		   ?>
      <div class="text_news_block">
        <div class="text_news_block_img"><img src="<?= $ress['href'];?>" width="133" /></div>
        <div class="text_news_block_text">
          <h4><a href="news_page.php?news_id=<?= $ress['id'];?>">
            <?= $ress['title'];?>
            </a>
            <p>
              <?= $ress['content'];?>
            </p>
          </h4>
          <div class="red_btn"><a href="news_page.php?news_id=<?= $ress['id'];?>">Read More</a></div>
          <span>-- Hyderabad<br />
          <?
 $dt=  $ress['dateAdded']; 
 echo "Published:".date("d F Y h:i:s A", strtotime("$dt")) . "\n";
	?>
          </span> </div>
        </a> </div>
      <? } ?>
    </div>
    <div class="filmnagar_block">
      <h1><a href="all_news.php?cat_id=3">filmnagar</a>
        <div class="red_line"></div>
      </h1>
      <div class="clearflx"></div>
      <? 
$resultss = mysql_query("select * from news where category_id='3' and publish='1' order by id desc limit 0,4");
		  // $qr = mysql_num_rows($resultss);
		   while($ress = mysql_fetch_array($resultss)) {
		   
		   ?>
      <div class="text_news_block">
        <div class="text_news_block_img"><img src="<?= $ress['href'];?>" width="133" /></div>
        <div class="text_news_block_text">
          <h4><a href="news_page.php?news_id=<?= $ress['id'];?>">
            <?= $ress['title'];?>
            </a>
            <p>
              <?= $ress['content'];?>
            </p>
          </h4>
          <div class="red_btn"><a href="news_page.php?news_id=<?= $ress['id'];?>">Read More</a></div>
          <span>-- Hyderabad<br />
          <?
 $dt=  $ress['dateAdded']; 
 echo "Published:".date("d F Y h:i:s A", strtotime("$dt")) . "\n";
	?>
          </span> </div>
        </a> </div>
      <? } ?>
    </div>
    <div class="clearflx"></div>
  </div>
  <div class="news_headlines_block_right">
    <h1><a href="all_videos.php?vid=vd">latest videos</a>
      <div class="red_line"></div>
    </h1>
    <div class="clearflx"></div>
    <? 
$resultss = mysql_query("select * from video  where publish='1'order by id desc limit 0,3");
		  // $qr = mysql_num_rows($resultss);
		   while($ress = mysql_fetch_array($resultss)) {
		   
		   ?>
    <a href="#">
    <? 
 $data = $ress['link'];    
$embed = substr($data, strpos($data, "embed") + 6);    
 

?>
    <div class="latest_videos_block"> <a href="all_videos.php?video_id=<?= $ress['id'];?>"><img src="http://img.youtube.com/vi/<?= $embed;?>/0.jpg" height="132" width="276"  /><img src="images/play_icon.png" class="play_icon"></a> </a> </div>
    <h4><a href="all_videos.php?video_id=<?= $ress['id'];?>">
      <?= $ress['title'];?>
      </a></h4>
    <? } ?>
    <div class="clearflx"></div>
  </div>
  
  <!--------------- End Newsheadlines -------------------> 
  <!--------------- Gallery ------------------->
  <div class="clearflx"></div>
  <div class="gallery_block">
    <div class="photo_gallery">
      <h1><a href="#">Photo Gallery</a>
        <div class="red_line"></div>
      </h1>
      <div class="clearflx"></div>
      <div id="lofslidecontent45" class="lof-slidecontent">
        <div class="preload">
          <div></div>
        </div>
        <!-- MAIN CONTENT -->
        <div class="lof-main-outer" style="height:430px;">
		 
		
          <ul class="lof-main-wapper">
            <? 
$resultss = mysql_query("select * from events where publish='1' order by id desc");
		  // $qr = mysql_num_rows($resultss);
		   while($ress = mysql_fetch_array($resultss)) { 
		   $id= $ress['id'];
		   $rw = mysql_query("select * from event_gallery where event_id='$id' order by dateAdded desc LIMIT 0,1  ");
		  // echo "select * from event_gallery where id='$id'";
		  // $qr = mysql_num_rows($resultss);
		   $row = mysql_fetch_array($rw);
		   ?>
            <li> <img src="<?= $row['href'];?>" title="Newsflash 2" width="743" height="371"   >
              <div class="lof-main-item-desc">
                <h3><i> —
                  <?
 $dt=  $ress['dateAdded']; 
 echo "Published:".date("d F Y h:i:s A", strtotime("$dt")) . "\n";
	?>
                  </i></h3>
                <h2>
                  <?= $ress['title'];?>
                </h2>
                <a class="readmore" href="all_gallery.php?evt_gall=<?= $id; ?>">Read more </a>
                </p>
              </div>
            </li>
            <? } ?>
          </ul>
        </div>
        <!-- END MAIN CONTENT --> 
        <!-- NAVIGATOR -->
        <div class="lof-navigator-wapper">
          <div onClick="return false" href="" class="lof-next">Next</div>
          <div class="lof-navigator-outer">
            <ul class="lof-navigator">
              <? 
$resultss = mysql_query("select * from events where publish='1' order by id desc");
		  // $qr = mysql_num_rows($resultss);
		   while($ress = mysql_fetch_array($resultss)) { 
		   $id= $ress['id'];
		   $rw = mysql_query("select * from event_gallery where event_id='$id' order by dateAdded desc LIMIT 0,1  ");
		  // echo "select * from event_gallery where id='$id'";
		  // $qr = mysql_num_rows($resultss);
		   $row = mysql_fetch_array($rw);
		   ?>
              <li><img src="<?= $row['href'];?>" width="70" /></li>
              <? } ?>
            </ul>
          </div>
          <div onClick="return false" href="" class="lof-previous">Previous</div>
        </div>
        <!----------------- ---------------------> 
      </div>
    </div>
    <div class="video_gallery">
      <h1><a href="all_videos.php?trs=ts">latest trailers</a>
        <div class="red_line"></div>
      </h1>
      <div class="clearflx"></div>
      <? 
$resultss = mysql_query("select * from trailers where publish='1' order by id desc limit 0,2");
		  // $qr = mysql_num_rows($resultss);
		   while($ress = mysql_fetch_array($resultss)) {
		   
		   ?>
      <a href="#">
      <? 
 $data = $ress['link'];    
$embed = substr($data, strpos($data, "embed") + 6);    
 

?>
      <div class="latest_videos_block"> <a href="all_videos.php?trail_id=<?= $ress['id'];?>"><img src="http://img.youtube.com/vi/<?= $embed;?>/0.jpg" height="132" width="276"  /><img src="images/play_icon.png" class="play_icon"></a> </a> </div>
      <h4><a href="all_videos.php?trail_id=<?= $ress['id'];?>">
        <?= $ress['title'];?>
        </a></h4>
      <? } ?>
    </div>
    <div class="clearflx"></div>
  </div>
  <div class="health_news_block">
    <div class="helath_block1">
      <h1><a href="all_news.php?cat_id=4">health</a>
        <div class="red_line"></div>
      </h1>
      <div class="clearflx"></div>
      <? 
$resultss = mysql_query("select * from news where category_id='4' and publish='1' order by id desc limit 0,6");
		  // $qr = mysql_num_rows($resultss);
		   while($ress = mysql_fetch_array($resultss)) {
		   
		   ?>
      <div class="text_news_block">
        <div class="text_news_block_img"><img src="<?= $ress['href'];?>" width="133" height="83" /></div>
        <div class="text_news_block_text">
          <h4><a href="news_page.php?news_id=<?= $ress['id'];?>">
            <?= $ress['title'];?>
            </a>
            <p>
              <?= $ress['content'];?>
            </p>
          </h4>
          <div class="red_btn"><a href="news_page.php?news_id=<?= $ress['id'];?>">Read More</a></div>
          <span>-- Hyderabad<br />
          Published:March 17, 2017 5:53 am</span> </div>
        </a> </div>
      <? } ?>
    </div>
    <div class="helath_block2">
      <h1><a href="all_news.php?cat_id=5">sports</a>
        <div class="red_line"></div>
      </h1>
      <div class="clearflx"></div>
      <? 
$resultss = mysql_query("select * from news where category_id='5' and publish='1' order by id desc limit 0,6");
		  // $qr = mysql_num_rows($resultss);
		   while($ress = mysql_fetch_array($resultss)) {
		   
		   ?>
      <div class="text_news_block">
        <div class="text_news_block_img"><img src="<?= $ress['href'];?>" width="133" height="83"/></div>
        <div class="text_news_block_text">
          <h4><a href="news_page.php?news_id=<?= $ress['id'];?>">
            <?= $ress['title'];?>
            </a>
            <p>
              <?= $ress['content'];?>
            </p>
          </h4>
          <div class="red_btn"><a href="news_page.php?news_id=<?= $ress['id'];?>">Read More</a></div>
          <span>-- Hyderabad<br />
          Published:March 17, 2017 5:53 am</span> </div>
        </a> </div>
      <? } ?>
    </div>
    <div class="helath_block3">
      <h1><a href="all_news.php?cat_id=6">business</a>
        <div class="red_line"></div>
      </h1>
      <div class="clearflx"></div>
      <? 
$resultss = mysql_query("select * from news where category_id='6' and publish='1' order by id desc limit 0,6");
		  // $qr = mysql_num_rows($resultss);
		   while($ress = mysql_fetch_array($resultss)) {
		   
		   ?>
      <div class="text_news_block">
        <div class="text_news_block_img"><img src="<?= $ress['href'];?>" width="133" height="83" /></div>
        <div class="text_news_block_text">
          <h4><a href="news_page.php?news_id=<?= $ress['id'];?>">
            <?= $ress['title'];?>
            </a>
            <p>
              <?= $ress['content'];?>
            </p>
          </h4>
          <div class="red_btn"><a href="news_page.php?news_id=<?= $ress['id'];?>">Read More</a></div>
          <span>-- Hyderabad<br />
          Published:March 17, 2017 5:53 am</span> </div>
        </a> </div>
      <? } ?>
    </div>
  </div>
  <div class="clearflx"></div>
</div>
<div class="clearflx"></div>
</div>
<?
include("inc/inc_footer.php");

?>
</body>
<script type="text/javascript">

  $(document).ready(function() {
	  
	
});
</script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.easing.js"></script>
<script language="javascript" type="text/javascript" src="js/script.js"></script>
<script type="text/javascript">
 $(document).ready( function(){
	 
	 
	 var slides = document.querySelectorAll('#slides .slide');
var currentSlide = 0;
var slideInterval = setInterval(nextSlide,2000);

function nextSlide(){
    slides[currentSlide].className = 'slide';
    currentSlide = (currentSlide+1)%slides.length;
    slides[currentSlide].className = 'slide showing';
}
	 
	 
	 	<!---- Photo Gallery -->
		var buttons = { previous:$('#lofslidecontent45 .lof-previous') ,
						next:$('#lofslidecontent45 .lof-next') };
						
		$obj = $('#lofslidecontent45').lofJSidernews( { interval : 4000,
												direction		: 'opacitys',	
											 	easing			: 'easeInOutExpo',
												duration		: 1200,
												auto		 	: true,
												maxItemDisplay  : 4,
												navPosition     : 'horizontal', // horizontal
												navigatorHeight : 32,
												navigatorWidth  : 80,
												mainWidth:980,
												buttons			: buttons} );	
												
	<!---- Flash News Hide -->				
												
	$(".mobile_nav").hide();
  $('.close_icon').click(function() {
		$(".flash_news_block").hide('slow');
		
    });
	<!---- All Ads Hide -->	
	
	$('.close_btn').click(function() {
		$(".close").hide('slow');
		
    });
	
	 $(".nav_icon").click(function() {
		
		$(".mobile_nav").toggle(500);
		
		});
	});
</script>
</html>