<!-- #include file=../../inc/BBSsetup.asp -->
<!-- #include file=../../inc/Board_Popfun.asp -->

<!--#include file="conn.asp"-->
<%
DEF_BBS_HomeUrl = "../../"
siteHead("   本地歌曲列表")
%>
<html>
<head>
<title>本地歌曲列表</title>

<script language=javascript>
function del(){
 if(!confirm("您确认删除！\n注意：删除之后将不可恢复！"))
 return false;
}
</script>
</head>
<body topmargin=2 leftmargin=0 >
<table width=98% align=center border=0 cellspacing=1 cellpadding=5 align=center bgcolor=<%=DEF_BBS_DarkColor%> class=TBone>
 <tr class=tbhead2>
   <td height=25 align=center><font class=headfont><b>本地歌曲列表</b></font></td>
 </tr>
</table>

<table width=98% align=center border=0 cellspacing=1 cellpadding=5 align=center bgcolor=<%=DEF_BBS_DarkColor%> class=TBone>
 
<%
dim rs,sql
dim totalfilm,Page  
dim i,ipage
dim myself

    set rs=server.createobject("adodb.recordset")
    sql="select * from dgname"
    rs.open sql,connDG,1,1
    if rs.eof or rs.bof then
       response.write "<tr bgcolor=#ffffef><td colspan=2>未添加歌曲</td></tr>"
    else

rs.PageSize = 12 '定义每页显示数量
Page = CLng(Request("Page"))
totalfilm=rs.recordcount

If Page < 1 Then Page = 1
If Page > rs.PageCount Then Page = rs.PageCount
i=page+(page-1)*11
rs.AbsolutePage = Page
For iPage = 1 To rs.PageSize
%>
 <tr class=tbbg1>
<%
if CheckSupervisorUserName <> 1 and instr(DEF_SupervisorUserName,","&GBL_CHK_User&",")=0 then
%>
   <td width=10% align=right><%=i%></td>
<%end if%>
   <td>
      <input name="alluser" type=radio id="alluser" value="" onClick="window.opener.document.all.url.value='<%=rs("url")%>';window.opener.document.all.medianame.value='<%=rs("name")%>'"> <%=rs("name")%>
   </td>
<%
if CheckSupervisorUserName = 1 or instr(DEF_SupervisorUserName,","&GBL_CHK_User&",")>0 then
%>
   <td width=18% align=center>
     <a href=admin_dg.asp?action=edit&id=<%=rs("id")%> target=parent>编辑</a> 
     <a href=admin_dg.asp?action=del&id=<%=rs("id")%> onclick="return del();">删除</a>
   </td>
<%end if%>
 </tr>
<%
      
  rs.MoveNext
  If rs.EOF Then Exit For
  i=i+1
  Next
end if

%>
<TR class=tbbg1>
   <FORM ACTION="<%=Myself%>" METHOD="GET">
   <TD colspan=2>   
<%
  if page<2 then
     response.write "首页 上一页 "
  else
%>
 <A HREF="<%=Myself%>?Page=1">首页</A> <A HREF="<%=Myself%>?Page=<%=(Page-1)%>">上一页</A>
                                 
<%                                      
  End If
  if page= rs.PageCount then
     response.write "下一页 尾页"
  else                                     
 %>                                         
 <A HREF="<%=Myself%>?Page=<%=(Page+1)%>">下一页</A> <A HREF="<%=Myself%>?Page=<%=rs.PageCount%>">尾页</A>                                         
<%End If%>                                   
   <br>
   【共<b><%=totalfilm%></b>首歌曲&nbsp页次：<b><%=Page%>/<%=rs.PageCount%></b>页&nbsp每页<b><%=rs.PageSize%></b>首】                               
   </TD> 
</FORM>
  </TR> 
  <tr class=tbbg1>
   <td align=center colspan=2 height=30 valign=middle>
      <input type=button value=关闭窗口 onclick="javascript:window.close()" class=fmbtn>
   </td>
  </tr>
</table>
</body>
</html>

