?? manageuser.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Option Explicit
Response.Buffer = True
Response.Expires = 0
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>
<!--#include file="Connections/conn.asp" -->
<!--登錄權限判斷,Session和MD5加密判斷-->
<%
''生成下拉列表
Function getList(i,sTable,iId,sValue,sName,selfValue)
If i < 1 Or i > 2 Then
getList = ""
Exit Function
End If
Dim strList
Dim rs
If i = 1 Then
strList = "<select name=""" & sName & """ selfValue=""" & selfValue & """>"
strList = strList & "<option value="""">請選擇</option>"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From " & sTable & "",conn,3,1
Do While Not rs.BOF And Not rs.EOF
strList = strList & "<option value=""" & rs(sValue) & """>" & rs(sValue) & "</option>"
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
strList = strList & "</select>"
getList = strList
Else
strList = "<select name=""" & sName & """ selfValue=""" & selfValue & """>"
strList = strList & "<option value="""">請選擇</option>"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From " & sTable & "",conn,3,1
Do While Not rs.BOF And Not rs.EOF
strList = strList & "<option value=""" & rs(iId) & """>" & rs(sValue) & "</option>"
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
strList = strList & "</select>"
getList = strList
End If
End Function
Rem Session("CRM_account") 用戶帳號
Rem Session("CRM_name") 用戶名
Rem Session("CRM_level") 用戶等級
If Session("CRM_account") = "" Or Session("CRM_name") = "" Or Session("CRM_level") <= 0 Then Response.Redirect("login.asp")
If Session("CRM_level") <> 9 Then Response.Redirect("listAll.asp")
Function getGroupName(gId)
If Not IsNumeric(gId) Or gId < 0 Then
getGroupName = ""
Else
Dim rs,gName
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From baidu_group Where gId = " & gId,conn,3,1
If rs.RecordCount <> 1 Then
gName = ""
Else
gName = rs("gName")
End If
rs.Close
Set rs = Nothing
getGroupName = gName
End If
End Function
Function getLevelName(lId)
If Not IsNumeric(lId) Or lId <= 0 Then
getLevelName = ""
Else
Dim rs,lName
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From baidu_level Where lId = " & lId,conn,3,1
If rs.RecordCount <> 1 Then
lName = ""
Else
lName = rs("lName")
End If
rs.Close
Set rs = Nothing
getLevelName = lName
End If
End Function
Dim strCounter,strToPrint
Dim rs,intTotalRecords,intTotalPages,intCurrentPage,intPageSize
intCurrentPage = CInt(ABS(Request("pageNum")))
If Not IsNumeric(intCurrentPage) Or intCurrentPage <= 0 Then intCurrentPage = 1
intPageSize = 10
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From baidu_user Order By uId",conn,3,1
intTotalRecords = rs.RecordCount
rs.PageSize = intPageSize
intTotalPages = rs.PageCount
If intCurrentPage > intTotalPages Then intCurrentPage = intTotalPages
If intTotalRecords > 0 Then rs.AbsolutePage = intCurrentPage
strCounter = strCounter & "共 " & intTotalRecords & " 條記錄 "
strCounter = strCounter & "共 " & intTotalPages & " 頁 "
strCounter = strCounter & "當前第 " & intCurrentPage & " 頁 "
If intCurrentPage <> 1 And intTotalRecords <> 0 Then
strCounter = strCounter & "<a href=""?pageNum=1""><<首頁</a> "
Else
strCounter = strCounter & "<<首頁 "
End If
If intCurrentPage > 1 Then
strCounter = strCounter & "<a href=""?pageNum=" & intCurrentPage - 1 & """><上一頁</a> "
Else
strCounter = strCounter & "<上一頁 "
End If
If intCurrentPage < intTotalPages Then
strCounter = strCounter & "<a href=""?pageNum=" & intCurrentPage + 1 & """>下一頁></a> "
Else
strCounter = strCounter & "下一頁> "
End If
If intCurrentPage <> intTotalPages Then
strCounter = strCounter & "<a href=""?pageNum=" & intTotalPages & """>尾頁>></a>"
Else
strCounter = strCounter & "尾頁>>"
End If
Dim i
i = 0
Do While Not rs.BOF And Not rs.EOF
i = i + 1
strToPrint = strToPrint & " <tr>" & VBCrlf
strToPrint = strToPrint & " <td align=""center"">" & rs("uId") & "</td>" & VBCrlf
If rs("uBlock") = False Then
strToPrint = strToPrint & " <td>" & rs("uAccount") & "</td>" & VBCrlf
Else
strToPrint = strToPrint & " <td><font color=""#FF0000"">" & rs("uAccount") & "</font></td>" & VBCrlf
End If
strToPrint = strToPrint & " <td>" & rs("uPassword") & "</td>" & VBCrlf
strToPrint = strToPrint & " <td>" & rs("uName") & "</td>" & VBCrlf
strToPrint = strToPrint & " <td>" & getGroupName(rs("uGroup")) & "</td>" & VBCrlf
strToPrint = strToPrint & " <td>" & getLevelName(rs("uLevel")) & "</td>" & VBCrlf
If rs("uBlock") = False Then
strToPrint = strToPrint & " <td align=""center"">[<a href=""?action=edit&uId=" & rs("uId") & """>修改</a>] [<a href=""?action=block&uId=" & rs("uId") & """>凍結</a>] [<a href=""?action=delete&uId=" & rs("uId") & """ onClick=""return confirm('確定刪除該用戶和相\r關的所有資料?');"">刪除</a>]</td>" & VBCrlf
Else
strToPrint = strToPrint & " <td align=""center"">[<a href=""?action=edit&uId=" & rs("uId") & """>修改</a>] [<a href=""?action=block&uId=" & rs("uId") & """>解凍</a>] [<a href=""?action=delete&uId=" & rs("uId") & """ onClick=""return confirm('確定刪除該用戶和相\r關的所有資料?');"">刪除</a>]</td>" & VBCrlf
End If
strToPrint = strToPrint & " </tr>" & VBCrlf
If i >= intPageSize Then Exit Do
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="Author" content="http://www.technet.cn"><meta name="Date" content="2003-08"><title>客戶資料收集系統</title>
<link href="myStyle.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function showHideHead(strSrc)
{
var strFile = strSrc.substring(strSrc.lastIndexOf("/"),strSrc.length);
if (strFile == "/arrow_up.gif"){
oHead.style.display = "none";
oHeadCtrl.src = "images/arrow_down.gif";
oHeadCtrl.alt = "顯示頭部";
oHeadBar.title = "顯示頭部";
}
else {
oHead.style.display = "block";
oHeadCtrl.src = "images/arrow_up.gif";
oHeadCtrl.alt = "隱藏頭部";
oHeadBar.title = "隱藏頭部";
}
}
function checkInput(o)
{
var oo = eval("document.all." + o);
var num = oo.length;
for(var i=0;i<num;i++){
if(oo[i].value == ""){
alert(oo[i].selfValue + "不能為空。");
oo[i].focus();
return false
break;
}
}
}
if (this.location.href == top.location.href){
top.location.href = "";
}
-->
</script>
</head>
<body style="background-color: menu;" onCopy="return false;" onSelectStart="return false;" onCut="return false;" onContextMenu="window.event.returnValue=false;">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr id="oHead" style="display: block;">
<td height="1" valign="top">
<table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"><img src="images/null.gif" width="1" height="1"></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="menu">
<tr>
<td align="left" background='images/tab_top_background_runner.gif'> <table width="5" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/null.gif" width="1" height="1"></td>
</tr>
</table>
<table onclick="window.location.replace('listAll.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
<tr >
<td><img src="images/tab_off_left.gif" width="16" height="24"></td>
<td background="images/tab_off_middle.gif">查看所有數據</td>
<td><img src="images/tab_off_right.gif" width="16" height="24"></td>
</tr>
</table>
<table onclick="window.location.replace('addData.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td><img src="images/tab_off_left.gif" width="16" height="24"></td>
<td background="images/tab_off_middle.gif">添加數據</td>
<td><img src="images/tab_off_right.gif" width="16" height="24"></td>
</tr>
</table>
<table onclick="window.location.replace('advanceSearch.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td><img src="images/tab_off_left.gif" width="16" height="24"></td>
<td background="images/tab_off_middle.gif">高級搜索</td>
<td><img src="images/tab_off_right.gif" width="16" height="24"></td>
</tr>
</table>
<table onclick="window.location.replace('dataForm.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td><img src="images/tab_off_left.gif" width="16" height="24"></td>
<td background="images/tab_off_middle.gif">數據報表</td>
<td><img src="images/tab_off_right.gif" width="16" height="24"></td>
</tr>
</table>
<table onclick="window.location.replace('exportData.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td><img src="images/tab_off_left.gif" width="16" height="24"></td>
<td background="images/tab_off_middle.gif">數據導出</td>
<td><img src="images/tab_off_right.gif" width="16" height="24"></td>
</tr>
</table>
<% If Session("CRM_level") = 9 Then %>
<table onclick="window.location.replace('transData.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td><img src="images/tab_off_left.gif" width="16" height="24"></td>
<td background="images/tab_off_middle.gif">數據轉移</td>
<td><img src="images/tab_off_right.gif" width="16" height="24"></td>
</tr>
</table>
<table onclick="window.location.replace('manageUser.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td><img src="images/tab_on_left.gif" width="16" height="24"></td>
<td background="images/tab_on_middle.gif">用戶管理</td>
<td><img src="images/tab_on_right.gif" width="16" height="24"></td>
</tr>
</table>
<table onclick="window.location.replace('system_level.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td><img src="images/tab_off_left.gif" width="16" height="24"></td>
<td background="images/tab_off_middle.gif">系統設置</td>
<td><img src="images/tab_off_right.gif" width="16" height="24"></td>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -