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

📄 index.asp

📁 留言本程序代码
💻 ASP
字号:
<!--#include file="logo.asp"-->
<%set data=server.createobject("adodb.recordset")
sq_1="select * from msg_book order by id desc"
data.open sq_1,conn,1,1
set rs=server.createobject("adodb.recordset")
sq_2="select * from  web_admin where id='1'"
rs.open sq_2,conn,1,1%> 
<%
dim i,intPage,page,pre,last,filepath
      data.PageSize = rs("msg_num")  '这里设定每页显示的记录数
      pre = true
      last = true
      page = trim(Request.QueryString("page"))
      
      if len(page) = 0 then
                  intpage = 1
                  pre = false
      else
          if cint(page) =< 1 then
               intpage = 1
               pre = false
          else
              if cint(page) >= data.PageCount then
                  intpage = data.PageCount
                  last = false
              else
                   intpage = cint(page)
             end if
         end if
      end if
    if not data.eof then
         data.AbsolutePage = intpage
    end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=rs("web_name")%>留言本</title>
<style type="text/css">
<!--
body,td,th {font-family: 宋体, Arial;font-size: 12px;}
body{
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
scrollbar-base-color:#ffffff;
scrollbar-face-color:#ffffff;
scrollbar-track-color:#ffffff;
scrollbar-arrow-color:#000000;
scrollbar-3dlight-color:#000000;
scrollbar-highlight-color:#00000;
scrollbar-shadow-color:#000000;
scrollbar-darkshadow-color:#ffffff; }
a {font-size: 12px;}
a:link {text-decoration: none;}
a:visited {text-decoration: none;}
a:hover {text-decoration: none;}
a:active {text-decoration: none;}
-->
</style>
<style fprolloverstyle>
A:hover {color: #000000; font-size: 12px}
.style2 {
	color: #CC0033;
	font-size: 16px;
}
</style>
</head>

<body alink="#003399" vlink="#003399" link="#003399">
<table cellpadding="0" cellspacing="0" width="768" height="27" align="center">
<tr>
<td height="27" width="93"><a href="write.asp">
<img src="images/1.gif" width="23" height="22" border="0"><span class="style1">写留言</span></a></td>
<td height="27" width="673"><a  href="login.asp">
<img src="images/1.gif" width="23" height="22" border="0"><span class="style1">管理页</span></a></td>
</table>
</td>
</tr>
</table>
<%if data.EOF or data.BOF then%>
<table cellpadding="0" cellspacing="0" width="768" height="210" align="center">
<tr>
<td height="180">
<p align="center" class="style2">请你留言!</td>
</tr>
</table>
<%else%>
<% for i=1 to data.PageSize
   if data.EOF or data.BOF then exit for %>
<div align="center">
<table cellpadding="0" cellspacing="0" width="768" height="210">
<tr>
<td height="180" width="139">
<div align="center">
<table cellpadding="0" cellspacing="0" width="139" height="165">
<tr>
<td height="3" width="127" colspan="4"></td>
</tr>
<tr>
<td height="119" width="111" style="border-left: 1px solid #E6E6E6; border-right: 1px solid #E6E6E6; border-top: 1px solid #E6E6E6; border-bottom-width: 1px" colspan="2" valign="bottom">
<p align="center">
<img border="0" src="<%=data("touxiang")%>">
</p> 
</td>
</table>
</div>
</td>
<td height="180" width="112">
<table cellpadding="0" cellspacing="0" width="127" height="188">
<tr>
  <td height="16" valign="top" colspan="2" style="table-layout:fixed;word-break:break-all ;">留言主题</td>
</tr>
<tr>
<td height="50" valign="top" colspan="2" style="table-layout:fixed;word-break:break-all ;"><%=data("title")%></td>
</tr>
<tr>
<td height="17" width="30" >
<font color="#01BD06">昵称:</font></td>
<td height="17" width="95"  style="table-layout:fixed;word-break:break-all ;" >
<%=data("nick_name")%>
</td>
</tr>
<tr>
<td height="17" width="30">
<font color="#ED9D00">OICQ:</font></td>
<td height="17" width="95" style="table-layout:fixed;word-break:break-all ;">
<%=data("oicq")%>
</td>
</tr>
<tr>
<td height="17" width="30">
<font color="#3353FE">来自:</font></td>
<td height="17" width="95">
<%=data("pvc")%>
</td>
</tr>
</table>
</td>
<td height="180" width="500" style="border-left:1px solid  #E6E6E6">
<table cellpadding="0" cellspacing="0" width="499" height="176">
<tr>
<td height="101" width="499" colspan="2" valign="top" style="table-layout:fixed;word-break:break-all ;">
<%if data("msg_type")=2 then%>
<font color="#808080"><b>悄悄话哦:-)</b></font>
<%else%>
<%=data("contents")%>
<%end if%>
</tr>
<tr>
<td height="42" width="56" style="border-bottom:1px solid  #E6E6E6">
 </td>
<td height="42" width="442" valign="top" style="border-left:1px solid  #E6E6E6 ;border-top:1px solid  #E6E6E6;border-bottom:1px solid  #E6E6E6 ;table-layout:fixed;word-break:break-all ;">
&nbsp;<%if data("reply")<>"" then %>
回复:<%=data("reply")%>
<%end if%>
</td>
</tr>
<tr>
<td height="16" width="499" colspan="2" style="table-layout:fixed;word-break:break-all">
<%if data("e_mail")="" then%>
<%else%>
<font color="#808080">E-mail:<%=data("e_mail")%></font>
<%end if%>
</td>
</tr>
</table>
</td>
<td height="180" width="7" style="border-right:1px solid  #E6E6E6" bgcolor="#E6E6E6">
 </td>
</tr>
</table>
</div>
<div align="center">
<table cellpadding="0" cellspacing="0" width="751" height="12">
<tr>
<td height="12">
<p align="right"><font color="#8D8D8D">
留言时间:<%=data("date")%></font></p>
</td>
</tr>
</table>
</div>
<% data.movenext
    next %>
<div align="center">
<table width="768" >
<tr>
<%if data.pagecount > 0 then%>
<td width="50%" align="left"><font color="#808080">总留言条数:<%=data.RecordCount%> 当前页<%=intpage%>/<%=data.PageCount%>
<%else%>
当前页0/0</font></td>
<%end if%>
<td width="49%" align="right"> :<a href="index.asp?page=1">首页</a>: 
<%if pre then%>:<a href="index.asp?page=<%=intpage -1%>">上页</a>: <%end if%>:<a href="index.asp?page=<%=intpage +1%>">下页</a>: 
:<a href="index.asp?page=<%=data.PageCount%>">尾页</a>: <font color="#808080">转到第 
<select name="sel_page" onchange="javascript:location=this.options[this.selectedIndex].value;">
<%for i = 1 to data.PageCount
       if i = intpage then%>
<option value="index.asp?page=<%=i%>" selected><%=i%></option>
<%else%>
<option value="index.asp?page=<%=i%>"><%=i%></option>
<%end if
          next%>
</select>页</font></font> 
</td>
</tr>
</table>	
</div>
<%end if%>
<br>
</body>
</html>
<%data.close
 set data=nothing
 rs.close
 set rs=nothing
 conn.close
 set conn=nothing %>

⌨️ 快捷键说明

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