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

📄 employeeinformation1.asp

📁 企业内部办公管理信息系统 (一个用ASP开发的基于B/S方式的毕业设计)
💻 ASP
字号:
<%@ Language=VBScript %>
<%
if isempty(Session("ID")) then
Response.Redirect "../login.asp"
end if
set conn = server.createobject ("adodb.connection")
conn.open "ASPBook", "sa", "yourpassword"
if not IsEmpty(Request.Form("Send")) then
if Request.Form("SendTo") = "AllEmployeeInformation" then
Set RSEnquiryResult = conn.Execute("select * from PSLogins order by " & Request.Form("AllOrder"))
TheMessage = "全体员工信息按" & Request.Form("AllOrder") & "排序如下"
label=true
elseif Request.Form("SendTo") = "DepartmentEmployeeInformation" then
Set RSEnquiryResult = conn.Execute("select * from PSLogins 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 PSLogins where Name = '"& Request.Form("RoleName") &"' " )
TheMessage ="查询员工 '"&Request.Form("RoleName") & "' 信息结果如下"
  else
  Set RSEnquiryResult = conn.Execute("select * from PSLogins where Name = '"& Request.Form("TypeName") &"' " )
  TheMessage ="查询员工 '"&Request.Form("TypeName") & "' 信息结果如下"
  end if
elseif Request.Form("SendTo") = "DepartmentManager" then
Set RSEnquiryResult = conn.Execute("select * from PSLogins where Position='主管'" ) 
TheMessage = "各部门主管信息如下"
label=true
else
set RSEmails = conn.Execute("select EmailAddress from PSLogins where Name = '" & Request.Form("RoleName") & "'")
end if
set RSWhoForm = conn.Execute("Select EmailAddress from PSLogins where LoginID = '" & Session("ID")& "'")
FromAddress = RSWhoForm("EmailAddress")
else
TheMessage = "您尚未进行查询"
end if
set RSDepartments = conn.Execute("select  部门名称 from 部门信息 order by 部门名称")
set RSRoles = conn.Execute("select Name from PSLogins order by Name")
%>
<html>
<head><title>Employee Email Blast</title>
<meta name="Generator" content="NetObjects Fusion 2.0.2 for Windows">
</head>
<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>
<br>
<table width=800 border=0 bgcolor=#164DA8 cellspacing=1 cellpadding=2 align=center>
<tr><td colspan=3><font color=white>
      <P ALIGN="CENTER"><font size="2">公司内部办公信息管理系统->员工信息管理系统&nbsp[当前用户-
        <% response.write Session("Name") %>
        ] </font></font></td></tr>
<tr bgcolor=white >
    <td><a href=".././html/home.asp"><font color="#104DAD">返<font size="2">回内网主页</font></font></a></td>
<td align=center> <font color="#104DAD" ><% response.write TheMessage %></FONT></td>
<td align=right><a href=".././html/home.asp"><font color="#104DAD" size="2">返回上一级网页</font></a></td>
</tr>
</table> 

<table width="800" border="0" bordercolor="#164DA8" align="center" cellpadding="3" cellspacing="0">
<tr><td>
<FORM ACTION="./EmployeeInformation.asp"  METHOD=POST>
<br>
<TABLE CELLPADDING=1 CELLSPACING=2 BORDER=1 bordercolor="#164DA8" WIDTH=800 align=center>   
<tr valign="center"align="center">
<td width=20%><p><font color="#164DA8" >员工信息查询管理选项:</font></td>
<td>
<table cellpadding=1 cellspacing=1 border=1 align=center width=100%>
<tr><td width=30%><input type="radio" checked name ="SendTo" value="AllEmployeeInformation" ><font color="#164DA8">查询所有员工信息</font></td>
<td>
<input type="radio" checked name="AllOrder" value="Name" >按姓名排序&nbsp
<input type="radio" name="AllOrder" value="Department" >按部门排序&nbsp
<input type="radio" NAME="AllOrder" VALUE="Birthday" >按生日排序
</td></tr>
<tr><td width=30%>
<input type ="radio" NAME="SendTo" value="DepartmentEmployeeInformation" >
<font color="#164DA8">查询某个部门员工信息</font></td><td>
<select name ="DepartmentName" >
<% Do Until RSDepartments.EOF %>	
<option value="<% Response.Write RSDepartments("部门名称") %>">
<% Response.Write RSDepartments("部门名称") %></option>
<% RSDepartments.Movenext
   loop
%>		
</select></td></tr>
<tr><td>             
<input type ="radio" NAME="SendTo" VALUE="OneEmployeeInformation" >
<font color="#164DA8">查询某个员工信息</font></td><td>
<table width=100% border=1>
<tr><td>
<input type ="radio"  Checked NAME="CheckName" VALUE="FromList" >
<font color="#164DA8">从列表中选择</font>
</td><td>
<select name ="RoleName" >
<%
Do Until RSRoles.EOF
%>	
<OPTION VALUE="<% Response.Write RSRoles("Name") %>"><% Response.Write RSRoles("Name") %></OPTION>
<%
RSRoles.Movenext
loop
%>		
</SELECT>
</td></tr>
<tr><td>
<INPUT TYPE="radio"  NAME="CheckName" VALUE="Type" ><font color="#164DA8">从输入的名字查询</font> 
</td><td>
<INPUT TYPE="text"  Checked NAME="TypeName" VALUE="" > 
</td></tr></table>
</td></tr>	           
<tr><td width=30%><INPUT TYPE="radio"  NAME="SendTo" VALUE="DepartmentManager" ><font color="#164DA8">查询部门主管信息</font></td><td>&nbsp;</td></tr>
<tr><td width=30%><INPUT TYPE="radio"  NAME="SendTo" VALUE="ModifyPersonalInformation" ><font color="#164DA8">修改关于我的信息</font></td><td>&nbsp;</td></tr>
<tr><td width=30%><INPUT TYPE="radio"  NAME="SendTo" VALUE="MySalary" ><font color="#164DA8">查询我的工资</font></td><td>&nbsp;</td></tr>
<tr><td width=30%><INPUT TYPE="radio"  NAME="SendTo" VALUE="SystemManager" ><font color="#164DA8">系统管理员选项</font></td>
<td><input type="radio" name=SystemOrder value="Name" checked >以姓名排序进入&nbsp 
<input type="radio" name=SystemOrder value="Department">以部门排序进入&nbsp<br>
<input type="radio" name=SystemOrder value="Birthday">以生日排序进入&nbsp
<input type="radio" name=SystemOrder value="Position">以职位排序进入&nbsp
</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% align=center >
<INPUT TYPE="submit" NAME="Send" VALUE="进入选项" ></FONT></TD>	
</TD></TR></table>
<br>
<%
if not IsEmpty(Request.Form("Send")) then
Response.Write "<table width=100% border=0 bgcolor=#164DA8 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><table width=100% bgcolor=#164DA8 border=0  cellspacing=1 cellpadding=2 align=center> <tr><td><font color=white>登录名</font></td><td><font color=white>姓名</font></td><td><font color=white>电子邮件地址</font></td><td><font color=white>部门</font></td><td><font color=white>内部分机</font></td><td><font color=white>移动电话</font></td><td><font color=white>家庭电话</font></td><td><font color=white>QQ号</font></td><td><font color=white>生日</font></td></tr>  "
                                        
if not IsEmpty(RSenquiryResult) then
do Until RSEnquiryResult.eof 
Response.write "<tr bgcolor=white><td>"& RSEnquiryResult("LoginID") &"</td><td>" & RSEnquiryResult("Name") & "</td><td><a href=mailto:" & RSEnquiryResult("EmailAddress") & "><font face=arial>" & RSEnquiryResult("EmailAddress") & "</font></a></td><td>" & RSEnquiryResult("Department") & "</td><td>" & RSEnquiryResult("InternalPhone") & "</td><td>" & RSEnquiryResult("MobilePhone") & "</td><td>" & RSEnquiryResult("HomePhone") & "</td><td>" & RSEnquiryResult("QQ") & "</td><td>" & RSEnquiryResult("Birthday") & "</td></tr>"                                        
RSEnquiryResult.Movenext
Loop
end if
Response.Write "</table></td></tr></table>"
end if             
end if
%>                          
</td></tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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