Mini Kabibi Habibi
<?php
session_start();
//Checking User Logged or Not
if(empty($_SESSION['employee'])){
header('location:index.php');
}
//Restrict User or Moderator to Access Admin.php page
if($_SESSION['employee']['POSITION']=='HEAD'){
header('location:head/profile.php');
}
if($_SESSION['employee']['POSITION']=='AO'){
header('location:profile/profile.php');
}
if($_SESSION['employee']['POSITION']=='EMPLOYEE'){
header('location:profile/profile.php');
}
include('header.php');
include('script.php');
?>
<link rel="stylesheet" type="text/css" href="css/style2.css">
<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 employee ");
$gass->execute();
$fetch1 = $gass->fetchAll();
foreach($fetch1 as $key => $row1) {
$total1 = $row1['COUNT(*)'];
}?>
<div class="text">Overall Total</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-pink 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 employee where PLANTILLA = 'OSDS'");
$permanent->execute();
$fetch = $permanent->fetchAll();
foreach($fetch as $key => $row) {
$total = $row['COUNT(*)'];
}?>
<div class="text">OSDS</div>
<div class="number count-to"><?php echo $total; ?></div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="info-box bg-light-green hover-expand-effect">
<div class="icon">
<i class="glyphicon glyphicon-user"></i>
</div>
<div class="content">
<?php
include('connect.php');
$parttime = $con->prepare("SELECT COUNT(*) FROM employee where PLANTILLA = 'SGOD'");
$parttime->execute();
$fetch2 = $parttime->fetchAll();
foreach($fetch2 as $key => $row2) {
$total2 = $row2['COUNT(*)'];
}?>
<div class="text">SGOD</div>
<div class="number count-to"><?php echo $total2; ?></div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="info-box bg-orange hover-expand-effect">
<div class="icon">
<i class="glyphicon glyphicon-user"></i>
</div>
<div class="content">
<?php
include('connect.php');
$jobOrder = $con->prepare("SELECT COUNT(*) FROM employee where PLANTILLA = 'CID'");
$jobOrder->execute();
$fetch3 = $jobOrder->fetchAll();
foreach($fetch3 as $key => $row3) {
$total3 = $row3['COUNT(*)'];
}?>
<div class="text">CID</div>
<div class="number count-to"><?php echo $total3; ?></div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="info-box bg-yellow hover-expand-effect">
<div class="icon">
<i class="glyphicon glyphicon-user"></i>
</div>
<div class="content">
<?php
include('connect.php');
$elementary = $con->prepare("SELECT COUNT(*) FROM employee where PLANTILLA = 'Elementary'");
$elementary->execute();
$fetch4 = $elementary->fetchAll();
foreach($fetch4 as $key => $row4) {
$total4 = $row4['COUNT(*)'];
}?>
<div class="text">Elementary</div>
<div class="number count-to"><?php echo $total4; ?></div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="info-box bg-cyan hover-expand-effect">
<div class="icon">
<i class="glyphicon glyphicon-user"></i>
</div>
<div class="content">
<?php
include('connect.php');
$jsh = $con->prepare("SELECT COUNT(*) FROM employee where PLANTILLA = 'Junior High School'");
$jsh->execute();
$fetch5 = $jsh->fetchAll();
foreach($fetch5 as $key => $row5) {
$total5 = $row5['COUNT(*)'];
}?>
<div class="text">Junior High School</div>
<div class="number count-to"><?php echo $total5; ?></div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="info-box bg-blue hover-expand-effect">
<div class="icon">
<i class="glyphicon glyphicon-user"></i>
</div>
<div class="content">
<?php
include('connect.php');
$shs = $con->prepare("SELECT COUNT(*) FROM employee where PLANTILLA = 'Senior High School'");
$shs->execute();
$fetch6 = $shs->fetchAll();
foreach($fetch6 as $key => $row6) {
$total6 = $row6['COUNT(*)'];
}?>
<div class="text">Senior High School</div>
<div class="number count-to"><?php echo $total6; ?></div>
</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 `employee` WHERE `PLANTILLA` = '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 `employee` WHERE `PLANTILLA` = '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 `employee` WHERE `PLANTILLA` = '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 `employee` WHERE `PLANTILLA` = '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 `employee` WHERE `PLANTILLA` = '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 `employee` WHERE `PLANTILLA` = 'Senior High Shcool'") or die(mysqli_error());
$qtalisay->execute();
$talisay = $qtalisay->fetchAll();
foreach($talisay as $key => $row) {
$total = $row["COUNT('PLANTILLA')"];
}?>
</div>
<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>