rate.asp(打分页)
=============================
<!--#include file="conn.asp"-->
<%
on error resume next
dim conn,fds,rate
rate=request.Form("txtRate")
if isempty(rate) then
response.redirect("default.asp")
end if
if session("rate")=1 then
%>
<script language="javascript">
alert("您不能不停地打分哦!");
window.location.replace("default.asp");
</script>
<%
response.end
end if
if rate<>0 and rate<>1 and rate<>2 and rate<>3 and rate<>4 and rate<>5 and rate<>6 and rate<>7 and rate<>8 and rate<>9 or rate>9 or rate<0 then
%>
<script language="javascript">
alert("请您输入0~9以内的整数!");
window.location.replace("default.asp");
</script>
<%
response.end
end if
rate=cint(rate)
call opendata()
fds.open "select * from rate where id=1",conn,3,3
application.lock
fds("rate"&rate)=fds("rate"&rate)+1
fds("ratecount")=fds("ratecount")+rate
fds("guestcount")=fds("guestcount")+1
fds.update
application.unlock
call closedata()
session("rate")=1
%>
<script language="javascript">
alert("打分成功!")
window.location.replace("default.asp?type=open");
</script>