⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sfdw.asp

📁 基于ASP的SQL小区物业管理系统课程设计
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="sub/conn.asp"-->
<!--#include file="sub/rightnav.asp"-->
<!--#include file="sub/fenye.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>单个住房费用查询</title>
<link href="cbody.css" rel="stylesheet" type="text/css" />
<link href="nav.css" rel="stylesheet" type="text/css" />
</head>

<body>
<!--#include file="sub/mheader.asp"-->
  <div id="abody">
    <div id="lbody">
	<div class="zh1">
	  <h5>住户交纳费用金额</h5>
	   <div class="zhcxb">
	  <form id="form1" name="form1" method="post" action="sfdw.asp" >
         选择单元:
		  <select name="s1" id="s1">
            <option>选择单元</option>
            <option>七号楼A区</option>
            <option>七号楼B区</option>
            <option>七号楼C区</option>
            <option>八号楼A区</option>
            <option>八号楼B区</option>
            <option>八号楼C区</option>
            <option>四号楼</option>
            <option>无</option>
          </select>
		  <input name="keyword" type="text" class="yinput" id="keyword" onFocus="this.value=''" value="房间号" />
		  <input type="submit" name="B1" value="立即提交" />
	   </form>
      </div>
		<% 
		    dim fang,jian,butt
			fang=Request("s1")
			jian=Trim(Request("keyword"))
			butt=Request("B1")
			if butt="立即提交" then
		    set rs=Server.CreateObject("ADODB.RecordSet")
			sql="select * from money where room_id='"&fang&jian&"'"
            rs.open sql,conn,1,1
			if rs.recordcount=0 then
			Response.Write("</br>")
			Response.Write("对不起,该房间不存在!!!")
			else
			dim m,readed,cur_page,url
			vari="sfdw.asp?B1="&butt&"&s1="&fang&"&keyword="&jian
            m=rs.recordcount
            readed=1
            rs.pagesize=10
		%>
		<% call page() %>
		  <h5>用户住房详细费用记录</h5>
		  <table class="browser">
	   <tr>
	     <th width="85" class="b1">日期</th>
		 <th width="58">电费</th>
		 <th width="58">煤气费</th>
		 <th width="58">物业费</th>
		 <th width="58">停车费</th>
		 <th width="58">电视费</th>
		 <th width="58">总和</th>
		 <th width="58" class="b2">余额/元</th>
	   </tr>
<% 
    do while (readed<=rs.pagesize) and (not rs.eof)  
	dim strdate,strmonth
    strdate=rs(9)
    strmonth=split(strdate," ")
%>
	   <tr>
	     <td class="b1"><%= strmonth(0) %></td>
		 <td><%= rs(2) %></td>
		 <td><%= rs(3) %></td>
		 <td><%= rs(4) %></td>
		 <td><%= rs(5) %></td>
		 <td><%= rs(6) %></td>
		 <td><%= rs(7) %></td>
		 <% 
		    dim mon
			mon=rs(8)
			if mon<0 then
			Response.Write "<td class='b2'><font color='#FF0000'>"&mon&"<font></td>"
			else
			Response.Write "<td class='b2'>"&mon&"</td>"
			end if
		 %>
	   </tr>
<%
    rs.movenext
	readed=readed+1
	loop
%>
   </table>
     <div id="fanye">
     <p align="center"><a href="<%= vari %>&page=<%=cstr(1)%>">首页</a>---<a href="<%= vari %>&page=<%=cstr(cur_page+1)%>">下一页</a>--<a href="<%= vari %>&page=<%=cstr(cur_page-1)%>">上一页</a>---<a href="<%= vari %>&page=<%=cstr(rs.pagecount)%>">末页</a>---总共<strong><%=rs.pagecount%></strong> 页---页次<%= cstr(cur_page) %>/<%= cstr(rs.pagecount) %>--记录数(<%= m %>)</p>
   </div>	
   <% rs.close 
	set rs=nothing %>
	<!--第一个表完--> 
	    <%
	        set rs=Server.CreateObject("ADODB.RecordSet")
			sql="select * from tmoney where room_id='"&fang&jian&"' order by rdate desc"
            rs.open sql,conn,1,1
			dim m0,readed0,cur_page0,vari
            m0=rs.recordcount
            readed0=1
            rs.pagesize=10 
        %>
<%
      if not IsEmpty(Request.QueryString("page0")) then 
          cur_page0=Cint(Request.QueryString("page0"))
	      if cur_page0<1 then cur_page0=1 end if
	      if cur_page0>rs.pagecount then cur_page0=rs.pagecount  end if
	  else
	      cur_page0=1
	  end if
	  if not rs.eof then
	     rs.AbsolutePage=cur_page0
	  else 
	     cur_page0=1
	  end if 
%>
			  <h5>用户交费清单</h5>
		  <table class="browser">
	   <tr>
	     <th width="120" class="b1">房间号</th>
		 <th>交费人名</th>
		 <th>交费时间</th>
		 <th class="b2">交费金额/元</th>
	   </tr>
<% 
    do while (readed0<=rs.pagesize) and (not rs.eof)  
%>
	   <tr>
	     <td class="b1"><%= rs(1) %></td>
		 <td><%= rs(2) %></td>
		 <td><%= rs(3) %></td>
		 <td class="b2"><%= rs(4) %></td>
	   </tr>
<%
    rs.movenext
	readed=readed+1
	loop
%>
   </table>
   <div id="fanye">
     <p align="center"><a href="<%= vari %>&page0=<%=cstr(1)%>">首页</a>---<a href="<%= vari %>&page0=<%=cstr(cur_page0+1)%>">下一页</a>--<a href="<%= vari %>&page0=<%=cstr(cur_page0-1)%>">上一页</a>---<a href="<%= vari %>&page0=<%=cstr(rs.pagecount)%>">末页</a>---总共<strong><%=rs.pagecount%></strong> 页---页次<%= cstr(cur_page0) %>/<%= cstr(rs.pagecount) %>--记录数(<%= m0 %>)</p>
   </div>
	<% rs.close
	   set rs=nothing %>
	   <!--第二个表格完-->
 <% 
     end if
	 end if
 %>
	  </div>
    </div>
    <div id="rbody">
      <% call rightnav() %>
    </div>
</div>
<!--#include file="sub/cbottom.asp"-->
</body>
</html>

⌨️ 快捷键说明

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