<?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;}


label{color:#3D2B1F; margin-left:1%;  }

label a{ color: red; }

input[type=text],select, input[type=password]{  width: 100%;  padding: 14px;  border: 1px solid #ccc;  border-radius: 4px;  font-weight: bold; box-sizing: border-box;  margin-top: 10px;  margin-bottom: 5px;  resize: vertical; background: white;  color:#4B5320;}

input[type=submit] {  background:#007AA5;   font-weight: bold;  padding: 8px 10px; float: right; border: none;  border-radius: 3px;  cursor: pointer;  margin-top: 4%;   color: white; font-size: x-small;}

input[type=submit]:hover{ opacity: .6; }


.category-add{ float: left; width: 100%; box-shadow: 0px 2px 3px 2px  #E3DAC9; }
.category-head{ width: 100%; float: left; padding: 15px; background:#F5F5DC; font-size: small; font-weight: bolder; color:#007AA5;  }

.body-category{ width: 100%; float: left; padding: 15px; background: white; border-bottom: 3px solid #ED872D ;}


.category{ float: left; width: 100%;   }

.col-category-a  {  float: left;  width: 30%;  padding: 15px; }
.col-category-b  {  float: left;  width: 70%; padding: 15px; }


.success { padding: 15px; color:forestgreen; background:#C0E8D5;  font-weight: bold;  width: 100%;  font-size: x-small; margin: auto; text-align: left; margin-bottom: 3%; border-radius: 3px; }

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

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

</style>
</head>
<body>

  <nav class="category">
  <div class="col-category-a">

<nav class="category-add">
<nav class="category-head"> <a> <i class="fa fa-plus-circle"></i> CATEGORY PRODUCT </a></nav> 
<nav class="body-category">
 
<form action="" method="post">
<input type="hidden" name="id" value="<?php echo $id; ?>">

<label>Category Code <a> * </a></label>
<input type="text"  name="category_code"  value="<?php echo $category_code; ?>" placeholder="P002" required="autofocus" >


<label>Category Name <a> * </a></label>
<input type="text"  name="category_name"  value="<?php echo $category_name; ?>"  placeholder="Paints & Soundries" required="autofocus" >

<input type="submit" name="update" value="Update category">

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


  
  <div class="col-category-b">
<nav class="category-add">
<nav class="category-head"> <a> <i class="fa fa-shopping-basket"></i> MANAGE - Product Categories</a></nav> 
<nav class="body-category">
<?php include ("manage-categories.php"); ?>
</nav>
</nav>


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

</body>
</html>

