📄 user_main.asp
字号:
</table>
<%
rs.Close
set rs=nothing
end sub
sub addfriend()
dim newfriend:newfriend=trim(request.form("friend"))
if not checkname(newfriend) then
response.Write"<script language=javascript>alert('要添加的好友用户名称为空或含有非法字符!!');history.back();</script>"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where username='"&newfriend&"'"
rs.open sql,conn,1,1
If rs.EOF And rs.BOF Then
rs.close
response.Write"<script language=javascript>alert('要添加的好友用户名称不存在!!');history.back();</script>"
response.end
end if
rs.close
set rs=nothing
IF Hx66_friend<>"" Then
Hx66friend=Hx66_friend
else
Hx66friend="|"
End IF
temp=split(Hx66friend,"|")
for j = 1 to ubound(temp)
if newfriend=temp(j) then
response.Write"<script language=javascript>alert('要添加的好友已在您的好友列表内!!');history.back();</script>"
response.end
end if
next
if ubound(temp)>=friendsum then
response.Write"<script language=javascript>alert('您目前的好友已达到系统"&friendsum&"个限定数,请清理后添加!!');history.back();</script>"
response.end
end if
dim temp1,title,bodyMessage
temp1="|"
temp1=Hx66_friend&""&temp1&""&newfriend
conn.execute"Update [user] set userfriend='"&temp1&"' where username='"&Hx66_name&"'"
title="好友信息通知"
bodyMessage="会员 "&Hx66_name&" 已将您添加为好友!"
sql="insert into Message(sender,incept,title,content,sendtime) values('"&Hx66_name&"','"&newfriend&"','"&title&"','"&bodyMessage&"','"&now()&"')"
conn.execute(sql)
response.Write"<script language=javascript>alert(' 已成功将用户("&newfriend&")加入到您的好友列表内!');this.location.href='User_main.asp?action=friend';</script>"
response.end
end sub
sub delfriend()
dim i
dim temp
dim temp_friend
dim friend_id
friend_id=request("friend_id")
IF Hx66_friend<>"" Then
Hx66friend=Hx66_friend
else
Hx66friend="|"
End IF
temp=split(Hx66friend,"|")
for i = 1 to ubound(temp)
if int(i)=int(friend_id) then
temp_friend=temp_friend
else
temp_friend=temp_friend&"|"&temp(i)
end if
next
conn.execute"Update [user] set userfriend='"&temp_friend&"' where username='"&Hx66_name&"'"
set temp=nothing
set temp_friend=nothing
response.Write"<script language=javascript>alert(' 已成功删除编号为("&(friend_id)&")的我的好友!');this.location.href='User_main.asp?action=friend';</script>"
response.end
end sub
sub collect()
if request("page")<>"" then
if not isInteger(request("page")) then
Response.Write "<script language=javascript>alert('参数非法!');javascript:history.back();</script>"
Response.End
end if
end if
%>
<form name="form" onsubmit="javascript:return lbsong();" target="lbsong" action="djplaylist.asp">
<table bgcolor="#ffffff" borderColor="#F0F0F0" Border="1" Cellspacing="0" Cellpadding="5" width="100%" align="Center" style="border-collapse: collapse">
<tr>
<td height="25" align="center" colspan="6">最多可存<%=collectsum%>首在您的音乐收藏盒中</td>
</tr>
<tr>
<td height="25" align="center" colspan="6"><font color=red><B>我的音乐收藏盒</B></font></td>
</tr>
<tr align="center">
<td width="7%" height="23">序号</td>
<td width="50%" height="23">歌曲名称(点击播放)</td>
<td width="19%" height="23">演唱歌手</td>
<td width="10%">人气</td>
<td width="7%">删除</td>
<td width="7%">连播</td>
</tr>
<%
dim Hx66collect
IF Hx66_collect<>"" Then
Hx66collect=Hx66_collect
else
Hx66collect="|10000000000000000"
End IF
temp=split(Hx66collect,"|")
totaldiary=ubound(temp)
hyperpage=15
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
aaa=hyperpage*(currentpage-1)+1
if ubound(temp)-hyperpage*currentpage<1 then
bbb=ubound(temp)
else
bbb=hyperpage*currentpage
end if
else
currentpage=1
aaa=1
if hyperpage-ubound(temp)>=1 then
bbb=ubound(temp)
else
bbb=hyperpage
end if
end if
if (totaldiary mod hyperpage)=0 then
totalpages=totaldiary\hyperpage
else
totalpages=totaldiary\hyperpage+1
end if
for j = aaa to bbb
set rs=server.createobject("adodb.recordset")
sql="select * from dj where dj_id="&temp(j)&""
rs.open sql,conn,1,1
If rs.EOF And rs.BOF Then
Response.Write "<tr align=center><td height=21 colspan=6>您目前还没有收藏音乐!</td></tr>" & vbCrLf
else
Response.Write "<tr align=center bgcolor=#FFFFFF>" & vbCrLf
Response.Write "<td height=25>"&j&"</td>" & vbCrLf
%>
<td align="left"><a href='djplaylist.asp?checked=<%=rs("dj_id")%>&player=+' onclick="HxWindow(this.href,'dj','350','260','no','no','center');return false" Title='歌曲名称:<%=rs("dj_name")%>
视听次数:<%=rs("dj_count")%>
上传时间:<%=rs("dj_date")%>'><%=rs("dj_name")%></a></td>
<td><%=rs("dj_user")%></td>
<td><%=rs("dj_count")%></td>
<%
Response.Write "<td><a href='?action=delcollect&collect_id="&j&"' Title='删除此歌曲收藏'><font color=#FF0000>×</font></td>" & vbCrLf
Response.Write "<td><input type='checkbox' name='checked' value="&rs("dj_id")&"></td></tr>" & vbCrLf
end if
next
%>
<TR bgColor=#FFFFFF><TD colspan=7 align=Center height="26"><div align="center">
<input type="button" name="chkall" value="" onclick="CheckAll(this.form)" title="选择显示的所有歌曲" style="width: 62px; height: 23px; background-image: url('img/ly1.gif'); border-style: none; border-width: medium"> <input type="button" name="chkOthers" value="" onclick="CheckOthers(this.form)" title="反向选择歌曲" style="width: 62px; height: 23px; background-image: url('img/ly2.gif'); border-style: none; border-width: medium"> <input type="submit" name="player" value=" " title="请先选择你想听的歌曲后再点击播放" style="width: 62px; height: 23px; background-image: url('img/ly3.gif'); border-style: none; border-width: medium">
</div>
</TD></TR></form>
</table>
<table width="540" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form2" method="post" action="?action=list">
<tr>
<TD align=middle width="200" height="40"><IMG height=14 src="img/so.gif" width=14 align=absMiddle> 共[<font color="#FF6666"><%=totaldiary%></font>]首音乐 分[<font color="#FF6666"><%=totalpages%></font>]页</TD>
<TD width="200" align=middle><IMG height=11 src="img/lt.gif" width=11 align=absMiddle>
<%
if CurrentPage<2 then
response.write "<font color='999966'>首页 上一页</font> "
else
response.write "<a href=?action=collect&page=1>首页</a> "
response.write "<a href=?action=collect&page="&CurrentPage-1&">上一页</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href=?action=collect&page="&CurrentPage+1&""
response.write ">下一页</a> <a href=?action=collect&page="&totalpages&">尾页</a>"
end if
%> <IMG height=11 src="img/rt.gif" width=11 align=absMiddle></TD>
</tr>
</form>
</table>
<%
rs.Close
set rs=nothing
end sub
sub delcollect()
dim i
dim temp
dim temp_collect
dim collect_id
collect_id=request("collect_id")
IF Hx66_collect<>"" Then
Hx66collect=Hx66_collect
else
Hx66collect="|"
End IF
temp=split(Hx66collect,"|")
for i = 1 to ubound(temp)
if int(i)=int(collect_id) then
temp_collect=temp_collect
else
temp_collect=temp_collect&"|"&temp(i)
end if
next
conn.execute"Update [user] set usercollect='"&temp_collect&"' where username='"&Hx66_name&"'"
set temp=nothing
set temp_collect=nothing
response.Write"<script language=javascript>alert(' 已成功删除编号为("&(collect_id)&")的我的收藏歌曲!');this.location.href='User_main.asp?action=collect';</script>"
response.end
end sub
sub vip()%>
<table bgcolor="#ffffff" borderColor="#F0F0F0" Border="1" Cellspacing="0" Cellpadding="5" width="100%" align="Center" style="border-collapse: collapse">
<tr>
<td height="25" colspan="5" align="Center">亲爱的会员:<%=Hx66_name%> ,欢迎您升级为<font color=red><b>VIP</b></font>会员,享受本站更多的服务。</td>
</tr>
<tr>
<td height="25" colspan="5"><font color=red>→本网站系统当前采用的是自动添加VIP会员模式</font><br>
→如果您当前的条件满足VIP会员申请条件,您就可以直接申请成为<%=webname%>的VIP会员<br>
1、VIP会员的有效期为 <b><%=viptime%></b> 天<br>
2、当您的有效期快到期时,我们会以短消息方式通知您<br>
3、谢谢您对《<%=webname%>》的支持<br></td>
</tr>
<tr>
<td height="25" colspan="5" align="Center">欢迎<b><%=Hx66_name%></b>申请VIP会员</td>
</tr>
<tr align="Center">
<td height="25"><B>所需要条件</B></td>
<td height="25"><B>申请条件</B></td>
<td height="25"><B>申请成功后</B></td>
<td height="25"><B>您当前的条件</B></td>
<td height="25"><B>是否满足</B></td>
</tr>
<tr align="Center">
<td height="25">会员积分</td>
<td height="25">大于<%=zvippoints%></td>
<td height="25">-<%=zvippoints%></td>
<td height="25"><%=Hx66_points%></td>
<td height="25"><%if Hx66_points>zvippoints then%>满足<%else%><font color=red>不满足</font><%end if%></td>
</tr>
<tr align="Center">
<td height="25" colspan="3">
<%
if Hx66_Grade=1 then
response.write "<font color=red>您已经是"&webname&"VIP会员</font><br>"
else
if zhvip<>"yes" then
response.write "<font color=red>本站已停止VIP会员的申请,如你需要可联系管理员</font><br>"
else
if Hx66_points<=zvippoints then
response.write "<font color=red>您的条件不满足,您暂时还无法申请成为"&webname&"VIP会员</font><br>"
else
response.write "<font color=red>您可以申请VIP会员</font><br>"%>
<form name="form" method="post" action="User_main.asp?action=vipadd">
<INPUT name=username size="20" value="<%=Hx66_name%>" type=hidden>
<INPUT type=submit value=点击申请 name=submit class=input></form>
<%end if
end if
end if%></td>
<td height="25" colspan="2"><%if Hx66_Grade=1 then
response.write "您申请VIP会员的时间是:"&Hx66_vipin&"<br>"
response.write "离您的有效期还有:<b>"&Hx66_vipend-date()&"</b>天"
end if
%></td>
</tr>
</table>
<%end sub
sub vipadd()
dim sucmsg
if Hx66_Grade=1 then
founderr=true
response.Write"<script language=javascript>alert('您已经是"&webname&"VIP会员,请不要重复申请!');this.location.href='User_main.asp?action=vip';</script>"
elseif zhvip<>"yes" then
founderr=true
response.Write"<script language=javascript>alert('本站已停止VIP会员的申请,如你需要可联系管理员!');this.location.href='User_main.asp?action=vip';</script>"
elseif Hx66_points<=zvippoints then
founderr=true
response.Write"<script language=javascript>alert('您的条件不满足,您暂时还无法申请成为"&webname&"VIP会员!');this.location.href='User_main.asp?action=vip';</script>"
else
if founderr=false and Hx66_Grade=0 then
msgcontent="亲爱的用户"&Hx66_name&":"& chr(10) & webname&"正式接收你为VIP会员!"& chr(10) & "您的VIP资格有效期为:"&viptime&" 天,从"&now()&" 开始生效!"
conn.Execute("insert into message(incept,sender,title,content,sendtime) values('"&Hx66_name&"','"&webname&"','系统消息--VIP会员申请成功','"&CheckStr(msgContent)&"',now())")
sql="update [user] set UserGrade=1,VipinDate=date(),VipendDate=date()+'"&viptime&"',points=points-"&zvippoints&" where username='"&Hx66_name&"'"
conn.execute sql
response.Write"<script language=javascript>alert('您申请成功,恭喜您成为"&webname&"的VIP会员');this.location.href='User_main.asp?action=vip';</script>"
end if
end if
end sub
'****************************************************
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -