<?php
require_once '../includes/core.php';
require '../includes/connect.php';


$count = @current(@mysql_fetch_assoc(@mysql_query("SELECT count('user_id') FROM users")));

$count1 = @current(@mysql_fetch_assoc(@mysql_query("SELECT count('id') FROM transaction ")));


$count5 = @current(@mysql_fetch_assoc(@mysql_query("SELECT count('id') FROM orders ")));




if (loggedinadmin()){


$adminname = getfield1('name','admin','admin-id');
$admin_id = getfield1('admin-id','admin','admin-id');
$password = getfield1('password','admin','admin-id');

}else{ 
	header('Location:../loginexec.php');
}



?>






<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Admin  - Dashboard</title>


<link rel="icon" type="image/png" href="../assets/img/favicon.png">

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/datepicker3.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<link rel="stylesheet" href="css/ionicons.min.css">

<!--Icons-->
<script src="js/lumino.glyphs.js"></script>

<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->

</head>

<body>

    <?php include ('includes/header.php')  ?>

    <?php include ('includes/leftnav.php')  ?>
	
	
		
	<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main" style="margin-top: 20px">			
		<div class="row">
			<ol class="breadcrumb">
				<li><a href="#"><svg class="glyph stroked home"><use xlink:href="#stroked-home"></use></svg></a></li>
				<li class="active">home</li>
			</ol>
		</div><!--/.row-->
		
		<div class="row">
			<div class="col-lg-12">
				<h1 class="page-header">Dashboard</h1>
			</div>
		</div><!--/.row-->
		
		<div class="row">


		<div class="col-xs-12 col-md-6 col-lg-3">
				<div class="panel panel-teal panel-widget" style="height: 100px">
					<div class="row no-padding">
						<div class="col-sm-3 col-lg-5 widget-left" style="height: 100px">
							<svg class="glyph stroked male-user"><use xlink:href="#stroked-male-user"></use></svg>
						</div>
						<div class="col-sm-9 col-lg-7 widget-right">
							<div class="large"><?php echo "$count";  ?></div>
							<div class="text-muted">Total Users</div>
						</div>
					</div>
				</div>
			</div>



			<div class="col-xs-12 col-md-6 col-lg-3">
				<div class="panel panel-orange panel-widget" style="height: 100px">
					<div class="row no-padding">
						<div class="col-sm-3 col-lg-5 widget-left" style="height: 100px">
							<div class="ion-cash large"></div>
						</div>
						<div class="col-sm-9 col-lg-7 widget-right">
							<div class="large"><?php echo "$count5";  ?></div>
							<div class="text-muted">Total Orders</div>
						</div>
					</div>
				</div>
			</div>



			




			
			
			
			

		</div><!--/.row-->




		
		
		
	
								
	
	</div>	<!--/.main-->

	<script src="js/jquery-1.11.1.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/chart.min.js"></script>
	<script src="js/chart-data.js"></script>
	<script src="js/easypiechart.js"></script>
	<script src="js/easypiechart-data.js"></script>
	<script src="js/bootstrap-datepicker.js"></script>
	<script>
		$('#calendar').datepicker({
		});

		!function ($) {
		    $(document).on("click","ul.nav li.parent > a > span.icon", function(){          
		        $(this).find('em:first').toggleClass("glyphicon-minus");      
		    }); 
		    $(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");
		}(window.jQuery);

		$(window).on('resize', function () {
		  if ($(window).width() > 768) $('#sidebar-collapse').collapse('show')
		})
		$(window).on('resize', function () {
		  if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')
		})
	</script>	
</body>

</html>
