📄 rank.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="nimda/config.asp"-->
<!--#include file="edulcni/conn.asp"--> <%
dim id,action
action=request.QueryString("action")
id=request.QueryString("id")
set rs=server.CreateObject("adodb.recordset")
rs.open "select id,name,rank,ranknum from product where id="&id,conn,1,3
if NOT isempty(request("RankSubmit")) then
if session("id")=id then
Call MsgBox("对不起,您不能连续对同一本商品评级!","Close","None")
response.End
end if
rs("rank")=rs("rank")+1
rs("ranknum")=rs("ranknum")+request("radiobutton")
rs.update
Call MsgBox("您对这本商品的评论星级已成功提交!","Close","None")
rs.close
set rs=nothing
session("id")=id
session.timeout=1
response.End
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>E书部落—网上书城</title>
<link href="style.css" rel="stylesheet" type="text/css"></head>
<body>
<!--#include file="head.htm"-->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="218" align="left" valign="top" style="border-left: 1px dotted #65A8CF; border-top: 1px dotted #65A8CF; border-bottom: 1px dotted #65A8CF"><!--#include file="left.asp"--></td>
<td width="560" align="left" valign="top" style="border-left: 1px dotted #65A8CF; border-right:1px dotted #65A8CF; border-top: 1px dotted #65A8CF; border-bottom: 1px dotted #65A8CF">
<br> <br> <form name="form1" method="post" action="">
<table width="100%" border="0" cellpadding="2" cellspacing="1">
<tr>
<td height="15" align="center" >
我要评级</td>
</tr>
<tr>
<td height="33">
<table width="100%" border="0" cellpadding="2" cellspacing="1" >
<tr >
<td colspan="2">您对[<%=trim(rs("name"))%>]商品的评级是:
<input name="id" type="hidden" id="id" value="<%=rs("id")%>"></td>
</tr>
<tr >
<td width="50%">
<input name="radiobutton" type="radio" value="10" checked>
<img src="images/rank10.gif" width="79" height="14"></td>
<td width="54%">
<input type="radio" name="radiobutton" value="9">
<img src="images/rank9.gif" width="79" height="14"></td>
</tr>
<tr >
<td>
<input type="radio" name="radiobutton" value="8">
<img src="images/rank8.gif" width="79" height="14"></td>
<td>
<input type="radio" name="radiobutton" value="7">
<img src="images/rank7.gif" width="79" height="14"></td>
</tr>
<tr >
<td>
<input type="radio" name="radiobutton" value="6">
<img src="images/rank6.gif" width="79" height="14"></td>
<td>
<input type="radio" name="radiobutton" value="5">
<img src="images/rank5.gif" width="79" height="14"></td>
</tr>
<tr >
<td>
<input type="radio" name="radiobutton" value="4">
<img src="images/rank4.gif" width="79" height="14"></td>
<td>
<input type="radio" name="radiobutton" value="3">
<img src="images/rank3.gif" width="79" height="14"></td>
</tr>
<tr >
<td>
<input type="radio" name="radiobutton" value="2">
<img src="images/rank2.gif" width="79" height="14"></td>
<td>
<input type="radio" name="radiobutton" value="1">
<img src="images/rank1.gif" width="79" height="14"></td>
</tr>
<tr >
<td colspan="2">
<div align="center">
<input name="RankSubmit" type="submit" id="RankSubmit" value="提交">
</div></td>
</tr>
</table></td>
</tr>
</table>
</form></td>
</tr>
</table>
<!--#include file="foot.htm"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -