📄 pollcandadd.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"
If Int(Session("hxf_u_grade")) <> 12 Then Response.Redirect "manerr.asp?id=300"
addname = Trim(Request.Form("addname"))
addname = Replace(addname, "{]", "")
If addname = "" Then Response.Redirect "manerr.asp?id=301"
If Server.HTMLEncode(addname) <> addname Or Len(addname) > 10 Then Response.Redirect "manerr.asp?id=302"
poll = Split(Application("wsaxhxf_c_pollending"), "{]")
ubpoll = UBound(poll)
For i = 9 To ubpoll Step 2
If LCase(addname) = LCase(poll(i)) Then Response.Redirect "manerr.asp?id=306"
Next
Redim Preserve poll(ubpoll + 2)
poll(ubpoll + 1) = addname
poll(ubpoll + 2) = 0
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>
<div align="center">
<h1><font color="0099FF">【投票系统】</font></h1>
<font color="#FF0000">【添加候选人】</font></div>
<hr noshade size="1" color=009900>
<b>[操作完成]</b> <br>
已经添加候选人:<font color="#FF0000"><%=addname%></font> !
<div align=center><a href="javascript:history.go(-1)">【返回】</a></div>
<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 + -