<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<title><%=webname%>--用户评级</title>
<LINK 
href="img/code43.css" type=text/css rel=stylesheet>
<%dim id,action
action=FormatSQL(SafeRequest("action",0))
id=SafeRequest("id",1)
set rs=server.CreateObject("adodb.recordset")
rs.open "select id,name,rank,ranknum from product where id="&id,conn,1,3
if action="save" then
if session("id")=id then
response.write "<br><br><br><center><font color=red size=2>对不起，您不能连续对同一本商品评级！</font></center>"
response.End
end if
rs("rank")=rs("rank")+1
rs("ranknum")=rs("ranknum")+request.form("radiobutton")
rs.update
response.write "<br><br><br><table width=96% border=0 align=center cellpadding=0 cellspacing=0><tr><td height=86 bgcolor=#F5F5F5><div align=center>"
response.write "您对这本商品的评论星级已成功提交！！<br><br><a href=javascript:window.close()>关闭窗口</a></div></td></tr></table>"
rs.close
set rs=nothing
conn.close
set conn = nothing
session("id")=id
session.timeout=1
response.End
end if
%> 
<table width="98%" border="1" cellspacing="0" cellpadding="1" bordercolor=<%=bgclr1%> align="center"> 
<tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> 
<td rowspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v"> 
<tr> <td class="12v" > <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%"> 
<tr> <td> <table width="100%" border="0" cellpadding="2" cellspacing="1"> <tr> 
<td height="15" BGCOLOR=<%=bgclr1%>><DIV ALIGN="CENTER"><FONT COLOR="#FFFFFF" SIZE="4"><B>我要评级</B></FONT></DIV></td></tr> 
<tr> <form name="form1" method="post" action="rank.asp?action=save&id=<%=rs("id")%>"> 
<td height="33"> <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor=<%=bgclr4%>> 
<tr bgcolor=<%=bgclr3%>> <td colspan="2">您对[<%=trim(rs("name"))%>]商品的评级是：</td></tr> 
<tr bgcolor=<%=bgclr3%>> <td width="50%"> <input name="radiobutton" type="radio" value="10" checked> 
<img src="images/rank/10.gif" width="79" height="14"></td><td width="54%"> <input type="radio" name="radiobutton" value="9"> 
<img src="images/rank/9.gif" width="79" height="14"></td></tr> <tr bgcolor=<%=bgclr3%>> 
<td> <input type="radio" name="radiobutton" value="8"> <img src="images/rank/8.gif" width="79" height="14"></td><td> 
<input type="radio" name="radiobutton" value="7"> <img src="images/rank/7.gif" width="79" height="14"></td></tr> 
<tr bgcolor=<%=bgclr3%>> <td> <input type="radio" name="radiobutton" value="6"> <img src="images/rank/6.gif" width="79" height="14"></td><td> 
<input type="radio" name="radiobutton" value="5"> <img src="images/rank/5.gif" width="79" height="14"></td></tr> 
<tr bgcolor=<%=bgclr3%>> <td> <input type="radio" name="radiobutton" value="4"> <img src="images/rank/4.gif" width="79" height="14"></td><td> 
<input type="radio" name="radiobutton" value="3"> <img src="images/rank/3.gif" width="79" height="14"></td></tr> 
<tr bgcolor=<%=bgclr3%>> <td> <input type="radio" name="radiobutton" value="2"> <img src="images/rank/2.gif" width="79" height="14"></td><td> 
<input type="radio" name="radiobutton" value="1"> <img src="images/rank/1.gif" width="79" height="14"></td></tr> 
<tr bgcolor=<%=bgclr3%>> <td colspan="2"> <div align="center"> <input type="submit" name="Submit" value="提 交"> 
</div></td></tr> </table></td></form></tr> </table></td></tr> </table></td></tr> 
</table></td></tr> </table></td></tr> </table>
</body>
</html>
