?? sysuser.asp
字號:
<!--#Include file="../Common/Inc_DatConn.asp"-->
<!--#Include file="Common/Inc_Config.asp"-->
<!--#Include file="Common/Inc_Function.asp"-->
<%
'┌─ 風云ASP在線 ────────────────────────┐
'│ │
'│ 作者:趙振波. http://www.fyasp.com │
'│ │
'│ Q Q:176189168 │
'│ │
'│ Email:fy96@163.com │
'│ │
'│ 程序定做,系統開發,網站制作,提供高質量的網絡產品、技術和服務!│
'│ │
'│【版權聲明】 │
'│ │
'│ 本程序版權歸坐看風云所有,未經授權擅自修改、復制或散布本程序│
'│ │
'│的部分或全部,將承受嚴厲的民事和刑事處罰,對已知的違反者將給予法 │
'│ │
'│律范圍內的全面制裁。對非法使用此程序所造成的一切后果本人概不負責!│
'│ │
'└─────────────────── http://www.fyasp.com ──┘
%>
<%if IsTimeOut(Session("strAccount"),Session("strPassWord")) then Response.Redirect "index.asp"%>
<html>
<head>
<title><% = strSiteName%> - 網站后臺管理系統</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="Common/Site.css" type="text/css">
<script language="javascript">
function CreateUser() {
popupWin = window.open('Oper.asp?Oper=AddUser','','width=300,height=150,scrollbars=no')
}
function EditUser(ID) {
popupWin = window.open('Oper.asp?Oper=EditUser&ID='+ ID,'','width=300,height=150,scrollbars=no')
}
function LockUser(ID) {
popupWin = window.open('Oper.asp?Oper=LockUser&ID='+ ID,'','width=300,height=150,scrollbars=no')
}
function UnLockUser(ID) {
popupWin = window.open('Oper.asp?Oper=UnLockUser&ID='+ ID,'','width=300,height=150,scrollbars=no')
}
function DelUser(ID) {
popupWin = window.open('Oper.asp?Oper=DelUser&ID='+ ID,'','width=300,height=150,scrollbars=no')
}
</script>
</head>
<body leftMargin="0" topMargin="2">
<!--#Include file="Common/inc_Top.asp"-->
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="105" valign="top" style="border-left: 1px solid rgb(0,0,0); border-right: 1px solid rgb(0,0,0)" class="bottom"><br>
<!--#Include file="Common/Inc_Button.asp"-->
</td>
<td valign="top" style="border-right: 1px solid rgb(0,0,0)" align="center">
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="50">當前位置:<a href="Main.asp">管理首頁</a> -> 用戶管理</td>
</tr>
</table>
<table border="0" width="96%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="50%" height="25">
<input onclick="Javascript:CreateUser()" type="button" value="新 增" name="button1" class="button">
</td>
<form method="post" action="SysUser.asp" name="Form1">
<td width="50%" align="right">用戶名:<input type="text" name="KeyWord" size="15" value="<%= Request("KeyWord")%>" class="face"> <input type="submit" name="submit" value="搜" class="button"></td>
</form>
</tr>
</table>
<table border="0" width="96%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="100%" class="booktable">
<table border="0" width="100%" cellspacing="1" cellpadding="0">
<tr>
<td width="10%" height="30" class="bottom" align="center">編 號</td>
<td width="20%" height="30" class="bottom" align="center">用戶名</td>
<td width="10%" height="30" class="bottom" align="center">狀 態</td>
<td width="15%" height="30" class="bottom" align="center">用戶身份</td>
<td width="25%" height="30" class="bottom" align="center">添加時間</td>
<td width="20%" height="30" class="bottom" align="center">操 作</td>
</tr>
<%
Dim rdsSysUser '/通告的數據庫對象及SQL語句/
Dim sqlSysUser
Dim rdsTotalRec
Dim strKeyWord '/關鍵字/
Dim intPage '/當前頁/
Dim intTotalRec '/所有記錄/
Dim intUserCot '/通告條數/
Dim intUserCount '/通告條數/
Dim n,p,ii '/定義一些臨時變量/
Dim strState
strKeyWord = Request("KeyWord")
intPage = Trim(Request("Page"))
if intPage = "" then
intPage = 1
else
intPage = Clng(intPage)
end if
intUserCot = 10
set rdsSysUser = Server.CreateObject("ADODB.Recordset")
if strKeyWord <> "" then
set rdsTotalRec = Conn.Execute("Select Count(UserKey) From Sys_Account Where Account<>'fyaspbb' and Account like '%"& strKeyWord &"%'")
intTotalRec = rdsTotalRec(0)
sqlSysUser = "Select * From Sys_Account Where Account<>'fyaspbb' and Account like '%"& strKeyWord &"%' Order By UserKey Desc"
else
set rdsTotalRec = Conn.Execute("Select Count(UserKey) From Sys_Account where Account<>'fyaspbb' ")
intTotalRec = rdsTotalRec(0)
sqlSysUser = "Select * From Sys_Account where Account<>'fyaspbb' Order By UserKey Desc"
end if
rdsSysUser.Open sqlSysUser,Conn,1,1
if not rdsSysUser.EOF then
if intTotalRec mod intUserCot = 0 then
n = intTotalRec \ intUserCot
else
n = intTotalRec \ intUserCot + 1
end if
rdsSysUser.MoveFirst
if intPage > n then intPage = n
if intPage < 1 then intPage = 1
rdsSysUser.Move (intPage - 1) * intUserCot
do while not rdsSysUser.EOF and intUserCount < Clng(intUserCot)
intUserCount = intUserCount + 1
if rdsSysUser("State") = 0 then
strState = "活動"
strOperState = "<a href=""javascript:LockUser("& rdsSysUser("UserKey") &")""><img border=""0"" src="""& strImageUrl &"Lock.gif"" alt=""關閉用戶""></a>"
else
strState = "<font color=""red"">關閉</font>"
strOperState = "<a href=""javascript:UnLockUser("& rdsSysUser("UserKey") &")""><img border=""0"" src="""& strImageUrl &"UnLock.gif"" alt=""開啟用戶""></a>"
end if
%>
<tr>
<td height="25" align="center" class="banma1"><%= rdsSysUser("UserKey")%></td>
<td height="25" align="center" class="banma2"><%= rdsSysUser("Account")%></td>
<td height="25" align="center" class="banma1"><%= strState%></td>
<td height="25" align="center" class="banma2"><%if rdsSysUser("UserLevel") = 1 then Response.Write "普通用戶" else Response.Write "管 理 員" end if%></td>
<td height="25" align="center" class="banma1"><%= FormatTime(rdsSysUser("CreateTime"),6)%></td>
<td height="25" align="center" class="banma2"><%= strOperState%> <a href="javascript:EditUser(<%= rdsSysUser("UserKey")%>)"><img border="0" src="<%= strImageUrl%>/Edit.gif" alt="編輯用戶"></a> <%if Session("strAccount") = rdsSysUser("Account") then%><img border="0" src="<%= strImageUrl%>Del.gif" alt="刪除用戶"><%else%><a href="javascript:DelUser(<%= rdsSysUser("UserKey")%>)"><img border="0" src="<%= strImageUrl%>Del.gif" alt="刪除用戶"></a><%end if%></td>
</tr>
<%
rdsSysUser.MoveNext
loop
else
Response.Write "<tr><td width=""100%"" height=""25"" colspan=""6"" class=""banma1""> <font color=""#FF0000"">沒有管理用戶信息...</font></td></tr>"
end if
rdsSysUser.Close
set rdsSysUser = nothing
if intPage - 1 mod 10 = 0 then
p = (intPage - 1) \ 10
else
p = (intPage - 1) \ 10
end if
%>
</table>
</td>
</tr>
</table>
<table border="0" width="96%" cellspacing="0" cellpadding="0" align="center">
<form method="post" action="SysUser.asp" id="form2" name="form2">
<input type="hidden" name="KeyWord" value="<%= strKeyWord%>">
<tr>
<td width="30%" height="30" valign="middle">頁次:<b><%= intPage %></b>/<b><%= n %></b>頁 每頁<b><%= intUserCot %></b>條 共<b><%= intTotalRec %></b>條</td>
<td width="70%" height="30" valign="middle"><div align="right">分頁:
<%
if intPage = 1 then
Response.Write "<font face=webdings>9</font> "
else
Response.Write "<a href='?Page=1&KeyWord="& strKeyWord &"' title=首頁><font face=webdings>9</font></a> "
end if
if p * 10 > 0 then Response.Write "<a href='?Page="&Cstr(p*10)&"&KeyWord="& strKeyWord &"' title=上十頁><font face=webdings>7</font></a> "
Response.Write "<b>"
for ii = p * 10 + 1 to P * 10 + 10
if ii = intPage then
Response.Write "<font color=""#FF0000"">"+Cstr(ii)+"</font> "
else
Response.Write "<a href='?Page="&Cstr(ii)&"&KeyWord="& strKeyWord &"'>"+Cstr(ii)+"</a> "
end if
if ii = n then exit for
next
Response.Write "</b>"
if ii < n then Response.Write "<a href='?Page="&Cstr(ii)&"&KeyWord="& strKeyWord &"' title=下十頁><font face=webdings>8</font></a> "
if intPage=n then
Response.Write "<font face=webdings>:</font> "
else
Response.Write "<a href='?Page="&Cstr(n)&"&KeyWord="& strKeyWord &"' title=尾頁><font face=webdings>:</font></a> "
end if
%>
轉到:<input type="text" name="Page" size="2" maxlength="10" value="<%= intPage %>" class="face"> <input type="submit" value="Go" name="submit" class="button">
</div></td>
</tr>
</form>
</table>
<br>
</td>
</tr>
</table>
<!--#Include file="Common/Inc_Bottom.asp"-->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -