<%@ Page language="c#" Codebehind="BuyLimited.aspx.cs" AutoEventWireup="true" Inherits="XpShop.WebUI.BuyLimited" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Link" Src="Modules/Link.ascx" %>
<%@ Register TagPrefix="uc1" TagName="MemberHelper" Src="Modules/MemberHelper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="memberfooter" Src="Modules/memberfooter.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>		
		<!--#include file="../../inc/encoding.inc"-->
		<title>限时抢购,<%=config.SiteTitle%></title>
		<!--#include file="../../inc/head.inc"-->
		<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/buy_limited.js" type="text/javascript"></script>
		<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/AjaxLimit.js" type="text/javascript"></script>
		<link href="<%=webSite %>Template/<%=config.TemplateFolder%>/style/list.css" type="text/css" rel="stylesheet" />
		<script type="text/javascript">
		    var extend = '<%=config.html %>';
			var baseUrl="<%=webSite %>xianshi/products";
			var shopFolder="<%=webSite %>";
			var compareUrl="<%=webSite %>Compare.aspx";
			var prePage="<%=GetResourceString("PreviousPage")%>";
			var nextPage="<%=GetResourceString("NextPage")%>";
			var cid ="<%=Request.QueryString["cid"] == null ? "0" : Request.QueryString["cid"] %>";
			var page="<%=Request.QueryString["page"] == null ? "1" : Request.QueryString["page"] %>";
			var display="<%=Request.QueryString["display"] == null ? "2" : Request.QueryString["display"] %>";
			var sort="<%=Request.QueryString["OrderSort"] == null ? "1" : Request.QueryString["OrderSort"] %>";
        </script>
	</head>
	<body>
			<uc1:Header id="Header1" runat="server"></uc1:Header>
		    <div class="xp-qgw clear">
			<!--位置导航开始-->
			<div class="xp-qg-path">
			    <a href="<%=webSite %>Index.<%=config.html%>"><%=GetResourceString("Home")%></a> &nbsp;&gt;&nbsp;限时抢购
			</div>
			<!--位置导航结束-->
			<%=GetAD(42)%>
			<div class="clear">			    		        
			    <!--商品列表开始-->
			    <div class="list_style">
					<div style="float:left;">
						选择分类：						
					</div>
					<div style="float:left;padding-top:10px;">
						<%=BindTopCategory()%>
					</div>
					<div class="display_mode" style="margin-left:100px;">
						<%=GetDisplayMode()%>
					</div>
					<div class="fav_arrow" style="float:right;"><a onClick="javascript:window.external.AddFavorite('<%=config.SiteUrl%>/xianshi/products.html','限时抢购')">收藏本页</a></div>
					<div style="float:right;">						
						<%=GetSortMode()%>
					</div>
			    </div>
				<div class="plist clear">
					<% if(Request.QueryString["display"] == "1") {%>
					<div class="pro_hlist">
						<%BindProductList("dlProducts1",6);%>
						<asp:DataList id="dlProducts1" CellPadding="3" CellSpacing="0" GridLines="None" RepeatColumns="1" RepeatDirection="Horizontal" RepeatLayout="Table" Visible="true" Width="100%" runat="server">
							<ItemTemplate>													
								<table cellpadding="3" cellspacing="0" width="100%">
									<tr>
                                        <td width="20%">
                                           <div>
									           <div class="xp-pdt-img">
                                                    <a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank" >
                                                        <img width="160" height="160" src="<%=webSite %>upload/ProductImg/<%# DataBinder.Eval(Container.DataItem,"ImgFolder")%><%#DataBinder.Eval(Container.DataItem,"ThumbnailImg")%>" alt='' />
                                                    </a>
                                                </div>
									        </div>
										</td>
										<td width="60%" align="left" valign="middle">
											<table cellpadding="3" cellspacing="0" border="0">
												
												<tr>
													<td class="pro_hlist_pname">
													    <a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank"><%#DataBinder.Eval(Container.DataItem,"ProductName")%></a>
												    </td>
												</tr>
												<tr>
												    <td>
												        <div class="qg-shortdesc"><%#DataBinder.Eval(Container.DataItem,"ShortDesc")%></div>
												    </td>
												</tr>
												<tr>
								                    <td>
								                        原价：<span class="RedWeight"><%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem,"MemberPrice","{0:f}")%></span>
								                    </td>
								                </tr>
						                        <tr>
						                            <td>
						                                折扣：
						                                -<%=GetCurrencySign()%><%#string.Format("{0:f2}", (decimal)DataBinder.Eval(Container.DataItem, "MemberPrice") - (decimal)DataBinder.Eval(Container.DataItem, "PmtPrice"))%>
						                            </td>
						                        </tr>
						                        <tr>
						                            <td style="color:#ff4e00;">
						                                抢购价：<span class="limitprice"><%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem, "PmtPrice", "{0:f}")%></span>
						                                (<%#string.Format("{0:f1}", (decimal)DataBinder.Eval(Container.DataItem, "PmtPrice") * 10 / (decimal)DataBinder.Eval(Container.DataItem, "MemberPrice"))%>折)
						                            </td>
						                        </tr>
												<tr>
										            <td>
											            <div id="time<%#DataBinder.Eval(Container.DataItem,"ProductID")%>"></div>
											            <script>
												            var t=new calculagraph();
												            t._id='time<%#DataBinder.Eval(Container.DataItem,"ProductID")%>';
												            t._cT='<%=DateTime.Now%>';
												            //t._xT='<%#DataBinder.Eval(Container.DataItem,"leavingday")%>';
												            t._eT='<%#DataBinder.Eval(Container.DataItem,"EndTime")%>';
												            t._interval();
											            </script>
										            </td>
									            </tr>
									       
											</table>
										</td>
							            <td width="20%" valign="middle">
							                
							                <div class="clear">
							                    <a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank"><div class="buyLimit_btn">抢购</div></a>
							                </div>
							                <div class="clear" style=" padding:5px 0px 5px 0px !important; padding:0px; margin:0px 0px 0px -3px !important; margin:5px 0px 5px -6px;">
							                    <a><div class="favorite" pid='<%#DataBinder.Eval(Container.DataItem,"ProductID")%>'></div></a>
							                </div>
							            </td>
									</tr>
									<tr>
										<td colspan="3" align="center">
											<%# GetAliPayButton(DataBinder.Eval(Container.DataItem,"ProductID").ToString())%>
										</td>
									</tr>
									<tr>
										<td colspan="3"><hr size="1" noshade="noshade" style="border:1px #cccccc dotted"/></td>
									</tr>
								</table>
							</ItemTemplate>
						</asp:DataList>
					</div>
					<%}else if(Request.QueryString["display"] == "3"){%>
					<div class="pro_piclist">
						<%BindProductList("dlProducts2",16);%>
						<asp:DataList id="dlProducts2" CellPadding="3" CellSpacing="0" GridLines="None" RepeatColumns="4"
							RepeatDirection="Horizontal" RepeatLayout="Table" Visible="true" HorizontalAlign="left" runat="server">
							<ItemStyle CssClass="xp-qg-dl_item"/>
							<ItemTemplate>													
								<div class="<%#(Container.ItemIndex +1)%4==0 ? "xp-qg-dl-item-divnoborder" : "xp-qg-dl-item-div"%>">
								    <table cellpadding="3" cellspacing="0" width="100%">
                                        <tr>
								            <td>
									            <div class="xp-qg-time" id="time<%#DataBinder.Eval(Container.DataItem,"ProductID")%>"  style="text-align:center;"></div>
									            <script>
												    var t=new calculagraph();
												    t._id='time<%#DataBinder.Eval(Container.DataItem,"ProductID")%>';
												    t._cT='<%=DateTime.Now%>';
												    //t._xT='<%#DataBinder.Eval(Container.DataItem,"leavingday")%>';
												    t._eT='<%#DataBinder.Eval(Container.DataItem,"EndTime")%>';
												    t._interval();
											    </script>
								            </td>
							            </tr>
						                <tr>
							                <td>
								               <div class="xp-pdt-img">
                                                    <a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank" >
                                                        <img width="160" height="160" src="<%=webSite %>upload/ProductImg/<%# DataBinder.Eval(Container.DataItem,"ImgFolder")%><%#DataBinder.Eval(Container.DataItem,"ThumbnailImg")%>" alt='' />
                                                    </a>
                                                </div>
									        </td>
							            </tr>
						                <tr>
						                    <td>
						                        原价：<span style="text-decoration:line-through;"><%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem,"MemberPrice","{0:f}")%></span>
						                    </td>
						                </tr>
						                <tr>
						                    <td style="color:#ff4e00;">
						                        抢购价：<span class="limitprice"><%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem, "PmtPrice", "{0:f}")%></span>
						                        (<%#string.Format("{0:f1}", (decimal)DataBinder.Eval(Container.DataItem, "PmtPrice") * 10 / (decimal)DataBinder.Eval(Container.DataItem, "MemberPrice"))%>折)
						                    </td>
						                </tr>
							            <tr style="display:none;">
							                <td align="center" class="limitbt">
							                    <a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank"><div class="buyLimit_btn">抢购</div></a>
							                </td>
							            </tr>
						            </table>
								</div>
							</ItemTemplate>
						</asp:DataList>
					</div>
					<%}else{%>
					<div class="pro_wlist clear">
						<%BindProductList("dlProducts3",16);%>
						<asp:DataList id="dlProducts3" CellPadding="3" CellSpacing="0" GridLines="None" RepeatColumns="4"
							RepeatDirection="Horizontal" RepeatLayout="Table" HorizontalAlign="left" Visible="true" runat="server">
							<ItemStyle CssClass="xp-qg-dl_item"/>
							<ItemTemplate>													
								<div class="<%#(Container.ItemIndex +1)%4==0 ? "xp-qg-dl-item-divnoborder" : "xp-qg-dl-item-div"%>">
								    <table cellpadding="3" cellspacing="0" width="100%">
                                        <tr>
								            <td>
									            <div class="xp-qg-time" id="time<%#DataBinder.Eval(Container.DataItem,"ProductID")%>"  style="text-align:center;"></div>
									            <script>
												    var t=new calculagraph();
												    t._id='time<%#DataBinder.Eval(Container.DataItem,"ProductID")%>';
												    t._cT='<%=DateTime.Now%>';
												    //t._xT='<%#DataBinder.Eval(Container.DataItem,"leavingday")%>';
												    t._eT='<%#DataBinder.Eval(Container.DataItem,"EndTime")%>';
												    t._interval();
											    </script>
								            </td>
							            </tr>
						                <tr>
							                <td>
								               <div class="xp-pdt-img">
                                                    <a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank" >
                                                        <img width="160" height="160" src="<%=webSite %>upload/ProductImg/<%# DataBinder.Eval(Container.DataItem,"ImgFolder")%><%#DataBinder.Eval(Container.DataItem,"ThumbnailImg")%>" alt='' />
                                                    </a>
                                                </div>
									        </td>
							            </tr>
							            <tr>
					                        <td>
					                           <div class="qg-pdtname"> <a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank"><%#DataBinder.Eval(Container.DataItem,"ProductName")%></a></div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <div class="qg-shortdesc"><%#DataBinder.Eval(Container.DataItem,"ShortDesc")%></div>
                                            </td>
                                        </tr>
						                <tr>
						                    <td>
						                        原价：<span style="text-decoration:line-through;"><%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem,"MemberPrice","{0:f}")%></span>
						                    </td>
						                </tr>
						                <tr>
						                    <td>
						                        折扣：
						                        -<%=GetCurrencySign()%><%#string.Format("{0:f2}", (decimal)DataBinder.Eval(Container.DataItem, "MemberPrice") - (decimal)DataBinder.Eval(Container.DataItem, "PmtPrice"))%>
						                    </td>
						                </tr>
						                <tr>
						                    <td style="color:#ff4e00;">
						                        抢购价：<span class="limitprice"><%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem, "PmtPrice", "{0:f}")%></span>
						                        (<%#string.Format("{0:f1}", (decimal)DataBinder.Eval(Container.DataItem, "PmtPrice") * 10 / (decimal)DataBinder.Eval(Container.DataItem, "MemberPrice"))%>折)
						                    </td>
						                </tr>
							            <tr style="display:none;">
							                <td align="center" class="limitbt">
							                    <a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank"><div class="buyLimit_btn">抢购</div></a>
							                </td>
							            </tr>
						            </table>
								</div>
							</ItemTemplate>
						</asp:DataList>
					</div>
					<%}%>
				</div><!--end plist-->
				<!--商品列表结束-->
				<asp:panel id="plPage" visible="true" runat="server">
				<!-- 翻页开始-->
				<div class="page clear">
                    <div class="fpage clearfix">
                        <asp:Label ID="lbPage" class="lb-page" runat="server"></asp:Label>
                    </div>                                
				</div>
				<!-- 翻页结束-->
				</asp:panel>
				
				<asp:panel id="plNoProduct" visible="false" runat="server">
					<div style="margin:20px;">
						<h3>抱歉，没有找到符合条件的商品！</h3>
					</div>
				</asp:panel>
			</div>			
            </div>
		    <uc1:MemberHelper id="Helper1" runat="server"></uc1:MemberHelper>
		    <uc1:memberfooter id="Footer1" runat="server"></uc1:memberfooter>
	</body>
</html>   

