<!--#include file="../asp/checked.asp"-->
<!--#include file="../asp/sqlstr.asp"-->
<!--#include file="../asp/opendb.asp"-->
<html>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style> <% set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select distinct dept from personinf order by dept desc"
rs.open sql,conn,1,1
if not rs.eof and not rs.bof then dept=rs("dept")
if request("dept")<>"" then dept=request("dept")
%>
<link rel="stylesheet" href="../css/css.css">
<body background="../img/img/bgcolor2.gif">
<table width="100%"background="../img/img/bg.gif">
<tr>
<td height="20" align="left" ><font class="style1">当前位置:员工档案编辑>></font>
<a href="addpersoninf.asp" target="main"><font class="style1">增加用户>></font></a>
<a href="query.asp" target="main"><font class="style1">智能查询>></font></a>
<a href="showpersoninf.asp" target="main" class="style1">返回>></a>
<center><font class="style1"><strong>员工基本档案</strong></font></center>
</td>
</tr>
<tr align="center">
<td bgcolor="#FFFFFF">
<table bgcolor="#216BB5">
<tr>
<form action="showlist.asp" method="post" >
<td>
<select name="dept" size=1 >
<option selected>-请选择部门-</option>
<% set conn=opendb("oabusy","conn","accessdsn")
Set rs1= Server.CreateObject("ADODB.Recordset")
strSql="select * from dept where id="&rs("dept")
rs1.open strsql,conn,1
%><%do while not rs.eof %>
<option value="<%=rs("dept")%>">
<%=rs1("dept")%><%=rs("dept")%>
</option>
<%
rs.movenext
loop
%>
</select>
<input type="submit" name="query" value="查询" style="border:1px solid" >
</td>
</form>
<form method=post action="showuserlist.asp">
<td><input type="submit" name="query1" value="全部显示" style="border:1px solid"></td>
</form>
</tr>
</table>
</td>
</tr>
</table>
<center>
<%
dim page
id=request("id")
page=request("page")
PageSize = 15
dim rs1,strSQL,news
Set rs1 = Server.CreateObject("ADODB.Recordset")
strsql="select * from personinf order by id desc"
rs1.open strSQL,Conn,1,1
rs1.PageSize = PageSize
totalfilm=rs1.recordcount
pgnum=rs1.Pagecount
if page="" or clng(page)<1 then page=1
if clng(page) > pgnum then page=pgnum
if pgnum>0 then rs1.AbsolutePage=page %>
<table border="0" cellspacing="0" cellpadding="0" width="100%" >
<tr bgcolor="#216BB5">
<form method=Post action="showlist.asp">
<td><FONT COLOR="#ffffff">
[<b><%=rs1.pagecount%></b>/<%=page%>页] [共<%=totalfilm%>个] <%if page=1 then%> [首页] [上一页]
<% else %> [<a href="showlist.asp?page=1&id=<%=id%>">首页</a>]
[<a href="showlist.asp?page=<%=page-1%>&id=<%=id%>">上一页</a>]<%end if%><%if rs1.pagecount-page<1 then%> [下一页] [尾页]
<%else%> [<a href="showlist.asp?page=<%=page+1%>&id=<%=id%>">下一页</a>]
[<a href="showlist.asp?page=<%=rs1.pagecount%>&id=<%=id%>">尾页</a>]</FONT> <%end if%>
<input type='text' name='page' size=2 maxlength=10 style="font-size:9pt;color:#FFFFFF;background-color:#666666;border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000" value="<%=page%>" align=center>
<INPUT TYPE="hidden" name=type value="<%=id%>"><input style="border:1 solid black;FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-VARIANT: normal; FONT-WEIGHT: normal; HEIGHT: 18px; LINE-HEIGHT: normal" type='submit' value=' Goto ' size=2></td>
</form>
</tr>
</table>
<table width="650" border="1"cellspacing="0" cellpadding="0" style="border:1px solid">
<form method="Post" action="showlist.asp">
<tr>
<td width="114" align=center background="../img/img/filebg.gif"><font color="#ffffff">员工部门</font></td>
<td width="120" align=center background="../img/img/filebg.gif"><font color="#ffffff">员工姓名</font></td>
<td width="132" align=center background="../img/img/filebg.gif"><font color="#ffffff">员工编号</font></td>
<td width="155" align=center background="../img/img/filebg.gif"><font color="#ffffff">编入时间</font></td>
<td width="60" align=center background="../img/img/filebg.gif" class="style1"> <input type="submit" name="del" value="删除" onClick="return window.confirm('你确定要删除你的个人基本档案吗?');"></td>
<td width="60" align=center background="../img/img/filebg.gif" class="style1">编辑</td>
</tr>
<% set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select * from personinf where dept='"&dept&"'order by id desc"
rs.open sql,conn,1
do while not rs.eof or rs.bof
%>
<tr style="border:1px solid" bgcolor="216bb5">
<td align=center style="border:1px solid" class="style1">
<%Set mrs= Server.CreateObject("ADODB.Recordset")
strSql="select * from dept where id="&rs("dept")
mrs.open strSql,Conn,1,1
if mrs.eof then
response.write "<FONT COLOR='red'>无记录</FONT>"
else
response.write mrs("dept")
end if
mrs.close
set mrs=nothing%>
</td>
<td align=center style="border:1px solid"><a href="show.asp?id=<%=cstr(rs("id"))%>"><span class="style1"><%=rs("username")%></span></a></td>
<td align=center style="border:1px solid"><span class="style1"><%=rs("a1")%></span></td>
<td align=center style="border:1px solid"><span class="style1"><%=rs("inputdate")%></span></td>
<td align=center style="border:1px solid"><input type="checkbox" name="delid" value="<%=rs("id")%>"></td>
<td align=center style="border:1px solid">
<a href="modifyuserinf1.asp?id=<%=cstr(rs("id"))%>" class="style1">编辑</a>
</td>
</tr>
<% rs.movenext
loop
%>
</form>
</table>
<%
if request("del")="删除" and request("delid")<>""then
set conn=opendb("oabusy","conn","accessdsn")
count=0
condition=""
for each idno in request("delid")
count=count+1
condition=condition+"id=" & sqlstr(idno)
if count<request("delid").count then
condition=condition+" or "
end if
next
set rs=server.createobject("adodb.recordset")
'删除数据库中的记录
sql = "delete from personinf where " & condition
conn.Execute sql
end if
%>
</center>
</body>
</html>