<!--#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="../images/<%=request.cookies("imgdir")%>/css/style.css" media="all"/>
</head>

<body>
<div align="center">
<%
    lizhi=request("lizhi")
    xingming=request("xingming")

'检查权限
       tname=request.cookies("tname") 
       Set MyOAASPObj= Server.CreateObject("YFSchoolOApro.YFSchoolDll")
           if MyOAASPObj.QuanXian(tname,"员工档案")=0 then 
		   
		     
			 
			   if lizhi="是" then
                   response.redirect   "../NoPower.asp"
               end if
			   
			   
			  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>
 <form name="form1" method="post" action="">
<%if lizhi<>"是" then%>
   
   
    <table width="100%" border="1" align="center" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtablehui">
     <tr style="background-color:#D6E4FF"  class="TableHeader">
   <td height="30" colspan="3" align="center" nowrap="nowrap" class="NemuNot"><span class="STYLE1 STYLE2">
    <span class="STYLE1"><span class="STYLE2">姓名
    <input name="xingming" type="text" id="xingming" size="10"  class="input"   value=<%=xingming%>></span></span>
      &nbsp;&nbsp;<input name="Submit" type="submit" class="topanniu" value="搜索" /></span></td>
     </tr>   </table>
	<%   end if%> 
	 
	 
	 <br>
<table width="100%" align="center" border="1" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8" style="border-collapse:collapse"  class="mtable">   
<tr style="background-color:#D6E4FF"  class="TableHeader">
       <td align="center" nowrap class="STYLE1">序号</td>
       <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>
<%
   i=0
  
   Set Rslist=Server.CreateObject("Adodb.Recordset")
   if lizhi="是" then
       sqllist="select * from Employee where 是否离职='是' order by 编号" 
   else
       sqllist="select * from Employee where 是否离职<>'是'  and 姓名 like  '%"&xingming&"%'   order by 编号" 
   end if
   Rslist.open sqllist,conn,1,1
   while not Rslist.eof and not Rslist.bof
   i=i+1
%>
    <tr onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#EFF8FF'">
	 <td width="5%" height="27" align="center" nowrap class="STYLE1"><%=i%></td>
      <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="18%" class="STYLE1">
	
	<div align="center">
	  <a href="../ZhengShu/zhengshuadd.asp?xingming=<%=Rslist("姓名")%>"  target="main" class="STYLE1">证书</a>&nbsp;
	  <a href="modifyDangAn.asp?id=<%=Rslist("id")%>"  target="main" class="STYLE1"> 修改</a>&nbsp; 
	  <% 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>
  </form>
</body>
</html>
