?? hyman.asp
字號:
<!-- #include file="include/adovbs.inc" -->
<!-- #include file="include/dataconn.asp" -->
<!-- #include file="include/checksession.asp" -->
<!-- #include file="common.asp" -->
<%
Response.Buffer =false
Response.Expires=-1
content=rtrim(ltrim(Request("findcontent")))'查找的關鍵字
set HyRs=server.CreateObject("adodb.recordset")
if len(content)=0 then '判斷屬于查找還是列出所有信息
sql = "select hy.*,HyClub.AddTime,HyClub.HyNumber from hy left join HyClub on Hy.ID=HyClub.HyID where hy.IsApproved=0"
else
sql ="select hy.*,HyClub.AddTime,HyClub.HyNumber from hy left join HyClub on Hy.ID=HyClub.HyID where "
sql=sql & " hy.HyName like '%" & content & "%'"
sql = sql & " or HyClub.HyNumber like '%" & content & "%'"
sql=sql & " and hy.IsApproved=0"
end if
'
'Response.Write sql
'Response.End
HyRs.Open sql,conn
j=HyRs.RecordCount
%>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="stylesheet" href="include/e1.css" type="text/css">
</head>
<script>
function openwin(page,size)
{
window.open(page,"newuser","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+ size);
}
function makesure()
{
return(confirm("此操作十分危險,請你考慮清楚,務必慎重!\n此操作將永久刪除此會員,請確認此會員是否有下線,否則不能刪除\n你確定要刪除此會員嗎?"))
}
function makesureConfirm()
{
return(confirm("此操作將確認會員,你確定要確認嗎?"))
}
</script>
<body leftmargin="10" topmargin="10" marginwidth="0" marginheight="0">
<form method="post" action="Hyman.asp" id="form1" name="form1">
<table width="600" border="0" height="21" cellpadding="0" cellspacing="0">
<tr>
<td>
<div align="center">
查找:<input id="findcontent" name="findcontent" value="輸入需要查找的關鍵字" size="20" onFocus="this.value=''">
<input type="image" value="submit" src="Image/027.gif" id="image1" name="image1">
</div>
</td>
</tr>
</table>
</form>
<%
if j>0 then
dim i
i=1
const pagesize=15
HyRs.PageSize = pagesize
total=HyRs.PageCount
pageno=Request("pageno")
if pageno="" then pageno=1
if not isnumeric(pageno) and pageno<>"" then
%>
<script>alert("請輸入正確的頁碼");
window.history.back();</script>
<%Response.End
End if
if (pageno-1)*pagesize>=j then
if (j mod pagesize)=0 then
pageno= j \ pagesize
else
pageno= j \ pagesize + 1
end if
end if
if pageno<1 then
%>
<script>alert("頁碼數不能小于1");
window.history.back();</script>
<%Response.End
End if
if (pageno>65535) then
%>
<script>alert("頁碼數不能大于總數!");
window.history.back();</script>
<%Response.End
end if
if (clng(pageno)>clng(total)) then %>
<script>alert("頁碼數不能大于總數!");
window.history.back();</script>
<%
Response.End
end if
pageno=cint(pageno)
%>
<table border="1" cellpadding="0" cellspacing="0" width="98%" bordercolordark="#e0f4ff" bordercolorlight="#162d6b">
<tr class="td3">
<td width="6%"> <div align="center"><font color="#FFFFFF">序號</font></div></td>
<td width="15%"> <div align="center"><font color="#FFFFFF">姓名</font></div></td>
<td width="20%"> <div align="center"><font color="#FFFFFF">登陸帳號</font></div></td>
<td width="10%"> <div align="center"><font color="#FFFFFF"><% =GetDisplayName("HyMobile")%></font></div></td>
<td width="10%"> <div align="center"><font color="#FFFFFF">注冊時間</font></div></td>
<td width="6%"> <div align="center"><font color="#FFFFFF">確認</font></div></td>
<td width="6%"> <div align="center"><font color="#FFFFFF">刪除</font></div></td>
</tr>
<%
HyRs.absolutepage=pageno
dim x
x=2
while (not HyRs.eof) and (i<=pagesize)
if x mod 2 then
%>
<tr class="td1">
<%
else
%>
<tr height="25">
<%
end if
%>
<td> <div align="center">
<% =i%>
</div></td>
<td><div align="center"><a href="javascript:openwin('hyview.asp?id=<% =HyRs("id")%>',800)">
<%=HyRs("HyName")%> </a></div></td>
<td><div align="center"><%=HyRs("HyNumber")%> </div></td>
<td> <div align="center">
<% =HyRs("HyMobile")%>
</div></td>
<td> <div align="center">
<% =HyRs("AddTime")%>
</div></td>
<td><div align="center"><a href="HyConfirm.asp?id=<% =HyRs("id")%>&pageno=<% =pageno%>&findcontent=<%=content%>" onclick="return makesureConfirm();">確認</a></div></td>
<td><div align="center"><a href="Hydel.asp?id=<% =HyRs("id")%>&pageno=<% =pageno%>&findcontent=<%=content%>" onclick="return makesure();">刪除</a></div></td>
<%
HyRs.movenext
i=i+1
x=x+1
wend %>
</tr>
<%
else
Response.Write "沒有未確認的會員!<a href='javascript:history.back()'>返回</a>"
end if%>
</table>
<p></p>
<%if j>0 then%>
<table align="center">
<tr>
<form name="thisform1" method="Post" action="Hyman.asp?findcontent=<%=content%>">
<td>到第
<input type="text" name="pageno" value="<% =pageno%>" size="3">
頁<a onclick="javascript:thisform1.submit();">GO</a> </font></td>
</form>
<td>第
<% =pageno %>頁
/共
<% =total%>
頁</font></td>
<% if pageno<=1 then %>
<td><font color="#cccccc">首頁</font></td>
<td><font color="#cccccc">上一頁</font></td>
<% else %>
<td><a href="Hyman.asp?pageno=1&findcontent=<%=content%>"><font face="Webdings" color="#FFFFFF">9</font>首頁</font></a></td>
<td><a href="Hyman.asp?pageno=<%=pageno-1%>&findcontent=<%=content%>">上一頁</font></a></td>
<%end if%>
<% if pageno>=total then %>
<td><font color="#cccccc">下一頁</font></td>
<td><font color="#cccccc">尾頁</font></td>
<%else%>
<td><a href="Hyman.asp?pageno=<%=pageno+1%>&findcontent=<%=content%>">下一頁</font></a></td>
<td><a href="Hyman.asp?pageno=<%=total%>&findcontent=<%=content%>">尾頁</font></a></td>
<% end if%>
</tr>
</table>
<%end if%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -