📄 systemmanager.asp
字号:
<%@ Language=VBScript %>
<!--#include file="conn.asp"-->
<%
'判断用户是否登录以及是否是系统管理员
if isempty(Session("ID")) or Session("IsSystemManager")=false then
Response.Redirect "../Login.asp"
end if
set EmployeeInformation = conn.Execute(" select * from UserInfo 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 UserInfo where LoginID = '" & Request.Form("SelectWho") & "' "
TheMessage="记录已被删除"
set EmployeeInformation = conn.Execute(" select * from UserInfo 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 "xiugai.asp"
else
TheMessage = "请在下面修改员工信息"
end if
else
TheMessage = "请在下面修改员工信息"
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">
<HTML>
<HEAD>
<TITLE>系统管理员页面</TITLE>
<META NAME="Generator" CONTENT="NetObjects Fusion 2.0.2 for Windows">
</HEAD>
<BODY BGCOLOR="">
<table width="100%" border="0" bordercolor="#16A84D" align="center" cellpadding="0" cellspacing="0">
<tr><td height="30" bgcolor="#9966FF"><div align="center"><font color="#FFFFFF">企业自动化系统</font></div></td>
</tr>
</table>
<table WIDTH=100% border=0 bgcolor=#99CCFF cellspacing=1 cellpadding=2 align=center>
<tr bgcolor="#99CCFF"><td height="33" colspan=3><P ALIGN="CENTER"><font color="#9900FF" size="3">公司内部办公信息管理系统->员工信息查询->系统管理员选项 [当前用户-
<% response.write Session("Name") %>
] </font></td></tr>
<tr bgcolor=white >
<td width="31%"><div align="center"><a href=".././html/home.asp"><font color="#9933FF">返回主页</font></a></div></td>
<td width="32%" align=center> <font color="#9933FF" ><% response.write TheMessage %></FONT></td>
<td width="37%" align=right><div align="center"><a href="yuangong.asp"><font color="#9933FF">返回上页</font></a></div></td>
</tr>
</table>
<FORM ACTION="SystemManager.asp" METHOD=POST>
<TABLE WIDTH=100% border=0 bgcolor=#9999FF cellspacing=1 cellpadding=2 align=center>
<TR bgcolor="#9C65FF" ><TD COLSPAN=14 align=center><font color=white>全部员工信息如下</font></TD>
</TR>
<TR VALIGN="center" ALIGN="center" bgcolor=white>
<td width=4% height="30">操作</td>
<td width=5%>登录名</td><td width=7%><font size="2">姓名</font></td>
<td width="10%">信箱地址</td>
<td width=8%>部门</td>
<td width="5%">职位</td>
<td width="6%">内部分机</td><td width="10%">家庭电话</td><td width="9%">手机</td>
<td width="11%">家庭住址</td><td width=12%>生日</td>
<td width=7%>管理员</td>
<td width=6%><font size="-1">财务主管</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("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=97% height="44" align=center valign="middle" >
<INPUT TYPE="submit" NAME="Modify" VALUE="修改员工信息">
<INPUT TYPE="submit" NAME="Delete" VALUE="删除员工信息">
<INPUT TYPE="submit" NAME="Add" VALUE="添加新员工"></TD>
</TR>
</table>
</FORM>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -