网站地图| 免费获取|
免费论文网
  • 网站首页|
  • 论文范文|
  • 修改降重|
  • 职称论文|
  • 合作期刊|
  • 论文下载|
  • 计算机论文|
  • 外文翻译|
  • 免费论文|
  • 原创论文|
  • 开题报告论文
搜索

当前位置:免费论文网 -> 免费论文 -> 计算机论文 -> ASP网上购书(八)
计算机论文| ASP设计| Delphi| VB设计| JSP设计| ASP.NET设计| VB.NET| java设计| VC| pb| VS| dreamweaver| c#.net| vf| VC++| 计算机论文范文| 论文下载| 自动化论文

ASP网上购书(八)

ASP网上购书(八) ,可以把书籍加入到“放入收藏架”;便可以继续浏览、选书。也可以在主页上直接点击[收藏],这时在收藏架里就有了你所选的书。
onClick="java script:window.open('shoucang.asp?id=<%=rs("bookid")%>&action=add ','','width=632,height=388,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"  type=button value=收藏 name=Submit223>
‘如果你添加过了,会有提示,“对不起,此商品已存在于您的收藏架中,不可以重复添加!”
'//收藏,判断是否存在
set rs=server.CreateObject("adodb.recordset")
rs.open "select bookid,username from shop_action where username='"&username&"' and bookid="&bookid&" and zhuangtai=6",conn,1,1
if not rs.eof and not rs.bof then
response.write "<script language=java script>alert('对不起,此商品已存在于您的收藏架中,不可以重复添加!');window.location.reload('shoucang.asp?action=show')</script>"
response.end
rs.close
set rs=nothing
else
‘当你的收藏架上的书籍超过10本时,系统会提示你“对不起,您的商品收藏已超过10个!”将不可以再继续进行收藏。
'//判断收藏数
if rs.recordcount=10 then
response.write "<script language=java script>alert('对不起,您的商品收藏已超过10个!');window.location.reload('shoucang.asp?action=show')</script>"
response.end
else
rs.close
set rs=nothing
‘并且告诉您您最多只能收藏十种商品
<%response.write "<table width=96% border=0 align=center cellpadding=2 cellspacing=2><tr><td width=60% >"
response.write "<img src=images/wishlist.gif width=159 height=43></td><td width=40% valign=baseline><div align=right>您最多只能收藏十种商品</div></td></tr></table>"
shoucang()
end select%>
‘当然,你的收藏架上的书在你的精心挑选过后,有些你不是很喜欢了,那么你可以把你还喜欢的留着,不喜欢了的删除掉,我们专门为您准备了垃圾桶。
'//删除收藏
select case action
case "del"
conn.execute "delete from shop_action where actionid="&request.QueryString("actionid")
if request.QueryString("ll")=22 then
response.redirect "myuser.asp?action=shoucang"
else
response.redirect "shoucang.asp?action=show"
end if
response.End
case "add"

4.7  设计第一份订购表单
当您第一次进行购买时,只要点击了[购买]就会进入第一份购买表单。先确定是否选择了书籍:
<%dim bookid,action,i
action=request.QueryString("action")
if request.QueryString("id")="" then
bookid=request("bookid")
else
bookid=request.QueryString("id")
end if
if bookid="" then
response.write "<script language=java script>alert('对不起,您没有选择商品!');window.location.reload('java script:window.close()')</script>"
response.End
‘如果没有选择书籍,则会跳出‘对不起,您没有选择商品’的对话框。如果选择了商品,那么会显示书籍的[商品名称] [市场价][折扣][数量][小计][修改数量]等信息。
select case action
'//////////////////////////////////
case ""
set rs=server.CreateObject("adodb.recordset")
rs.open "select bookid,bookname,shichangjia,huiyuanjia,dazhe from shop_books where bookid in ("&bookid&") order by bookid",conn,1,1%>
<table width="96%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">
  <form name="form1" method="post" action="">
    <tr>
      <td width="48%" bgcolor="#5F95D3"><div align="center"><font color="#FFFFFF">商品名称</font></div></td>
      <td width="13%" bgcolor="#5F95D3"><div align="center"><font color="#FFFFFF">市场价</font></div></td>

首页 上一页 5 6 7 8 9 10 11 下一页 尾页 8/12/12

ASP网上购书(八)由免费论文网(www.jaoyuw.com)会员上传。
原创论文流程 相关论文
上一篇:ASP同学录设计asp+sql 下一篇:ASP新闻网程序+论文
推荐论文 本专业最新论文
Tags:ASP 网上购书 2010-04-15 21:29:16【返回顶部】
精彩推荐
发表论文

联系方式 | 论文说明 | 网站地图 | 免费获取 | 钻石会员 | 硕士论文


免费论文网提供论文范文,论文代发,原创论文

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

Copyright@ 2009-2020 免费论文网 版权所有 湘ICP备19027999