📄 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 bgcolor=#164DA8 cellspacing=1 cellpadding=2 align=center>
<tr bgcolor=white><td valign=center ><img src="../ASPLogo3.jpg" width=796 height=100></td></tr>
</table>
<table width="800" border="0" bordercolor="#164DA8" align="center" cellpadding="0" cellspacing="0">
<tr><td height="13"><img src=".././image/banner2.jpg" width="800" height="12"></td></tr>
</table>
<br>
<table WIDTH=100% border=0 bgcolor=#164DA8 cellspacing=1 cellpadding=2 align=center>
<tr><td colspan=3><font color=white><P ALIGN="CENTER">公司内部办公信息管理系统->员工信息查询->系统管理员选项 [当前用户-<% response.write Session("Name") %>]</FONT></font></td></tr>
<tr bgcolor=white >
<td><a href="../.././html/home.asp"><font color="#164DA8">返回内网主页</font></a></td>
<td align=center> <font color="#164DA8" ><% response.write TheMessage %></FONT></td>
<td align=right><a href="EmployeeInformation.asp"><font color="#164DA8">返回上一级网页</font></a></td>
</tr>
</table>
<table width="100%" border="0" bordercolor="#164DA8" align="center" cellpadding="0" cellspacing="0">
<tr><td height="13"><img src=".././image/banner2.jpg" width="100%" height="12"></td></tr>
</table>
<br>
<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>全部员工信息如下</font></TD></TR>
<TR VALIGN="center" ALIGN="center" bgcolor=white>
<td width=2%>选中</td><td width=5%>登录名</td><td width=5%>姓名</td><td>电子邮件地址</td><td width=5%>部门</td><td>位置</td><td>内部分机</td><td>家庭电话</td><td>手机</td><td>QQ号</td><td>家庭住址</td><td width=8%>生日</td><td width=5%>是否系统管理员</td><td width=5%>是否财务主管</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 >
<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"></TD>
</TD>
</TR>
</table>
<br>
</FORM>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -