<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%ColumnName="":Tablename="HX_WorkFlow":action=request("action"):page=request("page"):Orderby=" where 1=1"
if action="search" then
keywords=request("keywords"):FlowType=request("FlowType"):Numbers=request("WorkFlowNumber")
select case request("state")
  case "F"
     Orderby=Orderby&" and WS_WorkFlowFlag=1 and WS_WorkFlowMan="&loginuid
	 if WS_S.HX_ISNUM(FlowType) then
	   Orderby=Orderby&" and WS_WorkFlowFlowType="&FlowType
	 end if
     if Numbers<>"" then
	   Orderby=Orderby&" and WS_WorkFlowNumber='"&Numbers&"'"
	 end if
	 if keywords<>"" then
	   Orderby=Orderby&" and WS_WorkFlowTitle like '%"&keywords&"%' or WS_WorkFlowContent like '%"&keywords&"%' or WS_WorkFlowGrade='"&keywords&"'"
	 end if
  case "R" 
     Orderby=Orderby&" and WS_WorkFlowFlag=0 and WS_WorkFlowToMan="&loginuid
	 if WS_S.HX_ISNUM(FlowType) then
	   Orderby=Orderby&" and WS_WorkFlowFlowType="&FlowType
	 end if
	 if keywords<>"" then
	   Orderby=Orderby&" and WS_WorkFlowTitle like '%"&keywords&"%' or WS_WorkFlowContent like '%"&keywords&"%' or WS_WorkFlowGrade='"&keywords&"'"
	 end if
end select
else
 Orderby=Orderby&" and (WS_WorkFlowMan="&loginuid&" or WS_WorkFlowToMan="&loginuid&")"
end if
Orderby=Orderby&" order by WS_WorkFlowDate desc"
if WS_S.MemberPriv("WS_WORKFLOWSearch")<>1 then HX_GoBack "对不起,您的权限不够!",""
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
response.write "<head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>公文检索</title><link rel=stylesheet type=text/css href='../HXinclude/HX_Style.css'><script src='../HXinclude/HX_Function.js'></script></head><body topmargin='10' leftmargin='0' bottommargin='10'><table width='98%'  border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#613c25'><tr><td colspan='2' bgcolor=FFFBE8 background='../hximages/titlelinebg.gif'><table width='580'  border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>公文检索</font></td></tr></table><table width='100%'  border='0' cellspacing='0' cellpadding='0'><tr><td bgcolor='#FFFBE8' align='center'><table width='524' border='0' cellspacing='1' cellpadding='3' align='center' bgcolor='#613c25'><form name='form2' method='post' action='?action=search'><tr bgcolor='#FFFBE8'><td width='16%' bgcolor='#FFFBE8'>　档案类别</td><td width='88%' height='30'><input type='radio' class='radio' name='state' "
if request("state")="F" or request("state")="" then response.write "checked"
response.write " value='F' onClick='document.form2.WorkFlowNumber.disabled = false'>发文&nbsp;&nbsp;<input type='radio' class='radio' name='state' value='R' "
if request("state")="R" then response.write "checked"
response.write " onClick='document.form2.WorkFlowNumber.disabled = true;'>收文&nbsp;&nbsp; </td></tr><tr bgcolor='#FFFBE8'><td height='20' align='CENTER' bgcolor='#FFFBE8'>公文类别</td><td colspan='3'><select name='FlowType'>"
ColumnName="":Tablename="HX_WorkFlowType":Orderby=" order by WS_WTID asc"
set tyrs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
if tyrs.recordcount>0 then
do until tyrs.eof
response.write "<option value='"&tyrs("WS_WTID")&"'>"&tyrs("WS_WorkFlowTypeName")&"</option>"
tyrs.movenext
loop	
end if
response.write " </select></td></tr><tr bgcolor='#FFFBE8'><td width='16%' bgcolor='#FFFBE8'>　办文编号</td><td width='88%' height='30'><input type='text' name='WorkFlowNumber'></td></tr><tr bgcolor='#FFFBE8'><td width='16%' height='30' bgcolor='#FFFBE8'>　关 键 字</td><td width='88%' height='30'><input type='text' name='keywords'> ＊关键字检索对象包含主题、正文、保密级别 </td></tr><tr bgcolor='#FFFBE8'><td height='30' bgcolor='#FFFBE8'>&nbsp;</td><td height='30'><input type='submit' name='Submit' value=' 检 索 '> <input type='reset' name='Submit' value=' 重 置 '></td></tr></form></table></td></tr><tr><td bgcolor='#FFFBE8' align='center'>&nbsp;</td></tr></table><table width='100%'  border='0' cellspacing='1' cellpadding='3' bgcolor=FFFBE8><form method='post' action='WorkFlowWaitList.asp?action=del&page="&page&"' name='form1'><tr bgcolor='#BF9B73' class='td4'><td width='140' align='center'>办文编号</td><td width='156' align='center'>标　　题</td><td width='61' align='center'>公文类别 </td><td width='145' align='center'>正　　文 </td><td width='83' align='center'>拟办意见</td><td width='61' align='center'>保密级别</td><td width='33' align='center'>附件</td><td width='80' align='center'>收文日期</td><td width='55' align='center'>状态</td><td width='67' align='center'>发文人</td></tr>"
if rs.recordcount<=0 then
response.Write "<tr><td colspan=10 bgcolor=FFFBE8 height=25 align=center>没有搜索到您需要的公文！</td></tr>"
else
rs.PageSize =14 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount 
if Not IsNumeric(page) or page="" then
        page=1
else
        page=cint(page)
end if
if page<1 then
        page=1
elseif  page>maxpage then
        page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
else
		x=iPageSize
end if
ii=0
do while not rs.EOF	   
response.write "<tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'><td width='140'>"&rs("WS_WorkFlowNumber")&"</td><td width='156'>"&rs("WS_WorkFlowTitle")&"</td><td width='61' align=center>"&WS_S.HX_OutWorkFlowType(rs("WS_WorkFlowFlowType"))&"</td><td width='145' title='"&rs("WS_WorkFlowContent")&"'>"&left(rs("WS_WorkFlowContent"),10)&"</td><td width='83' title='"&rs("WS_WorkFlowBrief")&"'>"&left(rs("WS_WorkFlowBrief"),10)&"</td><td width='61' align=center>"&rs("WS_WorkFlowGrade")&"</td><td width='33' align=center>"
if rs("WS_WorkFlowAnnex")<>"" then response.write "<a href='"&rs("WS_WorkFlowAnnex")&"' target='_blank'><img src='../HXIMAGES/Message/sign.gif' border=0></a>"
response.write "</td><td width='80' align=center>"&rs("WS_WorkFlowDate")&"</td><td width='55' align=center>"
if rs("WS_WorkFlowQT")=0 then response.Write "<font color=red>未签收</font>" else response.Write "<font color=blue title='签收日期："&rs("WS_WorkFlowQTDate")&"'>已签收</font>"
response.Write "</td><td width='67' align=center>"
Call WS_S.HX_OutUserInfo(rs("WS_WorkFlowMan")):response.Write OutName&"</td></tr>"
ii=ii+1
if ii>=rs.PageSize then Exit Do
rs.movenext
loop
call WS_S.PageControl(iCount,maxpage,page,"border=0 align=right","<p align=right>",10)
end if
call WS_S.HX_RSClose(rs)
response.write "</form></table></td></tr></table>"%>