📄 edit.asp
字号:
<!--#include file="Connections.asp" -->
<!--#include file="lockip.asp" -->
<!--#include file="top.asp" -->
<script src=js/addubb.js></SCRIPT>
<% dim errornum
errrornum=0
if isuser=false then response.redirect("login.asp")
l_id=chktopic(request.querystring("l_id"))
t_id=chktopic(request.querystring("t_id"))
if l_id="" or t_id="" then
errornum=1
errormsg="<li>很抱歉,参数错误,请从论坛首页正确登陆</li>"
end if
if errornum=0 then
sql_reply= "select l_id,t_sign,t_id,t_email,t_title,t_content,t_lockubb,t_lock,t_username from topic where t_id="&t_id&""
set rs_topic=conn.Execute (sql_reply)
if rs_topic.eof then
errornum=1
errormsg=errormsg&"<li>很抱歉,此帖已经不存在,可能已经被删除,如果有什么问题,请跟管理员联系</li>"
elseif rs_topic("t_lock")=2 then
errornum=1
errormsg="<li>很抱歉,此主题已经移到回收站,不允许修改</li>"
end if
end if
if errornum=0 then
isbanzhu=false
sql="select l_password,l_access,l_banzhu from lanmu where l_id="&rs_topic("l_id")&""
set rs=conn.execute(sql)
if not rs.eof then
l_banzhu=rs("l_banzhu")
if issupermaster=false and ismaster=false then
if not isnull(l_banzhu) and l_banzhu<>"" and isuser and isbordermaster then
if instr(l_banzhu,cpbusername)>0 then
isbanzhu=true'获得斑竹的身份
end if
end if
'此段检查是否为加密区
if isbanzhu=false then
if rs("l_password")<>"" and session("fy_lpassword")<>rs("l_password") then response.redirect"login.asp?action=password&l_id="&l_id&""
if rs("l_access")=2 and isbordermaster=false then
errornum=1
errormsg="<Li>很抱歉,您没有权限进入,只有版主和总版主才可以操作</li>"
elseif rs("l_access")=1 and isuser=false then
errornum=1
errormsg="<Li>很抱歉,您没有权限进入,只有注册用户才可以操作</Li>"
elseif rs("l_access")=4 and isvipuser=false and isbordermaster=false then
errornum=1
errormsg="<Li>很抱歉,您没有权限进入,只有认证用户才可以操作</Li>"
elseif rs("l_access")=3 and issupermaster=false then
errornum=1
errormsg="<Li>很抱歉,只读论坛只有管理员和总斑竹或者该版块斑竹才可以操作</Li>"
end if
if rs_topic("t_username")<>cpbusername then
errornum=1
errormsg="<Li>很抱歉,你没有权限操作,请确认你是总版主,或者是该版块的版主,或者是主题原作者</li>"
end if
end if
end if
else
errornum=1
errormsg="<Li>很抱歉,无此论坛!</Li>"
end if
set rschecadmin=nothing
end if
cpbtitle="修改主题"
if errornum=1 then
call toptitle(l_title,cpbtitle)
call head(0,"论坛信息",Request.ServerVariables("HTTP_REFERER"),cpbtitle)
call error(errormsg)
else
sqllanmu="select l_title from lanmu where l_id="&l_id&""
set rslanmu=conn.execute(sqllanmu)
ltitle=rslanmu("l_title")
content=rs_topic("t_content")
content=replace(content,"<br>",chr(13))
content=replace(content," ","")
content=content+chr(13)
cpbtitle="修改主题:"&htmlencode(rs_topic("t_title"))
call toptitle(l_title,cpbtitle)
call head(0,"论坛信息",Request.ServerVariables("HTTP_REFERER"),cpbtitle)
'取出变量
dim t_size,h_lesstopic,h_signimg,h_flash,h_img,h_ubb,h_html, h_jiami
sql="select t_size,h_lesstopic,h_signimg,h_flash,h_img,h_ubb,h_html, h_jiami from home"
set rsconn1=conn.execute(sql)
if not rsconn1.eof then
t_size=rsconn1("t_size")
h_lesstopic=rsconn1("h_lesstopic")'最少发表字节
h_signimg=rsconn1("h_signimg")'显示签名图片
h_flash=rsconn1("h_flash")'显示flash
h_img=rsconn1("h_img")'显示图片
h_ubb=rsconn1("h_ubb")'显示ubb
h_html=rsconn1("h_html")'显示html
h_jiami=rsconn1("h_jiami")'禁止加密内容字段
end if
set rsconn1=nothing
%>
<table border=0 cellpadding=0 cellspacing=0 width="<%=tdc3%>" align="center">
<form ACTION="postfo.asp?action=edit&l_id=<%=l_id%>&t_id=<%=t_id%>" METHOD="POST" name="form1" onkeydown='up()'> <tr>
<td >
<table border=1 borderColor=<%=tdc2%> cellPadding=1 cellSpacing=0 width=100% style="border-collapse: collapse">
<tr>
<td align=right height="22" <%=tColor%> class=tdc1 colspan="2">
<p align="center"> 修改主题“<%=htmlencode(rs_topic("t_title"))%>”</td>
</tr>
<tr>
<td align=right bgcolor=<%=tcolor2%>
class=tdc width="15%" >主题:</td>
<td bgcolor=<%=tcolor2%>
class=tdc > <input name=f3_motif size=60 class="bdtj3" type=text value=<%=htmlencode(rs_topic("t_title"))%> >
</td>
</tr>
<tr>
<td valign=top align=right bgcolor=<%=tcolor2%>
class=tdc>当前心情: </td>
<td bgcolor=<%=tcolor2%>
class=tdc >
<%
Response.Write "<INPUT type=radio value=icon/1.gif name=f3_face checked><img src=""icon/1.gif""> "
for i = 2 to 14
if i =8 then Response.Write "<br> "
Response.Write "<INPUT type=radio name=f3_face value=icon/" & i & ".gif ><img src=""icon/" & i & ".gif""> "
next
%> </td>
</tr>
<tr>
<td valign=top NOWRAP align=right bgcolor=<%=tcolor2%>
class=tdc>UBB格式:</td>
<td valign=top bgcolor=<%=tcolor2%>
class=tdc >
<table border=0 cellpadding=0 cellspacing=0 >
<tbody>
<tr>
<td bgcolor=<%=tcolor2%>
class=tdc> <!--#include file="fbb.asp"--></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign=top NOWRAP align=right bgcolor=<%=tcolor2%>
class=tdc><b>内容:</b><br><li>HTML 标签:<%if h_html=1 then%><b>可用</b><%else%><b>禁止</b><%end if%>
<li>IMG 标签:<%if h_img=0 then%><b>可用</b><%else%><b>禁止</b><%end if%>
<li>FLASH标签:<%if h_flash=0 then%><b>可用</b><%else%><b>禁止</b><%end if%>
<li>UBB 标签:<%if h_ubb=0 then%><b>可用</b><%else%><b>禁止</b><%end if%>
<li>上传 文件:<%if lockupload=0 then%><b>开通</b><%else%><b>禁止</b><%end if%>
<li>加密 内容:<%if h_jiami=0 then%><b>允许</b><%else%><b>禁止</b><%end if%>
<br> <b>加密内容</b>
<li><a href="javascript:replyview()" title=该部分内容回复后可见>回复帖</a>
<BR>
<li><a href="javascript:login()" title="该部分内容需要登陆后可见">登陆帖</a>
<BR>
<li><a href="javascript:fen()" title=浏览该部分内容需要经验数>经验帖</a>
<BR>
<li><a href="javascript:send()" title=浏览该部分内容需要发表文章数>文章帖</a>
<BR>
<li><a href="javascript:beauty()" title=浏览该部分内容需要魅力数>魅力帖</a>
<BR>
<li><a href="javascript:money()" title=浏览该部分内容需要金钱数>金钱帖</a>
<BR>
<li><a href="javascript:weiwang()" title=浏览该部分内容需要威望值>威望帖</a>
<BR>
<li><a href="javascript:buy()" title=该部分内容需要出售多少大洋>买卖帖</a></td>
<td valign=top bgcolor=<%=tcolor2%>
class=tdc >
<textarea name=f3_content rows=10 cols=80 wrap=VIRTUAL class="bdtj3" ><%=content%></textarea>
<br>
<input type="checkbox" name="t_email" value="1" <%if instr(rs_topic("t_email"),cpbusername)>0 then response.write("checked")%>>
有回复时用论坛短信通知我(若不需要你也可以编辑本文来取消短信通知) <BR>
<input type="checkbox" name="t_autourl" value="1" checked>
自动URL分析<br>
<input type="checkbox" name="t_lockubb" value="1" <%if rs_topic("t_lockubb")=1 then response.write("checked")%>> 禁止ubb转换
<br>
<input type="checkbox" name="t_sign" value="0" <%if rs_topic("t_sign")<>1 then response.write("checked")%>> 显示个性签名
</td>
</td> </tr>
<tr>
<td valign=top NOWRAP align=right bgcolor=<%=tcolor2%>
class=tdc>心情图标:</td>
<td valign=top bgcolor=<%=tcolor2%>
class=tdc>
<%
for i = 1 to cpbbq
Response.Write "<img src=""emot/em" & i & ".gif"" onClick=""setsmiley('em" & i &":')""> "
if i mod 21=20 then response.write("<br>")
next
%>
←点击插入心情符
</td>
</tr>
<input type="hidden" name=ip value="<% = o_ip %>">
<tr> <input type="hidden" name="sendtopic" value="true">
<td valign=top align=right bgcolor=<%=tcolor2%>
class=tdc> </td>
<td valign=top bgcolor=<%=tcolor2%>
class=tdc > <input type="submit" name="Submit" value="确 认" class=bdtj OnClick="this.disabled=true;document.form1.submit();"> <input type=button value='预 览' name=Button onclick=view() class=bdtj>
<input type="reset" name="Submit2" value="清 空" class=bdtj>[按CTRL+ENTER 直接发表] 帖子长度:<input name="Len" value="0" readonly size="8" class="bdtj" > 最大为: <%=t_size%> 字节;最小为: <%=h_lesstopic%> 字节
</td>
</tr>
</table>
</td>
</tr></form>
<form name=preview action=view.asp method=post target=view>
<input type=hidden name=title value=><input type=hidden name=content value=>
</form>
</table>
<%set rs_topic=nothing
end if%><!--#include file="bq.asp" --></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -