?? user1info.asp
字號:
<%@ LANGUAGE="VBSCRIPT" %>
<%
if request.cookies("adminok")="" then
response.redirect "login.htm"
end if
%>
<html>
<head>
<title>普通會員列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css"></head>
<body text="#000000">
<br>
<div align="center">
<center>
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sqltext="select * from userinfo where txtclass='普通會員' and flag=1 order by id desc"
rs.open sqltext,conn,1,1
dim MaxPerPage
MaxPerPage=20
'假如沒有數(shù)據(jù)時
If rs.eof and rs.bof then
call showpages
response.write "<p align='center'><font color='#ff0000'>還沒普通會員信息</font></p>"
response.end
End if
'取得頁數(shù),并判斷用戶輸入的是否數(shù)字類型的數(shù)據(jù),如不是將以第一頁顯示
dim text,checkpage
text="0123456789"
Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next
If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
Else
CurrentPage= 1
End If
If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
call showpages
call list
If Rs.recordcount > MaxPerPage then
call showpages
end if
'顯示帖子的子程序
Sub list()%><form method='POST' action='news1_Search.asp'>
<TABLE cellSpacing=1 cellPadding=4 width=756 bgColor=#416327 height="136">
<TBODY>
<TR vAlign=top bgColor=#e1f0ff>
<TD class=main2 height="10" bgcolor="#398A00" background="images/bg.gif" width="742"></TD></TR>
<TR vAlign=top bgColor=#e1f0ff>
<TD class=main2 height="18" width="734" bgcolor="#DEEBD6">普通會員列表--
<input type="button" value="管理首頁" onclick=" window.location='manage.asp'" style="font-family: 新細(xì)明體, 宋體, Arial; font-size: 9pt; height:20px;background-color:#D4D0C8;" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#D4D0C8'">
</TD>
</center>
</TR>
<center>
<TR vAlign=top bgColor=#e1f0ff>
<TD class=main2 height="15" width="742" bgcolor="#DEEBD6">
<table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolorlight="#416327" bordercolordark="#DEEBD6" height="13">
<td width="11%" bgcolor="#398A00" align="center" height="19" class=main2 ><font color="#FFFFFF">會員賬號</font></td>
<td width="11%" bgcolor="#398A00" align="center" height="19" class=main2 ><font color="#FFFFFF">主營類別</font></td>
<td width="29%" bgcolor="#398A00" align="center" height="19" class=main2 ><font color="#FFFFFF">公司名稱</font></td>
<td width="11%" bgcolor="#398A00" align="center" height="19" class=main2 ><font color="#FFFFFF">聯(lián)系人</font></td>
<td width="9%" bgcolor="#398A00" align="center" height="19" class=main2><font color="#FFFFFF">省份</font></td>
<td width="9%" bgcolor="#398A00" align="center" height="19" class=main2><font color="#FFFFFF">注冊日期</font></td>
<td width="14%" bgcolor="#398A00" align="center" height="19" class=main2><font color="#FFFFFF">操作</font></td>
<%
if not rs.eof then
i=0
do while not rs.eof
%>
</center>
<tr class=main2>
<center>
<td width="11%" align="left" height="1">
<p align="center"><%=rs("txtId")%></td>
</center>
<td width="11%" align="left" height="1"><%=rs("txtCat")%></td>
<td width="29%" align="left" height="1"><%=rs("txtCompany")%></td>
<td width="11%" align="left" height="1"><%=rs("txtContect")%></td>
<td width="9%" align="left" height="1">
<p align="left"><%=rs("txtProv")%></td>
<td width="9%" align="left" height="1">
<p align="center"><%=rs("dateandtime")%></p>
</td>
<center>
<td width="14%" align="center" height="1">
<input type="button" value="詳情" onclick=" window.location='userdetail.asp?id=<%=rs("id")%>'" style="font-family: 新細(xì)明體, 宋體, Arial; font-size: 9pt; height:20px;background-color:#D4D0C8;" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#D4D0C8'">
<input type="button" value="刪除" onclick="if (confirm('確實要此條記錄嗎?')) window.location='userinfodel.asp?id=<%=rs("id")%>'" style="font-family: 新細(xì)明體, 宋體, Arial; font-size: 9pt; height:20px;background-color:#D4D0C8;" onMouseOver="this.style.backgroundColor='#FFC864'" onMouseOut="this.style.backgroundColor='#D4D0C8'"></td>
</tr>
<%
i=i+1
if i >= MaxPerpage then exit do
rs.movenext
loop
end if
%>
</table>
</center>
</TD></TR>
<TR bgColor=#e1f0ff>
<TD class=main2 width="742" height="27" bgcolor="#DEEBD6">
<p align="center">
</TD></TR>
<TR bgColor=#e1f0ff>
<TD class=main2 width="742" height="4" bgcolor="#398A00" background="images/bg.gif"></TD></TR></TBODY></TABLE><br>
<%
End sub
rs.close
conn.close
%>
</div>
<div align="center">
<center> </form>
<%
'顯示翻頁的子程序
sub showpages()%>
<table bgColor="#f8e8a0" border="0" cellPadding="0" cellSpacing="0" width="100%" >
<tr><td >
<%
response.write "<form method=Post action='user1info.asp'>"
%>
<table bgColor="#1f60a0" border="0" cellPadding="0" cellSpacing="0" width="100%" height="30">
<tr>
<td bgcolor="#DEEBD6" class=main2>
<font color="#000000">
<p align="left">
<%
Response.write "<font color='#000000'>分頁-</font>"
If currentpage > 1 Then
response.write "<a href='user1info.asp?&page="+cstr(1)+"'><font color='#000000'>首頁</font></a><font color='#ffffff'><b>-</b></font>"
Response.write "<a href='user1info.asp?page="+Cstr(currentpage-1)+"'><font color='#000000'>前頁</font></a><font color='#ffffff'><b>-</b></font>"
Else
Response.write "<font color='#000000'>首頁-</font>"
Response.write "<font color='#000000'>前頁-</font>"
End if
If currentpage < Rs.PageCount Then
Response.write "<a href='user1info.asp?page="+Cstr(currentPage+1)+"'><font color='#000000'>后頁</font></a><font color='#ffffff'><b>-</b></font>"
Response.write "<a href='user1info.asp?page="+Cstr(Rs.PageCount)+"'><font color='#000000'>尾頁</font></a> "
Else
Response.write "<font color='#000000'>后頁-</font>"
Response.write "<font color='#000000'>尾頁</font> "
End if
Response.write "<font color='#000000'>頁次:</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) & "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font> "
Response.write "<font color=#ff0000>" & Cstr(MaxPerPage) & "</font>" & "<font color='#000000'>條記錄/頁 " & "共</font>" & "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>條記錄</font> "
response.write "</td><td align='right'>"
response.write "<font color='#ffffff' class=main2>轉(zhuǎn)到:</font><input type='text' name='page' size=4 maxlength=4 class=smallInput value="&Currentpage&"> "
response.write "<input class=buttonface type='submit' value='Go' name='cndok' style='background-color: #e1f0ff'></span> "
%>
</font>
</td>
</tr>
</table>
</center>
</td></tr>
</table>
</form>
<%end sub%>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -