<!--#include file="conn.asp" -->
<%

'---------------------
' write by 绿水青山 for 动网6.0
' 本插件经由 gafc 修改适应leadbbs3.14
'---------------------
dim page_count,Pcount,totalrec,mytotalrec,totalPages,currentPage,abgcolor
dim rs,sql
sub dgmain()
  If GBL_TableHeadString <> "" Then 
     response.write "<table width="&DEF_BBS_ScreenWidth&" border=0 cellspacing=0 cellpadding=0 align=center><tr><td>"& GBL_TableHeadString &"</td></tr></table>"
  End If

  response.Write "<table width="&DEF_BBS_ScreenWidth&" cellpadding=0 cellspacing=0 align=center class=tbone><tr><td width='100%'>"
    if GBL_CHK_User="" then
     response.Write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=http://www.nocolor.cn/bbs/images/mini.gif> [登陆后可显示此处已隐藏的论坛在线点歌台]"
else
    call list()  '显示点歌列表
end if
  response.Write "</tr></table>"
'尾部信息
  If GBL_TableBottomString <> "" Then 
     response.write "<table width="&DEF_BBS_ScreenWidth&" border=0 cellspacing=0 cellpadding=0 align=center>"&vbcrlf
     response.write "<tr><td>"&GBL_TableBottomString&"</td></tr></table>"
  End If 
  response.write "<br>"
End sub

'定义显示点歌列表
Sub list()
set rs=server.createobject("adodb.recordset")
sql="select * from media where datevalue(sendtime)+7>date() Order By sendtime Desc"
rs.open sql,connDG,3,3				
if rs.eof or rs.bof then
%>
<br>	
.....::: 欢迎使用论坛在线点歌台 :::.........::: <a href=http://www.nocolor.cn/bbs/Plug-ins/dg/write.asp><font color=#333333>点播歌曲请点击这里</font></a> :::....
<%else%>
<br>
<marquee scrollamount=1 direction=up height=50 onmouseover=this.stop(); onmouseout=this.start();>
<%
currentPage=request.querystring("page")
			if currentpage="" or isNumeric(currentpage) = 0 then 
				currentpage=1
			else
				currentpage=clng(currentpage)
				if err then
					currentpage=1
					err.clear
				end if
			end if

		rs.PageSize = 8
		rs.AbsolutePage=currentpage
		page_count=0
      	        totalrec=rs.recordcount
		while (not rs.eof) and (not page_count = rs.PageSize)
%>
<img src=http://www.nocolor.cn/bbs/images/mini.gif> 
    <a href=user/lookuserinfo.asp?username=<%=rs("sender")%> target=blank><font color=#333333><%=rs("sender")%></font></a>
    <%=rs("sendtime")%> 
为
    <%if trim(rs("incept"))<>"全体会员" then%>
       <a href=user/lookuserinfo.asp?username=<%=rs("incept")%> target=blank><%=rs("incept")%></a><%else%><%=rs("incept")%><%end if%>
	点了一首
	<a href="#" onclick="javascript:window.open('plug-ins/dg/play.asp?url=<%=replace(rs("url"),chr(32),"%20",1)%>&medianame=<%=replace(rs("medianame"),chr(32),"%20")%>&id=<%=replace(rs("id"),chr(32),"%20")%>','','toolbar=no,scrollbars=no,width=400,height=270,left=20,top=20')" onMouseOver="window.status='欢迎 <%=rs("incept")%> 收听 :)';return true" onMouseOut="window.status='<%=DEF_SiteNameString%> 论坛娱乐设施新增在线点歌功能,快去试一试吧!';return true"><font color=#333333><%=rs("medianame")%></font></a>:
	<%=rs("content")%>
	<%if trim(rs("sender"))=GBL_CHK_User or CheckSupervisorUserName = 1 then%>
	<a href=plug-ins/dg/del.asp?id=<%=rs("id")%> onclick="javascript:{if(confirm('您确定执行删除操作吗?')){return true;}return false;}">[删除]</a><%end if%><br>
<%
	  	page_count = page_count + 1
		rs.movenext
		wend
end if
end Sub
%>
