⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 forums.asp

📁 教师评估系统
💻 ASP
字号:
<!-- #include file="Cls.asp" --><%
ForumID=ChkNumeric(Request.QueryString("Fid"))
order=HTMLEncode(Request.Form("order"))
Category=HTMLEncode(Request.QueryString("Category"))
SortOrder=Request.Form("SortOrder")
TimeLimit=Request.Form("TimeLimit")
GoodTopic=ChkNumeric(Request.QueryString("GoodTopic"))
ForumData=GetForumData(ForumID)
top ForumData(2),true
if Len(order)>10 then Error 6,"<li>非法操作</li>"
if Len(Category)>25 then Error 6,"<li>分类名过长</li>"
if ForumData(0)=0 then IsParent=1
ID1=ForumID
Moderated=ForumData(3)
%>
<!-- #include file="inc/ForumPermissions.asp" -->
<%if PermissionsView=0 then Error 0,""%>
<div class="nav dt">
<img alt="" src="Images/Forum_nav.gif" />&nbsp; <%=ClubTree%> 
→ <%ForumTree(ForumData(0))%><%=ForumTreeList%>
<a href="Forums.asp?Fid=<%=ForumID%>"><%=ForumData(2)%></a><a onmouseover="showmenu(event,'<div class=menuitems><a href=Rss.asp?ForumID=<%=ForumID%>&goodtopic=1>订阅精华主题</a></div><div class=menuitems><a href=Rss.asp?Fid=<%=ForumID%>&toptopic=1>订阅置顶主题</a></div><div class=menuitems><a href=Rss.asp?Fid=<%=ForumID%>&moneytopic=1>订阅悬赏主题</a></div><div class=menuitems><a href=Rss.asp?Fid=<%=ForumID%>>订阅最新主题</a></div>')" style="cursor:default"><img alt="" src="Images/RssIcon.gif" title="订阅 RSS 源" /></a>
</div>
<%
i=0
TopEnd=0
sql="select ID from [WxForums] where ParentID="&ForumID&" order by SortNum"
Rs1.Open sql,Conn,1
if Not Rs1.Eof then
%>
<div class="tb dt">
<div id="tt"><a href="Forums.asp?Fid=<%=ForumID%>"><%=ForumData(2)%></a></div>
<%=Cache("forumtb")%>
<%
do while Not Rs1.Eof
ID1=Rs1("ID")
ChildForum=GetForumData(ID1)
Response.write ChildForum(17)
Rs1.MoveNext
loop
%></div><%
end if
Rs1.Close
if ForumData(12)<>Empty Then%>
<div class="tb dt">
<div id="tt">版块公告</div>
<div class="tc"><%=Replace(ForumData(12),"&#32;"," ")%></div>
</div>
<%end if
WxLine
if IsParent<>1 then
if Cache("DisplayWhoIsOnline") Then
ForumIDOnline=Conn.Execute("select count(sessionid)from [WxUsersOnline] where ForumID="&ForumID&"")(0)
regForumIDOnline=Conn.Execute("select count(sessionid)from [WxUsersOnline] where ForumID="&ForumID&" and UserName<>''")(0)
%>
<div class="tb dt">
<div id="tt">在线情况 - 本版面共 <%=regForumIDOnline%> 位会员和 <%=ForumIDOnline-regForumIDOnline%> 位游客在线 </div>
</div>
<%end if%>
<div class="dt cb">
<div class="fl">
<script type="text/javascript">ShowPostImg(<%=ForumID%>,0,1,0,<%=PermissionsCreatePoll%>)</script>
</div>
<div class="ar fr mt8">
<%if ForumData(13)=1 then%>
<a href="Moderation.asp?menu=Censorship&ForumID=<%=ForumID%>&checkbox=1">帖子审核(<%=Conn.Execute("select count(ID) from [WxThreads] where IsDel=1 and PostTime=lasttime and ForumID="&ForumID&" ")(0)%>)</a> 
<%end if%>
<a onmouseover="showmenu(event,'<%
if ForumData(3)<>empty then
filtrate=split(ForumData(3),"|")
for i = 0 to UBound(filtrate)
Response.write "<div class=menuitems><a href=User.asp?Name="&filtrate(i)&">"&filtrate(i)&"</a></div>"
next
end if
%>')">本版版主</a>
 <a href="?Fid=<%=ForumID%>&GoodTopic=1">精华主题</a> <a href="ForumsPower.asp?Fid=<%=ForumID%>">论坛权限</a> <a href="ForumManage.asp?menu=ForumData&Fid=<%=ForumID%>">版块管理</a>
 <a href="MyPanel.asp?menu=AddFav&Url=<%=Server.URLEncode(""&Request.ServerVariables("script_name")&"?"&Request.ServerVariables("Query_String")&"")%>&name=<%=ForumData(2)%>">加入书签</a>
</div></div>
<div class="tb dt">
<%
Response.write ForumData(16)
if TimeLimit<>"" then SQLTimeLimit="and lasttime>"&SqlNowString&"-"&int(TimeLimit)&""
if Category<>"" then SQLCategory="and Category='"&Category&"'"
if GoodTopic>0 then SQLGoodTopic="and IsGood=1"

if order="" then order="lasttime"
if SortOrder="1" then
SqlSortOrder=""
else
SqlSortOrder="Desc"
end if
topsql="select ForumID,ID,Icon,IsGood,IsTop,IsLocked,Replies,Views,ThreadStatus,PayTopicMoney,Topic,Category,UserName,LastName,LastTime,PostTime from [WxThreads] where IsDel=0 and ForumID="&ForumID&" "&SQLCategory&" "&SQLTimeLimit&" "&SQLGoodTopic&" or IsTop=3 or (IsTop=2 and (ForumID in ("&ForumID
Set Rs1=Conn.Execute("select ID from [WxForums] where ParentID="&ForumData(0)&" and ID<>"&ForumID)
Do While Not Rs1.Eof
topsql=topsql&","&Rs1(0)
Rs1.MoveNext
Loop
Rs1.Close
topsql=topsql&")))"

PageSetup=int(Cache("ThreadsPerPage")) '设定每页的显示数量
TotalCount=Conn.Execute("select count(ID) from [WxThreads] where IsDel=0 and ForumID="&ForumID&" "&SQLCategory&" "&SQLTimeLimit&" "&SQLGoodTopic&" or IsTop=3 or (IsTop=2 and ForumID="&ForumID&")")(0)
TotalPage=Abs(Int(TotalCount/PageSetup*(-1))) '总页数
PageCount = cint(Request.QueryString("PageIndex")) '获取当前页

sql=""&topsql&" order by IsTop Desc,"&order&" "&SqlSortOrder&""
if PageCount<11 then
Set Rs=Conn.Execute(sql)
else
rs.Open sql,Conn,1
end if

if PageCount <1 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage

TopEnd=0
if Not Rs.Eof Then
if TotalPage>1 then RS.Move (PageCount-1) * pagesetup
ThreadsList=Rs.GetRows(pagesetup)
Rs.close
For i=0 To UBound(ThreadsList,2)
ForumID=ThreadsList(0,i)
ID=ThreadsList(1,i)
Icon=ThreadsList(2,i)
IsGood=ThreadsList(3,i)
IsTop=ThreadsList(4,i)
IsLocked=ThreadsList(5,i)
Replies=ThreadsList(6,i)
Views=ThreadsList(7,i)
ThreadStatus=ThreadsList(8,i)
PayTopicMoney=ThreadsList(9,i)
Topic=ThreadsList(10,i)
Category=ThreadsList(11,i)
UserName=ThreadsList(12,i)
LastName=ThreadsList(13,i)
LastTime=ThreadsList(14,i)
PostTime=ThreadsList(15,i)
ShowThreads
Next
end if
%>
</div>
<div class="cb dt">
<div class="fl">
<a onmousedown="MenuOn('ForumOption')" class="button" href="#ForumOption">
选项</a>
<a onmousedown="MenuOn('ForumSearch')" class="button" href="#ForumSearch">
搜索</a></div>
<div id="ForumSearch" style="position:absolute;display:none;" class="fl">
<form method="post" name="form" action="Search.asp?menu=Result&ForumID=<%=ForumID%>&sessionid=<%=session.sessionid%>">
<input name="Keywords" size="20" onclick="this.value=''" onchange="javascript:VerifyText(this,'关键字','bt1');" name="Key" value="关键字" />
<input type="submit" value="搜索" id="bt1" disabled="disabled" />
</form>
</div>
<div class="fr ar"><%ShowPage()%></div>
</div>

<div id="ForumOption" class="dt" style="display:none;">
<fieldset><legend>个性排序</legend>
<form method="post" name="form" action="Forums.asp?Fid=<%=ForumID%>">
按 <select name="order">
<option value="">最后更新时间</option>
<option value="id">主题发表时间</option>
<option value="IsGood">精华帖子</option>
<option value="IsVote">投票帖子</option>
<option value="Topic">主题</option>
<option value="UserName">作者</option>
<option value="Views">点击数</option>
<option value="Replies">回复数</option>
</select> 的 <select name="SortOrder">
<option value="0" selected="selected">降序</option>
<option value="1">升序</option>
</select> 排列,发表于 <select name="TimeLimit">
<option value="">所有时间</option>
<option value="1">一天内</option>
<option value="2">两天内</option>
<option value="3">三天内</option>
<option value="7">一星期内</option>
<option value="14">两星期内</option>
<option value="30">一个月内</option>
<option value="60">两个月内</option>
<option value="90">三个月内</option>
<option value="180">六个月内</option>
</select> 的帖子 <input type="submit" value=" 立即应用 "></form>
</fieldset>
<fieldset><legend>您的权限</legend>
发表新主题(<b><%if PermissionsPost=0 then%>×<%else%>√<%end if%></b>)回复主题(<b><%if PermissionsReply=0 then%>×<%else%>√<%end if%></b>)修改自己的帖子(<b><%if PermissionsEdit=0 then%>×<%else%>√<%end if%></b>)删除自己的帖子(<b><%if PermissionsDelete=0 then%>×<%else%>√<%end if%></b>)发起投票(<b><%if PermissionsCreatePoll=0 then%>×<%else%>√<%end if%></b>)参与投票(<b><%if PermissionsVote=0 then%>×<%else%>√<%end if%></b>)上传附件(<b><%if PermissionsAttachment=0 then%>×<%else%>√<%end if%></b>)
本版块帖子<%if ForumData(13)=0 then%>不<%end if%>存在审核机制<br />
</fieldset>
</div>
<%
end if
HtmlEnd%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -