default.asp
来自「1、全面展示宾馆的自然情况和服务内容; 2、介绍宾馆信息,帮助客人了解宾馆相」· ASP 代码 · 共 116 行
ASP
116 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../inc/adconn.asp"-->
<%
if request("selAnnounce")<>"" then
sql1="delete from guestbook where id in ("&request("selAnnounce")&")"
conn.execute(sql1)
end if
set rs=server.createobject("adodb.recordset")
sql="Select * from guestbook order by ID desc"
rs.open sql,conn,1,1
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style1 { color: #FF0000;
font-weight: bold;
}
.style2 {color: #000000}
-->
</style>
<link href="../style.css" rel="stylesheet" type="text/css">
</head>
<body>
<TABLE width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#336699">
<Form name="search" method="POST" action="default.asp">
<tr height=25 >
<TD width="64" align="center" background="../images/pics/tile_sub.gif"><font color="#FFFFFF"><b>ID号</b></font></TD>
<TD width="85" align="center" background="../images/pics/tile_sub.gif"><font color="#FFFFFF"><strong>留言人</strong></font></TD>
<TD width="429" align="center" background="../images/pics/tile_sub.gif"><font color="#FFFFFF"><strong>留言内容</strong></font></TD>
<TD colspan="2" align="center" background="../images/pics/tile_sub.gif"><strong><font color="#FFFFFF">操作</font></strong></TD>
<TD width="84" align="center" background="../images/pics/tile_sub.gif"><font color="#FFFFFF">
<input name="submit" type='submit' onClick="return confirm('确认删除吗?')" value='删除'>
</font></TD>
</TR>
<% If not rs.eof Then
tol=rs.recordcount
shownum=6
rs.pagesize=shownum
maxpage=rs.pagecount
requestpage=clng(request("p"))
if requestpage="" or requestpage<1 then
requestpage=1
end if
if requestpage>maxpage then
requestpage=maxpage
end if
if not requestpage=1 then
rs.move (requestpage-1)*rs.pagesize
end if
for i=1 to rs.pagesize and not rs.eof
%>
<tr height="20">
<td width="64" height="13" align="center" bgcolor="#ffffff"><font face="Arial"><b><%=rs("id")%></b></font></td>
<td width="85" align="center" bgcolor="#ffffff"><a href=javascript: onClick="window.open('xian.asp?id=<%=rs("id")%>','','scrollbars=yes,width=450,height=470')"><%=rs("name")%></a></td>
<td width="429" bgcolor="#ffffff"><%=rs("liuyan")%></td>
<td width="58" align="center" bgcolor="#ffffff"><a href="reply.asp?id=<%=rs("ID")%>">回复</a></td>
<td width="65" align="center" bgcolor="#ffffff"><a href="check.asp?id=<%=rs("id")%>">审核
<%if rs("check")=true then%>
<font color="#FF0000">√</font>
<%end if%>
</a></td>
<td width="84" align="center" bgcolor="#ffffff">
<input type='checkbox' name='selAnnounce' value='<%=cstr(rs("id"))%>'></td>
</tr>
<tr height="20">
<td height="13" colspan="6" align="center" bgcolor="#ffffff"><%if rs("reply")<>"" then%>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="69"> </td>
<td width="97" height="25">
<div align="center" class="style1">回复</div></td>
<td><div align="left"><span class="style2"><%=rs("Reply")%></span></div></td>
</tr>
</table>
<%
end if
%>
<%
rs.movenext
if rs.eof then exit for
next
else
response.Write("暂无定单")
end if
Rs.Close
Set Rs=Nothing
%>
</td>
</tr>
</form>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="33" align="right">共<%=tol %>条留言 共<font color=red><%=tol%></font>页 第<%=requestpage%>页 <font color=666666>
<%if requestpage-1>0 then%>
<a href="default1.asp?p=<%=requestpage-1%>" class="t9b">上一页</a>
<%else%>
上一页
<%end if%>
<%if requestpage+1<=maxpage then%>
<a href="default1.asp?p=<%=requestpage+1%>" class="t9b">下一页</a>
<%else%>
下一页</font>
<%end if%></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?