hfedit.asp
来自「安全性好,适用于制作论坛和进行资源下载的个人和大型网站使用!」· ASP 代码 · 共 127 行
ASP
127 行
<!--#include file="inc/pstart.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="inc/incpage.asp"-->
<!--#include file="inc/bbsinfo.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<!--#include file="inc/showaud.asp"-->
<%
call checkulogin()
call checkhmd()
start="编辑回贴"
call checkdisp()
call bbs_top()
dim id,aid
id=request.querystring("id")
aid=clng(request.querystring("aid"))
if not IsNumeric(id) or id="" then
call showmsg("参数非法,指定的主题并不存在")
else
id=clng(id)
end if
set rs=server.CreateObject("adodb.recordset")
sqlstr="select * from hx66_saybbs where id="&id
rs.open sqlstr,conn,1,1
if rs.eof then showmsg("没有找到指定的主题")
hx66close=rs("hx66_close")
hx66_time=rs("hx66_time")
hx66_iid=clng(rs("hx66_iid"))
set RelationArt = conn.execute("select hx66_bid from hx66_bbs where id="&hx66_iid&"")
bid=RelationArt(0)
Set RelationArt=Nothing
if username<>""&rs("hx66_user")&"" and checkbbsadmin(bid)=0 and checkadmin(ckuname)<3 then
response.write"<SCRIPT language=JavaScript>alert(' 你没有权限编辑别人的回复贴子!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
if useubase=1 and DateDiff("h",hx66_time,now())>=1 and checkbbsadmin(bid)=0 and checkadmin(ckuname)<3 then
response.write"<SCRIPT language=JavaScript>alert(' 贴子已超过允许编辑时间,你将不能进行此操作!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
if hx66close=1 then
response.write"<SCRIPT language=JavaScript>alert(' 本贴已被屏蔽不能进行此操作,请 返 回 !');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
%>
<table class="table-hx66s" cellSpacing="0" cellPadding="0" width="760" align="center" border="0" bgcolor=#FFFFFF>
<TR>
<TD>
<%
if rs("hx66_html")=1 then
%>
<script language="javascript">
function edit1(){
IframeID.document.body.innerHTML=document.all("body").value;
document.all("body").value="";}
function chk(){
document.all("body").value=IframeID.document.body.innerHTML;
if(document.form.title.value==""){
alert("主题不能为空");
document.form.title.focus();
return false;}
if(IframeID.document.body.innerHTML==""){
alert("内容不能为空");
IframeID.document.body.focus();
return false;}
return true;}
</Script>
<body onload="return edit1();">
<table bgcolor="#ffffff" borderColor="#698cc3" Border="1" Cellspacing="0" Cellpadding="0" width="740" align="Center" style="border-collapse: collapse">
<TBODY>
<FORM name=FrontPage_Form1 id="form" onsubmit="return chk();" action="bbs_edit.asp?type=hf&aid=<%=aid%>&bid=<%=bid%>&id=<%=id%>" method=post>
<tr>
<td width="60%" align="center" colSpan=2 height=30><b><%=username%></b> 在此编辑修改回贴</td>
</tr>
<tr>
<TD width=20% height=30 vAlign=top>
<FONT color=#cc6600> HTML编辑模式<BR> 内 容:</FONT><BR><FONT color=#b70000> <B>·</B></FONT>HTML√<BR><FONT color=#b70000> <B>·</B></FONT>UBB ×<BR><FONT color=#cc6600> 特殊内容</FONT><BR><FONT color=#b70000> <B>·</B></FONT>HTML状态禁用特殊功能</TD>
<TD width=80%><!--#include file="inc/gethtml.asp" --><script language="JavaScript" src="inc/code.js"></script>
<textarea name="body" cols="50" rows="50" id="content" style="display:none"><%=Server.HtmlEncode(rs("hx66_text"))%></textarea>
</td>
</tr>
<TR>
<TD colSpan=2 height=50>
<DIV align="center"><input type="submit" value="编辑修改" name="Submit"> <a href="<%=Request.ServerVariables("HTTP_REFERER")%>"><img src="images/back.gif" border="0"></a></DIV></TD></TR></form>
</TBODY></TABLE>
<%
else
%>
<table bgcolor="#ffffff" borderColor="#698cc3" Border="1" Cellspacing="0" Cellpadding="0" width="740" align="Center" style="border-collapse: collapse">
<TBODY>
<FORM name=FrontPage_Form1 onsubmit="return FrontPage_Form1_Validator(this)" action="bbs_edit.asp?type=hf&aid=<%=aid%>&bid=<%=bid%>&id=<%=id%>" method=post>
<TR>
<td width="60%" align="center" colSpan=2 height=30><b><%=username%></b> 在此编辑修改回贴</td>
</TR>
<TR>
<TD width=20% height=30> <FONT color=#cc6600>文件上传:</FONT><BR><FONT color=#b70000> <B>·</B></FONT>上传1文件需20积分</TD><TD width=80%><%if checknum(canupload)=1 or checkadmin(ckuname)>=3 then%><IFRAME name=ad src="upload.asp" frameBorder=0 width="100%" scrolling=no height=28></IFRAME><%else%> 上传文件功能已被管理员关闭<%end if%></td>
</TR>
<TR>
<TD width=20% height=30>
<FONT color=#cc6600> 字体字色:<BR> UBB 标签:</FONT></TD> <TD width=80%><!--#include file="inc/getubb.asp" --> <script language="JavaScript" src="inc/code.js"></script>
</td>
</TR>
<TR>
<TD vAlign=top width=20% height=30>
<P><FONT color=#cc6600> 内 容:</FONT><BR><FONT color=#b70000> <B>·</B></FONT>HTML×<BR><FONT color=#b70000> <B>·</B></FONT>UBB √</P><P> <FONT color=#cc6600>特殊内容</FONT><BR><FONT color=#b70000> <B>·</B></FONT><font title="内容只有版主可见" style="CURSOR: hand" onclick="FontType('[MASTER]','[/MASTER]')">悄悄话</font><BR><FONT color=#b70000> <B>·</B></FONT><font title="内容加锁,查看需要口令" style="CURSOR: hand" onclick="LockPassd()">密码锁</font><BR><font title="内容回复可见" style="CURSOR: hand" onclick="FontType('[showtoreply]','[/showtoreply]')"><FONT color=#b70000> <B>·</B></FONT>回复贴</font></P></TD>
<TD width=80%> <textarea name="body" rows="15" cols="74" class="input" id="Content" onkeydown=ctlent() title="可以使用Ctrl+Enter直接提交贴子"><%=rs("hx66_text")%></textarea>
</TD></TR>
<!--#include file="inc/bqimg.asp" -->
<TR>
<TD colSpan=2 height=50>
<DIV align="center"><input type="submit" value="编辑修改" name="Submit"> [可用Ctrl+Enter直接提交贴子] <a href="<%=Request.ServerVariables("HTTP_REFERER")%>"><img src="images/back.gif" border="0"></a></DIV></TD></TR></form>
</TBODY></TABLE>
<%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%><BR>
</TD>
</TR>
</TABLE>
<%call bbs_foot()%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?