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

📄 m.asp

📁 不错的ASP整站源代码。在IIS环境下运行都没有问题
💻 ASP
字号:
<HTML>
<head><title></title>
<style type="text/css">
<!--
a:link    { color:#ff66cc;}
a:visited { color:#ff66cc;}
a:hover   { text-decoration:none; color:#E32D3F;}
a:active  { text-decoration:none; color:#FF9900;}
body,table,td { FONT-FAMILY: "宋体"; FONT-SIZE: 9pt; LINE-HEIGHT: 12pt}
.put { border-top: #CF0F16 1px solid ; border-left: #CF0F16 1px solid ; border-bottom: #F5C9CA 1px solid ; border-right: #F5C9CA 1px solid ; background:#ffffff ; color: #CF0F16 ; font-size: 12px; PADDING-RIGHT: 1px; PADDING-LEFT: 1px;PADDING-BOTTOM: 1px; PADDING-TOP: 1px; FONT-FAMILY: "宋体";}
.put1 { border-bottom: #CF0F16 1px solid ; border-right: #CF0F16 1px solid ; border-top: #F5C9CA 1px solid ; border-left: #F5C9CA 1px solid ; background:#fff4f4 ; color: #CF0F16 ; font-size: 12px; PADDING-RIGHT: 1px; PADDING-LEFT: 1px;PADDING-BOTTOM: 1px; PADDING-TOP: 1px; HEIGHT: 18px;}
-->
</style>
</head>
<BODY bgcolor="#FFFFFF">
<form>
表名:<input type="text" name="table_name" value="<%=Request("table_name")%>" class="put">
<input type="submit" value=" 打开 " class="put1">
</form>
<%

if request("table_name")<>"" then

Sub ShowOnePage( rs, Page )

  Response.Write "<TABLE BORDER=0 cellspacing=1 cellpadding=4 bgcolor=black>"
  Response.Write "<TR BGCOLOR=#FFCC00>"
  Response.WRITE "<TD>NO</TD>"
  For i=0 to rs.Fields.Count-1
     Response.WRITE "<TD>" & rs.Fields(i).Name & "</TD>"
  Next
  Response.Write "</TR>"

  rs.AbsolutePage = Page
  For iPage = 1 To rs.PageSize
     if iPage mod 2 = 0 then
        Response.Write "<TR bgcolor=#f7f7f7>"
     else
        Response.Write "<TR bgcolor=#ffffff>"
     end if
     RecNo = (Page - 1) * rs.PageSize + iPage
     Response.Write "<TD bgcolor=#cccccc>" & RecNo & "</TD>"
     For i=0 to rs.Fields.Count-1
        Response.WRITE "<TD>" & rs.Fields(i).Value & "</TD>"
     Next
     Response.Write "</TR>"
     rs.MoveNext
     If rs.EOF Then Exit For
  Next
  Response.Write "</TABLE>"  
End Sub


Myself = Request.ServerVariables("PATH_INFO")
'-----------------------------------------------------------------
Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("isi/xlist.asp")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
'-----------------------------------------------------------------
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from " & request("table_name")
rs.open sql,conn,3,2

   rs.PageSize = 10
   Page = CLng(Request("Page"))
   If Page < 1 Then Page = 1
   If Page > rs.PageCount Then Page = rs.PageCount
   ShowOnePage rs, Page
%>
<TABLE width=100% BORDER=0 cellspacing=0 cellpadding=0>
<FORM Action=<%=Myself%> Method=GET>
<tr height=30><td>
<%If Page <> 1 Then ' 如果不是位于第一页%>
     <A HREF=<%=Myself%>?Page=1&table_name=<%=Request("table_name")%>>首页</A>

⌨️ 快捷键说明

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