电子商务网站建设与完整实例(李怀恩)04299实例的源码和素材

上传人:油条 文档编号:116661705 上传时间:2019-11-17 格式:DOC 页数:43 大小:334.50KB
返回 下载 相关 举报
电子商务网站建设与完整实例(李怀恩)04299实例的源码和素材_第1页
第1页 / 共43页
电子商务网站建设与完整实例(李怀恩)04299实例的源码和素材_第2页
第2页 / 共43页
电子商务网站建设与完整实例(李怀恩)04299实例的源码和素材_第3页
第3页 / 共43页
电子商务网站建设与完整实例(李怀恩)04299实例的源码和素材_第4页
第4页 / 共43页
电子商务网站建设与完整实例(李怀恩)04299实例的源码和素材_第5页
第5页 / 共43页
点击查看更多>>
资源描述

《电子商务网站建设与完整实例(李怀恩)04299实例的源码和素材》由会员分享,可在线阅读,更多相关《电子商务网站建设与完整实例(李怀恩)04299实例的源码和素材(43页珍藏版)》请在金锄头文库上搜索。

1、第六章 电子商务网站创建实例学习目标l 熟悉ASP与数据库链接与操作l 熟练代码的模块化设计及重用l 能根据实际情况建立电子商务网站用户管理功能等的设计与实现l 熟悉网站的发布流程6.1建设一个简单的网上商店l 下面给出首页(index.asp)的源代码:12345678910111213<!-#include file="inc/conn.asp"-><html><head><title>随缘网上商店首页</title><meta http-equiv="Content-Type" co

2、ntent="text/html; charset=gb2312"><link href="images/css.css" rel="stylesheet" type="text/css"></head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><!-#include file="web

3、top.asp"-><!-#include file="guide.asp"-><!-#include file="rank.asp"-><!-#include file="shops.asp"-><!-#include file="webbuttom.asp"-></body></html>参数:FileName:指定要包含的文件名。FileName 必须包含文件名扩展,而且必须将文件名用引号 (") 引起来。 第1

4、行:调用conn.asp文件,这个文件主要负责连接数据库;第4行:调用css.css样式表文件。因本站点就使用一个样式表文件,所以不另外建立一个文件夹存放。因为在以下的所有网页中都需要调用同样的css.css样式表文件,所以在本章书之后的页面源代码中都省略这一行,请读者们注意。第711行:按照图6-2的模块化设计,调用相应文件。所以在本章书之后的页面源代码中都省略这两行,请读者们注意。l WebTop.asp页面源代码如下:12345678910111213141516171819202122232425262728293031323334353637383940414243444546474

5、84950515253545556575859<table width="760" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td background="images/top_bg.gif"> <table width="760" border="0" align="center" cell

6、padding="0" cellspacing="0"><tr valign="bottom"> <td width="160" height="60" rowspan="2" align="center" valign="middle"><a href="index.asp"><img src="images/logo.gif" width=&qu

7、ot;160" height="60" border="0"></a></td> <td width="600" height="35" valign="middle" align="right"><a href="gouwu.asp?action=show&lx=1" target=_blank><img src="images/top_cart.gif"

8、width="76" height="20" border="0"></a><a href="user.asp"><img src="images/top_my.gif" width="76" height="20"border="0"></a><a href="help.asp"><img src="images/top_faq.gi

9、f" width="76" height="20"border="0"></a><a href="logout.asp"><img src="images/top_wh.gif" width="76" height="20"border="0"></a> </td> </tr> <tr valign="bottom">

10、 <td width="600" height="35" align="right"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr align="right"> <td width="50%"></td> <td><a href="inde

11、x.asp"><img border=0 src="images/home.gif"></a></td> <td><a href="jetway.asp"><img border=0 src="images/jetway.gif"></a></td> <td><a href="class.asp?lx=news"><img border=0 src="images/

12、newsh.gif"></a></td> <td><a href="class.asp?lx=tejia"><img border=0src="images/tejiashanpin.gif"></a></td> <td><a href="class.asp?lx=hot"><img border=0src="images/news.gif"></a></td&g

13、t; </tr> </table> </td> </tr> </table> </td> </tr></table><table width="760" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td height="5" background="images

14、/top_low_bg.gif"></td></tr> <tr> <td height="20" bgcolor="#FF9933"> <table width="760" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="50%"><

15、;!-#include file="userinfo.asp"-></td> <td><!-#include file="searchinfo.asp"-></td> </tr> </table></td></tr><tr><td height="1"></td></tr></table><table width="760" border="

16、;0" align="center" cellpadding="0" cellspacing="0"><tr> <td height="100" valign="top" background="images/banner.gif"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http:/ width=&

17、quot;750" height="100"> <param name="movie" value="images/banner.swf"> <param name="quality" value="high"> <param name="wmode" value="transparent"> <embed src="images/banner.swf" width="

18、750" height="100" quality="high"pluginspage="http:/ type="application/x-shockwave-flash" wmode="transparent"> </embed> </object> </td></tr></table>l userinfo.asp页面源代码如下:123456789101112<%if request.Cookies("use

19、r_name")="" then%><font color=#ffffff>亲爱的顾客您好,购买商品请先 <a href="login.asp"><font color=#ffffff>登录</font></a> <a href="reg.asp"><font color=#ffffff>注册</font></a> </font><%elseset rs=server.createobject(

20、"adodb.recordset")rs.open "select user_point,user_fund from users where" & _"user_name='"&request.Cookies("user_name")&"'",conn,1,3response.Cookies("user_fund")=rs("user_fund")response.Cookies("user_point&

21、quot;)=rs("user_point")rs.closeset rs=nothingresponse.write "<font color=#ffffff>"&request.Cookies("user_name")& _ "您好,您目前有"&request.Cookies("user_point")&"积分,预存款"& _request.Cookies("user_fund")&"元 </font>"end if%>l searchinfo.asp页面源代码:l Guide.asp页面源代码:12345678910111213141516171819

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 中学教育 > 其它中学文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号