Mini Kabibi Habibi

Current Path : C:/xampp/htdocs/cid/fts/SDO/
Upload File :
Current File : C:/xampp/htdocs/cid/fts/SDO/request_status.php

<?php 

@include '../database.php';


session_start();

//Checking User Logged or Not
if(!isset($_SESSION['username_ao'])){ 

 header('location:../index.php');
}



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

?>

 <section class="content">


  <div class="dashboard-top">
  <div class="row clearfix">
     <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
                    <div class="info-box bg-red hover-expand-effect">
                        <div class="icon">                        
                            <i class="glyphicon glyphicon-user"></i>
                        </div>
                        <div class="content">
                            <?php
                                include('connect.php');
                                 $gass = $con->prepare("SELECT COUNT(*) FROM job_reques where username = '$_SESSION[login_user]'  and STATUS='PENDING'");
                                    $gass->execute();
                                    $fetch1 = $gass->fetchAll();

                                foreach($fetch1 as $key => $row1) { 
                                   $total1 = $row1['COUNT(*)'];

                              }?>
                            <div class="text">PENDING</div>
                            <div class="number count-to"><?php echo $total1; ?></div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
                    <div class="info-box bg-green hover-expand-effect">
                        <div class="icon">
                            <i class="glyphicon glyphicon-user"></i>
                        </div>
                        <div class="content">
                              <?php
                                include('connect.php');
                                 $permanent = $con->prepare("SELECT COUNT(*) FROM job_reques where username = '$_SESSION[login_user]'  and STATUS='APPROVE'");
                                    $permanent->execute();
                                    $fetch = $permanent->fetchAll();

                                foreach($fetch as $key => $row) { 
                                   $total = $row['COUNT(*)'];

                                }?>
                            <div class="text">APPROVED</div>
                            <div class="number count-to"><?php echo $total; ?></div>
                        </div>
                    </div>
                </div>
               
             
               
                    </div>
                </div>
            </div>
</div>

        <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>REQUEST STATUS</h4>       
                         
                            </div>
                        </div>
                        <div id="print"> 
                            <div class = "scroll">
                            <div class="body">
                                <table id = "example" class = "table table-bordered" cellspacing = "0" >
                                <thead>
                                    <tr>
                                       <th width="250">Request Type</th> 
                                            <th width="400">Description</th> 
                                            <th width="200">Date</th> 
                                            <th>Status</th>
                                             <th>Remarks</th>
                                          
                                       
                                    </tr>
                                </thead>
                                <tbody>
                                
                                  <?php
                                    include('../database.php');
                                     
                                  
                                   $sql = "SELECT * from job_reques where  username = '$_SESSION[login_user]'";
                                  $data = mysqli_query($conn,$sql);
                                  while ($row= mysqli_fetch_array($data)) 
                                    {
                                      ?>
                                  <tr>
                                     <td> <?php echo $row['REQUEST_TYPE']; ?></td>
                                                 <td> <?php echo $row['DESCRIPTION']; ?></td>
                                              <td> <?php echo $row['DATE']; ?></td>
                                                 <td> <?php echo $row['STATUS']; ?></td>
                                                  <td> <?php echo $row['REMARKS']; ?></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");
?>