Mini Kabibi Habibi

Current Path : C:/xampp/htdocs/cid/fts/HEAD/
Upload File :
Current File : C:/xampp/htdocs/cid/fts/HEAD/dashboard.php

<?php 

@include '../database.php';


session_start();

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

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



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

?>
<link rel="stylesheet" type="text/css" href="css/style2.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css">
<div class="dashboard-top">
  <div class="row clearfix">

      <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12" style="cursor: pointer;" onclick="window.location='all_personnel.php';"> 
                    <div class="info-box bg-blue hover-expand-effect">
                        <div class="icon">                        
                            <i class="glyphicon glyphicon-file"></i>
                        </div>
                        <div class="content">
                            <?php 
                                include('connect.php');
                              
                                 $gass = $con->prepare("SELECT COUNT(*) FROM documents_recieved ");
                                    $gass->execute();
                                    $fetch1 = $gass->fetchAll();

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

                              }?>
                            <div class="text">Total Documents
                            <?php echo"As of " . date("Y/m/d") ; ?> </div>
                            <div class="number count-to"><?php echo $total1; ?></div>
                        </div>
                    </div>
                </div>
                 <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12" style="cursor: pointer;" onclick="window.location='male.php';"> 
                    <div class="info-box bg-green hover-expand-effect">
                        <div class="icon">
                            <i class="glyphicon glyphicon-file"></i>
                        </div>
                        <div class="content">
                              <?php
                                include('connect.php');
                              
                                 $permanent = $con->prepare("SELECT COUNT(*) FROM documents_recieved where stats='DONE'");
                                    $permanent->execute();
                                    $fetch = $permanent->fetchAll();

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

                                }?>
                             <div class="text">Done Documents
                            <?php echo"As of " . date("Y/m/d") ; ?> </div>
                            <div class="number count-to"><?php echo $total; ?></div>
                        </div>
                    </div>
                </div>
               
                 <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12" style="cursor: pointer;" onclick="window.location='female.php';"> 
                    <div class="info-box bg-red hover-expand-effect">
                        <div class="icon">
                            <i class="glyphicon glyphicon-file"></i>
                        </div>
                        <div class="content">
                            <?php
                                include('connect.php');
                                 
                                 $parttime = $con->prepare("SELECT COUNT(*) FROM documents_recieved where stats='EXPIRED'");
                                    $parttime->execute();
                                    $fetch2 = $parttime->fetchAll();

                                foreach($fetch2 as $key => $row2) { 
                                   $total2 = $row2['COUNT(*)'];

                              }?>
                            <div class="text">Expired Documents
                            <?php echo"As of " . date("Y/m/d") ; ?> </div>
                            <div class="number count-to"><?php echo $total2; ?></div>
                        </div>
                    </div>
                </div>
                    
                    <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12" style="cursor: pointer;" onclick="window.location='female.php';"> 
                    <div class="info-box bg-pink hover-expand-effect">
                        <div class="icon">
                            <i class="glyphicon glyphicon-file"></i>
                        </div>
                        <div class="content">
                            <?php
                                include('connect.php');
                                 
                                 $parttime = $con->prepare("SELECT COUNT(*) FROM documents_recieved where stats='ACTIVE'");
                                    $parttime->execute();
                                    $fetch2 = $parttime->fetchAll();

                                foreach($fetch2 as $key => $row2) { 
                                   $total2 = $row2['COUNT(*)'];

                              }?>
                            <div class="text">Active Documents</div>
                            <div class="number count-to"><?php echo $total2; ?></div>
                        </div>
                    </div>
                </div>
                              
                </div>
              

 <div class="pie-report" style="float: right;">
        <script src="js/jquery.min.js"></script>
        <?php include('script.php'); ?> 

        <!-- Educational Qualification -->
        <!-- Talisay -->
        <?php
          include('connect.php');
          $date = date("Y", strtotime("+ 8 HOURS"));
          $qosds = $con->prepare("SELECT COUNT('PLANTILLA') FROM `documents_recieved` WHERE `stats` = 'OSDS'") or die(mysqli_error());
          $qosds->execute();
          $osds = $qosds->fetchAll();
          foreach($osds as $key => $row) { 
           $total = $row["COUNT('PLANTILLA')"];

            }?>


        <!-- Alijis -->
          <?php
          include('connect.php');
          $date = date("Y", strtotime("+ 8 HOURS"));
          $qtalisay = $con->prepare("SELECT COUNT('PLANTILLA') FROM `documents_recieved` WHERE `stats` = 'SGOD'") or die(mysqli_error());
          $qtalisay->execute();
          $talisay = $qtalisay->fetchAll();
          foreach($talisay as $key => $row) { 
           $total = $row["COUNT('PLANTILLA')"];

            }?>



        <!-- Binalbagan -->
          <?php
          include('connect.php');
          $date = date("Y", strtotime("+ 8 HOURS"));
          $qtalisay = $con->prepare("SELECT COUNT('PLANTILLA') FROM `documents_recieved` WHERE `stats` = 'CID'") or die(mysqli_error());
          $qtalisay->execute();
          $talisay = $qtalisay->fetchAll();
          foreach($talisay as $key => $row) { 
           $total = $row["COUNT('PLANTILLA')"];

            }?>



        <!-- Fortune Towne -->
           <?php
          include('connect.php');
          $date = date("Y", strtotime("+ 8 HOURS"));
          $qtalisay = $con->prepare("SELECT COUNT('PLANTILLA') FROM `documents_recieved` WHERE `stats` = 'Elementary'") or die(mysqli_error());
          $qtalisay->execute();
          $talisay = $qtalisay->fetchAll();
          foreach($talisay as $key => $row) { 
           $total = $row["COUNT('PLANTILLA')"];

            }?>

         <?php
          include('connect.php');
          $date = date("Y", strtotime("+ 8 HOURS"));
          $qtalisay = $con->prepare("SELECT COUNT('PLANTILLA') FROM `documents_recieved` WHERE `stats` = 'Junior High School'") or die(mysqli_error());
          $qtalisay->execute();
          $talisay = $qtalisay->fetchAll();
          foreach($talisay as $key => $row) { 
           $total = $row["COUNT('PLANTILLA')"];

            }?>

 <?php
          include('connect.php');
          $date = date("Y", strtotime("+ 8 HOURS"));
          $qtalisay = $con->prepare("SELECT COUNT('PLANTILLA') FROM `documents_recieved` WHERE `stats` = 'Senior High Shcool'") or die(mysqli_error());
          $qtalisay->execute();
          $talisay = $qtalisay->fetchAll();
          foreach($talisay as $key => $row) { 
           $total = $row["COUNT('PLANTILLA')"];

            }?>
   
    <div id = "content" style="margin-bottom: 15px !important;">
        <br />
        <br />
        <br />
        <div class = "">
        <div id="chartContainer" style="height: 400px; width: 75%; float: right; margin-right: 10px; margin-top: 43px;"></div> 
        </div>
        
        <div id="bar2chartContainer" style="height: 300px; width: 75%; float: right; margin-top: 20px; margin-right: 10px;">
        </div>
    </div>
        </body>
</html>