Mini Kabibi Habibi
<?php
@include '../database.php';
session_start();
//Checking User Logged or Not
if(!isset($_SESSION['username'])){
header('location:../index.php');
}
include('header.php');
include('script.php');
include('conn.php');
?>
<link rel="icon" href="../images/logo.ico">
<section class="content">
<div class="container-fluid">
<!-- Exportable Table -->
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="card">
<div id="print">
<div class = "scroll">
<div class="body">
<table id = "example" class = "table table-bordered" cellspacing = "0" >
<thead>
<tr>
<th style="white-space: nowrap;" class="hidden">ID</th>
<th style="white-space: nowrap;">TRACKING NUMBER</th>
<th style="white-space: nowrap;">DATE RECEIVED</th>
<th style="white-space: nowrap;">DATE ACKNOWLEDGED</th>
<th style="white-space: nowrap;">STATUS</th>
<th style="white-space: nowrap;">ACTION</th>
</tr>
</thead>
<tbody>
<?php
include('../database.php');
$sql = "SELECT * from documents_recieved order by date_recieved ASC";
$data = mysqli_query($conn,$sql);
while ($rows= mysqli_fetch_array($data))
{
?>
<tr>
<td class="hidden"><?php echo $row['id']; ?></td>
<td style="white-space: nowrap;"><?php echo $rows['tracking_no']; ?></td>
<td style="white-space: nowrap;"><?php echo $rows['date_recieved']; ?></td>
<td style="white-space: nowrap;"><?php echo $rows['date_acknowledge']; ?></td>
<td style="white-space: nowrap;"><?php echo $rows['stats']; ?></td>
<td > <a class="btn btn-success btn-sm" href="print_tracking.php?id=<?php echo $rows['id']?>">
<span class = "glyphicon glyphicon-print" aria-hidden = "true">Print</span>
</a>
<a class="btn btn-success btn-sm" href="edit_docs.php?id=<?php echo $rows['id']?>">
<span class = "glyphicon glyphicon-pencil" aria-hidden = "true">Edit</span>
</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<script>
function printDiv() {
//Get the HTML of div
var divElements = document.getElementById("print").innerHTML;
//Get the HTML of whole page
var oldPage = document.body.innerHTML;
//Reset the page's HTML with div's HTML only
document.body.innerHTML = "<table></table>" + divElements;
//Print Page
window.print();
//Restore orignal HTML
document.body.innerHTML = oldPage;
}
</script>
<script src="plugins/js/jquery-1.js"></script>
<script src="plugins/js/jquery.dataTables.min.js"></script>
<script>
$(document).ready(function() {
$('#example').DataTable();
} );
</script>
<?php
include("script.php");
?>e