📄 userlist.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../config.asp"-->
<!--#include file="checklogin.asp"-->
<%
id=replace(request("id"),"'","")
companyid=replace(request("id"),"'","")
cid=request.Form("cid")
if companyid="" then companyid=cid
'-----------------------------------------
ssql="select * from oa_PhoneConfig where companyid="&companyid
set srs=conn.execute(ssql)
if not srs.eof then
UserID1=trim(srs("UserID"))
UserName1=trim(srs("UserName"))
UserPass1=trim(srs("UserPass"))
end if
srs.close
set srs=nothing
'----------------------------------------
Submit=trim(request.Form("Submit"))
blogid=replace(trim(request.Form("blogid"))," ","")
UserID=trim(request.Form("UserID"))
UserName=trim(request.Form("UserName"))
UserPass=trim(request.Form("UserPass"))
if Submit="锁定管理员" then
if blogid="" then
call message("请至少选择一项","back")
call EndExit()
end if
bid=split(blogid,",")
for i=0 to ubound(bid)
delsql="update oa_admin set isLock=1 where id="&bid(i)&""
conn.execute(delsql)
next
call message("锁定管理员成功","userlist.asp?id="&cid&"")
call EndExit()
elseif Submit="解除锁定" then
if blogid="" then
call message("请至少选择一项","back")
call EndExit()
end if
bid=split(blogid,",")
for i=0 to ubound(bid)
delsql="update oa_admin set isLock=0 where id="&bid(i)&""
conn.execute(delsql)
next
call message("解除锁定成功","userlist.asp?id="&cid&"")
call EndExit()
elseif Submit="删除管理员" then
if blogid="" then
call message("请至少选择一项","back")
call EndExit()
end if
bid=split(blogid,",")
for i=0 to ubound(bid)
delsql="delete from oa_admin where id="&bid(i)&""
conn.execute(delsql)
next
call message("删除管理员成功","userlist.asp?id="&cid&"")
call EndExit()
elseif Submit="修改配置" then
usql="update oa_PhoneConfig set UserName='"&UserName&"',UserID='"&UserID&"', UserPass='"&UserPass&"' where companyid="&cid
conn.execute(usql)
call message("短信参数配置成功","userlist.asp?id="&cid&"")
call EndExit()
elseif Submit="添加配置" then
isql="insert into oa_PhoneConfig(UserName,UserID,UserPass,companyid) values('"&UserName&"','"&UserID&"','"&UserPass&"',"&cid&")"
conn.execute(isql)
call message("短信参数添加成功","userlist.asp?id="&cid&"")
call EndExit()
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../oaadmin/img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {color: #FFFFFF}
.style3 {color: #FFFFFF; font-weight: bold; }
-->
</style>
</head>
<body>
<form name="form1" method="post" action="userlist.asp">
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
<tr align="right" bgcolor="cc0000">
<td height="25" colspan="7"><span class="style1"><strong>该公司已有管理员帐号
<input name="Submit" type="submit" class="tabel1" value="锁定管理员">
<strong>
<input name="Submit" type="submit" class="tabel1" id="Submit" value="解除锁定">
<input name="Submit" type="submit" class="tabel1" id="Submit" value="删除管理员">
<input name="Submit2" type="button" class="tabel1" value="返回公司列表" onClick="window.location.href='companylist.asp'">
<input name="cid" type="hidden" id="cid" value="<%=companyid%>">
</strong> </strong></span></td>
</tr>
<tr bgcolor="#F4F4F4">
<td height="25" align="center">短信参数</td>
<td align="center"><span class="divbody">ID号</span> <input name="UserID" type="text" class="tabel1" id="UserID" size="12" value="<%=UserID1%>"></td>
<td align="center"><span class="divbody">帐号</span> <input name="UserName" type="text" class="tabel1" id="UserName" size="12" value="<%=UserName1%>"></td>
<td align="center"><span class="divbody">密码</span> <input name="UserPass" type="password" class="tabel1" id="UserPass" size="12" value="<%=UserPass1%>"></td>
<td colspan="2" align="left"><input name="Submit" type="submit" class="tabel1" id="Submit" value="修改配置"> </td>
<td align="center"> </td>
</tr>
<tr bgcolor="#CC6633">
<td height="25" align="center"><span class="style1"></span></td>
<td align="center" bgcolor="#CC6633"> <span class="style1"> <strong>用户名 </strong> </span></td>
<td align="center" bgcolor="#CC6633"> <span class="style1"><strong>管理级别</strong></span></td>
<td align="center" bgcolor="#CC6633"><span class="style1"><strong>上次登陆时间</strong></span></td>
<td align="center"><span class="style3"> 次登陆IP
</span></td>
<td align="center"> <span class="style1"> <strong>状态</strong></span></td>
<td align="center"><span class="style1"><strong>
<input type=checkbox onclick=sel('blogid') class="tabel1">
</strong></span></td>
</tr>
<%
Sql="select * from oa_Admin where companyid="&companyid&" order by id asc"
set my_rs=server.CreateObject("adodb.recordset")
my_rs.open Sql,conn,1,3
For i = 1 to my_rs.recordcount '利用for next 循环依次读出当前页的记录
if my_rs.EOF then Exit For
bgColor="#F8F8F8"
if i mod 2=0 then bgColor="#DFEFFF"
%>
<tr bgcolor="<%=bgColor%>">
<td width="7%" height="25" align="center"><%=i%></td>
<td width="17%" align="center"><%=my_rs("username")%></td>
<td width="19%" align="center"> <%If my_rs("AdminGrade") = 999 Then
Response.Write "<font color=red>高级管理员<font>"
Else
Response.Write "普通管理员"
End If%></td>
<td width="18%" align="center"><%=my_rs("Logintime")%></td>
<td width="18%" align="center"><%=my_rs("Loginip")%></td>
<td width="11%" align="center"><%If my_rs("isLock") = 0 Then
Response.Write "正常"
Else
Response.Write "<font color=red>锁定<font>"
End If%> </td>
<td width="10%" align="center"><input type="checkbox" name="blogid" value="<%=my_rs("id")%>">
</td>
</tr>
<%
my_rs.MoveNext()
Next
my_rs.close
set my_rs=nothing
%>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -