网站地图
范文同学网


自动化 模具 机械 电子 通信 动画 英语范文 工程管理 金融范文 旅游管理 工业工程 生物工程 给排水范文 西门子PLC 历史学 三菱PLC
单片机 财务 会计 法律 行政 物理 物流范文 电子商务 制药工程 包装工程 土木工程 材料科学 汉语言范文 欧姆龙PLC 电压表 松下PLC
计算机 化工 数电 工商 食品 德语 国贸范文 人力资源 教育管理 交通工程 市场营销 印刷工程 机电一体化 数控范文 变电站 文化产业

  • 网站首页|
  • 文档范文|
  • 人工降重|
  • 职称文章发表|
  • 合作期刊|
  • 范文下载|
  • 计算机范文|
  • 外文翻译|
  • 免费范文|
  • 原创范文|
  • 开题报告

联系方式

当前位置:范文同学网 -> 免费范文 -> 计算机范文 -> ASP在线花店系统(三)
计算机文章范文| ASP设计| Delphi| VB设计| JSP设计| ASP.NET| VB.NET| java设计| VC| pb| VS| dreamweaver| c#.net| vf| VC++| 计算机文档范文| 范文下载| 自动化范文
·电气自动化原创文章范文 ·学前教育专业原创文章范文 ·国际经济贸易原创文章范文 ·药学专业原创文章范文 ·英语专业原创文章范文 ·公共事业管理原创文章范文
·金融专业原创文章范文 ·广播电视编导原创文章范文 ·电子商务专业原创文章范文 ·法律专业原创文章范文 ·工商管理原创文章范文 ·汉语言文学原创文章范文
·人力资源管理原创文章范文 ·摄影专业原创文章范文 ·心理学专业原创文章范文 ·教育管理原创文章范文 ·市场营销原创文章范文 ·计算机专业原创文章范文
·物流管理专业原创文章范文 ·小学教育专业原创文章范文 ·行政管理专业原创文章范文 ·土木工程管理原创文章范文 ·财务会计专业原创文章范文 ·信息管理信息系统原创范文
·新闻学专业原创文章范文 ·眼视光技术原创文章范文 ·播音与主持原创文章范文 ·广告学专业原创文章范文 ·表演专业原创文章范文 ·动画专业原创文章范文
·视觉传达设计原创文章范文 ·数控技术专业原创文章范文 ·录音艺术原创文章范文 ·光机电应用技术原创范文 ·机电一体化原创文章范文 ·印刷技术专业原创文章范文
·动漫设计与制作原创范文 ·软件技术专业原创文章范文 ·书法学专业原创文章范文 ·应用电子技术原创文章范文 ·电子信息工程技术原创范文 ·机械专业原创文章范文
·酒店管理专业原创文章范文 ·旅游管理专业原创文章范文 ·文化产业管理专业原创范文 ·体育教育专业原创文章范文 ·通信工程专业原创文章范文 ·护理专业原创文章范文

原创文档范文 → 计算机专业原创文档范文 软件技术专业原创文档范文  现成文档范文 → 计算机文档范文

ASP在线花店系统(三)

本文ID:LW6118 ¥
end if dim strUrlGo strUrlGo="Detail.asp?id="&productid %> <!--#include file="inc/login.asp"--> <% dim MyListUse,MyListFlower,MyListObject,MyListPrice MyListUse="0" MyListFlower="0" MyListObject="0" MyListPrice="0" %> <!--#include file="inc/navigation.asp"--></..

  end if
  dim strUrlGo
  strUrlGo="Detail.asp?id="&productid
 %>
 <!--#include file="inc/login.asp"-->
 <%
     dim MyListUse,MyListFlower,MyListObject,MyListPrice
     MyListUse="0"
     MyListFlower="0"
     MyListObject="0"
     MyListPrice="0"
 %>   
     <!--#include file="inc/navigation.asp"--></td>
     <td width="10">&nbsp;</td>
     <td valign="top">
  <!--#include file="inc/DetailOne.asp"-->    
  <br>
  <!--#include file="inc/CommentOne.asp"-->    
     </td>
   </tr>
 </table>
 <!--#include file="inc/bottom.html"-->
 </body>
 </html>
                                                                                
 例程3-10中利用包含文件<!--#include file="Detailone.asp"-->来显示单个产品的纤细信息;利用包含<!--#include file="commondb.asp"-->来显示针对该产品的所有评论信息。在页面中Detailone.asp先调用Getproduct方法得到产品对象,如例程3-11所示/
                        
                           例程3-11  调用Getproduct方法得到产品对象
                                                                                 
 〈%
      Dim one
      One=Getproduct (productid)
    If one(FIELDAYTOID)<0 Then
         Response.write”该商品不存在!”
         Response.end
       Else
 %>

                                                                         
 在例程3-11得到产品对象后,然后调用类似one(DIELDNAME)方法便可以得到产品名称等属性然后结合HTML控制便可以得到图3-10所示的效果。
 主页面主要包含头、尾文件。经过处理得到产品ID,如果没有就跳转到系统首页。
 Commentone.asp页面主要显示用户针对该产品的所有评论,例程3-12为Commentone.asp页面实现的参考代码。
  
                     例程3-12  Commentone.asp页面实现的参考代码
                                                                             
 <%
   dim dbc,rs,query
   shopopendatabase dbc
     query =  "select TOP 10 * from comment where  productid = " & productid & " order by lasttime desc"
     set rs = dbc.execute(query)
     dim content,ptime,pren,preply
     dim n
     n=0
     Do WHILE not rs.EOF and n<10
  content= rs("comment")
  ptime = rs("lasttime")
  pren = rs("nickname")
  preply = rs("reply")
  n=n+1
 %>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="text6">
  <tr>
  <td style="padding-left:20px;padding-right:5px">
  &nbsp;&nbsp;<%=content%>
          </td>
          <td width="60"> <%=ptime%> </td>
          <td  width="45"> <%=pren%> </td>
  </tr>
 <%
  if (preply<>"") then 
 %>
  <tr>
     <td style="padding-left:20px;padding-right:5px">
     &nbsp;&nbsp;<font color=red>答复:</font><%=preply %>
     </td>
     <td width="60">
     </td>
     <td width="45">
     </td>
    </tr>
 <%
  end if
 %>
  <tr>
     <td colspan="3" background='images/topbg.gif' height=3></td>
    </tr>
  </table>
 <%
  rs.movenext      
     Loop
     closerecordset rs
     shopclosedatabase dbc
 %>
                                                                               
 
 例程3-12中的query =  "select TOP 10 * from comment where  productid = " & productid & " order by lasttime desc"语句,是从数据库comment表中得到相关产品的最后增加的前10条评论(按时间倒顺序排列,然后取前10条)。
 
3.5.3我的购物车页面设计

我的购物车页面主要暂存用户选择的预购买的产品,图3-21为购物车页面。
.
                         图3-21  购物车页面
Cart.asp购物车页面代码如例程3-13所示。

                        例程3-13  cart.asp购物车页面代码
                                                                            
<%
dim myaction
dim cartstr,cartnumstr
DimMyProductArray(20), MyNumArray(20),totalnum,MyProductArrayTmp,MyNumArrayTmp
cartstr = getCartFromCookie()
cartnumstr=getCartNumFromCookie()
 
if (cartstr=NULL or cartstr ="") then
cartstr =""
end if
if (cartnumstr=NULL or cartnumstr ="") then
cartnumstr =""
end if
MyProductArrayTmp = Split(cartstr, ",",-1,1)
MyNumArrayTmp = Split(cartnumstr, ",",-1,1)
'response.write "cartstr=" & cartstr &"<br>"
'response.write "cartnumstr=" & cartnumstr &"<br>"
'response.write "UBound(MyProductArrayTmp)=" &UBound(MyProductArrayTmp) &"<br>"
'response.write "LBound(MyProductArrayTmp)=" &LBound(MyProductArrayTmp) &"<br>"
'response.write "UBound(MyNumArrayTmp=" &UBound(MyNumArrayTmp) &"<br>"
'response.write "LBound(MyNumArrayTmp)=" &LBound(MyNumArrayTmp) &"<br>"

If(UBound(MyProductArrayTmp)<>UBound(MyNumArrayTmp)or LBound(MyProductArrayTmp)<>LBound(MyNumArrayTmp)) then
cartstr =""
cartnumstr =""
setCartToCookie cartstr,cartnumstr,0,0
 MyProductArrayTmp = Split(cartstr, ",",-1,1)
 MyNumArrayTmp = Split(cartnumstr, ",",-1,1)
end if
dim n
For n =LBound(MyProductArrayTmp) to  UBound(MyProductArrayTmp)
MyProductArray(n)=MyProductArrayTmp(n)
MyNumArray(n)=MyNumArrayTmp(n)
Next
totalnum=getCartTotalNumFromCookie()
if (totalnum=NULL or totalnum="") then
totalnum=0
end if
myaction=request("myaction")
dim productidif (myaction="add") then
productid=request("productid")
if (IsValid(productid)) then
if (cartstr=NULL or cartstr ="") then
 cartstr=productid
 cartnumstr=1
MyProductArray(0)=productid
 MyNumArray(0)=1
 totalnum=1
else
Dim i,IsExist
 IsExist="false"
For i = 0 to CInt(totalnum)-1
if (MyProductArray(i) =productid) then
 IsExist="true"
 exit for
 end if
if (IsExist="true") then
MyNumArray(i)=MyNumArray(i)+1    
 cartnumstr=""
For i = 0 to CInt(totalnum)-1
 if (cartnumstr="") then
cartnumstr=CStr(MyNumArray(0))
 else
cartnumstr=CStr(cartnumstr)+","+CStr(MyNumArray(i))
 end if 
 Next
else
cartstr=CStr(cartstr)+","+CStr(productid)
cartnumstr=cartnumstr+",1"
MyProductArray(totalnum)=productid
MyNumArray(totalnum)=1
totalnum=totalnum+1
end if 
end if
setCartToCookie cartstr,cartnumstr,totalnum,0
response.redirect("cart.asp")
response.end
else
 response.write "增加的产品id不合法!<br>" 
end if 
else
 if(myaction="del") then
productid=request("productid")
if (IsValid(productid)) then
 cartstr=""
cartnumstr=""
For i = 0 to CInt(totalnum)-1
 if (productid<>MyProductArray(i)) then
 if (cartnumstr="") then
cartstr=CStr(MyProductArray(i))
cartnumstr=CStr(MyNumArray(i))
end
cartstr=cartstr+","+CStr(MyProductArray(i))
cartnumstr=CStr(cartnumstr)+","+CStr(MyNumArray(i))
 end if 
end if
 Next
end if
else
 if(myaction="update") then 
 cartstr="update"
else
end if
end if
end ifsetCartToCookie cartstr,cartnumstr,totalnum,0
ShowCart("yes")
%>
  
3.5.4结帐处理
   
 当用户把产品放进购物车中,单击“结帐”按钮时,需要显示结帐页面,结帐页面如图3-22所示。
 结帐页面对应的文件是check.asp.从图3-22可以看出,在结帐页面需要先显示用户决定购买的产品信息,然后提供表单让用户输入姓名,选择送货的时间等。
 
 
                             图3-22 网站结帐页面
 例程3-14为结帐页面表单的参考代码
 
                           例程3-14  结帐页面表单的参考代码
                                                                         
<%
dim cartstr
cartstr = getCartFromCookie()
if (cartstr=NULL or cartstr ="") then
response.redirect "Cart.asp"
response.end
end if
dim payName,payPhone,payEmail,payAddress
if (session("userautoid")<=0) then
payName=""
payPhone=""
payEmail=""
payAddress=""
else
dim dbc,query,rs
shopopendatabase dbc
query =  "select * from myUser where autoid = " & session("userautoid")
set rs = dbc.execute(query)
Ifrs.EOF ThepayName=rs("realname")payPhone=rs("phone")payEmail=rs("userid")payAddress=rs("Address")end if
   closerecordset rs 
   shopclosedatabase dbc
end if

%>
<html>
<head>
<title>绿植鲜花玩具礼品店</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="inc/lvzhi.css" type="text/css">
<STYLE type=text/css>TD {
    FONT-SIZE: 12px; FONT-FAMILY: "宋体"
}
</STYLE>
<script language="java script">
    function setReceiverFormVisible(vGet)
        {if(vGet=='1'){document.all.receiverinfo_form.style.display='none';}else{document.all.receiverinfo_form.style.display='block'}
function checkinput(){var payName=document.mymainform.MypayName.value;
 if (payName=="")
{alert("付款人名称不能为空!");
document.mymainform.MypayName.focus();
eturn false;}
var payPhone=document.mymainform.payPhone.value;
 if (payPhone=="")
{alert("付款人电话不能为空!");
document.mymainform.payPhone.focus();
eturn false;}
f(document.mymainform.myrec2.checked==true)
{var recName=document.mymainform.recName.value;
 if (recName==""){alert("收货人名称不能为空!");
document.mymainform.recName.focus();
eturn false;}
var recPhone=document.mymainform.recPhone.value;
 f (recPhone==""){alert("收货人电话不能为空!");
document.mymainform.recPhone.focus();
return false;}}
return true;}
</script>
</head>
<body bgcolor="#FFFFFF" topmargin="0">
<!--#include file="inc/top.html"--> <br>
<%
ShowCart("yes")
%>
<form name=mymainform id=mymainform action="CheckConfirm.asp" method=post onSubmit="return checkinput();">
<table width="760" border="0" cellspacing="1" cellpadding="3" bgcolor="#4a4a4a" align="center">
  <tr class="title">
    <td colspan="7"><b>付款人信息</b>(姓名,电话必填项,客服确认后收款发货)</td>
  </tr>
 <tr class="bg2">
    <td colspan="7" align="center">
      <input type=radio name=myrec  value="1" id=myrec1 onClick="setReceiverFormVisible('1')" checked>
      付款人收货(付款与收货同一个人)
      <input type=radio name=myrec  value="2"  id=myrec2 onClick="setReceiverFormVisible('2')">
      其他人收货(付款送给其他人) </td>
  </tr>
</table>
  <table width="760" border="0" cellspacing="1" cellpadding="3" bgcolor="#4a4a4a" align="center">
  <tr class="bg1">
    <td width="14%">您的姓名:
    </td>
    <td width="36%">
   <input type="text" id="MypayName" name="MypayName" size=20 maxlength=40 value="<%=payName%>">
     </td>
    <td width="14%">联系电话:
    </td>
    <td width="36%">
   <input type="text" id="payPhone" name="payPhone" size=20 maxlength=40 value="<%=payPhone%>">
     </td>
  </tr>
   <tr class="bg1">
    <td width="14%">邮箱Email:
    </td>
    <td width="36%">
   <input type="text" id="payName" name="payEmail" size=20 maxlength=40 value="<%=payEmail%>">
     </td>
    <td width="14%">详细地址:
    </td>
    <td width="36%">
   <input type="text" id="payName" name="payAddress" size=20 maxlength=40 value="<%=payAddress%>">
     </td>
  </tr>
  <tr class="bg1">
   <td width="14%">送货时间:
    </td>
   <td width="86%" colspan=3>
     <select id="sendMonth" name="sendMonth">
              <option  value=1>1</option>
              <option  value=2>2</option>
              <option  value=3>3</option>
              <option  value=4>4</option>
              <option  value=5>5</option>
              <option  value=6>6</option>
              <option  value=7>7</option>
              <option  value=8>8</option>
              <option  value=9>9</option>
              <option  value=10>10</option>
              <option  value=11>11</option>
              <option  value=12>12</option>
     </select>月
     <select id="sendDay" name="sendDay">
              <option  value=1>1</option>
              <option  value=2>2</option>
              <option  value=3>3</option>
              <option  value=4>4</option>
              <option  value=5>5</option>
              <option  value=6>6</option>
              <option  value=7>7</option>
              <option  value=8>8</option>
              <option  value=9>9</option>
              <option  value=10>10</option>
              <option  value=11>11</option>
              <option  value=12>12</option>
              <option  value=13>13</option>
              <option  value=14>14</option>
              <option  value=15>15</option>
              <option  value=16>16</option>
              <option  value=17>17</option>
              <option  value=18>18</option>
      &

首页 上一页 1 2 3 4 下一页 尾页 3/4/4

ASP在线花店系统(三)相关范文
上一篇:信用卡数据分析系统编程理论基础 下一篇:ASP在线教育系统
点击查看关于 ASP 在线 花店 系统 的相关范文题目 【返回顶部】
精彩推荐
电气工程自动化原创范文  电子商务原创文章范文
人力资源专业原创文章范文 土木工程原创文章范文
工商管理专业原创范文    药学专业原创范文
汉语言文学专业原创范文  会计专业原创文章范文
计算机技术原创文章范文  金融学原创文章范文
法学专业原创文章范文   市场营销专业原创范文
信息管理专业原创文章范文 学前教育专业原创范文
公共事业管理专业原创范文 英语专业原创范文
教育管理专业原创范文   行政管理专业原创范文
热门范文

关于我们 | 联系方式 | 范文说明 | 网站地图 | 免费获取 | 钻石会员 | 硕士文章范文


范文同学网提供文档范文,原创文章范文,网站永久域名www.lunwentongxue.com ,lunwentongxue-范文同学网拼音首字母组合

本站部分文章来自网友投稿上传,如发现侵犯了您的版权,请联系指出,本站及时确认并删除  E-mail: 17304545@qq.com

Copyright@ 2009-2024 范文同学网 版权所有