Viewing file: addBook.php (11.46 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
if (session_is_registered("valid_user"))
{
$Username = $valid_user;
include("../../include/FunctionDB.php");
include("../../include/Function.php");
include("admin_menu.php");
ConnectDB();
//$strSQL = "SELECT * FROM bookmant_tb Where Book_code='$Book_code' Order By Date_buy DESC ";
?>
<meta http-equiv="Content-Type" content="text/html; charset=TIS-620">
<script language="javascript" src="js/calendarDateInput2.js"></script>
<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;
}
}
function enableDropdown(){
var form = document.form1;
if(form.Teachbox1.checked){
form1.Teacher_code1.disabled = false;
}
else{
form1.Teacher_code1.disabled = true;
}
if(form.Teachbox2.checked){
form1.Teacher_code2.disabled = false;
}
else{
form1.Teacher_code2.disabled = true;
}
if(form.Teachbox3.checked){
form1.Teacher_code3.disabled = false;
}
else{
form1.Teacher_code3.disabled = true;
}
if(form.Teachbox4.checked){
form1.Teacher_code4.disabled = false;
}
else{
form1.Teacher_code4.disabled = true;
}
if(form.Teachbox5.checked){
form1.Teacher_code5.disabled = false;
}
else{
form1.Teacher_code5.disabled = true;
}
if(form.Teachbox6.checked){
form1.Teacher_code6.disabled = false;
}
else{
form1.Teacher_code6.disabled = true;
}
}
</script>
<style type="text/css">
<!--
.style3 {color: #000000}
.style4 {font-size: 14px}
.style5 {color: #000000; font-size: 14px; }
-->
</style>
<table width="814" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="814"><br>
<fieldset>
<legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="menu_office.php" >หน้าหลัก</a> <img src="../../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle"><a href="BookByYear.php">แสดงข้อมูลหนังสือราชการรายปี</a></font><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><img src="../../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle" />เพิ่มข้อมูลรายการหนังสือรับ-ส่ง</font></legend>
<label><div align="center">
<form id="form1" name="form1" method="post" action="InsertBook.php" enctype="multipart/form-data">
<p align="left"><font size="2" face="Tahoma"><img src="../../picture/previous.gif" onclick="window.history.back()" width="85" height="22" border="0" /></font></p>
<table width="70%" height="385" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#eeeeee" style="border:0px solid gray">
<tr bgcolor="#CCCCCC" >
<td height="25" colspan="3" bgcolor="#FFFFFF"><div align="center" class="style1"></div></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" bgcolor="#FFFFFF"><div align="center" class="style3 style4"><font face="Tahoma">ชนิดของหนังสือ</font></div></td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><font color="#006633" size="2" face="Tahoma">
<input name="Book_code" type="radio" value="1" checked />
หนังสือรับ
<input name="Book_code" type="radio" value="2" />
หนังสือส่ง</font>
<label> </label></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" bgcolor="#FFFFFF"><div align="center" class="style5"><font face="Tahoma">ปี.พศ </font></div></td>
<td bgcolor="#FFFFFF"><font size="2" face="Tahoma"><font color="#FF0000">*</font></font></td>
<td bgcolor="#FFFFFF"><select name="Year" id="Year">
<option value="2549">2549</option>
<option value="2550">2550</option>
<option value="2551">2551</option>
<option value="2552">2552</option>
</select></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" bgcolor="#FFFFFF"><div align="center" class="style4"><font face="Tahoma">เลขที่ทะเบียนรับ</font></div></td>
<td bgcolor="#FFFFFF"><div align="center"><font color="#FF0000" size="4" face="Tahoma">*</font></div></td>
<td bgcolor="#FFFFFF"><input name="No" type="text" id="No" size="6" maxlength="6" />
<font color="#006633" size="2" face="Tahoma"> </font>
<label></label></td>
</tr>
<tr bordercolor="#006699" bgcolor="#99CCFF">
<td bgcolor="#FFFFFF"><div align="center" class="style4"><font color="#000000" face="Tahoma">วัน/เดือน/ปี</font></div></td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="center"><font size="2" face="Tahoma"><font color="#FF0000">*</font></font></div></td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><!--<select name="mDate" id="mDate">
<?getDay1to31();?>
</select>
-
<select name="mMonth" id="mMonth">
<?getThaiMonth();?>
</select>
-
<input name="mYear" type="text" id="mYear" size="5" maxlength="4" />-->
<script>DateInput('date', true, 'DD/MM/YYYY','<?php echo date('d')."/".date('m')."/".date('Y');?>');</script></td>
</tr>
<tr bgcolor="#EEEEEE">
<td width="30%" height="20" bgcolor="#FFFFFF"><div align="center" class="style4"><font face="Tahoma">เลขที่หนังสือรับ</font></div></td>
<td width="2%" bgcolor="#FFFFFF"><div align="center"><font color="#FF0000" size="4" face="Tahoma">*</font></div></td>
<td width="68%" bgcolor="#FFFFFF"><font color="#006633" size="2" face="Tahoma">
<input name="No_in" type="text" id="No_in" size="30" />
</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#FFFFFF"><div align="center" class="style4"><font face="Tahoma">เรื่อง</font></div></td>
<td bgcolor="#FFFFFF"><div align="center"><font color="#FF0000" size="4" face="Tahoma">*</font></div></td>
<td bgcolor="#FFFFFF"><strong><font color="#003366" size="2" face="Tahoma">
<textarea name="Status" cols="50" rows="4" id="Status"></textarea>
</font></strong></td>
</tr>
<tr bgcolor="#eeeeee">
<td bgcolor="#FFFFFF"><div align="center" class="style4"><font face="Tahoma">จากหน่วยงาน</font></div></td>
<td bgcolor="#FFFFFF"><div align="center"><font color="#FF0000" size="4" face="Tahoma">*</font></div></td>
<td bgcolor="#FFFFFF"><input name="Store_1" type="text" class="input" id="Store_1" size="55" /></td>
</tr>
<tr bgcolor="#EEEEEE">
<td bgcolor="#FFFFFF"><div align="center" class="style3"><font size="2" face="Tahoma">หน่วยงาน /ฝ่าย </font> </div></td>
<td bgcolor="#FFFFFF"><div align="center"><font color="#FF0000" size="4" face="Tahoma">*</font></div></td>
<td bgcolor="#FFFFFF"><strong><font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<select name="Faculty_code" class="input1" id="Faculty_code">
<?php
$strSQL1 = "SELECT * FROM faculty_tb ";
$result1 = mysql_query($strSQL1);
$strSQL2 = "SELECT * FROM faculty_tb Order By Faculty_name ";
$result2 = mysql_query($strSQL2);
while( $rs1 = mysql_fetch_array($result1))
{
echo"<option value=\"$rs1[Faculty_code]\" ><b>$rs1[Faculty_name]</b></option>\n";
}
?>
</select>
</font></strong></td>
</tr>
<tr bgcolor="#EEEEEE">
<td bgcolor="#FFFFFF"><div align="center" class="style3"><font size="2" face="Tahoma">หมวดเอกสาร</font></div></td>
<td bgcolor="#FFFFFF"><div align="center"><font color="#FF0000" size="4" face="Tahoma">*</font></div></td>
<td bgcolor="#FFFFFF"><select name="conditionId" id="conditionId">
<?php
$strSQL1 = "SELECT * FROM Docontion_tb ";
$result1= mysql_query($strSQL1);
while( $rs1 = mysql_fetch_array($result1))
{
echo"<option value=\"$rs1[conditionId]\" ><b>$rs1[Docom_name]</b></option>\n";
}
?>
</select></td>
</tr>
<tr bgcolor="#EEEEEE">
<td height="22" bgcolor="#FFFFFF"><div align="center" class="style4"><font face="Tahoma">หมายเหตุ</font>ุ</div></td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><textarea name="Description" cols="40" rows="3" id="Description"></textarea></td>
</tr>
<tr bordercolor="#CCCCCC" bgcolor="#ECF5FF">
<td height="34" nowrap="nowrap" bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="center" class="style4"><font color="#003366" face="Tahoma">โหลดเอกสาร </font></div></td>
<td bordercolor="#CCCCCC" bgcolor="#FFFFFF"><div align="center"><font color="#FF0000" size="4" face="Tahoma">*</font></div></td>
<td nowrap="nowrap" bordercolor="#99CCFF" bgcolor="#FFFFFF"><table width="82%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80%" height="29" bgcolor="#FFFFFF"><div align="center">
<div align="left">
<input name="Img1" type="file" id="Img1" onchange="browse()>
</div>
<label> </label></td>
<td width="20%"> </td>
</tr>
</table></td>
</tr>
<tr bgcolor="#CCCCFF" >
<td height="25" colspan="3" bgcolor="#FFFFFF"><div align="center">
<input type="submit" name="Submit3" value=" บันทึก " class="button" />
<input type="reset" name="Submit22" value="เริ่มใหม่" class="button" />
</div></td>
</tr>
<tr bgcolor="#CCCCFF" >
<td height="25" colspan="3" bgcolor="#FFFFFF"><div align="center"></div></td>
</tr>
</table>
<br>
</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=FrmLogin.php\">\n";
echo"Please Login ";
}
?>
|