Viewing file: AddAcc.php (9.44 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
if (session_is_registered("valid_user")&&session_is_registered("Priority"))
{
include("../include/FunctionDB.php");
include("../include/Function.php");
ConnectDB();
$sql ="SELECT * FROM personal_tb WHERE Username='$Username'";
$result = mysql_query($sql) or die("Cannot Select").mysql_error();
$rs = mysql_fetch_array($result);
$rs[Research_code] = mysql_insert_id();
?>
<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>
<p> </p>
<table width="791" border="0" cellpadding="0" cellspacing="0">
<tr>
<td ><fieldset>
<legend><font color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><span class="style1"><img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"> เพิ่มรายการครุภัณฑ์หน่วยงาน</span></font></legend>
<label>
<div align="left"><br>
<form action="InsertAcc.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<table width="555" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<th height="25" colspan="3" bgcolor="#CCCCCC" scope="col"> </th>
</tr>
<tr>
<th width="165" height="30" bgcolor="#CCCCCC" scope="col"><div align="center" class="style1"><font face="Tahoma">รหัส</font></div></th>
<th width="13" bgcolor="#CCCCCC" scope="col"> </th>
<th width="361" bgcolor="#CCCCCC" scope="col"><div align="left"><font color="#006633" size="2" face="Tahoma">
<input name="Acc_code" type="text" id="Acc_code" size="30" />
</font></div></th>
</tr>
<tr>
<td bgcolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">ชื่ออุปกรณ์/ยี่ห้อ</font></div></td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"><input name="Acc_name" type="text" id="Acc_name" size="50" /></td>
</tr>
<tr>
<td height="22" bgcolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">ชนิด</font></div></td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"><select name="Acc_type_code" id="Acc_type_code" class="input1">
<option></option>
<?php
$strSQL1 = "SELECT * FROM accessories_type_tb ";
$result1 = mysql_query($strSQL1);
while( $rs1 = mysql_fetch_array($result1))
{
echo"<option value=\"$rs1[Acc_type_code]\" ><b>$rs1[Acc_type]- $rs1[Acc_Etype]</b></option>\n";
}
?>
</select> <a href="AddAccType.php"><img src="../picture/search.gif" width="15" height="19" border="0" alt="เพิ่มข้อมูลประเภทอาคาร" /></a></td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">หน่วยงาน /ฝ่ายที่รับผิดชอบ</font></div></td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"><strong><font color="#003366" size="2" face="Tahoma">
<select name="Faculty_code" id="Faculty_code" class="d">
<?php
$strSQL3 = "SELECT * FROM faculty_tb Where Faculty_code='$Faculty_code' ";
$result3 = mysql_query($strSQL3);
while( $rs3 = mysql_fetch_array($result3))
{
echo"<option value=\"$rs3[Faculty_code]\" ><b>$rs3[Faculty_name]</b></option>\n";
}
CloseDB();
?>
</select>
</font></strong></td>
</tr>
<tr>
<td height="22" bgcolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">ที่จัดเก็บ</font></div></td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"><input name="Store" type="text" class="input" id="Store" size="-จ" /></td>
</tr>
<tr>
<td height="83" bgcolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">บริษัท Contact</font></div></td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"><textarea name="Contact" cols="40" rows="5" id="Contact"></textarea></td>
</tr>
<tr>
<td height="24" bgcolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">วันที่</font></div></td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"><span class="style1"><font color="#000000" face="Tahoma">วันที่
<select name="mDate" id="mDate" class="select" onkeypress="return handleEnter(this, event)" >
<? getDay1to31();?>
</select>
เดือน
<select name="mMonth" id="mMonth" class="select" onkeypress="return handleEnter(this, event)">
<? getThaiMonth();?>
</select>
ปี พ.ศ.
<input name="mYear" type="text" class="input" id="mYear" size="4" maxlength="4">
</font></span></td>
</tr>
<tr>
<td height="22" bgcolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">ราคา</font></div></td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"><span class="style1">
<input name="Price" type="text" class="input" id="Price" size="7" maxlength="8" />
<font face="Tahoma">บาท</font></span></td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma"> สถานะการใช้งาน</font></div></td>
<td bgcolor="#CCCCCC"><font color="#FF0000" size="4" face="Tahoma"><strong>*</strong></font></td>
<td bgcolor="#CCCCCC"><span class="style1"><font face="Tahoma">
<input type="radio" name="Status" value="ใช้งาน" />
ใช้งาน
<input type="radio" name="Status" value="ว่าง" />
ว่าง
<input type="radio" name="Status" value="ชำรุด" />
ชำรุด
<input type="radio" name="Status" value="จำหน่ายออก" />
จำหน่ายออก </font></span></td>
</tr>
<tr>
<td height="35" bgcolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">สถิติการใช้งาน</font> </div></td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"><textarea name="Statistic" cols="40" id="Statistic"></textarea></td>
</tr>
<tr>
<td height="67" bgcolor="#CCCCCC"><div align="center" class="style1"><font face="Tahoma">ประวัติการซ่อม</font></div></td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"><font size="2" face="Tahoma">
<textarea name="Fix_History" cols="40" rows="4" id="Fix_History"></textarea>
</font></td>
</tr>
<tr>
<td height="56" bgcolor="#CCCCCC"><div align="center" class="style1"><font color="#003366" face="Tahoma">รูปภาพ</font></div></td>
<td bgcolor="#CCCCCC"> </td>
<td bgcolor="#CCCCCC"><table width="23%" height="76" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="1%"><td width="49%" height="49"></td>
<td width="8%"><div align="center"></td>
<td width="8%"><td><td width="1%"><label><td width="3%"><input name="Img1" type="file" id="Img1" onchange="browse()" />
<td width="1%"><td width="12%"></td>
<div align="center"><img src=" " name="Imag1" width="109" height="94" id="Imag1" /></div>
<td width="17%"> </td>
</tr>
</table>
<div align="left"></div></td>
</tr>
</table>
<p align="center">
<input type="submit" name="add" value="บันทึก" onclick="return(checkFormat())" />
<input type="reset" name="clear" value="เคลียร์ข้อมูล" />
<input type="button" name="cancel" value="ยกเลิก" onclick="location.href = 'showStudent.php?programId=<?php //echo $programId;?>&admitAcadYear=<?php //echo $admitAcadYear;?>'" />
</p>
</form>
</div>
</label>
</fieldset><br>
<font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><span class="style1"><b>หมายเหตุ :</b> ใช้เมาส์คลิกที่ชื่อ</span></font><font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2"><br>
</font></td>
</tr>
</table>
<?php
}
else
{
echo"<meta http-equiv=\"refresh\" content=\"3;URL=../login.php\">\n";
echo"Please Login ";
}
?>
|