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/labor_register_search.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>
</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><font color='#FFFFFF'>&nbsp;&nbsp;&nbsp;"+dpvar[i]+"</font></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.id);
	 //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("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 
	{ 
	 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>
<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" 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><font color="#FFFFFF"><div id="display" name="display"></div></font></td>
					<td><font color="#FFFFFF"><div id="display1" name="display1"></div></font></td>
			  	</tr>
			</table>
		
		<table width="650" border="0" cellspacing="0" cellpadding="5" bgcolor="#3399CC" align="center">	
				 <tr bgcolor="#FFFFFF" >
						<td width="160" class="style1" ><strong><label for="code" id="labelcode">เลขทะเบียนโรงงาน</label></strong></td>
						<td class="style1"><input name="code" id="code" type="text"   value="<?=$code?>" size="20" onKeyDown="getvalue(this)" onKeyUp="getvalue(this)"  onChange="getvalue(this)" onBlur="getvalue(this)"/></td>
				 </tr>			
				  <tr bgcolor="#FFFFFF" >
						<td width="160" class="style1" ><strong><label for="fname" id="labelfname">ชื่อโรงงาน</label></strong></td>
						<td class="style1"><input name="fname" id="fname" type="text"   value="<?=$fname?>" size="20" onKeyDown="getvalue(this)" onKeyUp="getvalue(this)" onChange="getvalue(this)"  onBlur="getvalue(this)"/></td>
				 </tr>
				  <tr bgcolor="#FFFFFF" >
						<td width="160" class="style1" ><strong><label for="location" id="labellocation">ที่ตั้งโรงงาน</label></strong></td>
						<td class="style1"><input name="location" id="location" type="text"   value="<?=$location?>" size="20" onKeyDown="getvalue(this)" onKeyUp="getvalue(this)" onChange="getvalue(this);"  onBlur="getvalue(this)"/></td>
				 </tr>
				 <tr bgcolor="#FFFFFF" >
						<td width="160" class="style1" ><strong><label for="ampur" id="labelampur">อำเภอที่ตั้งโรงงาน</label></strong></td>
						<td class="style1">
								<select  name="ampur" id="ampur" onChange="getvalue(this); chkTambol(this);">
									<option value="0">เลือกอำเภอ</option>
									<?
									$strSQL_3 = "SELECT ccaa.ccDigi,ccaa.ccName,ccaa.ccType
															FROM ccaa
															where ccaa.ccType =  'Aumpur' AND ccaa.ccDigi LIKE  '13%'			
												";						
									$rsConn_3 = mysql_db_query($dbname,$strSQL_3);
									while($Result_3 = mysql_fetch_assoc($rsConn_3)){
								?>
										  <option value="<?=$Result_3['ccDigi']?>" <? if($_POST['ampur']==$Result_3['ccDigi']){ echo "selected"; } ?>>
											<?=$Result_3['ccName']?>
											</option>
								<?
									}
								?>
									</select>
						</td>
				 </tr>		
                 <tr bgcolor="#FFFFFF" >
						<td width="160" class="style1" ><strong><label for="tambol" id="labeltambol">ตำบลที่ตั้งโรงงาน</label></strong></td>
						<td class="style1">
                        <span id="TambolCHK">
								<select  name="tambol" id="tambol" onChange="getvalue(this);">
									<option value="0">เลือกตำบล</option>
									<?
									$strSQL_4 = "SELECT ccaa.ccDigi,ccaa.ccName,ccaa.ccType
															FROM ccaa
															where ccaa.ccType =  'Tamboon' AND ccaa.ccDigi LIKE  '13%'			
												";						
									$rsConn_4 = mysql_db_query($dbname,$strSQL_4);
									while($Result_4 = mysql_fetch_assoc($rsConn_4)){
								?>
										  <option value="<?=$Result_4['ccDigi']?>" <? if($_POST['tambol']==$Result_4['ccDigi']){ echo "selected"; } ?>>
											<?=$Result_4['ccName']?>
											</option>
								<?
									}
								?>
									</select>
                          </span>
						</td>
				 </tr>
                 <tr bgcolor="#FFFFFF" >
						<td width="160" class="style1" ><strong><label for="muban" id="labelmuban">หมู่บ้านที่ตั้งโรงงาน</label></strong></td>
						<td class="style1"><input name="muban" id="muban" type="text"   value="<?=$muban?>" size="20" onKeyDown="getvalue(this)" onKeyUp="getvalue(this)" onChange="getvalue(this);"  onBlur="getvalue(this)"/></td>
				 </tr>
				  <tr bgcolor="#FFFFFF" >
						<td width="160" class="style1" ><strong><label for="type_id" id="labeltype_id">หมวดอุตสาหกรรม</label></strong></td>
						<td class="style1">
								<select  name="type_id" id="type_id" onChange="getvalue(this);">
									<option value="0">เลือกหมวดอุตสาหกรรม</option>
									<?
									$strSQL_22 = "SELECT *
														FROM industry_type	
														where parent_id='0'					
												";						
									$rsConn_22 = mysql_db_query($dbname,$strSQL_22);
									while($Result_22 = mysql_fetch_assoc($rsConn_22)){
								?>
										  <option value="<?=$Result_22['type_id']?>" <? if($_GET['type_id']==$Result_22['type_id']){ echo "selected"; } ?>>
											<?=$Result_22['type_name']?>
							  </option>
								<?
									}
								?>
									</select>
						</td>
				 </tr>
                 <tr bgcolor="#FFFFFF" >
						<td width="160" class="style1" ><strong><label for="fyear" id="labelfyear">ปีรับใบอนุญาติ</label></strong></td>
						<td class="style1"><input name="fyear" id="fyear" type="text"   value="<?=$fyear?>" size="20" onKeyDown="getvalue(this)" onKeyUp="getvalue(this)" onChange="getvalue(this);"  onBlur="getvalue(this)"/></td>
				 </tr>
                 <tr bgcolor="#FFFFFF" >
						<td width="160" class="style1" ><strong><label for="eyear" id="labeleyear">ปีสิ้นอายุ</label></strong></td>
						<td class="style1"><input name="eyear" id="eyear" type="text"   value="<?=$eyear?>" size="20" onKeyDown="getvalue(this)" onKeyUp="getvalue(this)" onChange="getvalue(this);"  onBlur="getvalue(this)"/></td>
				 </tr>
                 <tr bgcolor="#FFFFFF" >
						<td width="160" class="style1" ><strong><label for="import_status" id="labelimport_status">สถานะการนำเข้าข้อมูล</label></strong></td>
						<td class="style1">
								<select  name="import_status" id="import_status" onChange="getvalue(this);">
									<option value="0">เลือกสถานะการนำเข้าข้อมูล</option>
                                    <option value="1">ข้อมูลจากการ key</option>
                                    <option value="2">ข้อมูลจากการ import ไฟล์ XML</option>
                                    <option value="3">ข้อมูลจากการ import ไฟล์ EXCEL</option>
                                    <option value="4">ข้อมูลโรงงานอุตสาหกรรมที่เลิกกิจการ</option>
									</select>
						</td>
				 </tr>
				 
		  		<tr>
					<td colspan="3" align="center" background="images/horiz-bg.png">
					
					<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