|
作者: gerry [gerry] 版主 | 登录 |
请帮我看一下这几个页面有什么问题 <!-- #include file="include/config_shop.asp" --> <!-- #include file="include/jk_pagecute.asp" --> <!-- #include file="include/conn.asp" --> <% dim nid,nummer,page,rssum,thepages,viewpage,pageurl,sqladd call cid_sid() if cid=0 then if action="search" then tit="查询结果" tit_fir=tit_fir else tit=tit_fir tit_fir="" end if else if action="search" then tit="查询结果" tit_fir=tit_fir else tit="分类浏览" tit_fir=tit_fir end if end if call web_head(0,0,0,0,0) '------------------------------------left---------------------------------- call format_login() call shop_sort() call shop_left() '----------------------------------left end-------------------------------- call web_center(0) '-----------------------------------center--------------------------------- response.write ukong call shop_sea() %> <table border=0 width='98%' align=center> <tr><td align=center> <% if cid=0 then if action="search" then call shop_list() else call shop_main() end if else call shop_list() end if %> </td></tr> <tr><td align=center></td></tr> </table> <% '---------------------------------center end------------------------------- call web_end(0) sub shop_main() %> <table border=0 width='100%' cellspacing=0 cellpadding=0> <tr><td><table border=0 cellspacing=0 cellpadding=0 width='100%'><tr><td width=100 align=center height=20 bgcolor=<%response.write web_var(web_color,2)%> class=black><b>商品推荐</b></td><td> </td></tr></table></td></tr> <tr><td height=1 background='images/bg_dian.gif'></td></tr> <tr><td height=5></td></tr> </table> <table border=0 width='98%' cellspacing=0 cellpadding=0><tr valign=top> <% sql="select top 3 id,name,serial,brand,stock,smallimg,price_1,price_2,remark_1 from shop where isgood=1 and hidden=1 order by tim desc,id desc" set rs=conn.execute(sql) do while not rs.eof response.write vbcrlf&"<td width='33%' align=center>"&shop_view()&"</td>" rs.movenext loop rs.close %></tr></table> <table border=0 width='100%' cellspacing=0 cellpadding=0> <tr><td height=10></td></tr> <tr><td><table border=0 cellspacing=0 cellpadding=0 width='100%'><tr><td width=100 align=center height=20 bgcolor=<%response.write web_var(web_color,2)%> class=black><b>最新商品</b></td><td align=right><a href='#top'><img src='images/small/gotop.gif' border=0></a></td></tr></table></td></tr> <tr><td height=1 background='images/bg_dian.gif'></td></tr> <tr><td height=5></td></tr> </table> <table border=0 width='100%' cellspacing=0 cellpadding=0> <% sql="select top 6 id,name,serial,brand,stock,smallimg,price_1,price_2,remark_1 from shop where hidden=1 order by id desc" set rs=conn.execute(sql) do while not rs.eof response.write vbcrlf&"<tr valign=top>" for i=1 to 3 if rs.eof or rs.bof then exit for response.write vbcrlf&"<td width='33%' align=center>"&shop_view()&"</td>" rs.movenext next response.write vbcrlf&"</tr><tr><td height=1 colspan=3 background='images/bg_dian.gif'></td></tr>" loop rs.close:set rs=nothing response.write vbcrlf&"</table>" end sub sub shop_list() dim j,sea_type,keyword pageurl="shop.asp?action="&action&"&":sqladd="" thepages=0:viewpage=1:nummer=6 sea_type=trim(request.querystring("sea_type")) keyword=replace(trim(request.querystring("keyword")),"'","") if cid>0 then sqladd=" and c_id="&cid pageurl=pageurl&"c_id="&cid&"&" if sid>0 then sqladd=sqladd&" and s_id="&sid pageurl=pageurl&"s_id="&sid&"&" end if end if if len(keyword)>0 and (sea_type="name" or sea_type="brand" or sea_type="remark_1") then sqladd=sqladd&" and "&sea_type&" like '%"&keyword&"%'" pageurl=pageurl&"keyword="&server.htmlencode(keyword)&"&sea_type="&sea_type&"&" end if %> <table border=0 width='100%' cellspacing=0 cellpadding=0> <tr><td height=10></td></tr> <tr><td><table border=0 cellspacing=0 cellpadding=0 width='100%'><tr><td width=100 align=center height=20 bgcolor=<%response.write web_var(web_color,2)%> class=black><b>商品列表</b></td><td> <font class=red><%=nummer%></font> 个/页</td></tr></table></td></tr> <tr><td height=1 background='images/bg_dian.gif'></td></tr> <tr><td height=5></td></tr> </table> <table border=0 width='98%' cellspacing=0 cellpadding=0> <% sql="select id,name,serial,brand,stock,smallimg,price_1,price_2,remark_1 from shop where hidden=1"&sqladd&" order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 if rs.eof and rs.bof then rssum=0 else rssum=rs.recordcount end if call format_pagecute() if int(viewpage)>1 then rs.move (viewpage-1)*nummer end if for j=1 to nummer/3 if rs.eof or rs.bof then exit for response.write vbcrlf&"<tr valign=top>" for i=1 to 3 if rs.eof or rs.bof then exit for response.write vbcrlf&"<td width='33%' align=center>"&shop_view()&"</td>" rs.movenext next response.write vbcrlf&"</tr><tr><td height=5></td></tr><tr><td height=1 colspan=3 background='images/bg_dian.gif'></td></tr><tr><td height=5></td></tr>" next rs.close:set rs=nothing %> </table> <table border=0 width='100%'> <tr height=25> <td width='30%' align=center> 共 <font class=red><%=rssum%></font> 个</td> <td align=center>页次:<font class=red><%response.write viewpage%></font>/<font class=red><%response.write thepages%></font> 分页:<%response.write jk_pagecute(nummer,thepages,viewpage,pageurl,8,"#ff0000")%></td> </tr> </table> <% end sub function shop_view() nid=rs("id") shop_view=vbcrlf&"<table border=0 width='90%' cellspacing=0 cellpadding=0 class=tf>" & _ vbcrlf&"<tr><td height=5></td></tr>" & _ vbcrlf&"<tr><td colspan=2 align=center><a href='shop_view.asp?id="&nid&"'><img src='"&url_true(upload_file,rs("smallimg"))&"' border=0 width=125 height=100></a></td></tr>" & _ vbcrlf&"<tr><td colspan=2 align=center height=25><a href='shop_view.asp?id="&nid&"' class=blue><b>"&rs("name")&"</b></a></td></tr>" & _ vbcrlf&"<tr><td colspan=2 align=center>"&img_small("jt0")&"会员价格:<font class=red>¥<u>"&rs("price_2")&"</u></font> <font class=gray>¥<i>"&rs("price_1")&"</i></font></td></tr>" & _ vbcrlf&"<tr><td colspan=2 align=center height=30><a href='shop_bag.asp?id="&nid&"'><img align=absMiddle src='images/small/buy.gif' border=0></a> [ <a href='shop_view.asp?id="&nid&"'>详细介绍</a> ]</td></tr>" & _ vbcrlf&"</table>" 'vbcrlf&"<tr><td colspan=2 align=center>"&rs("brand")&"</td></tr>" & _ 'vbcrlf&"<tr><td width='50%'>"&img_small("jt0")&"商品编号:</td><td width='50%'>"&rs("serial")&"</td></tr>" & _ 'vbcrlf&"<tr><td>"&img_small("jt0")&"商品库存:</td><td class=red>"&rs("stock")&"</td></tr>" & _ 'vbcrlf&"<tr><td colspan=2 class=bw height=50 valign=top>商品简介:"&code_html(rs("remark_1"),1,35)&"</td></tr>" & _ end function %> 2) <!-- #include file="include/config_shop.asp" --> <!-- #include file="include/conn.asp" --> <% dim pid,num,sum,buttoncan,shop_session,sdim,snum,tid,tnum,tprice,tprices tit="购 物 车" call web_head(0,0,0,0,0) shop_session=trim(request.cookies(web_cookies)("shop")) pid=trim(request.querystring("id")) if isnumeric(pid) then sql="select name from product where hidden=1 and id="&pid set rs=conn.execute(sql) if not(rs.eof and rs.bof) then if len(shop_session)<1 then shop_session=pid&",1" else if int(instr("#"&shop_session,"#"&pid&","))<1 then shop_session=shop_session&"#"&pid&",1" end if end if response.cookies(web_cookies)("shop")=shop_session if request.cookies(web_cookies)("iscookies")="yes" then response.cookies(web_cookies).expires=date+365 end if end if rs.close:set rs=nothing end if action=trim(request.querystring("action")) select case action case "shopbag" shop_session="" pid=replace(trim(request.form("pid")),", ",",") sdim=split(pid,",") snum=ubound(sdim) for i=0 to snum tnum=trim(request.form("num"&sdim(i))) if not(isnumeric(tnum)) then tnum=1 if len(shop_session)<1 then shop_session=sdim(i)&","&tnum else if int(instr("#"&shop_session,"#"&sdim(i)&","))<1 then shop_session=shop_session&"#"&sdim(i)&","&tnum end if end if response.cookies(web_cookies)("shop")=shop_session if request.cookies(web_cookies)("iscookies")="yes" then response.cookies(web_cookies).expires=date+365 end if next erase sdim case "clear" shop_session="" response.cookies(web_cookies)("shop")=shop_session if request.cookies(web_cookies)("iscookies")="yes" then response.cookies(web_cookies).expires=date+365 end if end select '------------------------------------left---------------------------------- call format_login() call shop_sort() call shop_left() '----------------------------------left end-------------------------------- call web_center(0) '-----------------------------------center--------------------------------- response.write ukong %> <table border=0><tr><td class=red height=30>以下是您所选购的物品清单</td></tr></table> <%response.write table1%> <tr height=22<%response.write table2%> align=center> <td width='6%' class=end><b>购买</td> <td width='22%' class=end><b>产品编号</td> <td width='38%' class=end><b>产品名称</td> <td width='12%' class=end><b>产品单价</td> <td width='10%' class=end><b>数量</td> <td width='12%' class=end><b>产品总价</td> </tr> <form name=shop_frm action='shop_bag.asp?action=shopbag' method=post> <% sum=0 buttoncan=" disabled" sdim=split(shop_session,"#") snum=ubound(sdim) for i=0 to snum tid=left(sdim(i),instr(sdim(i),",")-1) tnum=right(sdim(i),len(sdim(i))-instr(sdim(i),",")) sql="select serial,name,price_1,price_2 from product where hidden=1 and id="&tid set rs=conn.execute(sql) if not(rs.eof and rs.bof) then if login_mode="" then tprice=rs("price_1") else tprice=rs("price_2") end if tprices=tprice*tnum sum=sum+tprices %> <tr align=center<%response.write table3%>> <td><input type=checkbox name=pid value='<%response.write tid%>' checked class=bg_1></td> <td><%response.write rs("serial")%></td> <td><%response.write rs("name")%></td> <td><%response.write pu&tprice%> </td> <input type=hidden name=numm<%response.write tid%> value='<%response.write tnum%>'> <td><input type=text name=num<%response.write tid%> value='<%response.write tnum%>' size=4 onKeyUp="javascript:shop_checknum(num<%response.write tid%>,numm<%response.write tid%>);"></td> <td><%response.write pu&tprices%></td> </tr> <% buttoncan="" end if rs.close:set rs=nothing next erase sdim %> <tr<%response.write table4%>><td align=right colspan=6 height=25 class=red>总价格: <%response.write pu&sum%> </td></tr> <tr<%response.write table3%>><td colspan=6 align=center height=40> <input type=submit value='确认更改'<%response.write buttoncan%>> <input type=button value='继续购物' onclick="location.href='shop.asp';"> <input type=button value='清空购物车' onclick="javascript:shop_clear();"<%response.write buttoncan%>> <input type=button value='去收银台' onclick="location.href='shop_pay.asp';"<%response.write buttoncan%>> </td></tr> </form> </table> <script language="Javascript"> <!-- function shop_fucchecknum(num) { var i,j,strTemp="0123456789"; if (num.length== 0) return 0 for (i=0;i<num.length;i++) { j=strTemp.indexOf(num.charAt(i)); if (j==-1) return 0; } return 1; } function shop_clear(){ if (confirm("确定要清空购物车?")==1){ window.location.href="shop_bag.asp?action=clear"} } function shop_checknum(num1,num2) { if ((shop_fucchecknum(num1.value)==0) ) { num1.value=num2.value; return false; } } function shop_checknumnull(num1) { if (num1.value=="") { alert("请填写购买产品的数量"); theform.focus(); return false; } } //--> </SCRIPT> <table border=0><tr><td class=red height=30>注意:改变商品数量和减少商品种类需按“确认更改”按钮</td></tr></table> <% '---------------------------------center end------------------------------- call web_end(0) %> 3) 请帮我看一下这几个页面有什么问题 <!-- #include file="include/config_shop.asp" --> <!-- #include file="include/jk_pagecute.asp" --> <!-- #include file="include/conn.asp" --> <% dim nid,nummer,page,rssum,thepages,viewpage,pageurl,sqladd call cid_sid() if cid=0 then if action="search" then tit="查询结果" tit_fir=tit_fir else tit=tit_fir tit_fir="" end if else if action="search" then tit="查询结果" tit_fir=tit_fir else tit="分类浏览" tit_fir=tit_fir end if end if call web_head(0,0,0,0,0) '------------------------------------left---------------------------------- call format_login() call shop_sort() call shop_left() '----------------------------------left end-------------------------------- call web_center(0) '-----------------------------------center--------------------------------- response.write ukong call shop_sea() %> <table border=0 width='98%' align=center> <tr><td align=center> <% if cid=0 then if action="search" then call shop_list() else call shop_main() end if else call shop_list() end if %> </td></tr> <tr><td align=center></td></tr> </table> <% '---------------------------------center end------------------------------- call web_end(0) sub shop_main() %> <table border=0 width='100%' cellspacing=0 cellpadding=0> <tr><td><table border=0 cellspacing=0 cellpadding=0 width='100%'><tr><td width=100 align=center height=20 bgcolor=<%response.write web_var(web_color,2)%> class=black><b>商品推荐</b></td><td> </td></tr></table></td></tr> <tr><td height=1 background='images/bg_dian.gif'></td></tr> <tr><td height=5></td></tr> </table> <table border=0 width='98%' cellspacing=0 cellpadding=0><tr valign=top> <% sql="select top 3 id,name,serial,brand,stock,smallimg,price_1,price_2,remark_1 from shop where isgood=1 and hidden=1 order by tim desc,id desc" set rs=conn.execute(sql) do while not rs.eof response.write vbcrlf&"<td width='33%' align=center>"&shop_view()&"</td>" rs.movenext loop rs.close %></tr></table> <table border=0 width='100%' cellspacing=0 cellpadding=0> <tr><td height=10></td></tr> <tr><td><table border=0 cellspacing=0 cellpadding=0 width='100%'><tr><td width=100 align=center height=20 bgcolor=<%response.write web_var(web_color,2)%> class=black><b>最新商品</b></td><td align=right><a href='#top'><img src='images/small/gotop.gif' border=0></a></td></tr></table></td></tr> <tr><td height=1 background='images/bg_dian.gif'></td></tr> <tr><td height=5></td></tr> </table> <table border=0 width='100%' cellspacing=0 cellpadding=0> <% sql="select top 6 id,name,serial,brand,stock,smallimg,price_1,price_2,remark_1 from shop where hidden=1 order by id desc" set rs=conn.execute(sql) do while not rs.eof response.write vbcrlf&"<tr valign=top>" for i=1 to 3 if rs.eof or rs.bof then exit for response.write vbcrlf&"<td width='33%' align=center>"&shop_view()&"</td>" rs.movenext next response.write vbcrlf&"</tr><tr><td height=1 colspan=3 background='images/bg_dian.gif'></td></tr>" loop rs.close:set rs=nothing response.write vbcrlf&"</table>" end sub sub shop_list() dim j,sea_type,keyword pageurl="shop.asp?action="&action&"&":sqladd="" thepages=0:viewpage=1:nummer=6 sea_type=trim(request.querystring("sea_type")) keyword=replace(trim(request.querystring("keyword")),"'","") if cid>0 then sqladd=" and c_id="&cid pageurl=pageurl&"c_id="&cid&"&" if sid>0 then sqladd=sqladd&" and s_id="&sid pageurl=pageurl&"s_id="&sid&"&" end if end if if len(keyword)>0 and (sea_type="name" or sea_type="brand" or sea_type="remark_1") then sqladd=sqladd&" and "&sea_type&" like '%"&keyword&"%'" pageurl=pageurl&"keyword="&server.htmlencode(keyword)&"&sea_type="&sea_type&"&" end if %> <table border=0 width='100%' cellspacing=0 cellpadding=0> <tr><td height=10></td></tr> <tr><td><table border=0 cellspacing=0 cellpadding=0 width='100%'><tr><td width=100 align=center height=20 bgcolor=<%response.write web_var(web_color,2)%> class=black><b>商品列表</b></td><td> <font class=red><%=nummer%></font> 个/页</td></tr></table></td></tr> <tr><td height=1 background='images/bg_dian.gif'></td></tr> <tr><td height=5></td></tr> </table> <table border=0 width='98%' cellspacing=0 cellpadding=0> <% sql="select id,name,serial,brand,stock,smallimg,price_1,price_2,remark_1 from shop where hidden=1"&sqladd&" order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 if rs.eof and rs.bof then rssum=0 else rssum=rs.recordcount end if call format_pagecute() if int(viewpage)>1 then rs.move (viewpage-1)*nummer end if for j=1 to nummer/3 if rs.eof or rs.bof then exit for response.write vbcrlf&"<tr valign=top>" for i=1 to 3 if rs.eof or rs.bof then exit for response.write vbcrlf&"<td width='33%' align=center>"&shop_view()&"</td>" rs.movenext next response.write vbcrlf&"</tr><tr><td height=5></td></tr><tr><td height=1 colspan=3 background='images/bg_dian.gif'></td></tr><tr><td height=5></td></tr>" next rs.close:set rs=nothing %> </table> <table border=0 width='100%'> <tr height=25> <td width='30%' align=center> 共 <font class=red><%=rssum%></font> 个</td> <td align=center>页次:<font class=red><%response.write viewpage%></font>/<font class=red><%response.write thepages%></font> 分页:<%response.write jk_pagecute(nummer,thepages,viewpage,pageurl,8,"#ff0000")%></td> </tr> </table> <% end sub function shop_view() nid=rs("id") shop_view=vbcrlf&"<table border=0 width='90%' cellspacing=0 cellpadding=0 class=tf>" & _ vbcrlf&"<tr><td height=5></td></tr>" & _ vbcrlf&"<tr><td colspan=2 align=center><a href='shop_view.asp?id="&nid&"'><img src='"&url_true(upload_file,rs("smallimg"))&"' border=0 width=125 height=100></a></td></tr>" & _ vbcrlf&"<tr><td colspan=2 align=center height=25><a href='shop_view.asp?id="&nid&"' class=blue><b>"&rs("name")&"</b></a></td></tr>" & _ vbcrlf&"<tr><td colspan=2 align=center>"&img_small("jt0")&"会员价格:<font class=red>¥<u>"&rs("price_2")&"</u></font> <font class=gray>¥<i>"&rs("price_1")&"</i></font></td></tr>" & _ vbcrlf&"<tr><td colspan=2 align=center height=30><a href='shop_bag.asp?id="&nid&"'><img align=absMiddle src='images/small/buy.gif' border=0></a> [ <a href='shop_view.asp?id="&nid&"'>详细介绍</a> ]</td></tr>" & _ vbcrlf&"</table>" 'vbcrlf&"<tr><td colspan=2 align=center>"&rs("brand")&"</td></tr>" & _ 'vbcrlf&"<tr><td width='50%'>"&img_small("jt0")&"商品编号:</td><td width='50%'>"&rs("serial")&"</td></tr>" & _ 'vbcrlf&"<tr><td>"&img_small("jt0")&"商品库存:</td><td class=red>"&rs("stock")&"</td></tr>" & _ 'vbcrlf&"<tr><td colspan=2 class=bw height=50 valign=top>商品简介:"&code_html(rs("remark_1"),1,35)&"</td></tr>" & _ end function %> 2) <!-- #include file="include/config_shop.asp" --> <!-- #include file="include/conn.asp" --> <% dim pid,num,sum,buttoncan,shop_session,sdim,snum,tid,tnum,tprice,tprices tit="购 物 车" call web_head(0,0,0,0,0) shop_session=trim(request.cookies(web_cookies)("shop")) pid=trim(request.querystring("id")) if isnumeric(pid) then sql="select name from product where hidden=1 and id="&pid set rs=conn.execute(sql) if not(rs.eof and rs.bof) then if len(shop_session)<1 then shop_session=pid&",1" else if int(instr("#"&shop_session,"#"&pid&","))<1 then shop_session=shop_session&"#"&pid&",1" end if end if response.cookies(web_cookies)("shop")=shop_session if request.cookies(web_cookies)("iscookies")="yes" then response.cookies(web_cookies).expires=date+365 end if end if rs.close:set rs=nothing end if action=trim(request.querystring("action")) select case action case "shopbag" shop_session="" pid=replace(trim(request.form("pid")),", ",",") sdim=split(pid,",") snum=ubound(sdim) for i=0 to snum tnum=trim(request.form("num"&sdim(i))) if not(isnumeric(tnum)) then tnum=1 if len(shop_session)<1 then shop_session=sdim(i)&","&tnum else if int(instr("#"&shop_session,"#"&sdim(i)&","))<1 then shop_session=shop_session&"#"&sdim(i)&","&tnum end if end if response.cookies(web_cookies)("shop")=shop_session if request.cookies(web_cookies)("iscookies")="yes" then response.cookies(web_cookies).expires=date+365 end if next erase sdim case "clear" shop_session="" response.cookies(web_cookies)("shop")=shop_session if request.cookies(web_cookies)("iscookies")="yes" then response.cookies(web_cookies).expires=date+365 end if end select '------------------------------------left---------------------------------- call format_login() call shop_sort() call shop_left() '----------------------------------left end-------------------------------- call web_center(0) '-----------------------------------center--------------------------------- response.write ukong %> <table border=0><tr><td class=red height=30>以下是您所选购的物品清单</td></tr></table> <%response.write table1%> <tr height=22<%response.write table2%> align=center> <td width='6%' class=end><b>购买</td> <td width='22%' class=end><b>产品编号</td> <td width='38%' class=end><b>产品名称</td> <td width='12%' class=end><b>产品单价</td> <td width='10%' class=end><b>数量</td> <td width='12%' class=end><b>产品总价</td> </tr> <form name=shop_frm action='shop_bag.asp?action=shopbag' method=post> <% sum=0 buttoncan=" disabled" sdim=split(shop_session,"#") snum=ubound(sdim) for i=0 to snum tid=left(sdim(i),instr(sdim(i),",")-1) tnum=right(sdim(i),len(sdim(i))-instr(sdim(i),",")) sql="select serial,name,price_1,price_2 from product where hidden=1 and id="&tid set rs=conn.execute(sql) if not(rs.eof and rs.bof) then if login_mode="" then tprice=rs("price_1") else tprice=rs("price_2") end if tprices=tprice*tnum sum=sum+tprices %> <tr align=center<%response.write table3%>> <td><input type=checkbox name=pid value='<%response.write tid%>' checked class=bg_1></td> <td><%response.write rs("serial")%></td> <td><%response.write rs("name")%></td> <td><%response.write pu&tprice%> </td> <input type=hidden name=numm<%response.write tid%> value='<%response.write tnum%>'> <td><input type=text name=num<%response.write tid%> value='<%response.write tnum%>' size=4 onKeyUp="javascript:shop_checknum(num<%response.write tid%>,numm<%response.write tid%>);"></td> <td><%response.write pu&tprices%></td> </tr> <% buttoncan="" end if rs.close:set rs=nothing next erase sdim %> <tr<%response.write table4%>><td align=right colspan=6 height=25 class=red>总价格: <%response.write pu&sum%> </td></tr> <tr<%response.write table3%>><td colspan=6 align=center height=40> <input type=submit value='确认更改'<%response.write buttoncan%>> <input type=button value='继续购物' onclick="location.href='shop.asp';"> <input type=button value='清空购物车' onclick="javascript:shop_clear();"<%response.write buttoncan%>> <input type=button value='去收银台' onclick="location.href='shop_pay.asp';"<%response.write buttoncan%>> </td></tr> </form> </table> <script language="Javascript"> <!-- function shop_fucchecknum(num) { var i,j,strTemp="0123456789"; if (num.length== 0) return 0 for (i=0;i<num.length;i++) { j=strTemp.indexOf(num.charAt(i)); if (j==-1) return 0; } return 1; } function shop_clear(){ if (confirm("确定要清空购物车?")==1){ window.location.href="shop_bag.asp?action=clear"} } function shop_checknum(num1,num2) { if ((shop_fucchecknum(num1.value)==0) ) { num1.value=num2.value; return false; } } function shop_checknumnull(num1) { if (num1.value=="") { alert("请填写购买产品的数量"); theform.focus(); return false; } } //--> </SCRIPT> <table border=0><tr><td class=red height=30>注意:改变商品数量和减少商品种类需按“确认更改”按钮</td></tr></table> <% '---------------------------------center end------------------------------- call web_end(0) %> 3) 请帮我看一下这几个页面有什么问题 <!-- #include file="include/config_shop.asp" --> <!-- #include file="include/jk_pagecute.asp" --> <!-- #include file="include/conn.asp" --> <% dim nid,nummer,page,rssum,thepages,viewpage,pageurl,sqladd call cid_sid() if cid=0 then if action="search" then tit="查询结果" tit_fir=tit_fir else tit=tit_fir tit_fir="" end if else if action="search" then tit="查询结果" tit_fir=tit_fir else tit="分类浏览" tit_fir=tit_fir end if end if call web_head(0,0,0,0,0) '------------------------------------left---------------------------------- call format_login() call shop_sort() call shop_left() '----------------------------------left end-------------------------------- call web_center(0) '-----------------------------------center--------------------------------- response.write ukong call shop_sea() %> <table border=0 width='98%' align=center> <tr><td align=center> <% if cid=0 then if action="search" then call shop_list() else call shop_main() end if else call shop_list() end if %> </td></tr> <tr><td align=center></td></tr> </table> <% '---------------------------------center end------------------------------- call web_end(0) sub shop_main() %> <table border=0 width='100%' cellspacing=0 cellpadding=0> <tr><td><table border=0 cellspacing=0 cellpadding=0 width='100%'><tr><td width=100 align=center height=20 bgcolor=<%response.write web_var(web_color,2)%> class=black><b>商品推荐</b></td><td> </td></tr></table></td></tr> <tr><td height=1 background='images/bg_dian.gif'></td></tr> <tr><td height=5></td></tr> </table> <table border=0 width='98%' cellspacing=0 cellpadding=0><tr valign=top> <% sql="select top 3 id,name,serial,brand,stock,smallimg,price_1,price_2,remark_1 from shop where isgood=1 and hidden=1 order by tim desc,id desc" set rs=conn.execute(sql) do while not rs.eof response.write vbcrlf&"<td width='33%' align=center>"&shop_view()&"</td>" rs.movenext loop rs.close %></tr></table> <table border=0 width='100%' cellspacing=0 cellpadding=0> <tr><td height=10></td></tr> <tr><td><table border=0 cellspacing=0 cellpadding=0 width='100%'><tr><td width=100 align=center height=20 bgcolor=<%response.write web_var(web_color,2)%> class=black><b>最新商品</b></td><td align=right><a href='#top'><img src='images/small/gotop.gif' border=0></a></td></tr></table></td></tr> <tr><td height=1 background='images/bg_dian.gif'></td></tr> <tr><td height=5></td></tr> </table> <table border=0 width='100%' cellspacing=0 cellpadding=0> <% sql="select top 6 id,name,serial,brand,stock,smallimg,price_1,price_2,remark_1 from shop where hidden=1 order by id desc" set rs=conn.execute(sql) do while not rs.eof response.write vbcrlf&"<tr valign=top>" for i=1 to 3 if rs.eof or rs.bof then exit for response.write vbcrlf&"<td width='33%' align=center>"&shop_view()&"</td>" rs.movenext next response.write vbcrlf&"</tr><tr><td height=1 colspan=3 background='images/bg_dian.gif'></td></tr>" loop rs.close:set rs=nothing response.write vbcrlf&"</table>" end sub sub shop_list() dim j,sea_type,keyword pageurl="shop.asp?action="&action&"&":sqladd="" thepages=0:viewpage=1:nummer=6 sea_type=trim(request.querystring("sea_type")) keyword=replace(trim(request.querystring("keyword")),"'","") if cid>0 then sqladd=" and c_id="&cid pageurl=pageurl&"c_id="&cid&"&" if sid>0 then sqladd=sqladd&" and s_id="&sid pageurl=pageurl&"s_id="&sid&"&" end if end if if len(keyword)>0 and (sea_type="name" or sea_type="brand" or sea_type="remark_1") then sqladd=sqladd&" and "&sea_type&" like '%"&keyword&"%'" pageurl=pageurl&"keyword="&server.htmlencode(keyword)&"&sea_type="&sea_type&"&" end if %> <table border=0 width='100%' cellspacing=0 cellpadding=0> <tr><td height=10></td></tr> <tr><td><table border=0 cellspacing=0 cellpadding=0 width='100%'><tr><td width=100 align=center height=20 bgcolor=<%response.write web_var(web_color,2)%> class=black><b>商品列表</b></td><td> <font class=red><%=nummer%></font> 个/页</td></tr></table></td></tr> <tr><td height=1 background='images/bg_dian.gif'></td></tr> <tr><td height=5></td></tr> </table> <table border=0 width='98%' cellspacing=0 cellpadding=0> <% sql="select id,name,serial,brand,stock,smallimg,price_1,price_2,remark_1 from shop where hidden=1"&sqladd&" order by id desc" set rs=server.createobject("adodb.recordset") rs.open sql,conn,1,1 if rs.eof and rs.bof then rssum=0 else rssum=rs.recordcount end if call format_pagecute() if int(viewpage)>1 then rs.move (viewpage-1)*nummer end if for j=1 to nummer/3 if rs.eof or rs.bof then exit for response.write vbcrlf&"<tr valign=top>" for i=1 to 3 if rs.eof or rs.bof then exit for response.write vbcrlf&"<td width='33%' align=center>"&shop_view()&"</td>" rs.movenext next response.write vbcrlf&"</tr><tr><td height=5></td></tr><tr><td height=1 colspan=3 background='images/bg_dian.gif'></td></tr><tr><td height=5></td></tr>" next rs.close:set rs=nothing %> </table> <table border=0 width='100%'> <tr height=25> <td width='30%' align=center> 共 <font class=red><%=rssum%></font> 个</td> <td align=center>页次:<font class=red><%response.write viewpage%></font>/<font class=red><%response.write thepages%></font> 分页:<%response.write jk_pagecute(nummer,thepages,viewpage,pageurl,8,"#ff0000")%></td> </tr> </table> <% end sub function shop_view() nid=rs("id") shop_view=vbcrlf&"<table border=0 width='90%' cellspacing=0 cellpadding=0 class=tf>" & _ vbcrlf&"<tr><td height=5></td></tr>" & _ vbcrlf&"<tr><td colspan=2 align=center><a href='shop_view.asp?id="&nid&"'><img src='"&url_true(upload_file,rs("smallimg"))&"' border=0 width=125 height=100></a></td></tr>" & _ vbcrlf&"<tr><td colspan=2 align=center height=25><a href='shop_view.asp?id="&nid&"' class=blue><b>"&rs("name")&"</b></a></td></tr>" & _ vbcrlf&"<tr><td colspan=2 align=center>"&img_small("jt0")&"会员价格:<font class=red>¥<u>"&rs("price_2")&"</u></font> <font class=gray>¥<i>"&rs("price_1")&"</i></font></td></tr>" & _ vbcrlf&"<tr><td colspan=2 align=center height=30><a href='shop_bag.asp?id="&nid&"'><img align=absMiddle src='images/small/buy.gif' border=0></a> [ <a href='shop_view.asp?id="&nid&"'>详细介绍</a> ]</td></tr>" & _ vbcrlf&"</table>" 'vbcrlf&"<tr><td colspan=2 align=center>"&rs("brand")&"</td></tr>" & _ 'vbcrlf&"<tr><td width='50%'>"&img_small("jt0")&"商品编号:</td><td width='50%'>"&rs("serial")&"</td></tr>" & _ 'vbcrlf&"<tr><td>"&img_small("jt0")&"商品库存:</td><td class=red>"&rs("stock")&"</td></tr>" & _ 'vbcrlf&"<tr><td colspan=2 class=bw height=50 valign=top>商品简介:"&code_html(rs("remark_1"),1,35)&"</td></tr>" & _ end function %> |
地主 发表时间: 11/26 18:03 |
回复: Final [bwq2008] 论坛用户 | 登录 |
你要把我累死呀!你说有什么毛病呀!然后我根据错误找,我先谢了! |
B1层 发表时间: 11/26 18:56 |
回复: Runwin.Y [runwin] 论坛用户 | 登录 |
就算有问题你也不知道,你说: <!-- #include file="include/config_shop.asp" --> <!-- #include file="include/jk_pagecute.asp" --> <!-- #include file="include/conn.asp" --> 文件呢?。。。。 |
B2层 发表时间: 11/26 19:15 |
回复: gerry [gerry] 版主 | 登录 |
SORRY呀,是这样的,这三个页面里当点加入购物车时,我在这里设置为让他们生成网页订单,而数据也存放在数据库的SHOP表里,但好像始终加不进数据库。真的搞不懂呢 |
B3层 发表时间: 11/27 16:01 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号