<!--#include file=share/conn.asp -->
<%
ksid=request.QueryString("ksid")
vmgz=request.QueryString("vmgz")
set rs2=server.CreateObject ("ADODB.RecordSet")
rs2.Source="select mkid,mkname from mkxxb where mgzid='"&vmgz&"'"
rs2.Open rs2.source,conn
session("url")=Request.ServerVariables("URL")
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Images/Style.css" rel="stylesheet" type="text/css">
</head>
<body text="#000000" onLoad = "initEditor();" ondragstart = "return false;" >
<br>
<table class=tableBorder width="95%" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<th height="22" > 员工信息查询</th>
</tr>
<%if ksid="" then%>
<tr>
<form name="form1" method="post" action="">
<td class=forumRowHighlight height="22" align="center"><select name="second" size="1" >
<option value="" selected>+++选择所属煤矿+++</option>
<%
do while not rs2.eof
%>
<option value="<%=trim(rs2("mkid"))%>"><%=trim(rs2("mkname"))%></option>
<%
rs2.movenext
loop
rs2.close
%>
</select>
<input name="btnSearch" type="submit" value="搜索"> </td>
</form>
</tr>
<%end if%>
</table>
<br>
<table class=tableBorder width="95%" border="0" align="center" cellpadding="2" cellspacing="1">
<tr style="cursor:hand" bgcolor="#dde1ec" align="center">
<td width="13%" class=forumHeaderBackgroundAlternate><b>员工ID</b></td>
<td width="17%" class=forumHeaderBackgroundAlternate><b>员工姓名</b></td>
<td width="19%" class=forumHeaderBackgroundAlternate><b>职务</b></td>
<td width="22%" class=forumHeaderBackgroundAlternate><b>所属矿</b></td>
<td width="12%" class=forumHeaderBackgroundAlternate><b>所属站</b></td>
<td width="17%" class=forumHeaderBackgroundAlternate><b>所属局<a title="添加记录" href='Admin_News.asp?pageno=<%=mPage%>#anInsert'></a></b></td>
</tr>
<% page=""
if ksid<>"" then
page = trim(Request.QueryString("page"))
kqsql="select userid,username,userduty,mkname,mgzname,mtjname from ryxx_v where ksid="&"'"&ksid&"'order by dwjbid , nbjbid"
else
vmk=Request("second")
if vmk="" then
vmk=trim(Request.QueryString("vmk"))
page = trim(Request.QueryString("page"))
end if
if vmgz="" then
kqsql="select userid,username,userduty,mkname,mgzname,mtjname from ryxx_v order by dwjbid , nbjbid"
else
if vmk="" then
kqsql="select userid,username,userduty,mkname,mgzname,mtjname from ryxx_v where mgzid="&"'"&vmgz&"'order by dwjbid , nbjbid"
else
kqsql="select userid,username,userduty,mkname,mgzname,mtjname from ryxx_v where mkid="&"'"&vmk&"'order by dwjbid , nbjbid"
end if
end if
end if
%>
<% '分页显示
dim i,intPage,page,pre,last,filepath,bb
set kqrs = server.CreateObject("adodb.recordset")
'bb="010106"
kqrs.PageSize = 17
kqrs.CursorLocation = 3
kqrs.Open kqsql,conn,0,2,1
pre = true
last = true
if len(page) = 0 then
intpage = 1
pre = false
else
if cint(page) =< 1 then
intpage = 1
pre = false
else
if cint(page) >= kqrs.PageCount then
intpage = kqrs.PageCount
last = false
else
intpage = cint(page)
end if
end if
end if
if not kqrs.eof then
kqrs.AbsolutePage = intpage
end if
%>
<% for i=1 to kqrs.pagesize
if kqrs.eof or kqrs.bof then exit for
%> <tr bgcolor="<%=mColor%>" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#EBEEF6'" >
<td class=forumRow width="13%" align="center"><%=kqrs("userid")%></td>
<td class=forumRow width="13%" align="center"> <a href="grkq1.asp?yggid=<%=kqrs("userid")%>" target="content"><%=kqrs("username")%></a></td>
<td class=forumRow width="19%" align="center" > <%=kqrs("userduty")%> </td>
<td class=forumRow width="22%" align="center" ><%=kqrs("mkname")%></td>
<td class=forumRow width="12%" align="center" > <%=kqrs("mgzname")%></td>
<td class=forumRow width="17%" align="center" ><%=kqrs("mtjname")%> </td>
</tr>
<%kqrs.movenext%>
<%next
%>
</table>
<table width="95%" height="10" border="1" align="center" cellpadding="2" cellspacing="2" bordercolorlight=#808080 bordercolordark=#ffffff>
<tr>
<%if kqrs.pagecount > 0 then%>
<td width="13%" height="10" align="left">当前页<%=intpage%>/<%=kqrs.PageCount%></td>
<%else%>
<td width="16%" align="left">当前页0/0</td>
<%end if%>
<td>共<%=kqrs.recordcount%>条</td>
<td width="71%" align="right"> <a href="Admin_News.asp?page=1&vmgz=<%=vmgz%>&vmk=<%=vmk%>&ksid=<%=ksid%>">首页</a>|
<%if pre then%>
<a href="Admin_News.asp?page=<%=intpage -1%>&vmgz=<%=vmgz%>&vmk=<%=vmk%>&ksid=<%=ksid%>">上页</a>|
<%end if%>
<%if last then%>
<a href="Admin_News.asp?page=<%=intpage +1%>&vmgz=<%=vmgz%>&vmk=<%=vmk%>&ksid=<%=ksid%>">下页</a> |
<%end if%>
<a href="Admin_News.asp?page=<%=kqrs.PageCount%>&vmgz=<%=vmgz%>&vmk=<%=vmk%>&ksid=<%=ksid%>">尾页</a>|转到第
<select name="sel_page" onChange="javascript:location=this.options[this.selectedIndex].value;">
<%
for i = 1 to kqrs.PageCount
if i = intpage then%>
<option value="Admin_News.asp?page=<%=i%>&vmgz=<%=vmgz%>&vmk=<%=vmk%>&ksid=<%=ksid%>" selected><%=i%></option>
<%else%>
<option value="Admin_News.asp?page=<%=i%>&vmgz=<%=vmgz%>&vmk=<%=vmk%>&ksid=<%=ksid%>"><%=i%></option>
<%
end if
next
%>
</select>
<%
kqrs.close
conn.close%>
页 </td>
</tr>
</table>
</body>
</html>
[此贴子已经被作者于2005-12-31 15:39:14编辑过]