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/industry/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/pathumthani_integration/integration/application/industry/search_logistics.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="type_name" id="labeltype_name">ช่องทางการขนส่ง</label></strong></td>
						<td class="style1"><select name="type_name" id="type_name"  style="width:150px" onChange="getvalue(this);">
								  <option value="0">เลือกช่องทางการขนส่ง</option>
								 <option value="การขนส่งทางถนน" <?=($Result_3['type_name']=='การขนส่งทางถนน')?'selected="selected"':''?>>การขนส่งทางถนน</option>
                                  <option value="การขนส่งทางรถไฟ" <?=($Result_3['type_name']=='การขนส่งทางรถไฟ')?'selected="selected"':''?>>การขนส่งทางรถไฟ</option>
                                  <option value="การขนส่งทางน้ำ" <?=($Result_3['type_name']=='การขนส่งทางน้ำ')?'selected="selected"':''?>>การขนส่งทางน้ำ</option>
                                  <option value="การขนส่งทางอากาศ" <?=($Result_3['type_name']=='การขนส่งทางอากาศ')?'selected="selected"':''?>>การขนส่งทางอากาศ</option>	
								</select></td>
				 </tr>			
				  <tr bgcolor="#FFFFFF" >
						<td width="160" class="style1" ><strong><label for="name" id="labelname">ชื่อบริษัทขนส่ง</label></strong></td>
						<td class="style1"><input name="name" id="name" type="text"   value="<?=$name?>" size="20" onKeyDown="getvalue(this)" onKeyUp="getvalue(this)" onChange="getvalue(this)"  onBlur="getvalue(this)"/></td>
				 </tr>
				 <?php /*?> <tr bgcolor="#FFFFFF" >
						<td width="160" class="style1" ><strong><label for="detail" id="labeldetail">รายละเอียด</label></strong></td>
						<td class="style1"><input name="detail" id="detail" type="text"   value="<?=$detail?>" size="20" onKeyDown="getvalue(this)" onKeyUp="getvalue(this)" onChange="getvalue(this);"  onBlur="getvalue(this)"/></td>
				 </tr><?php */?>
                 <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="amphur" id="labelamphur">อำเภอ</label></strong></td>
						<td class="style1">
								<select  name="amphur" id="amphur" 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"; } ?>>
											<?=str_replace("อำเภอ","",$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"; } ?>>
											<?=str_replace("ตำบล","",$Result_4['ccName'])?>
											</option>
								<?
									}
								?>
									</select>
                          </span>
						</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