query.asp
来自「投资管理系统, asp+ mssql server」· ASP 代码 · 共 397 行 · 第 1/2 页
ASP
397 行
<%set rsx=server.createobject("adodb.recordset")
if Attribute="" or Attribute=0 then
Attribute=1
end if
rsx.open "select * from tblAttribute2 where AttributeID="&int(Attribute),conn,1,1
if not rsx.eof then
do while not rsx.eof
if rsx("daihao")=Attribute2 then%>
<option value="<%=rsx("daihao")%>" selected><%=trim(rsx("Attribute"))%></option>
<%else%>
<option value="<%=rsx("daihao")%>"><%=trim(rsx("Attribute"))%></option>
<%end if
rsx.movenext
loop
end if
rsx.close
set rsx=nothing%></select><font color=#ffffff>总投资在</font><input type=text name=TMoney1 value="<%=TMoney11%>" size=5><font color=#ffffff>与</font><input type=text name=TMoney2 value="<%=TMoney22%>" size=5><font color=#ffffff>之间</font>
<font color=#ffffff>项目名称</font><input type="text" name="SearchText" size="10" value="<%=SearchText%>"><input type=submit name=submit value="查询"><input type=button name=all value="全部" onclick="javascript:location.href('Query.asp?typet=<%=typet%>');">
<input type="hidden" name=typet value="<%=typet%>"></TD>
</tr>
<tr bgcolor="#996600">
<td align=left style="BORDER-BOTTOM: #996600 1px solid;border-top:1 solid #ffffff"> <font color=white><b>查询结果共:<u><%=total%></u> 项 总投资合计:<u><%=TotalMoney%></u> 万元</b></font></td>
<TD style="BORDER-BOTTOM: #996600 1px solid;border-top:1 solid #ffffff" align=right valign="middle" height="10"><a href="Print/Qingdan.asp?typet=<%=typet%>&Attribute=<%=Attribute%>&Attribute2=<%=Attribute2%>&TMoney1=<%=TMoney1%>&TMoney2=<%=TMoney2%>&SearchText=<%=SearchText%>&absolutepage=<%=absolutepage%>" target="print"><font color="#ffffff"><b>项目清单</b></font></a> <a href="print/index.asp" target="print"><font color="#ffffff"><b>统计表</b></font></a> <!--a href="print/Yuebaobiao.asp" target="print"><font color="#ffffff"><b>月报表</b></font></a--></TD>
</TR>
</form>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="90%" border=0>
<TR>
<TD width="100%" align="center">共<%=rs.recordcount%>条/<%=rs.pagecount%>页 每页<%=rs.pagesize%>条,第<%=absolutepage%>页
<% if cint(absolutepage)>1 then %>
<a href="query.asp?typet=<%=typet%>&TMoney1=<%=TMoney1%>&TMoney2=<%=TMoney2%>&Attribute=<%=Attribute%>&Attribute2=<%=Attribute2%>&SearchText=<%=SearchText%>&absolutepage=1">第一页</a>
<% else %>
<font color=#888888>第一页</font>
<% end if %>
<% if cint(absolutepage)>1 then %>
<a href="query.asp?typet=<%=typet%>&TMoney1=<%=TMoney1%>&TMoney2=<%=TMoney2%>&Attribute=<%=Attribute%>&Attribute2=<%=Attribute2%>&SearchText=<%=SearchText%>&absolutepage=<%=absolutepage-1%>">上页</a>
<% else %>
<font color=#888888>上页</font>
<% end if %>
<% if cint(absolutepage)<cint(pagecount) then %>
<a href="query.asp?typet=<%=typet%>&TMoney1=<%=TMoney1%>&TMoney2=<%=TMoney2%>&Attribute=<%=Attribute%>&Attribute2=<%=Attribute2%>&SearchText=<%=SearchText%>&absolutepage=<%=absolutepage+1%>">下页</a>
<% else %>
<font color=#888888>下页</font>
<% end if %>
<% if cint(absolutepage)<cint(pagecount) then %>
<a href="query.asp?typet=<%=typet%>&TMoney1=<%=TMoney1%>&TMoney2=<%=TMoney2%>&Attribute=<%=Attribute%>&Attribute2=<%=Attribute2%>&SearchText=<%=SearchText%>&absolutepage=<%=pagecount%>">最后一页</a>
<% else %>
<font color=#888888>最后一页</font>
<% end if %></TD>
</TR>
<TR>
<TD vAlign=top align=center width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="740" border=0 style="border-left:1 solid #CC9933;border-top:1 solid #CC9933">
<TR>
<TD class=tdby width=10> </TD>
<td class=tdby align=left width=380> <b>项目名称</b></td>
<td class=tdby align=center width=70><b>建设性质</b></td>
<td class=tdby align=center width=90><b>总投资(万元)</b></td>
<td class=tdby align=center width=200><b>项目业主</b></td>
</TR>
<%
if not rs.eof then
for i=1 to 20
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=" "
end if
rsy.close
if Yezhu_Unit="" then
Yezhu_Unit=" "
end if
SearAtt="(1:"
%>
<!--#include file="inc/SearAtt2.asp"-->
<%
if SearEDAtt="" then
SearEDAtt=" "
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=" "
end if
if rs("Money")="" then
Money=" "
else
Money=rs("Money")
end if
num=num+1
%>
<TR <%if (num mod 2)<>0 then%>bgcolor="FFCC33"<%end if%>>
<TD class=tdby width=10 align=center><font color=red><%=num%></font></td>
<td class=tdby align=left width=380> <a href="Content.asp?typet=<%=typet%>&ID=<%=rs("ID")%>" target="_blank"><%=trim(rs("Name"))%></a></TD>
<td class=tdby align=center width=70><%=SearEDAtt%></td>
<td class=tdby align=center width=90><%=Money%></td>
<td class=tdby align=center width=200><%=Yezhu_Unit%></td>
</TR>
<%
rs.movenext
else
exit for
end if
next
end if
%>
</TABLE>
</TD>
</TR>
<%if total=0 then%>
<tr>
<td height=160 align=center valign=top><br>没有录入项目</td>
</tr>
<%end if%>
<TR>
<TD width="100%" align="center">共<%=rs.recordcount%>条/<%=rs.pagecount%>页 每页<%=rs.pagesize%>条,第<%=absolutepage%>页
<% if cint(absolutepage)>1 then %>
<a href="query.asp?typet=<%=typet%>&Attribute=<%=Attribute%>&Attribute2=<%=Attribute2%>&TMoney1=<%=TMoney1%>&TMoney2=<%=TMoney2%>&SearchText=<%=SearchText%>&absolutepage=1">第一页</a>
<% else %>
<font color=#888888>第一页</font>
<% end if %>
<% if cint(absolutepage)>1 then %>
<a href="query.asp?typet=<%=typet%>&Attribute=<%=Attribute%>&Attribute2=<%=Attribute2%>&TMoney1=<%=TMoney1%>&TMoney2=<%=TMoney2%>&SearchText=<%=SearchText%>&absolutepage=<%=absolutepage-1%>">上页</a>
<% else %>
<font color=#888888>上页</font>
<% end if %>
<% if cint(absolutepage)<cint(pagecount) then %>
<a href="query.asp?typet=<%=typet%>&Attribute=<%=Attribute%>&Attribute2=<%=Attribute2%>&TMoney1=<%=TMoney1%>&TMoney2=<%=TMoney2%>&SearchText=<%=SearchText%>&absolutepage=<%=absolutepage+1%>">下页</a>
<% else %>
<font color=#888888>下页</font>
<% end if %>
<% if cint(absolutepage)<cint(pagecount) then %>
<a href="query.asp?typet=<%=typet%>&Attribute=<%=Attribute%>&Attribute2=<%=Attribute2%>&TMoney1=<%=TMoney1%>&TMoney2=<%=TMoney2%>&SearchText=<%=SearchText%>&absolutepage=<%=pagecount%>">最后一页</a>
<% else %>
<font color=#888888>最后一页</font>
<% end if
rs.close
set rsy=nothing%></TD>
</TR>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TR>
<TD bgcolor="#996600"> </TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
<script language="JavaScript">
function Show(){
if(document.all("ProjectClass").value=="贷款"){
document.all("Class12").style.display="";
document.all("Class13").style.display="none";
}
else{
if(document.all("ProjectClass").value=="利用外资"){
document.all("Class12").style.display="none";
document.all("Class13").style.display="";
}
else{
document.all("Class12").style.display="none";
document.all("Class13").style.display="none";
}
}
}
function Show2(){
if(document.all("ProjectClass2").value=="贷款"){
document.all("Class22").style.display="";
document.all("Class23").style.display="none";
}
else{
if(document.all("ProjectClass2").value=="利用外资"){
document.all("Class22").style.display="none";
document.all("Class23").style.display="";
}
else{
document.all("Class22").style.display="none";
document.all("Class23").style.display="none";
}
}
}
</script>
<!--#include file="manage/inc/SearchAtt.asp"-->
<!-- #include file="inc/close.asp" -->
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?