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

📄 list.asp

📁 大家好
💻 ASP
字号:
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="ADOVBS.INC"-->
<%
if session("first")="" then
	page=1
	session("first")=1
else
	page=request("page")
end if
if page<1 then
	page=1
end if

DbPath = SERVER.MapPath("upload.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DbPath
set rs=server.createobject("adodb.recordset")
sql="select  * from upload order by uploaddt desc "
rs.open sql,conn,1
%>
<%
if rs.eof and rs.bof then
  response.write "没有图片"
  response.write"<br>"
  response.write "<a href='javascript:window.history.go(-1)'>返回</a>"
rs.close
conn.close
response.end
end if
rs.pagesize=1
rs.absolutepage=page

%>
<html>

<head>
<title>图片显示</title>
</head>

<body bgcolor=#CCFFCC>
<table width="714" border="16" cellspacing="0" cellpadding="0" align="center" height="367" bordercolor="#6666FF" bgcolor="#FFCCFF">
  <tr align="center"> 
    <td height="40" colspan="2"> <big><big><strong><font size="6">浏览图片</font></strong></big></big> 
    </td>
  </tr>
  <tr> 
    <td height="255" width="489" valign="top"> 
      <table border="0" width="489" cellpadding="0" cellspacing="0" height="100" align="left">
        <tr> 
          <td height="39"><font color="#000000">标题</font></td>
          <td width="376" height="39" nowrap><%=rs("title")%></td>
        </tr>
        <%
	i=1
   While (Not rs.EOF) and (i<=rs.pagesize)
     
%> 
        <tr> 
          <td height="40"> <font color="#000000">文件名</font></td>
          <td height="40" width="376" nowrap><% =rs("SouceFileName") %></td>
        </tr>
        <tr> 
          <td height="64"><font color="#000000">上载时间</font></td>
          <td height="64" width="376" nowrap><% =formatdatetime(rs("uploaddt"),1) %></td>
        </tr>
        <tr> 
          <td height="144" valign="top"><font color="#000000">描述</font></td>
          <td height="130" width="376" valign="top"><% =rs("Description") %></td>
        </tr>
        <tr> </tr>
      </table>
      
    </td>
    <td height="255" width="209" valign="top"> 
      <table width="214" border="0" cellspacing="0" cellpadding="0" height="29" align="left">
        <tr align="center"> 
          <td height="52"><font color="#000000">图片</font></td>
        </tr>
        <tr align="center" valign="middle" bgcolor="#FFCCFF"> 
          <td height="241"><img src="showimage.asp?uploadid=<% =rs("uploadid")%>"> 
          </td>
        </tr>
      </table>
<%
      rs.MoveNext
	  i=i+1
   Wend
%>
    </td>
  </tr>
  <tr > 
    <td height="35" colspan="2"> 
      <form method="post" action="list.asp">
        <table width="632" border="0" cellspacing="0" cellpadding="0" align="center" height="20">
          <tr  align="center"> <%
if (page>1) then
%> 
            <td valign="middle"> 
              <input type="button" name="Button" value="首页" class="botton" onClick="window.location.href='list.asp?page=1'">
            </td>
            <td valign="middle"> 
              <input type="button" name="Botton" value="前页" class="botton" onClick="window.location.href='list.asp?page=<%=page-1%>'">
              </td>
            <%
end if
if (cint(page) < rs.pagecount)  then
	
%> 
            <td valign="middle"> 
              <input type="button" name="Botton2" value="下页" class="botton" onClick="window.location.href='list.asp?page=<%=page+1%>'">
              </td>
            <td valign="middle"> 
              <input type="button" name="Botton3" value="末页" class="botton" onClick="window.location.href='list.asp?page=<%=rs.pagecount%>'">
              </td>
          </tr>
          <%
end if
%> 
        </table>
      </form>
    </td>
  </tr>
  <tr> 
    <td height="18" colspan="2"> 
      <table width="630" border="0" cellspacing="0" cellpadding="0" align="center">
        <tr> 
          <td width="130" nowrap> <% rs.close
   conn.close
%> </td>
          <td colspan="2" nowrap>&nbsp; </td>
          <td width="92" nowrap><a href="default.asp">返回</a></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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