www.gusucode.com > 星云DJ舞曲 4.5a源码程序 > user/usercollect.asp

    <%
founderr=false
if isnull(session("DJUser")) or session("DJUser")="" or isnull(session("DJUserPwd")) or session("DJUserPwd")="" then
	response.write "<script language=javascript>alert('只有会员有歌曲收藏功能!如果您是会员请先登陆。如果您还不是本站会员,请免费注册!');window.close();</script>"
	Response.End 
end if
%>
<!--#include file="connkkp.asp"-->
<!--#include file="const.asp"-->
<%
action=request("action")
set rs=server.createobject("adodb.recordset")
if action="add" then
	Musicid=request.QueryString("id")
	sql="select * from collection where UserName='"&session("DJUser")&"'"
	rs.open sql,conn,1,3
		 if RS.recordcount>100 then 
		   response.write "<P align=center><font color=red>出 错 啦<br><br>对不起,您的音乐收藏架已满!<br><br><a href=UserCollect.asp?action=show>请清理!</a>" 
		   response.end
		  end if
	rs.close
	sql="select * from collection where UserName='"&session("DJUser")&"' and Musicid="&Musicid
	rs.open sql,conn,1,3
	if not rs.EOF then
	response.write "<script language=javascript>alert('你已经收藏了此歌曲了!');history.back(1);</script>"
		response.end
	else
		set rs2=server.createobject("adodb.recordset")
		sql2="select * from musiclist where id="&Musicid
		rs2.open sql2,conn,1,1
		if (rs2.EOF and rs2.BOF) then
			response.write "<script language=javascript>alert('请正确选择歌曲!');history.back(1);</script>"
     		response.end
		end if
		rs2.close
		set rs2=nothing
		rs.AddNew
		rs("UserName")=session("DJUser")
		rs("Musicid")=Musicid
		rs.Update
	end if
	rs.Close
	Response.Redirect "UserCollect.asp?action=show"
elseif action="del" then
	id=request("id")
	set rs=conn.execute("delete FROM collection where UserName='"&session("DJUser")&"' and id="&id)
	Response.Redirect "UserCollect.asp?action=show"
elseif action="show" then
set rscc=server.createobject("adodb.recordset")
sqlcc="select * from home"
rscc.open sqlcc,conn,1,1
if not rscc.eof then
zhanming=rscc("homes")
yuming=rscc("url")
beian=rscc("msn")
bdizhi=rscc("urls")
jishuqi=rscc("qqtwo")
banquan=rscc("qqthree")
end if
rscc.close
set rscc=nothing
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta content="all" name="robots" />
<meta name="author" content="<%=yuming%>" />
<title><%=session("DJUser")%>音乐收藏夹 -<%=zhanming%>-<%=yuming%></title>
<meta name="description" content="<%=yuming%>,<%=zhanming%>" />
<meta name="keywords" content="<%=zhanming%>" />
<link rel="stylesheet" rev="stylesheet" href="../images/xy.css" type="text/css" media="all" />
<script language="javascript" type="text/javascript" src="../js/js.js"></script>
</head>
<BODY>
<CENTER>
<DIV id=topdiv>
<DIV id=DengLu><IFRAME marginWidth=0 marginHeight=0 src="../user/" 
frameBorder=0 width=758 scrolling=no height=30></IFRAME></DIV>
<DIV id=Crown>
<DIV id=logo><IMG src="../images/logo.jpg"></DIV>
<DIV id=CrownLeft><IMG src="../images/ad1.gif"></DIV></DIV></DIV>
<DIV id=wbk>
<DIV id=Column>
<DIV id=Columnimg><IMG height=20 src="../images/sutiao.jpg" width=2></DIV>
<DIV id=Columnname></DIV>
<DIV id=Columnimg><IMG height=20 src="../images/sutiao.jpg" width=2></DIV>
<DIV id=Columnname></DIV>
<DIV id=Columnname></DIV>
<DIV id=Columnimg><IMG height=20 src="../images/sutiao.jpg" width=2></DIV>
<DIV id=Columnname></DIV>
<DIV id=Columnimg><IMG height=20 src="../images/sutiao.jpg" width=2></DIV>
<DIV id=Columnname><A href="../list/dj_6_1.html">流行音乐</A></DIV>
<DIV id=Columnimg><IMG height=20 src="../images/sutiao.jpg" width=2></DIV>
<DIV id=Columnname><A href="../list/dj_5_1.html">视频舞曲</A></DIV>
<DIV id=Columnimg><IMG height=20 src="../images/sutiao.jpg" width=2></DIV>
<DIV id=Columnname><A href="../list/dj_4_1.html">慢摇舞曲</A></DIV>
<DIV id=Columnimg><IMG height=20 src="../images/sutiao.jpg" width=2></DIV>
<DIV id=Columnname><A href="../list/dj_3_1.html">英文嗨曲</A></DIV>
<DIV id=Columnimg><IMG height=20 src="../images/sutiao.jpg" width=2></DIV>
<DIV id=Columnname><A href="../list/dj_2_1.html">中文舞曲</A></DIV>
<DIV id=Columnimg><IMG height=20 src="../images/sutiao.jpg" width=2></DIV>
<DIV id=Columnname><A href="../list/dj_1_1.html">现场串烧</A></DIV>
<DIV id=Columnimg><IMG height=20 src="../images/sutiao.jpg" width=2></DIV>
<DIV id=Columnname><A href="../index.html">网站首页</A></DIV></DIV>
<DIV id=tongso>
<DIV id=Statistics><a href="../djtop/index.Html" class="main"> 最新上传舞曲</a>  <a href="../djtop/h.Html" class="main">试听总榜</a>  <a href="../djtop/d1.Html" class="main">今日排行</a>  <a href="../djtop/d2.html" class="main">昨日排行</a>  <a href="../djtop/w2.html" class="main">上周排行</a>  <a href="../djtop/w1.html" class="main">本周排行</a>  <a href="../djtop/m2.html" class="main">上月排行</a>  <a href="../djtop/m1.html" class="main">本月排行</a>  <a href="../djtop/good.html" class="main">精选舞曲</a></DIV>
<FORM action=../search.asp method=post>
<DIV id=Search>舞曲搜索: <INPUT id=keyword 
style="BORDER-RIGHT: #999999 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: #999999 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 12px; BACKGROUND: #ffffff; PADDING-BOTTOM: 0px; BORDER-LEFT: #999999 1px solid; WIDTH: 155px; COLOR: #333333; PADDING-TOP: 2px; BORDER-BOTTOM: #999999 1px solid; HEIGHT: 15px" 
name=keyword>&nbsp; <SELECT name=select> <OPTION value=music 
  selected>舞曲</OPTION></SELECT> &nbsp;<INPUT style="WIDTH: 55px; HEIGHT: 17px" 
type=image src="../images/sosuo.jpg"> </DIV></FORM></DIV></DIV>

<DIV id=wbk>
<DIV id=ad><SPAN id=ads778a>内容载入中...</SPAN></DIV></DIV>

<div id="wbk">
<div id="ad" class="webtext">&nbsp;&nbsp;会员:<font color=#ff0000><%=session("DJUser")%></font> 收藏的歌曲        当您的歌曲下载数量达到1000条时,请自动清理! - 欢乐今夜DJ舞曲网-www.xy57.cn</div>
</div>

<div id="wbk">
<div id="djweb">
<div id="listleft">
<div id="zxjrwq">
<div id="Navigation" class="top1 nwwuqu">
  <div id="wuqudh2"> <span id="xu" class="top6 cu">序</span><span id="musicname1" class="top6 cu">歌曲名称</span><span id="shiting" class="cu" style="padding-top:6px;">试听</span><span id="hits" class="top6 cu">人气</span><span id="shoucang" class="top6 cu">收藏</span><span id="down" class="top6 cu">下载</span><span id="addtime" class="top6 cu">更新时间</span></div>
</div>
	<div id="wuqudh" class="sbj9">
	<ul><form name='form' target='xydj' action='../Player/'>
<%
Dim iPageSize,iPageNo,iRecordCount,iPageCount
iPageSize	= 30
iPageNo		= Trim(Request("page"))
If iPageNo<>"" And IsNumeric(iPageNo) Then
	iPageNo = CLng(iPageNo)
Else
	iPageNo = 1
End If
	sql="select * from collection where UserName='"&session("DJUser")&"' order by id desc"
	rs.open sql,conn,1,1
	if rs.EOF and rs.BOF then
%><li><center><font size=4 color=#ff0000><b>您还没有收藏任何舞曲!</b></font></center></li>
<%
	else
	    set rs1=server.createobject("adodb.recordset")
		iRecordCount	= Rs.RecordCount
		Rs.PageSize	= iPageSize
		iPageCount	= Rs.PageCount
		If iPageNo < 1 Then iPageNo = 1
		If iPageNo > iPageCount Then iPageNo = iPageCount
		Rs.AbsolutePage	= iPageNo
		I = 0
		Do While Not Rs.Eof And I < iPageSize
			I = I+1
		musicid=rs("musicid")
        sql1="select * from musiclist where id="&Musicid
		rs1.open sql1,conn,1,1
		if not rs1.EOF then%>
<li<%if rs1("isgood")=true then%> class="tj"<%end if%>><span id='xu'><span class='anlan'><%=Rs1("Id")%></span></span><span id='musicname'><input type=checkbox name=id value=<%=Rs1("Id")%>> <a href='../P/<%=Rs1("Id")%>.html' target='xydj' title='<%=Rs1("MusicName")%>'><%=right("0"&I,2)%>.<%=Rs1("MusicName")%>
</a> <a href="UserCollect.asp?action=del&id=<%=rs("id")%>"><font color="#FF0000">删除</font></a></span><span id='shiting'><a href='../P/<%=Rs1("Id")%>.html' target='xydj'><img src='../images/music.gif' border='0' /></a></span><span id='hits'><%=Rs1("Hits")%></span><span id='shoucang'><a href='../User/UserCollect.asp?action=add&id=<%=Rs1("Id")%>' target='shoucang'>收藏</a></span><span id='down'><a href='../D/?id=<%=Rs1("Id")%>' target='xz'><img src='../images/down.jpg' border='0' /></a></span><span id='addtime'><%=Year(rs1("DateAndTime"))%>-<%=Right("0"&Month(rs1("DateAndTime")),2)%>-<%=Right("0"&Day(rs1("DateAndTime")),2)%></span></li>
<%      end if
        rs1.close
		rs.MoveNext
		loop
%>
	</ul>
	</div>
</div>
<div id="zxjrwq" class="mixfy">
<input type=button value="全 选" onClick="CheckAll(this.form)" title="选择显示的所有歌曲" class="ipbb" />&nbsp;<input type=button value="反 选" onClick="CheckOthers(this.form)" title="反向选择歌曲" class="ipbb" />&nbsp;<input type="submit" value="连续播放" title="请先选择你想听的歌曲后再点击连播" name="B1" class="ipbc"/>&nbsp;<input type="reset" name="Submit22" value="清空选定" class="ipbc"/>
</div>
<div id="zxjrwq" class="mixfy">
<FORM name=form1 onsubmit="return checkdata2()" action="?action=show" method=post>
共<%=iRecordCount%>首舞曲
<%
If iPageNo > 1 Then
	Response.Write "&nbsp;<A href=""?action=show&page=1"">首页</a> <A href=""?action=show&page=" & iPageNo-1 & """>上一页</a>&nbsp;"
Else
	Response.Write "&nbsp;首页 上一页&nbsp;"
End If
Response.Write VbCrLf
If iPageNo < iPageCount Then
	Response.Write "<a href=""?action=show&page=" & iPageNo+1 & """>下一页</a> <a href=""?action=show&page=" & iPageCount & """>末页</a>"
Else
	Response.Write "下一页 末页"
End If
%>
&nbsp;页次:<%=iPageNo%>/<%=iPageCount%>页&nbsp;  
转到:
<select name="page" size="1" onchange="location='?action=show&page='+this.options[this.selectedIndex].value;">
<%
For I = 1 To iPageCount
	Response.Write "<option value=""" & I & """"
	If I = iPageNo Then Response.Write " selected"
	Response.Write ">第" & I & "页</option>" & VbCrLf
Next
%>
</select>
</div></FORM></FORM>
<%
	end if
	rs.Close
else
	errmsg=errmsg+"操作错误!请联系管理员"
	founderr=true
end if
set rs=nothing
conn.close
set conn=nothing
if founderr=true then
	call error()
end if
%>
</div>
<div class="fwright right">
<div id="bzwk" class="right left5 pad10">
  <div id="Navigation" class="top1 dhkd2">
    <div class="webtext cu">24小时试听排行</div>
    <div class="more right"><a href="#" target="_blank">更多>></a></div>
  </div>
<div id="flwuqu">
		<ul>
		<script src="../Js/paihang.js"></script> 
		</ul>
	</div>
</div>

</div>
</div>
</div>
<div id="wbk">
	<div class="copyright">
	<div id="bottomlm1">关于本站 - 联系我们 - 广告联系 - 版权说明 - 加入收藏 - 设为主页</div>
	<div style="height:60px; line-height:180%; margin-top:5px;">Copyright 2003-2007 Www.xy57.cn All rights reserved<BR>
本站舞曲紧供测试网络,其所有权为DJ作者及所属公司拥有<BR>
<a href="http://www.miibeian.gov.cn/" target="_blank">鲁ICP备07504330号</a>  联系QQ:260477522 <script language="javascript" type="text/javascript" src="http://js.users.51.la/1562569.js"></script>
<noscript><a href="http://www.51.la/?1562569" target="_blank"><img alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/1562569.asp" style="border:none" /></a></noscript></div>
	</div>
</div>
</body>
</html>