📄 poll.asp
字号:
<% Option Explicit %>
<!-- #include file="includes/header.asp" -->
<!--#include file="functions/editpost.asp" -->
<!--#include file="includes/emoticons.asp" -->
<%
Response.Buffer = True
Dim strMode
Dim intForumID
Dim lngTopicID
Dim lngMessageID
Dim strForumName
Dim blnForumLocked
Dim intTopicPriority
Dim strPostPage
Dim intRecordPositionPageNum
Dim strMessage
Dim intPollLoopCounter
Dim intIndexPosition
Dim intNumberOfOuterLoops
Dim intLoop
Dim intInnerLoop
If bannedIP() Then
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing
Response.Redirect("nopermission.asp?M=IP")
End If
lngTopicID = 0
lngMessageID = 0
intTopicPriority = 0
intRecordPositionPageNum = 1
strMode = "poll"
intForumID = CInt(Request.QueryString("fid"))
strSQL = "SELECT timesbbs.* FROM timesbbs WHERE bbsid = " & intForumID & ";"
rsConn.Open strSQL, adoCon
If NOT rsConn.EOF Then
strForumName = rsConn("bbsname")
blnForumLocked = CBool(rsConn("Locked"))
Call forumPermisisons(intForumID, intGroupID, CInt(rsConn("Read")), CInt(rsConn("Post")), CInt(rsConn("replypost")), CInt(rsConn("editpost")), CInt(rsConn("delpost")), CInt(rsConn("toppost")), CInt(rsConn("addpoll")), CInt(rsConn("Vote")), CInt(rsConn("Attachments")), CInt(rsConn("imgup")))
If NOT rsConn("Password") = "" and NOT Request.Cookies("PrForum")("Forum" & intForumID) = rsConn("codes") Then
rsConn.Close
Set rsConn = Nothing
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing
Response.Redirect "password.asp?fid=" & intForumID
End If
End If
rsConn.Close
If (blnRead = False AND blnModerator = False AND blnAdmin = False) Then blnForumLocked = True
%>
<title>发起投票</title>
<script language="JavaScript">
function CheckForm () {
var errorMsg = "";
if (document.frmAddMessage.subject.value==""){
errorMsg += "\n\t贴子 \t- 为你的新贴子定一个主题";
}
if (document.frmAddMessage.pollQuestion.value==""){
errorMsg += "\n\t投票主题:请输入投票主题";
}
if ((document.frmAddMessage.choice1.value=="") || (document.frmAddMessage.choice2.value=="")){
errorMsg += "\n\t投票选项:请输入选项列表";
}
if (document.frmAddMessage.message.value==""){
errorMsg += "\n\t贴子\t- 输入贴子内容后发送";
}
if (errorMsg != ""){
msg = "_______________________________________________________________\n\n";
msg += "表单不完整,请填写完全\n";
msg += "请修正后再发表\n";
msg += "_______________________________________________________________\n\n";
msg += "以下区域需要修改: \n";
errorMsg += alert(msg + errorMsg + "\n\n");
return false;
}
document.frmAddMessage.action = "postmess.asp?pn=<% = Request.QueryString("pn") %>"
document.frmAddMessage.target = "_self";
return true;
}
// -->
</script>
<table width="96%>" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td align="left" width="71%" class="bold"><img src="images/open.gif" border="0" align="absmiddle"> <a href="index.asp" target="_self" class="boldLink"><% = strMainForumName %></a><% = strNavSpacer %><% Response.Write ("<a href=""topic.asp?fid=" & intForumID & """ target=""_self"" class=""boldLink"">" & strForumName & "</a>" & strNavSpacer) %><a href="poll.asp" target="_self" class="boldLink">创建投票</a><br /></td>
</tr>
</table>
<%
Set rsConn = Nothing
adoCon.Close
Set adoCon = Nothing
If blnPollCreate = True AND blnActiveMember = True AND (blnForumLocked = False OR blnAdmin = True) Then
If IEWin = True AND blnIEEditor = True AND blnWYsiWYGEditor = True Then
%><!--#include file="includes/repost.asp" --><%
Else
%><!--#include file="includes/message.asp" --><%
End If
ElseIf blnActiveMember = False Then %>
<div align="center"><br /><br /><span class="text">对不起, 因为您的论坛会员尚未激活你没有权利使用此服务!</span><br /><br /><br /><br /><br /></div>
<% ElseIf blnForumLocked = True Then %>
<div align="center"><br /><br /><span class="text">对不起, 这个论坛已经被管理员锁定</span><br /><br /><br /><br /><br /></div>
<% ElseIf blnPollCreate = False AND strMode <> "poll" Then %>
<div align="center"><br /><br /><span class="text">对不起,你没有在此论坛发言的权限 </span><br /><br /><br /><br /><br /></div>
<% Else %>
<div align="center"><br /><br /><span class="text">你必须先注册</span><br /><br />
<a href="reg.asp?fid=<%= intForumID %>" target="_self"><img src="images/register.gif" alt="注册" border="0" align="absmiddle"></a> <a href="login.asp?fid=<%= intForumID %>" target="_self"><img src="images/login.gif" alt="登录" border="0" align="absmiddle"></a><br /><br /><br /><br /></div>
<% End If %>
<br /><br />
<!-- #include file="includes/footer.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -