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

📄 sfxm.asp

📁 基于ASP的SQL小区物业管理系统课程设计
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="sub/conn.asp"-->
<!--#include file="sub/rightnav.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" />
<script language="javascript">
function checkForm(){
re = /^\d+\.?\d*$/
if(!re.test(document.abc.asd.value)){
alert('请填写交纳的金额--只能为数字!');
return false;
}
    var isok=true;
	isok=confirm("交费成功,返回搜索页面。")
	return isok;
}
</script>
</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="sfxm.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,reset
			fang=Request.Form("s1")
			jian=Trim(Request.Form("keyword"))
			butt=Request.Form("B1")
			if butt="立即提交" then
		    set rs=Server.CreateObject("ADODB.RecordSet")
			sql="select * from room where room_id='"&fang&jian&"'"
            rs.open sql,conn,1,1
			if rs.recordcount=0 then
			Response.Write("</br>")
			Response.Write("对不起,该房间不存在!!!")
			else
			    set rs0=Server.CreateObject("ADODB.RecordSet")   '查找余额
				sql="select rest from money where odate=(select max(odate) from money where room_id='"&fang&jian&"')"             '查找上月的余额
				rs0.open sql,conn,1,1
				  if rs0.recordcount=0 then     '判断是否存在余额
				  reset=0
				  else
				  reset=rs0(0)
				  end if
				rs0.close
				set rs0=nothing
		 %>
		<div class="mid">
	   <form id="abc" name="abc" method="post" action="sfxm_do.asp" onSubmit="return checkForm();">
	   <ol>
	     <li class="sffont">欢迎进入交费</li>
	     <li>房间号:<input name="room_id" type="text" id="room_id" value="<%= fang&jian %>" size="15" />
	     </li>
		 <% 
		     if reset<0 then
			 reset="欠费"&abs(reset)
			 end if
		 %>
		 <li>当前余额:<input name="rest" type="text" id="money" value="<%= reset %>元" size="15" />
		 <li>缴费金额:<input name="asd" type="text" id="asd" size="15" />
		 </li>
		 <li>缴费人员:<input name="name" type="text" id="name" value="户主:<%= rs("owner") %>" size="15" />
		 </li>
		 <li><input name="B2" type="submit" value=" 提交 " /></li>
	   </ol>
	    </form>
	   </div>
		   <% 
			 end if
			 rs.close
			 set rs=nothing
			 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 + -