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

📄 say.asp

📁 网趣购物系统加强升级版 ○ 完美整合BBS论坛程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="Inc/SysConfig.Asp"-->
<SCRIPT src="Inc/Fun.js"></SCRIPT>
<%
Dim Caption,Action,Submiturl,bbsCaption,ThisFace,IsTitle,BbsContent,Quote,Page,bbsVote,ID,Rs
If Not YxBBs.Founduser then YxBBs.Error("您还没有注册或者登陆!")
YxBBs.CheckBoard()
ID=YxBBs.CheckNum(Request.QueryString("ID"))
Page=YxBBs.CheckNum(Request.QueryString("page"))
IsTitle=True
Action=lcase(Request.QueryString("action"))
Select Case Action
	Case"vote"
		Vote()
	Case"reply"
		Reply()
	Case"edit"
		Edit()
	Case Else
		YxBBs.Stats="发表新帖"
		Caption=YxBBs.Stats
		bbsCaption="<input name='caption' type='text' style='width:80%' maxlength=200>"
		Submiturl="Save.Asp?BoardID="&YxBBs.BoardID&""
End Select
YxBBs.Head(YxBBs.Stats)
Set Rs=YxBBs.Execute("Select Name,GradeNum From [YX_user]where Name='"&YxBBs.MyName&"' And PassWord='"&YxBBs.MyPwd&"' And ID="&YxBBs.MyID&"")
ShowMain()
YxBBs.Footer()
Set YxBBs=Nothing

Sub Vote()
	Dim Temp,i
	Temp=YxBBs.BoardSetting(4)
	If Cint(YxBBs.ClassSetting(3))=0 Then YxBBs.Error("您没有查看投票的权限!")
	bbsVote="<tr><td valign=top><br><b>&nbsp;投票选项:<b></td><td>&nbsp;请选择投票项目数:<SELECT align=absmiddle name=VoteNum id=VoteNum onchange=SetNum(this)>"
	for i = 2 to int(Temp)
		bbsVote=bbsVote&"<option value='"&I&"'>"&I&"</option>"
	Next
	bbsVote=bbsVote&"</SELECT> 允许多选 <input type='checkbox' name='VoteType' value='2'> 过期时间:<select size='1' name='OutTime' ><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>不过期</option></select><hr size=1 width='98%'><span id=optionid><table cellpadding=0 cellspacing=3 width='100%' border=0><tr><td>选项1:</td><td><input type='text' name='Votes1' style='width:300'></td></tr><tr><td>选项2:</td><td><input type='text' name='Votes2' style='width:300'><INPUT TYPE='hidden' name='AutoValue' value='2'></td></tr></table></span></td></tr>"
	YxBBs.Stats="发表新投票"
	Caption="发表新投票"
	bbsCaption="<input name='caption' type=text style='width:80%' maxlength=200>"
	Submiturl="Save.Asp?BoardID="&YxBBs.BoardID
End Sub

Sub Reply()
	Dim Rs,BbsID,TopicCaption
	if Id=0 Then YxBBs.Error("错误的地址栏参数,请不要手动去更改地址栏参数!")
	If Cint(YxBBs.ClassSetting(3))=0 Then YxBBs.Error(12)
	YxBBs.Stats="回复帖子"
	IsTitle=False
	Set Rs=YxBBs.Execute("Select Caption,SqlTableID,IsLock From [YX_Topic] where TopicID="&ID)
	If Rs.Eof Then
		YxBBs.Error("该帖子不存在或已经删除!")
	ElseIf Rs(2) Then
		YxBBs.Error("该帖子已经被锁定!")
	Else
		TopicCaption=Rs(0)
		YxBBs.TB=Rs(1)
	End If
	Set Rs=Nothing
	bbsCaption=" <input type=hidden name='caption' value='Re:"&TopicCaption&"'>"
	Caption="回复主题:"&TopicCaption
	Submiturl="Save.Asp?Action=Reply&BoardID="&YxBBs.BoardID&"&TB="&YxBBs.TB&"&ID="&ID&"&page="&page&""
	BbsID=YxBBs.CheckNum(Request.QueryString("BbsID"))
	If BbsID<>"" Then
		Set Rs=YxBBs.Execute("select top 1 B.ReplyTopicID,B.TopicID,B.Name,B.AddTime,B.Content,B.BoardID,U.IsShow from [YX_Bbs"&YxBBs.TB&"] As B inner join [YX_User] As U on B.Name=U.Name where B.BbsID="&BbsID&" And B.IsDel=False")
			If Not Rs.Eof Then
				If Rs(1)<>ID And Rs(0)<> Id Then YxBBs.Error("错误的地址栏参数,请不要手动去更改地址栏参数!")
				If Rs(6) Then
					BbsCaption=BbsCaption &"<Font Color=Red>屏蔽内容不能引用</Font>"
				Else
					BbsCaption=BbsCaption &" <Font Color=Red>引用 "&Rs(2)&" 的发言</Font>"
					Quote="<tr><td>&nbsp;<b>引用的内容:<input name='QuoteName' type='hidden' value='[quote]以下是引用 [color=0000FF][B]"&Rs(2)&"[/B][/color] 在([i]"&Rs(3)&"[/i])[B]的发言:[/B]"&chr(10)&chr(10)&"'></b><br>&nbsp;可以编辑要引用的内容</td><td width='76%'>&nbsp;<TEXTAREA name='Quote'  cols=90 rows='5' style='WIDTH: 95%;'>"&YxBBs.Fun.StrLeft(QuoteCode(Rs(4)),500)&"</textarea></td>"
				End If
			End if
		Set Rs=Nothing
	End If
End Sub

Sub Edit()
	Dim Rs,BbsID,TopicIsLock,TopicRs,IsTop
	BbsID=YxBBs.CheckNum(Request.QueryString("BbsID"))
	IF BbsID=0 Or ID=0 Then YxBBs.Error("错误的地址栏参数,请不要手动去更改地址栏参数!")
	Set Rs=YxBBs.Execute("Select BoardID,TopType,SqlTableID,IsLock,TitleType From [YX_Topic] where IsDel=False And TopicID="&ID)
	If Rs.Eof Then
		YxBBs.Error("该帖子不存在或已经删除!")
	Else
		TopicRs=Rs.GetRows(-1)
	End If
	Rs.Close
	'如果是总顶或顶
	Set Rs=YxBBs.Execute("select BoardID,Name,AddTime,TopicID,face,Caption,Content,IsDel From [YX_Bbs"&TopicRs(2,0)&"] where IsDel=False And BbsID="&BbsID&"")
	If Rs.eof  Then
		YxBBs.Error("该帖子不存在或已经删除!")
	Else
		If Not(TopicRs(1,0)=5 or TopicRs(1,0)=4) and TopicRs(0,0)<>YxBBs.BoardID Then YxBBs.Error("错误的地址栏参数,请不要手动去更改地址栏参数!")
		If lcase(YxBBs.MyName)<>lcase(rs("name")) Then
			If Cint(YxBBs.ClassSetting(18))=0 Then YxBBs.Error("您没有编辑别人帖子的权限!")
		Else
			'编辑自己帖子的权限
			If Cint(YxBBs.ClassSetting(9))=0 Then YxBBs.Error("您没有编辑自己帖子的权限!")
		End If
		If YxBBs.ClassID>2 And Not YxBBs.IsBoardAdmin Then
			If YxBBs.BBSSetting(31)<>0 Then If lcase(YxBBs.MyName)=lcase(rs("name")) And DateDiff("s",Rs("AddTime")+YxBBs.BBSSetting(31)/1440,YxBBs.NowBbsTime)>0 Then YxBBs.Error("你超过了允许普通用户编辑自己帖子的时限 (发帖后<Font color=red>"&YxBBs.BBSSetting(31)&"</Font>分钟内)")
			If lcase(YxBBs.MyName)=lcase(rs("name")) And TopicRs(3,0) Then YxBBs.Error("该帖子已经被锁定!")
		End If
		BbsCaption=rs("Caption")

⌨️ 快捷键说明

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