<%@ Page language="c#" Codebehind="PackageList.aspx.cs" AutoEventWireup="true" Inherits="XpShop.WebUI.PackageList" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="LeftNavTop2Level" Src="Modules/LeftNavTop2Level.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Modules/Footer.ascx" %>
<%@ Register TagPrefix="uc1" TagName="BrandTopSale" Src="Modules/BrandTopSale.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>	
		<!--#include file="../../inc/encoding.inc"-->	
		<title><%=GetResourceString("PromotionBundle")%>,<%=config.SiteTitle%></title>
		<!--#include file="../../inc/head.inc"-->
		<script src="<%=webSite %>inc/getParmByUrl.js" type="text/javascript"></script>
		<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/package_list.js" type="text/javascript"></script>
		<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/package.ready.js" type="text/javascript"></script>
		<link type="text/css" rel="stylesheet" href="<%=webSite %>Template/<%=config.TemplateFolder%>/style/package.css" />
		<style type="text/css">
		    #navbar ul li.list{background:url("Template/XpShop_div2/images/navbar_on.jpg") no-repeat;}		    
		</style>
		
		<script type="text/javascript">
		    var extend = '<%=config.html %>';
			var baseUrl="<%=webSite %>PackageList.aspx?";
			var compareUrl="<%=webSite %>Compare.aspx";
			var prePage="<%=GetResourceString("PreviousPage")%>";
			var nextPage="<%=GetResourceString("NextPage")%>";
			var cID = "<%=Request.QueryString["CatID"] == null ? "" : Request.QueryString["CatID"] %>";
			
            function packageinfo(str)
            {
                var result = '';
                eval("var packageInfojson="+str);
                var data = packageInfojson.Product;
                $.each(data,function(i,n){
                    result += '<li><a target="_blank" href="products/Product-' + n.ProductID + '.html">' + n.ProductName + '</a><br />';
                    result += '数量: <strong class="fontcolorBlue">' + n.BindSum + '</strong> 单价: <strong class="fontcolorBlue">' + '<%=GetCurrencySign() %>' + n.MemberPrice + '</strong></li>';
                });
                
                return result;
            }
        </script>
		
	</head>
	<body>
		<uc1:Header id="Header1" runat="server"></uc1:Header>
		<div class="xp-w clear">
		    <!--位置导航开始-->
		    <div class="path"><%=GetCurrentPosition()%></div>
		    <!--位置导航结束-->
			<div id="content_left">
				<uc1:LeftNavTop2Level id="LeftNavTop2Level1" runat="server"></uc1:LeftNavTop2Level>
				<uc1:BrandTopSale id="BrandTopSale1" runat="server"></uc1:BrandTopSale>
				<asp:Literal id="ltrAD" runat="server"></asp:Literal>
			</div>
			<div id="content_right">
				
			    
				<!--商品列表开始-->
				<div class="mframe">
					<div class="tl"></div>
					<div class="tr"></div>
					<div class="tm">
					    <%=GetResourceString("PromotionBundle")%> 
					</div>
					<div class="ml"></div>
					<div class="mr"></div>
					<div class="mm">
					    <div class="plist">
							<div class="pro_hlist">
								<%BindProductList(10);%>
								<asp:DataList id="dlProducts" CellPadding="3" CellSpacing="0" GridLines="None" RepeatColumns="1"
									RepeatDirection="Horizontal" RepeatLayout="Table" Visible="true" Width="100%" runat="server">
									<ItemTemplate>
                                        <div class="clearfix">
                                            <div style="background-color:#f2f2f2;height:30px;line-height:30px; margin-bottom:5px;width:100%;font-size:15px;color:Black;">
                                                <strong><%#DataBinder.Eval(Container.DataItem,"ProductName")%></strong>
                                            </div>
                                            <div class="span-1">
                                                <div class="boxBlue">
                                                    <div class="division">
                                                        <ul>
                                                            <li>
                                                                <div class="span-2">
                                                                    <%=GetResourceString("Original")%>：</div>
                                                                <strong class="mktprice1"><%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem,"MarketPrice","{0:f}")%></strong> </li>
                                                            <li>
                                                                <div class="span-2">
                                                                    <%=GetResourceString("BundledPrice")%>：</div>
                                                                <strong class="price1"><%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem,"MemberPrice","{0:f}")%></strong> </li>
                                                            <li class="save">
                                                                <div class="span-2">
                                                                    <%=GetResourceString("Save")%>：</div>
                                                                <strong><%=GetCurrencySign()%><%#decimal.Parse(DataBinder.Eval(Container.DataItem,"MarketPrice","{0:f}").ToString()) - decimal.Parse(DataBinder.Eval(Container.DataItem,"MemberPrice","{0:f}").ToString())%></strong> </li>
                                                            <li class="textcenter">
                                                                <form action='<%=webSite %>cart.<%=config.html %>?pid=<%#DataBinder.Eval(Container.DataItem,"ProductID")%>' method="post" target="_blank" onsubmit="if(document.getElementById('GID').value == '0'){alert('商品信息不完整[GID:0]');return false;}">
                                                                <input type="hidden" name="GID" value="<%#DataBinder.Eval(Container.DataItem,"GoodsID")%>" /><input type="hidden" id="spectext" name="spectext" value="" />
                                                                <input type="submit" class="actbtn btn-buy" />
                                                                </form>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="push">
                                                <h4>
                                                    此捆绑促销包括：</h4>
                                                <ul class="list">
                                                    <script type="text/javascript">document.write(packageinfo('<%#DataBinder.Eval(Container.DataItem,"PackageInfo")%>'));</script>
                                                </ul>
                                            </div>
                                        </div>											
									</ItemTemplate>
								</asp:DataList>
							</div>
					    </div>
					</div>
				    <div class="bl"></div>
				    <div class="br"></div>
				    <div class="bm"></div>
				</div>
				<!--商品列表结束-->
				<!-- 翻页开始-->
				<div class="page clear">
					<div class="fpage1">
                        <asp:Label ID="lblPagerInfo" runat="server"></asp:Label>
                        <input id="gopage" type="text" class="gopage" size="1" />
                        <input id="go" type="button" value="Go" class="go" />
                    </div>
                    <div class="fpage2">
                        <span class="prepage"></span>
                        <asp:Label ID="lbPage" runat="server"></asp:Label>
                        <span class="nextpage"></span>
                    </div>                                
				</div>
				<!-- 翻页结束-->
			</div>
		</div>
		<uc1:Helper id="Helper1" runat="server"></uc1:Helper>
		<uc1:Footer id="Footer1" runat="server"></uc1:Footer>
		<div id="btnCompare" class="compare_hidden">
            <button id="doCompare"><%=GetResourceString("ProductCompare")%></button>
        </div>
	</body>
</HTML>   
