|
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/inc/ |
Upload File : |
<style type="text/css">
<!--
.style2 {color: #FF0000}
-->
</style>
<SCRIPT language='javascript' src='js/calendar/daily_popcalendar.js'></SCRIPT>
<SCRIPT language='javascript' src='js/calendar/displayelement.js'></SCRIPT>
<link rel="stylesheet" type="text/css" href="js/calendar/style.css" />
<div>
<link rel="stylesheet" type="text/css" href="hiliterow.css" />
<script>
<!--
function checkQuantity(MyID, maxValue){
var q = document.getElementById(MyID);
if(parseInt(q.value)>maxValue){
alert("กรุณาตรวจสอบตัวเลขที่กรอก\nตัวเลขอาจเกินกว่าความเป็นจริง");
}
}
function open_win(win_file, win_title)
{
window.open(win_file, win_title, 'resizable=yes,width=900,height=500,toolbar=no,scrollbars=yes,location=no,menubar=no,status=no');
}
-->
</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?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?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);
} 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?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>
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td width="13%" height="24"><span class="style1 style2">*</span>รหัสแบบสำรวจ</td>
<td colspan="4">
<input name="code" type="text" id="code" size="30" maxlength="11" value="<?=($_POST['code']=='')?$Result_3['surway_id']:$_POST['code']?>" onblur="return checkNumber(this,document.getElementById('code_id'));" /><span id="code_id"></span> ระดับความเร่งด่วน
<select name="level" id="level">
<option selected="selected">เลือก</option>
<option value="1">น้อย</option>
<option value="2">ปานกลาง</option>
<option value="3">มาก</option>
</select></td>
</tr>
<tr>
<td width="13%" height="24">จังหวัด</td>
<td colspan="4">
<?php
$province = mysql_query("SELECT ccDigi,ccName,ccType FROM ccaa WHERE ccType='Changwat' AND ccDigi LIKE '13000000' ");
while( $ram = mysql_fetch_array($province) ) {
$id=$ram['ccDigi'];
?>
<input type="readonly" name="public_province1" id="public_province1" value="ปทุมธานี" disabled="disabled"/>
<input name="public_province" type="hidden" value="<? echo $ram['ccDigi'];?>" />
<? } ?> </td>
</tr>
<tr>
<td width="13%" height="24"><span class="style1 style2">*</span>อำเภอ</td>
<td colspan="4"><select name="public_amphur" id="public_amphur" onchange="chgTambon(this.value, 13);">
<option value="">กรุณาเลือก อำเภอ</option>
<?php $slted= $Result_3['aumpher_id'];
$am = mysql_query("SELECT ccDigi,ccName,ccType FROM ccaa WHERE ccType='Aumpur' AND ccDigi LIKE '13%' ");
while( $ram = mysql_fetch_array($am) ) {
if($ram['ccDigi']==$slted){ ?>
<option value="<?=$ram['ccDigi']?>"selected>
<?=$ram['ccName']?>
</option>
;
<? }else{ ?>
<option value="<?=$ram['ccDigi']?>">
<?=$ram['ccName']?>
</option>
;
<?
}
}
?>
</select></td>
</tr>
<tr>
<td width="13%" height="24"><span class="style1 style2">*</span>ตำบล</td>
<td colspan="4">
<LABEL id="lblTambon">
<? if ($Result_3['tambol_id'] !="") {?>
<select name="public_tambol2" id="public_tambol2" onchange="chgMun(this.value,<?=$Result_3['tambol_id']?>)" >
<?php $t_id = substr($_GET['MooID'],0,6);
$slted=$Result_3['tambol_id'];
$amm = mysql_query("SELECT ccDigi,ccName,ccType FROM ccaa_pathumthani WHERE ccType='Tamboon' AND ccDigi LIKE '$t_id%' ");
while( $ram = mysql_fetch_array($amm) ) {
if($ram['ccDigi']==$slted){ ?>
<option value="<?=$ram['ccDigi']?>"selected>
<?=$ram['ccName']?>
</option>
;
<? }else{ ?>
<option value="<?=$ram['ccDigi']?>">
<?=$ram['ccName']?>
</option>
;
<?
}
}
?>
</select>
<?
} else {
echo "(กรุณาเลือกอำเภอก่อน)";
}
?>
</LABEL> </td>
</tr>
<tr>
<td width="13%" height="24"><span class="style1 style2">*</span>เทศบาล</td>
<td colspan="4">
<LABEL id="lblMun">
<? if ($Result_3['tambol_id'] !="") {?>
<select name="public_Mun" id="public_Mun" onchange="chgMoo(this.value,<?=$Result_3['tambol_id']?>)" >
<?php $t_id = substr($_GET['TbID'],0,4);
$slted=$Result_3['mun_id'];
$amm = mysql_query("SELECT
ccaa_pathumthani.ccDigi,
ccaa_pathumthani.ccName,
ccaa_pathumthani.ccType,
ccaa_pathumthani.ccMoo,
ccaa_pathumthani.ccMun,
ccaa_municipality.municipality_name
FROM
ccaa_pathumthani
Inner Join ccaa_municipality ON ccaa_pathumthani.ccMun = ccaa_municipality.municipality_id
WHERE ccDigi LIKE('$st_id%') AND ccType='Village'
GROUP BY ccMun ");
while( $ram = mysql_fetch_array($amm) ) {
if($ram['municipality_id']==$slted){ ?>
<option value="<?=$ram['municipality_id']?>"selected>
<?=$ram['municipality_name']?>
</option>
;
<? }else{ ?>
<option value="<?=$ram['ccDigi']?>">
<?=$ram['ccName']?>
</option>
;
<?
}
}
?>
</select>
<?
} else {
echo "(กรุณาเลือกตำบลก่อน)";
}
?>
</LABEL> </td>
</tr>
<tr>
<td width="13%" height="24"><span class="style1 style2">*</span>หมู่บ้าน/ชุมชน</td>
<td colspan="4"><LABEL id="lblSubTambon">
<?php if($Result_3['village_name']=""){?>
<select name="public_Subtambol" id="public_Subtambol">
<?php $st_id = substr($_GET['MooID'],0,6);
$slted=$Result_3['village_name'];
$amms = mysql_query("SELECT ccDigi,ccName,ccType,ccMun FROM ccaa_pathumthani WHERE ccType='village' AND ccDigi= '$st_id' ");
while( $rams = mysql_fetch_array($amms) ) {
if($rams['ccDigi']==$slted){ ?>
<option value="<?=$rams['ccDigi']?>"selected>
<?=$rams['ccName']?>
</option>
;
<? }
}
?>
</select>
<?php }else{ echo "(กรุณาเลือกเทศบาลก่อน)";}?>
</LABEL> </td>
</tr>
<tr>
<td width="13%" height="24">บ้านเลขที่</td>
<td colspan="4"><input type="text" name="ban_id" id="ban_id" size="10" value="<?=($_POST['ban_id']=='')?$Result_3['ban_id']:$_POST['ban_id']?>" onblur="return checkNumber(this,document.getElementById('ban'));" /><span id="ban"></span>
หมู่ที่
<input type="text" name="moo" id="moo" size="10" value="<?=($_POST['moo']=='')?$Result_3['moo']:$_POST['moo']?>" onblur="return checkNumber(this,document.getElementById('moo_id'));"/><span id="moo_id"></span></td>
</tr>
<tr>
<td width="13%" height="24">ชื่อ ผู้ให้ข้อมูล</td>
<td colspan="4"><input name="aname" type="text" id="aname" size="30" value="<?=($_POST['aname']=='')?$Result_3['name_meeting']:$_POST['aname']?>" />
นามสกุล
<input name="lname" type="text" id="lname" size="27" value="<?=($_POST['lname']=='')?$Result_3['lastname_meeting']:$_POST['lname']?>" />
อายุ
<input type="text" name="age" id="age" size="10" maxlength="3" value="<?=($_POST['age']=='')?$Result_3['age']:$_POST['age']?>" onblur="return checkNumber(this,document.getElementById('age_id'));"/>
<span id="age_id"></span> ปี</td>
</tr>
<tr>
<td width="13%" height="24">ชื่อ ผู้สำรวจ</td>
<td colspan="4"><input name="aname2" type="text" id="aname2" size="30" value="<?=($_POST['aname2']=='')?$Result_3['name_surway']:$_POST['aname2']?>" />
นามสกุล
<input name="lname2" type="text" id="lname2" size="27" value="<?=($_POST['lname2']=='')?$Result_3['lastname_surway']:$_POST['lname2']?>" /> วันเดือนปีที่ สำรวจ<input name="TimeLineDate" type="text" id="TimeLineDate" size="20" maxlength="10" onFocus="this.select();" onKeyPress="chkDateFormat(this.id, this.value);" onKeyUp="autoTab(this)" value="<? if($TimeLineDate == "--543"){ echo date("d-m-").(date("Y")+543);}else{ echo ($TimeLineDate!="")?$TimeLineDate:date("d-m-").(date("Y")+543);}?>"/>
<img src="js/calendar/calendar2.gif" title="วัน-เดือน-ปี" width="26" height="25" border="0" align="absmiddle"
onclick="popUpCalendar(this, document.getElementById('TimeLineDate'), 'dd-mm-yyyy')" onMouseOver="this.style.cursor='pointer'"value="" /> </td>
</tr>
<tr>
<td width="13%" height="24">จุดพิกัดแกน(x)</td>
<td width="24%"><div id="show_lat"><?=($_POST['lattitude']=='')?$Result_3['latitude']:$_POST['lattitude']?></div><input name="lattitude" id="lattitude" type="hidden"></td>
<td width="10%">จุดพิกัดแกน(y)</td>
<td width="19%"><div id="show_lon"><?=($_POST['longtitude']=='')?$Result_3['longtitude']:$_POST['longtitude']?></div><input name="longtitude" id="longtitude" type="hidden"></td>
<td width="34%"><a href="#" onclick="javascript:window.open('map.php','show','toolbar=0,location=0,directories=0,status=0,menubar=0,height=530,width=1000,resizeable=1,scrollbars=1');"><img src="img/google_map_logo.png" align="absmiddle" border="0" /></a></td>
</tr>
</table></td>
</tr>
</table>