add_comment.asp
资源名称:图书管理系统.rar [点击查看]
上传用户:llrg7406
上传日期:2007-03-02
资源大小:654k
文件大小:4k
源码类别:
教育系统应用
开发平台:
Delphi
- <%@ Language=VBScript %>
- <!--#include file ="identify.asp"-->
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link rel="stylesheet" type="text/css" href="xcss.css">
- <meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
- <script language="javascript">
- function check()
- {
- if (form1.title.value=="")
- {
- alert ("请填写标题!");
- return false;
- }
- return true;
- }
- function MyGrade(str) {
- str = new Array(5);
- str[0] = "不会吧,居然是这么烂?";
- str[1] = "原来这本书不合你的口味啊";
- str[2] = "平淡无奇,就这样吧?";
- str[3] = "看来你很喜欢这本书哦";
- str[4] = "这本书有这么好吗?";
- for(i=0;i<5;i++) {
- if (document.form2.grade[i].checked==true) {
- if(confirm(str[i])) {
- form2.submit();
- }
- }
- }
- }
- </script>
- </head>
- <body background="images/zapsmbknd.gif">
- <%
- b_bookid = session("bookid")
- if len(b_bookid)=0 then
- Response.Write "您没有打开任何一本书!"
- Response.End
- end if
- set conn = server.CreateObject("adodb.connection")
- conn.Open Application("dsn")
- sql = "select bookid,name,author from BookDetail where bookid=" & b_bookid
- set rs = server.CreateObject("adodb.recordset")
- rs.Open sql,conn
- if rs.EOF then
- rs.Close
- set rs = nothing
- conn.Close
- set conn = nothing
- Response.Write "找不到您要的文件!"
- Response.End
- end if
- b_name = rs("name")
- author = rs("author")
- rs.Close
- set rs = nothing
- conn.Close
- set conn = nothing
- %>
- <p><b>书名:</b><%=b_name%></p>
- <p><b>作者:</b><%=author%></p>
- <FORM action="grade_submit.asp" method=POST id=form2 name=form2> <hr>
- <h3>我要给你打打分</h3>
- <input name="grade" onclick="Javascript:MyGrade();" type="radio" value="1">1
- <input name="grade" onclick="Javascript:MyGrade();" type="radio" value="2">2
- <input CHECKED name="grade" onclick="Javascript:MyGrade();" type="radio" value="3">3
- <input name="grade" onclick="Javascript:MyGrade();" type="radio" value="4">4
- <input name="grade" onclick="Javascript:MyGrade();" type="radio" value="5">5
- <input type="hidden" name="username" value="<%=session("username")%>">
- <input type="hidden" name="bookid" value="<%=b_bookid%>">
- </FORM>
- <hr>
- <form action="add_cmaction0.asp" method="POST" id="form1" name="form1" onsubmit="return check();">
- <p><h3>我要发表看法:</h3>
- <b>选一个表情图标:</b>
- <img src="images/p1.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p1" checked>
- <img src="images/p2.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p2">
- <img src="images/p3.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p3">
- <img src="images/p4.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p4">
- <img src="images/p5.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p5">
- <img src="images/p6.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p6">
- <img src="images/p7.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p7">
- <img src="images/p8.gif" WIDTH="15" HEIGHT="15"><input type="radio" name="imgname" value="p8">
- <br>
- <b>评论标题:</b><input type="text" name="title" size="40"></p>
- <p valign="top"><b>您的评论:</b><br>
- <input type="hidden" name="username" value="<%=session("username")%>">
- <input type="hidden" name="bookid" value="<%=b_bookid%>">
- <textarea id="detail" name="detail" style="HEIGHT: 120px; WIDTH: 500px" valign="top" wrap="hard"></textarea></p>
- <table WIDTH="550" BORDER="0" CELLSPACING="1" CELLPADDING="1">
- <tr>
- <td align="center"><input type="submit" value="添加" id="submit1" name="submit1"> <input type="button" value="取消" onclick="javascript:window.close();" id="button1" name="button1"></td>
- </tr>
- </table>
- </form>
- </body>
- </html>