电子商务网站设计+架构图
指导老师:
作 者:
班 级:
系 别:
1.摘要……………………………………………………………… 3
2.前言……………………………………………………………… 4
3.网站整体功能…………………………………………………… 5
4.网站架构图 ……………………………………………………… 5
5. 数据库结构设计图 …………………………………………… 5
6. 正文 …………………………………………………………… 6
7.附图 …………………………………………………………… 26
8. 结束语 ………………………………………………………… 30
9.参考文献 ……………………………………………………… 30
2
通过进行实际的网站架构设计和程序设计,真正掌握并进一步深入了解电子商务的
内部原理和程序运行机制,做到学以致用。
本次课程设计取
题
快递公司问题件快递公司问题件货款处理关于圆的周长面积重点题型关于解方程组的题及答案关于南海问题
为sunnybaby(阳光宝贝)数码专卖,通过ASP技术进行构建,数据库为Access,结合CSS进行网站整体布局和界面设计,并综合运用了FLASH等技
术,来建设网站。
One. Content Summary
Purpose of Designed to Graduation
Through the actual site structure design and program design, and
truly master and further in-depth understanding of e-commerce
principles and procedures of internal operational mechanism, to
apply what they have learned.
Sunmary of Designed to Graduation
The curriculum design entitled sunnybaby admission (Sunnybaby
Baby) Digital Monopoly by ASP technology for construction of the
Access database, a web site with CSS overall layout and interface
design, and the integrated use of the FLASH technology to build its
website.
3
Sunnybaby(阳光宝贝)数码产品专卖采用横向三栏式布局,如图所示:
LOGO+banner+导航栏
右侧产 主体内容 品展示 左侧导航
版权部分
二级页面与首页布局类似,只是将主体与右侧产品展示合并构成新的主体内容区。
Logo+banner+导航
主题内容 左侧导航
版权部分
4
用户注册、登录功能 商品搜索功能 商品评论功能
购物车功能 留言功能 友情链接功能
首页
二级导航 二级导航 二级导航 二级导航 二级导航
产品最终页面,用户可以在这里
直接点击购买按钮进行购买
数据库
产品
表
关于同志近三年现实表现材料材料类招标技术评分表图表与交易pdf视力表打印pdf用图表说话 pdf
用户表 订单表
留言表 评论表
5
conn.asp
<%@ LANGUAGE="VBScript.Encode" CodePage="936"%>
<%Response.Buffer=True
Server.ScriptTimeout=90
On Error Resume Next
dbfolder="../database/"
dbname="hidfuhsdfi.mdb"
connstr="Provider=Microsoft.Jet.OLEDB.4.0;DataSource="&
Server.MapPath(dbfolder&dbname)
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open connstr
If Err Then
set fs=createobject("scripting.filesystemobject")
set ts=fs.createtextfile(server.MapPath("Error/data_"&month(now())&"-
"&day(now())&"_"&hour(now())&"-"&minute(now())&"-"&second(now())&".txt"),true)
ts.write Err.Number&":"&Err.Description
ts.close
set ts=Nothing
set fs=Nothing
err.Clear
Set Conn = Nothing
Response.Write "
数据库连接出错!
"
Response.Write "
可能出错原因:数据库位置或名称不
对、数据库损坏!
"
Response.End
End If%>
index.asp
6
<%showflash ad_img(5),ad_url(5),null,null,null%>
<%showflash ad_img(6),ad_url(6),null,null,null%>
<%showstat tongj%>
|
<%showad1%>
<%showindex "tj","tjindex","tjindex=1","hw_id DESC",tjindex%> <%showflash ad_img(1),ad_url(1),null,null,null%> <%showindex "tm","hot","1=1","hw_buys DESC,hw_id DESC",gun%> <%showflash ad_img(2),ad_url(2),null,null,null%> <%showindex "te","tejia","tejia=1","hw_id DESC",tejia%> <%showflash ad_img(3),ad_url(3),null,null,null%> <%showpaylogo%>
|
|
login.asp
<%
comurl=request("comurl")
7
if request("action")="login" then
errmeg1="登录名和密码为空!"
errmeg2="登录名和密码不匹配!"
user_name=DelStr(request("user_name"))
user_pass=md5(DelStr(request("user_pass")))
if request("user_name")="" or request("user_pass")="" then response.Write ""
Response.Cookies("redsunny")("user_name")=""
Response.Cookies("redsunny")("user_type")=""
Response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from redsunny_user where username='"&user_name&"' and userpass='"&user_pass&"'"
rs.open sql,conn,1,3
if rs.eof then
rs.close
set rs=nothing
response.Write ""
Response.Cookies("redsunny")("user_name")=""
Response.Cookies("redsunny")("user_type")=""
Response.end
end if
Response.Cookies("redsunny")("user_name")=rs("username") Response.Cookies("redsunny")("user_pass")=rs("userpass") Response.Cookies("redsunny")("user_type")=rs("user_type") rs("landtime")=now()
rs("user_lastip")=request.servervariables("remote_addr") rs("degree")=rs("degree")+1
rs.update
rs.close
set rs=nothing
if Request.Cookies("redsunny")("guest")<>"" then
guest=Request.Cookies("redsunny")("guest")
set rs=server.createobject("adodb.recordset")
rs.open "select user_name from redsunny_basket where user_name='"&guest&"' and
8
basket_check=0",conn,1,3
do while not rs.eof
rs("user_name")=request("user_name")
rs.update
rs.movenext
loop
rs.close
set rs=nothing
Response.Cookies("redsunny")("guest")=""
end if
if comurl="" then
comurl="index.asp"
end if
response.redirect comurl
Response.end
elseif request("action")="quit" then
Response.Cookies("redsunny")("user_name")=""
Response.Cookies("redsunny")("user_type")=""
Response.Cookies("redsunny")("user_pass")=""
Response.Cookies("redsunny")("guest")=""
if Request.ServerVariables("Http_Referer")<>"" then
response.redirect ""&Request.ServerVariables("Http_Referer")&"" else
response.redirect "index.asp"
end if
else%>
您的位置:
首页 >> 用户登录 新用户请
9
点击注册 忘记密码请点击这里
|
<%if Request.Cookies("redsunny")("user_name")<>"" then
user_name=Request.Cookies("redsunny")("user_name")%>
|
|
提示: <%=user_name%>您好,您已经登录成功! 如果您不是<%=user_name%>,请退出重新登
录! | | |
<%else%>
10
<%end if%>
|
<%end if%>
Orders.asp
|
您的位置: 首页 >> 我的订单列表
|
<%ifRequest.Cookies ("redsunny") ("user_name")="" and
Request.Cookies("redsunny")("guest")="" then
response.redirect "login.asp?comurl=orders.asp"
response.end
else
if Request.Cookies("redsunny")("user_name")<>"" then
user_name=Request.Cookies("redsunny")("user_name")
chklogin(user_name)
elseif Request.Cookies("redsunny")("guest")<>"" then
user_name=Request.Cookies("redsunny")("guest")
end if%>
所有订单:
未处理
无效订单
11
等待付款订单 已付款 已收款 已发货 已收货 |
|
订单号 |
日期 |
投诉 |
状态 |
<%page=request("page")
if page="" then page=1
if not(isnumeric(page)) then page=1
if page<1 then page=1
page=int(page)
zt=request("zt")
set rs=server.createobject("adodb.recordset")
if zt<>"" then
sql="select * from redsunny_sub where sub_name='"&user_name&"' and sub_zt="&zt&" order
by sub_id DESC"
else
sql="select * from redsunny_sub where sub_name='"&user_name&"' order by sub_id DESC"
end if
rs.open sql,conn,1,1
if rs.eof then
response.write "暂且没有任何订单 | "
rs.close
set rs=nothing
else
rs.pagesize=20
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
rs.cachesize=rs.pagesize
12
i=0
do while not rs.eof and (i
| ','newwindow','toolbar=no,scrollbars=yes,resizable=n
o,top=0,left=0,width=650,height=600');"><%=rs("sub_number")%> |
"><%=right(year(rs("sub_date")),2)%><%=month(rs("sub_
date"))%>-<%=day(rs("sub_date"))%>
<%if rs("sub_tousu")=1 then%>已投诉,管理员尚未
处理<%elseif rs("sub_tousu")=2 then%> 投诉:<%=rs("sub_you")%> 回复:<%=rs("sub_fu")%> <%else%>&sub_number=<%=rs
("sub_number")%>','newwindow','toolbar=no,scrollbars=yes,resizable=no,top=0,left=0,width=4
20,height=180');">投诉<%end if%> |
<%if rs("sub_zt")=0 then response.write "无效订单"%> <%if rs("sub_zt")=1 then response.write "未处理"%> <%if rs("sub_zt")=-1 then response.write "已处理等待客户付款"%> <%if rs("sub_zt")=2 then response.write "已付款等待发货"%> <%if rs("sub_zt")=3 then response.write "已收款发货中"%> <%if rs("sub_zt")=4 then response.write "已发货注意收货"%> <%if rs("sub_zt")=5 then response.write "已收货(归档)"%> |
<%rs.movenext
loop
rs.close
set rs=nothing
end if
%>
第<%=page%>页/共<%=totalpage%>页 <%if page-1>0 then%>">上一页<%else%>上一页<%end if%>
13
<%if page+1 <=totalpage then%>">下一页<%else%>下一页 <%end if%> |
提示一:收货后请在订单详情中修改订单状态为已收货,谢谢合作
提示二:点击订单号查看详情
提示三:未收到货或其它订单相关问题,可以进行订单投诉,请说明原因
|
<%end if%>
|
|
buy.asp
|
您的位置: 首页 >> 购物车 |
<%if Request.Cookies("redsunny")("user_name")="" and
Request.Cookies("redsunny")("guest")="" then
response.redirect "login.asp?comurl=buy.asp"
response.end
else
if Request.Cookies("redsunny")("user_name")<>"" then
user_name=Request.Cookies("redsunny")("user_name")
elseif Request.Cookies("redsunny")("guest")<>"" then
user_name=Request.Cookies("redsunny")("guest")
14
end if
if request("action")="change" then '更改数量
if request("count")="" or Not(isNumeric(request("count"))) then
count=1
else
count=Cint(request("count"))
end if
basket_id=request("basket_id")
set rs=server.createobject("adodb.recordset")
sql="select hw_id,basket_count from redsunny_basket where user_name='"&user_name&"' and
basket_id="&basket_id&" and basket_check=0"
rs.open sql,conn,1,3
if not rs.eof then
hw_id=rs("hw_id")
set rsh=server.createobject("adodb.recordset")
sql="select hw_kucun from redsunny_hw where hw_id="&hw_id&"" rsh.open sql,conn,1,1
hw_kucun=rsh("hw_kucun")
if count>hw_kucun then
Response.Write"" response.End
else
rsh.close
set rsh=nothing
rs("basket_count")=count
rs.update
end if
end if
rs.close
set rs=nothing
response.redirect "buy.asp"
response.End
elseif request("action")="del" then '删除定购
basket_id=request("basket_id")
15
set rs=server.createobject("adodb.recordset")
sql="select * from redsunny_basket where user_name='"&user_name&"' and
basket_id="&basket_id&" and basket_check=0"
rs.open sql,conn,1,3
if rs.eof then
response.redirect "buy.asp"
response.End
else
rs.delete
rs.update
end if
rs.close
set rs=nothing
response.redirect "buy.asp"
response.End
end if
%>
商品名称 |
单价(<%=danwei%>) |
数量 |
合计(<%=danwei%>) |
类型 |
操作 |
<%set rs=server.createobject("adodb.recordset")
sql="select * from redsunny_basket where user_name='"&user_name&"' and basket_check=0"
rs.open sql,conn,1,1
if rs.eof then%>
你没有选择任何商品 |
<%
else
i=0
do while not rs.eof
i=i+1
16
%>
<%totalcash=totalcash+(rs("basket_count")*trim(rs("hw_price")))
totalisbn=totalisbn+rs("basket_count")*rs("hw_jifen")
totalw=totalw+(rs("basket_count")*trim(rs("hw_weight")))
totaly=totaly+(rs("basket_count")*trim(rs("hw_yunfei")))
totalc=totalc+rs("basket_count")
rs.movenext
loop
end if
rs.close
set rs=nothing%>
|
<%end if%>
|
18
basket.asp
<% '用cookies记录用户选取的商品
'接受传递的参数,即用户选中商品的信息。这些参数通过URL传递,因此需要用
Form的Querystring来接收。
productid=trim(request.QueryString("productid"))
productname=trim(request.QueryString("productname"))
price=trim(request.QueryString("price"))
photo=trim(request.QueryString("photo"))
if photo="" then photo="noimage.gif"
'获取当时服务器的时间和日期,作为此次交易开始的时间
moment=date() & "" & time()
'session("insert")是记录交易订单操作的变量。如果刚刚进行了一次订单操作,则该比
变量值就不为空,需要首先清空购物车
if session("insert")=session.SessionID then
session("insert")=false
for each key in request.Cookies("itembuy")
response.Cookies("itembuy")(key)=""
next
end if
'将这个商品的id加入到cookie字典itembuy中
response.Cookies("itembuy")(productid)=productid
'下面显示出用户所选择的商品的一些信息
response.Write"
您将下面的商品加入到了您的
购物车
"
response.Write"
| "
response.Write"商品编号: | " & productid & " |
"
response.Write"名称: | " & productname & " |
"
response.Write"优惠价格: | " & price & " |
"
response.Write"购物时间: | " & moment & " |
"
response.Write"
"
session("hasitem")=session.SessionID
%>
放入购物车