⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showspecial.asp

📁 疯狂DJ联盟-v2.0 1.修改了V1.0的几个错误. 2.首页生成HTM 大大加快了访问速度 3.歌曲播放页面全部调用HTM播放器.减轻了服务器的负担. 4.增加了站内统计,全部访问次数
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="INC/CHAR.INC"-->
<!--#include file="function.asp"-->
<%
if not isempty(request("page")) then
	currentPage=cint(request("page"))
else
	currentPage=1
end if
%>


<%
Specialid=request.QueryString("Specialid")
set rs=server.createobject("adodb.recordset")
sql="select * from Special where Specialid="&cstr(Specialid)
rs.open sql,conn,1,3
if rs.EOF then
	errmsg= "<li>服务器出错!请联系管理员</li>"
	call error()
	Response.End 
else
	rs("hits")=rs("hits")+1
	rs.update
	hits=rs("hits")
	Classid=rs("Classid")
	name=rs("name")
	pic=rs("pic")
	intro=rs("intro")
	dateandtime=DateValue(rs("dateandtime"))
	pollot=rs("pollot")
	pollots=rs("pollots")
end if
rs.close
%>
<!--#include file="top.asp"-->
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="773" id="AutoNumber1"  align="center">
          <tr>
      
    <td bgcolor="#30393D" align="center">
      <table width="730" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="border-collapse: collapse">
        <tr bgcolor="#3f4042"> 
          <td width="200" valign="top" bgcolor="#3f4042" align="center"> 
          <br><br>  <br><%if isNull(Pic) then%>
            <img border="0" src="<%=NoPic%>" width="90" height="90">
            <%else%>
            <img src="<%=pic%>" alt="专辑图片" width="90" height="90"> 
            <%end if%>
            <br>
            <br>
            <p>专 辑:<%=name%><br>
              点击:<%=hits%><br>
              添加时间:<%=dateandtime%><br>
              专辑简介: 
              <%if intro="" then%>
              <%else%>
              <%=htmlencode3(intro)%> 
              <%end if%>
          </td>
          <th valign="top" align="center"> 
            <%
sql="select * from MusicList where Specialid="&cstr(Specialid)
rs.open sql,conn,1,1
if rs.EOF then
	response.write "未收录歌曲"
else
MaxPerPage=25
	PageUrl="showspecial.asp"
	totalPut=rs.recordcount 
	if currentpage<1 then currentpage=1
	if (currentpage-1)*MaxPerPage>totalput then 
		if (totalPut mod MaxPerPage)=0 then 
			currentpage= totalPut \ MaxPerPage 
		else 
			currentpage= totalPut \ MaxPerPage + 1 
		end if 
	end if 
	if currentPage=1 then 
		showpage totalput,MaxPerPage,PageUrl
		showContent 
		showpage totalput,MaxPerPage,PageUrl
	else 
		if (currentPage-1)*MaxPerPage<totalPut then 
			rs.move  (currentPage-1)*MaxPerPage 
			dim bookmark 
			bookmark=rs.bookmark 
			showpage totalput,MaxPerPage,PageUrl
			showContent 
			showpage totalput,MaxPerPage,PageUrl
		else 
			currentPage=1 
			showpage totalput,MaxPerPage,PageUrl
			showContent 
			showpage totalput,MaxPerPage,PageUrl
		end if 
	end if 
end if 
rs.close 
			
sub showContent 

%>
            <table cellpadding="0" cellspacing="1" bgcolor="2E5667" class="TableLine" style="border-collapse: collapse" width="98%">
              <form name="form2" onSubmit="javascript:return lbsong();" target="Listen" action="playsong.asp">
                <tr> 
                  <td width="7%" height=22 align=center bgcolor="#30393D">选择</td>
                  <td width="46%" height=22 align=center bgcolor="#30393D">歌曲名字</td>
                  <td width="8%" height=22 align=center bgcolor="#30393D">点击</td>
                  <td width="8%" height=22 align=center bgcolor="#30393D">试听</td>
                  <td width="8%" height=22 align=center bgcolor="#30393D">铃声</td>
                  <td width="8%" height=22 align=center bgcolor="#30393D">收藏</td>
                </tr>
                <%
i=0
do while not rs.eof
	i=i+1
%>
                <tr> 
                  <td width="7%" align=center bgcolor="#30393D"> 
                    <input type="checkbox" name="checked" value="#">
                  </td>
                  <td width="46%" bgcolor="#30393D"> <%=i%>. 
                    <%
                            musictype=rs("musictype")
                              if musictype=1 then
                              %>
                    <a href=songreal.asp?id=<%=rs("id")%> target=_blank"dj"> 
                    <font color="#FFFFFF"><%=rs("MusicName")%></font></a> 
                    <%else if musictype=2 then%>
                    <a href=songmedia.asp?id=<%=rs("id")%> target=_blank"dj"> 
                    <font color="#FFFFFF"><%=rs("MusicName")%></font></a> 
                    <%else if musictype=3 then%>
                    <a href=songflash.asp?id=<%=rs("id")%> target=_blank"dj"> 
                    <font color="#FFFFFF"><%=rs("MusicName")%></font></a> 
                    <%end if%>
                    <%end if%>
                    <%end if%>
                  </td>
                  <td width="8%" align=center bgcolor="#30393D"><%=rs("hits")%> </td>
                  <td width="8%" align=center bgcolor="#30393D"> 
                    <%
                              musictype=rs("musictype")
                              if musictype=1 then
                              %>
                    <a href=songreal.asp?id=<%=rs("id")%> target=_blank"dj"> 
                    <img src="images/playreal.gif" border="0" alt="试听 使用RealPlayer播放" ></a> 
                    <%else if musictype=2 then%>
                    <a href=songmedia.asp?id=<%=rs("id")%> target=_blank"dj"> 
                    <img src="images/playmedia.gif" border="0" alt="试听 使用MediaPlayer播放" ></a> 
                    <%else if musictype=3 then%>
                    <a href=songflash.asp?id=<%=rs("id")%> target=_blank"dj"> 
                    <img src="images/playflash.gif" border="0" alt="试听 使用Flash6.0播放" ></a> 
                    <%end if%>
                    <%end if%>
                    <%end if%>
                  </td>
                  <td width="8%" align=center bgcolor="#30393D"><a  href="http://search.caishow.com/search/ring_body.asp?f=5562&search=<%=rs("MusicName")%>" target=_blank><img src=images/sms.gif border=0 title=和弦铃声></a></td>
                  <td width="8%" align=center bgcolor="#30393D"><a href="UserCollect.asp?action=add&id=<%=rs("id")%>" target="Collect"> 
                    <img src="images/heart.gif" border=0 alt="收藏"></a></td>
                </tr>
                <%
	if i>=MaxPerPage then exit do
rs.movenext
loop
%>
                <tr bgcolor="#30393D"> 
                  <td colspan=6 align=center> 
                    <input type="hidden" name="Specialid" value="<%=Specialid%>">
                    <input type="button" name="chkall" value="全 选" onClick="CheckAll(this.form)" title="选择显示的所有歌曲" style="border:0px solid #1A8CFF; FONT-SIZE: 12px; COLOR: #828F9B; BACKGROUND-COLOR: #171A1C; TEXT-DECORATION: overline underline">
                    <input type="button" name="chkOthers" value="反 选" onClick="CheckOthers(this.form)" title="反向选择歌曲" style="border:0px solid #1A8CFF; FONT-SIZE: 12px; COLOR: #828F9B; BACKGROUND-COLOR: #171A1C; TEXT-DECORATION: overline underline">
                    <input type="submit" name="B1" value="连 播" title="请先选择你想听的歌曲后再点击连播" style="border:0px solid #1A8CFF; FONT-SIZE: 12px; COLOR: #828F9B; BACKGROUND-COLOR: #171A1C; TEXT-DECORATION: overline underline">
                  </td>
                </tr>
              </form>
            </table>
            <%
end sub 

function showpage(totalnumber,maxperpage,filename)
if totalnumber mod maxperpage=0 then
	n= totalnumber \ maxperpage
else
	n= totalnumber \ maxperpage+1
end if
%>
            <form method=Post action="<%=filename%>?specialid=<%=specialid%>">
              <center>
                <p><font color="#FFFFFF" size="2">共<b><%=totalnumber%></b>首舞曲 
                  <%if CurrentPage<2 then%>
                  &nbsp;首页 上一页&nbsp; 
                  <%else%>
                  &nbsp;<a href="<%=filename%>?page=1&specialid=<%=specialid%>">首页</a>&nbsp;<a href="<%=filename%>?page=<%=CurrentPage-1%>&specialid=<%=specialid%>"> 
                  上一页</a>&nbsp; 
                  <%
end if
if n-currentpage<1 then
%>
                  下一页 末页 
                  <%else%>
                  <a href="<%=filename%>?page=<%=CurrentPage+1%>&specialid=<%=specialid%>"> 
                  下一页</a> <a href="<%=filename%>?page=<%=n%>&specialid=<%=specialid%>"> 
                  末页</a> 
                  <%end if%>
                  &nbsp;页次:<strong><%=CurrentPage%>/<%=n%></strong>页 转到:</font> 
                  <select name="page" size="1" onChange="javascript:submit()">
                    <%for i = 1 to n%>
                    <option value="<%=i%>" <%if cint(CurrentPage)=cint(i) then%> selected <%end if%>> 
                    第<%=i%>页</option>
                    <%next%>
                  </select>
                </p>
              </center>
            </form>
            <center>
              <%end function%>
            </center>
          </th>
        </tr>
      </table>
    </td>
    </tr>
  </table>

<!--#include file="friendsite.asp"-->


<%
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -