<?php
session_start();
/*
try {
    if (isset($_COOKIE["session"])) { 
        //echo 'Cookie is active!';
        $lifetime=60*60;
        setcookie("session", "1", time() + $lifetime, "/");
    } else{ 
        //echo 'Cookie is NOT active!';
        header("Location: /login.php"); 
    }
    $auth = $_SESSION["auth"];
    if (!$auth){
        header("Location: /login.php"); 
    }
} catch(Exception $e){
    header("Location: /login.php"); 
}
*/
?>

<div class="container-fluid">

	<div class="row">
		<div class="col-lg-3 col-sm-6">
			<div class="card">
				<div class="content">
					<div class="row">
						<div class="col-xs-5">
							<div class="icon-big icon-warning text-center">
								<i class="ti-home"></i>
							</div>
						</div>
						<div class="col-xs-7">
							<div class="numbers">
								<p>Pengilang</p>
								+5
							</div>
						</div>
					</div>
					<div class="footer">
						<hr />
						<div class="stats">
							<i class="ti-reload"></i> Updated now
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="col-lg-3 col-sm-6">
			<div class="card">
				<div class="content">
					<div class="row">
						<div class="col-xs-5">
							<div class="icon-big icon-success text-center">
								<i class="ti-package"></i>
							</div>
						</div>
						<div class="col-xs-7">
							<div class="numbers">
								<p>Produk</p>
								+3
							</div>
						</div>
					</div>
					<div class="footer">
						<hr />
						<div class="stats">
							<i class="ti-calendar"></i> Last day
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="col-lg-3 col-sm-6">
			<div class="card">
				<div class="content">
					<div class="row">
						<div class="col-xs-5">
							<div class="icon-big icon-info text-center">
								<i class="ti-rss-alt"></i>
							</div>
						</div>
						<div class="col-xs-7">
							<div class="numbers">
								<p>Pelekat</p>
								230
							</div>
						</div>
					</div>
					<div class="footer">
						<hr />
						<div class="stats">
							<i class="ti-timer"></i> In the last hour
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="col-lg-3 col-sm-6">
			<div class="card">
				<div class="content">
					<div class="row">
						<div class="col-xs-5">
							<div class="icon-big icon-danger text-center">
								<i class="ti-comment-alt"></i>
							</div>
						</div>
						<div class="col-xs-7">
							<div class="numbers">
								<p>Kes</p>
								+15
							</div>
						</div>
					</div>
					<div class="footer">
						<hr />
						<div class="stats">
							<i class="ti-reload"></i> Updated now
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row">

		<div class="col-md-12">
			<div class="card">
				<div class="header">
					<h4 class="title">Perkhidmatan Mengikut Industri - TOYS</h4>
					<p class="category">24 Hours performance</p>
				</div>
				<div class="content">
					<div id="chartHours" class="ct-chart"></div>
					<div class="footer">
						<div class="chart-legend">
							<i class="fa fa-circle text-info"></i> Penjualan Stiker
							<i class="fa fa-circle text-danger"></i> Pelaporan Kes
							<i class="fa fa-circle text-warning"></i> Permohonan
						</div>
						<hr>
						<div class="stats">
							<i class="ti-reload"></i> Updated 3 minutes ago
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-md-6">
			<div class="card">
				<div class="header">
					<h4 class="title">Statistik Pelaporan Kes</h4>
					<p class="category">Action Taken Performance</p>
				</div>
				<div class="content">
					<div id="chartPreferences" class="ct-chart ct-perfect-fourth"></div>

					<div class="footer">
						<div class="chart-legend">
							<i class="fa fa-circle text-info"></i> Selesai
							<i class="fa fa-circle text-danger"></i> Baru
							<i class="fa fa-circle text-warning"></i> Dalam Tindakan
						</div>
						<hr>
						<div class="stats">
							<i class="ti-timer"></i> Campaign sent 2 days ago
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="col-md-6">
			<div class="card ">
				<div class="header">
					<h4 class="title">2018 Pembelian Stiker</h4>
					<p class="category">All products including Taxes</p>
				</div>
				<div class="content">
					<div id="chartActivity" class="ct-chart"></div>

					<div class="footer">
						<div class="chart-legend">
							<i class="fa fa-circle text-info"></i> Permohonan
							<i class="fa fa-circle text-warning"></i> Stiker MYORI
						</div>
						<hr>
						<div class="stats">
							<i class="ti-check"></i> Data information certified
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	
</div>



<!--  Charts Plugin -->
<script src="assets/js/chartist.min.js"></script>

<!--  Notifications Plugin    -->
<script src="assets/js/bootstrap-notify.js"></script>

<!--  Google Maps Plugin    -->
<!--
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js"></script>
-->

	<script src="/assets/js/app.js"></script>

<!-- Paper Dashboard DEMO methods, don't include it in your project! -->
<script src="assets/js/demo.js"></script>



<script type="text/javascript">
    $(document).ready(function(){
        
        var pieX = ['30%','30%','40%'];
        var pieY = [30, 30, 40];

        demo.initChartist(pieX, pieY);
        
        var url = "";
        url = getBase();
        
        $.notify({
            icon: 'ti-gift',
            message: "Welcome, <b>Manufacturer</b> to <b>MyOri Dashboard</b>"

        },{
            type: 'success',
            timer: 4000
        });         
        
    });
</script>