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

📄 news.asp

📁 此程序是对音像店的管理系统,测试播放音象等功能
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script language= "javascript">
function openpage(htmlurl) {
var newwin=window.open(htmlurl,"newWin","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=no,top=100,left=200,width=600,height=500");
newwin.focus();
return false;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新闻列表</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
td {  font-family: "Arial", "Helvetica", "sans-serif"; font-size: 12px; font-style: normal; line-height: 20px; font-weight: normal; font-variant: normal}

a:link {
	font-family: Arial, Helvetica, sans-serif;
	color: #336699;
	
}
a:visited {
	font-family: Arial, Helvetica, sans-serif;
	color: #336699;
	
}
a:hover {
	font-family: Arial, Helvetica, sans-serif;
	color: #FF6600;
	text-decoration: underline;
}
-->
</style></head>
<%set rs3=server.CreateObject("adodb.recordset")
 sql3="select * from y_news order by y_id desc"
 rs3.open sql3,conn,1,1
 if rs3.bof and rs3.eof then
 response.Write("当前没有新闻记录!")
 response.End()
 else
 page=request.QueryString("page")
												  rs3.pagesize=10
												  total=rs3.recordcount
												  if Not IsEmpty(trim(Request("Page"))) then 
 page = CInt(Request("page"))    
    if page > rs3.PageCount then 
        rs3.AbsolutePage = rs3.PageCount        
    elseif page <= 0 then 
        page = 1 
    else
        rs3.AbsolutePage = page 
    end if
End if
page = rs3.AbsolutePage%>
<body>
<center>
  <table width="613" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <th scope="row"><script language=javascript src=http://ivan.pagou.com/pagou_Script.aspx?width=200&info_show=1&search_box_show=1&adid=329&ad_width=610&ad_height=100></script></th>
    </tr>
  </table>
  <table width="613" height="99"  border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
    <tr align="center" bgcolor="#DDDDDD">
      <td height="26" colspan="3"><table width="100%"  border="0" cellspacing="2" cellpadding="0">
        <tr>
          <td width="85%" height="20" align="center">公司新闻</td>
          <td width="15%"><a href="login.asp">管理入口</a></td>
        </tr>
      </table></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="351" height="20" align="center">新闻标题</td>
      <td width="106" align="center">浏览次数</td>
      <td width="139" align="center">发布时间</td>
    </tr>
	<% 
For i = 1 to rs3.PageSize
 if rs3.EOF then
  Exit For 
 end if 
%>
    <tr bgcolor="#FFFFFF">
      <td height="24" align="left"><img src="dot.gif" width="9" height="9"> &nbsp;&nbsp;<a href="shownews.asp?id=<%=rs3("y_id")%>" onClick="return openpage(this.href);"><%=left(rs3("y_title"),20)%>...</a></td>
      <td align="center"><%=rs3("y_hits")%></td>
      <td align="center"><%=rs3("y_time")%></td>
    </tr>
	<%rs3.movenext
	next%>
    <tr align="center" bgcolor="#FFFFFF">
      <td height="24" colspan="3"><%if rs3.pagecount<>1 and rs3.pagecount<>0 then%>
 <%if page<rs3.pagecount then%>
  <%if page=1 then %>
   [首页] [上一页]
  <%else%>
   [<a Href="index.asp?page=<%=1%>">首页</a>]
   [<a Href="index.asp?page=<% =page-1 %>">上一页</a>]
  <% end if %>
  [<a Href="index.asp?page=<%=page+1%>">下一页</a>] 
  [<a Href="index.asp?page=<%=rs3.PageCount%>">尾页</a>]
 <%else%>
 [<a Href="index.asp?page=<% = 1%>">首页</a>]
 [<a Href="index.asp?page=<% =page -1 %>">上一页</a>]
 [下一页] [尾页]
 <%end if %>
<%else%>
[首页] [上一页] [下一页] [尾页]
<%end if%>[页次:<font color=red><b><%=page%></b></font>/<%=rs3.PageCount%>]
[共<%=rs3.RecordCount%>篇 <font color=red><b><%=rs3.PageSize%></b></font>篇/页]</td>
    </tr>
  </table><%end if
	  rs3.close
	  set rs3=nothing
	  conn.close
	  set conn=nothing%>
</center>

</body>
</html>

⌨️ 快捷键说明

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