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

📄 say.asp

📁 本程序蓝本为6kbbs 默认前台管理员的帐号是:woodcoal
💻 ASP
字号:
<!--#include file="up.asp"-->
<%if isnull(lguserid) or lguserid="" then Response.Redirect"login.asp"

if checknum(session(prefix&"usertype2"))=1 or checknum(session(prefix&"usertype2"))=3 then
	tl=""
	mes="<b>对不起,你不能发帖。</b><br>·你被管理员禁止发言。"
	call sendinfo(tl,mes)
	call down
	response.end
end if

set rs=conn.execute("select grade from [user] where userid="&lguserid&"")
dim quoteid,topictype,postto,topic,sets,bid,content
session(prefix&"uploadingnum")=0

function ubbs(str)
	dim re,restr
	Set re=new RegExp
	re.IgnoreCase=true
	re.Global=True
	restr="[color=808080]…… 加密内容不能引用 ……[/color]"
	re.Pattern="(\[showdate=(.[^\[]*)\])((.|\n)+?)(\[\/s\])"
	str=re.Replace(str,restr)

	re.Pattern="(\[showtoname=(.[^\[]*)\])((.|\n)+?)(\[\/s\])"
	str=re.Replace(str,restr)	

	re.Pattern="(\[showtoreply\])((.|\n)+?)(\[\/s\])"
	str=re.Replace(str,restr)	

	re.Pattern="(\[slogin\])((.|\n)+?)(\[\/s\])"
	str=re.Replace(str,restr)	


	re.Pattern="(\[showtograde=*([0-9]*)\])((.|\n)+?)(\[\/s\])"
	str=re.Replace(str,restr)


	re.Pattern="(\[smark=*([0-9]*)\])((.|\n)+?)(\[\/s\])"
	str=re.Replace(str,restr)
	str = replace(str, ">", "&gt;")
	str = replace(str, "<", "&lt;")

	set re=Nothing
	ubbs=str
end function

checklg()%>

<script language="JavaScript" src="inc/ybbcode.js"></script>

<%quoteid=checknum(request.querystring("quoteid"))
topictype=checknum(request.querystring("topictype"))
bid=checknum(request.querystring("bid"))

if topictype=1 then
	postto="savetopic.asp?bd="&bd&"&topictype=1"
	topic=""%>
	
	<script language="JavaScript">
	<!--
		function showvote() {
			if (document.topic.voteyn.checked == true) {
				vote.style.display = "";
			}else{
				vote.style.display = "none";
			}
		}
		
		function openwin() {
			document.form1.topic.value=document.topic.topic.value;
			document.form1.content.value=document.topic.content.value;
			var popupWin = window.open("paper.asp?action=preview", "showgg", "width=500,height=400,resizable=1,scrollbars=yes,menubar=no,status=yes");
			document.form1.submit()
		}
	//-->
	</script>

<%elseif topictype=2 then
	postto="savetopic.asp?bd="&bd&"&bid="&bid&"&topictype=2&totable="&totable&""
	topic="回复ID:"&bid&""
end if%>

<script language="JavaScript">
<!--
	function emoticon(theSmilie) {
		document.topic.content.value +=theSmilie + '';
		document.topic.content.focus();
	}
	
	function presskey(eventobject) {
		if(event.ctrlKey && window.event.keyCode==13){this.document.topic.submit();}else{return false}
	}
//-->
</script>


<form name="topic" method="POST" action="<%=postto%>">
<%=ttop%>

<table align="center" class="BBS_BoardList" cellpadding="0" cellspacing="1">
	<tr><td colspan="2"><h1><img src="pic/gl.gif" border="0" align="absmiddle" /> 发表帖子</h1></td></tr>
	<tr>
		<td>
			<b>帖子主题:</b>
			<select name="font" onchange="DoTitle(this.options[this.selectedIndex].value)" style="font-size: 9pt">
				<option selected="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>
			</select>
		</td>
		<td><input type="text" name="topic" size="80" maxlength="50" value="<%=topic%>" /></td>
	</tr>
	<tr>
		<td><b>你的表情:</b><br />·放在帖子前面。</td>
		<td>
			<script language="JavaScript" type="text/javascript">
				index = Math.floor(Math.random()*17+1);
				for(i=1;i<=18;i=i+1) {
					if (i==10) {
						document.write("<p style='margin-top: 2; margin-bottom: 2'>")
					}
					if (i==index) {
						document.write("<input type=radio value=face"+i+" name=face checked><img border=0 src=images/face/face"+i+".gif width=20 height=20>")
					} else {
						document.write("<input type=radio value=face"+i+" name=face><img border=0 src=images/face/face"+i+".gif width=20 height=20>")
					}
				}
			</script>
		</td>
	</tr>

<%if checknum(application(prefix&"canupload"))=1 then%>
	<tr>
		<td><b>文件上传:</b></td>
		<td>
		<%if rs("grade")>=checknum(bbsinfo(22)) then%>
			<iframe src="upload.asp" name="ad" width="100%" height="25" scrolling="No" frameborder="0" id="ad"></iframe>
		<%else%>
			该项需要等级为 <b><%=kbbs(bbsinfo(22))%></b> 以上的用户才能使用。
		<%end if%>
		</td>
	</tr>
<%end if%>

	<tr>
		<td><b>帖子UBB标签:</b></td>
		<td><%call qian%></td>
	</tr>
	<tr>
		<td>
			<b>帖子特殊内容:</b>
			<%call tie%>
			<li>特 殊 贴:
			<select style="background-color: #ffffff; font-family:宋体; font-size:9pt" onchange="if(this.options[this.selectedindex].value!=''){location=this.options[this.selectedindex].value;this.options[0].selected=true;}" name="sptie">
				<option selected="selected">无</option>
				<option value="javascript:grade()">等级可见</option>
				<option value="javascript:reply()">回复可见</option>
				<option value="javascript:name()">指定读者</option>
				<option value="javascript:smark()">积分可见</option>
				<option value="javascript:showdate()">日期可见</option>
				<option value="javascript:mustlogin()">登陆可见</option>
			</select></li>
			<%if topictype=1 then %>
				<br /><input type="checkbox" onclick="showvote()" name="voteyn" value="1" <%if checknum(request.querystring("vote"))=1 then%>checked<%end if%> />
				显示投票选项
			<%end if%>
		</td>
		<td>
			字体:
			<select onchange="showsize(this.options[this.selectedIndex].value)" name="a" style="font-size: 9pt">
				<option value="宋体" selected="selected">宋体</option>
				<option value="楷体_GB2312">楷体</option>
				<option value="新宋体">新宋体</option>
				<option value="黑体">黑体</option>
				<option value="隶书">隶书</option>
				<option value="Arial">Arial</option>
				<option value="Georgia">Georgia</option>
				<option value="Impact">Impact</option>
				<option value="Tahoma">Tahoma</option>
				<option value="Stencil">Stencil</option>
				<option value="Verdana">Verdana</option>
			</select>
			&nbsp;&nbsp; 字限:
			<input disabled"disabled" maxlength="5" name="total" size="4" value="15000" />
			已写:
			<input disabled"disabled" maxlength="5" name="used" size="4" value="0" />
			剩余:
			<input disabled"disabled" maxlength="5" name="remain" size="4" value="15000" />
			&nbsp;&nbsp;<span style="cursor:hand" onclick="if(content.rows<60)content.rows=content.rows+5;" title="扩大编缉区">[+]</span> <span style="cursor:hand" onclick="if(content.rows>5)content.rows=content.rows-5;" title="缩小编缉区">[-]</span> <span style="cursor:hand" onclick="content.rows=10;" title="恢复编缉区">[=]</span><br />

			<script language="JavaScript" type="text/javascript">
				<!--
				function gbcount(message,total,used,remain)
				{
					var max;
					max = total.value;
					if (message.value.length > max) {
					message.value = message.value.substring(0,max);
					used.value = max;
					remain.value = 0;
					alert("您输入的帖子内容已经超过系统允许的最多15000字!\n请删减部分帖子内容在发表!");
					}
					else {
					used.value = message.value.length;
					remain.value = max - used.value;
					}
				}
				-->
			</script>
			
			<%if quoteid<>"" then
				dim quote,qcontent
				set quote=conn.execute("select top 1 content from bbs"&totable&" where bbsid="&quoteid&"")
				qcontent=quote("content")
				qcontent=split(qcontent,"|")
				set quote=nothing%>
				
				<textarea rows="9" name="content" cols="85" style="font-family: 宋体; font-size: 9pt" onbeforepaste="if(document.getElementById('x_paste').checked){window.clipboardData.setData('content',trans());this.focus();}" onkeydown="presskey();" onkeyup="gbcount(this.form.content,this.form.total,this.form.used,this.form.remain,this.form.parent);">
				<%response.write"[quote][B]以下是引用[i]"&qcontent(2)&"在"&qcontent(5)&"[/i]的发言:[/B]"&chr(10)&ubbs(qcontent(4))&chr(10)&"[/quote]"%>
				
				</textarea>
			<%else%>
				<textarea rows="9" name="content" cols="85" style="font-family: 宋体; font-size: 9pt" onbeforepaste="if(document.getElementById('x_paste').checked){window.clipboardData.setData('content',trans());this.focus();}" onkeydown="presskey();" onkeyup="gbcount(this.form.content,this.form.total,this.form.used,this.form.remain);"></textarea>
			<%end if%>
			
			<div id="MaoDiv" style="position: absolute; width:570px; height:160px; display:none;">
				<iframe id="MView" name="MView" src="about:blank" frameborder="0" scrolling="No" valign="top" width="100%" height="100%"></iframe>
			</div>
			<p></p>
			<iframe id="rtf" style="width: 0px; height: 0px" marginwidth="0" marginheight="0" src="about:blank" scrolling="No"></iframe>
			<script language="JavaScript" type="text/javascript">rtf.document.designMode="On";</script>
		</td>
	</tr>
	<tr id="vote" style="display: <%if checknum(request.querystring("vote"))<>1 then%>none<%end if%>">
		<td>
			<b>投票项目:</b>最多<%=application(prefix&"voten")%>个选项。<br />
			·各个项目用回车隔开<br />
			<input type="radio" name="votetype" value="1" checked="checked" />单选&nbsp;
			<input type="radio" name="votetype" value="2" />多选
			<b>过期时间:</b>
			<select size="1" name="outtime" style="font-size: 9pt">
				<option value="1">一天</option>
				<option value="3">三天</option>
				<option value="7">一周</option>
				<option value="15">半个月</option>
				<option value="31">一个月</option>
				<option value="93">三个月</option>
				<option value="365">一年</option>
				<option value="10000" selected="selected">不过期</option>
			</select>
		</td>
		<td>
			<textarea onkeydown="presskey();" rows="7" name="vote" cols="85" title="按 Ctrl+Enter 直接发送" style="font-family: 宋体; font-size: 9pt"></textarea>
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td>
			<input class="submit" type="submit" value="OK_!发表" name="B1" />&nbsp;&nbsp;&nbsp;
			<input class="submit" type="button" value="预  览!" onclick="openwin()" name="B3" />&nbsp;&nbsp;&nbsp;
			<input class="submit" type="reset" value="NO_!重写" name="B2" />&nbsp; [ 按 Ctrl+Enter 直接发送 ]
		</td>
	</tr>
</table>

<%=tbottom%>
</form>
<form name="form1" action="paper.asp?action=preview" method="post" target="showgg">
	<input type="hidden" name="topic" value=""><input type="hidden" name="content" value="">
</form>
<%call down%>

⌨️ 快捷键说明

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