<!--#include file="conn.asp"-->
<!--#include file="263const.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel=stylesheet type=text/css>
<title><%=Webname%>-免费点歌-点歌列表</title>
<script src=../js/header.js></script>
<script language="javascript">
<!--
function mp(htmlurl){
var
newwin=window.open(htmlurl,"52050004","top=2,left=2,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=460,height=620");
newwin.focus();
return false;
}
//-->
</script>

</head>

<BODY leftMargin=0 background="images/bj.gif" topMargin=0>
<div align="center">

<table border="0" width="770" cellspacing="0" cellpadding="0">
	<tr>
		<td width="157"><img border="0" src="images/TOP1.gif" width="157" height="17"></td>
		<td width="593" background="images/TOP2.gif">　</td>
		<td width="10"><img border="0" src="images/TOP3.gif" width="10" height="17"></td>
	</tr>
</table>

<table border="0" width="770" cellspacing="0" cellpadding="2" background="images/top4.gif">
	<tr>
		<td align="center" width="50"><img border="0" src="images/icon1.gif" width="23" height="24"></td>
		<td><%=Webname%>点歌台,送给好友一份最真挚的祝福!</td>
		<td width="100"><a href="add.asp"><img border="0" src="images/dg.gif" width="86" height="22"></a></td>
	</tr>
</table>

<table width="770" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFF3F7" bgcolor="#FFFFFF" style="border-collapse: collapse">
	<tr>
		<td bgcolor="#FFF3F7" width="150" align="center" valign="top"><img border="0" src="images/girl.gif" width="150" height="500"></td>
		<td align="center" valign="top">
		<!--右-->

<table border="0" width="98%" cellspacing="0" cellpadding="5">
	<tr>
		<td align="center"><a href="index.asp"><img border="0" src="images/dgt.gif" title=首页 width="350" height="50"></a></td>
	</tr>
</table>  
<table border="0" cellpadding="5" width="98%" cellspacing="0">
   <tr align="center">
     <td width="23%">歌曲名称</td>
     <td width="5%">收听</td>
     <td width="15%">点歌人</td>
     <td width="15%">受赠人</td>
     <td width="12%">点歌时间</td>
     <td width="20%">祝福词</td>
   </tr>
<%
sql="select * from basic order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof then
response.write "<tr><td colspan='5' align='center'>暂时还没有人点歌,你愿意做第一个吗?</td></tr></table>"
else

     '####开始分页########
pageid = cint(request.querystring("pageid"))
if pageid = "" or pageid =< 1 then
pageid = 1
end if

maxperpage = 30
rs.pagesize = maxperpage
mpage = rs.pagecount       '得到总页数
totalput = rs.recordcount  '得到总记录数
rs.move(pageid-1)*maxperpage

For i = 1 to maxperpage
if rs.EOF then Exit For
id=rs("id")
title=rs("title")
musicid=rs("musicid")
myname=rs("myname")
yourname=rs("yourname")
jtime=rs("jtime")
content=rs("content")
%>
   <tr>
     <td colspan="6" background="images/dbg.gif" height="1"></td>
   </tr>
   <tr>
     <td align="center"><a href="chakan.asp?id=<%=id%>" title=点击查看详细信息><%if len(rs("title")) > 11 then Response.write left(rs("title"),11)&".." else Response.write rs("title") end if%></td>
     <td align="center"><a href="music.asp?id=<%=id%>" title=点击收听 onClick='return mp(this.href);'><img border="0" src="images/st.gif" width="17" height="17"></a></td>
     <td align="center"><%if len(rs("myname")) > 6 then Response.write left(rs("myname"),6)&".." else Response.write rs("myname") end if%></td>
     <td align="center"><%if len(rs("yourname")) > 6 then Response.write left(rs("yourname"),6)&".." else Response.write rs("yourname") end if%></td>
     <td align="center"><%if len(rs("jtime")) > 10 then Response.write left(rs("jtime"),10)&"" else Response.write rs("jtime") end if%></td>
     <td align="center"><%if len(rs("content")) > 8 then Response.write left(rs("content"),8)&".." else Response.write rs("content") end if%></td>
   </tr>
<%
rs.MoveNext
next
rs.close
set rs=nothing
conn.close
set conn=nothing
%> 
</table>
<table border="0" width="98%" cellspacing="0" cellpadding="8">
	<tr>
		<td align="center">
页数：<font color="red"><%=pageid%></font>/<%=mpage%>&nbsp;                              
<%if pageid <> 1 then%>
<a href="?pageid=1">首页</a>         
<a href="?pageid=<%=pageid-1%>">上一页</a>         
<%else%>         
<font color="silver">首页&nbsp;上一页</font>         
<%end if%>                                                                     
<%if pageid <> mpage then%>         
<a href="?pageid=<%=pageid+1%>">下一页</a>         
<a href="?pageid=<%=mpage%>">尾页</a>         
<%else%>         
<font color="silver">下一页&nbsp;尾页</font>         
<%end if%>                                                                     
共有<font color="red"><%=totalput%></font>条(每页<%=maxperpage%>条)         
<select name="select" onChange='javascript:window.open(this.options[this.selectedIndex].value,"_self")'>
<%for i=1 to mpage%>         
<option value="?pageid=<%=i%>" <%if i=pageid then%>selected<%end if%>><%=i%>页</option>
<%next%>
</select>         
		</td>
	</tr>
</table>                                             	
<%end if%>		
		<!--右-->
		</td>
	</tr>
</table>                                                                                                                
<script src=../js/copy.js></script>
</div>
                                             
</body>
                                                             
</html>