⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 导出记录.asp

📁 借阅系统,可以很方便的管理书籍
💻 ASP
字号:
<%response.buffer=true%>
<%
bookid=lcase(trim(request.form("bookid")))
 set cn=server.createobject("adodb.connection")
 set rst=server.createobject("adodb.recordset")
 rst.cursortype=3
 rst.locktype=3
cn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("wsm.mdb")
strsql="select * from book where bookid='"& bookid &"' "
session("bookid")=bookid
rst.open strsql,cn
if not  rst.eof then

%>

  <html>

<head>
<script language=vbscript>
sub check
if instr(frm4.bookname.value,"'")<>0 then
msgbox("您输入了非法字符!")
frm4.bookname.focus
exit sub
end if

if instr(frm4.editer.value,"'")<>0 then
msgbox("您输入了非法字符!")
frm4.editer.focus
exit sub
end if
if instr(frm4.bookpublish.value,"'")<>0 then
msgbox("您输入了非法字符!")
frm4.bookpublish.focus
exit sub
end if
if instr(frm4.bookcount.value,"'")<>0 then
msgbox("您输入了非法字符!")
frm4.bookcount.focus
exit sub
end if


if not isdate(frm4.bookdate.value) then
msgbox("您输入的日期格式不正确")
frm4.bookdate.focus()
exit sub
end if
if not isnumeric(frm4.cost.value) then
msgbox("您输入的货币格式不正确")
frm4.cost.focus()
exit sub
end if
frm4.submit
end sub

</script>
<title></title>
</head>

<body bgcolor="black">
<div align=center>
<form method=post action="updatebook.asp" name=frm4>
  <table border="1" width="395" height="418" cellspacing="0" cellpadding="0" bordercolor="#333333" bgcolor="#99CCFF">
    <tr>
      <td width="158" height="59">
        <p align="left"><img border="0" src="images/ResizeGrip2.gif" align="left" width="32" height="17">&nbsp;                  
        <b>书的类型:</b></td>
      <td width="181" height="59">
                               
          <input type=text name=bookkind value="<% =rst("bookkind")%>" size="20">
                               
          </td>
    </tr>
    <tr>
      <td width="158" height="53">&nbsp;<img border="0" src="images/72000002.gif" width="32" height="32"> 
         <b>书的名称:</b></td>
      <td width="181" height="53"><input type=text name=bookname value="<%=rst("bookname")%>"></td>
    </tr>
    <tr>
      <td width="158" height="57">
           <img border="0" src="images/15-1.gif" width="32" height="32" align="left"> 
        <p align="left"><b><font color="#FFFFFF"> </font>书的作者: </b></p> 
      </td> 
      <td width="181" height="57"><input type=text name=editer value="<%=rst("editer")%>"></td>
    </tr>
    <tr>
      <td width="158" height="49">
        <p align="left"><b><font color="#FFFFFF"><img border="0" src="images/72000008.gif" width="32" height="32" align="left"> 
         </font>出版日期<font color="#FFFFFF">:</font></b></td>  
      <td width="181" height="49"><input type=text name="bookdate" size="20" value="<%=rst("bookdate")%>"></td>
    </tr>
    <tr>
      <td width="158" height="56">
        <p align="center"><b><font color="#FFFFFF"><img border="0" src="images/72000008.gif" width="32" height="32" align="left"></font>书的数量</b></td> 
      <td width="181" height="56"><input type=text name="bookcount" size="20" value="<%=rst("count")%>"></td>
    </tr>
    <tr>
      <td width="158" height="56">
        <p align="left"><b><font color="#FFFFFF"><img border="0" src="images/72000009.gif" width="32" height="32" align="left"> 
         </font>出版社<font color="#FFFFFF">:</font></b></td> 
      <td width="181" height="56"><input type=text name=bookpublish value="<%=rst("bookpublish")%>" size="20"></td>
    </tr>
    <tr>
      <td width="158" height="36">
        <p align="left"><b><font color="#FFFFFF"><img border="0" src="images/72000005.gif" width="32" height="32" align="left"> 
         </font>单价:</b></td>  
      <td width="181" height="36"><input type=text name=cost size="20" value="<%=rst("cost")%>" ></td>
    </tr>
    <tr>

  <td height="46">

  <p align="center">
<input type=button value="更新此记录" onclick="check()">      <td width="181" height="46">
  <p align="center"><input type=button value="放弃修改" onclick="javascript:document.location='管理员页面.htm'"></td>
    </tr>
  </table></form></div>
  <%else%>
 <% response.write"<p align=center><font size=5 color=red>sorry!没有该书的情况!请查证后再试</font></p>"
  response.write"<p align=center><font size=4 color=red><a href='修改书.htm'>返回上级页面</a>&nbsp;&nbsp;&nbsp;&nbsp<a href='管理员页面.htm'>返回管理员操作页面</a></font></p>"
  end if
  %>

</body></html>
  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -