<?php require('header.php'); ?>
<?php require("connect.php"); ?>
<?php 
$oid= $_GET['oid'];
$sid2= $_GET['sid2'];
$search= $_GET['query'];
$s11= $_GET['s11'];
//echo $oid;
//echo "//";
//echo $sid2;
//echo $search;
echo "<center><a href='http://medscan.webs.dynacomp2.eu/medscan2/index.php'><button class='btn btn-warning btn-sm'>Back</button><br></center></a>";

?>

<div class="row">
    <div class="row">
		<div class="col-md-9">
			<div class="panel panel-default">
				<div class="panel-body" id="search-panel">
					<form method='GET' action=searchp.php>
						<div class="row" style="padding-bottom: 0.7em;">
							<div class="col-md-6">
								<h4>Search</h4>
								<div class="ui input fluid">
									<input class="form-control" type="text" name="query" placeholder="Search" value="" />
									<input type="hidden" name="s11"  value="1" />
								</div>
							</div>

							
							
						</div>
						
							
					
					
							
						</div>
						
						<input name="search_submit" class="form-control" type="submit" id="ssubmit" value="Αναζήτηση" />
					</form>
				</div>
			</div>
		</div>
	</div>	
</div>


 

	




<div class="row">
<div class="col-md-12">
     <div class="box-inner">
    <div class="box-header well" data-original-title="">
        <h2>Details		
		</h2>
</div>
        
    
    <div class="box-content">
   
    <table class="table table-striped table-bordered bootstrap-datatable datatable responsive">
    <thead>
    <tr>
						<tr>
                            <th>Αριθμός Παραγγελίας</th>
                           
							 <th>Είδος</th>
							 <th>Περιγραφή</th>
							 <th>Ποσότητα (gr)</th>
							 <th>Συσκεύαστήριο</th>
							 <th>Lot</th>
							 <th>Ημερομηνία λήξης</th>
							 <th>Μονάδα</th>
							 <th>Box id</th>
							 <th>Παλλέτα</th>
							 <th>Details</th>
                        </tr>
    </tr>
    </thead>
    <tbody>

    <?php
					
					//echo $s11;
				    $query22 = "Select * from TRANSACTIONS where Boxid LIKE '%".$search."%'";
					if ($s11 == 0){$query22 = "Select * from TRANSACTIONS where Boxid LIKE '%1111111111111111%'";}
					//echo $query ;
					$result22 = mysqli_query($dbC,$query22) or die(mysqli_error());
					$y=0;
					 while($row22 = mysqli_fetch_array($result22)){
                            $y++;
							
                            echo "<tr onclick='get_details(".$row['OrderId'].", $(this).offset());'>";
                            echo "<td>".$row22['OrderId'] ." </td>";
							echo "<td>".$row22['ItemId']."</td>";
							echo "<td>".$row22['IteName']."</td>";
							echo "<td>".$row22['Qty']."</td>";
							echo "<td>".$row22['Sysk']."</td>";
							echo "<td>".$row22['Lot']."</td>";
							echo "<td>".$row22['DateLhj']."</td>";
							echo "<td>".$row22['Monad']."</td>";
							echo "<td>".$row22['BoxId']."</td>";
							echo "<td>".$row22['PalletId']."</td>";
							echo "<td><a href='index_details.php?oid=".$row22['OrderId']."&sid2=".$sid2."'><button class='btn btn-warning btn-sm'>View Order</button></a></td>";
							
						    echo "</tr>";
							
							$ooord = $row22['OrderId'];
							
					 }
					 ?>
   
   
   
   

    </tbody>
    </table>
    </div>
    </div>
    </div>
    <!--/span-->

    </div><!--/ro-->
   
   
   

    </tbody>
    </table>
    </div>
    </div>
    </div>
    <!--/span-->

    </div><!--/ro-->

	







  

   

    
<?php require('footer.php'); ?>
