asp网站购物车代码问题。先谢谢各位!

asp网站购物车代码问题。因为现在是要注册用户才能购物,如果不注册,直接购物,请问是修改那个地方的代码。先谢谢各位!
1文件
<%
if session("hy")<>"yes" then
response.redirect "hy_dl.asp"
response.end
end if
if session("sp")="" then
response.write "<script>alert('请合法操作!');history.go(-1)</script>"
response.end
end if
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>购物车-<% =rs_xtpz("mc") %>-<% =rs_xtpz("bt") %></title>
<meta name="keywords" content="<% =rs_xtpz("gjz") %>">
<meta name="description" content="<% =rs_xtpz("mc") %>-<% =rs_xtpz("ms") %>">

第1个回答  2009-03-03
文件(2)
<%
if session("hy")<>"yes" then
response.redirect "hy_dl.asp"
response.end
end if
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>购物车-<% =rs_xtpz("mc") %>-<% =rs_xtpz("bt") %></title>
<meta name="keywords" content="<% =rs_xtpz("gjz") %>">
<meta name="description" content="<% =rs_xtpz("mc") %>-<% =rs_xtpz("ms") %>">
<link href="images/css.css" rel="stylesheet" type="text/css">
<%
sp=session("sp")
if sp="" then
response.write "<script>alert('请合法操作!');history.go(-1)</script>"
response.end
end if
set rs_sp=server.createobject("adodb.recordset")
lr_sp="select bh,mc,jg from sp where bh in ("&sp&") order by id desc"
rs_sp.open lr_sp,conn,1,1,1
if rs_sp.recordcount<1 then
response.write "<script>alert('购物车为空!');history.go(-1)</script>"
response.end
end if
khxm=trim(request.form("khxm"))
khdz=trim(request.form("khdz"))
khyb=trim(request.form("khyb"))
khdh=trim(request.form("khdh"))
khyx=trim(request.form("khyx"))
zffs=trim(request.form("zffs"))
fpf=trim(request.form("fpf"))
psfs=trim(request.form("psfs"))
khxm=fld(khxm)
khdz=fld(khdz)
khyb=fld(khyb)
khdh=fld(khdh)
khyx=fld(khyx)
zffs=fld(zffs)
fpf=fld(fpf)
psfs=fld(psfs)
if khxm="" then
response.write "<script>alert('收货人姓名不能为空!');history.go(-1)</script>"
response.end
end if
if khdz="" then
response.write "<script>alert('收货人地址不能为空!');history.go(-1)</script>"
response.end
end if
if khyb="" then
response.write "<script>alert('收货人邮编不能为空!');history.go(-1)</script>"
response.end
end if
if khdh="" then
response.write "<script>alert('收货人电话不能为空!');history.go(-1)</script>"
response.end
end if
if zffs="" then
response.write "<script>alert('请选择支付方式!');history.go(-1)</script>"
response.end
end if
if psfs="" then
response.write "<script>alert('请选择配送方式!');history.go(-1)</script>"
response.end
end if
set rs_dd_psfs=server.createobject("adodb.recordset")
lr_dd_psfs="select fy from dd_psfs where mc='"&psfs&"'"
rs_dd_psfs.open lr_dd_psfs,conn,1,1,1
spyf=rs_dd_psfs("fy")
call gbdx(rs_dd_psfs)
bz=trim(request.form("bz"))
bz=fld(bz)
%>
第2个回答  2009-03-03
接上面文件(1)

<link href="images/css.css" rel="stylesheet" type="text/css"><%
'读出会员信息里的收货人信息
if session("hy")="yes" then
lr_hy="select xm,dz,yb,dh,yx from hy where zh='"&session("hy_zh")&"'"
set rs_hy=conn.execute(lr_hy)
khxm=rs_hy("xm")
khdz=rs_hy("dz")
khyb=rs_hy("yb")
khdh=rs_hy("dh")
khyx=rs_hy("yx")
end if
'读出支付方式
set rs_dd_zffs=server.createobject("adodb.recordset")
lr_dd_zffs="select mc,sm from dd_zffs order by plwz asc"
rs_dd_zffs.open lr_dd_zffs,conn,1,1,1
'读出配送方式
set rs_dd_psfs=server.createobject("adodb.recordset")
lr_dd_psfs="select mc,fy,tjf,sm from dd_psfs order by plwz asc"
rs_dd_psfs.open lr_dd_psfs,conn,1,1,1
%>
第3个回答  2009-03-03
网站有一个验证的问题 不是注册会员就不会有相关功能,这可以找到判断语句更改下 就可以了

if session("hy")<>"yes" then
response.redirect "hy_dl.asp"
response.end
end if
删掉
第4个回答  2009-03-03
<%
if session("hy")<>"yes" then
response.redirect "hy_dl.asp"
response.end
end if
if session("sp")="" then
response.write "<script>alert('请合法操作!');history.go(-1)</script>"
response.end
end if
%>

全部删除就可以了
第5个回答  2009-03-03
文件代码(3)
<%
if session("hy")<>"yes" then
response.redirect "hy_dl.asp"
response.end
end if
%>
<!--#include file="inc/conn.asp" -->
<!--#include file="inc/function.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>订单提交成功-<% =rs_xtpz("mc") %>-<% =rs_xtpz("bt") %></title>
<meta name="keywords" content="<% =rs_xtpz("gjz") %>">
<meta name="description" content="<% =rs_xtpz("mc") %>-<% =rs_xtpz("ms") %>">
<link href="images/css.css" rel="stylesheet" type="text/css"><%
ddh=trim(request.querystring("ddh"))
spzj=session("spzj")
spyf=session("spyf")
yfje=session("yfje")
%>
相似回答