<?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"];
}
if(isset($_GET["hsid"])){
$hid=$_GET["hsid"];
}
//$query_viewMember = sprintf("SELECT * FROM member_tb WHERE mem_pid = %s", GetSQLValueString($mpid, "text"));
$query_viewMember="select * from member2_tb where mem_pid='".$pid."'";
$viewMember=mysqli_query($areaConn,$query_viewMember);
$row_viewMember=mysqli_fetch_assoc($viewMember);
//echo $query_viewMember;
//echo $row_viewMember["mem_pid"];
$query_viewSalary="select * from salarypersonal_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 headpersonal_tb where hs_id=".$hid;
$view_headsalary=mysqli_query($areaConn,$query_viewHeadsalary);
$row_viewHeadsalary=mysqli_fetch_assoc($view_headsalary);
?>
<html>
<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="bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<script src="bootstrap/js/jquery.3.5.1.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<?php
include_once("topnavbar.php");
?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-6 col-12">
<div class="card">
<div class="card-header bg-dark text-white">
<img src="images/user.png" style="width:35px;">
<label class="">ข้อมูลการเลื่อนเงินเดือน</label>
</div>
<div class="card-body bg-info">
<div>
<label style="color:blue;">ครั้งที่ : </label>
<label style="color:white;"><?php echo $row_viewHeadsalary["hs_start"];?></label>
</div>
<div>
<label style="color:blue;">คำสั่งที่ : </label>
<label style="color:white;"><?php echo $row_viewHeadsalary["hs_around"];?></label>
</div>
<div>
<label style="color:blue;">สั่ง ณ วันที่ : </label>
<label style="color:white;"><?php echo $row_viewHeadsalary["hs_datein"];?></label>
</div>
<div>
<label style="color:blue;">ลำดับที่ : </label>
<label style="color:white;"><?php echo $row_viewSalary["st_number"];?></label>
</div>
<div>
<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>
<label style="color:blue;">เลขประจำตัวประชาชน : </label>
<label style="color:white;"><?php echo $row_viewMember['mem_pid']; ?></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">
<div class="card">
<div class="card-header bg-dark text-white">
<img src="images/user.png" style="width:35px;">
<label class="">ข้อมูลการเลื่อนเงินเดือน</label>
</div>
<div class="card-body bg-info">
<div>
<label style="color:blue;">ตำแหน่ง : </label>
<label style="color:white;"><?php echo $row_viewSalary['st_position']; ?></label>
</div>
<div>
<label style="color:blue;">ระดับ : </label>
<label style="color:white;"><?php echo $row_viewSalary['st_class']; ?></label>
</div>
<div>
<label style="color:blue;">กลุ่มภารกิจ : </label>
<label style="color:white;"><?php echo $row_viewSalary['st_group']; ?></label>
</div>
<div>
<label style="color:blue;">ตำแหน่งเลขที่ : </label>
<label style="color:white;"><?php echo $row_viewSalary["st_numposition"]; ?></label>
</div>
<div>
<label style="color:blue;">ตำแหน่งเลขที่จ่ายตรง : </label>
<label style="color:white;"><?php echo $row_viewSalary["st_numpay"]; ?></label>
</div>
<div>
<label style="color:blue;">ตำแหน่งประเภท : </label>
<label style="color:white;"><?php echo $row_viewSalary["st_type"];?></label>
</div>
<div>
<label style="color:blue;">อัตราเงินเดือนก่อนเลื่อน :</label>
<label style="color:white;"><?php echo number_format($row_viewSalary['st_rate']);?></label>
</div>
<div>
<label style="color:blue;">ฐานในการคำนวณ : </label>
<label style="color:white;"><?php echo number_format($row_viewSalary['st_rating']); ?></label>
</div>
</div>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-6 col-12">
<div class="card">
<div class="card-header bg-dark text-white">
<img src="images/user.png" style="width:35px;">
<label class="">ข้อมูลการเลื่อนเงินเดือน</label>
</div>
<div class="card-body bg-info">
<div>
<label style="color:blue;">ระดับผลการประเมิน : </label>
<label style="color:white;"><?php echo $row_viewSalary['st_level']; ?></label>
</div>
<div>
<label style="color:blue;">ร้อยละที่ได้เลื่อน : </label>
<label style="color:white;"><?php echo number_format($row_viewSalary['st_percent'],3); ?></label>
</div>
<div>
<label style="color:blue;">จำนวนเงินที่ได้เลื่อนเงินเดือน : </label>
<label style="color:white;"><?php echo number_format($row_viewSalary['st_salarynew']); ?></label>
<div>
<label style="color:blue;">ให้ได้รับเงินเดือนวันที่ : </label>
<label style="color:white;"><?php echo $row_viewHeadsalary["hs_start"];?></label>
</div>
<div>
<label style="color:blue;">ให้ได้รับเงินเดือน : </label>
<label style="color:white;"><?php echo number_format($row_viewSalary['st_total']); ?></label>
</div>
<div>
<label style="color:blue;">ค่าตอบแทนพิเศษ : </label>
<label style="color:white;"><?php echo "".intval($row_viewSalary['st_comp']*100)/100; ?></label>
</div>
<div>
<label style="color:blue;">หมายเหตุ : </label>
<label style="color:white;"><?php echo $row_viewSalary['st_remark']; ?></label>
</div>
<div>
<label style="color:blue;"> </label>
<label style="color:white;"> </label>
</div>
</div>
</div>
</div>
</div>
<div class="row mt-1 pb-5">
<div class="col-12 ml-3" style="margin-top:5px;">
<button type="button" class="btn btn-warning " id="pbtn" onClick="window.location.href='viewpersonalSalaryPrint.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
include("bottonnavbar.html");
?>
</body>
</html>