Mini Shell
<?php
include 'head.php'; ?>
<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
<!--
BODY TAG OPTIONS:
=================
Apply one or more of the following classes to get the
desired effect
|---------------------------------------------------------|
| SKINS | skin-blue |
| | skin-black |
| | skin-purple |
| | skin-yellow |
| | skin-red |
| | skin-green |
|---------------------------------------------------------|
|LAYOUT OPTIONS | fixed |
| | layout-boxed |
| | layout-top-nav |
| | sidebar-collapse |
| | sidebar-mini |
|---------------------------------------------------------|
-->
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<!-- Main Header -->
<?php include 'header.php'; ?>
<!-- Left side column. contains the logo and sidebar -->
<?php include 'leftside.php'; ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
หน้าหลัก
<small>ระบบบุคลากร</small>
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i> เมนูหลัก</a></li>
<li class="active">หน้าแรก</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="box box-primary">
<br>
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
<li data-target="#myCarousel" data-slide-to="4"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<p class="text-center"> <img src="dist/img/credit/pic1.jpg" alt="Chania" width="97%"></p>
</div>
<div class="item">
<p class="text-center"> <img src="dist/img/credit/pic2.jpg" alt="Chania" width="97%"> </p>
</div>
<div class="item">
<p class="text-center"> <img src="dist/img/credit/pic3.jpg" alt="Flower" width="97%"> </p>
</div>
<div class="item">
<p class="text-center"> <img src="dist/img/credit/pic4.jpg" alt="Flower" width="97%" > </p>
</div>
<div class="item">
<p class="text-center"> <img src="dist/img/credit/pic5.jpg" alt="Flower" width="97%" > </p>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<div class="box-footer">
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-aqua"><i class="fa fa-users"></i></span>
<?php
$sql_pr = "SELECT COUNT(*) AS COUNTPR FROM teacher WHERE status_user = 1 or status_user = 2 or status_user = 3";
$result_pr = mysqli_query($link, $sql_pr);
$count_pr = mysqli_fetch_assoc($result_pr);
?>
<div class="info-box-content">
<span class="info-box-text">บุคลากรทั้งหมด</span>
<span class="info-box-number">จำนวน <?php echo $count_pr['COUNTPR'];?> คน</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<!-- /.col -->
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-green"><i class="fa fa-male"></i></span>
<?php
$sql_man = "SELECT COUNT(*) AS COUNTMAN FROM teacher WHERE (status_user = 1 or status_user = 2 or status_user = 3) and sex = 0 ";
$result_man = mysqli_query($link, $sql_man);
$count_man = mysqli_fetch_assoc($result_man);
?>
<div class="info-box-content">
<span class="info-box-text">เพศชาย</span>
<span class="info-box-number">จำนวน <?php echo $count_man['COUNTMAN'];?> คน</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<!-- /.col -->
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-yellow"><i class="fa fa-female"></i></span>
<?php
$sql_female = "SELECT COUNT(*) AS COUNTFEMALE FROM teacher WHERE (status_user = 1 or status_user = 2 or status_user = 3) and sex = 1 ";
$result_female = mysqli_query($link, $sql_female);
$count_female = mysqli_fetch_assoc($result_female);
?>
<div class="info-box-content">
<span class="info-box-text">เพศหญิง</span>
<span class="info-box-number">จำนวน <?php echo $count_female['COUNTFEMALE'];?> คน</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<!-- /.col -->
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-red"><i class="fa fa-calendar-times-o"></i></span>
<?php
$teacherID = $session_teacherID;
$sql = "SELECT * FROM teacher WHERE teacherID='$teacherID'";
$result = mysqli_query($link, $sql);
$row = mysqli_fetch_assoc($result);
// การใช้งาน
$dd=$row['licenseDate']; //กำหนดวันที่ปัจจุบัน
if ($dd == "0000-00-00"){
$date = "";
}else{
$dr=expdate($dd,1825); //ส่งค่าให้ฟังก์ชั่น วันที่ปัจจุบัน พร้อมจำนวนวัน
$df=date("Y-m-d",$dr); //จัดรูปแบบวันที่ก่อนแสดง
$date=displaydate($df);//แสดงวันที่ออกมา
}
?>
<?php
// Variables Date
if ($dd == "0000-00-00"){
$date2 = "";
}else{
$start_date = $dd;
$expire_date = $df;
$today_date = date("Y-m-d");
/* Start Date */
$start_explode = explode("-", $start_date);
$start_year = $start_explode[0];
$start_month = $start_explode[1];
$start_day = $start_explode[2];
/* Expire Date */
$expire_explode = explode("-", $expire_date);
$expire_year = $expire_explode[0];
$expire_month = $expire_explode[1];
$expire_day = $expire_explode[2];
/* Today Date */
$today_explode = explode("-", $today_date);
$today_year = $today_explode[0];
$today_month = $today_explode[1];
$today_day = $today_explode[2];
$start = gregoriantojd($start_month,$start_day,$start_year);
$expire = gregoriantojd($expire_month,$expire_day,$expire_year);
$today = gregoriantojd($today_month,$today_day,$today_year);
$date_current = $expire-$today; //หาวันที่ยังเหลืออยู่
$date2 = $date_current;
}
?>
<div class="info-box-content">
<span class="info-box-text">ใบประกอบวิชาชีพหมดอายุ</span>
<span class="info-box-number"> <?php echo $date;?></span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
<!-- Your Page Content Here -->
<!-- Your Page Content Here -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Main Footer -->
<?php include 'footer.php'; ?>
</div>
<!-- ./wrapper -->
<!-- REQUIRED JS SCRIPTS -->
<!-- jQuery 2.2.3 -->
<script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/app.min.js"></script>
<!-- Optionally, you can add Slimscroll and FastClick plugins.
Both of these plugins are recommended to enhance the
user experience. Slimscroll is required when using the
fixed layout. -->
</body>
</html>
Zerion Mini Shell 1.0