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

📄 showpost.asp

📁 闻名一时的bbsxp超快论坛系统现在放出最新版2008版本给希望装论坛的朋友借鉴安装调试
💻 ASP
📖 第 1 页 / 共 3 页
字号:
	elseif instr("|"&Rs("BallotUserList")&"|","|"&CookieUserName&"|")>0 then
		response.write "您已经投过票了"
	elseif instr("|"&Rs("BallotIPList")&"|","|"&REMOTE_ADDR&"|")>0 then
		response.write "此IP已经投过票了"
	elseif Rs("Expiry")< now() then
		response.write "投票已过期"
	else
		response.write "<INPUT type=submit value='投 票'>"
	end if
%> </td>
			<td align="center">总票数:<%=allticket%></td>
			<td colspan="2" align="center">截止投票时间:<%=Rs("Expiry")%></td>
		</tr>
	</form>
</table>
<%
Rs.Close
end if
'''''''投票 END''''''''

if PermissionManage=1 then
	response.write("<form style='margin:0px;' method=POST action=Manage.asp>")
	response.write("<input type=hidden name='ThreadID' value='"&ThreadID&"' />")
	VisibleSql=""
	TotalCount=TotalReplies+DeletedCount+HiddenCount+1
else
	VisibleSql=" and Visible=1"
	TotalCount=TotalReplies+1
end if
if RequestInt("PostID")>0 then
	TotalCount=1		'如果是浏览单帖子不分页
elseif PostAuthor>"" then
	TotalCount=Execute("Select Count(PostID) from ["&TablePrefix&"Posts] where ThreadID="&ThreadID&PostSql&VisibleSql&"")(0)
end if
if TotalCount<1 then
	IsResponseTop=0
	response.clear()
	error"<li>系统不存在该主题的相关帖子"
end if

PageSetup=SiteConfig("PostsPerPage") '设定每页的显示数量
TotalPage=Abs(Int(TotalCount/PageSetup*(-1))) '总页数
PageCount = RequestInt("PageIndex") '获取当前页
if PageCount <1 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage

if Request("SortOrder")="1" then
	SqlSortOrder="Desc"
else
	SqlSortOrder=""
end if

'加入审核功能
	sql="Select top "&PageCount*pagesetup&" PostID,ThreadID,ParentID,PostAuthor,Subject,Body,IPAddress,PostDate,Visible from ["&TablePrefix&"Posts] where ThreadID="&ThreadID&PostSql&VisibleSql&" order by PostID "&SqlSortOrder&""
	Set Rs=Execute(sql)
	
	If Rs.Eof and ""&PostAuthor&""="" then Execute("Delete from ["&TablePrefix&"Threads] where ThreadID="&ThreadID&"")
	If TotalPage>1 then RS.Move (PageCount-1) * pagesetup
	IF Not Rs.Eof then PostGetRows=Rs.GetRows(pagesetup)
	Rs.close



if IsArray(PostGetRows) then
	For i=0 To Ubound(PostGetRows,2)
		PostID=PostGetRows(0,i)
		ThreadID=PostGetRows(1,i)
		ParentID=PostGetRows(2,i)
		PostAuthor=PostGetRows(3,i)
		Subject=PostGetRows(4,i)
		Body=PostGetRows(5,i)
		IPAddress=PostGetRows(6,i)
		PostDate=PostGetRows(7,i)
		Visible=PostGetRows(8,i)
		
		
		if ViewMode=0 then
			ShowPostSimple
		else
			ShowPost
		end if
		
	Next
End if
AdvertisementGetRow=null
PostGetRows=null



if PermissionManage=1 then%>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
	<tr>
		<td align="right" style="Padding-Top:8px">
        管理:
		<select name=menu size=1>
			<optgroup label="选项">
					<option value="DelPost">删除帖子</option>
					<option value="UnDelPost">反删除帖子</option>
					<option value="PostVisible">通过审核帖子</option>
					<option value="PostInVisible">取消审核帖子</option>
				</optgroup>
		</select> <input type="submit" value=" 执 行 " onclick="return VerifyRadio('Item');" /> <input type=checkbox name=chkall onclick='CheckAll(this.form)' value=ON>
        </td>
	</tr>
</table>
<%
response.write("</form>")
end if
%>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
	<tr><td><%ShowPage()%></td></tr>
</table>

<%
if IsLocked=0 and PermissionReply=1 and CookieUserName<>empty then
%>
<a name="QuickReply"></a>
<table cellspacing="1" cellpadding="5" width="100%" class="CommonListArea">
	<form name="form" method="POST" action="AddPost.asp" onsubmit="return CheckForm(this);">
	<input type="hidden" value="<%=ThreadID%>" name="ThreadID">
	<input type="hidden" value="<%=PostID%>" name="PostID">
	<input name="Body" type="hidden">
	<tr class="CommonListTitle">
		<td colspan="2"><b>快速回复</b></td>
	</tr>
	<tr class="CommonListCell">
		<td valign="top" height="50%" width="180">
				<br /><b>文章内容</b><br />(<a href="javascript:CheckLength();">查看内容长度</a>)<br /><br />
				<input id="DisableBBCode" name="DisableBBCode" type="checkbox" value="1"><label for="DisableBBCode"> 禁用 BB 代码</label>
		</td>
		<td height="200"><script type="text/javascript" src="Editor/Post.js"></script></td>
	</tr>
	<tr class="CommonListCell">
		<td valign="top" height="50%" colspan="2" align="center">
		<input type="submit" accesskey="s" title="(Alt + S)" value=" 回复 " name="EditSubmit"> <input type="Button" value=" 预览 " onclick="Preview()"> <input onclick="history.back()" type="button" value=" 取消 "> <input type="button" id="recoverdata" onclick="RestoreData()" title="恢复上次自动保存的数据" value="恢复数据" /></td>
	</tr>
	</form>
</table>
<div name="Preview" id="Preview"></div>
<script language="JavaScript" type="text/javascript">
function QuickReply(NO){
	document.form.PostID.value =NO;
	window.location="#QuickReply";
	BBSXPEditorForm.focus();
}
function VerifyRadio() {
	objYN=false;
	if (window.confirm('您确定执行本次操作?')){
		for (i=0;i<document.getElementsByName("PostID").length;i++) {
			if (document.getElementsByName("PostID")[i].checked) {objYN= true;}
		}
		if (objYN==false) {alert ('请选择您要操作的帖子!');return false;}
	}
	return objYN;
}
function showPostText(PostID){
	ToggleMenuOnOff('PostContent_'+PostID);
	ToggleMenuOnOff('PostContent'+PostID);
	ToggleMenuOnOff('PostTitle'+PostID);
}
</script>
<%
end if

%><!-- #include file="Utility/OnLine.asp" -->
<%
if SiteConfig("DisplayThreadUsers")=1 then
	ForumIDOnline=Execute("Select count(sessionid) from ["&TablePrefix&"UserOnline] where ForumID="&ForumID&"")(0)
	ThreadIDOnline=Execute("Select count(sessionid) from ["&TablePrefix&"UserOnline] where ThreadID="&ThreadID&"")(0)
	regThreadIDOnline=Execute("Select count(sessionid) from ["&TablePrefix&"UserOnline] where ThreadID="&ThreadID&" and UserName<>''")(0)
%>
	
<table cellspacing="1" cellpadding="5" width="100%" class="CommonListArea">
	<tr class="CommonListTitle">
		<td>用户在线信息</td>
	</tr>
	<tr class="CommonListCell">
    	<td>
		<img src="images/plus.gif" id="followImg" style="cursor:pointer;" onclick="loadThreadFollow('ThreadID=<%=ThreadID%>')" /> 
		当前查看此主题的会员: <b><%=ThreadIDOnline%></b> 人。其中注册用户 <b><%=regThreadIDOnline%></b> 人,访客 <b><%=ThreadIDOnline-regThreadIDOnline%></b> 
		人。<div style="display:none" id="follow">
			<hr width="90%" size="1" align="left"><span id="followTd" class="UserList">
			<img src="images/loading.gif" />正在加载...</span></div>
		</td>
	</tr>
</table>
<br />
<%
end if

if PermissionManage=1 then
	response.write "<br><table cellspacing=0 cellpadding=0 width=100% align=center border=0><tr><td align=center>管理选项:"
	if ThreadTop=2 then
		response.write "<a href=javascript:UrlPost('Manage.asp?menu=UnTop&ThreadID="&ThreadID&"')>取消公告</a> | "
	else
		response.write "<a href=javascript:UrlPost('Manage.asp?menu=Top&ThreadID="&ThreadID&"')>设为公告</a> | "
	end if

	if ThreadTop=1 then
		response.write "<a href=javascript:UrlPost('Manage.asp?menu=DelTop&ThreadID="&ThreadID&"')>取消置顶</a> | "
	else
		response.write "<a href=javascript:UrlPost('Manage.asp?menu=ThreadTop&ThreadID="&ThreadID&"')>置顶主题</a> | "
	end if
	response.write "<a href=javascript:UrlPost('Manage.asp?menu=MoveNew&ThreadID="&ThreadID&"')>拉前主题</a> | "
	if IsLocked=1 then
		response.write "<a href=javascript:UrlPost('Manage.asp?menu=DelIsLocked&ThreadID="&ThreadID&"')>解锁主题</a> | "
	else
		response.write "<a href=javascript:UrlPost('Manage.asp?menu=IsLocked&ThreadID="&ThreadID&"')>锁定主题</a> | "
	end if
	if IsGood=1 then
		response.write "<a href=javascript:UrlPost('Manage.asp?menu=DelIsGood&ThreadID="&ThreadID&"')>取消精华主题</a>"
	else
		response.write "<a href=javascript:UrlPost('Manage.asp?menu=IsGood&ThreadID="&ThreadID&"')>加为精华主题</a>"
	end if
	response.write " | <a href=MoveThread.asp?ThreadID="&ThreadID&">移动主题</a> | <a title='修复帖子的回复数' href=javascript:UrlPost('Manage.asp?menu=Fix&ThreadID="&ThreadID&"')>修复主题</a></td></tr></table>"
end if


HtmlBottom



Sub ShowPostSimple()

%>
<table cellspacing="1" cellpadding="5" width="100%" class="CommonListArea" style="TABLE-LAYOUT:fixed;">
	<tr class="CommonListHeader">
		<td>
			<div style=float:left><b><a target="_blank" href="Profile.asp?UserName=<%=PostAuthor%>"><%=PostAuthor%></a></b> 发表于 <%=PostDate%></div>
			<div style=float:right>
						<%if IsLocked=1 then%>
						<a onclick="window.alert('该帖已锁定不允许回复。');">锁定</a>

⌨️ 快捷键说明

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