<% set conn = db_Conn()
bm=trim(request("bm"))
nian=request("nian")
yue0=request("yue0")
if nian="" then nian=year(date())
if yue0="" then yue0=month(date())
if len(bm)=0 then
bm="00"
end if
if bm="00" or bm="" then
tempbm="所有部门"
else
set rss=conn.execute("select bmmc from bumen where bm='"&bm&"'")
tempbm=trim(rss("bmmc"))&"处"
rss.close
end if
%>
<%=nian%>年<%=yue0%>月<%=tempbm%>工程技措申报汇总
<table border="1" cellspacing="0" cellpadding="0" width="100%" bordercolorlight="#000000" style='border-collapse: collapse; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; border-style: none; border-width: medium' bordercolordark="#000000">
<tr height="25">
<td width="35%" height="20" align="center" bgcolor="#EEEEEE">项目名称</td>
<td width="15%" height="20" align="center" bgcolor="#EEEEEE">项目负责人</td>
</tr>
<%
str_nian=""
str_yue0=""
if yue0="" then
str_yue0=""
else
str_yue0=" and month(tbrq)="&yue0&" "
end if
if nian="" then
str_nian=""
else
str_nian=" and year(tbrq)="&nian&" "
end if
if len("bm")=0 or bm="00" then
sql="select xmmc,bumen.bmmc,tbrq,ygfy,users.name from gc_jcxm,users,bumen "
sql=sql&" where users.signon=gc_jcxm.xmfzr and bumen.bm=gc_jcxm.sqdw and gc_jcxm.sign='1' "
else
sql="select xmmc,bumen.bmmc,tbrq,ygfy,users.name from gc_jcxm,users,bumen "
sql=sql&" where gc_jcxm.sqdw='"&bm&"' and users.signon=gc_jcxm.xmfzr and bumen.bm=gc_jcxm.sqdw and gc_jcxm.sign='1' "
end if
sql=sql&str_nian&str_yue0&" order by tbrq desc "
Select Case Request.QueryString("pages")
Case ""
Session("Cpage") = 1
Case "Next"
Session("Cpage") = Session("Cpage") + 1
Case "Prev"
Session("Cpage") = Session("Cpage") - 1
End Select
Set RS = Server.CreateObject("ADODB.Recordset")
RS.PageSize =15
'response.write sql
RS.Open sql,conn,1
if not RS.eof then
if Session("Cpage")>rs.pagecount then
Session("Cpage")=rs.pagecount
else if Session("Cpage")<1 then
Session("Cpage")=15
end if
end if
RS.AbsolutePage = CLng(Session("Cpage"))
end if
%>
<%
i=1
do while (not RS.eof) and i <= RS.PageSize
%>
<tr height="25">
<td width="35%" height="20" align="center"><%=rs("xmmc")%></td>
<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<form name="fm" action="hz_gcjc.asp" method="post" style="display:inline">
<%
bm=trim(request("bm"))
nian=request("nian")
yue0=request("yue0")
if nian="" then nian=year(date())
if yue0="" then yue0=month(date())
if len(bm)=0 then
bm="00"
end if
set conn = db_Conn()
%>
<table border="0" cellspacing="1" width="100%" hspace="0" bgcolor="#FFFFFF" class=text>
<tr >
<td bgcolor="#66AAEE" valign="middle" align="center" height="30" colspan="11" width="662">
<%set rss=conn.execute("select bm,bmmc from bumen order by zzjb")%>
<p align="left">
<select name="nian" onchange="submit()">
<%for k=2003 to int(year(date()))+1%>
<%if nian="" then
if int(year(date()))=k then%>
<option value="<%=k%>" selected><%=k%></option>
<%else%>
<option value="<%=k%>"><%=k%></option>
<%end if%>
<%else
if k=int(nian) then%>
<option value="<%=k%>" selected><%=k%></option>
<%else%>
<option value="<%=k%>"><%=k%></option>
<%end if%>
<%end if%>
<%next%>
</select><font color="#FFFFFF">年</font>
<select name="yue0" onchange="submit()" size="1">
<%for i=1 to 12%>
<%if int(yue0)=i then%>
<option value="<%=i%>" selected><%=i%>月
<%else%>
<option value="<%=i%>"><%=i%>月 <%
end if
next
%>
</select><font color="#FFFFFF">月</font>
<select name="bm" onchange="submit()">
<%
if len("bm")=0 or bm="00" then
response.write "<option value='00' selected>----全部----"
else
response.write "<option value='00'>----全部----"
end if
do while not RSS.eof
if trim(bm)=trim(RSS("bm")) then
response.write "<option value='"&trim(RSS("bm"))&"' selected>"&trim(RSS("bmmc"))
else
response.write "<option value='"&trim(RSS("bm"))&"'>"&trim(RSS("bmmc"))
end if
RSS.movenext
loop
rss.close
%>
</select>
<%
str_nian=""
str_yue0=""
if yue0="" then
str_yue0=""
else
str_yue0=" and month(tbrq)="&yue0&" "
end if
if nian="" then
str_nian=""
else
str_nian=" and year(tbrq)="&nian&" "
end if
if len("bm")=0 or bm="00" then
sql="select gc_jcxm.id,xmmc,bumen.bmmc,tbrq,ygfy,users.name from gc_jcxm,users,bumen "
sql=sql&" where users.signon=gc_jcxm.xmfzr and bumen.bm=gc_jcxm.sqdw and gc_jcxm.sign='1' "
else
sql="select gc_jcxm.id,xmmc,bumen.bmmc,tbrq,ygfy,users.name from gc_jcxm,users,bumen "
sql=sql&" where gc_jcxm.sqdw='"&bm&"' and users.signon=gc_jcxm.xmfzr and bumen.bm=gc_jcxm.sqdw and gc_jcxm.sign='1' "
end if
sql=sql&str_nian&str_yue0&" order by tbrq desc "
Select Case Request.QueryString("pages")
Case ""
Session("Cpage") = 1
Case "Next"
Session("Cpage") = Session("Cpage") + 1
Case "Prev"
Session("Cpage") = Session("Cpage") - 1
End Select
set rs=server.createobject("adodb.recordset")
RS.PageSize =15
'response.write sql
RS.Open sql,conn,1
if not RS.eof then
if Session("Cpage")>rs.pagecount then
Session("Cpage")=rs.pagecount
else if Session("Cpage")<1 then
Session("Cpage")=15
end if
end if
RS.AbsolutePage = CLng(Session("Cpage"))
end if
%>
<font color="#FFFFFF">处工程技措项目(按申报日期汇总)</font>
<a href='#' title='打印汇总单' onClick=window.open('dy_gcjc.asp?nian=<%=nian%>&yue0=<%=yue0%>&bm=<%=bm%>&page=<%=CLng(Session("Cpage"))%>','report','scrollbars=yes,resizable=no,left=50,top=0,width=680,height=480')>[打印页面]</a>
</p>
</td>
</tr>
<tr bgcolor="#eeeeFF">
<td width="35%" height="20" align="center">项目名称</td>