?? add_book.php
字號:
<?
//######################管理員添加圖書##########################
include "config.php";
include "admin_auth.php";
include "header.php";
?>
<link rel="stylesheet" href="style.css" type="text/css">
<table width="75%" border="0" cellspacing="1" cellpadding="0" height="314" bgcolor="#000000" align="center">
<!--DWLayoutTable-->
<tr>
<td width="24" bgcolor="#FFFFFF"> <div align="center" class="title">
<p> </p>
</div></td>
<td width="557" bgcolor="#FFFFFF" height="24"> <div align="center" class="title">添加圖書<font color="#FF0000" size="1">(為方便查詢,請按以下格式填寫)</font></div></td>
</tr>
<tr>
<td height="287" align="center" valign="middle" bgcolor="#FFFFFF" class="biao1">
</td>
<td align="left" valign="top" bgcolor="#FFFFFF"> <table width="82%" border="0" cellspacing="1" cellpadding="0" height="287" class="text" bgcolor="#000000">
<!--DWLayoutTable-->
<form name="addbook" method="post" action="add_book.php">
<tr>
<td width="85" class="dao3" height="28" bgcolor="#E4E4E4">書名:</td>
<td width="334" bgcolor="#E4E4E4"> <input name="book_name" type="text" value="書的名字" size="25">
* </td>
<td width="100" valign="top" bgcolor="#E4E4E4"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="biao2" height="25">作者:</td>
<td class="biao2" height="25"> <input name="author" type="text" value="書的作者" size="25">
*</td>
<td></td>
</tr>
<tr bgcolor="#E4E4E4">
<td class="dao3" height="27">出版社:</td>
<td height="27"> <input name="pub_addr" type="text" id="pub_addr" value="出版社" size="25">
* </td>
<td bgcolor="#E4E4E4"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="biao2" height="24">出版日期:</td>
<td class="biao2" height="24"> <input name="pub_date" type="text" id="pub_date" value="1982-02-15" size="25">
* </td>
<td></td>
</tr>
<tr bgcolor="#E4E4E4">
<td class="dao3" height="24">價格:</td>
<td height="24"> <input name="price" type="text" id="price" value="¥" size="25">
* </td>
<td></td>
</tr>
<tr bgcolor="#FFFFFF">
<td class="biao2" height="27">冊數(shù):</td>
<td class="biao2" height="27"> <input name="volumes" type="text" id="volumes" value="xx" size="25">
* </td>
<td></td>
</tr>
<tr bgcolor="#E4E4E4">
<td class="dao3" height="22">分類號:</td>
<td height="22" bgcolor="#E4E4E4"> <input name="sort_id" type="text" id="sort_id" size="25">
* </td>
<td></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="25" valign="top" class="biao2">狀態(tài):</td>
<td valign="top" class="biao2"> <select name="status" id="status">
<option selected>在架</option>
<option>不在架</option>
</select>
* </td>
<td></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="37" valign="top" bgcolor="#E4E4E4"><!--DWLayoutEmptyCell--> </td>
<td valign="top" bgcolor="#E4E4E4" class="dao3"> <input type="hidden" name="add_book" value="添加圖書">
<input type="submit" value="添加圖書"> </td>
<td></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="28"></td>
<td><div align="center"><a href="admin.php"><font color="#000000" size="4"><strong>返回</strong></font></a></div></td>
<td></td>
</tr>
</form>
</table></td>
</tr>
</table>
<?
if ($book_name=="" || $author=="" || $pub_addr=="" || $pub_date=="" || $price=="" || $volumes=="" || $sort_id=="" || $status=="" )
{
echo"<p align=\"center\"><font color=\"#FF0000\"><b><big>請把資料寫完整</big></b></font></p>";
exit;
}
else
{
$query=mysql_query("insert into $book_table values('','$book_name','$author','$pub_addr','$pub_date','$price','$volumes','$sort_id','$status')");
if($query==true){
echo "<p align=\"center\"><font color=\"#FF0000\"><b><big>圖書添加成功!</big></b></font></p>";
}
}
?>
<? include "foot.php";?>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -