Mini Shell
<!-- Main Header -->
<header class="main-header">
<!-- Logo -->
<a href="index.php" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>S</b>P</span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>ระบบ</b>บุคลากร CCP</span>
</a>
<!-- Header Navbar -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
</a>
<!-- Navbar Right Menu -->
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<!-- Messages: style can be found in dropdown.less-->
<?php
$teacherID = $session_teacherID;
$sql_header = "SELECT * FROM teacher WHERE teacherID='$teacherID'";
$result_header = mysqli_query($link, $sql_header);
$row_header = mysqli_fetch_assoc($result_header);
// การใช้งาน
$dd=$row_header['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;
}
?>
<!-- /.messages-menu -->
<ul class="nav navbar-nav">
<li><a href="../admin_gard_new/home.php"><span class="glyphicon glyphicon-education"></span> ระบบนักเรียน</a></li>
</ul>
<!-- Notifications Menu -->
<?php
if ($date2 <= "90" ){
?>
<li class="dropdown notifications-menu">
<!-- Menu toggle button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i>
<span class="label label-danger">1</span>
</a>
<ul class="dropdown-menu">
<li class="header"><span class="label label-warning">คุณมี 1 การแจ้งเตือน</span></li>
<li>
<!-- Inner Menu: contains the notifications -->
<ul class="menu">
<li><!-- start notification -->
<a href="#">
<i style="color:#FF0000;" class="fa fa-calendar-times-o"></i> เหลือเวลาอีก <?php echo $date2." วัน ใบประกอบวิชาชีพ";?>
<p>
หมดอายุ
</p>
</a>
</li>
<!-- end notification -->
</ul>
</li>
<li class="footer"><a href="#">ทั้งหมด</a></li>
</ul>
</li>
<?php
}else{
?>
<li class="dropdown notifications-menu">
<!-- Menu toggle button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i>
</a>
<ul class="dropdown-menu">
<li class="header"><span class="label label-info">คุณไม่มีการแจ้งเตือน</span></li>
<li>
<!-- Inner Menu: contains the notifications -->
<ul class="menu">
<li><!-- start notification -->
<p class="text-center">
<i class="fa fa-folder-open-o" ></i>
</p>
</li>
<!-- end notification -->
</ul>
</li>
<li class="footer"><a href="#">ทั้งหมด</a></li>
</ul>
</li>
<?php
}
?>
<!-- Tasks Menu -->
<!-- User Account Menu -->
<li class="dropdown user user-menu">
<!-- Menu Toggle Button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<!-- The user image in the navbar-->
<?php
$pic_name = $s_picture;
if (empty($pic_name)){
$pic_name = 'noimg.jpg';
}
?>
<img src="dist/img/<?php echo $pic_name; ?>" class="user-image" alt="<?php echo $pic_name; ?>">
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span class="hidden-xs"><?php echo $s_name; ?> <?php echo $s_lastName; ?></span>
</a>
<ul class="dropdown-menu">
<!-- The user image in the menu -->
<li class="user-header">
<img src="dist/img/<?php echo $pic_name; ?>" class="img-circle" alt="<?php echo $pic_name; ?>">
<p>
<?php echo $s_titleName; ?><?php echo $s_name; ?> <?php echo $s_lastName; ?>
<small>ตำแหน่ง <?php echo $s_typePersonnel; ?> </small>
</p>
</li>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="show_teacheruser.php?teacherID=<?php echo $session_teacherID; ?>" class="btn btn-default btn-flat"><i class="fa fa-user-circle-o"></i> ข้อมูลส่วนตัว</a>
</div>
<div class="pull-right">
<a href="logout.php" class="btn btn-default btn-flat"><i class="fa fa-sign-out"></i> ออกจากระบบ</a>
</div>
</li>
</ul>
</li>
<!-- Control Sidebar Toggle Button -->
</ul>
</div>
</nav>
</header>
Zerion Mini Shell 1.0