|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /home/pathumthani_integration/integration/application/labor/ |
Upload File : |
<?
session_start();
set_time_limit(0);
include_once("../../config/config_epm.inc.php");
include_once("manage_user.inc.php");
include_once("../../inc/function.php");
include_once("function/function.inc.php");
//echo "<pre>"; print_r($_SESSION); echo "</pre>";
if ( $_SERVER['REQUEST_METHOD'] == "POST" ) {
$hdismissal_helpful_id = $_POST['hdismissal_helpful_id'];
$hdismissal_id = $_POST['hdismissal_id'];
$doc_no = $_POST['doc_no'];
$help_date = dateFormat( $_POST['help_date'], "thaieng_slash" );
$subject = $_POST['subject'];
$operator = $_POST['operator'];
$operation = $_POST['operation'];
$result = $_POST['result'];
$judge_result = $_POST['judge_result'];
$operation_place = $_POST['operation_place'];
$finished_place = $_POST['finished_place'];
$add_date = date("Y-m-d H:m:s");
$add_staffid = $session_staffid;
$update_date = date("Y-m-d H:m:s");
$update_staffid = $session_staffid;
$add_status = "KEY";
if ( $hdismissal_helpful_id ) { # UPDATE CASE
$strSQL = "UPDATE `labor_dismissal_helpful` SET
`dismissal_id`='".$hdismissal_id."',
`doc_no`='".$doc_no."',
`help_date`='".$help_date."',
`subject`='".$subject."',
`operator`='".$operator."',
`operation`='".$operation."',
`result`='".$result."',
`judge_result`='".$judge_result."',
`operation_place`='".$operation_place."',
`finished_place`='".$finished_place."',
`update_date`='".$update_date."',
`update_staffid`='".$update_staffid."'
WHERE `dismissal_helpful_id`='".$hdismissal_helpful_id."'
"; #echo $strSQL; exit();
mysql_query($strSQL);
} else { # INSERT CASE
$strSQL = "INSERT INTO `labor_dismissal_helpful` SET
`dismissal_id`='".$hdismissal_id."',
`doc_no`='".$doc_no."',
`help_date`='".$help_date."',
`subject`='".$subject."',
`operator`='".$operator."',
`operation`='".$operation."',
`result`='".$result."',
`judge_result`='".$judge_result."',
`operation_place`='".$operation_place."',
`finished_place`='".$finished_place."',
`add_date`='".$add_date."',
`add_staffid`='".$add_staffid."',
`add_status`='".$add_status."'
"; #echo $strSQL; exit();
mysql_query($strSQL);
}
print"<script language='JavaScript'> alert('บันทึกข้อมูลเรียบร้อยแล้ว') </script> ";
print"<meta http-equiv=\"refresh\" content=\"0;URL=?p=labor_layoff_index\">\n";
exit();
}
if ( $_SERVER['REQUEST_METHOD'] == "GET" && $_GET['hAction'] == "Update" && $_GET['hdismissal_helpful_id'] && $_GET['hdismissal_id'] ) {
$strSQL = "SELECT *
FROM
labor_dismissal_helpful
WHERE
dismissal_helpful_id='".$_GET['hdismissal_helpful_id']."' AND
dismissal_id='".$_GET['hdismissal_id']."'
"; #echo $strSQL;
$rsConn = mysql_query($strSQL);
$objResult = mysql_fetch_object($rsConn);
$hdismissal_helpful_id = $objResult->dismissal_helpful_id;
$hdismissal_id = $objResult->dismissal_id;
$doc_no = $objResult->doc_no;
$help_date = $objResult->help_date;
$subject = $objResult->subject;
$operator = $objResult->operator;
$operation = $objResult->operation;
$result = $objResult->result;
$judge_result = $objResult->judge_result;
$operation_place = $objResult->operation_place;
$finished_place = $objResult->finished_place;
}
?>
<?
if( $_SERVER['REQUEST_METHOD'] == "GET" && $_GET['del_id'] && $_GET['hAction'] == "Delete" ) {
$strSQL = "DELETE FROM labor_dismissal_helpful WHERE dismissal_helpful_id='".$_GET['del_id']."'";
mysql_query($strSQL);
print"<script language='JavaScript'> alert('บันทึกข้อมูลเรียบร้อยแล้ว') </script> ";
print"<meta http-equiv=\"refresh\" content=\"0;URL=?p=labor_layoff_index\">\n";
exit();
}
?>
<!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=tis-620" />
<title><?=$title_name?></title>
<link href="common/style.css" rel=stylesheet>
<script language="javascript" src="common/functions.js"></script>
<link rel="STYLESHEET" type="text/css" href="codebase/dhtmlxtabbar.css">
<script src="codebase/dhtmlxcommon.js"></script>
<script src="codebase/dhtmlxtabbar.js"></script>
<script src="codebase/dhtmlxtabbar_start.js"></script>
<script language="javascript">
function mOvr(src,clrOver){
if (!src.contains(event.fromElement)) src.bgColor = clrOver;
}
function mOut(src,clrIn){
if (!src.contains(event.toElement)) src.bgColor = clrIn;
}
</script>
<script src="js/daily_popcalendar.js"></script>
<style type="text/css">
<!--
A:link {
FONT-SIZE: 12px;color: #000000; FONT-FAMILY: Tahoma, "Microsoft Sans Serif";TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:visited {
FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Tahoma, "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:active {
FONT-SIZE: 12px; COLOR: #014d5f; FONT-FAMILY: Tahoma, "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
A:hover {
FONT-SIZE: 12px; COLOR: #f3960b; FONT-FAMILY: Tahoma, "Microsoft Sans Serif"; TEXT-DECORATION: underline;FONT-WEIGHT: bold;
}
.style1 {color: #FF0000}
.h_menu {color:#FF9900}
-->
.bg_th{
background-image:url(images/horiz-bg.png);
background-repeat:repeat-x;
font-weight:bold;
color:#FFFFFF;
text-align:center;
}
.container .pusher{
cursor:pointer;
padding:3px 10px 3px 7px;
font-weight:900;
font-size:12px;
margin:0;
background:url(img/bgheader-2.PNG);
color:#FFFFFF;
}
.container .mover{
border:1px solid #3399CC;
padding:3px 10px 3px 7px;
margin: 0;
background-color:#E1F0FF;
}
.container {
padding:6px;
margin-top:5px;
width: auto;
font-size:11px;
}
.container2 .pusher2{
cursor:pointer;
padding:3px 10px 3px 7px;
font-weight:900;
font-size:12px;
margin:0;
background:url(img/bgheader-2.PNG);
color:#FFFFFF;
}
.container2 .mover2{
border:1px solid #3399CC;
padding:3px 10px 3px 7px;
margin: 0;
background-color:#E1F0FF;
}
.container2 {
padding:6px;
margin-top:5px;
width: auto;
font-size:11px;
}
.container3 .pusher3{
cursor:pointer;
padding:3px 10px 3px 7px;
font-weight:900;
font-size:12px;
margin:0;
background:url(img/bgheader-2.PNG);
color:#FFFFFF;
}
.container3 .mover3{
border:1px solid #3399CC;
padding:3px 10px 3px 7px;
margin: 0;
background-color:#E1F0FF;
}
.container3 {
padding:6px;
margin-top:5px;
width: auto;
font-size:11px;
}
.container4 .pusher4{
cursor:pointer;
padding:3px 10px 3px 7px;
font-weight:900;
font-size:12px;
margin:0;
background:url(img/bgheader-2.PNG);
color:#FFFFFF;
}
.container4 .mover4{
border:1px solid #3399CC;
padding:3px 10px 3px 7px;
margin: 0;
background-color:#E1F0FF;
}
.container4 {
padding:6px;
margin-top:5px;
width: auto;
font-size:11px;
}
</style>
<script type="text/javascript" charset="utf-8" src="js/jquery-1.2.3.pack.js"></script>
</head>
<body>
<form id="form1" name="form1" method="POST" onsubmit="return saveAction()" enctype="multipart/form-data" >
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="10">
<tr>
<td width="35%" align="left"><img src="../../images/crut.png" width="80" height="86" /></td>
<td width="30%" align="center"><strong style="color:#000000; font-size:12px;">บันทึกข้อความ</strong></td>
<td width="35%" align="center"> </td>
</tr>
<tr>
<td colspan="3"><strong>ส่วนราชการ</strong> สำนักงานสวัสดิการและคุ้มครองแรงงานจังหวัดปทุมธานี โทร.02-567-5101
<input name="hdismissal_helpful_id" type="hidden" id="hdismissal_helpful_id" value="<?=$hdismissal_helpful_id?>" />
<input name="hdismissal_id" type="hidden" id="hdismissal_id" value="<?=$hdismissal_id?>" /></td>
</tr>
<tr>
<td colspan="3"><strong>ที่</strong> <span class="style1">*</span> ปท 0024/
<input name="doc_no" type="text" id="doc_no" value="<?=$doc_no?>" onKeyPress="return fmtNumber(this, event);"/>
วันที่
<input name="help_date" type="text" id="help_date" size="10" value="<?=( $help_date != "0000-00-00" && $help_date ) ? dateFormat($help_date, 'engthai_slash') : "";?>" maxlength="10" onkeypress="return fmtDate(this, event);"/>
<img src="js/calendar/calendar2.gif" align="top" border="0" onclick="popUpCalendar(this, form1.help_date, 'dd/mm/yyyy')" title="วัน เดือน ปี" style="cursor:pointer;" /> </td>
</tr>
<tr>
<td colspan="3" bgcolor="#B4B4B4">
<table width="100%" border="0" cellpadding="5" cellspacing="1">
<tr>
<td bgcolor="#FFFFFF">
<table width="100%" border="0" align="center" bgcolor="#FFFFFF" cellpadding="3" cellspacing="1">
<tr>
<td class="style1"> </tr>
<tr>
<td>
<div class="container">
<div class="pusher" id="slideToggle"><img src="../../images/dash_icon/bookmark.png" width="16" height="16" align="absmiddle" /> รายละเอียดการดำเนินการให้ความช่วยเหลือ</div>
<div class="mover"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><table width="900" border="0" cellpadding="3" cellspacing="0">
<tr>
<td height="24" align="left" valign="top"> </td>
<td align="left"> </td>
</tr>
<tr>
<td width="30%" height="24" align="left" valign="top"><strong>เรื่อง</strong> <span class="style1">*</span></td>
<td width="70%" align="left"><input name="subject" type="text" id="subject" value="<?=$subject?>" size="100" /></td>
</tr>
<tr>
<td height="24" align="left" valign="top"><strong>1. เรื่องนี้เริ่มต้นด้วย เมื่อวันที่ </strong></td>
<td align="left"><textarea name="operator" cols="102" rows="8" id="operator"><?=$operator?></textarea></td>
</tr>
<tr>
<td height="24" align="left" valign="top"> </td>
<td align="left"> </td>
</tr>
<tr>
<td height="24" align="left" valign="top"><strong>2. การดำเนินการ โดยมี </strong></td>
<td align="left"><input name="operator" type="text" id="operator" value="<?=$operator?>" size="100" /></td>
</tr>
<tr>
<td height="24" align="left" valign="top">เป็นผู้ดำเนินการ และ ได้ปฏิบัติแล้วดังนี้ </td>
<td align="left"><textarea name="operation" cols="102" rows="8" id="operation"><?=$operation?></textarea></td>
</tr>
<tr>
<td height="24" align="left" valign="top"> </td>
<td align="left"> </td>
</tr>
<tr>
<td height="24" align="left" valign="top"><strong>3. ผลการดำเนินการ </strong></td>
<td align="left"><textarea name="result" cols="102" rows="8" id="result"><?=$result?></textarea></td>
</tr>
<tr>
<td height="24" align="left" valign="top"> </td>
<td align="left"> </td>
</tr>
</table></td>
</tr>
</table></div>
</div> </td>
</tr>
<tr>
<td><div class="container">
<div class="pusher" id="slideToggle"><img src="../../images/dash_icon/bookmark.png" width="16" height="16" align="absmiddle" /> บันทึกข้อมูลผลการวินิจฉัยคำร้อง</div>
<div class="mover"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><table width="900" border="0" cellpadding="3" cellspacing="0">
<tr>
<td width="30%" height="24" align="left" valign="top"> </td>
</tr>
<tr>
<td height="24" align="left" valign="top"><input type="radio" name="judge_result" value="1" <?=( $judge_result == "1" ) ? "Checked" : "";?>/>
ประณีประนอมลูกจ้างรายคน</td>
</tr>
<tr>
<td height="24" align="left" valign="top"><input type="radio" name="judge_result" value="2" <?=( $judge_result == "2" ) ? "Checked" : "";?>/>
ออกคำสั่งลูกจ้างรายคน</td>
</tr>
<tr>
<td height="24" align="left" valign="top"><input type="radio" name="judge_result" value="3" <?=( $judge_result == "3" ) ? "Checked" : "";?>/>
ออกคำสั่ง ไม่มีสิทธิ์รับเงิน</td>
</tr>
<tr>
<td height="24" align="left" valign="top"><input type="radio" name="judge_result" value="4" <?=( $judge_result == "4" ) ? "Checked" : "";?>/>
สั่งดำเนินคดีแพ่ง</td>
</tr>
<tr>
<td height="24" align="left" valign="top"><input type="radio" name="judge_result" value="5" <?=( $judge_result == "5" ) ? "Checked" : "";?>/>
สั่งดำเนินคดีอาญา</td>
</tr>
<tr>
<td height="24" align="left" valign="top"><input type="radio" name="judge_result" value="6" <?=( $judge_result == "6" ) ? "Checked" : "";?>/>
ถอนคำร้อง</td>
</tr>
<tr>
<td height="24" align="left" valign="top"><input type="radio" name="judge_result" value="7" <?=( $judge_result == "7" ) ? "Checked" : "";?>/>
กลับเข้าทำงาน</td>
</tr>
<tr>
<td height="24" align="left" valign="top"><input type="radio" name="judge_result" value="8" <?=( $judge_result == "8" ) ? "Checked" : "";?>/>
ส่งไปศาล</td>
</tr>
<tr>
<td height="24" align="left" valign="top"> </td>
</tr>
</table></td>
</tr>
</table></div>
</div></td>
</tr>
<tr>
<td><div class="container">
<div class="pusher" id="slideToggle"><img src="../../images/dash_icon/bookmark.png" width="16" height="16" align="absmiddle" /> เลขที่เอกสาร </div>
<div class="mover"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><table width="900" border="0" cellpadding="3" cellspacing="0">
<tr>
<td height="24" align="left" valign="top"> </td>
<td align="left"> </td>
</tr>
<tr>
<td width="30%" height="24" align="left" valign="top"><strong>เรื่องรับที่</strong></td>
<td width="70%" align="left"><input name="operation_place" type="text" id="operation_place" value="<?=$operation_place?>" /></td>
</tr>
<tr>
<td height="24" align="left" valign="top"><strong>เรื่องเสร็จที่</strong></td>
<td align="left"><input name="finished_place" type="text" id="finished_place" value="<?=$finished_place?>" /></td>
</tr>
<tr>
<td height="24" align="left" valign="top"> </td>
<td align="left"> </td>
</tr>
</table></td>
</tr>
</table></div>
</div></td>
</tr>
<tr>
<td align="right"><input type="hidden" name="hAction" value="" />
<input type="submit" name="submit" value="บันทึก" style="width:100px"/>
<input type="button" name="back_main2" value="ลบบันทึกข้อความนี้" onclick="return delConfirm('<?=$hdismissal_helpful_id?>');" style="width:150px"/>
<input type="reset" name="Submit2" value="ยกเลิก" style="width:100px"/>
<input type="button" name="back_main" value="ย้อนกลับ" onclick="location.href='?p=labor_layoff_index'" style="width:100px"/> </td>
</tr>
<tr>
<td align="right"> </td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
<script language=JavaScript>
/* ฟังก์ชั่นการตรวจสอบให้อนุญาตกรอกตัวเลขเท่านั้น Modified By : Aussy [2553-06-30 02:32] */
function fmtDate(o, evt){
var id=o;
var charCode = (evt.which) ? evt.which : event.keyCode;
if ( ( (charCode > 47 && charCode < 58) || charCode == 8 || charCode == 127 ) && id ) {
if ( charCode != 8 ) {
if ( o.value.length == 2 || o.value.length == 5 ) {
o.value = o.value + "/";
}
} else {
return false;
}
} else {
return false;
}
}
function delConfirm(id) {
if ( confirm("คุณต้องการลบข้อมูลจริงหรือไม่?") == true ) {
location.href='?p=labor_layoff_keyin.helpful&hAction=Delete&del_id='+id;
}
}
function saveAction() {
var doc_no = document.getElementById("doc_no");
var subject = document.getElementById("subject");
if ( doc_no.value == "" ) {
alert("กรุณาระบุเลขที่ บันทึกข้อความ");
doc_no.focus();
return false;
} else if ( subject.value == "" ) {
alert("กรุณาระบุชื่อเรื่องบันทึกข้อความ");
subject.focus();
return false;
} else if ( confirm("คุณต้องการบันทึกข้อมูล จริงหรือไม่?") == true ) {
return true;
} else {
return false;
}
}
</script>