<?php

	include_once('includes/connect_database.php'); 

	include_once('functions.php'); 

?>



<?php



	//Total order count

	$sql_order = "SELECT COUNT(*) as num FROM tbl_order";

	$total_order = mysqli_query($connect, $sql_order);

	$total_order = mysqli_fetch_array($total_order);

	$total_order = $total_order['num'];



	//Total category count

	$sql_category = "SELECT COUNT(*) as num FROM tbl_category";

	$total_category = mysqli_query($connect, $sql_category);

	$total_category = mysqli_fetch_array($total_category);

	$total_category = $total_category['num'];



	//Total menu count

	$sql_menu = "SELECT COUNT(*) as num FROM tbl_menu";

	$total_menu = mysqli_query($connect, $sql_menu);

	$total_menu = mysqli_fetch_array($total_menu);

	$total_menu = $total_menu['num'];



?>

<!-- Content Header (Page header) -->

                <section class="content-header">

                    <h1>

                        Dashboard

                        <small>Control panel</small>

                    </h1>

                   <!-- <ol class="breadcrumb">

                        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>

                        <li class="active">Dashboard</li>

                    </ol>-->

                </section>



                <!-- Main content -->

                <section class="content">

      <!-- Small boxes (Stat box) -->

                    <div class="row">

                        <div class="col-lg-3 col-xs-6">

                            <!-- small box -->

                            <div class="small-box bg-aqua">

                                <div class="inner">

                                    <h3>

                                        <?php echo $total_order; ?>

                                    </h3>

                                    <p>

                                        Order List 

                                    </p>

                                </div>

                                <div class="icon">

                                    <i class="fa fa-fw fa-shopping-cart"></i>

                                </div>

                                <a href="pemesanan.php" class="small-box-footer">

                                    More info <i class="fa fa-arrow-circle-right"></i>

                                </a>

                            </div>

                        </div><!-- ./col -->

                        <div class="col-lg-3 col-xs-6">

                            <!-- small box -->

                            <div class="small-box bg-green">

                                <div class="inner">

                                    <h3>

                                        <?php echo $total_category; ?>

                                    </h3>

                                    <p>

                                        Category

                                    </p>

                                </div>

                                <div class="icon">

                                    <i class="fa  fa-folder"></i>

                                </div>

                                <a href="category.php" class="small-box-footer">

                                    More info <i class="fa fa-arrow-circle-right"></i>

                                </a>

                            </div>

                        </div><!-- ./col -->

                        <div class="col-lg-3 col-xs-6">

                            <!-- small box -->

                            <div class="small-box bg-yellow">

                                <div class="inner">

                                    <h3>

                                    

                                    <?php echo $total_menu; ?>    

                                    </h3>

                                    <p>

                                        Total Product 

                                    </p>

                                </div>

                                <div class="icon">

                                    <i class="ion ion-person-add"></i>

                                </div>

                                <a href="menu.php" class="small-box-footer">

                                    More info <i class="fa fa-arrow-circle-right"></i>

                                </a>

                            </div>

                        </div><!-- ./col -->

                        <div class="col-lg-3 col-xs-6">

                            <!-- small box -->

                            <div class="small-box bg-red">

                                <div class="inner">

                                    <h3>

                                    	&nbsp;

                                        </h3>

                                    <p>

                                        Setting

                                    </p>

                                </div>

                                <div class="icon">

                                    <i class="fa fa-gear"></i>

                                </div>

                                <a href="admin.php" class="small-box-footer">

                                    More info <i class="fa fa-arrow-circle-right"></i>

                                </a>

                            </div>

                        </div><!-- ./col -->

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



              

                </section><!-- end -->

<?php include_once('includes/close_database.php'); ?>