| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 490 人关注过本帖
标题:关于asp程序的问题
只看楼主 加入收藏
caoheike
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2013-11-13
结帖率:0
收藏
已结贴  问题点数:20 回复次数:1 
关于asp程序的问题

提交订单的时候用户输入错误卡密没有错误提示信息。

<!--#include file="../inc/conn.asp"-->
<%
num=request("orderid")
stat2=Lcase(request("stat"))
if num="" then
    num=session("num")
end if
if stat2="" then
    stat2=Lcase(session("stat"))
end if

arr_num=split(num,"|")
arr_sta=split(stat2,"|")
if isarray(arr_num) then
    max=Ubound(arr_num)
else
    max=0
end if        
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=sitename%>_自动充值系统</title>
<style type="text/css">
  *{margin:0;padding:0px; font-family:Arial, Helvetica, sans-serif;font-size:12px;}
  #main{width:880px;margin:auto;border:1px solid #CCC;padding:10px;}
  .bottom_line{border-bottom:1px solid #ccc;}
  .top_space{margin-top:10px;}
  .box_title{width:80px;padding:5px;background:#FFC;border:1px solid #F60;}
  legend{font-size:14px;color:#FF4400;font-weight:bold;}
  fieldset{padding:5px; border:#FF9873 solid 1px;font-size:14px;}
  .font_14{color:#999;font-size:14px;}
  .bgstyle{height:28px;border:1px solid #CABBA7;font-size:14px;font-weight:bold;line-height:28px;padding-left:10px;color:#6B573D}
  #GoodPrice{font-size:16px;color:red;font-weight:bold;}
  #shs{padding:3px;border:1px solid #0063DC;background:#EDF7FE}
.td1 {    border-bottom:1px #DCE3EE solid;}
</style>
</head>

<body>
<div id="main">
<table width="100%" class="bottom_line" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="images/fa.gif" width="162" height="34" align="absmiddle" /></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="top_space">
  <tr>
    <td width="68%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>
          <div class="bgstyle">订单支付结果:</div></td>
        </tr>
      </table>
      <table width="100%" border="0" cellpadding="10" cellspacing="0" class="top_space">
        <tr>
          <td height="30"><div align="center">如果支付卡信息提交错误,请
            <input type="button" onclick="javascript:window.history.back();" name="Submit" value="返回" />
            重新提交 </div></td>
        </tr>
        <tr>
          <td><table width="100%" height="48" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#BDDDF2">
            <tr>
              <td height="20" bgcolor="#E2F0FA"><div align="center" class="STYLE3" style="font-weight: bold">日期</div></td>
              <td height="25" bgcolor="#E2F0FA"><div align="center" class="STYLE3" style="font-weight: bold">商品名称</div></td>
              <td bgcolor="#E2F0FA"><div align="center" class="STYLE3" style="font-weight: bold">系统处理</div></td>
              <td bgcolor="#E2F0FA"><div align="center" class="STYLE3" style="font-weight: bold">
                <div align="center">金额</div>
              </div></td>
              <td bgcolor="#E2F0FA"><div align="center" class="STYLE3" style="font-weight: bold">
                <div align="center">联系方式</div>
              </div></td>
              <td bgcolor="#E2F0FA"><div align="center" class="STYLE3" style="font-weight: bold">
                <div align="center">订单号</div>
              </div></td>
              <td bgcolor="#E2F0FA"><div align="center" class="STYLE3" style="font-weight: bold">
                <div align="center">卡号</div>
              </div></td>
              <td bgcolor="#E2F0FA"><div align="center" class="STYLE3" style="font-weight: bold">密码</div></td>
            </tr>
            <%
for i=0 to max
   if max=0 then
      num=num
      stat2=stat2
   else      
      num=arr_num(i)
      stat2=arr_sta(i)
    end if

numR=split(num,"-")
if ubound(numR)>0 then
    num=numR(0)
end if


   
    if stat2="success" or stat2="0" then stat2="ok"
   
    Call ConnectionDatabase()
    Set Res=GrateRs("Select * ,(select goodname from Card_catelist where id=wooolid) as wooolname From [mobile1] Where num='"&YeSqlStr(num,0)&"-"&i&"'",1)
   
    if res.eof or res.bof then
       result="卡信息有错误,请检查重新输入!"
       stat=2
    else
       m=res("time")
       price=res("price")
       qq=res("qq")
       mobile=res("usercode")
       codepassword=res("usercode2")
       wooolname=res("wooolname")
   
    if stat2<>"" and stat2="ok" then
       stat=res("stat")
       if stat=1 then result="<font color=green><a href=AutoSendGoods.asp?OrderID="&num&"-"&i&" target=_blank>领取商品</a></font>"   
       if stat=2 then result="<font color=red>卡信息有错误!</font>"
       if stat=3 then result="<font color=red>失败,签名错误!</font>"
    else
       result="<font color=red>"&stat2&"</font>"
       stat=2
    end if   
    end if
       res.close
   set res=nothing
%>
            <tr>
              <td bgcolor="#FFFFFF"><div align="center"><%=m%></div></td>
              <td height="30" bgcolor="#FFFFFF"><div align="center"><%=wooolname%></div></td>
              <%if stat<>0 then%>
              <td bgcolor="#FFFFFF"><div align="center"><%=result%></div></td>
              <%else%>
              <td bgcolor="#FFFFFF"><div align="center">
                <iframe src="result2.asp?num=<%=num%>-<%=i%>" style="text-align:center;" scrolling="No" frameborder="0" height="20" width="100"></iframe>
              </div></td>
              <%end if%>
              <td bgcolor="#FFFFFF"><div align="center"><%=price%></div></td>
              <td bgcolor="#FFFFFF"><div align="center"><%=qq%></div></td>
              <td bgcolor="#FFFFFF"><div align="center"><%=num%></div></td>
              <td bgcolor="#FFFFFF"><div align="center"><%=mobile%></div></td>
              <td bgcolor="#FFFFFF"><div align="center"><%=codepassword%></div></td>
            </tr>
            <%next%>
          </table>
            <table width="90%" height="41" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td>系统处理栏下面会显示: <strong>处理中 成功 失败&nbsp; 3种情况中的一种</strong>。 只有显示成功才说明交易成功。</td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="100%" style="margin-top:15px;border-top:1px solid #CCC" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td style="height:50px;font-size:12px;text-align:center;color:#999;">&copy; 2008-2015 <%=sitename%></td>
  </tr>
</table>
</div>
</body>
</html>
搜索更多相关主题的帖子: request include 提示信息 asp程序 PUBLIC 
2013-11-14 00:07
飞年合
Rank: 2
等 级:论坛游民
帖 子:21
专家分:50
注 册:2013-7-29
收藏
得分:20 
新人路过,求认识大神~~~~~
2013-11-18 20:02
快速回复:关于asp程序的问题
数据加载中...
 
   



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

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