<?
session_start();
include('includes/config.php');
include('defs.php');

if(strlen($_SESSION['aid'])==0)
  { header('location:index.php');
}

$usr=$_SESSION['uname'];

 ?>

 <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title>GLAKB  | Likeage Stock Details</title>

  <!-- Google Font: Source Sans Pro -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="../dist/css/adminlte.min.css">
  <!--Function Email Availabilty---->

</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
  <!-- Navbar -->
<?php include_once("includes/navbar.php");?>
  <!-- /.navbar -->

  <!-- Main Sidebar Container -->
 <?php include_once("includes/sidebar.php");?>

 
  <div class="content-wrapper">
<?

$result12 = mysqli_query($link, "select Role from user_details where Name='$usr' ");
$row12=  mysqli_fetch_object($result12);
$role = $row12->Role;
if($role=='Operator')
{
$result = mysqli_query($link, "select Role from user_priv where Name='$usr' and Form='Rep-Lik' ");
$row=  mysqli_fetch_object($result);
$role = $row->Role;
if($role=='0')
{
{
echo"<center>";
echo"<br><br><br><br><br>";
echo"<img src='users.png' width='160' height='160'><br>";
echo "<font size=6 color=red><b>ACCESS DENIED!</b><br>";
echo "<font size=4 color=darkblue><b>You Do Not Have Permission to View This Page.</b><br>";
goto a;
}
}
}



echo "                <form name='form1' action='rep_lik.php?usr=$usr' target='_blank' method=POST >";

?>
<html>
<head>
<style>
#customers {
  font-family: Times-Roman;
  border-collapse: collapse;
  width: 50%;


}

#customers td, #customers th {
  border: 1px solid #4444;
  padding: 8px;
}

#customers tr:nth-child(even){background-color:gainsboro ;}


#customers th {
  padding-top: 8px;
  padding-bottom: 8px;
  text-align: center;
background-color:dodgerblue;
    color: white;
}

.input-box {
            width: 40%;
            padding: 2px;
            margin-top: 2px;
            margin-bottom: 2px;
            border: 2px solid gainsboro;
            border-radius: 4px;
            font-size: 16px;

        }
      

</style>  





 <link rel="stylesheet" href="css/style.css">


      



<table align="center" id="customers">
       
<tr>
    <th colspan="4"><font size="5">LIKEAGE STOCK REPORT CRITERIA</th>

  </tr>
  
        <?




 AddDate("<font size=3 color=black><b>From Date : </b>", "strFrom", "$strvoucher", 25, 10, 0);
  echo "<tr>";
$strvoucher= Date("Y-m-d");
 AddDate("<font size=3 color=black><b>To Date : </b>", "strTo", "$strvoucher", 25, 10, 0);       

?>


<tr>
<td align=left><b><font size=3 color=black>Select Warehouse:</b></td>
                        <td align=left>
                                <select class="form-control" name="ware" id="ware" style=font-size="16" >
                                <option value="">select</option>
                                <?php 
                                if(isset($_GET['M_Head']))
                                        {
                                                $M_Head = $_GET['M_Head'];
                                                
                                                
                
                                        }
                                else                        
                                        $M_Head = "";
                                        
                                        //include('config.php');
                                        $result = mysqli_query($link, "select Distinct Name from warehouse order by Name ");
                                        while($row  = mysqli_fetch_object($result))
                                        {
                                                        if($M_Headc == $row->Name)
                                                        {
                                                                echo "<option value=\"$row->Name\" selected=\"selected\">$row->Name</option>";
                                                        }        
                                                        else
                                                        {
                                                                echo "<option value=\"$row->Name\">$row->Name</option>";
                                                        }
                                        }
                                ?>
 <tr>                               </select>
<?php
echo "
   
    <td style='padding:10px;' colspan=2 align=center>
        <span style='font-size:22px; color:darkblue; font-weight:bold;'>Overall Report:</span>
        <input type='radio' name='strn' value='oall' style='transform: scale(1.3); margin-left:10px;'>

        <span style='margin-left:40px; font-size:22px; color:darkblue; font-weight:bold;'>Detailed Report:</span>
        <input type='radio' name='strn' value='dall' style='transform: scale(1.3); margin-left:10px;'>
    </td>
";
?>

<tr>
 <td colspan="3" align="center">     
<input type="submit" name="save" value="View Report" style="background: none; color:#007BFF; border:2px solid #007BFF; padding:2px 20px; border-radius:5px;">
</td>

<?
      

        echo "
                                </form>
                                </table>
                        ";
a:
        include "footer.php";
?>
</div>
<!-- ./wrapper -->

<!-- jQuery -->
<script src="../plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- bs-custom-file-input -->
<script src="../plugins/bs-custom-file-input/bs-custom-file-input.min.js"></script>
<!-- AdminLTE App -->
<script src="../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../dist/js/demo.js"></script>
<!-- Page specific script -->
<script>
$(function () {
  bsCustomFileInput.init();
});
</script>
</body>
</html>
<?php  ?>