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

📄 threads.asp

📁 教师评估系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!-- #include file="Cls.asp" -->
<!-- #include file="Inc/UBBPost.asp" -->
<%
ThreadID=ChkNumeric(Request.QueryString("Tid"))
ForumID=ChkNumeric(Request.QueryString("Fid"))
EnableShowFace=ChkNumeric(Cookies("DisabledShowFace"))=0
EnableShowSign=ChkNumeric(Cookies("DisabledShowSign"))=0

if Request("menu")="Next" then
sql="select top 1 * from [WxThreads] where ID > "&ThreadID&" and ForumID="&ForumID&" and IsDel=0 order by id"
elseif Request("menu")="Previous" then
sql="select top 1 * from [WxThreads] where ID < "&ThreadID&" and ForumID="&ForumID&" and IsDel=0 order by id Desc"
else
sql="select * from [WxThreads] where id="&ThreadID&""
end if

Rs.Open SQL,Conn,1,3
if Rs.Eof or Rs.bof then Error "查看帖子","<li>该帖子不存在</li>"
Rs("Views")=Rs("Views")+1
Rs("LastViewedDate")=now()
Topic=ReplaceText(Rs("Topic"),"<[^>]*>","")
top Topic,true
UserName=Rs("UserName")
Replies=Rs("Replies")
Views=Rs("Views")
IsVote=Rs("IsVote")
IsGood=Rs("IsGood")
IsTop=Rs("IsTop")
IsLocked=Rs("IsLocked")
IsDel=Rs("IsDel")
PostsTableName=Rs("PostsTableName")
Category=Rs("Category")
ThreadID=Rs("ID")
ForumID=Rs("ForumID")
Tags=Rs("Tags")
Award=Trim(Rs("Award"))
if Award<>Empty Then Award="<fieldset style='width:500px'><legend><b>本帖最近评分记录</b></legend><br />"&Award&"</fieldset>"
ThreadStatus=Rs("ThreadStatus")
PayTopicMoney=rs("PayTopicMoney")
if Tags<>Empty Then
 Lists=split(Tags," ")
 TagsList="<b>[本主题标签:"
 for i=0 to UBound(Lists)
 TagsList=TagsList&"<a target=_blank href='http://www.baidu.com/s?tn=wxskycn_pg&ct=&lm=&z=&rn=&word="&Lists(i)&"'>"&Lists(i)&"</a> "
 next
 TagsList=Trim(TagsList)&"]</b>"
Else
 TagsList=""
end if
if PayTopicMoney>0 and (BestRole=1 or LCase(Username)=LCase(CookieUserName)) then paylink=" | <a href=PayTopic.asp?menu=redo&id="&ThreadID&">悬赏发放</a>"
Rs.update
Rs.close

ForumData=GetForumData(ForumID)
ForumName=ForumData(2)
Moderated=ForumData(3)
ParentID=ForumData(0)
%>
<!-- #include file="inc/ForumPermissions.asp" -->
<%
if PermissionsRead=0 then Error "您的权限不足","<li><a href=ForumsPower.asp?Fid="&ForumID&">查看我的权限</a></li>"
if IsDel=1 and PermissionsManage=0 then Error "系统错误","<li>该主题被删除</li>"
%>
<div class="nav dt"><div class="fl"><img alt="" src="Images/Forum_nav.gif" />&nbsp; <%=ClubTree%> → <%ForumTree(ParentID)%><%=ForumTreeList%> <a href="Forums.asp?Fid=<%=ForumID%>"><%=ForumName%></a> → <a href="?Tid=<%=ThreadID%>"><%=Topic%></a> <%=TagsList%></div><div class="fr"><a target="_blank" href="Print.asp?Tid=<%=ThreadID%>"><img alt="打印本帖" src="Images/Print.gif" /></a> <script type="text/javascript">document.write("<a target=_blank href='Mailto:?subject="+document.title+"&body="+location.href+"'><img alt=通过电子邮件发送此页面 src=Images/email.gif /></a>");</script> <a href="javascript:window.external.AddFavorite(location.href,document.title)"><img alt="添加加到IE收藏夹" src="Images/favs.gif" /></a> <a onclick="return ShowModal('报告问题主题','MyPanel.asp?menu=Post&Incept=<%=Split(Moderated&"|","|")(0)%>&body=【问题帖子】:<%=Cache("SiteUrl")&"Threads.asp?Tid="&ThreadID%>');"><img alt="报告本帖" src="Images/feedback.gif" /></a> <a href="?menu=Previous&Fid=<%=ForumID%>&Tid=<%=ThreadID%>"><img alt="浏览上一篇主题" src="Images/previous.gif" /></a> <a href="?menu=Next&Fid=<%=ForumID%>&Tid=<%=ThreadID%>"><img alt="浏览下一篇主题" src="Images/next.gif" /></a></div></div>

<div class="cb dt">
<div class="fl w3"><script type="text/javascript">ShowPostImg(<%=ForumID%>,<%=ThreadID%>,1,1,<%=PermissionsCreatePoll%>)</script></div>
<div class="fl ac w3">本帖子共被浏览 <b><%=Views%></b> 次,回复 <b><%=Replies%></b> 篇</div>
<div class="fl ac w2a"><%if LCase(CookieUserName)=LCase(UserName) or BestRole=1 Then Readonly="Readonly=""readonly"""%>
主题状态:
<select name="ThreadStatus" onchange="javascript:if(this.options[this.selectedIndex].value)XmlReturn('Load.asp?menu=ThreadStatus&ThreadID=<%=ThreadID%>&ThreadStatus='+this.options[this.selectedIndex].value)" <%=Readonly%>>
 <option value="0">--</option>
 <option value="1"<%if ThreadStatus=1 Then%> selected="selected"<%end if%>>未解决</option>
 <option value="2"<%if ThreadStatus=2 Then%> selected="selected"<%end if%>>已解决</option>
</select>
</div>
<div class="fr ar"><a href="#manage">↓ 分页、管理、跳转 ↓</a></div>
</div>
<%if IsVote=1 then%>
<script src="Inc/Vote.js" type="text/javascript"></script>
<form method="post" name="form0" action="PostVote.asp?id=<%=ThreadID%>">
<div class="tb cb dt">
<div id="tt">投票信息</div>
<div class="b cb">
<div class="intro cb">
<div class="fl r w4">选项</div>
<div class="fl r w0">票数</div>
<div class="fr w4">百分比</div>
</div>
<div id="result2">
<%
sql="select * from [WxVote] where ThreadID="&ThreadID&""
Set Rs=Conn.Execute(sql)
if Rs.Eof Then
 Conn.Execute("update [WxThreads] set IsVote=0 where ID="&ThreadID&"")
 Response.redirect "Threads.asp?Tid="&ThreadID
 CloseDataBase
end if
Expiry=Rs("Expiry")
if Rs("Type")=1 then
multiplicity="checkbox"
else
multiplicity="radio"
end if
allticket=0
Result=split(Rs("Result"),"|")
for i=0 to UBound(Result)
if Result(i)<>"" then allticket=Result(i)+allticket
next

Vote=split(Rs("Items"),"|")
for i=0 to UBound(Vote)
if Vote(i)<>"" then
if allticket=0 then
Voteresult=0
Votepercent=0
else
Voteresult=result(i)/allticket*100
Votepercent=FormatNumber(result(i)/allticket*100)
if Votepercent=0 then Votepercent="0.00"
end if
%><div class="tc b cb">
<div class="fl r w4 h3"><input type="<%=multiplicity%>" name="PostVote" value="<%=i%>" /><%=Vote(i)%></div>
<div class="fl r w0 h3 ac"><span id="ps<%=i%>"><%=Result(i)%></span></div>
<div class="fr h3">
<div class='percent fl al' id="bar<%=i%>" style="width:300px;"><div id="per" style='width:<%=Voteresult%>%'></div></div>
<span class="fr ac" id="per<%=i%>"><%=Votepercent%>%</span>
</div>
</div>
<%
end if
next
%>
</div></div>
<div class="tc cb">
<div id="result" class="fl r ac w5">
<%
if  PermissionsVote=0 then
Response.write "您没有权限投票"
elseif instr("|"&Rs("BallotUserList")&"|","|"&CookieUserName&"|")>0 then
Response.write "您已经投过票了"
elseif instr("|"&Rs("BallotIPList")&"|","|"&Request.ServerVariables("REMOTE_ADDR")&"|")>0 then
Response.write "此IP已经投过票了"
elseif Expiry<now() then
Response.write "投票已过期"
else
Response.write "<input type=button value='投 票' onclick=VoteThis() />"
end if
%></div>
<div class="fl w2">总票数:<%=allticket%></div>
<div class="fr w2">截止投票时间:<%=Expiry%></div>
</div>
</div>
</form>
<%
Rs.Close
end if

TotalCount=Replies+1
PageSetup=Cache("PostsPerPage") '设定每页的显示数量
TotalPage=Abs(Int(TotalCount/PageSetup*(-1))) '总页数
PageCount = cint(Request.QueryString("PageIndex")) '获取当前页
if PageCount <1 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage

sql="select ID,ThreadID,Subject,UserName,Content,PostTime from [WxPosts"&PostsTableName&"] where ThreadID="&ThreadID&" order by Posttime"
if PageCount<11 then
Set Rs=Conn.Execute(sql)

⌨️ 快捷键说明

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