MSV FM

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

<!DOCTYPE html>
<head>
<title></title>
	<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
	<script src="//code.jquery.com/jquery-1.10.2.js"></script>
	<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <link href="bootstrap.css" rel="stylesheet" />  
    <link href="bootstrap.min.css" rel="stylesheet" /> 
	<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css">
    <script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
	<script src="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script>
	
     <script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
     <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/smoothness/jquery-ui.css">
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>
<script src="month.js" ></script>
	<script src="monthpicker.min.js"></script>
	<script src="jquery.mtz.monthpicker.js"></script>

<style type="text/css">
td
{
	background-color:#6C1207;
	color:#FFF;
	font-size:12px;
}
th{
	font-size:12px;
	background-color:#6C1208;
	color:#FFF;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


 <script>
   $(function() {
    $( "#datepicker" ).datepicker();
  });
  
   $(function() {
   
	$('#monthpicker').monthpicker();
  });
   $(function() {
    $( "#yearpicker" ).monthpicker();
  });
  </script>
</head>

<body>
<header></header>
<nav>
</nav>
<section>

<div class="container"> 

<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="#"></a>
    </div>
    <ul class="nav navbar-nav">
      <li ><a href="index.php">Home</a></li>
      <li class="active"><a href="chart.php">Charts</a></li>
      <li><a href="#">Page 2</a></li> 
      <li><a href="#">Page 3</a></li> 
    </ul>
  </div>
</nav>

     
  <table class="table table-bordered">
    <thead>
      <tr>
        <th colspan="2">Daily Statistcs</th>
      </tr>
	</thead>
	<tbody>
	  <tr>
        <td colspan="2"><div id="myDailyStatistics" style="height: 250px;"></div></td>
	  </tr>
      <tr>
		<form method="post" action="">
		<td><input class="form-control" id="datepicker" name="created_date" type="text" placeholder="Select Date" required /></td>
	   <td><input class="form-control btn btn-info" type="button"  value="submit" /></td>
	   </form>
	 </tr>
   </tbody>
  </table>
</div>
<div class="container">      
  <table class="table table-bordered">
    <thead>
      <tr>
        <th>Monthly Statistcs</th>
      </tr>
	</thead>
	<tbody>
	  <tr>
        <td><div id="mymonthlystatistics" style="height: 250px;"></div></td>
	  </tr>
      <tr>
		<td><input class="form-control" id="monthpicker" name="month" type="text" placeholder="Select month/year" required /></td>
	 </tr>
   </tbody>
  </table>
</div>


<div class="container">      
  <table class="table table-bordered">
    <thead>
      <tr>
        <th>Monthly Statistcs</th>
      </tr>
	</thead>
	<tbody>
	  <tr>
        <td><div id="myyearlystatistics" style="height: 250px;"></div></td>
	  </tr>
      <tr>
		<td><input class="form-control" id="yearpicker" name="year" type="text" placeholder="Select month/year" required /></td>
	 </tr>
   </tbody>
  </table>
</div>


</section>

<!--?php 
  include("connection.php");
  $date=$_POST['$created_date'];
  $sql=mysql_query("select * from admin where created_date='$date'")or die(mysql_error());
?-->


<?php
$rows = '';
$date=$_POST['$created_date'];
include("connection.php");
$sql="SELECT * FROM  `population`";
$result=mysqli_query($con,$sql);

if($result) 
{
    $rows=mysqli_fetch_all($result,MYSQLI_ASSOC);
}

// Fetch all


// Free result set
mysqli_free_result($result);

mysqli_close($con);
?>
<script>
 
Morris.Line({
    // ID of the element in which to draw the chart.
    element: 'myDailyStatistics',
 
    // Chart data records -- each entry in this array corresponds to a point
    // on the chart.
    data: <?php echo json_encode($rows);?>,
 
    // The name of the data record attribute that contains x-values.
    xkey: 'name',
 
    // A list of names of data record attributes that contain y-values.
    ykeys: ['population'],
 
    // Labels for the ykeys -- will be displayed when you hover over the
    // chart.
    labels: ['population'],
 
    lineColors: ['white']
   
 
 
});


new Morris.Bar({
  // ID of the element in which to draw the chart.
  element: 'mymonthlystatistics',
  // Chart data records -- each entry in this array corresponds to a point on
  // the chart.
  data: [
    { year: '2008', value: 20 },
    { year: '2009', value: 10 },
    { year: '2010', value: 5 },
    { year: '2011', value: 5 },
    { year: '2012', value: 20 }
  ],
  // The name of the data record attribute that contains x-values.
  xkey: 'year',
  // A list of names of data record attributes that contain y-values.
  ykeys: ['value'],
  // Labels for the ykeys -- will be displayed when you hover over the
  // chart.
  labels: ['Value']
});
new Morris.Bar({
  // ID of the element in which to draw the chart.
  element: 'myyearlystatistics',
  // Chart data records -- each entry in this array corresponds to a point on
  // the chart.
  data: [
    { year: '2008', value: 20 },
    { year: '2009', value: 10 },
    { year: '2010', value: 5 },
    { year: '2011', value: 5 },
    { year: '2012', value: 20 }
  ],
  // The name of the data record attribute that contains x-values.
  xkey: 'year',
  // A list of names of data record attributes that contain y-values.
  ykeys: ['value'],
  // Labels for the ykeys -- will be displayed when you hover over the
  // chart.
  labels: ['Value']
});

</script>
</body>
</html>