rank.asp
上传用户:syzzy1975
上传日期:2022-07-17
资源大小:670k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <%
  3. %><!--#include file="manage/inc/config.asp"--> 
  4. <!--#include file="inc/conn.asp"--> 
  5. <%
  6. dim id,action
  7. action=request.QueryString("action")
  8. id=request.QueryString("id")
  9. set rs=server.CreateObject("adodb.recordset")
  10. rs.open "select id,name,rank,ranknum from product where id="&id,conn,1,3
  11. if NOT isempty(request("RankSubmit")) then
  12. if session("id")=id then
  13. Call MsgBox("对不起,您不能连续对同一本商品评级!","Close","None")
  14. response.End
  15. end if
  16. rs("rank")=rs("rank")+1
  17. rs("ranknum")=rs("ranknum")+request("radiobutton")
  18. rs.update
  19. Call MsgBox("您对这本商品的评论星级已成功提交!","Close","None")
  20. rs.close
  21. set rs=nothing
  22. session("id")=id
  23. session.timeout=1
  24. response.End
  25. end if
  26. %>
  27. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  28. <html>
  29. <head>
  30. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  31. <title>406网络书店</title>
  32. <link href="style.css" rel="stylesheet" type="text/css">
  33. </head>
  34. <body>
  35. <!--#include file="head.htm"-->
  36. <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  37.   <tr>
  38.     <td width="219" align="left" valign="top"><!--#include file="left.asp"--></td>
  39.     <td width="561" align="left" valign="top">
  40.       <br>      <br>      <form name="form1" method="post" action="">
  41.         <table width="100%" border="0" cellpadding="2" cellspacing="1">
  42.           <tr>
  43.             <td height="15" align="center" >
  44.               
  45.             我要评级</td>
  46.           </tr>
  47.           <tr>
  48.             
  49.             <td height="33">
  50.               <table width="100%" border="0" cellpadding="2" cellspacing="1" >
  51.                 <tr >
  52.                   <td colspan="2">您对[<%=trim(rs("name"))%>]商品的评级是:
  53.                   <input name="id" type="hidden" id="id" value="<%=rs("id")%>"></td>
  54.                 </tr>
  55.                 <tr >
  56.                   <td width="50%">
  57.                     <input name="radiobutton" type="radio" value="10" checked>
  58.                     <img src="images/rank/10.gif" width="79" height="14"></td>
  59.                   <td width="54%">
  60.                     <input type="radio" name="radiobutton" value="9">
  61.                     <img src="images/rank/9.gif" width="79" height="14"></td>
  62.                 </tr>
  63.                 <tr >
  64.                   <td>
  65.                     <input type="radio" name="radiobutton" value="8">
  66.                     <img src="images/rank/8.gif" width="79" height="14"></td>
  67.                   <td>
  68.                     <input type="radio" name="radiobutton" value="7">
  69.                     <img src="images/rank/7.gif" width="79" height="14"></td>
  70.                 </tr>
  71.                 <tr >
  72.                   <td>
  73.                     <input type="radio" name="radiobutton" value="6">
  74.                     <img src="images/rank/6.gif" width="79" height="14"></td>
  75.                   <td>
  76.                     <input type="radio" name="radiobutton" value="5">
  77.                     <img src="images/rank/5.gif" width="79" height="14"></td>
  78.                 </tr>
  79.                 <tr >
  80.                   <td>
  81.                     <input type="radio" name="radiobutton" value="4">
  82.                     <img src="images/rank/4.gif" width="79" height="14"></td>
  83.                   <td>
  84.                     <input type="radio" name="radiobutton" value="3">
  85.                     <img src="images/rank/3.gif" width="79" height="14"></td>
  86.                 </tr>
  87.                 <tr >
  88.                   <td>
  89.                     <input type="radio" name="radiobutton" value="2">
  90.                     <img src="images/rank/2.gif" width="79" height="14"></td>
  91.                   <td>
  92.                     <input type="radio" name="radiobutton" value="1">
  93.                     <img src="images/rank/1.gif" width="79" height="14"></td>
  94.                 </tr>
  95.                 <tr >
  96.                   <td colspan="2">
  97.                     <div align="center">
  98.                       <input name="RankSubmit" type="submit" id="RankSubmit" value="提交">
  99.                   </div></td>
  100.                 </tr>
  101.             </table></td>
  102.             
  103.         </tr>
  104.         </table>
  105.     </form></td>
  106.   </tr>
  107. </table>
  108. <!--#include file="foot.htm"-->
  109. </body>
  110. </html>