📄 systemmanager.asp
字号:
<%@ Language=VBScript %>
<%
'判断用户是否登录以及是否是系统管理员
if isempty(Session("ID")) or Session("IsSystemManager")=false then
Response.Redirect "../Login.asp"
end if
'连接系统数据库
set conn = server.createobject ("adodb.connection")
conn.open "ASPData", "sa", "yourpassword"
set EmployeeInformation = conn.Execute(" select * from PSLogins order by " & Session("SystemOrder"))
'添加新用户信息
if not IsEmpty(Request.Form("Add")) then
Response.Redirect "AddNewUser.asp"
end if
'删除某个用户信息
if not IsEmpty(Request.Form("Delete")) then
if not IsEmpty(Request.Form("SelectWho")) then
conn.Execute "delete from PSLogins where LoginID = '" & Request.Form("SelectWho") & "' "
TheMessage="记录已被删除"
set EmployeeInformation = conn.Execute(" select * from PSLogins order by Name ")
'修改某个用户信息
else
TheMessage = "请在下面修改员工信息"
end if
'修改某个用户信息
elseif not IsEmpty(Request.Form("Modify")) then
if not IsEmpty(Request.Form("SelectWho")) then
Session("temp")= Request.Form("SelectWho")
Response.Redirect "ModifyUserInformation.asp"
else
TheMessage = "请在下面修改员工信息"
end if
else
TheMessage = "请在下面修改员工信息"
end if
%>
<HTML>
<HEAD>
<TITLE>系统管理员页面</TITLE>
<META NAME="Generator" CONTENT="NetObjects Fusion 2.0.2 for Windows">
</HEAD>
<BODY BGCOLOR="">
<table width=800 border=0 align=center cellpadding=2 cellspacing=1 bordercolor="#996633" bgcolor=#164DA8>
<tr bgcolor=white>
<td valign=center bgcolor="#0066CC" > <div align="center"><font color="#CCCCCC" size="7" face="华文隶书"><strong>公司内部办公信息管理系统</strong></font></div></td>
</tr>
</table>
<table width="800" border="0" bordercolor="#164DA8" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="13"> </td>
</tr>
</table>
<font size="2"><br>
</font>
<table WIDTH=100% border=0 bgcolor=#164DA8 cellspacing=1 cellpadding=2 align=center>
<tr>
<td colspan=3><font color=white>
<P ALIGN="CENTER"><font size="2">公司内部办公信息管理系统->员工信息查询->系统管理员选项 [当前用户-
<% response.write Session("Name") %>
]</font></FONT><font size="2"></font></font></td>
</tr>
<tr bgcolor=white >
<td><font size="2"><a href="../.././html/home.asp"><font color="#164DA8">返回内网主页</font></a></font></td>
<td align=center> <font color="#164DA8" size="2" >
<% response.write TheMessage %>
</FONT></td>
<td align=right><font size="2"><a href="EmployeeInformation.asp"><font color="#164DA8">返回上一级网页</font></a></font></td>
</tr>
</table>
<table width="100%" border="0" bordercolor="#164DA8" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="13"> </td>
</tr>
</table>
<font size="2"><br>
</font>
<FORM ACTION="SystemManager.asp" METHOD=POST>
<TABLE WIDTH=100% border=0 bgcolor=#164DA8 cellspacing=1 cellpadding=2 align=center>
<TR >
<TD COLSPAN=14 align=center><font color=white size="2">全部员工信息如下</font></TD>
</TR>
<TR VALIGN="center" ALIGN="center" bgcolor=white>
<td width=2%><font size="2">选中</font></td>
<td width=5%><font size="2">登录名</font></td>
<td width=5%><font size="2">姓名</font></td>
<td><font size="2">电子邮件地址</font></td>
<td width=5%><font size="2">部门</font></td>
<td><font size="2">位置</font></td>
<td><font size="2">内部分机</font></td>
<td><font size="2">家庭电话</font></td>
<td><font size="2">手机</font></td>
<td><font size="2">QQ号</font></td>
<td><font size="2">家庭住址</font></td>
<td width=8%><font size="2">生日</font></td>
<td width=5%><font size="2">是否系统管理员</font></td>
<td width=5%><font size="2">是否财务主管</font></td>
</TR>
<%
Do until EmployeeInformation.Eof
Response.write "<tr bgcolor=white>" _
& "<td align=center><input type=radio name=SelectWho value=" & EmployeeInformation("LoginID") & "> </td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("LoginID") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("Name") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("EmailAddress") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("Department") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("Position") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("InternalPhone") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("HomePhone") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("MobilePhone") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("QQ") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("HomeAddress") & "</font></td>" _
& "<td align=left><font face=arial>"& EmployeeInformation("Birthday") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("IsSystemManager") & "</font></td>" _
& "<td align=center><font face=arial>"& EmployeeInformation("IsFinancialManager") & "</font></td></tr>"
EmployeeInformation.MoveNext
loop
%>
</TABLE>
<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=1 WIDTH=100% align=center>
<TR VALIGN="top" ALIGN="center">
<TD WIDTH=100% align=center > <font size="2">
<INPUT TYPE="submit" NAME="Modify" VALUE="修改此用户信息" style="border: 1px solid #3466BB; background-color: #B6CAEB; color: #3466BB">
<INPUT TYPE="submit" NAME="Delete" VALUE="删除此用户信息" style="border: 1px solid #3466BB; background-color: #B6CAEB; color: #3466BB">
<INPUT TYPE="submit" NAME="Add" VALUE="添加新用户信息" style="border: 1px solid #3466BB; background-color: #B6CAEB; color: #3466BB">
</font></TD>
<font size="2"></TD></font></TR>
</table>
<font size="2"><br>
</font>
</FORM>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -