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

📄 a.asp

📁 翱翔设计[天绿色]音乐版V4.0翱翔设计[天绿色]音乐版V4.0
💻 ASP
字号:
<!--#include file="conn.asp"-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<%         
set rs = server.createobject("adodb.recordset")                                                                     
sql = "select * from music order by id desc"                    
rs.open sql,conn,1,1                                      
if rs.eof then                            
response.write "<p align=center><font color=red>暂无歌曲</font></p>"                           
response.end                            
else                            
const maxperpage=20                            
dim currentpage                            
rs.pagesize=maxperpage                            
currentpage=request.querystring("pageid")                            
if currentpage="" then                            
currentpage=1                            
elseif currentpage<1 then                            
currentpage=1                            
else                            
currentpage=clng(currentpage)                            
	if currentpage > rs.pagecount then                            
	currentpage=rs.pagecount                            
	end if                            
end if                            
                            
if not isnumeric(currentpage) then                            
currentpage=1                            
end if                            
dim totalput,n                            
totalput=rs.recordcount                            
if totalput mod maxperpage=0 then                            
n=totalput\maxperpage                            
else                            
n=totalput\maxperpage+1                            
end if                            
if n=0 then                            
n=1                            
end if                            
rs.move(currentpage-1)*maxperpage          
%>
<table width="28%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#393939" bordercolordark="#cccccc">
  <%                                         
i=0                         
w=1                            
do while i< maxperpage and not rs.eof                                           
%>
  <FORM action=playsong.ASP name=form2 
                      onsubmit="javascript:return lbsong();" target=lbsong>
    <tr bgcolor="#FFFFFF">
      <td width="37%" height="25" align="center" bgcolor="#99CCFF"><div align="center">[<font color="#000000"><%=rs("who")%>]</font></div></td>
      <td width="63%" height="25" bgcolor="#99CCFF"><div align="left"><font color="#000000"> </font><font color="#000000">
          <% if len(rs("name"))>16 then %>
          <%=Left(rs("name"),16)%>
          <% else %>
          <%=rs("name")%>
          <% end if %>
          <%if not rs("date") < date then%>
&nbsp;
          <%end if%>
          <%if session("admin")<>"" then%>
&nbsp;&nbsp;
          <%end if%>
      </font></div></td>
    </tr>
    <%                        
i=i+1                             
w=w+1                                            
rs.movenext                                     
loop                    
end if                                       
rs.Close                                      
%>
  </form>
</table>
</body>

⌨️ 快捷键说明

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