📄 admin_pollmentor.asp
字号:
<%
'#############################################################
'# 中国在线--极酷论坛 ver.2001 3.0
'#
'# 版权所有: 中国在线 (ChinaXP.Net)
'#
'# 制作人 : 周周 (SeeYa!)
'#
'#
'# 主页地址: http://www.ChinaXP.net/ 中国在线
'# http://www.ChinaXP.Net/bbs/ 中国在线--极酷论坛
'#
'#############################################################
%>
<!--#include file="config.asp"-->
<% If Session(strCookieURL & "Approval") = "15916941253" Then %>
<!--#include file="inc_pollmentor.asp"-->
<!--#include file="inc_functions.asp"-->
<!--#include file="inc_top.asp"-->
<TD width="70%" align="left" valign="top">
<TABLE border="0" width="85%" align=center>
<TR>
<TD width="33%" align="left" nowrap><font face="<% Response.Write strDefaultFontFace %>" size="<% Response.Write strDefaultFontSize %>"><a href="default.asp"><img src="<% =strImageURL %>icon_folder_open.gif" alt="返回论坛首页" border="0"> <% =strForumTitle %></a>
<BR><img src="<%=strImageURL %>icon_bar.gif" border="0"><img src="<% =strImageURL %>icon_folder_open.gif" border="0"> <A href="admin_home.asp">论坛管理中心</A>
<BR><img src="<%=strImageURL %>icon_blank.gif" border="0"><img src="<%=strImageURL %>icon_bar.gif" border="0"><img src="<% =strImageURL %>icon_folder_open_topic.gif" border="0"> 投票项目设置
</FONT></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<BR>
<%
if intPollMentor = "" then intPollMentor = 0
if Request.Form("Method_Type") = "Write_Configuration" then
Err_Msg = ""
if Err_Msg = "" then
'## Forum_SQL
if cInt(Request.Form("intPollMentor")) <> 1 then
intPollMentor = 0
else
intPollMentor = 1
end if
strSql = "UPDATE " & strTablePrefix & "MODS "
strSql = strSql & " SET M_VALUE ='" & intPollMentor & "'"
strSQL = strSql & " WHERE M_NAME = 'HModEnable' AND M_CODE = 'PollMentor' "
my_Conn.Execute (strSql)
Application(strCookieURL & "ConfigLoaded") = ""
%>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">修改完成!</font></p>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">设定已变更</font></p>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="admin_pollmentor.asp">返回投票管理中心</font></a></p>
<% else %>
<p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">你输入的资料有问题或没有填写完整</font></p>
<TABLE align=center border=0>
<TR>
<TD><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<ul>
<% =Err_Msg %>
</ul>
</font></TD>
</TR>
</TABLE>
<p align=center><font face="<% =strDefaultFontFace %>" size=<% =strDefaultFontSize %>><a href="JavaScript:history.go(-1)">请返回重新输入</a></font></p>
<% end if
else %>
<div align="center"><font face="<% =strDefaultFontFace %>" size=<% =strDefaultFontSize %>>
<form action="admin_pollmentor.asp" method="post" name="Addform">
<input type="hidden" name="Method_Type" value="Write_Configuration">
<%
if intPollMentor <> 1 then %>
<input type="checkbox" name="intPollMentor" value="1" <% if intPollMentor = 1 then response.write "checked" end if %> >
投票项目现在是关闭的,若要激活投票请在左边打勾后按下面的[更改]
<% Else %>
<input type="checkbox" name="intPollMentor" value="1" <% if intPollMentor = 1 then response.write "checked" end if %> >
投票项目现在是开放的,若要关闭投票请去掉左边的勾后按下面的[更改]
<% End If %>
<br><input type="submit" name="AddField" value=" 更 改 ">
</form></font></div>
<%''''''''''' (C) Stefan Holmberg 1999
''''''''''' Free to use if these sourcecode lines is not deleted
''''''''''' Contact me at webmaster@sqlexperts.com
''''''''''' http://www.sqlexperts.com
''''''''''' AdMentor homepage at http://www.create-a-webshop.com
Set oConn = my_conn
Dim strTrue
Dim strFalse
Dim PollMentor_GetDatabaseType
PollMentor_GetDatabaseType = UCase(strDBType)
If PollMentor_GetDatabaseType = "SQLSERVER" Then
strTrue = "1"
strFalse = "0"
Else
strTrue = "True"
strFalse = "False"
End If
Dim strSort
strSort = Request.QueryString("sort")
If strSort = "" Then
strSort = " active, createdwhen desc"
Else
strSort = strSort & " desc"
End If
If Request.QueryString("saveactive") = "yes" Then
Dim sActive
' Response.Write Request.Form("ACTIVE")
oConn.Execute "update " & strTablePrefix & "poll set active=" & strFalse & " where active=" & strTrue
oConn.Execute "update " & strTablePrefix & "poll set active=" & strTrue & " where id=" & Request.Form("ACTIVE")
End If
%>
<br>
<TABLE align="center" border="0" cellPadding="3" cellSpacing="1" width="<% =strTableWidth %>">
<TBODY>
<TR>
<TD vAlign="top" colspan="2" height="40">
<TABLE align="center" border="0" cellPadding="0" cellSpacing="1" bgcolor="<% =strTableBorderColor %>">
<TBODY>
<TR>
<TD vAlign="top" width="70%">
<TABLE bgcolor="<% =strForumcellColor %>" border="0" cellPadding="3" cellSpacing="1" height="100%" width="100%">
<TBODY>
<TR>
<TD align="left" height="100%" vAlign="top" width="65%">
<TABLE border="0" width="100%">
<TR>
<TD width="50%"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>投票管理设置 <%=Session("fullname")%></b></font></TD>
<TD width="50%"><% Response.Write FAQ_GetAd(1) %></TD>
</TR>
</TABLE>
<font color="#aa3333" face="verdana,arial,helvetica" size="+2">
<hr color="#000066" noShade SIZE="1">
</font>
<TABLE border="0" width="100%">
<TR>
<TD width="70%">
<form method="POST" action="admin_pollmentor.asp?saveactive=yes">
<TABLE border="0" width="100%" cellspacing="1" cellpadding=3 bgcolor="<% =strTableBorderColor %>">
<tr bgcolor="<% =strCategoryCellColor %>">
<TD width="28" align="center">选择</TD>
<TD width=*><a href="admin_pollmentor.asp?sort=question">投票主题</a></TD>
<TD align="center" width="28%"><a href="admin_pollmentor.asp?sort=createdwhen">开始时间</a></TD>
<TD align="center" width="78">管理操作</TD>
</TR>
<%
Dim oRS
Set oRS = oConn.Execute("select * from " & strTablePrefix & "poll order by " & strSort)
TotleCount = INT(oRS.RecordCount)
Dim bgcolor
Dim rec
rec = 0
if not oRS.EOF then
bgcolor = "#ECECD9"
while not oRS.EOF
rec = rec + 1
%>
<tr bgcolor="<% =strForumCellColor %>">
<%
Dim sBold, sBoldStop, sSel
If oRS("active") = True Then
sBold = "<b>"
sBoldStop ="</b>"
sSel = "checked"
Else
sBold = ""
sBoldStop = ""
sSel = ""
End If
%>
<TD align="center" bgcolor="<%=CColor%>"><input type="radio" value="<%=oRS("id")%>" <%=sSel%> name="ACTIVE"><%=sBold%></TD>
<TD bgcolor="<%=CColor%>"><%=sBold%><%=Trim(oRS("question"))%><%=sBoldStop%></TD>
<TD align="center" bgcolor="<%=CColor%>"><%=sBold%><%=oRS("createdwhen")%><%=sBoldStop%></TD>
<TD align="center" bgcolor="<%=CColor%>"><a href="admin_poll.asp?id=<%=oRS("id")%>&action=edit">修改</a> - <a href="admin_poll.asp?id=<%=oRS("id")%>&save=yes&action=del">删除</a></TD>
</TR>
<%
If bgcolor= strForumCellColor Then
bgcolor = strAltForumCellColor
Else
bgcolor=strForumCellColor
End if
oRS.MoveNext
Wend
else
%>
<font face="helvetica, arial" size="2"><b>暂时没有投票项目 </b></font>
<% end if %>
</TABLE>
<BR>
<DIV align="center"><input type="submit" value="设置当前投票项目" name="B1" <% if rec = 0 then Response.Write "Disabled" %>> <input type="button" onClick="location.href='admin_poll.asp?action=new';" value="增加一个新的投票项目" name="B2">
<input type="hidden" name="Method_Type" value=""></DIV>
<TABLE border="0" width="100%">
<TR>
<TD width="50%"><% =FAQ_GetAd(3) %></TD>
<TD width="50%"><% =FAQ_GetAd(2) %></TD>
</TR>
</TABLE>
</TR>
<%
oRS.Close
Set oRS = Nothing
%>
</form>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<!--#include file="inc_footer.asp"-->
<% End if
Else
Response.Redirect "admin_login.asp"
End IF %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -