<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/plus_check.asp"-->
<%
'===========================================
'EArgue1.0 Free For Dvbbs7.1.0 论题调用文件
'Update:2005-4-10
'Author:Andy(21EClub)
'Website:Www.51Ent.Com
'本调用文件需配合EArgue辩论中心插件1.0使用
'EArgue辩论中心插件1.0插件下载请到Http://www.51ent.com/下载
'版权属于Andy(21EClub)所有
'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

'调用方式:
'<script src="EC_Argue_News.asp?Num=10&Length=10&ClassShow=1&Type=1&UserName=1"></script>
'Num=10 调用的数量
'Length=22 (调用论题的文字字数限制)
'ClassShow=1 (1为显示论题所属类别,2为不显示)
'Type=1 (1为显示所有论题,2为显示往期论题,3为显示正在进行中的论题)
'UserName=1 (1为显示论题发表者用户名,2为不显示)

'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

	Dv_Plus.Name = "EC_Plus_Argue"     '插件ID
%>
<!--#Include File="EC_Argue_Const.asp"-->
<%
	On Error Resume Next

	Dim EB_Num,EB_AppearName,EB_ClassShow,EB_Length
	Dim EB_ArgueNum
	Dim EB_Rs,EB_SQL,EB_TypeSQL
		EB_Num = Replace(Request("Num"),"'","''")
		EB_ClassShow = Replace(Request("ClassShow"),"'","''")
		EB_Length = Request("Length")
			If EB_Length = "" Then EB_Length = 50
			If EB_Num = "" Then EB_Num = 1
			Select Case Request("Type")
				Case 2 : EB_TypeSQL = "Where Argue_Open = 1 And (Appear_Date + Argue_Days >= DateValue('"&Date()&"'))"
				Case 3 : EB_TypeSQL = "Where Argue_Open = 1 And (Appear_Date + Argue_Days < DateValue('"&Date()&"'))"
				Case Else
					EB_TypeSQL = ""
			End Select

'0=ArgueID,1=Argue_Title,2=Argue_Class,3=UserName,4=Appear_Date,5=Argue_Days
			Set EB_Rs=ArgueConn.Execute("Select Top "&EB_Num&"  ArgueID,Argue_Title,Argue_Class,UserName,Appear_Date,Argue_Days From EC_ArgueTopic "&EB_TypeSQL&" Order By ArgueID Desc")
				If Not EB_Rs.Eof then
					EB_SQL=EB_Rs.GetRows(-1)
					For EB_ArgueNum = 0 To Ubound(EB_SQL,2)
						If EB_ArgueNum <> 0 Then Response.Write "document.write('<br>');"  '调用开始部分不换行
					'-------------------
					'显示辩论分类部分
					'-------------------
						If EB_ClassShow = 1 Then Response.Write "document.write('[<a href=""EC_Argue_List.asp?ArgueClassID="&EB_SQL(2,EB_ArgueNum)&""" target=""_blank"">"&EB_ArgueClass(EB_SQL(2,EB_ArgueNum)-1)&"</a>]');"
					'-------------------
					'显示辩论主题部分
					'-------------------
						Response.Write "document.write('<a href="""&Dvbbs.Forum_Info(1)&"/EC_DispArgue.asp?ArgueID="&EB_SQL(0,EB_ArgueNum)&""" target=""_blank"" title="""&EB_SQL(1,EB_ArgueNum)&""">"&Left(EB_SQL(1,EB_ArgueNum),EB_Length)&"...</a>');"
					'-------------------
					'显示论题发表者名称
					'-------------------
						If Request("UserName") = 1 Then Response.Write "document.write(' <img src=""EC_Argue/icon05.gif"" alt=""论题发起人"" border=""0""><a href=""dispuser.asp?name="&EB_SQL(3,EB_ArgueNum)&""" target=""_blank"">"&EB_SQL(3,EB_ArgueNum)&"</a>');"
					Next
				Else
						Response.Write "document.write('暂无任何论题');"
						Response.end
				End if
	ArgueConn.Close : Set ArgueConn = Nothing

%>