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

📄 reannounce.asp

📁 网上商城的源码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/char_board.asp" -->
<!-- #include file="inc/const.asp" -->
<!--#include file="inc/ubbcode.asp"-->
<%
dim AnnounceID
dim replyID
dim username
dim dateandtime
dim bgcolor,abgcolor
dim PostUserGroup
dim con,content
dim TotalUseTable
dim postbuyuser

if BoardID="" or not isInteger(BoardID) or BoardID=0 then
	Errmsg=Errmsg+"<br>"+"<li>错误的版面参数!请确认您是从有效的连接进入。"
	founderr=true
else
	BoardID=clng(BoardID)
end if
if request("id")="" then
	founderr=true
	Errmsg=Errmsg+"<br>"+"<li>请指定相关贴子。"
elseif not isInteger(request("id")) then
	founderr=true
	Errmsg=Errmsg+"<br>"+"<li>非法的贴子参数。"
else
	AnnounceID=request("id")
end if
if request("replyid")="" then
	replyid=Announceid
elseif not isInteger(request("replyid")) then
	replyid=Announceid
else
	replyid=request("replyid")
end if
if founderr then
	call nav()
	call head_var(2,0,"","")
	call dvbbs_error()
else
	stats="回复帖子"
	call nav()
	call head_var(1,BoardDepth,0,0)
	call main()
	if founderr then call dvbbs_error()
end if
call footer()

sub main()
if Cint(Board_Setting(43))=1 then
	Errmsg=Errmsg+"<br>"+"<li>本论坛已经被管理员限制了不允许发贴。"
	founderr=true
	exit sub
end if
if cint(Board_Setting(1))=1 then
	if Cint(GroupSetting(37))=0 then
		Errmsg=ErrMsg+"<Br>"+"<li>您没有权限进入隐含论坛!"
		founderr=true
		exit sub
	end if
end if
if cint(Board_Setting(2))=1 then
	if not founduser then
		Errmsg=Errmsg+"<br>"+"<li>本论坛为认证论坛,请<a href=login.asp>登陆</a>并确认您的用户名已经得到管理员的认证后进入。"
		founderr=true
		exit sub
	else
		if chkboardlogin(boardid,membername)=false then
		Errmsg=Errmsg+"<br>"+"<li>本论坛为认证论坛,请确认您的用户名已经得到管理员的认证后进入。"
		founderr=true
		exit sub
		end if
	end if
end if

set rs=conn.execute("select PostTable,locktopic from topic where TopicID="&AnnounceID)
if not (rs.eof and rs.bof) then
	if rs(1)=1 or rs(1)=2 then
		Errmsg=Errmsg+"<br>"+"<li>本主题已被锁定或者删除,不能发表回复。"
		founderr=true
		exit sub
	end if
	TotalUseTable=rs(0)
else
	ErrMsg=ErrMsg+"<br>"+"<li>您指定的贴子不存在</li>"
	founderr=true
	exit sub
end if

if replyid=Announceid then
	set rs=conn.execute("select top 1 Announceid from "&TotalUseTable&" where rootID="&AnnounceID&" order by Announceid")
	if not(rs.bof and rs.eof) then
		replyID=rs(0)
	else
		ErrMsg=ErrMsg+"<br>"+"<li>您指定的贴子不存在</li>"
		founderr=true
		exit sub
	end if
end if

sql="select b.body,b.topic,b.locktopic,b.username,b.dateandtime,b.isbest,u.lockuser,u.UserGroupID from "&TotalUseTable&" b inner join [user] u on b.postuserid=u.userid where b.AnnounceID="&replyID
set rs=conn.execute(sql)
if rs.eof and rs.bof then
	Errmsg=Errmsg+"<br>"+"<li>没有找到相关帖子。"
	founderr=true
	exit sub
else
	if rs("locktopic")=1 or rs("locktopic")=2 then
		Errmsg=Errmsg+"<br>"+"<li>本主题已被锁定或者删除,不能发表回复。"
		founderr=true
		exit sub
	elseif rs("lockuser")=2 then
   		con=""
	elseif rs("isbest")=1 and Cint(GroupSetting(41))=0 then
		con=""
	else
   		con=rs("body")
	end if
	username=rs("username")
	dateandtime=rs("dateandtime")
	PostUserGroup=rs("UserGroupID")
	if username=membername then
		if Cint(GroupSetting(4))=0 then
		Errmsg=Errmsg+"<br>"+"<li>您没有在本论坛回复自己主题的权限。"
		founderr=true
		exit sub
		end if
	else
		if Cint(GroupSetting(5))=0 then
		Errmsg=Errmsg+"<br>"+"<li>您没有在本论坛回复其他人帖子的权限,请<a href=login.asp>登陆</a>或者同管理员联系。"
		founderr=true
		exit sub
		end if
		if Cint(GroupSetting(2))=0 then
		Errmsg=Errmsg+"<br>"+"<li>您没有浏览在本论坛查看其他人发布的帖子的权限,请<a href=login.asp>登陆</a>或者同管理员联系。"
		founderr=true
		exit sub
		end if
	end if
end if
set rs=nothing

if request("reply")="true" then
	con = reubbcode(con)
	con = replace(con, "&gt;", ">")
	con = replace(con, "&lt;", "<")
	con = Replace(con, "</P><P>", CHR(10) & CHR(10))
	con = Replace(con, "<BR>", CHR(10))
	content = "[quote][b]以下是引用[i]"&username&"在"&dateandtime&"[/i]的发言:[/b]" & chr(13)
	content = content & con & chr(13)
	content = content & "[/quote]"
else
	content=""
end if
%>
<script src="inc/ubbcode.js"></script>
<form action="SaveReAnnounce.asp?method=Topic&boardID=<%=request("boardid")%>" method=POST onSubmit="submitonce(this)" name=frmAnnounce>
<input type="hidden" name="upfilerename">
<input type=hidden name="followup" value="<%=replyID%>">
<input type=hidden name="rootID" value="<%=AnnounceID%>">
<input type=hidden name="star" value="<%=request("star")%>">
<input type=hidden name="TotalUseTable" value="<%=TotalUseTable%>">

<table cellpadding=3 cellspacing=1 align=center class=tableborder1>
    <tr>
      <th width=100% align=left colspan=2>&nbsp;&nbsp;发表回复<%if isaudit=1 then%>(本版面所有帖子都要经过管理员审核方可发表)<%end if%></th>
    </tr>
        <tr>
          <td width=20% class=tablebody2><b>用户名</b></td>
          <td width=80% class=tablebody2><input name=username value=<%=membername%> class=FormClass>&nbsp;&nbsp;<font color=<%=Forum_body(8)%>><b>*</b></font><a href=reg.asp>您没有注册?</a> 
          </td>
        </tr>
        <tr>
          <td width=20% class=tablebody1><b>密码</b></td>
          <td width=80% class=tablebody1><input name=passwd type=password value=<%=htmlencode(memberword)%> class=FormClass><font color=<%=Forum_body(8)%>>&nbsp;&nbsp;<b>*</b></font><a href=lostpass.asp>忘记密码?</a></td>
        </tr>
        <tr>
          <td width=20% class=tablebody2><b>主题标题</b>
              <SELECT name=font onchange=DoTitle(this.options[this.selectedIndex].value)>
              <OPTION selected value="">选择话题</OPTION> <OPTION value=[原创]>[原创]</OPTION> 
              <OPTION value=[转帖]>[转帖]</OPTION> <OPTION value=[灌水]>[灌水]</OPTION> 
              <OPTION value=[讨论]>[讨论]</OPTION> <OPTION value=[求助]>[求助]</OPTION> 
              <OPTION value=[推荐]>[推荐]</OPTION> <OPTION value=[公告]>[公告]</OPTION> 
              <OPTION value=[注意]>[注意]</OPTION> <OPTION value=[贴图]>[贴图]</OPTION>
              <OPTION value=[建议]>[建议]</OPTION> <OPTION value=[下载]>[下载]</OPTION>
              <OPTION value=[分享]>[分享]</OPTION></SELECT>

⌨️ 快捷键说明

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