📄 sk_crm_system_userlist.asp
字号:
<!--#include file="conn.asp" -->
<%
dim filename,download
SK_mclass=request("SK_mclass")
dd=session("dd")
if session("name")="" or session("dd")="" or int(dd)<>int(SK_mclass) then
Response.Write("<script>alert(""非法登陆,请确认密码的正确性!\n或者已经被管理员锁定!"");history.back();</script>")
response.end
end if
if session("quanxian")<"3" then
Response.Write("<script>alert(""对不起,你的权限不够!"");history.back();</script>")
response.end
end if
filename="SK_CRM_userlist.asp"
dim msearchword
msearchword=Request("search")
vestid=Request("id")
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
if SK_mclass="" then
SK_mclass="1"
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.3790.2993" name=GENERATOR></HEAD>
<BODY leftMargin=0 topMargin=0 marginheight="0"><LINK
href="images/style.css" type=text/css rel=stylesheet>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD class=td>
<DIV
align=left> 您现在的位置:CRM >> 用户管理 >> 用户列表</DIV></TD></TR></TBODY></TABLE>
<TABLE borderColor=#ffffff cellSpacing=0 borderColorDark=#ffffff cellPadding=3 width="100%" borderColorLight=#dfdfdf border=1>
<TBODY>
<TR>
<TD height=30><b>用户列表 - <a href="SK_CRM_user_add.asp">增加用户</a></b></TD>
</TR>
<TR>
<TD height=20><B><%
dd=session("dd")
const MaxPerPage=12
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
sql="select * from SK_mclass where user_id ="&dd&" order by mclass_id desc; "
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
还没有添加用户!
<%
else
totalPut=rs.recordcount
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"SK_CRM_system_userlist.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"SK_CRM_system_userlist.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"SK_CRM_system_userlist.asp"
end if
end if
rs.close
end if
set rs=nothing
sub showContent
dim i
i=0
%></B></TD>
</TR>
<TR>
<TD height=20>
<TABLE borderColor=#ffffff cellSpacing=0 borderColorDark=#ffffff
cellPadding=3 width="100%" borderColorLight=#dfdfdf border=1>
<TBODY>
<TR align=middle height=22>
<TD width="11%" align="center" bgcolor="E6e6e6">用户名</TD>
<TD width="9%" align="center" bgcolor="E6e6e6">姓名</TD>
<TD width="10%" align="center" bgcolor="E6e6e6">职务</TD>
<TD width="6%" align="center" bgcolor="E6e6e6">性别</TD>
<TD width="11%" align="center" bgcolor="E6e6e6">部门</TD>
<TD width="11%" align="center" bgcolor="E6e6e6">电话</TD>
<TD width="16%" align="center" bgcolor="E6e6e6">电子邮件</TD>
<TD width="10%" align="center" bgcolor="E6e6e6">权限</TD>
<TD width="16%" align="center" bgcolor="E6e6e6">操作</TD>
</TR>
<%
do while not rs.EOF
zw=rs("zhiwu")
if rs("zhiwu") ="未填" then
zw=""
else
zw=rs("zhiwu")
end if
%>
<TR align=middle height=22>
<TD align="center"><input type="hidden" name="time" value="<%=i+1%>"><a href=SK_CRM_system_views.asp?id=<%=rs("mclass_id")%>><%=rs("name")%></a></TD>
<TD align="center"><%=rs("ming")%></TD>
<TD align="center"><%=zw%></TD>
<TD align="center">
<%
if rs("sex") ="0" then
response.write"男"
else
response.write"女"
end if
%></TD>
<TD align="center"><%=rs("bumen")%></TD>
<TD align="center">
<%
if rs("phone") ="未填" and rs("mobile") ="未填" then response.write "未知或无" end if
if rs("phone") ="未填" and rs("mobile") <>"未填" then response.write rs("mobile") end if
if rs("phone") <>"未填" and rs("mobile") ="未填" then response.write rs("phone") end if
if rs("phone") <>"未填" and rs("mobile") <>"未填" then response.write rs("mobile") end if
%>
</TD>
<TD align="center"><% if rs("email")="未填" then%><%=rs("email")%><%else%><a href="mailto:<%=rs("email")%>"><%=rs("email")%></a><%end if%></TD>
<TD align="center">
<%
if rs("quanxian") ="1" then response.write"只读权限" end if
if rs("quanxian") ="2" then response.write"读写权限" end if
if rs("quanxian") ="3" then response.write"超级管理" end if
if rs("quanxian") ="0" then response.write"<font color=#FF0000>账户停用</font>" end if
%>
</TD>
<TD align="center"><%if rs("user_id")=rs("mclass_id") or rs("name")=session("name") then%><font color="#D3D1D1">该用户禁止操作</font><%else%><a target="_self" href="SK_CRM_system_views.asp?id=<%=rs("mclass_id")%>">详细</a> |
<a target="_self" href="SK_CRM_system_edit.asp?id=<%=rs("mclass_id")%>">修改</a> | <a href="SK_CRM_system_deltree.asp?id=<%=rs("mclass_id")%>">删除</a><%end if%></TD>
</TR>
<% i=i+1
if i>=MaxPerPage then exit do
rs.MoveNext
loop
%>
</TBODY></TABLE>
<br>
<%end sub%>
</TD></TR>
</TBODY></TABLE>
</TD></TR></TABLE></BODY></HTML>
<%
function getfolderm()
dim tmprs,tmpid,tmpsql
set tmprs=server.createobject("adodb.recordset")
tmpsql="Select * from SK_mclass where user_id = "&SK_mclass&" "
tmprs.open tmpsql,conn,1,1
getfolderm="<a target=mainFrame href=system_userlist.asp?SK_mclass="&session("dd")&"&SK_sclass="&com_vest&">"&tmprs("mclass_folder")&"</a>"
set tmprs=nothing
if isnull(getfolderm) then getfolderm="查看详细资料"
end function
function getfolders()
if request("SK_sclass")<>"" then
dim tmprss,tmpids,tmpsqls
set tmprss=server.createobject("adodb.recordset")
tmpsqls="Select * from SK_sclass where sclass_id = "&request("SK_sclass")&" "
tmprss.open tmpsqls,conn,1,1
getfolders=tmprss("sclass_folder")
set tmprss=nothing
if isnull(getfolders) then getfolders="查看详细资料"
end if
end function
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
Response.Write "<font style=""font-size:9pt""><div align=""center""><table border=0 cellpadding=0 cellspacing=0 width=""80%"" ><tr><td width=""50%"" valign=middle>"
Response.Write "<font class=3dfont size=2><p align=""left"">合计<font color=#008000><b>"&totalnumber&"</b></font>个用户</td><td width=""50%"" valign=middle>"
Response.Write "<font class=3dfont size=2><p align=right> 第<font color=#008000><b>"¤tpage&"</b></font>页 | 共<font color=#008000><b>"&n&"</b></font>页 | "
if CurrentPage<2 then
response.write "<font color=#6A6A6A><font style=""font-size:9pt"">第一页</a> "
response.write "<font color=#6A6A6A><font style=""font-size:9pt"">前一页</a> "
else
response.write "<a href="&filename&"?page=1&SK_mclass="&SK_mclass&">第一页</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&"&SK_mclass="&SK_mclass&">前一页</a> "
end if
if n-currentpage<1 then
response.write "<font color=#6A6A6A><font style=""font-size:9pt"">后一页</a> "
response.write "<font color=#6A6A6A><font style=""font-size:9pt"">最后页</a>"
else
response.write "<a href="&filename&"?page="&CurrentPage+1&"&SK_mclass="&SK_mclass&">"
response.write "后一页</a> "
response.write "<a href="&filename&"?page="&n&"&SK_mclass="&SK_mclass&">最后页</a>"
end if
Response.Write "</td></tr></table></div>"
end function
set rs=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -