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

📄 index.asp

📁 呵呵
💻 ASP
字号:
<!--#include file="articleconn.asp"-->
<%
   const MaxPerPage=6
   dim totalPut   
   dim CurrentPage
   dim TotalPages
   dim i,j
   if not isempty(request("page")) then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if
   
%>
<%
sql="select * from learning order by articleid desc"

Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
  if rs.eof and rs.bof then
       response.write "<p align='center'> 还 没 有 任 何 文 章</p>"
   else
	  totalPut=rs.recordcount
      totalPut=rs.recordcount
      if currentpage<1 then
          currentpage=1
      end if
      if (currentpage-1)*MaxPerPage>totalput then
	   if (totalPut mod MaxPerPage)=0 then
	     currentpage= totalPut \ MaxPerPage
	   else
	      currentpage= totalPut \ MaxPerPage + 1
	   end if

      end if
       if currentPage=1 then
            showContent
          else
          if (currentPage-1)*MaxPerPage<totalPut then
            rs.move  (currentPage-1)*MaxPerPage
            dim bookmark
            bookmark=rs.bookmark
            showContent
        else
	        currentPage=1
           showContent
        end if
	   end if
   rs.close
   end if
	        
   set rs=nothing  
   conn.close
   set conn=nothing
   fid=0

   sub showContent
       dim i
	   i=0
  
%> 

<head>              
<meta http-equiv=Content-Type content=text/html;charset=gb2312>
<title>天缘MEMO</title>
</head>
<style type=text/css>
<!--
A:link {text-decoration:none}
A:visited {text-decoration:none}
body {font-family:"宋体";font-size:9pt;color:green;}
td,form,select,input,textarea {font-family:宋体;font-size:9pt;color:green}
-->
</style>
<script language="JavaScript">
function OnEnter( field ) { if( field.value == field.defaultValue ) { field.value = ""; } }
function OnExit( field ) { if( field.value == "" ) { field.value = field.defaultValue; } }
</script>

<body>
<div id=overDiv style="POSITION: absolute; Z-INDEX:2;"></div>
<SCRIPT language=JavaScript src="help.js" type=Text/JavaScript></SCRIPT>
<form method=get action=Savearticle.asp>
  <input type=hidden name=action value=save>
<div align=center><table border=0 cellspacing=0 cellpadding=0 width=440 bgcolor=#FFFFff>
<tr>
        <td><b><font color=red>《伊人有约》留言本(不支持HTML)</font></b></td>
</tr>
</table></div>
<div align=center><table border=1 cellspacing=0 cellpadding=2 bordercolorlight=#c0c0c0 bordercolordark=green width=440 bgcolor=#e0e0e0>
<tr>
        <td align=center>
          <input type=text name=name size=7 maxlength=7 onBlur=OnExit(this) onFocus=OnEnter(this) style="color:#000000;background-color:#ccccff;font-size:9pt;border:black 1px solid;height:17px" value="访客">
          <input type=text name=email size=8 maxlength=30 onBlur=OnExit(this) onFocus=OnEnter(this) style="color:#000000;background-color:#ccccff;font-size:9pt;border:black 1px solid;height:17px" value="E-mail">
          <input type=text name=oicq size=8 maxlength=10 onBlur=OnExit(this) onFocus=OnEnter(this) style="color:#000000;background-color:#ccccff;font-size:9pt;border:black 1px solid;height:17px" value="Oicq">
          <input type=text name=content size=18 maxlength=255 onBlur=OnExit(this) onFocus=OnEnter(this) style="color:#000000;background-color:#ccccff;font-size:9pt;border:black 1px solid;height:17px" value="内容">
         <input type=submit style="color:#000000;background-color:#ccccff;font-size:9pt;border:black 1px solid;height:17px" value=" 签写 ">
         <select name=face align=absmiddle style="color:#000000;background-color:#ccccff;font-size:8pt;border:black 1px solid;height:17px">
            <option value=face1.gif selected>哥哥</option>
            <option value=face2.gif >妹妹</option>
          </select>
        </td>
</tr>
</table></div>
<%do while not rs.eof%> 
<div align=center>
    <table border=0 cellspacing=0 cellpadding=0 width=440 bgcolor=#66cc44>
      <tr> 
        <td bgcolor=#c0c0c0></td>
      </tr>
      <tr> 
        <td bgcolor=#c0c0c0></td>
      </tr>
      <tr bgcolor=#ffffff onmouseover="this.style.backgroundColor='#ccccff'" onmouseout="this.style.backgroundColor='#ffffff'"> 
        <td>

          <table border=0 cellspacing=0 cellpadding=0 width=100%>
           <a onmouseout=nd() onmouseover="dcc('<table border=0 cellpadding=0 cellspacing=0 width=300><tr><td width=100%><div align=left><table border cellpadding=0 cellspacing=0 width=300 bordercolordark=#3366cc bordercolorlight=#D3D3D3><tr><td width=100%><div align=center><table border=1 cellpadding=3 cellspacing=0 width=100% bordercolordark=#0080ff bordercolorlight=#ffffff><tr><td align=center width=100% bgcolor=#E0E0E0><p><font class=ver8 color=blue><b>留言内容</font></td></tr><tr><td width=100% bgcolor=white><p align=center style=line-height:150%;><font class=ver8 color=><%=rs("content")%></font></td></tr><tr><td width=100% bgcolor=#E0E0E0><p align=right><font color=#FF9933><b>By:<%=rs("name")%> 时间:<%=rs("dateandtime")%></font></td></tr></table></div></td></tr></table></div></td></tr></table>','','20')">
            <tr> 
              <td valign=top rowspan=2 width="7%"><img src=<%=rs("face")%> align=absmiddle border=0 width=28 height=28>&nbsp;</td>
              <td width=18%><font color=#804040><%=rs("name")%></font> </td>
              <td width=22%>
                <div align="left"><font color="#FF6633">OICQ:<% if rs("oicq")="" then Response.Write "未知" else Response.Write "<img src=http://icon.tencent.com/"&rs("oicq")&"/s/00/ width=16 height=16>"&rs("oicq") %></font></div>
              </td>
              <td width=21%><% if rs("email")="" then Response.Write "未知" else Response.Write "<a href=mailto:"&rs("email")&">"&rs("email")&"</a>" %></td>
              <td width=24%><font color=#8080ff><%=rs("dateandtime")%></font></td>
            </tr>
            <tr> 
              <td colspan="4"><%=left(rs("content"),20)%></td>
            </tr>
           </a>
          </table>
         
        </td>
      </tr>
      <tr> 
        <td bgcolor=#c0c0c0></td>
      </tr>
    </table>
  </div>
<% i=i+1
	      if i>=MaxPerPage then exit do
	      rs.movenext
	   loop
		  %> 
            
            <%
   end sub 
%> 
<div align=center><table border=0 cellspacing=0 cellpadding=0 width=440 bgcolor=#FFFFCC>
<tr>
<td width=100%></td>
</tr>
</table></div>
<div align=center><table border=1 cellspacing=0 cellpadding=2 bordercolorlight=#c0c0c0 bordercolordark=green width=440 bgcolor=#e0e0e0>
<tr>
        <td align=center width="361"> <%
  dim n
  if totalput mod maxperpage=0 then
     n= totalput \ maxperpage
  else
     n= totalput \ maxperpage+1
  end if
  response.write "<p align='center' vAlign='bottom'>&gt;&gt;分页&nbsp;"
  response.write "<a href="&filename&"?page="&CurrentPage-1&"><img src=prevoff.gif align=absmiddle border=0></a>"
 response.write "<a href="&filename&"?page="&CurrentPage+1&"><img src=nextoff.gif align=absmiddle border=0></a>"
   response.write "&nbsp;第<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页" 
    response.write "&nbsp;<b>"&totalput&"</b>篇留言 <b>"&maxperpage&"</b>篇留言/页" 
%> </td>
        <td width=27 align=center valign=middle><a href=javascript:self.location.reload()>刷新</a></td>
        <td align=center width=32 valign=middle><a href=login.asp>管理</a></td>
</tr>
</table></div>
</form></body>

⌨️ 快捷键说明

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