<!--#include file="../inc/Secure.htm"-->
<!--#include file="../inc/conn.htm"-->
<!--#include file="../inc/const.htm"-->
<!--#include file="../inc/dbtools1.htm"-->
<html>
<head>
<title> 选择用户 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../CSS/main.css">
</head>
<script src="../inc/Popup.js"></script>
<BODY bgcolor="#CCCCFF">
<%
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select ID,Name, Department, Position from tblUser where id>0 "
sql=sql& " order by Name,Department desc"

rs.open sql,oConn,1,1
totalmessage=rs.recordcount

if totalmessage<>0 then
	msgArr=rs.getrows
end if

rs.close
%>

<form method="post" action="">
<%
response.write("<div align=center><b>请点击您要选择的用户</b></div>")
response.write "<hr size='1' width=""90%"">"
if isempty(msgArr) then
	response.write " 该部门没有用户。"
else
%>

<div align=center>

<table cellpadding=3 cellspacing="1" width="95%">
<tr><td><b>员工姓名</b></td><td><b>所在部门</b></td><td><b>职务</b></td></tr>
<%
for i = 0 to UBound(msgArr,2)
%>
	<tr style="cursor:hand;" onMouseOver='this.bgColor=gcToggle' onMouseOut='this.bgColor=gcBG' onClick='IOFFICE_GetSelected(this.cells(0))'  >
		<td id=calCell nowrap>
		<%=server.htmlencode(trim(msgArr(1,i)))%>
		</td>
		<td id=calCell nowrap>
		<%=GetTableValue("tblDepartment","Name",trim(msgArr(2,i)))%>
		</td>
		<td id=calCell nowrap>
		<%=server.htmlencode(trim(msgArr(3,i)&""))%>
		</td>
	</tr>
<%
next
response.write "</table></div>"
end if
%>
</form>
</body>
</html>
<!--#include file="../inc/conn_close.htm"-->

<script language="JavaScript">
function OpenWindow(url,windowname)
{
window.open(url,windowname,'left=100,top=50,height=450,width=650,toolbar=no,menubar=no,scrollbars=yes')
}
</script>