<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>品牌</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
td{font-size:9pt;line-height: 160%;}
body {
	margin-top: 5px;margin-left: 2px;
	font-size:9pt;
}
.style3 {color: #A84E22; font-weight: bold; }
#tabcss{
	BORDER-COLLAPSE: collapse;
	border-top-width: 1px;
	border-left-width: 1px;
	border-top-style: solid;
	border-left-style: solid;
	border-top-color: #dddddd;
	border-left-color: #dddddd;
}#tabcss td {
	line-height: 24px;
	padding-left: 10px;
	padding-top: 2px;
	padding-bottom: 2px;
	color: #333333;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-right-style: solid;
	border-bottom-style: solid;
	border-right-color: #dddddd;
	border-bottom-color: #dddddd;
}
.img1 {
	BORDER: #dddddd 1px solid; 
}
.nowprice {
	FONT-WEIGHT: bold; FONT-SIZE: 13pt; COLOR: #f00; FONT-FAMILY: 'Century Gothic'; LETTER-SPACING: -1px; TEXT-DECORATION: none
}
-->
</style>
<script language="javascript">
<!--
function SetBgColor(Menu)
{
		Menu.style.background="#F3F3F5";
}
function RestoreBgColor(Menu)
{
		Menu.style.background="#ffffff";
}
-->
</script>
</head>

<body bgcolor="#fcfcfc">

<table width=150 border="0" align="left" cellpadding="0" cellspacing="0">
<tr > 
  <%
i=0
zuhepkid = trim(request("zuhepkid"))

if zuhepkid<>"" then
	zuhepkid = replace(zuhepkid,"，",",")
	zuhepkid = replace(zuhepkid,",,",",")
	zuhepkid = replace(zuhepkid,",,",",")
	zuhepkid = replace(zuhepkid,",,",",")
	zuhepkid = replace(zuhepkid,",,",",")
	zuhepkid = replace(zuhepkid," ","")
end if

if left(zuhepkid,1)="," then
	zuhepkid = mid(zuhepkid,2)
end if
if right(zuhepkid,1)="," then
	zuhepkid = left(zuhepkid,len(zuhepkid)-1)
end if

wrong=0
if zuhepkid="," or zuhepkid="" then
	wrong=1
end if

if zuhepkid<>"" then
  arr=split(zuhepkid,",")
  for i=0 to Ubound(arr)
    if arr(i)="" or not isnumeric(arr(i)) then
		wrong=1
	else
		myorder = myorder & ",iif(pkid="&arr(i)&","&i&",99)"
	end if
  next
end if

if left(myorder,1)="," then 
	myorder = mid(myorder,2)
end if
if myorder<>"" then
	myorder = " order by "&myorder
end if

if wrong=1 then
	response.write "<br>还没有填写pkid<br>或输入的pkid号不正确。"
	conn.close
	set conn=nothing
	response.end
end if

dim allprice1,allprice2
allprice1=0
allprice2=0



sql="select * from e_product where pkid in ("&zuhepkid&") "&myorder
'response.write sql
'response.end

set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.bof or rs.eof then
	response.write "<div align=left><br>没有此pkid："&zuhepkid&"的记录! </div>"
else
	s_picwidth = 145
	s_picheight = 170
	do while not rs.eof 
	pkid=rs("pkid")
	model=rs("model")
	productname=rs("productname")
	smallpicpath=rs("smallpicpath")
	price1=rs("price1")
	price2=rs("price2")
	allprice1 =  allprice1 + price1
	allprice2 =  allprice2 + price2
%>
  
    <td height="150" align=left>
		<div align="center" style="width:<%=s_picwidth+8%>px; padding:4px;" Onmouseover='return SetBgColor(this);' Onmouseout='return RestoreBgColor(this);'>
			<div align="center" style="margin-top:3px;"> 
				<A href="../show.asp?pkid=<%=pkid%>" target='_blank'> <IMG src="../product/<%=smallpicpath%>" width='<%=s_picwidth%>' height='<%=s_picheight%>' border="0" class=img1></A>
			</div>
			<DIV align="left" style="MARGIN-TOP: 2px; WIDTH: <%=s_picwidth%>px; height:43px;overflow: hidden;">
				<A href="../show.asp?pkid=<%=pkid%>"  target='_blank'><%=productname%></A>
			</DIV>
			<DIV align="left"><font class='nowprice'>￥<%=price2%></font>&nbsp;&nbsp;<FONT class='oldprice'><del>￥<%=price1%></del></FONT></DIV>
		</div>
	</td>
  
  <%
	rs.movenext
	i=i+1
	loop
end if
%>
  </tr>
  <%if wrong=0 then%>
  <tr height="50"><td>套餐市场价合计：<b>￥<%=allprice1%></b> <br> 套餐会员价合计：<font class='nowprice'>￥<%=allprice2%></font></td></tr>
  <%end if%>
</table>
<br><br>
</body>
</html>
<%
rs.close
set rs=nothing
call connclose
%>

