Mini Kabibi Habibi

Current Path : C:/Users/ITO/Desktop/From USB/fts/SCHOOL/
Upload File :
Current File : C:/Users/ITO/Desktop/From USB/fts/SCHOOL/document_history.php

<?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="body">
            
                                
                                  <?php
                                    include('../database.php');
                                     $tracking_no=$_GET['tracking_no'];
                                  
                                   $sql = "SELECT * from documents_recieved where  tracking_no='{$_GET['tracking_no']}' ";
                                  $data = mysqli_query($conn,$sql);
                                  while ($rows= mysqli_fetch_array($data)) 
                                    {
                                      ?>
                                <strong><span>TRACKING NO: <?php echo $rows['tracking_no']; ?></span>
                                <br>
                                <span>TITLE: <?php echo $rows['title']; ?></span>
                                <br>
                                <span>OWNER: <?php echo $rows['owner']; ?></span>
                                <br>
                                 <span>DATE RECEIVED: <?php echo $rows['date_recieved']; ?></span>
                                 <br>
                                 <span>EXPIRATION DATE: <?php echo $rows['expiration_date']; ?></span>
                                 </strong>                          
                                     <?php  } ?>
                    
                      </div>
                    </div>
                        <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;">OFFICE</th>
                                        <th style="white-space: nowrap;">DATE RECEIVED</th>
                                        <th style="white-space: nowrap;">DATE ACKNOWLEDGE</th>
                                        <th style="white-space: nowrap;">RECEIVING PERSONNEL</th>
                                        <th style="white-space: nowrap;">DATE ACCOMPLISHED</th>
                                        <th style="white-space: nowrap;">REMARKS</th>
                                          <th style="white-space: nowrap;">STATUS</th>
                                        
                                       
                                    </tr>
                                </thead>
                                <tbody>
                                
                                  <?php
                                    include('../database.php');
                                     $tracking_no=$_GET['tracking_no'];
                                  
                                   $sql = "SELECT * from document_tracking where  tracking_no='{$_GET['tracking_no']}' ";
                                  $data = mysqli_query($conn,$sql);
                                  while ($rows= mysqli_fetch_array($data)) 
                                    {
                                      ?>
                                  <tr>
                                  <td style="white-space: nowrap;"><?php echo $rows['recieving_office']; ?></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['recieving_personnel']; ?></td>
                                  <td style="white-space: nowrap;"><?php echo $rows['date_accomplished']; ?></td>
                                   <td style="white-space: nowrap;"><?php echo $rows['feedback']; ?></td>
                                     <td style="white-space: nowrap;"><?php echo $rows['stats']; ?></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