<?php 
  session_start(); 

  if (!isset($_SESSION['username'])) {
    $_SESSION['msg'] = "To access this page, Login is required";
    header('location: login.php');
  }
  if (isset($_GET['logout'])) {
    session_destroy();
    unset($_SESSION['username']);
    header("location: login.php");
  }
?>

<!DOCTYPE>
<html lang="en">
<head>
<title></title>
<meta charset="utf-8">
<head> <link rel="icon" type="image/png" href="images/logo.png"/>

<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
 body { font-family: helvetica, sans-serif; }
* {  box-sizing: border-box;}
body {  margin: 0;}


.wrapper{ background:#F5F5F5;  width:100%; border: 0px solid #a1a1a1;  margin:auto; resize: none;     overflow:hidden; }

.column-a {  float: left;  width:18%;  padding: 0px; height: 90%; background:white ;border-top: 2px solid whitesmoke;  overflow-x: auto; scrollbar-width: thin; }

.column-b { float: left; width: 82%;  padding: 15px; overflow-x: auto; scrollbar-width: thin; height: 90%; }


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

@media screen and (max-width:600px) {
  .column-a { width: 100%; height: auto; }
  .column-b {  width: 100%; height:auto; } }

</style>
</head>
<body>


<div class="row">

<div class="wrapper">

  <nav> <?php include "header.php"; ?></nav>


  <div class="column-a"><?php include "menu.php"; ?>  </div>
  
  <div class="column-b">
  <?php
if(@$_GET['link']=="001profile"){ include("profile.php");
}else if(@$_GET['link']=="002staffaccounts"){ include("staff-accounts.php");
}else if(@$_GET['link']=="003managestaffs"){ include("manage-staffs.php");

}else if(@$_GET['link']=="product-categories"){ include("product-category.php");

}else if(@$_GET['link']=="001products"){ include("add-products.php");
}else if(@$_GET['link']=="002products"){ include("manage-products.php");


}else if(@$_GET['link']=="001release"){ include("release-products.php");
}else if(@$_GET['link']=="002products"){ include("manage-products.php");

}else if(@$_GET['link']=="001report"){ include("dailyreport.php");
}else if(@$_GET['link']=="002report"){ include("monthlyreport.php");

}else if(@$_GET['link']=="101sales"){ include("dailysales-report.php");
}else if(@$_GET['link']=="102sales"){ include("monthlysales-report.php");

}else if(@$_GET['link']=="101returned"){ include("returned.php");
}else if(@$_GET['link']=="102returned"){ include("returned.php");

}else if(@$_GET['link']=="001loan"){ include("loanitems.php");

}else if(@$_GET['link']=="001returned"){ include("001returned.php");

}else if(@$_GET['link']=="001track"){ include("track-stock.php");
}else if(@$_GET['link']=="002track"){ include("track-items-returned.php");


}else if(@$_GET['link']=="101order"){ include("orders.php");

}else{ include("body.php"); }?>
  </div>

 <?php include ("footer.php"); ?>

</div>

</div>
</body>
</html>
