Viewing file: BuildingDetail.php (5.39 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("../include/FunctionDB.php");
include("../include/Function.php");
ConnectDB();
$sql ="Select * From building_tb Where BuildD_No='$BuildD_No'";
$result = mysql_query($sql) or die("Error".mysql_error());
$rs = mysql_fetch_array($result);
/** โฟลเดอร์ไฟล์เอกสาร */
$Img1 = str_replace( "../", "", $rs['Img1'] );
$doc_path = $Img1."/Man_pic";
?>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<link href="../css/default.css" rel="stylesheet" type="text/css" />
<title><?=$_Config_sitename;?></title>
<script type="text/javascript" src="../js/utilities.js"></script>
<table width="574" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="574" scope="col"><form action="" method="post" name="form1" id="form1">
<fieldset>
<table width="94%" border="0" align="center" cellpadding="1" cellspacing="2" bgcolor="#DDDDDD" style=" border:0px solid gray"size="12">
<tr bgcolor="#BFD0E6">
<td colspan="3" align="center" bgcolor="#FFFFFF"><font color="#003399" size="2" face="Tahoma"><? echo $rs[Build_name]?></font></td>
</tr>
<tr>
<td > <p> </p>
<p> </p></td>
<td ><img src="../Man_pic/<?php echo $rs['Img1']; ?>" width="377" height="251" /></td>
<td > </td>
<td width="1%"> </td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF">เลขที่แบบก่อสร้าง
</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><? echo $rs[BuildD_ID]?></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#eeeeee">
<td width="22%" bordercolor="#CCCCCC" bgcolor="#FFFFFF">ชื่ออาคาร
</div></td>
<td width="71%" bordercolor="#FFFFCC" bgcolor="#FFFFFF"><? echo $rs[Build_name]?></td>
<td width="6%" rowspan="9" bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF">ประเภทอาคาร </td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><?
$code = $rs [Build_type];
$strSQL1 = "SELECT * FROM building_type_tb WHERE code='$code' ";
$result1= mysql_query($strSQL1);
while( $rs1 = mysql_fetch_array($result1))
{
echo"<option value=\"$rs1[code]\" ><b>$rs1[Type_name]</b></option>\n";
}
?></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF">
ชื่อย่ออาคาร</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><? echo $rs[Short_name]?></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF">จำนวนชั้น</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><? echo $rs[Class_unit]?></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF">จำนวนห้อง
</div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><? echo $rs[Room_unit]?></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF">ปีที่สร้างแล้วเสร็จ
</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF">
<?php
$sday = $rs[BuildD_Yr];
$yearthai = explode("-",$sday);
$day = intval($yearthai[2]);
$month = intval($yearthai[1]);
$year = intval($yearthai[0]);
//////////////////
// $yearthai = $day ;
$m = getThaiSubMonth($month);
echo"$day"." "."$m"." "."$year";
?>
</td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF">พื้นที่</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><? echo $rs[Area]?> ตรม</td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF">ค่าก่อสร้าง
</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><? echo number_format($rs['BuildD_Pr'],2,'.',','); ?> บาท</td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF">แหล่งเงิน
</div></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> <?php
$MoneyS_C= $rs [MoneyS_C];
$strSQL1 = "SELECT * FROM money_source_tb WHere MoneyS_C='$MoneyS_C ' ";
$result1= mysql_query($strSQL1);
while( $rs1 = mysql_fetch_array($result1))
{
echo"<option value=\"$rs1[MoneyS_C]\" ><b>$rs1[MoneyS_M]</b></option>\n";
}
?></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF">รายละเอียด</td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"><? echo nl2br($rs[Description])?></td>
<td bordercolor="#FFFFCC" bgcolor="#FFFFFF"> </td>
</tr>
<tr bgcolor="#BFD0E6">
<td height="20" colspan="3" align="center" bgcolor="#FFFFFF"><input type="button" name="Submit" value=" ปิดหน้าต่าง" onclick="javascript:parent.close();" class="button" />
</td>
</tr>
</table>
</fieldset>
</form></th>
</tr>
</table>
|