差不多了 你试试 <%@LANGUAGE="VBSCRIPT"%> <!--#include file="../Connections/liuyan.asp" --> <% Dim Recordset1 Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.ActiveConnection = MM_liuyan_STRING Recordset1.Source = "SELECT * FROM liyandata ORDER BY datetime DESC" Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 1 Recordset1.Open()
Recordset1_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index
Repeat1__numRows = 10 Repeat1__index = 0 Recordset1_numRows = Recordset1_numRows + Repeat1__numRows %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>台风留言本</title> <style type="text/css"> <!-- body { background-image: url(); } .style2 {font-size: 36px} --> </style></head>
<body> <table width="760" border="1" cellspacing="100" background="../ww.jpg" bgcolor="#006666"> <tr> <th scope="col"><p><a href="guestbook.asp">签写留言</a></p> <p><a href="index.asp">查看留言</a></p> <p><a href="admin.asp">管理留言</a> </p> <p> </p></th> <th height="72" scope="col"><span class="style2">台风留言版</span></th> </tr> </table>
<% While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) %> <% If Not Recordset1.EOF Or Not Recordset1.BOF Then %> <table width="760" border="1"> <tr> <td width="157">您的大名</td> <td width="587"><p><%=(Recordset1.Fields.Item("name").Value)%></p></td> </tr> <tr> <td>E-Mail</td> <td><%=(Recordset1.Fields.Item("email").Value)%></td> </tr> <tr> <td height="21">个人主页</td> <td><%=(Recordset1.Fields.Item("homepage").Value)%></td> </tr> <tr> <td height="22">留言主题</td> <td><%=(Recordset1.Fields.Item("title").Value)%></td> </tr> <tr> <td height="81" bgcolor="#FF99CC">留言内容</td> <td><%=(Recordset1.Fields.Item("content").Value)%></td> </tr> <tr> <td bordercolor="#33FFFF">站长回复</td> <td><%=(Recordset1.Fields.Item("recontent").Value)%></td> </tr> </table> <table width="760" border="1"> <tr> <td width="162" bgcolor="#FFFFCC">留言时间</td> <td width="252"><%=(Recordset1.Fields.Item("datetime").Value)%></td> <td width="84" background="../web.gif"> </td> <td width="123">留言</td> <td width="105">管理</td> </tr> </table> <% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %> <% If Recordset1.EOF And Recordset1.BOF Then %> <table width="760" border="1"> <tr> <td width="621">暂无留言</td> <td width="123">留言</td> </tr> </table> <% End If ' end Recordset1.EOF And Recordset1.BOF %> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 Recordset1.MoveNext() Wend %>
<p>您是第 <% dim files,fs,thisfile,counts,out files=server.mappath("count.txt") Set fs=CreatObject("Scripting.FileSystemObject") Set thisfile=fs.opentextfile(files) counts=thisfile.readline thisfile.close
response.write(counts) counts=counts+1 set out=fs.createtextfile(files) out.writeline(counts) out.close set fs=nothing
%> 访问者</p> <p> </p> </body> </html> <% Recordset1.Close() Set Recordset1 = Nothing %>