| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 890 人关注过本帖
标题:关于下拉框选择和缴费提醒功能不能两用的问题,ASP老手请进
只看楼主 加入收藏
天蝎风
Rank: 1
来 自:广西
等 级:新手上路
帖 子:64
专家分:5
注 册:2010-11-7
结帖率:100%
收藏
已结贴  问题点数:15 回复次数:14 
关于下拉框选择和缴费提醒功能不能两用的问题,ASP老手请进
这是一个业主交费提醒页面,首先贴出页面代码:
程序代码:
<%if request.Cookies("shiwei_username")="" then%>
<script language="javascript">top.location.href="../index.asp"</script>
<% 
  response.end
end if
%>
<!-- #include file="../conn2.asp" -->
<!-- #include file="../const.asp" -->

<html>
<head>
<title><%=gongsi%>-水费缴费提醒</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/style.css" rel="stylesheet" type="text/css">
<style>body {background-color:#FFFFFF;}</style>
<script>
function CheckAll(form) {
  for (var i=0;i<form.elements.length;i++) {
    var e = form.elements[i];
    if (e.name != 'chkall') e.checked = form.chkall.checked;
  }
}
</script>
</HEAD>

<BODY>
<%if fla40="0" and request.Cookies("shiwei_id")<>"1" then%>
<br><center><img src="../images/note.gif" align="absmiddle">&nbsp;<font color="#FF0000">你不具备此权限,请与管理员联系!</font></center>
<% 
  response.end
end if

%>
<%
if request("hid")="ok" then
  conn.execute("update yezhu set wenhou=#"&date()&"# where id="&request("id"))
end if
'取得搜索关键字
nowkeyword=request("keyword")
nowxiaoqu=request("xiaoqu")
%>
<table width="100%" border="0" cellpadding="0" cellspacing="2" align="center">
  <form name="form2">
    <tr><td width="1%" height="30"></td>
      <td width="99%" align="left">
        <%
    sql="select * from xiaoqu order by id"
    set rs_xiaoqu=conn.execute(sql)
    %>
    &nbsp;请选择小区:
    <select name="xiaoqu" onChange="form2.submit()">
        <option value="">所有小区</option>
        <%do while rs_xiaoqu.eof=false%>
        <option value="<%=rs_xiaoqu("id")%>"<%if trim(cstr(rs_xiaoqu("id")))=nowxiaoqu then%>selected="selected"<%end if%>><%=rs_xiaoqu("xiaoqu")%></option>
        <%
    rs_xiaoqu.movenext
    loop
    %>
        </select>
        <%
    sql="select * from yezhu order by id"
    set rs=conn.execute(sql)
    %>
     </td>
    </tr></form></table>
  <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
<tr><td><img src="../images/r_1.gif" alt="" /></td>
  <td width="100%" background="../images/r_0.gif">
    <table cellpadding="0" cellspacing="0" width="100%">
      <tr><td>&nbsp;查看/取消提醒</td>
        </tr>
      </table>
    </td>
  <td><img src="../images/r_2.gif" alt="" /></td>
</tr>
  <tr>
    <td></td>
      <td>
        <form name="form1" >
      <table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
    <tr align="center"><td height="30" class="category">所在小区</td>
  <td class="category">楼宇单元</td>
<td class="category">房号</td>
  <td class="category">业主姓名</td>
    <td class="category">联系电话</td>
      <td class="category">到期时间</td>
    <%if fla41="1" or request.Cookies("shiwei_id")="1" then%><td width="8%" class="category">前台</td><%end if%>
  <%if fla42="1" or request.Cookies("shiwei_id")="1" then%><td width="5%" class="category">操作</td><%end if%>
</tr>
  <%

  sql="select * from yezhu where ((month(shui)>="&month(date())&" and month(shui)<="&month(date()+5)&") and (day(shui)>="&day(date())&" and day(shui)<="&day  (date()+5)&") and year(wenhou)<>"&year(date())&")"
  if nowxiaoqu="" then
    sql="select * from yezhu order by xiaoqu,id"
  else
    sql="select * from yezhu where xiaoqu="&nowxiaoqu&" order by id"
  end if
  set rs=conn.execute(sql)
  do while rs.eof=false
  %>
  <tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''" onDblClick="javascript:var win=window.open('../yezhu/yezhu_show.asp?id=<%=rs("id")%>','业主详细信息','width=853,height=470,top=176,left=161,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=yes'); win.focus()">
    <td align="center" height="25"><%set rs_xiaoqu=conn.execute("select * from xiaoqu where id="&rs("xiaoqu"))%><%if rs_xiaoqu.eof then%>&nbsp;<%else%><%=rs_xiaoqu("xiaoqu")%><%end if%></td>
    <td align="center"><%set rs_louyu=conn.execute("select * from louyu where id="&rs("louyu"))%><%if rs_louyu.eof then%>&nbsp;<%else%><%=rs_louyu("louyu")%><%end if%></td>
<td align="center"><%=rs("fanghao")%></td>
  <td align="center"><%=rs("username")%></td>
    <td align="center"><%=rs("tel")%></td>
      <td align="center">
        <%if rs("shui")-date()<0 then%>
      <font color="#ff0000"><b><%=rs("shui")%>已经到期</b></font>
        <%elseif rs("shui")-date()<5 then%>
          <font color="#009900"><b><%=rs("shui")%>就快到期</b></font>
            <%else%><%=rs("shui")%><%end if%></td>
      <%if fla41="1" or request.Cookies("shiwei_id")="1" then%>
    <td align="center"><input type=button value='现在收费' onClick=window.open("/1/produit/produit_sell.asp") class="button"></td><%end if%>
  <%if fla42="1" or request.Cookies("shiwei_id")="1" then%>
<td align="center"><input type=button value='已经缴费,取消提醒' onclick=window.location.href='?hid=ok&id=<%=rs("id")%>' class="button"></td><%end if%>
  </tr>
  <%
  nowbaojing1=nowbaojing1&"ok"
  rs.movenext
  loop
  %>
  <tr><td colspan="8" height="30" class="category">
     <table cellpadding=0 cellspacing=0 width="100%">
      <tr><td align="left" style="color:#FF0000;">双击每行可查看业主详细资料</td> 
    <%if nowbaojing1="" then%><td align=right onMouseOver="this.className='highlight'" onMouseOut="this.className=''"  style="color:#ff0000">目前没有缴费提醒</td><%end if%>
</tr></table></td></tr> 
</table></form></td>
<td></td></tr>
<tr><td><img src="../images/r_4.gif" alt="" /></td>
<td></td>
<td><img src="../images/r_3.gif" alt="" /></td>
</tr>
</table></body></html>
搜索更多相关主题的帖子: 老手 ASP 缴费 选择 
2010-11-25 14:18
gupiao175
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:40
帖 子:1787
专家分:7527
注 册:2007-6-27
收藏
得分:0 
时间太晚了。明天帮你看看!

Q:1428196631,百度:开发地 即可找到我,有事请留言!
2010-11-26 00:51
jansonwang
Rank: 3Rank: 3
等 级:论坛游侠
威 望:1
帖 子:60
专家分:147
注 册:2010-11-25
收藏
得分:0 
先仔细看看吧 学习中

[ 本帖最后由 jansonwang 于 2010-11-26 09:01 编辑 ]
2010-11-26 08:58
jansonwang
Rank: 3Rank: 3
等 级:论坛游侠
威 望:1
帖 子:60
专家分:147
注 册:2010-11-25
收藏
得分:0 
1、        <%
    sql="select * from yezhu order by id"
    set rs=conn.execute(sql)
    %>
这段干什么用噢?
2、请LZ问题再描述清楚一点。
3、LZ这代码是从某进销存源码拿来的吧?呵呵。要吃透人家的思路才能更好地为我所用吧。我看你的代码时乱糟糟。
2010-11-26 09:06
天蝎风
Rank: 1
来 自:广西
等 级:新手上路
帖 子:64
专家分:5
注 册:2010-11-7
收藏
得分:0 
这段代码已经没用了,忘记去掉。
我先把页面效果图发给出来,如果太小的话请点击图片查看大图。
图片附件: 游客没有浏览图片的权限,请 登录注册

楼上说的没错,这个是拿进销存软件来改的,以上图片是一个业主缴费提醒页面。

[ 本帖最后由 天蝎风 于 2010-11-26 10:28 编辑 ]

南宁信息网http://www.
2010-11-26 10:26
天蝎风
Rank: 1
来 自:广西
等 级:新手上路
帖 子:64
专家分:5
注 册:2010-11-7
收藏
得分:0 
现在问题是下拉框选择小区可以用,但是提醒功能不可用,并没有只显示准备到期的或已经到期的业主,而是显示全部,右边的取消提醒也失效。如果把SQL语句调换一下位置,反过来提醒能用,下拉框选择又失效:
程序代码:
  <%
  sql="select * from yezhu where ((month(shui)>="&month(date())&" and month(shui)<="&month(date()+5)&") and (day(shui)>="&day(date())&" and day(shui)<="&day  (date()+5)&") and year(wenhou)<>"&year(date())&")"
  if nowxiaoqu="" then
    sql="select * from yezhu order by xiaoqu,id"
  else
    sql="select * from yezhu where xiaoqu="&nowxiaoqu&" order by id"
  end if
  set rs=conn.execute(sql)
  do while rs.eof=false
  %>

 

南宁信息网http://www.
2010-11-26 10:33
jansonwang
Rank: 3Rank: 3
等 级:论坛游侠
威 望:1
帖 子:60
专家分:147
注 册:2010-11-25
收藏
得分:0 
哎呀哥们,终于看清你是什么意思了,呵呵!
看我写的对不对噢
 <%
  sql="select * from yezhu where ((month(shui)>="&month(date())&" and month(shui)<="&month(date()+5)&") and (day(shui)>="&day(date())&" and day(shui)<="&day  (date()+5)&") and year(wenhou)<>"&year(date())&")"
  if nowxiaoqu="" then
    sql=sql&" order by id"
  else
    sql=sql&" and xiaoqu="&nowxiaoqu&" order by id"
  end if
  set rs=conn.execute(sql)
  do while rs.eof=false
  %>

 
2010-11-26 10:45
天蝎风
Rank: 1
来 自:广西
等 级:新手上路
帖 子:64
专家分:5
注 册:2010-11-7
收藏
得分:0 
图片附件: 游客没有浏览图片的权限,请 登录注册
不显示到期提醒的业主了

南宁信息网http://www.
2010-11-26 10:51
jansonwang
Rank: 3Rank: 3
等 级:论坛游侠
威 望:1
帖 子:60
专家分:147
注 册:2010-11-25
收藏
得分:0 
response.write sql
看一下打印出来的sql信息,然后粘到数据库查询器中执行一下,有记录没?
2010-11-26 10:54
jansonwang
Rank: 3Rank: 3
等 级:论坛游侠
威 望:1
帖 子:60
专家分:147
注 册:2010-11-25
收藏
得分:0 
要么是sql语句条件错了,要么是数据库中无满足条件的记录。
2010-11-26 10:56
快速回复:关于下拉框选择和缴费提醒功能不能两用的问题,ASP老手请进
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.024888 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved