⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 to.asp

📁 购物系统(本版为正式商业版
💻 ASP
字号:
<!--
┌─9911.com.cn────────────┐
│  动感购物 WWW.9911.com.cn 版权所有  │
│  动感购物2005Vb  联系:web@snsn.net │
└───────────9911.com.cn──┘
-->
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="fuction.asp"-->
<!--#include file="webtop.asp"-->
      <%
if session("username")="" then
response.write "<script language=javascript>alert('对不起,您还没有登陆!');window.history.go(-1);</script>"
response.End
end if
dim shopid,username,action
action=nosql(request.QueryString("action"))
username=nosql(session("username"))
shopid=nosql(request.QueryString("id"))
'//删除收藏
select case action
case "del"
if Not isChkInteger(request.QueryString("actionid")) then
	%>
	<script language=javascript>
		alert("参数错误!");
		window.close();
	</script>
	<%
	response.end
end if

conn.execute "delete from shop_action where actionid="&nosql(request.QueryString("actionid"))
response.redirect "to.asp?action=show"
response.End
case "add"
'//对比,判断是否存在
if not isChkInteger(shopid) then
%>
<script language=javascript>
		alert("参数错误!");
		window.close();
	</script>
	      <%
response.end
end if

set rs3=server.CreateObject("adodb.recordset")
rs3.open "select shopid,username from shop_action where username='"&checkFFSQLStr(username)&"' and shopid="&shopid&" and zhuangtai=8",conn,1,1
if not rs3.eof and not rs3.bof then
response.write "<script language=javascript>alert('对不起,此商品已存在于您的对比架中,不可以重复添加!');window.location.href='to.asp?action=show';</script>"
response.end
end if
rs3.close
set rs3=nothing
'//判断对比数
 set rs3=server.CreateObject("adodb.recordset")
rs3.open "select shopid,username from shop_action where username='"&checkFFSQLStr(username)&"' and zhuangtai=8",conn,1,1
if rs3.recordcount>=5 then
  response.write "<script language=javascript>alert('对不起,您最多只能对比五件商品!');window.location.href='to.asp?action=show';</script>"
  response.end
else
  rs3.close
  set rs3=nothing
'//添加对比
  set rs=server.CreateObject("adodb.recordset")
  rs.open "select shopid,username,zhuangtai,zonger from shop_action",conn,1,3
  rs.addnew
  rs("shopid")=shopid
  rs("username")=username
  rs("zhuangtai")=8
  rs("zonger")=0
  rs.update
  rs.close
  response.Redirect "to.asp?action=show"
  set rs=nothing
end if

case "show"
'//////////////////%><html>
<head> 
<title><%=webname%>--我的对比架</title>
<link rel="SHORTCUT ICON" href="/shortcut.ico">
<meta name="generator" content="snsn-shop">
<meta name=keywords content="<%=webgjz%>">
<meta name="description" content="<%=webmx%>">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta http-equiv="MSThemeCompatible" content="Yes">
<link href="/css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status='【<%=webname%>】<%=weburl%> 如果您喜欢本站,别忘了把本站介绍给您的好友哦!:)';return true"> 
<table width="940" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
  <tr>
    <td width="17"><img src="/img/index_1.gif" width="15" height="16"></td>
    <td valign="bottom">您现在的位置是:<a href="<%=weburl%>"><%=webname%></a> -> <span class="table-shangxia">我的对比架</span></td>
    <td valign="bottom"> 
       
    </td>
  </tr>
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
</table>
<table width="945" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="center" valign="top">
            <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="8"></td>
              </tr>
            </table> <form name='form1' method='post' action="sctogw.asp">
            <%
set rs=server.CreateObject("adodb.recordset")
rs.open "select shop_action.actionid,shop_action.shopid,shop_snsn.shopname,shop_snsn.shichangjia,shop_snsn.huiyuanjia,shop_snsn.vipjia,shop_snsn.dazhe from shop_snsn inner join  shop_action on shop_snsn.shopid=shop_action.shopid where shop_action.username='"&checkFFSQLStr(session("username"))&"' and shop_action.zhuangtai=8",conn,1,1 
%>  
           <table border="0" align="center" cellpadding="0" cellspacing="0">
             <tr><td height="1" bgcolor="#CCCCCC"></td></tr><tr><td width="1" bgcolor="#CCCCCC"></td><td width="5"></td><%do while not rs.eof%><td>   
            <%set rs2=server.CreateObject("adodb.recordset")
			   rs2.open "select * from shop_snsn where shopid = "&rs("shopid"),conn,1,3
			   if rs2.EOF or rs2.bof  then
response.write"对不起,该商品不存在或已经删除"
else
sftc=rs2("sftc")
dq_2=rs2("dq")
dq_2=split(dq_2,",")
dq1=dq_2(0)
dq2=dq_2(1)
dq3=dq_2(2)
dq4=dq_2(3)
psdq_2=rs2("psdq")
psdq_2=split(psdq_2,",")
psdq1=psdq_2(0)
psdq2=psdq_2(1)
psdq3=psdq_2(2)
psdq4=psdq_2(3)
shopname=rs2("shopname")
zhuang=rs2("zhuang")
shoppic=rs2("shoppic")
shichangjia=rs2("shichangjia")
huiyuanjia=rs2("huiyuanjia")
pifajia=rs2("pifajia")
vipjia=rs2("vipjia")
mch=rs2("mch")
kucun=rs2("kucun")
isbn1=rs2("isbn1")
isbn=rs2("isbn")
jj=rs2("jj")
shopchuban=rs2("shopchuban")
cj=rs2("cj")
cjname=rs2("cjname")
gj=rs2("gj")
gjz=rs2("gjz")
pingjizong=rs2("pingjizong")
pingji=rs2("pingji")
ps=rs2("ps")
yeshu=rs2("yeshu")
x1=rs2("x1")
x2=rs2("x2")
x3=rs2("x3")
x4=rs2("x4")
x5=rs2("x5")
x6=rs2("x6")
y1=rs2("y1")
y2=rs2("y2")
y3=rs2("y3")
y4=rs2("y4")
y5=rs2("y5")
y6=rs2("y6")
shopid=rs2("shopid")
shopcontent=rs2("shopcontent")
newsshop=rs2("newsshop")
bestshop=rs2("bestshop")
tejiashop=rs2("tejiashop")
cxiaoshop=rs2("cxiaoshop")
hot=rs2("liulancount")
xiao=rs2("chengjiaocount")%><table border="0" align="center" cellpadding="0" cellspacing="0">
             <tr><td height="<%=upload14+10%>">
                <%if zhuang="" then%>
                <img src=img/emptyshop.gif border=0>
                <%else%>
                <img src=<%=shoppic%> width="<%=upload13%>" height="<%=upload14%>" border=0>
                <%end if%></td> 
              </tr>
              <tr>
                <td><span class="style4"><font color="#ff6600"><a href="list.asp?id=<%=shopid%>" title="<%=shopname%>"><%if len(shopname)>11 then
	response.write left(shopname,11)&""
	else
	response.write trim(shopname)
	end if%></a></font></span></td>
              </tr> <tr>
                <td><strong><%=jiagename1%>:</strong><s>¥<%=formatnumber(shichangjia,2)%>元</s></td>
              </tr>
              <tr>
                <td><font color="#FF0000"><font color="#FF0000"><strong><%=jiagename2%>:</strong>¥<%=formatnumber(huiyuanjia,2)%>元 (
                      <%response.write round(huiyuanjia/shichangjia,2)*10&"折"%>
)</font></font></td>
              </tr>
              <tr>
                <td><font color="#FF0000"><font color="#FF0000"><strong><%=jiagename3%>:</strong>¥<%=formatnumber(Vipjia,2)%>元 (
                      <%response.write round(vipjia/shichangjia,2)*10&"折"%>
)</font></font></td>
              </tr> <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>【状态】
                  <%if kucun>0 then%>
上架
<%else%>
<font color="#FF0000">缺货</font>
<%end if%></td>
              </tr>
              <tr>
                <td>【<%=isbn1%>】<%=isbn%></td>
              </tr>
              <tr>
                <td>【<%=jj%>】<%=shopchuban%></td>
              </tr>
              <tr>
                <td>【<%=cj%>】<%=cjname%></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>【评分】
                  <%if pingjizong>0 and pingji>0 then
xx=pingjizong\pingji
else
xx=5
end if
response.write "<img src=img/pingji/"&xx&".gif alt=评论星级>"%></td>
              </tr>
              <tr>
                <td>【赠送积分】<%=yeshu%></td>
              </tr>
             
              <tr>
                <td><input name="newsshop" type="checkbox" id="newsshop" value="1" <%if newsshop=1 then%>checked<%end if%> DISABLED>
新品
  <input name="bestshop" type="checkbox" id="newsshop" value="1" <%if bestshop=1 then%>checked<%end if%> DISABLED>
推荐</td>
              </tr>
              <tr>
                <td><input name="tejiashop" type="checkbox" id="tejiashop" value="1" <%if tejiashop=1 then%>checked<%end if%> DISABLED>
特价
  <input name="cxiaoshop" type="checkbox" id="tejiashop" value="1" <%if cxiaoshop=1 then%>checked<%end if%> DISABLED>
促销 </td>
              </tr>
              <tr>
                <td><input name=shopid type=checkbox checked value=<%=rs("shopid")%> >
                <a href=to.asp?action=del&actionid=<%=rs("actionid")%>><img src=img/trash.gif width=18 height=18 border=0></a></td>
              </tr>
              <tr>
                <td></td>
              </tr>
            </table>  
             </td><td width="5"></td><td width="1" bgcolor="#CCCCCC"></td><td width="5"></td>
             <%end if
rs.movenext
loop
rs.close
set rs=nothing
%>        
              </tr>
            </table><br><br><input name="Submit2" type="submit" class="go-wenbenkuang" value="放入购物车" onFocus="this.blur()">
                <input name="Submit32" type="button" class="go-wenbenkuang" value="返回继续购物" onClick="javascript:window.history.go(-1)">
            </form>
            <p>
            <script language="Javascript">
function closeinfo(){window.close();}
setTimeout("closeinfo()", 600000);
            </script>
            <%
end select%>
            </p>
          <p>&nbsp;            </p></td>
        </tr>
    </table></td>
  </tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
function checkk()
{
   if(checkspace(document.form2.searchkey.value)&&((document.form2.action.value=="3")||(document.form2.action.value=="1")))  {
	document.form2.searchkey.focus();
	alert("请输入查讯关键字!");
	return false;
  }
   document.form2.submit();
}

//-->
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -