<!--#include file="conn.asp"-->
<%
'if s_head="head4.asp" or s_productkind="4" then
'	response.write "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">"
'else
	response.write "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.01 Transitional//EN"">"
'end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=application("sitename")%></title>
<link href="i.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--

.style1 {font-size: 14px}
.style11 {
	font-size: 14px;
	color: #990000;
	font-weight: bold;
}
.style12 {color: #990000}
.carsubmit{height:32px;width:100px;BORDER:0px; vertical-align:top;}

-->
</style>

<script language="javascript">
<!--
function SetBgColor(Menu)
{
		Menu.style.background="#F5F5F4";
}
function RestoreBgColor(Menu)
{
		Menu.style.background="#ffffff";
}
-->
</script>

</head>

<body>
<!-- #include file="head.asp" -->
<TABLE width="996" border=0 align="center" cellPadding=0 cellSpacing=0 bgcolor="#FFFFFF">
  <tr>
    <td> 
<table width="996" height="352" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
    <td width="210" height="184" valign="top">
		<!-- #include file="inc_left_all.asp" -->
      </td>
    <td width="780" valign="top">
	
      <TABLE width="100%" 
                  border=0 align="center" cellPadding=0 cellSpacing=2 class=a1>
        <TBODY>
          <TR>
            <TD width="100%" height=30 colSpan=1><TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 background="images/bg4.gif">
              <TBODY>
                <TR>
                          <TD width=155 
                            height=30 background=images/hotnewpro.gif><span class="style11">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;商品组合套餐</span></TD>
                          <TD width="534">&nbsp;</TD>
                          <TD width=57>&nbsp;</TD>
                </TR>
              </TBODY>
            </TABLE>
                    <TABLE width="100%" 
border=0 cellPadding=0 cellSpacing=0>
                      <TBODY>
                        <TR> 
                          <TD width=509 
                            height=50 background=images/buystep0.jpg><table width="538" border="0" cellspacing="0" cellpadding="0">
                              <tr> 
                                <td width="193" height="22">&nbsp;</td>
                                <td width="113"> <div align="center"><strong><font color="#FFFFFF">浏览商品</font></strong></div></td>
                                <td width="112"> <div align="center">购物车</div></td>
                                <td width="120"> <div align="center">结算</div></td>
                              </tr>
                            </table></TD>
                          <TD width="180">&nbsp;</TD>
                          <TD width=57>&nbsp;</TD>
                        </TR>
                      </TBODY>
                    </TABLE></TD>
          </TR>
		  </tbody>
		  </table>
<table border="0" width="100%" cellpadding="1" cellspacing="1" style="clear:both;">
<%
backid = request.QueryString("backid")
if backid<>"" then sqlcondition=" and pkid="&backid&""
sql="select * from e_product where zuheflag=1 "&sqlcondition&" order by pkid desc"

set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.bof or rs.eof then
	response.write "<div align=center><br>没有记录! </div>"
else
	rs.pagesize=6
	rs.absolutepage=1
	if request("page")<>"" then rs.absolutepage=request("page")
	rowcount=rs.pagesize
	
	do while not rs.eof and rowcount>0
	id=rs("pkid")
	model=rs("model")
	zuhename=rs("zuhename")
	zuheprice1=rs("price1")
	zuheprice2=rs("price2")
	productname=rs("productname")
	zuhepkid=rs("zuhepkid")
%>
<tr><td colspan=2 height=5></td></tr>	
<tr>
<td  bgcolor='#ffffff'>
		<table width=150 border="0" align="left" cellpadding="1" cellspacing="0" style="clear:both;">
		<tr> 
		<%
		myorder = ""
		allprice1=0
		allprice2=0
		h=1
		
		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
		
		sql2="select * from e_product where pkid in ("&zuhepkid&") "&myorder
		'response.write sql2
		'response.end
		set rs2=server.CreateObject("adodb.recordset")
		rs2.open sql2,conn,1,1
		if rs2.bof or rs2.eof then
			response.write "<div align=left><br>没有此pkid："&zuhepkid&"的记录! </div>"
		else
			s_picwidth = 145
			s_picheight = 170
			do while not rs2.eof 
			pkid=rs2("pkid")
			model=rs2("model")
			productname=rs2("productname")
			smallpicpath=rs2("smallpicpath")
			price1=rs2("price1")
			price2=rs2("price2")
			allprice1 =  allprice1 + price1
			allprice2 =  allprice2 + price2
			
			if h>1 then
				response.write "<td><IMG src='images/pro_zuhe.png' width='20' height='21' border=0></td>"
			end if
		%>
			<td height="<%=s_picwidth-5%>" align=center Onmouseover='return SetBgColor(this);' Onmouseout='return RestoreBgColor(this);'>
				
					<div align="center" style="margin-top:2px;text-align:center;"> 
						<A href="show.asp?pkid=<%=pkid%>" target='_blank'> <IMG src="product/<%=smallpicpath%>" width='<%=s_picwidth-5%>' height='<%=s_picheight-5%>' border="0" class=img1></A>
					</div>
					<DIV align="left" style="MARGIN-TOP: 2px; WIDTH: <%=s_picwidth%>px; height:39px;overflow: hidden;">
						<A href="show.asp?pkid=<%=pkid%>"  target='_blank'><%=productname%></A>
					</DIV>
					<DIV align="left"><font class='oldprice'>￥<%=price2%></font>&nbsp;&nbsp;<FONT class='oldprice'><del>￥<%=price1%></del></FONT></DIV>

			</td>
		  
		<%
			rs2.movenext
			h=h+1
			loop
		end if
		rs2.close
		set rs2=nothing
		if h<5 then
			for i = h to 4
				response.write "<td><IMG src='images/pro_zuhe.png' width='20' height='21' border=0></td>"
				response.write "<td align='center' valign='top'><div style='margin-top:3px;text-align:center;'><IMG src='images/prozuheblank.jpg' width='"&s_picwidth-5&"' height='"&s_picheight-5&"' border='0'></div></td>"
			next
		end if
		%>
		  </tr>
		</table>
		<table style="clear:both;"><TR> <TD height="8"></TD></TR></table>
</td>
<form name="formshow" action="order.asp" method="post" >
<td bgcolor='#ffffff'>
组合价：<font class='nowprice'><%=zuheprice2%></font><br><br>
原价：<font class='oldprice'><del><%=zuheprice1%></del></font><br><br>
节省：<font class='oldprice'><%=round(cdbl(zuheprice1)-cdbl(zuheprice2),2)%></font><br><br>
<INPUT type="hidden" name="pkid" value="<%=id%>">
<INPUT type="hidden" name="num" value="1"> 
<input type="image" name="Submit" value="Submit" src="images/gouwu.jpg" class="carsubmit"> <br><br>
</td>
</form>
</tr>
<tr><td colspan=2 height=2 bgcolor='#bbbbbb'></td></tr>
	

<%
	rs.movenext
	i=i+1
	rowcount=rowcount-1
	loop

%>
                          


<%
response.write "<table style='clear:both;'><TR> <TD height='8'></TD></TR></table>"

nowpage = trim(request("page"))
if nowpage="" then nowpage=1
nowpath=request.servervariables("script_name")
kind=server.URLEncode(kind)
response.write "<table width='620' align='center' border=0>"
  response.write "<tr> "
   response.write " <td width='470' height='22' align=right style='font-size:9pt;'> "
		response.write "共"&rs.recordcount&"条记录&nbsp;每页6条&nbsp;现在 "&nowpage&"/"&rs.pagecount &" 页&nbsp;"	
        response.write "<input type='button' name='Button3' value='' style='background-image:url(images/z1.jpg);width:37px;height:19px;border:0px;cursor:pointer' onclick=window.location.href='"&nowpath&"?kind="&kind&"&none='>&nbsp;"
        if clng(nowpage)>1 then
        response.write "<input type='button' name='Button4' value='' style='background-image:url(images/z2.jpg);width:45px;height:19px;border:0px;cursor:pointer' onclick=window.location.href='"&nowpath&"?page="&nowpage-1&"&kind="&kind&"&none='>&nbsp;"
        else
        response.write "<input type='button' name='Button4' value='' style='background-image:url(images/z2.jpg);width:45px;height:19px;border:0px;'>&nbsp;"
        end if
		if clng(nowpage)<>clng(rs.pagecount) then
        response.write "<input type='button' name='Button5' value='' style='background-image:url(images/z3.jpg);width:45px;height:19px;border:0px;cursor:pointer' onclick=window.location.href='"&nowpath&"?page="&nowpage+1&"&kind="&kind&"&none='>&nbsp;"
        else
        response.write "<input type='button' name='Button5' value='' style='background-image:url(images/z3.jpg);width:45px;height:19px;border:0px;'>&nbsp;"
		end if
		response.write "<input type='button' name='Button6' value='' style='background-image:url(images/z4.jpg);width:37px;height:19px;border:0px;cursor:pointer' onclick=window.location.href='"&nowpath&"?page="&rs.pagecount&"&kind="&kind&"&none='>"
    response.write "</td><form name='form29' method='post' action='"&nowpath&"?kind="&kind&"&none='><td width='150'>&nbsp;转到<input type='text' name='page' size=5 style='width:40px; height:20px;font-size:11pt; font-family: Arial;'>页<input type='submit' name='Submitpage' value='GO' style='width:33px; height:21px; color:#ffffff; background-color:#999999;font-size:9pt;font-weight:bold;font-family: Arial;cursor:pointer; '></td></form>"
  response.write "</tr>"
response.write "</table>"

end if
rs.close
set rs=nothing

%> 

<br>
     </td>
  </tr>
</table>

    </td>
  </tr>

</table>
<!-- #include file="foot.asp" -->
<%
conn.close
set conn=nothing
%>
</body>
</html>

