qingdan.asp

来自「投资管理系统, asp+ mssql server」· ASP 代码 · 共 234 行

ASP
234
字号
<%
response.expires=-1
dim ThisKey
ThisKey = "d"
%>
<!--#include file="../inc/permission.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/SearAtt.asp"-->
<%
typet=trim(request("typet"))
if typet="" or typet="0" then
	typet="1"
end if
if typet="1" then
	Nav="前期项目统计表"
else
	if typet="2" then
		Nav="争取开工项目统计表"
	else
		if typet="3" then
			Nav="在建项目统计表"
		else
			if typet="4" then
				Nav="竣工项目统计表"
			else
				if typet="5" then
					Nav="停缓建项目统计表"
				else
					if typet="6" then
						Nav="撤消立项项目统计表"
					end if
				end if
			end if
		end if
	end if
end if

	Department=int(Session("Department"))
	TMoney1=""
	TMoney2=""
if trim(request("sbumit"))<>"All" then
	Attribute=int(request("Attribute"))
	Attribute2=request("Attribute2")
	if Attribute2="" then
		Attribute2=0
	else
		Attribute2=int(Attribute2)
	end if
	SearchText=request("SearchText")
	TMoney1=trim(request("TMoney1"))
	if TMoney1="" then
		TMoney1="0"
		TMoney11=""
	else
		TMoney11=TMoney1
	end if
	TMoney2=trim(request("TMoney2"))
	if TMoney2="" then
		TMoney2="0"
		TMoney22=""
	else
		TMoney22=TMoney2
	end if
else
	Attribute=0
	Attribute2=0
	SearchText=""
end if
if TMoney11="0" and TMoney22="0" then
	TMoney11=""
	TMoney22=""
end if
set rs=server.createobject("adodb.recordset")
set rsy=server.createobject("adodb.recordset")

	Attribute3="("&Attribute&":"&Attribute2&")"

Sqlstr="select * from tblBase where State="&int(typet)
if Department<>0 then
	Sqlstr=Sqlstr&" and Department="&Department
end if
if int(Attribute2)<>0 then
	Sqlstr=Sqlstr&" and Attribute like '%"&Attribute3&"%'"
end if
if TMoney1<>"0" or TMoney2<>"0" then
	Sqlstr=Sqlstr&" and Money>="&TMoney1&" and Money<="&TMoney2
end if
Sqlstr=Sqlstr&" and Name like '%"&SearchText&"%' order by InputTime Desc"
rs.open Sqlstr,conn,1,1
if not rs.eof then
	'**********************
	TotalMoney=0
	do while not rs.eof
		TotalMoney=TotalMoney+rs("Money")
		rs.movenext
	loop
	rs.movefirst
	'**********************
	rs.pagesize=20
	pagesize=rs.pagesize
	pagecount=rs.pagecount
	absolutepage=trim(request("absolutepage"))
	if absolutepage=empty then
		absolutepage=1
	else
		rs.absolutepage=absolutepage
	end if
	total=rs.recordcount
end if
num=cint(absolutepage-1)*pagesize
%>
<HTML>
<HEAD>
<TITLE>投资项目管理打印系统</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK rel=stylesheet href="../css/main.css" type="text/css">
</HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0>
<TABLE cellPadding=0 width=720 align=center border=0>
  <TR>
      <TD vAlign=top align=center width="100%">        
        <TABLE cellSpacing=0 cellPadding=0 width="80%" border=0>
          <TR> 
            <TD height=50 valign=middle width="100%" align=center style="font-size:12pt;letter-spacing:5pt"><%=Nav%></TD>
          </TR>
		  <TR> 
           <TD align=left>&nbsp;&nbsp;<b>共:<u><%=total%></u> 项&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总投资合计:<u><%=TotalMoney%></u> 万元</b></td>
          </TR>
          <TR> 
            <TD vAlign=top align=center width="100%" height=220> 
              <TABLE cellSpacing=0 cellPadding=0 width="640" border=0 style="border-left:1 solid #000000;border-top:1 solid #000000">
			   <TR> 
                  <TD class=tdbb width=10>&nbsp;</TD>
				  <td class=tdbb align=left width=290>&nbsp;<b>项目名称</b></td>
				  <td class=tdbb align=center width=70><b>建设性质</b></td>
				  <td class=tdbb align=center width=90><b>总投资(万元)</b></td>
				  <td class=tdbb align=center width=220><b>项目业主</b></td>
                </TR>
				<%
				if not rs.eof then
					for i=1 to 30
						if not rs.eof then
							Att=trim(rs("Attribute"))
							rsy.open "select * from tblYezhu where ProjectID="&rs("ID"),conn,1,1
							if not rsy.eof then
								Yezhu_Unit=trim(rsy("Yezhu_Unit"))
							else
								Yezhu_Unit="&nbsp;"
							end if
							rsy.close
							if Yezhu_Unit="" then
								Yezhu_Unit="&nbsp;"
							end if
							Money=0
							SearAtt="(1:"
							%>
							<!--#include file="../inc/SearAtt2.asp"-->
							<%
							if SearEDAtt="" then
								SearEDAtt="&nbsp;"
							else
								set rsa=server.createobject("adodb.recordset")
								rsa.open "select Attribute from tblAttribute2 where AttributeID=1 and daihao="&int(SearEDAtt),conn,1,1
								if not rsa.eof then
									SearEDAtt=trim(rsa("Attribute"))
								end if
								rsa.close
								set rsa=nothing
							end if
							if SearEDAtt="" or SearEDAtt="0" then
								SearEDAtt="&nbsp;"
							end if
							if trim(rs("Money"))="" then
								Money="&nbsp;"
							else
								Money=trim(rs("Money"))
							end if
							num=num+1
				%>
                <TR> 
                  <TD class=tdbb width=10 align=center><%=num%></td>
				  <td class=tdbb align=left width=290>&nbsp;<%=trim(rs("Name"))%></TD>
				  <td class=tdbb align=center width=70><%=SearEDAtt%></td>
				  <td class=tdbb align=center width=90><%=Money%></td>
				  <td class=tdbb align=center width=220><%=Yezhu_Unit%></td>
                </TR>
				<%
							rs.movenext
						else
							exit for
						end if
					next
				else
				%>
                <TR> 
                  <TD>&nbsp;</TD>
                </TR>
				<%
				end if
				%>
              </TABLE>
            </TD>
          </TR>
          <TR>
            <TD width="100%" align="center"><% if cint(absolutepage)>1 then %>
					<a href="Qingdan.asp?typet=<%=typet%>&Attribute=<%=Attribute%>&Attribute2=<%=Attribute2%>&TMoney1=<%=TMoney1%>&TMoney2=<%=TMoney2%>&SearchText=<%=SearchText%>&absolutepage=1">&lt;&lt;</a>
					<% else %>
					<font color=#888888>&lt;&lt;</font>
					<% end if %>&nbsp;
					<% if cint(absolutepage)>1 then %>
                    <a href="Qingdan.asp?typet=<%=typet%>&Attribute=<%=Attribute%>&Attribute2=<%=Attribute2%>&TMoney1=<%=TMoney1%>&TMoney2=<%=TMoney2%>&SearchText=<%=SearchText%>&absolutepage=<%=absolutepage-1%>">&lt;</a> 
                    <% else %>
                    <font color=#888888>&lt;</font>
                    <% end if %>&nbsp;<%=absolutepage%>&nbsp;
                    <% if cint(absolutepage)<cint(pagecount) then %>
                    <a href="Qingdan.asp?typet=<%=typet%>&Attribute=<%=Attribute%>&Attribute2=<%=Attribute2%>&TMoney1=<%=TMoney1%>&TMoney2=<%=TMoney2%>&SearchText=<%=SearchText%>&absolutepage=<%=absolutepage+1%>">&gt;</a> 
                    <% else %>
                    <font color=#888888>&gt;</font>
                    <% end if %>&nbsp;
					<% if cint(absolutepage)<cint(pagecount) then %>
                    <a href="Qingdan.asp?typet=<%=typet%>&Attribute=<%=Attribute%>&Attribute2=<%=Attribute2%>&TMoney1=<%=TMoney1%>&TMoney2=<%=TMoney2%>&SearchText=<%=SearchText%>&absolutepage=<%=pagecount%>">&gt;&gt;</a>
					<% else %>
					<font color=#888888>&gt;&gt;</font>
					<% end if 
					rs.close
					set rsy=nothing%></TD>
          </TR>
        </TABLE>
    </TD>
   </TR>
</TABLE>
</BODY>
</HTML>
<!-- #include file="../inc/close.asp" -->

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?