<?php 
  if (!isset($_SESSION['username'])) {
    $_SESSION['msg'] = "To access this page, Login is required";
    header('location: login.php');
  }  ?>
<!DOCTYPE>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.col-category {  float: left;  width:100%;   background: white;  box-shadow: 0px 2px 3px 2px  #E3DAC9; }
.category-head { float: left; width: 100%; padding: 5px; background: #FEFEFA ;  font-weight: bold;  color:#848482; text-align: left;}
.category-body { float: left; width: 100%;  }

.category-body-b { float: left; text-align: left;  text-decoration: none; width: 100%; font-size: small; font-weight: bold;padding: 10px; margin-top: 2%;  }
.category-body-b a { text-decoration: none;  color: #007AA5; margin-left: 1%; }

.category-a{ float: left; width: 100%;  padding: 15px;  }
.category-b{ float: left; width: 40%;   padding: 15px; display: none; }


.basket { float: right; margin-right: 5%; }

.fa-shopping-cart { float: right; margin-right: 5%; }

.category-head p { margin-left: 3%; }

/* Clear floats after the col-categorys */
.row:after {
  content: "";
  display: table;
  clear: both;
}

@media screen and (max-width:600px) {
  .col-category {  width: 100%;   }

  .category-a { width:100%; }
  .category-b{ width:100%;  float: left;} }

</style>
</head>
<body>


<div class="row">

  <div class="col-category">
    <nav class="category-head"> <p> <i class="fa fa-calendar cal"> </i> SALES  -  <a class="time"><?php $date = new DateTime(); echo $date->format('l, F jS, Y'); ?> </a> <a style="font-weight: lighter;">  <a style="background: skyblue; color: white; font-weight: bolder; padding:4px 10px; border-radius: 50%; float: right;"> <?php $sql = "SELECT * FROM product_sales   where time >= CURDATE() AND YEAR(time) = YEAR(CURRENT_DATE) ";     
$result = mysqli_query($conn,$sql); $rowcount=mysqli_num_rows($result);
  printf(" %d \n ",$rowcount);?></a> </a>  </p></nav>

<div class="category-a">
<nav class="category-body">
<?php include("daily-sales.php"); ?>
</div>

<nav class="category-body-b"><a href="index.php?link=101sales">  <i class="fa fa-plus-circle"></i>  Manage daily Sales</a></nav>

<div class="category-b"> 
   <?php include("charts/chart-1.php"); ?>
</div>


</nav>
 
 </div>
  
</nav>

  
</div>

</body>
</html>
