<!--#Include File="EC_Argue_Conn.asp"-->
<%
Dim EB_ArgueClass,EB_Masterlist
		If Dv_Plus.Plus_Settings(0) = 0 Then ShowErr(1)   '插件开关状态
EB_ArgueClass = Split(Dv_Plus.Plus_Settings(2),"|")    
	'--------------------------------------------
	'导航部份
	'--------------------------------------------
	Sub Argue_Nav_Link()
		With Response
			.Write "<table border=""0"" width="""&Dvbbs.mainsetting(0)&""" cellpadding=2 cellspacing=0 align=center>"
			.Write "<tr>"
			.Write "<th height=23 id=TableTitleLink><a href=""EC_Argue_Index.asp"">辩论首页</a></th>"
			.Write "<th id=TableTitleLink><a href=""EC_Argue_My.asp"">个人空间</th>"
			.Write "<th id=TableTitleLink><a href=""EC_Argue_List.asp"">论题列表</th>"
			'.Write "<th id=TableTitleLink><a href=""EC_Argue_TopList.asp"">论题排行</th>"
			.Write "<th id=TableTitleLink><a href=""EC_Argue_Appear.asp"">发起辩论</th>"
			.Write "</tr><tr><td colspan=3>"
			.Write "<marquee scrollAmount=""2"" width=""100%"" onmouseover=""stop()"" onmouseout=""start()"">"
			.Write Dv_Plus.Plus_Settings(3)
			.Write "</marquee>"
			.Write "</td><td>"
			.Write "<a href=""EC_Argue_Appear.asp""><img src=""EC_Argue/Appear.gif"" align=""right"" border=""0""></a>"
				'=======判断是否为论坛管理员或插件管理员=======
				EB_Masterlist = "|"&Dv_Plus.Mian_settings(3)&"|"
					If InStr(EB_Masterlist,"|"&Dvbbs.MemberName&"|")>0 Or Dvbbs.Master = True Then
			.Write " <a href=""EC_Argue_Master.asp""><img src=""EC_Argue/Master.gif"" align=""right"" border=""0""></a>"
					End If
			.Write "</td></tr>"
			.Write "</table>"
		End With
	End Sub
	'--------------------------------------------
	'辩论分类名称及列表
	'--------------------------------------------
	Sub Argue_ClassList(EB_ClassID)
		Dim EB_i
			Select Case EB_ClassID
				Case "All"   '页面分类列表
					With Response
						.Write "<table border=""0"" cellpadding=3 cellspacing=1 align=center class=Tableborder1 Style=""Width:100%"">"
						.Write "<tr><th height=23 >"
			                        .Write "<p>辩论分类</p>"
						.Write "</th></tr><tr><td align=center class=TableBody1>"
						.Write "<table border=""0"" cellpadding=3 cellspacing=1 align=center Style=""Width:95%"">"
						.Write "<tr>"
						.Write "<td class=TableBody2>"
						.Write "<img src=""EC_Argue/icon_dh.gif"" border=""0"">"
						.Write " <a href=""EC_Argue_List.asp"">所有论题</a>"
						.Write "</td></tr>"
				For EB_i = 0 to Ubound(EB_ArgueClass)
						.Write "<tr>"
					If EB_i Mod 2 = 0 Then
						.Write "<td class=TableBody1>"
					Else
						.Write "<td class=TableBody2>"
					End if
						.Write "<img src=""EC_Argue/icon_dh.gif"" border=""0"">"
						.Write " <a href=""EC_Argue_List.asp?ArgueClassID="&EB_i+1&""">"
						.Write EB_ArgueClass(EB_i)
						.Write "</a>"
						.Write "</td></tr>"
				Next
						.Write "</table>"
						.Write "</td></tr>"
						.Write "<form name=""Search_Argue"" action=""EC_Argue_List.asp?Act=1"" method=""post"">"
						.Write "<tr><td align=center class=TableBody1 height=""45"">"
                        			.Write "<p><b>论题快速搜索</b><br>"
						.Write "<input type=""text"" name=""Title"" size=""10""> "
                            			.Write "<input type=""submit"" name=""submie"" value=""搜索"">"
						.Write "</p></td></tr></form></table>"
					End With
				Case "FormSelect"   '表单分类列表
					With Response
						.Write "<select name=""Argue_ClassID"" size=""1"">"
							For EB_i = 0 to Ubound(EB_ArgueClass)
						.Write "<option value="""&EB_i+1&""">"
						.Write EB_ArgueClass(EB_i)
						.Write "</option>"
							Next
						.Write "</select>"
					End With
				Case Else   '当前分类名称
					Response.Write EB_ArgueClass(EB_ClassID)
			End Select
	End Sub
	'--------------------------------------------
	'页面底部
	'--------------------------------------------
	Sub Argue_Copyright()
		Response.Write "--------------------------------------------------------<br>"
		Response.Write "Powered By <a href=""http://andy.mypop.cn/EArgue/"">E-Argue1.0</a> Free For Dvbbs7.1.0"
		Response.Write "<br><a href=""Http://www.51ent.com"">21EClub</a>(作者：Andy) 版权所有"
		Response.End
	End Sub

	'--------------------------------------------
	'管理菜单
	'--------------------------------------------
	Sub Argue_Master()
					With Response
						.Write "<table border=""0"" cellpadding=3 cellspacing=1 align=center class=Tableborder1 Style=""Width:100%"">"
						.Write "<tr><th height=23 ><p>管理项目</p></th></tr>"
						.Write "<tr><td align=center class=TableBody1>"
						.Write "<table border=""0"" cellpadding=3 cellspacing=1 align=center Style=""Width:95%"">"
						.Write "<tr><td class=TableBody2><img src=""EC_Argue/icon_dh.gif"" border=""0"">"
						.Write " <a href=""EC_Argue_Master.asp"">所有论题管理</a>"
						.Write "</td></tr><tr><td class=TableBody1><img src=""EC_Argue/icon_dh.gif"" border=""0"">"
						.Write " <a href=""EC_Argue_Master.asp?Action=1"">验证论题管理</a>"
						.Write "</td></tr><tr><td class=TableBody2>"
						.Write "<img src=""EC_Argue/icon_dh.gif"" border=""0"">"
						.Write " <a href=""EC_Argue_Master.asp?Action=2"">未验证论题管理</a>"
						.Write "</td></tr>"
						.Write "<tr><td class=TableBody1>"
						.Write "<p><font color=""red"">观点以及更多管理项目请直接在论题上操作</font></p>"
						.Write "</td></tr>"
						.Write "</table></td></tr>"
						.Write "<form name=""Search_Argue"" action=""EC_Argue_Master.asp?Action=3"" method=""post"">"
						.Write "<tr><td align=center class=TableBody1 height=""45"">"
						.Write "<p><b>论题管理搜索</b>"
						.Write "<br><input type=""text"" name=""Title"" size=""10""> "
						.Write "<input type=""submit"" name=""submie"" value=""搜索""></p></td></tr></form></table>"
					End With
	End Sub
	'---------------------------------------------------
	'错误信息
	'---------------------------------------------------
	Public Function ErrCodes(Byval ErrNum)
		Select Case ErrNum
			Case 1 : ErrCodes = "<li>"&Dv_Plus.Plus_Settings(1)
			Case 2 : ErrCodes = "<li>标题不能超过40字或小于5字"
			Case 3 : ErrCodes = "<li>论题描述不能超过"&Dv_Plus.Plus_Settings(4)&"字或小于10字"
			Case 4 : ErrCodes = "<li>正方主观点不能超过40字或小于5字"
			Case 5 : ErrCodes = "<li>反方主观点不能超过40字或小于5字"
			Case 6 : ErrCodes = "<li>请选择论题所属分类"
			Case 7 : ErrCodes = "<li>请选择是否允许第三方看法"
			Case 8 : ErrCodes = "<li>观点内容不能超过"&Dv_Plus.Plus_Settings(5)&"字或小于5字"
			Case 9 : ErrCodes = "<li>分类不存在"
			Case 10 : ErrCodes = "<li>论题不存在或论题正在审核中"
			Case 11 : ErrCodes = "<li>您已投过票，请不要重复投票"
			Case 12 : ErrCodes = "<li>请不要重复刷新或从外部提交内容！"
			Case 13 : ErrCodes = "<li>你的帖子数少于"&Dv_Plus.Plus_Settings(12)&"，不能参与投票！"
			Case 14 : ErrCodes = "<li>对不起！当前论题已过期，已停止发表观点或投票！感谢您的支持！"
			Case 15 : ErrCodes = "<li>请正确选择观点立场！"
			Case 16 : ErrCodes = "<li>您没有权限进入该页面！"
			Case 17 : ErrCodes = "<li>参数错误！请正确操作！"
			Case 18 : ErrCodes = "<li>搜索关键字不能留空！"
		End Select
	End Function
	Public Sub ShowErr(Byval Code)
		If Code<>"" Then Response.redirect "showerr.asp?ErrCodes="& ErrCodes(Code) &"&action=iOtherErr"
	End Sub
	'---------------------------------------------------
	'代码过滤
	'---------------------------------------------------
	Function HTMLEncode(fString)
		fString = Replace(fString, CHR(13), "")
		fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
		fString = Replace(fString, CHR(10), "<BR>")
		HTMLEncode = fString
	End Function
	Function TABLEEncode(fString)
		fString = Replace(fString, "",CHR(13))
		fString = Replace(fString, "</P><P>",CHR(10) & CHR(10))
		fString = Replace(fString, "<BR>",CHR(10))
		TABLEEncode = fString
	End Function
	Function FilterHTML(strToFilter)       'HTML过滤
  		Dim strTemp
		  strTemp = strToFilter
  		While Instr(1,strTemp,"<") AND Instr(1, strTemp, ">")
  		  strTemp = Left(strTemp, Instr(1, strTemp, "<")-1) & Right(strTemp, Len(strTemp)-Instr(1,strTemp, ">"))
  		WEnd
 		 FilterHTML = strTemp
	End Function
%>