📄 allmessage.asp
字号:
<!--#include file="cn.asp"-->
<%if session("company")="" or session("user")="" then
response.Write "<script language='javascript'>alert('非法用户登录!');window.location.replace('login.asp');</script>"
response.End
end if
id=request.QueryString("id")
%><style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style>
<table width="500" border="0" cellpadding="0" cellspacing="0" align="center">
<!--DWLayoutTable-->
<tr>
<td width="500" height="68" valign="top">
<form id="form1" name="form1" method="post" action="del_s.asp?id=<%=id%>&lei=1">
<table width="450" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="650" height="13" valign="top"><table width="499" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="172" height="20" align="center">标题</td>
<td width="64" align="center">留言人</td>
<td width="114" align="center">联系方式</td>
<td width="75" align="center">留言时间</td>
<td width="74" align="center">删除</td>
</tr>
</table></td>
</tr>
<tr>
<td height="21" valign="top">
<table width="500" border="0" cellpadding="0" cellspacing="1" bgcolor="#BBCEFD">
<!--DWLayoutTable-->
<%set rs=server.CreateObject("adodb.recordset")
sql="select * from cmessage where cid='"&id&"' order by id desc"
rs.open sql,cn,1,1
if rs.eof then
response.Write "<script language='javascript'>alert('无记录!');window.location.replace('index.asp');</script>"
end if
'分页
jil=rs.recordcount
page=cint(request.QueryString("page"))
rs.pagesize=30
tpage=cint(rs.pagecount)
if page="" or page=0 then
page=1
end if
if page>rs.pagecount then
page=rs.pagecount
end if
rs.Absolutepage=page
do while not rs.eof
%>
<tr>
<td width="170" height="20" align="center" bgcolor="#FFFFFF"> <a onclick="window.open('leave_xx.asp?id=<%=request.QueryString("id")%> ','','width=300,height=200,resizable=1,scrollbars=1');" href='#'><%=rs("title")%></a></td>
<td width="65" align="center" bgcolor="#FFFFFF">
<%=rs("man")%></td>
<td width="111" align="center" bgcolor="#FFFFFF"><%=rs("lianxi")%></td>
<td width="76" align="center" bgcolor="#FFFFFF"><%=left(rs("addtime"),10)%></td>
<td width="72" align="center" valign="top" bgcolor="#FFFFFF">
<input name="del" type="checkbox" id="del" value="<%=rs("id")%>" /> </td>
</tr>
<%
rs.movenext
loop
%>
</table></td>
</tr>
<tr>
<td height="32" align="center" valign="bottom"><input type="submit" name="Submit" value="删除所选" />
全选
<input type="checkbox" name="checkbox" value="Check All" onclick="mm()" /></td>
</tr>
<tr>
<td height="22" align="center" valign="bottom">共<%=jil%>条记录 每页显30示条 共<%=tpage%>页 第<%=page%>页 <a href="allmessage.asp?id=<%=id%>&page=1">第一页</a> <a href="allmessage.asp?id=<%=id%>&page=<%=page+1%>">下一页</a> <a href="allmessage.asp?id=<%=id%>&page=<%=page-1%>">上一页</a> <a href="allmessage.asp?id=<%=id%>&page=<%=tpage%>">最后一页</a></td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td height="300"> </td>
</tr>
</table>
<script language=javascript>
function mm()
{
var a = document.getElementsByTagName("input");
if(a[0].checked==true){
for (var i=0; i<a.length; i++)
if (a[i].type == "checkbox") a[i].checked = false;
}
else
{
for (var i=0; i<a.length; i++)
if (a[i].type == "checkbox") a[i].checked = true;
}
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -