📄 poll.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")
grade=Int(Session("hxf_u_grade"))
if nickname="" then Response.Redirect "manerr.asp?id=100"
poll = Split(Application("wsaxhxf_c_pollending"), "{]")
ubp = UBound(poll)
If poll(0) <> "1" Then
Dim npoll()
Redim Preserve npoll(ubp + 3)
npoll(0) = 1
For i = 1 To 3
npoll(i) = poll(i)
Next
npoll(4) = 0
npoll(5) = 0
npoll(6) = 0
For i = 7 To ubp + 3
npoll(i) = poll(i - 3)
Next
newpoll = Join(npoll, "{]")
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
End If
%>
<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>
<div align=center><h1><font color="0099FF">【投票系统】</font></h1>
<a href="javascript:history.go(0)">刷新</a></div>
<hr noshade size="1" color=009900>
<b>[站长公告]</b>
<hr noshade size="1" color=009900>
<table width="100%" border="0" align="center">
<tr>
<td class=p150><%=Application("wsaxhxf_c_pollaffiche")%></td>
</tr>
</table>
<hr noshade size="1" color=009900>
<blockquote>
● <a href="pollview.asp">投票 / 查看投票结果</a><br>
<%if grade = 12 then%>
● <a href="polluser.asp">查阅已投票者</a><br>
● <a href="pollsystem.asp">投票系统设置</a><br>
● <a href="pollcand.asp">候选人管理</a><br>
● <a href="manupdowngrade.asp">原有版主 (6级以上) 级别调整</a><br>
● <a href="javascript:clear()">清除所有候选人的得票数,重新投票</a><br>
● <a href="javascript:reset()">复位投票系统,清除数据</a>
<script Language=JavaScript>
function reset(){
if(confirm("真的要复位投票系统,清除数据吗?")){
this.location.href = "pollclear.asp";
}
}
function clear(){
if(confirm("真的要清除得票数,重新投票吗?")){
this.location.href = "pollreset.asp";
}
}
</script>
<%End If%>
</blockquote>
<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 + -