gusucode.com > ASP+ACCESS音乐网站建设设计(源代码+论文+开题报告+答辩PPT+外 > ASP+ACCESS音乐网站建设设计(源代码+论文+开题报告+答辩PPT+外文翻译)\音乐网站设计\ADMIN\Myg.asp

    <% Response.Buffer=True %>
<!--#include file="dbconn.inc"-->
<% if request("del")<>"" then 
   conn.Execute("delete * from yougou where id="&request("del"))
   end if %>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<link rel="stylesheet" href="../inc/index.css" type="text/css">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>我爱音乐网—&gt;管理页面</title>
</head>
<script LANGUAGE="JavaScript">
<!--//
function check()
{
   if (isNaN(go2to.page.value))
		alert("请正确填写转到页数!");
   else if (go2to.page.value=="") 
	     {
		alert("请输入转到页数!");
		 }
   else
		go2to.submit();
}
//-->
</script>
<script language="JavaScript" src="../inc/window.js"></script>
<body topmargin="0" leftmargin="0">

  <table border="0" cellpadding="0" cellspacing="0" width="780" height="450">
    <tr>
      <td width="778" height="14" valign="top" colspan="3" bgcolor="#396BA5"></td>
    </tr>
  <tr>
    <td valign="top" height="424" width="176" bgcolor="#E1E1E1">
       
      <div align="center">
        <center>
        <table border="0" cellpadding="0" cellspacing="0" width="118" background="../images/stat-bg.GIF">
          
          <tr>
           <tr>
              <td height="26"> 
                <p align="center">
      <a href="mnews.asp">
      新闻管理</a>
            </td>
          </tr>
          <tr>  
			  <td height="27"> 
                <p align="center"><a href="mkq.asp">管理歌曲</a>
            </td>
          </tr>
          <tr>
              <td height="27"> 
                <p align="center"><a href="myg.asp">管理邮购</a>
            </td>
          </tr>
         <tr>
              <td height="27"> 
                <p align="center"><a href="mtz.asp">管理帖子</a>
            </td>
          </tr>
		  <tr>
              <td height="27"> 
                <p align="center"><a href="reset.asp">调查重置</a>
            </td>
          </tr>
          <tr>
              <td height="27"> 
                <div align="center"><a href="exit.asp">退出登录</a></div>
              </td>
          </tr>
        </table>
        </center>
      </div>
      <p align="center">&nbsp;
    </td>
    <td valign="top" height="424" width="1" bgcolor="#396BA5">
     
    </td>  
	
	<td valign="top" height="424" width="602">
    <div align="center">
     
     <% set rs=server.createobject("adodb.recordset") 
     if not isempty(request("page")) then   
     pagecount=cint(request("page"))   
     else   
     pagecount=1   
     end if
     sql="select * from yougou order by id desc" 
	 rs.open sql,conn,1,1   
     if rs.eof and rs.bof then   
     response.write"<BR>" 
	 response.write"=== 暂无记录 ==="
     response.write"<BR><BR>"
	 response.write"[<a href='addnews.asp' target='_blank'><font color='#000060'>添加邮购|NEWS</font></a>]"
	 response.end  
	 end if
	 
     rs.pagesize=10
     if pagecount>rs.pagecount or pagecount<=0 then              
     pagecount=1              
     end if              
     rs.AbsolutePage=pagecount %> 
	 <table border="1" cellpadding="0" cellspacing="0" width="545" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
        <tr>
          <td height="1" colspan="4" valign="bottom" width="541"><font color="#000000">&nbsp;</font></td> 
        </tr>
        <tr>
		   <% if rs.pagecount=1 then %>
		   <td width="541" height="6" colspan="4" valign="bottom">
          <font color="#000000">共有[<font color="#ff0000"><%=rs.recordcount%></font>]条邮购物品                        
		  以下是[<font color="red">1~<%=rs.recordcount%></font>]条</font></td>             
        </tr>
        <tr>
          <td width="541" height="7" colspan="4" valign="bottom"></td>
        </tr>
        <%else%>
		<tr>
		 <td width="541" height="6" colspan="4" valign="bottom"><font color="#000000">
		 <% page_start=(pagecount-1)*rs.pagesize
            if pagecount=1 then page_start=1
		    page_end=rs.pagesize*pagecount
		    if pagecount*rs.pagesize=>rs.recordcount then page_end=rs.recordcount end if%>
         共有[<font color="#ff0000"><%=rs.recordcount%></font>]条邮购物品                          
         以下是[<font color="red"><%=page_start%>~<%=page_end%></font>]条</font></td>          
        </tr>
        <tr>
		  <td width="541" height="6" colspan="4" valign="bottom">
		  <% response.write"<form name=go2to  method=Post action='myg.asp?key="+key+"'>"
		     response.write "<font color='#000064'>◆&nbsp;</font>"                                              
		     if pagecount=1 then                                                        
			 response.write "<font color='#000064'>首页 上一页</font>&nbsp;"
			 else                                                        
             response.write "<a href=myg.asp?page=1&key="+key+"><font color='0000BE'>首页</font></a>&nbsp;" 
	         response.write "<a href=myg.asp?page="+cstr(pagecount-1)+"&key="+key+"><font color='0000BE'>上一页</font></a>&nbsp;"
			 end if                                             
             if rs.PageCount-pagecount<1 then                                                        
             response.write "<font color='#000064'>下一页 尾页</font>"                                                    
			 else                                                        
             response.write "<a href=myg.asp?page="+cstr(pagecount+1)+"&key="+key+"><font color='0000BE'>下一页</font></a>&nbsp;"
			 response.write "<a href=myg.asp?page="+cstr(rs.PageCount)+"&key="+key+"><font color='0000BE'>尾页</font></a>"           
             end if 
			 response.write "<font color='000064'>&nbsp;页次:<font color=blue>"&pagecount&"</font>/"&rs.pagecount&"页</font>" 
			response.write "<font color='000064'> 转到第<input type='text' name='page' size=2 maxLength=3 style='font-size: 9pt; color:#00006A; position: relative; height: 18' value="&PageCount&">页</font>&nbsp;"                               
			response.write "<input class=button type='button' value='确 定' onclick=check() style='font-family: 宋体; font-size: 9pt; color: #000073; position: relative; height: 19'>"       
             %>  
			 </td>
        </tr>
       </form>
	  <%end if%>
	  <tr>
      <td height="3" valign="top" colspan="4" bgcolor="#000000" width="541">
      </td>
        </tr>
    
        <tr>
          <td width="45" height="18" bgcolor="#EBEEF3" valign="bottom">
            <p align="center">NewsID</p>
          </td>
  
          <td width="279" height="18" bgcolor="#EBEEF3" valign="bottom">&nbsp;标   
            题</td>
          <td height="18" bgcolor="#EBEEF3" valign="bottom" width="134"><p align="center">发布日期</p></td>
          <td height="18" bgcolor="#EBEEF3" valign="bottom" width="77">
            <p align="center">- 删除 -</td>     
        </tr>
         <% do while not rs.eof %> 
		<tr>
      <td width="45" height="18" bgcolor="#EBEEF3" valign="bottom">
        <p align="center"><%=rs("id")%></p>
      </td>
  <td width="279" height="18" bgcolor="#EBEEF3" valign="bottom">&nbsp;<a href="javascript:openwin('xgyg.asp?id=<%=rs("id")%>','top=20,left=360,width=500,height=410')"><% if len(rs("zjmc"))>20 then%><%=Left(rs("zjmc"),20)%>...<%else%><%=rs("zjmc")%><%end if%></a></td>
          <td width="134" height="18" bgcolor="#EBEEF3" valign="bottom"><p align="center">[<%=rs("time")%>]</p></td>
          <td width="77" height="18" bgcolor="#EBEEF3" valign="bottom">
            <p align="center"><font color="#000046">[</font><a href="myg.asp?del=<%=rs("id")%>"><font color="#000046">删除</font></a><font color="#000046">]</font></td>
        </tr>
        <% i=i+1                                                                                                  
          rs.movenext                                                                                                  
          if i>=rs.PageSize then exit do 
		  loop                                                                    
          rs.close                                                                                                
          set rs=nothing                                                                                                
          conn.close                                                                                                
          set conn=nothing %>
		<tr>
      <td height="3" valign="top" colspan="4" bgcolor="#000000" width="541">
      </td>
        </tr>
    
        <tr>
          <td height="8" valign="bottom" colspan="4" width="541">
            <p align="center"><br>
      <center>
      [<a href="javascript:openwin('addyg.asp','top=20,left=200,width=500,height=410')"><font color="#000060">添加邮购物品</font></a>]</center>
          </td>
        </tr>
      </table>
    </div>
    </td>
  </tr>
    <tr>
    <td valign="top" height="12" width="780" bgcolor="#396BA5" colspan="3">
       
    </td>
    </tr>
  </table>
</body>

</html>