📄 pollviewpoll.asp
字号:
<%@ LANGUAGE=VBScript codepage ="936" %>
<%Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
nickname=Session("hxf_u_nickname")
if nickname="" then Response.Redirect "manerr.asp?id=100"
n = Year(Date)
y = Month(Date)
r = Day(Date)
s = Hour(Time())
f = Minute(Time())
m = Second(Time())
If Len(y) = 1 Then y = "0" & y
If Len(r) = 1 Then r = "0" & r
If Len(s) = 1 Then s = "0" & s
If Len(f) = 1 Then f = "0" & f
If Len(m) = 1 Then m = "0" & m
sj = n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m
poll = Split(Application("wsaxhxf_c_pollending"), "{]")
ubpoll = UBound(poll)
If Int(Session("hxf_u_value")) < Int(poll(3)) Then Response.Redirect "manerr.asp?id=242"
If InStr(" " & LCase(poll(8)) & " ", " " & LCase(nickname) & " ") <> 0 Then Response.Redirect "manerr.asp?id=243"
If CDate(poll(1)) > CDate(sj) Then Response.Redirect "manerr.asp?id=246"
If CDate(poll(2)) < CDate(sj) Then Response.Redirect "manerr.asp?id=248"
If Int(Session("hxf_u_mvalue")) < Int(poll(4)) Then Response.Redirect "manerr.asp?id=244"
If Int(Session("hxf_u_hb") ) < Int(poll(5)) Then Response.Redirect "manerr.asp?id=314"
If Int(Session("hxf_u_grade")) < Int(poll(6)) Then Response.Redirect "manerr.asp?id=315"
p = Server.HTMLEncode(Trim(Request.Form("poll")))
If p = "" Then Response.Redirect "manerr.asp?id=303"
hxrcz = 0
For i = 9 To ubpoll Step 2
If poll(i) = p Then
hxrcz = 1
poll(i + 1) = Int(poll(i + 1)) + 1
Exit For
End If
Next
If hxrcz = 0 Then Response.Redirect "manerr.asp?id=304"
poll(7) = Int(poll(7)) + 1
poll(8) = poll(8) & " " & nickname
newpoll = Join(poll, "{]")
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("wsaxhg_connstr")
conn.open connstr
sql = "SELECT value FROM system WHERE name = 'pollending'"
rs.Open sql, conn, 1, 3
rs("value") = newpoll
rs.Update
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
Application.Lock
Application("wsaxhxf_c_pollending") = newpoll
Application.UnLock
%>
<html>
<head>
<title>投票系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="readonly/style.css">
</head>
<body bgcolor="FFFFFF" class=p150>
<h1 align="center"><font color="0099FF">【投票结果】</font></h1>
<hr noshade size="1" color=009900>
<b>[操作完成]</b> <br>
<br>
感谢您投出这神圣的一票,您支持的是:<font color="#FF0000"><%=p%></font> <a href=javascript:history.go(-1)>【返回】</a>
<hr noshade size="1" color=009900>
<div align=center class=cp><%Response.Write "序列号:<font color=blue>" & Application("wsaxhxf_c_sn") & "</font>,授权给:<font color=blue>" & Application("wsaxhxf_c_user") & "</font><br><font color=999999>" & Application("wsaxhxf_c_copyright") & "</font>"%>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -