<?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"];
}
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."'";
$viewMember=mysql_query($query_viewMember,$areaConn);
$row_viewMember=mysql_fetch_assoc($viewMember);
//echo $query_viewMember;
//echo $row_viewMember["mem_pid"];
$query_viewSalary="select * from salaryteach_tb where hs_id=".$hid." and st_pid='".$pid."'";
$viewSalary=mysql_query($query_viewSalary,$areaConn);
$row_viewSalary=mysql_fetch_assoc($viewSalary);
$query_viewHeadsalary="select * from hsalary_tb where hs_id=".$hid;
$view_headsalary=mysql_query($query_viewHeadsalary,$areaConn);
$row_viewHeadsalary=mysql_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.css" rel="stylesheet" />
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/bootstrap-responsive.min.css" rel="stylesheet"/>
<link href="css/theconnection.css" rel="stylesheet" />
<link href="css/login.css" rel="stylesheet" />
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/login.js"></script>
<style type="text/css">
@media print{
#bkbtn{
display: none;
}
#pbtn{
display: none;
}
#exbtn{
display: none;
}
@page{
size: landscape;
}
}
</style>
</head>
<body>
<div class="row" style="background-color:#FFF; margin:5px;border-top-left-radius:5px; border-top-right-radius:5px;">
<div class="col-sm-12">
<p style="margin-top:10px; text-align:center;">บัญชีรายละเอียดการเลื่อนเงินเดือนข้าราชการครูและบุคลากรทางการศึกษา สังกัดสำนักงานเขตพื้นที่การศึกษาประถมศึกษากำแพงเพชร เขต 2 </p>
</div>
<div class="col-sm-12">
<p style="margin-top:5px; text-align:center;">ครั้งที่ <?php echo $row_viewHeadsalary["hs_name"];?> </p>
</div>
<div class="col-sm-12">
<p style="margin-top:5px; text-align:center;">แนบท้ายคำสั่งสำนักงานศึกษาธิการจังหวัดกำแพงเพชร ที่ <?php echo $row_viewHeadsalary["hs_around"];?> สัง ณ วันที่ <?php echo $row_viewHeadsalary["hs_datein"];?> </p>
</div>
</div>
<div class="row" style="background-color:#FFF;border-bottom-left-radius:5px; border-bottom-right-radius:5px; margin:5px;">
<div class="col-sm-12">
<table border="0" class="table table-bordered table-striped">
<tr style="background-color:#096; color:#FFF;">
<td rowspan="2" align="center" valign="middle">ลำดับที่</td>
<td rowspan="2" align="center" valign="middle">ชื่อ-ชื่อสกุล</td>
<td rowspan="2" align="center" valign="middle">ตำแหน่ง</td>
<td rowspan="2" align="center" valign="middle">เลขตำแหน่ง</td>
<td rowspan="2" align="center" valign="middle">เลขที่ตำแหน่ง จ่ายตรง</td>
<td colspan="2" align="center" valign="middle">รับเงินเดือน</td>
<td colspan="2" align="center" valign="middle">ให้ได้รับเงินเดือน</td>
<td rowspan="2" align="center" valign="middle">ค่าตอบแทนพิเศษ</td>
<td rowspan="2" align="center" valign="middle">เข้ากฎ ก.ค.ศ.</td>
<td rowspan="2" align="center" valign="middle">วิทยะฐานะ</td>
<td rowspan="2" align="center" valign="middle">เลขประจำตัวประชาชน</td>
</tr>
<tr style="background-color:#096; color:#FFF;">
<td style="text-align:center;">ระดับ</td>
<td style="text-align:center;">ขั้น</td>
<td style="text-align:center;">ระดับ</td>
<td style="text-align:center;">ขั้น</td>
</tr>
<tr>
<td> </td>
<td colspan="12"><?php echo "โรงเรียน".$row_viewMember['mem_school'];?> </td>
</tr>
<tr>
<td><?php echo $row_viewSalary["st_number"];?></td>
<td><?php echo $row_viewMember['mem_hname'].$row_viewMember['mem_fname']." ".$row_viewMember['mem_lname']; ?></td>
<td style="text-align:center;"><?php echo $row_viewMember['mem_position']; ?></td>
<td style="text-align:center;"><?php echo $row_viewSalary["st_numposition"]; ?></td>
<td style="text-align:center;"><?php echo $row_viewSalary["st_numpay"]; ?></td>
<td style="text-align:center;"><?php echo $row_viewSalary["st_class"];?></td>
<td style="text-align:center;"><?php echo number_format($row_viewSalary['st_rate']); ?></td>
<td style="text-align:center;"><?php echo $row_viewSalary['st_classn']; ?></td>
<td style="text-align:center;"><?php echo number_format($row_viewSalary['st_raten']); ?></td>
<td style="text-align:center;"><?php echo number_format($row_viewSalary['st_comp'],2); ?></td>
<td style="text-align:center;"><?php echo $row_viewSalary['st_rule']; ?></td>
<td><?php echo $row_viewSalary['st_criter']; ?></td>
<td><?php echo $row_viewSalary['st_pid']; ?></td>
</tr>
</table>
</div>
</div>
<div class="row" style="height:40px; border-radius:5px; margin-top:5px;">
<div class="col-xl-2 col-lg-2 col-md-3 col-sm-4">
<button type="submit" class="btn btn-primary" id="pbtn" onclick="window.print();"> พิมพ์ </button>
</div>
<div class="col-xl-2 col-lg-2 col-md-3 col-sm-4">
<button type="button" class="btn btn-primary" id="bkbtn" onclick="window.location.href='viewList.php'">ย้อนกลับ</button>
</div>
<div class="col-xl-2 col-lg-2 col-md-3 col-sm-4" >
<button type="button" class="btn btn-danger" id="exbtn" onclick="window.location.href='<?php echo $logoutAction;?>'">ออกจากระบบ</button>
</div>
</div>
</div>
</body>
</html>