MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/bosweb/b1705/trinix19.ipage.com/Backup/latestnews/
File Upload :
Current < : /hermes/bosweb/b1705/trinix19.ipage.com/Backup/latestnews/sports.php

<html>
<head>
<meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="initial-scale=1, maximum-scale=1">
<title>Latest News Productions</title>


 	<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
 <link href="css/styles.css" rel="stylesheet" />
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <link href="css/animate.min.css" rel="stylesheet">

<!-- Custom CSS -->
 <link href="css/styles.css" rel="stylesheet" />

<!-- Core JS -->
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap.min.js"></script>

<!--Custom Js For News Ticker-->
   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="scripts/jquery.bootstrap.newsbox.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/endlessRiver.js"></script>
        <link type="text/css" rel="stylesheet" href="css/endlessRiver.css" /><script>
$(document).ready(function(){
    $("#myUl").endlessRiver();
});
</script>

<script type="text/javascript">
    $(function () {
        $(".demo1").bootstrapNews({
            newsPerPage: 1,
            autoplay: true,
			pauseOnHover:true,
            direction: 'down',
            newsTickerInterval: 4000,
            onToDo: function () {
               // console.log(this);

            }
        });
		
    });
</script>
<style>
#max-image{	
    width:  380px;
    height: 150px;
	background-size:cover;
}
</style>

<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">

</head>

<body>

<div class="container">
<div class="row">

<div class="col-md-3 col-sm-3 col-lg-3 col-xs-3">
 <img src="images/logo.jpeg" height="100" width="100" alt="logo" title="Latest News Productions"/>
</div>

<div class="col-md-7 col-xs-7 col-lg-7 col-sm-7" style="margin-top:2%;">
<form name="" method="post" action="search.php">
 <input type="text" name="subject" id="searchtext" placeholder="Search News"  class="form-control" style="width:40%;" />
 <input type="submit" name="submit" id="searchbtn" class="btn btn-warning" value="SEARCH NEWS" style="float:left;" />
 </form>
 </div>

<div class="col-md-2 col-xs-2 col-lg-2 col-sm-2">
 <!--<img src="images/vcr.png"  height="50" width="50" class="img-responsive side_logo" />
 <img src="images/lnlogo.png"  height="50" width="50"  class="img-responsive side_logo"/>
 <img src="images/mum.jpeg" height="50" width="50" class="img-responsive side_logo" />-->
</div>

<div class="pull-right">
<script type="text/javascript">
	var m_names = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
	var d_names = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
				
				var currentTime = new Date()
				var day = currentTime.getDay()
				var month = currentTime.getMonth()
				var date = currentTime.getDate()
				var year = currentTime.getFullYear()
				document.write( d_names[day] + ", " + date + " " + m_names[month] + " " + year + ", ")
				var currentTime = new Date()
				var hours = currentTime.getHours()
				var minutes = currentTime.getMinutes()
				if (minutes < 10){
				minutes = "0" + minutes
				}
				document.write(hours + ":" + minutes + " ")
				if(hours > 11){
				document.write("PM")
				} else {
				document.write("AM")
				}
			</script>
			</div>
        </div>
    </div> 
</div><!-- end of Container -->
    
      <nav class="navbar navbar-default">
            <div class="container">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="sr-only"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
             <div class="collapse navbar-collapse">
         <ul class="nav navbar-nav">
            <li><a href="index.php"  class="current">Home</a></li>
            <li><a href="crime.php">Crime Special</a></li>  
            <li><a href="politics.php">Politics</a></li> 
            <li class="active"><a href="sports.php">Sports</a></li> 
            <li><a href="blogs.php">Blogs</a></li>
          <li><a href="wishes.php">Wishes</a></li>  
            <li><a href="about.php">About Us</a></li>
            <li><a href="services.php">Services</a></li>                  
        </ul> 
<ul class="nav navbar-nav navbar-right">
<!--  <li><a href="kannada/" class="btn btn-warning">Kannada News</a></li> -->   
</ul>
</div>
 </div>
</nav>

<?php
	require 'connection.php';
    // Variables for the first page hit
	$start = 0;
	$page_counter = 0;
    $per_page = 4;
    $next = $page_counter + 1;
    $previous = $page_counter - 1;

    // Check the page location with start value sent by get request and change variable values accordingly
	if(isset($_GET['start'])){
		$start = $_GET['start'];
		$page_counter =  $_GET['start'];
		$start = $start *  $per_page;
		$next = $page_counter + 1;
		$previous = $page_counter - 1;
	}

	//placeholder variable to store result
	$result = null;
   
   // query to get messages from messages table
	$query =mysql_query("SELECT * FROM news_post WHERE category='sports' ORDER BY `id` DESC LIMIT $start, $per_page") or die(mysql_error());
	while($row = mysql_fetch_array($query)){
			    // store each row in result variable 
				 $img_url = "settings/uploads/"; 
				$body=(strlen($row[6])>200)?substr($row[6],0,300).'...<a href="main.php?id='.$row[0].'" style="color:blue;">
				<i class="fa fa-hand-o-up"></i>Know More</a>':$row[6];
				$result[] = '<div class="pull-left" style="padding-right:5%;">
				<img src="'.$img_url.$row['photo'].'" width="150px" height="100px" class="img-responsive"/>
				</div>
				
				<div class="pull-right" style="font-size:12px; color:red;">'.$row['date'].'</div> 
				<a href="main.php?id='.$row[0].'" style="color:blue; font-size:18px;">'.$row['subject']."</a> 
				<br>
				<p> ".$body.'</p>';
		}		
  // query to get total number of rows in messages table
	$count_query =mysql_query("SELECT * FROM news_post  WHERE category='sports'");
	$count = mysql_num_rows($count_query);
    
    // calculate number of paginations required based on row count 
	$paginations = ceil($count / $per_page);


?>
 <div class="container bg-logo">
 <div class="row">
 <div class="container">
<ul id="myUl">
<li style="background-color:#f67e4b; color:#fff;"> Breaking News: </li>
<?php
 include("connection.php");
 $sql=mysql_query("SELECT * FROM b_news ORDER BY id DESC") or die(mysql_error());
 $i=1;
 while($qq=mysql_fetch_array($sql)){
	echo '<li>'.$i++.". ".$qq['contents'].'</li>'; 
 } 
 ?>
</ul>
</div>
 <div class="col-md-8">
 <div class="panel panel-default">
<div class="panel-heading"> <span class="glyphicon glyphicon-list-alt">&nbsp;</span><b>HeadLines</b></div>
<div class="table-bordered">
<table class="table table-striped">
                  <tbody>
                   <?php 
                      for ($i=0; $i<count($result); $i++) { 
                          echo"<tr><td style='text-align:justify;'>".$result[$i]."</td><tr/>";
                      }
                   ?>
               </tbody>
       </table>
 </div>      
        <div class="pagination-wrap">
                <ul class="pagination">
                  <?PHP

                    if($page_counter == 0){
                        echo "<li><a href=?start='0' class='active'>0</a></li>";
                       for ($j=1; $j < $paginations; $j++) { 
                          echo "<li><a href=?start=$j>".$j."</a></li>";
                       }
                    }else{
                        echo "<li><a href=?start=$previous>Previous</a></li>"; 
                        for ($j=0; $j < $paginations; $j++) {
                         if ($j == $page_counter) {
                            echo "<li><a href=?start=$j class='active'>".$j."</a></li>";
                         }else{
                            echo "<li><a href=?start=$j>".$j."</a></li>";
                         } 
                      }if($j != $page_counter+1)
                        echo "<li><a href=?start=$next>Next</a></li>"; 
                    } 
                    
                  ?>
                </ul>
      </div>
 </div>
 </div>

 <div class="container">
<div class="row">
<div class="col-md-4">
 
<div class="panel panel-default">
<div class="panel-heading"> <span class="glyphicon glyphicon-th"></span><b> Advertisements</b></div>
<div class="panel-body">
<div class="row">
<?php
include("connection.php");
$query=mysql_query("SELECT * FROM advertisement LIMIT 8") or die(mysql_error());
while($sql=mysql_fetch_array($query)){
	echo '<div class="col-xs-6">
<a href="#" class="thumbnail">
             <img src="settings/advertisement/uploads/'.$sql['shortname'].'"  id="max-image" class="img-responsive">
        </a>
 </div>';
}

?>
  </div>
</div>
</div>

<div class="panel panel-default">
 <div class="panel-body">
  <a id="play-video" href="<?php echo "https://www.youtube.com/watch?v=3TGglUr0iRo"; ?>">Play Video</a><br />
                                         <?php
 $url =  "https://www.youtube.com/watch?v=3TGglUr0iRo";
preg_match(
        '/[\\?\\&]v=([^\\?\\&]+)/',
        $url,
        $matches
    );
$id = $matches[1];
 
$width = '100%;';
echo '<object style="width=' . $width.'"><param name="movie" value="http://www.youtube.com/v/' . $id . '&amp;hl=en_US&amp;fs=1?rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/' . $id . '&amp;hl=en_US&amp;fs=1?rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="' . $width . '"></embed></object>';

?>
</div> 
 </div>
 </div>
  </div>
  </div>
  </div>
  </div>
  <footer id="footer">
        <div class="container">
            <div class="row">
			<div class="col-md-12">
                <div class="col-sm-4 footer">
                <h4><i>Quick Links </i></h4>
          <a href="crime.php">Crime Special</a><br />
		    <a href="sports.php">Sports</a><br />
			  <a href="politics.php">Politics</a><br />
          <a href="services.php">Services</a><br />
          <a href="about.php">About Us</a>   <br />      
          <a href="blogs.php">Blogs</a><br />
                </div>
                
                 <div class="col-sm-4 footer">
              <h4><i>Contact Us </i></h4>
                 <p>Latest News Productions<br />
                 Quadras Compound,<br />
                 Opp. 5th Cross, Near Afco Building, Bejai Post,<br />
                 Bejai-Kapikad, Mangalore - 575 004.
                 </p>
                 <p>Tel: 0824 - 4281040 | Mob: +91 8197981372.<br />
                 E-mail: latestnewsmlr@gmail.com <br />
                    
                </div>
                <div class="col-md-4 footer">
                 <h4><i>Follow Us On.</i> </h4>
                    <ul class="social-icons" style="margin-top:10%;">
                       <a href="https://www.facebook.com/Latestnewsproductions-116468242090195/?skip_nax_wizard=true" target="_blank" style="font-size:40px; margin-right:20px; float:left;"><i class="fa fa-facebook"></i></a>
                       <a href="https://plus.google.com/u/0/b/116789468993451672502/116789468993451672502"  target="_blank" style="font-size:40px; margin-right:20px; float:left;"><i class="fa fa-google-plus"></i></a>
                       <a href="https://www.youtube.com/channel/UC9Puo-FWjo8fqPNn7tHXDwA"  target="_blank" style="font-size:40px; margin-right:20px; float:left;"><i class="fa fa-youtube"></i></a>
                    </ul>
                </div>
               </div> 
                <div class="col-md-12">
                <div class="pull-right">
                <h6> Developed & Maintained By: <a href="http://trinixtechnologies.com" target="_blank">Trinix Technologies Pvt. Ltd. </a></h6>
				</div>
                <h6> Copyright &copy; - LatestNews <?php echo date("Y");?> </h6>
                </div>
            </div>
        </div>
    </footer>
<!--/#footer-->

<script>
	$(document).ready(function() {
  $('#play-video').on('click', function(ev) {
 
    $("#video")[0].src += "&autoplay=1";
    ev.preventDefault();
 
  });
});
</script>

</body>
</html>