📄 bookedit.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="checkuser.asp" -->
<%
action=request.querystring("action")
if action="edit" then
bookid=cint(request.Form("bookid"))
tiaoxingma=trim(request.form("tiaoxingma"))
shuming=request.form("shuming")
folderid=request.form("folderid")
zhubian=request.form("zhubian")
chubanshe=request.form("chubanshe")
ceshu=request.form("ceshu")
dingjia=request.form("dingjia")
jianjie=request.form("jianjie")
beizhu=request.form("beizhu")
shijian=request.form("shijian")
bookpic=request.form("bookpic")
set rs=server.createobject("adodb.recordset")
sql="select * from ebook where id="&bookid&""
rs.open sql,conn,1,3
rs("tiaoxingma")=tiaoxingma
rs("shuming")=shuming
rs("folderid")=folderid
rs("zhubian")=zhubian
rs("chubanshe")=chubanshe
rs("ceshu")=ceshu
rs("dingjia")=dingjia
rs("jianjie")=jianjie
rs("shijian")=shijian
rs("beizhu")=beizhu
rs("bookpic")=bookpic
rs.update
rs.close
set rs=nothing
response.write "<script>"
response.write "alert('修改书籍成功! \n\n 图书管理系统!');"
response.write "window.location.href='bookedit.asp?tiaoxingma="&tiaoxingma&"'"
response.write "</script>"
else
%>
<style>
BODY{
font-family:verdana,arial,helvetica;
margin:0;
}
td {
font-family:Tahoma,Verdana, Arial;
font-size:11px;
border: 1px solid #CCCCCC;
}
A:link, A:active,A:visited
{
color: #CCCCCC;
text-decoration: none;
padding-left:6px;
padding-right:6px;
}
A:hover
{
color: #FF3300;
text-decoration: none;
padding-left:6px;
padding-right:6px;
}
</style>
<title>图书入库</title>
<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<body onLoad="tiaoxingma();">
<%
tiaoxingma=trim(request("tiaoxingma"))
Set rs=conn.execute("select * from ebook where tiaoxingma='"&tiaoxingma&"'")
%>
<form id="form1" name="form1" method="post" action="?action=edit" >
<p> </p>
<table width="640" border="0" align="center">
<tr>
<td width="70" bgcolor="#CCCCCC">条形码:</td>
<td width="400"><input name="tiaoxingma" type="text" id="tiaoxingma" tabindex="0" onKeyDown="checkit();" value="<%=tiaoxingma%>" /></td>
<td width="156"> </td>
</tr>
<tr>
<td width="70" bgcolor="#CCCCCC">书籍类别:</td>
<td width="400">
<select name="folderid" id="folderid">
<%
Set rs1=conn.execute("select * from folder where folderParentid=0 order by foldername asc")
do while not rs1.eof
%>
<option value="<%=rs1("folderid")%>" <%if rs1("folderid")=rs("folderid") then response.Write "selected" %>><%=rs1("foldername")%></option>
<%
rs1.movenext
loop
rs1.close
set rs1=nothing
%>
</select>
</td>
<td width="156" bgcolor="#CCCCCC"><div align="center">缩略图</div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC">书籍名称:</td>
<td><input name="shuming" type="text" id="shuming" tabindex="1" value="<%=rs("shuming")%>" /></td>
<td rowspan="6" align="center" valign="middle"><img src="<%=rs("bookpic")%>" width="120" height="150" border="0" /></td>
</tr>
<tr>
<td bgcolor="#CCCCCC">主编/作者:</td>
<td><input name="zhubian" type="text" id="zhubian" tabindex="2" value="<%=rs("zhubian")%>" /></td>
</tr>
<tr>
<td bgcolor="#CCCCCC">出版社:</td>
<td><input name="chubanshe" type="text" id="chubanshe" tabindex="3" value="<%=rs("chubanshe")%>" /></td>
</tr>
<tr>
<td bgcolor="#CCCCCC">册数:</td>
<td><input name="ceshu" type="text" id="ceshu" value="<%=rs("ceshu")%>" size="10" tabindex="4" onKeyUp="value=value.replace(/[\W]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" onKeyDown="if(event.keyCode==13)event.keyCode=9" />
册</td>
</tr>
<tr>
<td bgcolor="#CCCCCC">定价:</td>
<td><input name="dingjia" type="text" id="dingjia" tabindex="5" value="<%=rs("dingjia")%>" size="10" />
元</td>
</tr>
<tr>
<td bgcolor="#CCCCCC">书籍简介:</td>
<td><textarea name="jianjie" cols="50" rows="5" id="jianjie" tabindex="6"><%=rs("jianjie")%></textarea></td>
</tr>
<tr>
<td bgcolor="#CCCCCC">书籍状况:</td>
<td><input name="beizhu" type="text" id="beizhu" value="完好" size="10" tabindex="7" />
* 完好、破损等</td>
<td><input name="bookpic" type="text" id="bookpic" value="<%=rs("bookpic")%>" /></td>
</tr>
<tr>
<td bgcolor="#CCCCCC">购置时间:</td>
<td><script>arrowtag("shijian","")</script>
<input name="shijian" type="text" id="shijian" value="<%=rs("shijian")%>" size="15" tabindex="7" /></td>
<td><div align="center">
<input name="Submit3" type="button" tabindex="9" onClick="MM_openBrWindow('post_upload.asp','上传书籍照片','width=300,height=200')" value="上传图片" />
</div></td>
</tr>
<tr>
<td> </td>
<td>
<div align="center">
<input name="bookid" type="hidden" id="bookid" value="<%=rs("id")%>">
<input type="button" name="Submit" value="修改" tabindex="10" onClick="checkform();" />
<input type="button" name="Submit2" value="返回" onClick="window.location.href='bookguanli.asp';"/>
</div></td>
<td> </td>
</tr>
</table>
</form>
</body>
<%end if%>
<script language="JavaScript" type="text/javascript">
function tiaoxingma(){
document.form1.tiaoxingma.focus();
document.form1.tiaoxingma.select();
}
function checkit(){
if(event.keyCode=="13"){
document.form1.folderid.focus();
document.form1.folderid.select();
}
}
function checkform(){
if (document.form1.tiaoxingma.value==""){
alert('书籍条形码不能为空!');
document.form1.tiaoxingma.focus();
document.form1.tiaoxingma.select();
return false;
}
if (document.form1.shuming.value==""){
alert('书籍名称不能为空!');
document.form1.shuming.focus();
document.form1.shuming.select();
return false;
}
document.form1.submit();
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -