?? retopic.asp
字號(hào):
<!-- #include file="setup.asp" -->
<%
forumid=Request("forumid")
if isnumeric(""&forumid&"") = flase then
error("<li>非法操作")
end if
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
if Request.ServerVariables("request_method") = "POST" then
if instr(Request.ServerVariables("http_referer"),""&Request.ServerVariables("server_name")&"") = 0 then
error("<li>來(lái)源錯(cuò)誤")
end if
username=Trim(Request("username"))
userpass=Trim(Request("userpass"))
id=Request("id")
forumid=Request("forumid")
content=server.htmlencode(Trim(Request("content")))
if Request("htmlcode")<>"1" then
content=replace(content,vbCrlf,"<br>")
end if
if instr(username," ")>0 then:error("<li>非法操作"):end if
if DateDiff("s",session("make"),Now())<30 then
message=message&"<li>為防止有人用程序灌水,本BBS限制一個(gè)人兩次發(fā)帖間隔必須大于30秒!<li>請(qǐng)等待 <font color=red><b><span id=yu>30</span><a href=javascript:countDown></a></b></font> 秒后系統(tǒng)自動(dòng)刷新<meta http-equiv=refresh content=30;url=javascript:location.reload()><script>function countDown(secs){yu.innerText=secs;if(--secs>0)setTimeout('countDown('+secs+')',1000);}countDown(30);</script>"
end if
if username="" then
message=message&"<li>用戶名沒(méi)有填寫(xiě)"
end if
if userpass="" then
message=message&"<li>密碼沒(méi)有填寫(xiě)"
end if
if content="" then
message=message&"<li>內(nèi)容沒(méi)有填寫(xiě)"
end if
filtrate=split(badwords,"|")
for i = 0 to ubound(filtrate)
content=replace(content,""&filtrate(i)&"","****")
next
''''''''''''''''''''
%>
<!-- #include file="inc/ybbcode.asp" -->
<%
smilies(content)
if Request("ybbcode")="" then
if ybbimg = "False" then
content=replace(content,"[IMG]","[URL]")
content=replace(content,"[/IMG]","[/URL]")
end if
if ybbflash = "False" then
content=replace(content,"[FLASH]","[URL]")
content=replace(content,"[/FLASH]","[/URL]")
end if
content = ybbcode(content)
end if
''''''''''''''''''''
if Request("htmlcode")="1" then
content="<TEXTAREA cols=75 rows=6>"&content&"</TEXTAREA><br><INPUT onclick=runEx() type=button value=運(yùn)行此代碼>"
end if
if Len(content)>50000 then
message=message&"<li>文章內(nèi)容不能大于 50000 字節(jié)"
end if
if conn.execute("Select count(id)from bbsconfig where id="&forumid&"")(0)=0 then
message=message&"<li>數(shù)據(jù)庫(kù)中不存在ID為 "&forumid&" 的論壇數(shù)據(jù)"
end if
if conn.execute("Select count(id)from forum where ID="&ID&" and forumid="&forumid&" and locktopic=1")(0)=1 then
message=message&"<li>此主題已經(jīng)關(guān)閉,不接受新的回復(fù)"
end if
if message<>"" then
error(""&message&"")
end if
sql="select * from user where username='"&username&"'"
rs.Open sql,Conn,1,3
if rs.eof then
message=message&"<li>此用戶名還未<a href=register.asp?username="&username&">注冊(cè)</a>"
error(""&message&"")
end if
if userpass<>rs("userpass") then
message=message&"<li>您的密碼錯(cuò)誤"
end if
if rs("userlife")<5 then
message=message&"<li>您的體力值 < <FONT color=red>5</FONT> 不能發(fā)表文章<li>您可以到<A href=shop.asp>社區(qū)商店</A>購(gòu)買(mǎi)體力藥丸<li>每有效停留時(shí)間<FONT color=red> 10 </FONT>分鐘:體力值:<FONT color=red>+10</FONT>"
end if
if rs("experience")<1 then
message=message&"<li>您的經(jīng)驗(yàn)值 < <FONT color=red>1</FONT> 不能發(fā)表文章<li>您可以到<A href=shop.asp>社區(qū)商店</A>購(gòu)買(mǎi)經(jīng)驗(yàn)藥丸<li>每有效停留時(shí)間<FONT color=red> 10 </FONT>分鐘:經(jīng)驗(yàn)值: <FONT color=red>+1</FONT>"
end if
if rs("membercode")=0 then
message=message&"<li>您被關(guān)進(jìn)<a href=prison.asp>監(jiān)獄</a>"
end if
if message<>"" then
error(""&message&"")
end if
if rs("membercode")<2 then
experience=rs("experience")
%>
<!-- #include file="inc/level.asp" -->
<%
rs("userlife")=rs("userlife")-2
rs("levelname")=levelname
rs("levelimage")=levelimage
end if
rs("landtime")=now
rs("postrevert")=rs("postrevert")+1
rs("money")=rs("money")+2
rs("experience")=rs("experience")+2
rs.update
rs.close
rs.Open "reforum",conn,1,3
rs.addnew
rs("forumid")=forumid
rs("username")=username
rs("content")=content
rs("postip")=remoteaddr
rs("topicid")=id
rs.update
rs.close
conn.execute("update [forum] set lastname='"&username&"',replies=replies+1,lasttime=now where ID="&ID&" and forumid="&forumid&"")
conn.execute("update [bbsconfig] set lastname='"&username&"',tolrestore=tolrestore+1 where id="&forumid&"")
session("make")=now
succtitle="回復(fù)主題成功"
message=message&"<li><a href=showtopic.asp?id="&id&"&forumid="&forumid&">返回主題</a><li><a href=forumdisplay.asp?forumid="&forumid&">返回論壇</a><li><a href=index.asp>返回論壇首頁(yè)</a>"
succeed(""&message&"<meta http-equiv=refresh content=3;url=forumdisplay.asp?forumid="&forumid&">")
end if
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
if Request.Cookies("username")="" then
error("<li>您還還未<a href=login.asp>登陸</a>社區(qū)")
end if
sql="select * from bbsconfig where id="&forumid&""
rs.Open sql,Conn
top
%>
<title>回復(fù)文章</title>
<CENTER>
<table width="750" align="center" border="0">
<tr>
<td vAlign="top" width="30%"><img src="images/logo.gif" border="0"></td>
<td vAlign="center" align="top"> <img src="images/closedfold.gif" border="0"> <a href="index.asp"><%=clubname%></a><br>
<img src="images/bar.gif" border="0"><img src="images/closedfold.gif" border="0"> <a href="forumdisplay.asp?forumid=<%=forumid%>"><%=rs("bbsname")%></a><br>
<%
rs.close
if Request("retopicid")<>"" then
sql="select * from reforum where id="&Request("retopicid")&""
rs.Open sql,Conn
else
sql="select * from forum where ID="&Request("id")&" and forumid="&Request("forumid")&""
rs.Open sql,Conn
end if
if Request("quote")=1 then
content =rs("content")
quote="[quote]原文由 [B]"&rs("username")&"[/B] 發(fā)表:"&vbCrlf&""&content&"[/quote]"
end if
%>
<img src="images/bar.gif" border="0"><img src="images/openfold.gif" border="0"> <a href="showtopic.asp?forumid=<%=forumid%>&id=<%=Request("id")%>">Re:<%=Request("topic")%></a></td>
</tr>
</table>
<br>
<TABLE cellSpacing=0 cellPadding=5 width=670 border=1 bordercolor="#A4B6D7" style="border-collapse: collapse">
<form method=post name=form onsubmit="return ValidateForm()">
<input type=hidden name=id value=<%=Request("id")%>>
<input type=hidden name=forumid value=<%=Request("forumid")%>>
<TBODY>
<TR>
<TD id=titlelarge vAlign=left background=images/title_sub.gif colSpan=4 height=25 width="618"><b><font color="#FFFFFF">回復(fù)文章</font></b></TD></TR>
<TR>
<TD width=126 bgColor=F2F8FF height=25><B>用戶名稱(chēng)</B></TD>
<TD width=184 bgColor=F2F8FF height=25>
<INPUT
maxLength=20 size=15 value="<%=Request.Cookies("username")%>" name=username></TD>
<TD width=91 bgColor=F2F8FF height=25><B>您的密碼</B></TD>
<TD width=184 bgColor=F2F8FF height=25>
<INPUT type=password size=15 value="<%=Request.Cookies("userpass")%>" name=userpass></TD></TR>
<TR>
<TD vAlign=top width=126 bgColor=ECF5FF rowSpan=2>
<TABLE cellSpacing=0 cellPadding=0 width=97 align=left bgColor=f8f8f8
border=0>
<TBODY>
<TR>
<TD vAlign=top align=left width=125 bgcolor="#ECF5FF"><B>文章內(nèi)容</B><BR>(<a href="javascript:CheckLength();">查看內(nèi)容長(zhǎng)度</a>)<BR><BR></TD></TR>
<TR>
<TD vAlign=center align=left width=125 bgcolor="#ECF5FF">
<TABLE
style="BORDER-RIGHT: 1px inset; BORDER-TOP: 1px inset; BORDER-LEFT: 1px inset; WIDTH: 125px; BORDER-BOTTOM: 1px inset"
cellSpacing=1 cellPadding=3 align=left bgColor=f0f0f0 border=0>
<TBODY>
<TR align=middle>
<TD><A href="javascript:emoticon('/:)')"><IMG alt=笑臉
src="images/brow/regular_smile.gif" border=0></A></TD>
<TD><A href="javascript:emoticon('/:d')"><IMG alt=開(kāi)口笑臉
src="images/brow/teeth_smile.gif" border=0></A></TD>
<TD><A href="javascript:emoticon('/:o')">
<IMG alt="驚訝的笑臉"
src="images/brow/omg_smile.gif" border=0></A></TD></TR>
<TR align=middle>
<TD><A href="javascript:emoticon('/:p')">
<IMG alt=吐舌笑臉
src="images/brow/tounge_smile.gif" border=0></A></TD>
<TD><A href="javascript:emoticon('/;)')"><IMG alt=眨眼微笑
src="images/brow/wink_smile.gif" border=0></A></TD>
<TD><A href="javascript:emoticon('/:(')">
<IMG alt=難過(guò)的臉
src="images/brow/sad_smile.gif" border=0></A></TD></TR>
<TR align=middle>
<TD><A href="javascript:emoticon('/:s')">
<IMG alt=困惑的笑臉
src="images/brow/confused_smile.gif" border=0></A></TD>
<TD><A href="javascript:emoticon('/:|')">
<IMG alt=失望的臉
src="images/brow/whatchutalkingabout_smile.gif"
border=0></A></TD>
<TD><a href="javascript:emoticon('/:$')">
<IMG alt=尷尬的笑臉
src="images/brow/embaressed_smile.gif"
border=0></a></TD></TR></TBODY></TABLE>
<TR>
<TD bgcolor="#ECF5FF"><br><BR><span id=ybb>YBB 代碼: True<BR>表情字符: True<BR>[IMG]代碼:<%=ybbimg%><BR>[FLASH]代碼:<%=ybbflash%></span>
<script>
ybb.innerText=replace(ybb.innerText)
function replace(temp) {
temp = temp.replace(/True/ig,"支持");
temp = temp.replace(/False/ig,"禁止");
return (temp);
}
</script></TD></TR></TD></TR></TBODY></TABLE></TD>
<SCRIPT src="images/post.js"></SCRIPT>
<SCRIPT src="images/ybbcode.js"></SCRIPT>
<SCRIPT src="images/unybb.js"></SCRIPT>
<TD width=481 bgColor=ECF5FF colSpan=3><INPUT title="加粗: [Alt] + b" style="FONT-WEIGHT: bold" accessKey=b onclick=YBBCbold() type=button value=" B " name=bold>
<INPUT title="傾斜: [Alt] + i" style="FONT-STYLE: italic" accessKey=i onclick=YBBCitalic() type=button value=" I " name=italic>
<INPUT title="下劃線: [Alt] + u" style="TEXT-DECORATION: underline" accessKey=u onclick=YBBCunder() type=button value=" U " name=under>
<INPUT title="超鏈接: [Alt] + h" style="COLOR: blue; TEXT-DECORATION: underline" accessKey=h onclick=YBBCurl() type=button value=" http:// "> <INPUT title="EMAIL: [Alt] + e" style="COLOR: blue; TEXT-DECORATION: underline" accessKey=e onclick=YBBCemail() type=button value=" @ ">
<INPUT title="圖片: [Alt] + p" accessKey=p onclick=YBBCimage() type=button value=" 圖片 ">
<INPUT title="引用: [Alt] + q" accessKey=q onclick=YBBCquote() type=button value=" 引用 " name=quote>
<INPUT title="FLASH: [Alt] + f" accessKey=f onclick=YBBCflash() type=button value=" FLASH " name=flash>
<br><font color=333333>顏色:</font>
<select onchange=COLOR(this.options[this.selectedIndex].value)>
<option style=COLOR:000000;BACKGROUND-COLOR:000000 value=000000>黑色</option>
<option style=COLOR:FFFFFF;BACKGROUND-COLOR:FFFFFF value=FFFFFF>白色</option>
<option style=COLOR:008000;BACKGROUND-COLOR:008000 value=008000>綠色</option>
<option style=COLOR:800000;BACKGROUND-COLOR:800000 value=800000>褐色</option>
<option style=COLOR:808000;BACKGROUND-COLOR:808000 value=808000>橄欖色</option>
<option style=COLOR:000080;BACKGROUND-COLOR:000080 value=000080>深藍(lán)色</option>
<option style=COLOR:800080;BACKGROUND-COLOR:800080 value=800080>紫色</option>
<option style=COLOR:808080;BACKGROUND-COLOR:808080 value=808080>灰色</option>
<option style=COLOR:FFFF00;BACKGROUND-COLOR:FFFF00 value=FFFF00>黃色</option>
<option style=COLOR:00FF00;BACKGROUND-COLOR:00FF00 value=00FF00>淺綠色</option>
<option style=COLOR:00FFFF;BACKGROUND-COLOR:00FFFF value=00FFFF>淺藍(lán)色</option>
<option style=COLOR:FF00FF;BACKGROUND-COLOR:FF00FF value=FF00FF>粉紅色</option>
<option style=COLOR:C0C0C0;BACKGROUND-COLOR:C0C0C0 value=C0C0C0>銀白色</option>
<option style=COLOR:FF0000;BACKGROUND-COLOR:FF0000 value=FF0000>紅色</option>
<option style=COLOR:0000FF;BACKGROUND-COLOR:0000FF value=0000FF>藍(lán)色</option>
<option style=COLOR:008080;BACKGROUND-COLOR:008080 value=008080>藍(lán)綠色</option>
</select>
<font color=333333>字體:</font>
<select onchange=ybbfont(this.options[this.selectedIndex].value)>
<option value="宋體" selected>宋體</option>
<option value="黑體">黑體</option>
<option value="隸書(shū)">隸書(shū)</option>
<option value="幼圓">幼圓</option>
<option value="楷體_GB2312">楷體_GB2312</option>
<OPTION value=Verdana>Verdana</OPTION>
<OPTION value="Arial Black">Arial Black</OPTION>
<OPTION value="Courier New">Courier New</OPTION>
<OPTION value="Lucida Console">Lucida Console</OPTION>
<OPTION value="Times New Roman" >Times New Roman</OPTION>
<OPTION value="Webdings">Webdings</OPTION>
<OPTION value="Wingdings">Wingdings</OPTION>
</SELECT>
<font color=333333>字體大?。?lt;/font>
<select onchange=ybbsize(this.options[this.selectedIndex].value)>
<OPTION value=1>1</OPTION>
<OPTION value=2>2</OPTION>
<OPTION value=3>3</OPTION>
<OPTION value=4>4</OPTION>
<OPTION value=5>5</OPTION>
<OPTION value=6>6</OPTION>
<OPTION value=7>7</OPTION>
</SELECT>
</TD></TR>
<TR>
<TD width=481 bgColor=ECF5FF colSpan=3 align="center">
<TEXTAREA onkeydown=presskey(); name=content rows=10 cols=70><%=quote%></TEXTAREA><br>
『 <a href="javascript:replac()">替換文本</a> 』 『
<a href="javascript:HighlightAll('form.content')">復(fù)制到剪貼板</a> 』</TD></TR>
<TR>
<TD align=left bgColor=C4D4E5 background="images/title_sub.gif"><font color="#FFFFFF"><b>選項(xiàng)</b></font></TD>
<TD align=left bgColor=C4D4E5 colSpan=3 background="images/title_sub.gif"><font color="#FFFFFF"><b><IFRAME src="upfile.asp" frameBorder=0 width="100%" scrolling=no height=21></IFRAME></b></font></TD></TR>
<TR>
<TD vAlign=top width=126 bgColor=F2F8FF height=30></TD>
<TD width=481 bgColor=F2F8FF colSpan=3 height=30>
<INPUT
type=checkbox value=1 name=htmlcode> HTML代碼<BR><INPUT type=checkbox value=1
name=ybbcode> 禁止YBB代碼</A><BR><INPUT
type=checkbox value=1 name=smilies> 禁止表情字符</A> </TD></TR>
<TR>
<TD align=middle bgColor=ECF5FF colSpan=4 height=27 width="618"><INPUT tabIndex=4 type=submit value=回復(fù)主題 name=submit1> <INPUT type=reset onclick="{if(confirm('該項(xiàng)操作要清除全部的內(nèi)容,您確定要清除嗎?')){return true;}return false;}" value=" 重 寫(xiě) "></TD></TR></TBODY></TABLE></FORM>
<Script>
document.form.content.focus();
function delquote(temp) {
temp = temp.replace(/<BLOCKQUOTE>(.[^\[]*)<\/BLOCKQUOTE>/ig,"");
return (temp);
}
temp=delquote(document.form.content.value);
document.form.content.value = unybbcode(temp);
</Script>
<%
rs.close
htmlend
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -