📄 adminshow.asp
字号:
<!--#include file="conn.asp" -->
<%
if session("admin")="" then response.redirect"error.asp?id=1"
%>
<html>
<head>
<title>客户管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">
<!--
a {
font-size: 9pt;
text-decoration: none;
border: 1px dotted #CCCCCC;
color: #000000;
}
-->
</style>
<script language=vbscript>
sub delit(which)
if msgbox("确定删除?",4)=6 then top.location="del.asp?id="&which
end sub
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="bg_more.gif">
<div align="center">
<table width="0" border="0" cellspacing="0" cellpadding="0" align="center">
<tr align="center" bgcolor="#FFFFFF">
<td>
<table style="border-collapse: collapse" border="1" bordercolor="#000000" width="100%"><tr align="center" bgcolor="#FFFFFF">
<td width="185" height="31"><a href="reg.asp">添加客户</a></td>
<td width="191"><a href="login.htm">修改资料</a></td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#000000">
<table border="0" width="430" cellspacing="1" cellpadding="5" bordercolorlight="#4984ce"
bordercolordark="#000000">
<%sub ShowBody(Str)
dim result
dim l
l=len(str)
result=""
dim i
for i = 1 to 100
select case mid(str,i,1)
case "<"
result=result+"<"
case ">"
result=result+">"
case chr(34)
result=result+"""
case "&"
result=result+"&"
case chr(13)
result=result+"<br>"
case chr(9)
result=result+" "
case chr(32)
'result=result+" "
if i+1<=l and i-1>0 then
if mid(str,i+1,1)=chr(32) or mid(str,i+1,1)=chr(9) or mid(str,i-1,1)=chr(32) or mid(str,i-1,1)=chr(9) then
result=result+" "
else
result=result+" "
end if
else
result=result+" "
end if
case else
result=result+mid(str,i,1)
end select
next
response.write result
end sub
const MaxPerPage=10
dim gstBookID
dim totalPut
dim CurrentPage
dim TotalPages
dim i
i=0
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
set rs=server.createobject("adodb.recordset")
sql="select * from reg order by id desc"
rs.open sql,db,1,1
if rs.eof or rs.bof then
response.write "<script language='javascript'>" & VbCRlf
response.write "alert('SORRY!没有任何记录!');" & VbCrlf
response.write "history.go(-1);" & vbCrlf
response.write "</script>" & VbCRLF
response.end
else
totalPut=rs.recordcount
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
end if
sub showContent
do while not (rs.eof or err)%>
<tr bgcolor="#006699">
<td colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="71%"><span lang="zh-cn"><font color="#FFFFFF">添加</font></span><font color="#FFFFFF"><span lang="zh-cn">日期</span><%= rs("time1") %></font></td>
<td width="29%">
<div align="right"> <font color="#FFFFFF">删除→</font><img src="image/del.gif" width="11" height="11" border="0" onclick="delit(<%=rs("id")%>)"></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="90" bgcolor="#FFFFFF"> <span lang="zh-cn">姓名</span> </td>
<td width="317" bgcolor="#FFFFFF"><%=rs("name")%></td>
</tr>
<tr>
<td width="90" bgcolor="#F5F5F5"> 电话</td>
<td width="317" bgcolor="#F5F5F5" ><% =rs("email") %>
</td>
</tr>
<tr>
<td width="90" bgcolor="#FFFFFF" > 金额</td>
<td width="317" bgcolor="#FFFFFF" ><%= rs("address") %></td>
</tr>
<tr bgcolor="#F5F5F5">
<td width="90">日期</td>
<td width="317"><%=rs("homepage")%></td>
</tr>
<tr bgcolor="#F5F5F5">
<td colspan="2">备注</td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" height="29">
<p>
<% showbody(rs("content")) %>
</p>
</td>
</tr>
<%i=i+1
if i >= MaxPerPage then exit do
rs.movenext
loop
end sub%>
</table>
</td>
</tr>
</table>
<form action="default.asp" method="post">
<div align="center">
<p><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
<%
If currentPage <> 1 Then
Response.Write "<A HREF=adminshow.asp>First</A> "
Response.Write "<A HREF=adminshow.asp?Page=" & (currentPage-1) & ">Prev</A> "
End If
If currentPage <> rs.PageCount Then
Response.Write "<A HREF=adminshow.asp?Page=" & (currentPage+1) & ">Next</A> "
Response.Write "<A HREF=adminshow.asp?Page=" & rs.PageCount & ">Last</A> "
End If%>
Num:<%=currentPage%> Total:<%=rs.PageCount%> Pages<font color="#000000">
Input Num
<input type="TEXT" name="page" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" size=2>
<br>
</font></font></p>
</div>
</form>
<%
rs.close
set rs=nothing
db.close
set db=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -