www.gusucode.com > 凡人网络购物系统 2008源码程序 > views.asp

    <!--#include file="conn.asp"-->
<!--#include file="IncAsp/all_pay.asp"-->
<%
hw_id=Request("hw_id")
chkid(hw_id)
set rs=conn.execute("select hw_name,sort_id,hw_keyword,hw_price2,pinpai_id from venshop_hw where hw_id="&hw_id&"")
if not rs.eof then
hw_name=rs("hw_name")
if rs("hw_keyword")<>"" then
hw_keyword=rs("hw_keyword")
else
hw_keyword=rs("hw_name")
end if
sort_id=rs("sort_id")
pinpai_id=rs("pinpai_id")
hw_price2=rs("hw_price2")
shw_id=1
else
shw_id=0
end if
rs.close
set rs=nothing
if sort_id<>"" and sort_id<>0 then
set rs=conn.execute("select sort_skin,sort_name,ziduan from venshop_sort where sort_id="&sort_id&"")
if not rs.eof then
if rs("sort_skin")<>"" then
venshop_skin=rs("sort_skin")
end if
sort_name=rs("sort_name")
sort_ziduan=rs("ziduan")
end if
rs.close
set rs=nothing
end if
%>
<!--#include file="IncAsp/venshop_top.asp"-->
<div align="center">
<table border=0 cellpadding=0 cellspacing=0 class="all_t1">
<tr><td width=197 align="center" valign="top">
<!--#include file="IncAsp/venshop_log.asp"--><div class="d5"></div>
<%if shw_id=1 then%><!--#include file="IncAsp/View_inl.asp"--><%end if%></td>
<td valign="top" align="center"> 
<%Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from venshop_hw where hw_id="&hw_id&""
rs.open sql,conn,1,3
if rs.eof then%>
<TABLE width="99%" border=0 cellPadding=0 cellSpacing=0><tr><td height="200" colspan="3" align="center">
没有找到你要查看的商品,您可以<a href="search.asp"><font color="#FF0000">点击这里进行详细搜索</font></a>!</td></tr></table>
<%else
rs("hw_views")=rs("hw_views")+1
rs.update
sort_zd=split(sort_ziduan,"##")
ziduan=split(rs("ziduan"),"##")
nsort_id=rs("nsort_id")
if nsort_id<>0 then
Set rs2=Server.CreateObject("ADODB.Recordset")
sql="select nsort_name from venshop_nsort where nsort_id="&nsort_id&""
rs2.open sql,conn,1,1
nsort_name=rs2("nsort_name")
rs2.close
set rs2=nothing
end if
if pinpai_id<>0 then
Set rs2=Server.CreateObject("ADODB.Recordset")
sql="select pinpai_name from venshop_pinpai where pinpai_id="&pinpai_id&""
rs2.open sql,conn,1,1
pinpai_name=rs2("pinpai_name")
rs2.close
set rs2=nothing
end if
if session("recent")="" then
session("recent")=hw_id
elseif session("recent")<>"" then
  recentid=split(session("recent"),"/")
  for i=0 to ubound(recentid) 
  if hw_id=recentid(i) then
  jiaru=1
  end if
  next
if jiaru<>1 then
session("recent")=hw_id&"/"&session("recent")
end if
end if%>

<TABLE width="99%" border=0 cellPadding=0 cellSpacing=0>
<tr><td class="sort">&nbsp;<IMG src="Skin/<%=venshop_skin%>/home.gif" border=0 align="absmiddle"> 您的位置:  
	<a href="index.asp">首页</a> >>&nbsp;<a href="sort.asp?sort_id=<%=sort_id%>"><%=sort_name%></a> >> 
<%if nsort_id<>0 then%><a href="nsort.asp?sort_id=<%=sort_id%>&nsort_id=<%=nsort_id%>"> <%=nsort_name%></a> >> <%end if%>
<%if pinpai_id<>0 then%><a href="pinpai.asp?pinpai_id=<%=pinpai_id%>"> <%=pinpai_name%></a> >> <%end if%>
<%=rs("hw_name")%></td>
</tr></table>
<table width="99%" cellspacing="0" cellpadding="0">
<tr><td align="center" height="2"></td></tr>
<tr><td align="center">
<table cellspacing="0" cellpadding="5" width="100%"><tr> 
<td align="center" style="border-right: 1px dotted #C0C0C0">
<%pic=split(rs("hw_pic"),"*")%>
<img style="CURSOR: hand" src="<%=pic(2)%>" onerror="this.src='img/noimage.jpg';cur_pic_id='img/noimage.jpg';" name="rImage" onclick="javascript:window.open(cur_pic_id,'','')" border="0"<%=view_wh%>>
<p style="line-height: 150%; margin: 5px">
<%
if 2<=int(ubound(pic)) then
sp=0
for i=2 to ubound(pic)
sp=sp+1%>
<img style="CURSOR: hand"<%if sp=1 then%> onload="cur_pic_id='<%=trim(pic(i))%>';"<%end if%> onmouseover="document.rImage.src='<%=trim(pic(i))%>';cur_pic_id='<%=trim(pic(i))%>';"  src="<%=trim(pic(i))%>" onerror="this.src='img/noimage.jpg'"  height="50" style="border: 1px solid #CCCCCC;">
<%next
else%>
<script>
cur_pic_id='<%=pic(2)%>';
</script>
<%end if%></td>
<td valign="top" width="300">
<table border="0" cellpadding="3" cellspacing="0" id="table1" width="280">
<tr><td class="vtitle"><%=rs("hw_name")%></td></tr>
<tr><td height="2" background="img/dot_menu.gif"></td></tr>
<tr><td height=5></td></tr>
<%if pinpai_id<>0 then%><tr><td>商品品牌:<a href="pinpai.asp?pinpai_id=<%=pinpai_id%>"><%=pinpai_name%></a></td></tr><%end if%>
<%if rs("hw_sn")<>"" then%><tr><td>商品编号:<%=rs("hw_sn")%></td></tr><%end if%>
<tr><td>产品积分:<font color="#D03430"><%=rs("hw_jifen")%></font></td></tr>
<%if showc=1 then
for i=0 to ubound(sort_zd)
if sort_zd(i)<>"" then%>	
<tr><td><%=sort_zd(i)%>:<%=ziduan(i)%></td></tr>
<%end if
next
end if%>
<tr><td height=5></td></tr>
<tr><td height="2" background="img/dot_menu.gif"></td></tr>
<tr><td height=5></td></tr>
<tr><td>市场价格:<s><%=fuhao%> <%=trim(rs("hw_price1"))%> <%=danwei%></s></td></tr>
<tr><td>本站价格:<span class="price"><%=fuhao%> <%=trim(rs("hw_price2"))%> <%=danwei%></span></td></tr>
<tr><td>立即节省:<span class="price"><%=fuhao%> <%=trim(rs("hw_price1"))-trim(rs("hw_price2"))%> <%=danwei%></span></td></tr>
<form action="basket.asp?hw_id=<%=rs("hw_id")%>" method=post>
<%if rs("kxaa")<>"" and rs("kxab")<>"" then%><tr><td><%=rs("kxaa")%>:<select size="1" name="kxa"><%kxa=split(rs("kxab"),"/")
for i=0 to ubound(kxa)%><option value="<%=trim(kxa(i))%>"><%=trim(kxa(i))%></option><%next%></select></td></tr><%end if%>
<%if rs("kxba")<>"" and rs("kxbb")<>"" then%><tr><td><%=rs("kxba")%>:<select size="1" name="kxb"><%kxb=split(rs("kxbb"),"/")
for i=0 to ubound(kxb)%><option value="<%=trim(kxb(i))%>"><%=trim(kxb(i))%></option><%next%></select></td></tr><%end if%>
<tr><td>定购数量:<input type="text" name="count" size="5" value="1" class="input"></td></tr>
<tr><td height=5></td></tr>
<tr><td height="2" background="img/dot_menu.gif"></td></tr>
<tr><td height=5></td></tr>
<tr><td><input type=image src="Skin/<%=venshop_skin%>/buy.gif" name="I1">&nbsp;
<a href="com.asp?action=add&hw_id=<%=rs("hw_id")%>">
<img border="0" src="Skin/<%=venshop_skin%>/duibi.gif"></a><br>
<a href="fav.asp?action=add&hw_id=<%=rs("hw_id")%>">
<img border="0" src="Skin/<%=venshop_skin%>/shoucang.gif"></a></td></tr></form>

<tr>
<td><%Set rs2=Server.CreateObject("ADODB.Recordset")
rs2.open "select top 1 hw_id,hw_name from venshop_hw where hw_kucun>0 and sort_id="&sort_id&" and hw_id>"&hw_id&" order by hw_id asc",conn,1,1
if rs2.eof and rs2.bof then
response.write ""
else%>
<p style="margin-top: 3px; margin-bottom: 3px"><b>上一个商品:</b><a target="_blank"  href=views.asp?hw_id=<%=rs2("hw_id")%>><%=rs2("hw_name")%></a>
<%end if
rs2.close
set rs2=nothing%>
<%Set rs2=Server.CreateObject("ADODB.Recordset")
rs2.open "select top 1 hw_id,hw_name from venshop_hw where hw_kucun>0 and sort_id="&sort_id&" and hw_id<"&hw_id&" order by hw_id desc",conn,1,1
if rs2.eof and rs2.bof then
response.write ""
else%>
<p style="margin-top: 3px; margin-bottom: 3px"><b>下一个商品:</b><a target="_blank"  href=views.asp?hw_id=<%=rs2("hw_id")%>><%=rs2("hw_name")%></a>
<%end if
rs2.close
set rs2=nothing%></td></tr>
<tr><td height="2" background="img/dot_menu.gif"></td></tr>
<%if pay_tenpayo=1 then
	spid		= pay_tenpay
	sp_key		= pay_tenpayp
	cmdno		= "1"
	bill_date	= CFTGetServerDate
	bank_type	= "0"
	desc		= rs("hw_name")&"(包运费)"
	purchaser_id = ""
	bargainor_id = spid
	sp_billno	 = year(now())&right(month(now()),1)&right(day(now()),1)&right(hour(now()),1)&right(minute(now()),1)&right(second(now())+100,2)
	transaction_id = spid & bill_date & sp_billno 
	total_fee	 = (rs("hw_price2")+pay_fee)*100
	if bizhong="USD" then
	fee_type	 = "2"
	elseif bizhong="HKD" then
	fee_type	 = "3"
	else
	fee_type	 = "1"
	end if
	return_url	 = pay_url
	attach		 = "my_magic_string"
	sign_text = "cmdno=" & cmdno & "&date=" & bill_date & "&bargainor_id=" & bargainor_id &_
        "&transaction_id=" & transaction_id & "&sp_billno=" & sp_billno &_
        "&total_fee=" & total_fee & "&fee_type=" & fee_type & "&return_url=" & return_url &_
        "&attach=" & attach & "&key=" & sp_key
    md5_sign = UCase(ASP_MD5(sign_text))%>
<tr><td><table border="0" cellpadding="0" cellspacing="0">
<form action="http://portal.tenpay.com/cfbiportal/cgi-bin/cfbiin.cgi" target="_blank"><tr>
	<td colspan="2" align="center" height="30">
<input type=hidden name="cmdno"				value="<%=cmdno%>">
<input type=hidden name="date"			    value="<%=bill_date%>">
<input type=hidden name="bank_type"			value="<%=bank_type%>">
<input type=hidden name="desc"				value="<%=desc%>">
<input type=hidden name="purchaser_id"		value="<%=purchaser_id%>">
<input type=hidden name="bargainor_id"		value="<%=bargainor_id%>">
<input type=hidden name="transaction_id"	value="<%=transaction_id%>">
<input type=hidden name="sp_billno"			value="<%=sp_billno%>">
<input type=hidden name="total_fee"			value="<%=total_fee%>">
<input type=hidden name="fee_type"			value="<%=fee_type%>">
<input type=hidden name="return_url"		value="<%=return_url%>">
<input type=hidden name="attach"			value="<%=attach%>">
<input type=hidden name="sign"				value="<%=md5_sign%>">
<input type=image border="0" src="img/pay/tenpay.gif">
</td></tr></form></table></td></tr>
<%end if%>
<tr><td>
<%if pay_zhifubaoo=1 then%><a target="_blank" href="alipayindex_a.asp?ProductName=<%=rs("hw_name")%>(包运费)&prices=<%=rs("hw_price2")+pay_fee%>" target="_blank"><img border="0" src="img/pay/alipay_buy.gif"></a> <%end if%>
<%if pay_paypalo=1 then%><a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=<%=pay_paypal%>&item_name=<%=rs("hw_name")%>(包运费)&item_number=<%=rs("hw_name")%>&amount=<%=rs("hw_price2")+pay_fee%>&currency_code=<%=bizhong%>" target="_blank"><img border="0" src="img/pay/paypal_buy.gif"></a><%end if%>
</td></tr></table>
</td></tr></table>
<!--#include file="IncAsp/View_in.asp"-->
</td>
</tr></table><%end if
rs.close%>
</td></tr></table></div><!--#include file="IncAsp/venshop_copy.asp"-->