⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 employeeinformation.asp

📁 办公自动化系统
💻 ASP
字号:

<%@ Language=VBScript %>
<!--#include file="conn.asp"-->
<%
'判断用户是否登录
if isempty(Session("ID")) then
Response.Redirect "../login.asp"
end if

'判断用户是否提交了表单
if not IsEmpty(Request.Form("Send")) then
'如果用户希望查询全部员工信息
if Request.Form("SendTo") = "AllEmployeeInformation" then
Set RSEnquiryResult = conn.Execute("select * from UserInfo order by " & Request.Form("AllOrder"))
TheMessage = "全体员工信息按" & Request.Form("AllOrder") & "排列"
label=true
'如果用户希望查询某个部门员工信息
elseif Request.Form("SendTo") = "DepartmentEmployeeInformation" then
Set RSEnquiryResult = conn.Execute("select * from UserInfo where Department = '" _
                     & Request.Form("DepartmentName") &"' order by Position" )
TheMessage = Request.Form("DepartmentName") & "全部员工信息"
label=true	
'如果用户希望进入修改个人信息页面
elseif Request.Form("SendTo") = "ModifyPersonalInformation" then
Response.Redirect "ModifyPersonalInformation.asp"
'如果用户希望进入系统管理员页面
elseif Request.Form("SendTo") = "SystemManager" then
if Session("IsSystemManager")=true then 
Session("SystemOrder")=Request.Form("SystemOrder")
Response.Redirect "SystemManager.asp"
else 
TheMessage=" 对不起,您不是系统管理员,没有此项权限"
Label=false
end if
'如果用户希望查询某个员工信息
elseif Request.Form("SendTo") = "OneEmployeeInformation" then
Label=true
if Request.Form("CheckName")="FromList" then 
Set RSEnquiryResult = conn.Execute("select * from UserInfo where Name = '" _
& Request.Form("RoleName") &"' " )
TheMessage ="查询员工 '"&Request.Form("RoleName") & "' 信息结果"
else
Set RSEnquiryResult = conn.Execute("select * from UserInfo where Name = '" _
& Request.Form("TypeName") &"' " )
TheMessage ="查询员工 '"&Request.Form("TypeName") & "' 信息结果"
end if
'如果用户希望查询部门主管信息
else
Set RSEnquiryResult = conn.Execute("select * from UserInfo where Position='主管'" ) 
TheMessage = "各部门主管信息"
label=true 
end if
'如果用户是第一次进入页面
else
TheMessage = "请在下面选择员工信息管理选项"
end if
set RSDepartments = conn.Execute("select  DepartmentName from Departments order by DepartmentName")
set RSRoles = conn.Execute("select Name from UserInfo order by Name")
%>

<html>
<head>
<title>员工信息管理系统</title>
</head>
<body>

<table width=800 border=0 bgcolor=#16A84D cellspacing=1 cellpadding=2 align=center>
<tr bgcolor=white><td    valign=center bgcolor="#9966FF" ><div align="center"><font color="#FFFFFF">企业办公自动化系统</font></div></td>
</tr></table>
<table width="800" border="0" bordercolor="#16A84D" align="center" cellpadding="0" cellspacing="0">

</tr></table>


<table width=800 border=0 bgcolor=#16A84D cellspacing=1 cellpadding=2 align=center>
<tr bgcolor="#99CCFF"><td colspan=3>
<font color=white>
<P ALIGN="CENTER">公司内部办公信息管理系统->员工信息管理系统&nbsp[当前用户-<% response.write Session("Name") %>]
</font></td></tr>
<tr bgcolor=white >
<td width="259"><div align="center"><a href="../html/home.asp"><font color="#9966FF">返回主页</font></a></div></td>
<td width="530"  align=center> <div align="left"><font color="#9966FF" >
        <% response.write TheMessage %>
</FONT></div></td>

</tr></table> 

<table width="800" border="0" bordercolor="#16A84D" align="center" cellpadding="3" cellspacing="0">
<tr><td><br>

<form action="yuangong.asp"  method=post>
<table cellpadding=1 cellspacing=2 border=1 bordercolor="#9999FF" width=800 align=center>   
<tr valign="center" align="center">
<td width=35% bgcolor="#99CCFF"><img src="../image/HomepagePicture1.jpg" width="250" height="173"></td>
<td>


<table width=100% border=1 align=center cellpadding=1 cellspacing=1 bordercolor="#99CCFF">
<tr>
<td width=205 height="30">
 
  <input type="radio" checked name="SendTo" value="AllEmployeeInformation" >
   <font color="#9966FF" size="2">查询所有员工信息</font></td>
<td width="294">
  <font size="1">
  <input type="radio" checked name="AllOrder" value="Name" >
  按姓名排列
  <input type="radio" name="AllOrder" value="Department" >
  按部门排列
  <input type="radio" name="AllOrder" value="Birthday" >
  按生日排序
  </font></td></tr>
<tr><td width=205> 
  <div align="center">
    <font color="#9C65FF" size="2">
    <input type="radio" name="SendTo" value="DepartmentEmployeeInformation" >
    查询某部门员工信息</font></div></td>
<td>
  <font size="2">
  <select name="DepartmentName" >
  <%
Do Until RSDepartments.EOF
%>	
  <option value="<% Response.Write RSDepartments("DepartmentName") %>">
  <%Response.Write RSDepartments("DepartmentName")%>
  </option>
  <%
RSDepartments.Movenext
loop
%>		
  </select>
  </font></td></tr>

<tr><td>             
  <div align="center">
    <font color="#9C65FF" size="2">
    <input type="radio" name="SendTo" value="OneEmployeeInformation" >
    查询某个员工信息</font>
  </div></td>
<td>

<table width=100% border=1 bordercolor="#99CCFF">
<tr><td>
  <font color="#000000" size="1">
  <input type="radio"  Checked name="CheckName" value="FromList" >
  从列表中选择</font>
</td><td>
  <font size="1">
  <select name="RoleName" >
  <%
Do Until RSRoles.EOF
%>	
  <option value="<% Response.Write RSRoles("Name") %>">
  <% Response.Write RSRoles("Name") %>
  </option>
  <%
RSRoles.Movenext
loop
%>		
  </select>
  </font></td></tr>
<tr><td>
  <font color="#000000" size="1">
  <input type="radio"  name="CheckName" value="Type" >
  请输入名字</font> 
</td>
  <td>
  <font size="1">
  <input type="text"  Checked name="TypeName" value="" > 
  </font></td></tr></table>
</td></tr>	           
<tr><td width=205><div align="center">
  <font color="#9C65FF" size="2">
  <input type="radio"  name="SendTo" value="DepartmentManager" >
  查询部门主管信息</font></div></td>
<td></tr>
<tr><td width=205><div align="center">
  <font color="#9C65FF" size="2">
  <input type="radio"  name="SendTo" value="ModifyPersonalInformation" >
  修改我的信息</font></div></td>
<td><font size="2"></font></td></tr>
<tr><td width=205><div align="center">
  <font color="#9C65FF" size="2">
  <input type="radio"  name="SendTo" value="SystemManager" >
  系统管理员选项</font></div></td>
<td><font size="1">
  <input type="radio" name=SystemOrder value="Name" checked >
  按名字排列进入
  <input type="radio" name=SystemOrder value="Department">
  按部门排列进入
  <input type="radio" name=SystemOrder value="Birthday">
  按生日排列进入
  <input type="radio" name=SystemOrder value="Position">
  按职位排列进入 </font></td>
</tr>
</table>

</td>  
</tr>
</table>

<table cellpadding=0 cellspacing=0 BORDER=1 width=800 align=center>
<tr VALIGN="top" ALIGN="center"><td width=100% height="43" align=center valign="middle" >
<input type="submit" name="Send" value="进入系统">
</td>
</tr></table>
</form>
<p>
    <%
if not IsEmpty(Request.Form("Send")) then
Response.Write "<table width=100% border=0 bgcolor=#9966FF "_
  & "cellspacing=1 cellpadding=2 align=center>"
Response.Write "<tr><td><font color=white><P ALIGN=CENTER>" & TheMessage  
Response.Write "</font></td></tr>"
'如果不输出查询结果
  if Label=false  then
Response.Write "</table>"
else 
%>
    <%
  '如果要输出查询结果
Response.write "<tr bgcolor=white ><td  align=center>"
Response.write "<table width=100% bgcolor=#9966FF " _
& "border=0  cellspacing=1 cellpadding=2 align=center>"
Response.write "<tr><td><font color=white><font size=2>登录名</font></font></td>"
Response.write "<td><font color=white>姓名</font></td>"
Response.write "<td><font color=white>电子邮件地址</font></td>"
Response.write "<td><font color=white>部门</font></td>"
Response.write "<td><font color=white>内部分机</font></td>"
Response.write "<td><font color=white>移动电话</font></td>"
Response.write "<td><font color=white>家庭电话</font></td>"
Response.write "<td><font color=white>QQ号</font></td>"
Response.write "<td><font color=white>生日</font></td></tr>"
  if not IsEmpty(RSenquiryResult) then
      do Until RSEnquiryResult.eof 
      Response.write "<tr bgcolor=white>"
  Response.write "<td>"& RSEnquiryResult("LoginID") &"</td>"
  Response.write "<td>" & RSEnquiryResult("Name") & "</td>"
  Response.write "<td><a href=mailto:" & RSEnquiryResult("EmailAddress") & ">"
Response.write "<font face=arial>" & RSEnquiryResult("EmailAddress") _
 & "</font></a></td>"
  Response.write "<td>" & RSEnquiryResult("Department") & "</td>"
  Response.write "<td>" & RSEnquiryResult("InternalPhone") & "</td>"
  Response.write "<td>" & RSEnquiryResult("MobilePhone") & "</td>"
  Response.write "<td>" & RSEnquiryResult("HomePhone") & "</td>"
  Response.write "<td>" & RSEnquiryResult("QQ") & "</td>"
  Response.write "<td>" & RSEnquiryResult("Birthday") & "</td></tr>"                                        
  RSEnquiryResult.Movenext
  Loop
  end if
    Response.Write "</table></td></tr></table>"
end if             
end if
%>
                         
 </p></td></tr></table>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -