顾客满意。购物结束后,进行提交,点击“order”,完成购物。 
此外顾客还得进行身份信息的填写,包括姓名,年龄,住址,联系方式和选择的支付方式或使用的支付卡等等。个人身份信息的填写是为了方便顾客所购买的货物准确及时送达。而所有这些信息也将保存在系统数据库中,顾客以后再次购买时就无需重新输入个人身份,可以直接登陆到页面中。 
3.3  程序设计 
管理员在进入网上购物系统主页后点击“管理员”按钮就会进入管理员登陆界面 
 
只有管理员才有权限进入后台修改数据库,其部分代码如下: 
session("shopadmin")="" 
session("init")="" 
dim  myconn 
msg="" 
shopopendatabase  myconn 
on  error  resume  next 
if  request("submit")<>""  then 
sql  =  "select  *  from  tbluser  where  fldusername=“"  &  request("username")&"“andfldpassword=“"&request("password")&  "“" 
    set  rs  =  myconn.execute(sql) 
                    if  err.number>0  then   
                                  msg=session("openerror") 
                    else   
                  if  not  rs.eof  then 
session("shopadmin")    =  rs("fldusername") 
loguser  session("shopadmin"),  "in",  myconn 
                                shopclosedatabase  myconn 
                                response.redirect  "shopadmin1.asp" 
              else 
                                msg="用户名或者密码错误!<br>" 
                              end  if 
                      end  if   
      end  if                     
shoppageheader 
if  msg  <>  ""  then 
          response.write  msg 
end  if 
%> 
</center> 
<form  action="shopadmin.asp"  method="post"  name="loginform"> 
<center><font  face=arial  size=2  color="#0080c0"> 
<b>此页面仅供管理员使用</b></font></center><br> 
</font></font> 
<table  width=300  border=1  cellpadding=3  cellspacing=0   
align="center"  bordercolordark="#333399"  bordercolorlight="#666699"> 
<tr> 
<td  bgcolor="#0080c0"  colspan=2  align=left  valign=top> 
<font  face="trebuchet  ms,  arial,  helvetica"> 
<font  face="arial,  arial,  helvetica"> 
<font  face="arial"  size=2  color=white><b>高级用户登陆</b></font> 
</font></font></td> 
</tr> 
<tr> 
<td  width=50  align=left  valign=top> 
<font  face="trebuchet  ms,  arial,  helvetica"> 
<font  face="arial,  arial,  helvetica"> 
<font  face="arial"  size=2><b>用户名:</b> 
</font></font></font></td> 
<td  align=left  valign=top> 
<font  face="trebuchet  ms,  arial,  helvetica"> 
<font  face="arial,  arial,  helvetica"> 
<input  type=text  name="username"  value="<%=request("username")  %>"> 
</font></font></td> 
</tr> 
<tr> 
<td  width=50  align=left  valign=top> 
<font  face="trebuchet  ms,  arial,  helvetica"> 
<font  face="arial,  arial,  helvetica"> 
<font  face="arial"  size=2><b>密码: 
</b></font></font></font></td> 
                                <td  align=left  valign=top> 
<font  face="trebuchet  ms,  arial,  helvetica"> 
<font  face="arial,  arial,  helvetica"> 
<input  type=password  name="password"> 
</tr> 
其用来登陆的用户名、密码、及登陆后的权限都与系统数据库相连 
 
如过用户名、密码错误将来到以下界面 
 
输入管理员用户名、密码后来到以下界面 
 
进入后台数据库管理系统,其部分代码如下: 
%> 
<p  align="center">选择相应的项可以进行管理编辑</p> 
<p> 
<center> 
<% 
          dim  myconn 
          shopopendatabase  myconn 
          formatheader 
          list  =  getaccess(session("shopadmin"),  myconn) 
          ac  =  split(list,",") 
          for  each  item  in  ac 
    sql  =  "select  *  from  tblaccess  where  fldauto  =  "  &  cint(item) 
    set  objrec  =  myconn.execute(sql) 
                  formatrow  objrec 
            next 
            shopclosedatabase  myconn 
              formattrailer 
end  sub 
sub  formatheader 
%> 
<table  border="2"  cellspacing="1"  width="90%"  bordercolor="#008080"> 
        <tr> 
            <td  width="50%"> 
                <p  align="center"><b><font  face="verdana">功能</font></b></td> 
            <td  width="50%"> 
                <p  align="center"><b><font  face="verdana">描述</font></b></td> 
        </tr> 
<% 
end  sub 
sub  formatrow  (objrec) 
dim  name,url,comment 
name  =  objrec("fldname") 
url  =  objrec("fldurl") 
comment=objrec("fldcomment") 
%> 
其中网页上所显示的“功能”及“描述”选项都与系统数据库相连,点击“显示订单”按钮, 
 
其中部分代码如下: 
%> 
<td><font  face="arial,  arial,  helvetica"><b>订单号</b></font></td> 
<td><font  face="arial,  arial,  helvetica"><b>用户号</b></font></td> 
<td><font  face="arial,  arial,  helvetica"><b>订单日期</b></font></td> 
<td><font  face="arial,  arial,  helvetica"><b>购物费用</b></font></td> 
<td><font  face="arial,  arial,  helvetica"><b>姓名</b></font></td> 
<td><font  face="arial,  arial,  helvetica"><b>国家</b></font></td> 
<td><font  face="arial,  arial,  helvetica"><b>是否删除</b></font></td> 
<% 
其中网页上所显示的“删除记录”及“标记已经交易成功”等选项都与系统数据库相连,点击“显示产品”按钮,  网页将会把所有的商品都一一列举出来,方便管理员管理、查询、修改。 
   
其中部分代码如下: 
response.write  "<font  size=4> 
<a  href=shopa_addgeneral.asp?database="  &  dbname  & 
  "&table="  &  dbtable  &  ">增加新记录</a></font><br>" 
response.write  "<br>page  "  &  mypage  &  "  of  "  &  maxpages  &  "<br>" 
%> 
<center> 
<form  action="shopa_editdisplay.asp?table=<%=dbtable%>"  method="post"> 
<table  border="2"  cellpadding="2"  cellspacing="3"  width="100%"> 
    <tr><td></td> 
<% 
response.write      "<td  align=center>delete</td></tr>" 
“  下面获得所有记录 
howmanyrecs=0 
do    until  rstemp.eof  or  howmanyrecs=maxrecs 
      my_link=scriptresponder  &  "?which="  &  rstemp(idfield)  + 
&  "&idfield="  &  idfield  &  "&table="  &  dbtable  &  "&database="  &  dbname   
      response.write  "<tr><td  valign=""top""> 
<a  href="  &  my_link  &  ">编辑</a></font></td>" 
>                    response.write("</table></font>") 
%> 
                    <input  type="hidden"  name="database"  value="<%=database%>"> 
                    <input  type="hidden"  name="table"  value="<%=dbtable%>"> 
                    <input  type="hidden"  name="idfield"  value="<%=idfield%>"> 
                <center> 
<input  type="submit"  name="delete"  value="删除记录"> 
</center></font> 
<% 
                response.write("</form>") 
其中网页上所显示的“增加新记录”及“删除”等选项都与系统数据库相连,点击“历史记录”按钮,  网页将会把所有的进入后台信息都显现出来,方便管理员管理、查询。 
   
其中部分代码如下: 
if  request("delete")<>""  then 
for  each  item  in  request("deletehis") 
del  =  "delete  from  tbllog  where  fldauto="  &  cint(item) 
con.execute(del) 
next 
end  if 
adminpageheader 
sql  =  "select  *  from  tbllog" 
set  objrec  =  con.execute(sql) 
%> 
<td><font  face="trebuchet  ms,  arial,  helvetica"> 
<font  face="arial,  arial,  helvetica"> 
<font  face="arial"  size=2  color=navy> 
<%=objrec("fldusername")%></font></font></font></td> 
<td><font  face="trebuchet  ms,  arial,  helvetica"> 
<font  face="arial,  arial,  helvetica"> 
<font  face="arial"  size=2  color=navy> 
<%=objrec("fldtime")%></font></font></font></td> 
<td><font  face="trebuchet  ms,  arial,  helvetica"> 
<font  face="arial,  arial,  helvetica"> 
<font  face="arial"  size=2  color=navy> 
<%=objrec("flddate")%></font></font></font></td> 
<td><font  face="trebuchet  ms,  arial,  helvetica"> 
<font  face="arial,  arial,  helvetica"> 
<font  face="arial"  size=2  color=navy> 
<%=ucase(objrec("fldinout"))% 
其中网页上所显示的“删除”选项都与系统数据库相连, |