📄 syscode_dj.asp
字号:
<%
'****************************************************
if guestdj<>"yes" and UserLogined<>True then
call guesterror()
response.end
end if
dim dj_id,djcat_id,Specialid
dim founderr,errmsg,Rshxcms
if request.querystring("dj_id")<>"" then
if not isInteger(request.querystring("dj_id")) then
Response.Redirect "show_error.asp?eid=传值参数非法!"
Response.End
end if
dj_id=CLng(request("dj_id"))
else
dj_id=0
end if
if request.querystring("djcat_id")<>"" then
if not isInteger(request.querystring("djcat_id")) then
Response.Redirect "show_error.asp?eid=传值参数非法!"
Response.End
end if
djcat_id=CLng(request("djcat_id"))
else
djcat_id=0
end if
if request.querystring("Specialid")<>"" then
if not isInteger(request.querystring("Specialid")) then
Response.Redirect "show_error.asp?eid=传值参数非法!"
Response.End
end if
Specialid=CLng(request("Specialid"))
else
Specialid=0
end if
if dj_id>0 then
sql="select * from dj where dj_id="&dj_id
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if rs.bof and rs.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>你要找的音乐不存在,或者已经被管理员删除!</li>"
else
if rs("Passed")=1 then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>你要找的音乐尚未被管理员审核!</li>"
else
start="音乐视听 - "&rs("dj_name")&""
djcat_id=CLng(rs("djcat_id"))
rs("dj_count")=rs("dj_count")+1
rs.update
end if
end if
end if
if Specialid>0 then
sql="select * from djspecial where Specialid="&Specialid
set rszj=server.createobject("adodb.recordset")
rszj.open sql,conn,1,3
if rszj.bof and rszj.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>你要找的专集不存在,或者已经被管理员删除!</li>"
else
start="专集试听 - "&rszj("name")&""
djcat_id=rszj("ClassID")
zjpic=rszj("pic")
zjname=rszj("name")
zjuser=rszj("zjuser")
zjhits=rszj("hits")
zjYuyan=rszj("Yuyan")
zjGongsi=rszj("Gongsi")
zjtime=rszj("dateandtime")
zjintro=rszj("intro")
rszj("hits")=rszj("hits")+1
rszj.update
rszj.close
set rszj=nothing
end if
end if
'=================================================
if FoundErr=True then
Call HxErrMsg()
response.end
end if
'=================================================
'过程名:error_dj
'作 用:音乐连接错误报告
'参 数:无
'Web: www.ynsky.com.cn
'=================================================
if request.querystring("action")="djerror" then
Call error_dj()
response.end
end if
'=================================================
sub error_dj()
sql="UPDATE dj SET error = error + 1 where dj_id="&rs("dj_id")
conn.execute(sql)
rs.close
set rs=nothing
Response.write "<script language = 'javascript'>alert('感谢你向我们报告了错误,我们会尽快恢复歌曲连接!');</script>"
Response.write "<p align=""center"" height=""100"" style=""font-size:14px;color:#ff0000;"">错误报告已经发出,谢谢你的支持!<BR><BR><a href=""index.asp""> << 返回首页</a></p>"
end sub
'=================================================
'过程名:main_dj
'作 用:显示音乐位置导航
'参 数:无
'Web: www.ynsky.com.cn
'=================================================
sub main_dj()
if djcat_id>0 then
Response.Write " 您的位置: <a href='index.asp'>"&webname&"</a> >> <a href='dj.asp'>歌曲音乐</a>" & vbCrLf
sql="select * from djcat where djcat_id="&djcat_id
set rs3=conn.execute(sql)
if rs3.eof then
Response.Redirect "show_error.asp?eid=参数错误,找不到相关的记录!"
Response.End
End IF
if rs3("sid")<>"0" then
sql="select * from djcat where djcat_id="&rs3("sid")
set rs4=conn.execute(sql)
Response.Write " >> <a href=""dj.asp?djcat_id="&rs4("djcat_id")&""">"&rs4("djcat_name")&"</a>"
rs4.close
set rs4=nothing
end if
Response.Write " >> <a href=""dj.asp?djcat_id="&rs3("djcat_id")&""">"&rs3("djcat_name")&"</a>"
rs3.close
set rs3=nothing
else
Response.Write " 您的位置: <a href='index.asp'>"&webname&"</a> >> <a href='dj.asp'>歌曲音乐</a>" & vbCrLf
end if
end sub
'=================================================
'过程名:top_dj
'作 用:热门单曲排行
'参 数:n-调用条数,nn-显示长度
' NewWindows-----是否新窗打开,True为是,False为否
'Web: www.ynsky.com.cn
'=================================================
sub top_dj(n,nn,NewWindows)
dim nnn
if NewWindows=True then
nnn="target='_blank'"
else
nnn=""
end if
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 border=0 align='center'>" & vbCrLf
set Rshxcms=server.createobject("adodb.recordset")
set Rshxcms=conn.execute("SELECT top "&n&" * FROM dj where passed=0 ORDER by dj_count DESC,dj_id DESC")
do while not Rshxcms.eof
Response.Write "<tr><td height=22 class=table-xia><font color=#FF0000>·</font><a href='showdj.asp?dj_id="&Rshxcms("dj_id")&"' Title='歌曲名称:"&Rshxcms("dj_name")&"
视听次数:"&Rshxcms("dj_count")&"
上传时间:"&Rshxcms("dj_date")&"' "& nnn &">"&gotTopic(Rshxcms("dj_name"),nn)&"</a></td><td height=22 class=table-xia align=right><a href='djplaylist.asp?checked="&Rshxcms("dj_id")&"&player=+' onclick=""HxWindow(this.href,'dj','350','260','no','no','center');return false"" Title='点击单首弹窗试听'><img border='0' src='img/play_dj/bt_play.gif' width='14' height='14'></a> </td></tr>" & vbCrLf
Rshxcms.movenext
loop
if Rshxcms.bof and Rshxcms.eof then
Response.Write "<tr><td align='center' valign='middle'>当前没有歌曲!</td></tr>"
end if
Rshxcms.close
set Rshxcms=nothing
Response.Write "</TABLE>" & vbCrLf
end sub
'=================================================
'过程名:topzj_dj
'作 用:热门专集排行
'参 数:n-调用条数,nn-显示长度
' NewWindows-----是否新窗打开,True为是,False为否
'Web: www.ynsky.com.cn
'=================================================
sub topzj_dj(n,nn,NewWindows)
dim nnn
if NewWindows=True then
nnn="target='_blank'"
else
nnn=""
end if
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 border=0 align='center'>" & vbCrLf
set rszj=server.createobject("adodb.recordset")
set rszj=conn.execute("SELECT top "&n&" * FROM djspecial ORDER by hits DESC,SpecialID DESC")
do while not rszj.eof
Response.Write "<tr><td height=22 class=table-xia><font color=#FF0000>·</font><a href='Showdj_Special.asp?Specialid="&rszj("SpecialID")&"' Title='专集名称:"&rszj("name")&"
视听次数:"&rszj("hits")&"
上传时间:"&rszj("dateandtime")&"' "& nnn &">"&gotTopic(rszj("name"),nn)&"</a></td></tr>" & vbCrLf
rszj.movenext
loop
if rszj.bof and rszj.eof then
Response.Write "<tr><td align='center' valign='middle'>当前没有专集!</td></tr>"
end if
rszj.close
set rszj=nothing
Response.Write "</TABLE>" & vbCrLf
end sub
'=================================================
'过程名:best_dj
'作 用:推荐歌曲
'参 数:n-调用条数,nn-显示长度
' NewWindows-----是否新窗打开,True为是,False为否
'Web: www.ynsky.com.cn
'=================================================
sub best_dj(n,nn,NewWindows)
dim nnn
if NewWindows=True then
nnn="target='_blank'"
else
nnn=""
end if
Response.Write "<TABLE width='100%' cellSpacing=0 cellPadding=0 border=0 align='center'>" & vbCrLf
set Rshxcms=server.createobject("adodb.recordset")
set Rshxcms=conn.execute("SELECT top "&n&" * FROM dj where isbest = 1 order by dj_id desc")
do while not Rshxcms.eof
Response.Write "<tr><td height=22 class=table-xia><font color=#FF0000>·</font><a href='showdj.asp?dj_id="&Rshxcms("dj_id")&"' Title='歌曲名称:"&Rshxcms("dj_name")&"
视听次数:"&Rshxcms("dj_count")&"
上传时间:"&Rshxcms("dj_date")&"' "& nnn &">"&gotTopic(Rshxcms("dj_name"),nn)&"</a></td><td height=22 class=table-xia align=right><a href='djplaylist.asp?checked="&Rshxcms("dj_id")&"&player=+' onclick=""HxWindow(this.href,'dj','350','260','no','no','center');return false"" Title='点击单首弹窗试听'><img border='0' src='img/play_dj/bt_play.gif' width='14' height='14'></a> </td></tr>" & vbCrLf
Rshxcms.movenext
loop
if Rshxcms.bof and Rshxcms.eof then
Response.Write "<tr><td align='center' valign='middle'>没有推荐歌曲!</td></tr>"
end if
Rshxcms.close
set Rshxcms=nothing
Response.Write "</TABLE>" & vbCrLf
end sub
'=================================================
'过程名:bestzj_dj
'作 用:推荐专集——图片显示
'参 数:n-调用条数,nn-显示长度
' ImgWidth ----图片宽度
' ImgHeight ----图片高度
' NewWindows-----是否新窗打开,True为是,False为否
'Web: www.ynsky.com.cn
'=================================================
sub bestzj_dj(n,nn,ImgWidth,ImgHeight,NewWindows)
dim nnn
if NewWindows=True then
nnn="target='_blank'"
else
nnn=""
end if
Response.Write "<TABLE width='100%' cellSpacing=5 cellPadding=0 border=0 align='center'><tr>" & vbCrLf
set rszj=server.createobject("adodb.recordset")
set rszj=conn.execute("SELECT top "&n&" * FROM djSpecial where isbest=1 order by Specialid desc")
do while not rszj.eof
Response.Write "<td align='center'><a href='Showdj_Special.asp?Specialid="&rszj("SpecialID")&"' Title='最新专辑:"&rszj("name")&"' "& nnn &">" & vbCrLf
if rszj("pic")<>"" then
Response.Write "<img src='"&rszj("pic")&"' width="&ImgWidth&" height="&ImgHeight&" border=0 alt='最新推荐专辑:"&rszj("name")&"'>" & vbCrLf
else
Response.Write "<img src='updj/pic/nopic.gif' width="&ImgWidth&" height="&ImgHeight&" border=0 alt='最新推荐专辑:"&rszj("name")&"'>" & vbCrLf
end if
Response.Write "</a><br><a href='Showdj_Special.asp?Specialid="&rszj("SpecialID")&"' Title='最新推荐专辑:"&rszj("name")&"' "& nnn &">"&gotTopic(rszj("name"),nn)&"</a></td>" & vbCrLf
rszj.movenext
loop
if rszj.bof and rszj.eof then
Response.Write "<td align='center' valign='middle'>没有推荐专集!</td>"
end if
rszj.close
set rszj=nothing
Response.Write "</tr></TABLE>" & vbCrLf
end sub
'=================================================
'过程名:class_dj
'作 用:歌曲分类——纵排
'参 数:无
'Web: www.ynsky.com.cn
'=================================================
sub class_dj()
sql="select * from djcat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
if request("djcat_id")=cstr(rs1("djcat_id")) then
response.write " <font color=""#FF0000"">·"&rs1("djcat_name")&"</a></font><BR>"
else
response.write " <a href='?djcat_id="&rs1("djcat_id")&"'>·"&rs1("djcat_name")&"</a><BR>"
end if
sql="select * from djcat where sid="&rs1("djcat_id")
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof
if request("djcat_id")=cstr(rs2("djcat_id")) then
response.write " <font color=""#FF0000"">├ "&rs2("djcat_name")&"</a></font><BR>"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -