<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
$logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
//to fully log out a visitor we need to clear the session varialbles
$_SESSION['MM_Username'] = NULL;
$_SESSION['MM_UserGroup'] = NULL;
$_SESSION['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "index.php";
if ($logoutGoTo) {
header("Location: $logoutGoTo");
exit;
}
}
?>
<?php
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
}
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
}
if (($strUsers == "") && true) {
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0)
$MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);
exit;
}
?>
<?php
include_once('Connections/areaConn.php');
if(isset($_SESSION["MM_Username"])){
$pid=$_SESSION["MM_Username"];
$pw=$_SESSION["mPassword"];
}
if(isset($_GET["hsid"])){
$hid=$_GET["hsid"];
}
//mysql_select_db($database_areaConn, $areaConn);
//$query_viewMember = sprintf("SELECT * FROM member_tb WHERE mem_pid = %s", GetSQLValueString($mpid, "text"));
$query_viewMember="select * from member_tb where mem_pid='".$pid."' && mem_numposition='".$pw."'";
$viewMember=mysqli_query($areaConn,$query_viewMember);
$row_viewMember=mysqli_fetch_assoc($viewMember);
//echo $query_viewMember;
//echo $row_viewMember["mem_pid"];
$query_viewSalary="select * from nsalaryteach_tb where hs_id=".$hid." and st_pid='".$pid."'";
$viewSalary=mysqli_query($areaConn,$query_viewSalary);
$row_viewSalary=mysqli_fetch_assoc($viewSalary);
$query_viewHeadsalary="select * from hsalary_tb where hs_id=".$hid;
$view_headsalary=mysqli_query($areaConn,$query_viewHeadsalary);
$row_viewHeadsalary=mysqli_fetch_assoc($view_headsalary);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Office of Kamphaengphet Primary Education Area 2</title>
<link href="css/bootstrap.min.css" rel="stylesheet" />
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<?php
require_once("topnavbar.php");
?>
<div class="row ">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-6 col-12 mt-2">
<div class="card">
<div class="card-header bg-dark text-white">
<img src="images/user.png" style="width:35px;" alt="">
<label>ข้อมูลทั่วไป</label>
</div>
<div class="card-body bg-info text-white">
<div class="">
<label style="color:blue;">ครั้งที่ : </label>
<label style="color:white;"><?php echo $row_viewHeadsalary["hs_start"];?></label>
</div>
<div class="">
<label style="color:blue;">คำสั่งที่ : </label>
<label style="color:white;"><?php echo $row_viewHeadsalary["hs_around"];?></label>
</div>
<div class="">
<label style="color:blue;">สั่ง ณ วันที่ : </label>
<label style="color:white;"><?php echo $row_viewHeadsalary["hs_datein"];?></label>
</div>
<div class="">
<label style="color:blue;">ลำดับที่ : </label>
<label style="color:white;"><?php echo $row_viewSalary["st_number"];?></label>
</div>
<div class="">
<label style="color:blue;">ชื่อ-สกุล : </label>
<label style="color:white;"><?php echo $row_viewMember['mem_hname'].$row_viewMember['mem_fname']." ".$row_viewMember['mem_lname']; ?></label>
</div>
<div class="">
<label style="color:blue;">เลขประจำตัวประชาชน : </label>
<label style="color:white;"><?php echo $row_viewSalary["st_pid"];?></label>
</div>
<div class="">
<label style="color:blue;">ตำแหน่ง : </label>
<label style="color:white;"><?php echo $row_viewSalary["st_position"];?></label>
</div>
<div class="">
<label style="color:blue;">วิทยฐานะ : </label>
<label style="color:white;"><?php echo $row_viewSalary["st_criter"];?></label>
</div>
</div>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-6 col-12 mt-2">
<div class="card">
<div class="card-header bg-dark text-white">
<img src="images/user.png" style="width:35px;" alt="">
<label style="">ข้อมูลก่อนเลื่อนเงินเดือน</label>
</div>
<div class="card-body bg-info text-white">
<div class="">
<label style="color:blue;">หน่วยงานการศึกษา : </label>
<label style="color:white;"><?php echo $row_viewSalary['st_school']; ?></label>
</div>
<div class="">
<label style="color:blue;">ตำแหน่งเลขที่ : </label>
<label style="color:white;"><?php echo $row_viewSalary["st_numposition"];?></label>
</div>
<div class="">
<label style="color:blue;">ตำแหน่งเลขที่จ่ายตรง : </label>
<label style="color:white;"><?php echo $row_viewSalary['st_numpay'];?></label>
</div>
<div class="">
<label style="color:blue;">อัตราเงินเดือนก่อนเลื่อน อันดับ : </label>
<label style="color:white;"><?php echo $row_viewSalary["st_class"];?></label>
</div>
<div class="">
<label style="color:blue;">อัตราเงินเดือนก่อนเลื่อน เงินเดือน : </label>
<label style="color:white;"><?php echo number_format($row_viewSalary["st_rate"]);?></label>
</div>
<div class="">
<label style="color:blue;">ฐานในการคำนวณ : </label>
<label style="color:white;"><?php echo number_format($row_viewSalary['st_base']);?></label>
</div>
<div>
<label style="color:blue;"> </label>
<label style="color:white;"> </label>
</div>
<div>
<label style="color:blue;"> </label>
<label style="color:white;"> </label>
</div>
</div>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-6 col-12 mt-2">
<div class="card">
<div class="card-header bg-dark text-white">
<img src="images/user.png" style="width:35px;" alt="">
<label>ข้อมูลการเลื่อนเงินเดือน</label>
</div>
<div class="card-body bg-info text-white">
<div class="">
<label style="color:blue;">ระดับผลการประเมิน : </label>
<label style="color:white;"><?php echo $row_viewSalary['st_level']; ?></label>
</div>
<div class="">
<label style="color:blue;">ร้อยละที่ได้เลื่อน : </label>
<label style="color:white;"><?php echo number_format($row_viewSalary['st_persent'],3);?></label>
</div>
<div class="">
<label style="color:blue;">จำนวนเงินที่ไช้เลื่อนเงินเดือน : </label>
<label style="color:white;"><?php echo number_format($row_viewSalary['st_amount']);?></label>
</div>
<div class="">
<label style="color:blue;">ให้ได้รับเงินเดือน วันที่ : </label>
<label style="color:white;"><?php echo $row_viewHeadsalary["hs_start"];?></label>
</div>
<div class="">
<label style="color:blue;">ให้ได้รับเงินเดือน อันดับ : </label>
<label style="color:white;"><?php echo $row_viewSalary['st_classn'];?></label>
</div>
<div class="">
<label style="color:blue;">ให้ได้รับเงินเดือน : </label>
<label style="color:white;"><?php echo number_format($row_viewSalary['st_raten']);?></label>
</div>
<div class="">
<label style="color:blue;">ค่าตอบแทนพิเศษ : </label>
<label style="color:white;"><?php echo number_format($row_viewSalary['st_comp'],2);?></label>
</div>
<div class="">
<label style="color:blue;">หมายเหตุ : </label>
<label style="color:white;"><?php echo $row_viewSalary['st_remark'];?></label>
</div>
</div>
</div>
</div>
</div>
<div class="row mt-4 pb-5">
<div class="col-xl-12 col-lg-12" style="margin-top:5px;">
<button type="submit" class="btn btn-warning" id="pbtn" onclick="window.location.href='viewteachSalarynPrint.php?hsid=<?php echo $hid;?>';">พิมพ์รายงาน</button>
<button type="button" class="btn btn-primary" id="bkbtn" onclick="window.location.href='viewList.php'">ย้อนกลับ</button>
<button type="button" class="btn btn-danger" id="exbtn" onclick="window.location.href='<?php echo $logoutAction;?>'">ออกจากระบบ</button>
</div>
</div>
<?php
require_once("bottonnavbar.html");
?>
</body>
</html>