Viewing file: FrmEditBuild.php (10.25 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
if (session_is_registered("valid_user")&&session_is_registered("Priority") )
{
$Username = $valid_user;
$Password = $password;
include("../include/FunctionDB.php");
include("../include/Function.php");
include("admin_menu.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);
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function browse()
{
form1.Imag1.src = form1.Img1.value;
}
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
function chk(c){
if (c.checked){
document.all.Prob1.disabled=false;
document.all.Prob2.disabled=false;
document.all.Prob3.disabled=false;
document.all.Prob4.disabled=false;
}
else{
document.all.Problem.disabled=false;
}
}
</script>
<style type="text/css">
<!--
.style1 {font-size: 14px}
-->
</style>
<table width="831" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="831"><br>
<fieldset>
<legend><span class="style1"><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="menu_manage.php" >หน้าหลัก</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"><a href="BuildingList.php">ข้อมูลครุภัณฑ์และสิ่งก่อสร้าง</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="AddRoom.php">เพิ่มข้อมูลห้องเรียน</a> <img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" /><a href="EditRoomList.php">แก้ไขข้อมูลห้องเรียน</a></font></span></legend>
<div align="center"><form action="EditBuild.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<table width="100%" border="0" cellpadding="0" cellspacing="1">
<tr>
<td align="right" bordercolor="#CCCCCC" class="Tahoma11"><table width="72%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" style="border:1px solid gray"size="12">
<tr bgcolor="#BFD0E6">
<td colspan="3"><div align="center"><font color="#999999" face="Tahoma"><strong><span class="style1"><font color="#FF0000">แก้ไข</font><font color="#000000"> ข้อมูล </font><font color="#000000" face="Tahoma"><strong> สิ่งก่อสร้าง และ อาคารสถานท</strong></font></span><font color="#000000" face="Tahoma"><strong></strong></font></strong></font><font color="#999999" size="4" face="Tahoma"><strong><font color="#000000" size="4" face="Tahoma"><strong>ี่</strong></font></strong></font></div></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">เลขที่แบบก่อสร้าง</font></div></td>
<td bordercolor="#FFFFCC"><div align="center" class="style1"><font color="#FF0000" face="Tahoma"><strong>*</strong></font></div></td>
<td bordercolor="#FFFFCC"><input name="BuildD_ID" type="text" class="input1 " id="BuildD_ID" value="<? echo $rs[BuildD_ID]?>" size="30"></td>
</tr>
<tr bgcolor="#eeeeee">
<td width="30%" bordercolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">ชื่ออาคาร</font></div></td>
<td width="2%" bordercolor="#FFFFCC"><div align="center" class="style1"><font color="#FF0000" face="Tahoma"><strong>*</strong></font></div></td>
<td width="68%" bordercolor="#FFFFCC"><input name="Build_name" type="text" class="input1 " id="Build_name" value="<? echo $rs[Build_name]?>" size="50"></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">ประเภทอาคาร</font></div></td>
<td bordercolor="#FFFFCC"> </td>
<td bordercolor="#FFFFCC"><span class="style1">
<select name="Build_type" id="Build_type">
<?php
$strSQL1 = "SELECT * FROM building_type_tb";
$result1= mysql_query($strSQL1);
while( $rs1 = mysql_fetch_array($result1))
{
echo"<option value=\"$rs1[code]\" ><b>$rs1[Type_name]</b></option>\n";
}
?>
</select>
</span></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">ชื่อย่ออาคาร</font></div></td>
<td bordercolor="#FFFFCC"> </td>
<td bordercolor="#FFFFCC"><input name="Short_name" type="text" class="input1 " id="Short_name" value="<? echo $rs[Short_name]?>" size="30"></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">จำนวนชั้น</font></div></td>
<td bordercolor="#FFFFCC"> </td>
<td bordercolor="#FFFFCC"><input name="Class_unit" type="text" class="input1 " id="Class_unit" value="<? echo $rs[Class_unit]?>" size="10" /></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">จำนวนห้อง</font></div></td>
<td bordercolor="#FFFFCC"> </td>
<td bordercolor="#FFFFCC"><input name="Room_unit" type="text" class="input1 " id="Room_unit" value="<? echo $rs[Room_unit]?>" size="10" /></td>
</tr>
<tr bgcolor="#eeeeee">
<td bordercolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">ปีที่สร้างแล้วเสร็จ</font></div></td>
<td bordercolor="#FFFFCC"> </td>
<td bordercolor="#FFFFCC"><span class="style1"><font color="#000000" face="Tahoma">วันที่
<select name="mDate" id="select3" class="select" >
<? getDay1to31();?>
</select>
เดือน
<select name="mMonth" id="select4" class="select" >
<? getThaiMonth();?>
</select>
ปี พ.ศ.
<input name="mYear" type="text" class="input1" id="mYear" size="5" />
</font></span></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">ราคา/หน่วย</font></div></td>
<td bordercolor="#FFFFCC"> </td>
<td bordercolor="#FFFFCC"><span class="style1">
<input name="BuildD_Pr" type="text" id="BuildD_Pr" value="<? echo $rs[BuildD_Pr]?>" class="input1" />
<font face="Tahoma">บาท</font></span></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="20" bordercolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">แหล่งเงิน</font></div></td>
<td bordercolor="#FFFFCC"> </td>
<td bordercolor="#FFFFCC"><span class="style1">
<select name="MoneyS_C" id="select">
<?php
$strSQL1 = "SELECT * FROM money_source_tb";
$result1= mysql_query($strSQL1);
while( $rs1 = mysql_fetch_array($result1))
{
echo"<option value=\"$rs1[MoneyS_C]\" ><b>$rs1[MoneyS_M]</b></option>\n";
}
?>
</select>
</span></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="102" bordercolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">รายละเอียด</font></div></td>
<td bordercolor="#FFFFCC"> </td>
<td bordercolor="#FFFFCC"><textarea name="Description" cols="50" rows="5" class="input1 style1" id="Description"><? echo $rs[Description] ?></textarea></td>
</tr>
<tr bgcolor="#eeeeee">
<td height="102" bordercolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">รูปภาพ</font></div></td>
<td bordercolor="#FFFFCC"> </td>
<td bordercolor="#FFFFCC"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="73%" class="style1"><div align="center">
<input name="Img1" type="file" id="Img1" onchange="browse()" />
</div></td>
<td width="27%" class="style1"><div align="center"><img src=" " name="Imag1" width="100" height="100" id="Imag1" /></div></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#BFD0E6">
<td colspan="3"><div align="center" class="style1">
<input type="hidden" name="BuildD_No" value="<? echo $rs[BuildD_No]?>" />
<input type="submit" name="Submit" value="บันทึก" class="button" />
</div></td>
</tr>
</table></td>
</tr>
</table>
</form>
</div>
</label>
</fieldset><br>
<font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><b>หมายเหตุ :</b> ใช้เมาส์คลิกที่ชื่อ<br>
</font></td>
</tr>
</table>
<?php
}
else
{
echo"<meta http-equiv=\"refresh\" content=\"3;URL=../login.php\">\n";
echo"Please Login ";
}
?>
|