<!--Registration-->
<div class="modal fade" id="Register" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog" role="document">
<div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title " id="exampleModalLabel">#Customer Registration</h5>
<button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body"><p class="text-danger text-center"><i class="fa fa-info-circle"></i> Ensure Customer Does not Previously Exist</p><form action="" method="POST"><div class="row"><div class="form-group col-md-12"><input type="text" name="eqName" class="form-control" required placeholder="Full Name"></div><div class="form-group col-md-6"><input type="text" name="eqPhone" class="form-control" required placeholder="Phone Number" maxlength="11" minlength="11" autocomplete="off"></div>
<div class="form-group col-md-6"><input type="text" name="eqEmail" class="form-control"  placeholder="Email"></div><div class="form-group col-md-6"><select class="form-control" required name="prog_type" >
<option value="">--Customer Type-</option> <?php   foreach(mysqli_query($dbconn,"SELECT * FROM category") as $crs){echo '<option value='.$crs['id'].'>'.$crs['type'].'</option>';}?></select></div>
<div class="col-md-6 mb-2"><select class="form-control pcountry" name="pcountry" id="country" ><option value="">[Choose Country]</option> <?php  foreach(QueryDB("SELECT * FROM countries ORDER BY status DESC  ")as $ct){?><option value="<?php echo $ct['name']; ?>" id="<?php echo $ct['id']; ?>"><?php echo $ct['name']; ?></option> <?php  } ?></select></div><div class="col-md-6 mb-2">
<select class="form-control pstate" name="pstate" id="state" ><option value="">[Choose State]</option></select></div><div class="form-group col-md-6"><select class="form-control" required name="eqSex">
  <option value="">--Sex-</option>  <option value="M">Male</option> <option value="F">Female</option> </select></div><div class="form-group col-md-12"><textarea class="form-control" name="eqAddress" placeholder="Address"></textarea></div><div class="form-group col-md-12">
<input type="submit" name="postReg" value="Add Customer" class="form-control btn btn-secondary">
</div></div></form>    </div><div class="modal-footer"><button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button></div></div></div></div>


<!--Add Size-->
<div class="modal fade" id="addSize" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-center modal-sm" role="document"><div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title " id="exampleModalLabel">#Add New Size</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body"><form action="" method="POST"><div class="row"><div class="form-group col-md-12"><input type="text" name="Newsize" class="form-control" required placeholder="New Size"></div><div class="form-group col-md-12"><input type="submit" name="addSize" value="Add" class="form-control btn btn-secondary"></div></div></form></div></div></div></div><!--END-->

<!--NEW COLOUR-->
<div class="modal fade" id="addColour" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-center modal-sm" role="document">
<div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title " id="exampleModalLabel">#Add New Product Colour</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body"><form action="" method="POST"><div class="row"><div class="form-group col-md-12"><input type="text" name="NewColour" class="form-control" required placeholder="New Colour"></div><div class="form-group col-md-12"><input type="submit" name="addColour" value="Add" class="form-control btn btn-secondary">
</div></div></form></div></div></div></div>
<!--END-->

<!--ADD BRAND-->
<div class="modal fade" id="addbrand" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-center modal-sm" role="document">
<div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title " id="exampleModalLabel">#Add a Brand</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body">
<p class="text-danger text-center">Brand are the classifications of your Product e.g. Fridge, Wood Wine. etc.</p><form action="" method="POST"><div class="row"><div class="form-group col-md-12"><input type="text" name="brandName" class="form-control" required placeholder="Brand Name"></div><div class="form-group col-md-12"><input type="submit" name="addBrand" value="Add" class="form-control btn btn-secondary"></div></div></form></div></div></div></div>
<!--END-->

<!--ADD Company-->
<div class="modal fade" id="addCompany" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-center modal-sm" role="document">
<div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title small" id="exampleModalLabel">#Company/Supplier</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body">
<p class="text-danger text-center">Company Name like Thermocool, Samsung,Vostro etc.</p><form action="" method="POST"><div class="row"><div class="form-group col-md-12"><input type="text" name="compName" class="form-control" required placeholder="Company Name"></div><div class="form-group col-md-12"><input type="submit" name="addCompany" value="Add" class="form-control btn btn-secondary"></div></div></form></div></div></div></div>
<!--END-->


<!--ADD Company-->
<div class="modal fade" id="addProduct" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-center" role="document">
<div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title" id="exampleModalLabel">#Add Product</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body">
<p class="text-danger text-center">ADD THE VARIOUS PRODUCTS YOUR SELL</p><form action="" method="POST"><div class="row"><div class="form-group col-md-8"><input type="text" name="prodname" class="form-control" required placeholder="Product Name e.g. LK100 or 3.75KVA"></div>
<div class="form-group col-md-4"><input type="text" name="cost" class="form-control" required placeholder="cost" onkeypress="return isNumberKey(event)"></div>
  <div class="form-group col-md-6"><select class="form-control" required name="company"><?php 
  for($i=0;$i<count($company);$i++){echo '<option value='.$i.'>'.$company[$i].'</option>';
  }?></select></div><div class="form-group col-md-6"><select class="form-control" required name="brand">
<option value="">--Brand--</option> <?php for($i=0;$i<count($brand);$i++){echo '<option value='.$i.'>'.$brand[$i].'</option>';}?></select></div><div class="form-group col-md-6"><select class="form-control" required name="size"><option value="">--Sized By-</option> <?php for($i=0;$i<count($sized_by);$i++){echo '<option value='.$i.'>'.$sized_by[$i].'</option>';}?></select></div><div class="form-group col-md-6"><select class="form-control" required name="color"><option value="">--Colour--</option> <?php 
  for($i=0;$i<count($colored_by);$i++){echo '<option value='.$i.'>'.$colored_by[$i].'</option>';
  }?></select></div><div class="form-group col-md-12"><input type="submit" name="addProduct" value="Add Product" class="form-control btn btn-secondary"></div></div></form></div></div></div></div>
<!--END-->

<!--Load Item--> 
<div id="loadItem" class="modal fade" role="dialog"><div class="modal-dialog modal-sm"><div class="modal-content"><div class="modal-header bg-secondary"><h4 class="modal-title  text-white">#Load Item/Product</h4></div><div class="modal-body"> <form action="" method="POST"><div class="row"> <p id="showProdInfo"></p><div class="form-group col-md-12"><label>Item</label><select name="itemName" class="form-control col-md-12" id="getInfo" style="width:100%;" required><option value="">-Select-</option><?php foreach(QueryDB("SELECT * FROM products where tm_status=1 ORDER BY item_name ASC  ") as $rows){echo '<option value="'.$rows['id'].'">'.$rows['item_name'].'</option>'; }?></select></div><div class="form-group col-md-12"><label>Quantity</label><input type="number" name="qty" class="form-control"></div><div class="form-group col-md-12"><button type="submit" name="stockUp" class="form-control btn btn-secondary">Load Store</button></div></div></form></div><div class="modal-footer"><button type="button" class="btn btn-danger"data-bs-dismiss="modal">Close</button></div></div></div></div>
<!--END-->

<!--Buy Item-->
<div id="addPurchase" class="modal fade" role="dialog"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header bg-primary"><h4 class="modal-title  text-white">PRODUCT SALES</h4></div><div class="modal-body"> 


</div>
<div class="modal-footer"><button type="button" class="btn btn-danger"data-bs-dismiss="modal">Close</button></div></div></div></div>



<!--VIEW PRODUCT STOCK HISTORY-->
<div class="modal fade" id="viewProdStats" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-center modal-sm" role="document"><div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title " id="exampleModalLabel">#Product Stocking</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body"><form action="" method="POST"><div class="row"><div class="form-group col-md-12">
<select class="form-control" name="viewProd">
<?php foreach(QueryDB("SELECT * FROM products ORDER BY item_name ASC")as $prd){
echo '<option value="'.$prd['id'].'">'.$prd['item_name'].'</option>';
}?></select></div><div class="form-group col-md-12"><input type="submit" name="addSize" value="Add" class="form-control btn btn-secondary"></div></div></form></div></div></div></div>


<!--View Customer-->
<div class="modal fade" id="view_cust_set" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-center modal-sm" role="document"><div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title " id="exampleModalLabel">#Customer View</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body"><form action="manage_reg" method="POST"><div class="form-group col-md-12"><select class="form-control" name="eqCourse"><option value="">--Cust. Type-</option> <?php   foreach(QueryDB("SELECT * FROM category") as $crs){?><option value="<?php echo $crs['id'];  ?>"    ><?php echo ($crs['type']);  ?></option><?php } ?></select></div><div class="form-group col-md-12"><select class="form-control"  name="month" ><option value="">--choose Month-</option> <?php   for($i=1;$i<13;$i++){?><option value="<?php echo $i;  ?>"    ><?php echo monthName($i);  ?></option><?php } ?></select></div><div class="form-group col-md-12"><input type="text" name="year" placeholder="year" maxlength="4" minlength="4" class="form-control"></div><input type="submit" name="sendFilter" value="Filter" class="form-control btn btn-warning col-md-12"></div></form></div></div></div></div>





<!--Add a Course-->
<!--Add a Course-->
<div id="addCrs" class="modal fade" role="dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header bg-secondary"><h4 class="modal-title  text-white">#Add Course</h4></div><div class="modal-body"> <form action="" method="POST">
<div class="row"> <div class="form-group col-md-12"><label>Course/Item</label>
<select name="crsName" class="form-control myselect" id="pickCrsName" style="width:100%;" required>
  <option value="A">-Select-</option>
<?php foreach(QueryDB("SELECT * FROM courses   ") as $rows){
  echo '<option value="'.$rows['id'].'">'.$rows['crs_title'].'</option>'; }?>
</select></div>

<div class="col-md-12"><input type="text" id="showNewName" name="newCourseName" class="form-control mb-1 mt-1" placeholder="New Course Name"></div>

<div class="form-group col-md-6"><input placeholder="Cost" type="number" id="crsCost" name="crsCost" class="form-control"></div>

<div class="form-group col-md-6"><input placeholder="Duration" type="number" id="crsDuration" name="crsDuration" class="form-control"></div>

<div class="form-group col-md-6"><label>Reg Cost</label><input placeholder="RegCost" type="number" id="regCost" name="regCost" class="form-control"></div>

<div class="form-group col-md-6"><label>Sort Code</label><input placeholder="Sort Code" minlength="4" maxlength="4" type="text" id="crsSorted" name="crsSort" class="form-control"></div>


<div class="form-group col-md-12"><textarea class="form-control" id="crsDesc" name="crsDesc"></textarea></div>

<div class="form-group col-md-12"><textarea class="form-control" id="crsCert" name="crsCert">attended,completed and passed the administered exams in

</textarea></div>


<div class="form-group mt-2 col-md-12"><button type="submit" name="add_crs" class="form-control btn btn-secondary">Add Course</button></div>
</div></form></div><div class="modal-footer"><button type="button" class="btn btn-danger"data-bs-dismiss="modal">Close</button>
</div></div></div></div>


<div class="modal fade" id="fInventory" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-center modal-sm" role="document"><div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title " id="exampleModalLabel">#Filter Payment</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body"><form action="?view_setItem" method="POST"><div class="form-group col-md-12"><label>FROM</label>
<input type="date" required name="from" class="form-control"></div><div class="form-group col-md-12"><label>TO</label><input required type="date" name="to" class="form-control"></div>
<input type="submit" name="sendFilterInv" value="Filter" class="form-control btn btn-warning col-md-12"></form></div></div></div></div>


<div class="modal fade" id="filterSalesHistory" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-center modal-sm" role="document"><div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title " id="exampleModalLabel" >#Filter Sales History</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body"><form action="?salesHistory" method="POST"><div class="form-group col-md-12"><label>FROM</label>
<input type="date" required name="from" class="form-control"></div><div class="form-group col-md-12"><label>TO</label><input required type="date" name="to" class="form-control"></div>
<input type="submit" name="filterSalesHistory" value="Filter" class="form-control btn btn-warning col-md-12"></form></div></div></div></div>

<!--ADD STAFF-->
<div class="modal fade" id="addStaff" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-center modal-sm" role="document"><div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title " id="exampleModalLabel" >#Add Staff</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body"><form action="" method="POST"><div class="form-group col-md-12">
<input type="text" required name="username" id="username"  placeholder="username"  class="form-control"></div><div class="form-group col-md-12">
<input type="text" required name="name"   placeholder="Full Name"  class="form-control"></div><div class="form-group col-md-12">
<select name="act_type" class="form-control" required><option value="1">Attendant</option><option value="2">Manager/Admin</option></select></div>
<div class="form-group col-md-12">
<select name="gender" class="form-control" required><option value="M">Male</option><option value="F">Female</option></select></div>
<input type="submit" name="adStf" value="Add" class="form-control btn btn-warning col-md-12"></form></div></div></div></div>

<!--Filter Product--> 
<div class="modal fade" id="filterProduct" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog modal-center modal-sm" role="document"><div class="modal-content"><div class="modal-header bg-secondary text-white"><h5 class="modal-title " id="exampleModalLabel" >#Filter Product</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body">
<form action="products" method="POST"><div class="form-group col-md-12">
<select class="form-control"  name="eqCourse"><option value="">--Loader-</option> <?php   foreach(QueryDB("SELECT * FROM login") as $crs){?>
<option value="<?php echo $crs['username'];  ?>"    ><?php echo ($crs['name']);  ?></option><?php } ?></select></div><div class="form-group col-md-12">
<input type="date" name="date" placeholder="year" maxlength="4" minlength="4" class="form-control"></div><input type="submit" name="sendFilter" value="Filter" class="form-control btn btn-warning col-md-12"></div></form></div></div></div></div>

<!--logout-->
<div class="modal fade" id="addEnquiryNN" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog" role="document">
<div class="modal-content"><div class="modal-header"><h5 class="modal-title text-danger" id="exampleModalLabel">Ready to Leave?</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body">Select "Logout" below if you are ready to end your current session.</div><div class="modal-footer"><button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button><a class="btn btn-primary" href="../login">Logout</a></div></div></div></div>

<!--Change Password-->
<div class="modal fade" id="settings" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"aria-hidden="true"><div class="modal-dialog modal-sm" role="document"><div class="modal-content"><div class="modal-header bg-dark"><h5 class="modal-title text-white" id="exampleModalLabel">#Change Password</h5><button class="close" type="button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body"><form action="" method="POST">
<div class="form-group"><input type="password" autocomplete="off" name="newPass" class="form-control" placeholder="New Password"></div><div class="form-group"><input type="password" name="newPass2" class="form-control" autocomplete="off" placeholder="Repeat Password"></div><input type="submit" name="changePass" class="btn btn-danger form-control" value="Change Password"></form></div><div class="modal-footer"><button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button></div></div></div></div>
