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

📄 snsn.asp

📁 网络商店源码 实现商品浏览 购物车 后台管理等
💻 ASP
📖 第 1 页 / 共 4 页
字号:

<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<html>
<script language="JavaScript">
<!--
function IsDigit()
{
  return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}

function ssxx()
{
   if(checkspace(document.shouhuoxx.userzhenshiname.value)) {
	document.shouhuoxx.userzhenshiname.focus();
    alert("对不起,请填写收货人姓名!");
	return false;
  }
  if(checkspace(document.shouhuoxx.shouhuodizhi.value)) {
	document.shouhuoxx.shouhuodizhi.focus();
    alert("对不起,请填写收货人详细收货地址!");
	return false;
  }
  if(checkspace(document.shouhuoxx.youbian.value)) {
	document.shouhuoxx.youbian.focus();
    alert("对不起,请填写邮编!");
	return false;
  }
  if(document.shouhuoxx.youbian.value.length!=6) {
	document.shouhuoxx.youbian.focus();
    alert("对不起,请正确填写邮编!");
	return false;
  } 
    if(checkspace(document.shouhuoxx.usertel.value)) {
	document.shouhuoxx.usertel.focus();
    alert("对不起,请留下您的电话!");
	return false;
  }
  if(document.shouhuoxx.useremail.value.length!=0)
  {
    if (document.shouhuoxx.useremail.value.charAt(0)=="." ||        
         document.shouhuoxx.useremail.value.charAt(0)=="@"||       
         document.shouhuoxx.useremail.value.indexOf('@', 0) == -1 || 
         document.shouhuoxx.useremail.value.indexOf('.', 0) == -1 || 
         document.shouhuoxx.useremail.value.lastIndexOf("@")==document.shouhuoxx.useremail.value.length-1 || 
         document.shouhuoxx.useremail.value.lastIndexOf(".")==document.shouhuoxx.useremail.value.length-1)
     {
      alert("Email地址格式不正确!");
      document.shouhuoxx.useremail.focus();
      return false;
      }
   }
 else
  {
   alert("Email不能为空!");
   document.shouhuoxx.useremail.focus();
   return false;
   }
   
}
//-->
</script>
<head>
<title><%=webname%>--我要下订单</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status='【<%=webname%>】<%=weburl%> 如果您喜欢本站,别忘了把本站介绍给您的好友哦!:)';return true">
<!--#include file="webtop.asp"-->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="1" bgcolor="C9C9C8"><img src="../images/block.gif" width="1" height="1"></td>
    <td> <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="100" valign="top"> <img src="images/block.gif" width="1" height="1"> 
            <br> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1">
              <tr> 
                <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
              </tr>
              <tr> 
                <td height="25" bgcolor="efefef"><strong>&nbsp;&nbsp;<img src="images/dot_03.gif" width="9" height="9" border="0"> 
                  </strong><b>我要下订单</b></td>
              </tr>
              <tr> 
                <td height="1" bgcolor="cccccc"><img src="images/dot_03.gif" width="9" height="1" border="0"></td>
              </tr>
            </table>
            <%dim shopid,action,i
action=request("action")
set rs=server.CreateObject("adodb.recordset")
rs.open "select count(*) as rec_count from shop_action where username='"&session("tmp_usersessionid")&"' and zhuangtai=7",conn,1,1
if rs("rec_count")=0 then
response.write "<script language=javascript>alert('对不起,您购物车没有商品,请在购物后,再去“结算中心”!');window.history.go(-1);</script>"
response.End
end if
rs.close
set rs=nothing
select case action
'//////////////////////////////////
case ""
set rs=server.CreateObject("adodb.recordset")
rs.open "select shop_action.actionid,shop_action.shopid,shop_action.shopcount,shop_action.zonger,shop_snsn.shopname,shop_snsn.shichangjia,shop_snsn.huiyuanjia,shop_snsn.vipjia from shop_snsn inner join  shop_action on shop_snsn.shopid=shop_action.shopid where shop_action.username='"&session("tmp_usersessionid")&"' and shop_action.zhuangtai=7",conn,1,1 
%>
            <table width=96% border=0 align=center cellpadding=0 cellspacing=1 bgcolor="#CCCCCC" class="table-zuoshang">
              <form name='form1' method='post' action=snsn.asp?action=txxx>
                <tr class="a1"> 
                  <td width=21% height="25" bgcolor="f1f1f1"  > <div align=center><strong>商品名称</strong></div></td>
                  <td width=21% height="25" bgcolor="f1f1f1"  > <div align=center><strong>市场价</strong></div></td>
                  <td width=21% height="25" bgcolor="f1f1f1"  > <div align=center><strong>批发价</strong></div></td>
                  <td width=14% height="25" bgcolor="f1f1f1"  > <div align=center><strong>单价</strong></div></td>
                  <td width=14% height="25" bgcolor="f1f1f1"  > <div align=center><strong>数量</strong></div></td>
                  <td width=14% height="25" bgcolor="f1f1f1"  > <div align=center><strong>总价</strong></div></td>
                </tr>
                <%shuliang=rs.recordcount
jianshu=0
zongji=0
do while not rs.eof%>
                <tr> 
                  <td height="25" bgcolor="#FFFFFF"   style='PADDING-LEFT: 5px'> 
                    <div align=left><%=rs("shopname")%> 
                      <input name=shopid type=hidden value="<%=rs("shopid")%>" >
                      <input name=actionid type=hidden value="<%=rs("actionid")%>" >
                    </div></td>
                  <td height="25" align="center" bgcolor="#FFFFFF"  ><%=rs("shichangjia")%></td>
                  <td height="25" align="center" bgcolor="#FFFFFF"  ><%=rs("vipjia")%></td>
                  <td height="25" bgcolor="#FFFFFF"  > <div align=center><%=rs("shichangjia")%> 
                      元</div></td>
                  <td height="25" bgcolor="#FFFFFF"  > <div align=center> <%=rs("shopcount")%> 
                    </div></td>
                  <td height="25" bgcolor="#FFFFFF"  > <div align=center><%=rs("zonger")%>元</div></td>
                </tr>
                <%
jianshu=jianshu+rs("shopcount")
zongji=zongji+rs("zonger")
rs.movenext
loop
rs.close
set rs=nothing%>
                <tr> 
                  <td height=36 colspan=7 bgcolor="#FFFFFF"  > <div align=center> 
                      <input name="Submit2" type="button" class="go-wenbenkuang" value="修改购物车" onClick="javascript:window.history.go(-1)">
                      <input type="submit" name="Submit32" class="go-wenbenkuang" value="下一步">
                    </div></td>
                </tr>
                <tr> 
                  <td height=36 colspan=7 bgcolor="#FFFFFF"  > <div align=center> 
                      您的购物车里有商品:<%=shuliang%>件 总数量:<%=jianshu%>件 共计:<%=zongji%>元 您有预存款:<%=request.cookies("snsn")("yucun")%>元 
                      <%if (jianshu>=cint(pifa_s)) or (zongji>=cint(pifa_e)) then%>
                      <br>
                      <font color=red>您所购商品已经达到享有批发价的标准,结算时,将按批发价计算!</font> 
                      <%end if%>
                    </div></td>
                </tr>
                <%set snsn=server.CreateObject("adodb.recordset")
	snsn.open "select * from shop_action_jp where username='"&request.cookies("snsn")("username")&"' and zhuangtai=7",conn,1,1
	if snsn.recordcount>0 then%>
                <tr> 
                  <td colspan=5 bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td><IMG height=5 src="images/block.gif" width=1></td>
                      </tr>
                    </table>
                    <table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
                      <tr bgcolor="#FFFFFF"> 
                        <td height="23" colspan="2"  ><b>您已选择的奖品清单</b></td>
                      </tr>
                      <tr align="center" bgcolor="f1f1f1" class="a1"> 
                        <td height="23"  >奖品名称</td>
                        <td height="23"  >使用积分</td>
                      </tr>
                      <%
	while not snsn.eof%>
                      <tr bgcolor="#FFFFFF"> 
                        <td  > 
                          <%
	set snsn1=server.CreateObject("adodb.recordset")
	snsn1.open "select * from shop_jiangpin where shopid="&snsn("shopid"),conn,1,1
	if snsn1.recordcount=1 then
	response.write "<font color=blue>"&snsn1("shopname")&"</font>"
	end if
	snsn1.close
	set snsn1=nothing%>
                        </td>
                        <td align="center"  ><%=snsn("jifen")%></td>
                      </tr>
                      <%
	snsn.movenext
	wend%>
                    </table>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td><IMG height=5 src="images/block.gif" width=1></td>
                      </tr>
                    </table></td>
                </tr>
                <%end if
snsn.close
set snsn=nothing%>
              </form>
            </table>
            <br> 
            <%
'/////////////////////////////////////////
case "txxx"
%>
            <table width="96%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" class="table-zuoshang">
              <tr> 
                <td> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td rowspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
                          <tr> 
                            <td class="12v" > <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                                <tr> 
                                  <td> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                      <tr bgcolor="f1f1f1"  class="a1"> 
                                        <td height="40" colspan="2" align="center"   style='PADDING-LEFT: 20px'><b>请正确填写以下收货信息</b></td>
                                      </tr>
                                      <form name="shouhuoxx" method="post" action="snsn.asp?action=txxx2" onSubmit="ssxx">
                                        <tr bgcolor="#FFFFFF"> 
                                          <td width="199"  ><b>&nbsp;&nbsp;收货人姓名:</b></td>
                                          <td width="771" height="28"  > &nbsp;&nbsp; 
                                            <input name=userid type=hidden value="" > 
                                            <b> 
                                            <input name="userzhenshiname" type="text" class="wenbenkuang" id="userzhenshiname" value=>
                                              性 别: 
                                            <select name="shousex" id="select" class="wenbenkuang">
                                              <option value=1 selected>男</option>
                                              <option value=2 >女</option>
                                              <option value=0>保密</option>
                                            </select>
                                            </b></td>
                                        </tr>
                                        <tr bgcolor="#FFFFFF"> 
                                          <td width="199"  ><b>&nbsp;&nbsp;详细地址:</b></td>
                                          <td width="771" height="28"  > <b> &nbsp;&nbsp; 
                                            <input name="shouhuodizhi" type="text" class="wenbenkuang" id="shouhuodizhi"  value="" size="40">
                                            </b></td>
                                        </tr>
                                        <tr bgcolor="#FFFFFF"> 
                                          <td width="199"  ><b>&nbsp;&nbsp;邮编:</b></td>
                                          <td width="771" height="28"  > <p><b> 
                                              &nbsp;&nbsp; 
                                              <input name="youbian" type="text" class="wenbenkuang" id="youbian" size="10" value="" onKeyPress="event.returnValue=IsDigit();">
                                              (我们将按邮政编码划分送货区域,请您正确填写!)</b></p></td>
                                        </tr>
                                        <tr bgcolor="#FFFFFF"> 
                                          <td width="199"  ><b>&nbsp;&nbsp;电话:</b></td>
                                          <td width="771" height="28"  > <b> &nbsp;&nbsp; 
                                            <input name="usertel" class="wenbenkuang"  type="text" id="usertel"value=>

⌨️ 快捷键说明

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