<!--#include file="../checkLogin.asp"-->
<!--#include file="../SQLconn.asp"-->
<html>
<head><title></title><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/style.css" />
</head>

<body>
<div align="center">
<%
   

'检查权限
       tname=request.cookies("tname") 
       Set MyOAASPObj= Server.CreateObject("YFSchoolOApro.YFSchoolDll")
           if MyOAASPObj.QuanXian(tname,"员工档案")=0 then 
		   
		      Set Rsid=Server.CreateObject("Adodb.Recordset")
                 sqlid="select * from Employee where 姓名='"&tname& "'"
                  Rsid.open sqlid,conn,1,1
				   if  Rsid.eof and  Rsid.bof then
		              response.redirect  "NoPower.asp"
	               else 
		             response.redirect  "ViewDangAn.asp?Tname="&Tname&""
					  
				  end if
           end if 
		   set MyOAASPObj=nothing

'检查权限结束
%>
</div>
</div>
 
<table width="100%" align="center" border="1" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtable">   
<tr style="background-color:#D6E4FF"  class="TableHeader">

       <td align="center" nowrap class="STYLE1">编号</td>
       <td height="30" align="center" nowrap class="STYLE1">姓名</td>
	   <td   align="center" nowrap class="STYLE1">性别</td>
	   <td align="center" nowrap class="STYLE1">年龄</td>
	   <td   align="center" nowrap class="STYLE1">学历</td>
        <td   align="center" nowrap class="STYLE1">职称</td>
        <td   align="center" nowrap class="STYLE1">任教学科</td>
		<td   align="center" nowrap class="STYLE1">操作</td>
  </tr>
<%
   lizhi=request("lizhi")
   Set Rslist=Server.CreateObject("Adodb.Recordset")
   if lizhi="是" then
       sqllist="select * from Employee where 是否离职='是' order by 姓名" 
   else
       sqllist="select * from Employee where 是否离职<>'是' order by 姓名" 
   end if
   Rslist.open sqllist,conn,1,1
   while not Rslist.eof and not Rslist.bof
%>
    <tr onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#EFF8FF'">
      <td width="11%" height="27" align="center" nowrap class="STYLE1"><%=Rslist("编号")%></td>
      <td width="11%" align="center" nowrap class="STYLE1">
	  <a href="ViewDangAn.asp?tname=<%=Rslist("姓名")%>"  target="main" class="STYLE1"> <%=Rslist("姓名")%></a>	  </td>
	  <td width="11%" align="center" nowrap class="STYLE1"><%=Rslist("性别")%></td>
	  <td width="11%" align="center" nowrap class="STYLE1"><%=year(now())-year(Rslist("出生日期")) %> </td>
	  <td width="11%" align="center" nowrap class="STYLE1"><%=Rslist("学历")%> </td>
	  <td width="11%" align="center" nowrap class="STYLE1"><%=Rslist("职称")%></td>
      <td width="12%" align="center" nowrap class="STYLE1"><%=Rslist("所教学科")%> </td>
	  <td width="22%" class="STYLE1">
	
	<div align="center"><a href="modifyDangAn.asp?id=<%=Rslist("id")%>"  target="main" class="STYLE1"> 修改</a>&nbsp; 
	  <a href="zhengshu.asp?id=<%=Rslist("id")%>"  target="main" class="STYLE1">证书</a>
	  <% if lizhi<>"是" then %>
	  <a href="lizhi.asp?id=<%=Rslist("id")%>"  target="main" class="STYLE1">离职</a>&nbsp; 
	  <% end if %>
	  <a   href= "# "   onclick= "javascript:if(confirm( '您真的要删除记录？ '))href= 'delDangan.asp?id=<%=Rslist("id")%>'; ">删除</a></div>	 </td>
	</tr>
<%  Rslist.movenext
    wend
%>
</table>
<p><a href="../default.asp" target="_parent"></a></p>
</body>
</html>
