📄 poll_delete.asp
字号:
<%
Response.Expires=0
Response.ExpiresAbsolute = Now() - 1
Response.AddHeader "Pragma","No-Cache"
Response.AddHeader "Cache-Control","Private"
Response.CacheControl = "No-Cache"
If not IsArray(Session("info")) Then Response.Redirect "err1.asp?kind=01"
info=Session("info")
If InStr(Application("maninfo"),"," & info(0) & ",")<>0 Then Response.Redirect "manyou.asp"
gradeinfo = Application("gradeinfo")
If gradeinfo(info(1),28) <> True Then Response.Redirect "err.asp?kind=110"
oldpollinfo=Application("pollinfo")
If Ubound(oldpollinfo,1)=0 Then Response.Redirect "err.asp?kind=102"
id=Trim(Request("id"))
id=Replace(id," ","")
If id="" Then Response.Redirect "err.asp?kind=103"
If not (IsNumeric(id)) Then Response.Redirect "err.asp?kind=108"
id=Int(id)
Set Conn=server.createobject("ADODB.CONNECTION")
Conn.Open Application("zzbird_conn")
sql = "delete from poll where id=" & oldpollinfo(id,0)
Conn.Execute(sql)
Set rs=server.createobject("adodb.recordset")
sql="select * from poll"
rs.open sql,conn,3,3
co=Int(rs.recordcount)
Dim pollinfo()
ReDim pollinfo(co,9)
For i=1 to co
pollinfo(i,0)=Rs("id")
pollinfo(i,1)=Rs("title")
pollinfo(i,2)=Rs("manager")
pollinfo(i,3)=Rs("pollman")
pollinfo(i,4)=Rs("min_grade")
pollinfo(i,5)=Rs("max_grade")
pollinfo(i,6)=Rs("dis_user")
pollinfo(i,7)=Rs("polls")
pollinfo(i,8)=Rs("counts")
pollinfo(i,9)=Rs("time")
rs.MoveNext
Next
rs.Close
Set rs=Nothing
Conn.Close
Set Conn = Nothing
Application.Lock
Application("pollinfo") = pollinfo
Application.UnLock
%>
<!--#INCLUDE FILE="function.asp" -->
<%
ups = Ubound(pollinfo)
w1 = info(0)
If ups = 0 Then
w2 = "没有投票在进行"
Else
w2 = "<a style='color:#FFFF00' href='javascript:parent.openpoll();'><b>" & ups & "</b>个投票在进行</a>"
End If
w3 = "poll"
w4 = "[<img src='images/sys.gif'>投票]<img border='0' height='16' width='16' src='images/ICO/" & info(4) & "-2.gif'><font color=#0000ff>" & info(0) & "</font> 取消了主题为“<font color='#008000'>" & oldpollinfo(id,1) & "</font>”的投票。<font style='font-size: 8pt' color='#808080'>(" & CStr(time) & ")</font>"
saveword w1,w2,w3,w4,w5
%>
<Script Language="JavaScript">
if(confirm("投票已经删除!点击确定关闭投票窗口,点击取消返回投票中心。"))
{
window.close();
}
else
{
location.href="poll.asp";
}
</Script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -