Viewing file: v_officeAddressTable.php (4.46 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<script language="JavaScript">
function ReturnValue(pvId,pvName,apId,apName,dtId,dtName)
{
window.opener.document.myform.elements["offProvinceId"].value = pvId;
window.opener.document.myform.elements["offProvinceName"].value = pvName;
window.opener.document.myform.elements["offAmphurId"].value = apId;
window.opener.document.myform.elements["offAmphurName"].value = apName;
window.opener.document.myform.elements["offDistrictId"].value = dtId;
window.opener.document.myform.elements["offDistrictName"].value = dtName;
window.close();
}
</script>
<table width="100%"><?php echo form_open($this->config->item("ea_folder")."popup/offAdr_popup_search");?><br/>
<tr>
<td align="center" colspan="5">
<font size="2" width="30%"><b>ชื่อจังหวัด:</b></font>
<input type="text" name="provinceName" id="provinceName" size="14" value="<?php echo set_value('provinceName');?>"/>
</td>
<td align="center">
<font size="2"><b>ชื่ออำเภอ:</b></font>
<input type="text" name="amphurName" id="amphurName" size="14" value="<?php echo set_value('amphurName');?>" />
</td>
<td align="center">
<font size="2"><b>ชื่อตำบล:</b></font>
<input type="text" name="districtName" id="districtName" size="14" value="<?php echo set_value('districtName');?>" />
</td>
<td><input type="submit" name="search" value="ค้นหา" />
</td>
</tr>
</table>
<table width="100%">
<tr>
<td height="22" colspan="4"></td>
</tr>
<?php
if(isset($rs_adr) && $rs_adr->num_rows() > $this->config->item("ea_max_row")) {
?>
<tr>
<td height="30" colspan="3"><div class="boxBlock leftBox"><font size="2"><b>
แสดง <?php echo $this->config->item("ea_max_row");?> รายการจาก <?php echo isset($rs_adr) ? $rs_adr->num_rows() : '';?> รายการ</b></font>
</div></td>
</tr>
<?php
}
?>
<tr bgcolor="<?php echo $this->config->item("rg_table_color");?>">
<td width="10%" align="center"><font size="2" color="<?php echo $font_color_table;?>"><b>ลำดับที่</b></font></td>
<td align="center"><font size="2" color="<?php echo $font_color_table;?>"><b>ชื่อจังหวัด</b></font></td>
<td align="center"><font size="2" color="<?php echo $font_color_table;?>"><b>ชื่ออำเภอ</b></font></td>
<td align="center"><font size="2" color="<?php echo $font_color_table;?>"><b>ชื่อตำบล</b></font></td>
</tr>
<?php
$i = 0;
if($rs_adr->num_rows()) {
foreach($rs_adr->result() as $row) {
if($i >= $this->config->item("ea_max_row"))
break;
echo "<tr onmouseover=\"bgColor='".$tr_color_even."'\" onmouseout=\"bgColor='".$this->config->item("rg_mouseout")."'\">";
?>
<td align="center" onClick="ReturnValue(<?php echo $row->provinceId;?>,'<?php echo $row->provinceName;?>','<?php echo $row->amphurId;?>','<?php echo $row->amphurName;?>','<?php echo $row->districtId;?>','<?php echo $row->districtName;?>')" onMouseOver="this.style.cursor='pointer'"><font size="2"><?php echo $i+1;?></font></td>
<td onClick="ReturnValue(<?php echo $row->provinceId;?>,'<?php echo $row->provinceName;?>','<?php echo $row->amphurId;?>','<?php echo $row->amphurName;?>','<?php echo $row->districtId;?>','<?php echo $row->districtName;?>')" onMouseOver="this.style.cursor='pointer'"><font size="2"><?php echo $row->provinceName;?></font></td>
<td onClick="ReturnValue(<?php echo $row->provinceId;?>,'<?php echo $row->provinceName;?>','<?php echo $row->amphurId;?>','<?php echo $row->amphurName;?>','<?php echo $row->districtId;?>','<?php echo $row->districtName;?>')" onMouseOver="this.style.cursor='pointer'"><font size="2"><?php echo $row->amphurName;?></font></td>
<td onClick="ReturnValue(<?php echo $row->provinceId;?>,'<?php echo $row->provinceName;?>','<?php echo $row->amphurId;?>','<?php echo $row->amphurName;?>','<?php echo $row->districtId;?>','<?php echo $row->districtName;?>')" onMouseOver="this.style.cursor='pointer'"><font size="2"><?php echo $row->districtName;?></font></td>
</tr>
<?php
$i++;
}
} else {
?>
<tr>
<td colspan="4" align="center"><font size="2" color="<?php echo $font_color_err;?>">** ไม่ปรากฏรายการดังกล่าวในฐานข้อมูล **</font></td>
</tr>
<?php
}
?>
<tr bgcolor="silver">
<td colspan="4" align="right"><font size="2">รวม <?php echo $rs_adr->num_rows();?> รายการ</font></td>
</tr>
<?php echo form_close();?>
</table>
|