	<?php 
	date_default_timezone_set("Africa/Nairobi");
	?>
	<!DOCTYPE html>
	<html lang="en">
	<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="">
	<meta name="author" content="">
	<link rel="icon" href="../images/favicon.png">

	<title>Deadly Force::People killed by the police in Kenya</title>

	<!-- Bootstrap core CSS -->
	<link href="css/bootstrap.css" rel="stylesheet">
	<!-- Bootstrap theme -->
	<link href="css/bootswatch_min.css" rel="stylesheet">

	<script src="js/jquery.min.js"></script>
	</head>

	<body role="document">
	<div class="container main">
    <div class="row">
	<div class="col-lg-12">
	<div class="well bs-component">
	<?php
	$servername = "localhost";
	$dbuser = "root";
	$dbpass = "root";
	$dbname = "deadly_force";
	
	try {
	$conn = new PDO("mysql:host=$servername;dbname=$dbname", $dbuser, $dbpass);
	// set the PDO error mode to exception
	$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
	//select victim count from the database
	$sthandler = $conn->prepare("select count(entry_no) as victims from police_killings");
	$sthandler->execute();
	$victimcount = $sthandler->fetch();
	$victims=$victimcount['victims'];
	}
	catch(PDOException $e)
	{
	echo "error" . "<br>" . $e->getMessage();
	}
    $conn = null;
	
	?>
	<div id="victims">0</div>
	<script type="text/javascript">
	$(document).ready(function() {
	$('#victims')
	.prop('number', 0)
	.animateNumber(
	{
	number: numeral(<?php echo $victims; ?>).format('0,0');
	},
	2000
	);
	return false;
	});
	</script>
	<style>
	#victims{font-size:150px;font-weight:bold;}
	</style>
	</div>
	</div>

	</div> <!-- /container -->


	<!-- Bootstrap core JavaScript
	================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	
	<script src="js/bootstrap.min.js"></script>
	<script src="js/bootswatch.js"></script>
	<script src="js/jquery.easing.1.3.js"></script>
	<script src="js/jquery.color.js"></script>
	<script src="js/jquery.animateNumber.js"></script>
	<script src="js/numeral.js"></script>
	</body>
	</html>
