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

📄 view_left.asp

📁 订单系统 是同学自己做的 希望对大家有用
💻 ASP
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<% if (session("user")="admin" and session("pwd")="admin") then %>
<% 
   ordersize= 19
 ' 接收页数信息
 '------------------------------
   current= Cint(request("page"))
   if current = 0 then  '如果首次进入, 设定当前页为第一页
      current= 1 
   end if 
 '------------------------------ 
   %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!---a:link      { color: #306898; font-family: Arial; text-decoration: underline }
a:visited    { color: #306898; font-family: Arial; text-decoration: underline }
a:active     { color: red; font-family: Arial; text-decoration: none }
a:hover      { color: 306898; text-decoration: none }
body         { color: #6e6e6e; font-size: 9pt; line-height: 12pt; font-family: Arial }
th           { font-size: 9pt; line-height: 12pt }
td           { font-size: 9pt; line-height: 12pt }
a.1:link     { font-family: Arial; text-decoration: none; color: silver }
a.1:visited  { font-family: Arial; text-decoration: none; color: silver }
a.1:hover    { font-family: Arial; text-decoration: none; color: white }
a.2:link     { font-family: Arial; text-decoration: none; color: #6e6e6e }
a.2:visited  { font-family: Arial; text-decoration: none; color: #6e6e6e }
a.2:hover    { font-family: Arial; text-decoration: none; color: silver }
a.3:link     { font-family: Arial; text-decoration: none; color: white }
a.3:visited  { font-family: Arial; text-decoration: none; color: white }
a.3:hover    { font-family: Arial; text-decoration: none; color: #d0ccd0 }
.line        { line-height: 10pt }
.il          { line-height: 12pt }
.form        { font-size: 9pt }
.btn         { font-size: 9pt; height: 21; border-style: ridge; border-width: 1 }
.text        { font-family: Arial; font-size: 9pt; border: 1 solid #707070 }
body         { scrollbar-face-color: #D8D4C8; scrollbar-highlight-color: #D8D4C8; 
               scrollbar-shadow-color: #D8D4C8; scrollbar-3dlight-color: 
               #ffffff; scrollbar-arrow-color: blcak; scrollbar-track-color: 
               #E9EDEF; scrollbar-darkshadow-color: #888484 }
---></style>
<meta http-equiv="Refresh" content="60;>
</head>
<body bgcolor="#C0E0FF" marginheight="0" marginwidth="0" rightmargin="0" leftmargin="0" text="#808080">
<!-- 读取数据 -->
<%  
   on error resume next  '有错误则跳过
   connstr = "DBQ="+server.mappath("data.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
   Set Conn=Server.CreateObject("ADODB.Connection")
   set rs=Server.CreateObject("ADODB.Recordset")
   sql="SELECT * FROM data order by ID DESC"
   Conn.Open connstr
   rs.Open sql,conn,1,1
   
   rs.pagesize= ordersize '设定每页显示记录数
   rs.Absolutepage= current  '设定当前页
   allpage= Cint(rs.pageCount)  '获取所有页数
   %>
</head>

<body bgcolor="#C0E0FF">

  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td height="16" class="cs"><font>定单列表<font> &nbsp;共<font color="#FF0000"><% =allpage %></font>页</font></font></td> 
  </tr>
</table>
<hr color="#000000">
<%
   for i=1 to ordersize    
   title = rs("title")          '获取文章标题
   title_size = Len(title)      '获得标题大小
   if title_size >10 then       '对标题进行分割
     title= Left(title,5) + ".."
   end if 
 %>
<!-- 显示表单 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td height="16" class="cs"><div align="left"><a href="view_right.asp?id=<% =rs("id") %>" target="mainFrame"><% = title  %></a><% = rs("date") %></div></td>
  </tr>
</table>
<% 
    rs.movenext
    if rs.eof then
    exit for
    end if
    next 
    rs.close
	conn.close
%>
<!--  设定当前页, 即为前一页, 后一页编程 -->
<% 
   '-----------------------------------------
   if current= 1 then    '当前页为第一页时,前一页
       pre= 1            '连接 pre 设定为 第一页 
   else
       pre = current-1
   end if
  '------------------------------------------
   if current = allpage then  '当前页为最后一页时,后
        nex = allpage           '一页连接 nex 设定为 最
	else                      '后一页
	    nex= current +1	
	end if 
  '------------------------------------------
  %>
<hr color="#000000">
<table bgcolor="#C0E0FF" width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div align="right" class="cs">第<font color="#FF0000"><% = current %></font>页&nbsp;<a href="view_left.asp?page=<% =pre%>">前一页</a> 
        <a href="view_left.asp?page=<% =nex %>" target="leftFrame">后一页</a></div></td>
  </tr>
</table>
</body>
</html>
<% end if %>

⌨️ 快捷键说明

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