<%@ Page Language="c#" Codebehind="TGProducts.aspx.cs" AutoEventWireup="true" Inherits="XpShop.WebUI.TGProducts" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="LeftNavTG0" Src="Modules/LeftNavTG0.ascx" %>
<%@ Register TagPrefix="uc1" TagName="LeftNavTG1" Src="Modules/LeftNavTG1.ascx" %>
<%@ Register TagPrefix="uc1" TagName="LeftNavTG2" Src="Modules/LeftNavTG2.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Modules/Footer.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><%=GetResourceString("TogetherPurchase")%>,<%=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/PM_TG_list.js" type="text/javascript"></script>
		<script type="text/javascript">
		    var extend = '<%=config.html %>';
			var baseUrl="<%=webSite %>tg/products";
			var prePage="<%=GetResourceString("PreviousPage")%>";
			var nextPage="<%=GetResourceString("NextPage")%>";
			var number="<%=Request.QueryString["Number"] == null ? "0" : Request.QueryString["Number"] %>";
			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 ? "0" : Request.QueryString["OrderSort"] %>";
			var status="<%=Request.QueryString["status"] == null ? "1" : Request.QueryString["status"] %>";
        </script>
		<style type="text/css">
		#navbar ul li.newproducts{background:url("Template/XpShop_div2/images/navbar_on.jpg") no-repeat;}
		</style>
	</HEAD>
	<body>
		<uc1:Header id="Header1" runat="server"></uc1:Header>
		<div class="xp-w clear" style=" margin-top:-5px; margin-bottom:1px;">
		    <div id="banner1"></div>
		    <div id="banner2"></div>
		</div>
		
        <script type="text/javascript" language="javascript">
			
				$("#banner2").html('<%=GetAD(76)%>');
				$("#banner2").show();
			
		</script>
		<!--位置导航开始-->
		<%--<div class="path"><h5><a href="<%=webSite %><%if(config.html==""){%>default.aspx<%}else{%>Index.<%=config.html%><%}%>"><%=GetResourceString("Home")%></a>&nbsp;&gt;&nbsp;<%=GetResourceString("TogetherPurchase")%></h5></div>--%>
		<!--位置导航结束-->
		<div class="xp-w clear">
			<div id="content_left">
                <div class="lframe">
                    <div class="tl"></div>
                    <div class="tr"></div>
                    <div class="tm">
                        <div class="title">等待团购的商品</div>
                        <div class="more"><a href="<%=webSite %>tg/products-0-1-2-0-1.<%=config.html%>">更多>>></a></div>
                    </div>
                    <div class="ml"></div>
                    <div class="mr"></div>
                    <div class="mm">
                        <ul class="ul_style_8">
                            <asp:Repeater Runat="server" ID="rptPdts1">
                                <ItemTemplate>
                                    <li>
                                        <a href='<%=webSite %>tgproduct-<%#DataBinder.Eval(Container.DataItem,"ID")%>.<%=config.html%>' target="_blank"><%#DataBinder.Eval(Container.DataItem,"ProductName")%></a>
                                    </li>
		                        </ItemTemplate>
	                        </asp:Repeater>
                        </ul>
                    </div>
                    <div class="bl"></div>
                    <div class="br"></div>
                    <div class="bm"></div>
                </div>
                <div class="lframe">
                    <div class="tl"></div>
                    <div class="tr"></div>
                    <div class="tm">
                        <div class="title">正在团购的商品</div>
                        <div class="more"><a href="<%=webSite %>tg/products-0-1-2-0-2.<%=config.html%>">更多>>></a></div>
                    </div>
                    <div class="ml"></div>
                    <div class="mr"></div>
                    <div class="mm">
                        <ul class="ul_style_8">
                            <asp:Repeater Runat="server" ID="rptPdts2">
                                <ItemTemplate>
                                    <li>
                                        <a href='<%=webSite %>tgproduct-<%#DataBinder.Eval(Container.DataItem,"ID")%>.<%=config.html%>' target="_blank"><%#DataBinder.Eval(Container.DataItem,"ProductName")%></a>
                                    </li>
		                        </ItemTemplate>
	                        </asp:Repeater>
                        </ul>
                    </div>
                    <div class="bl"></div>
                    <div class="br"></div>
                    <div class="bm"></div>
                </div>		
                <div class="lframe">
                    <div class="tl"></div>
                    <div class="tr"></div>
                    <div class="tm">
                        <div class="title">结束团购的商品</div>
                        <div class="more"><a href="<%=webSite %>tg/products-0-1-2-0-3.<%=config.html%>">更多>>></a></div>
                    </div>
                    <div class="ml"></div>
                    <div class="mr"></div>
                    <div class="mm">
                        <ul class="ul_style_8">
                            <asp:Repeater Runat="server" ID="rptPdts3">
                                <ItemTemplate>
                                    <li>
                                        <a href='<%=webSite %>tgproduct-<%#DataBinder.Eval(Container.DataItem,"ID")%>.<%=config.html%>' target="_blank"><%#DataBinder.Eval(Container.DataItem,"ProductName")%></a>
                                    </li>
		                        </ItemTemplate>
	                        </asp:Repeater>
                        </ul>
                    </div>
                    <div class="bl"></div>
                    <div class="br"></div>
                    <div class="bm"></div>
                </div>			
				<%=GetAD(33)%>
			</div>
			<div id="content_right">
                <div class="clear">
	                <div class="pdt-num"><asp:Label ID="lblPdtNum" runat="server"></asp:Label></div>
	                <div class="page_change">
					    <asp:Label ID="lblTopPage" CssClass="pagelblpage" runat="server"></asp:Label>
				    </div>
	            </div>
			    <!--商品列表开始-->
			    <div class="list_style">
					<%=GetSortMode()%>
					<div class="display_mode">
						<%=GetDisplayMode()%>
					</div>
					<div class="page_change">
						<span><%=GetResourceString("DoPage")%></span>
                        <span class="prepage"></span>
						<span class="nextpage"></span>
					</div>
		        </div>
			    <div class="plist">
					<% 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="23%">
                                            
										    <div>
										       <div class="xp-pdt-img">
										           <a style="position:relative;" href='<%=webSite %>tgproduct-<%#DataBinder.Eval(Container.DataItem,"ID")%>.<%=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 class="pro_hlist_pmdiv"><%=GetTagImg(7,0,0)%></div> 
										    </div>
										</td>
										<td width="60%" align="left" valign="top">
										    <table cellpadding="3" cellspacing="0" border="0">
											    <tr>
									                <td class="pro_hlist_pname">
											            <a href='<%=webSite %>tgproduct-<%#DataBinder.Eval(Container.DataItem,"ID")%>.<%=config.html%>' target="_blank"><%#DataBinder.Eval(Container.DataItem,"ProductName")%></a>
										            </td>
									            </tr>
									            <tr>
									                <td style="color:#ff4e00; text-align:left;">
									                    <%=GetResourceString("TogetherPurchasePrice")%>：<%#string.Format("{0:f}",DataBinder.Eval(Container.DataItem,"pmtprice")) %>
									                </td>
									            </tr>
									            <tr>
									                <td style="color:#ff4e00; text-align:left;">
									                    <%=GetResourceString("LeastNumber")%>：<%#DataBinder.Eval(Container.DataItem,"minvalue") %>
									                </td>
									            </tr>
									            <tr>
									                <td style='color:#ff4e00; text-align:left; display:<%# (int)DataBinder.Eval(Container.DataItem,"AlreadyJoin")!=0 ? "" : "none"%>'>
									                   <%=GetResourceString("TheQuantityPurchased")%>：<%#DataBinder.Eval(Container.DataItem,"AlreadyJoin") %>
									                </td>
									            </tr>
									            <tr>
									                <td>
									                    <span class="pm_tdspan"><%=GetResourceString("RemainingTime")%>:
									                    </span>
									                </td>
									            </tr>
										    </table>
										</td>
										<td width="20%" valign="bottom">
										    <a href='<%=webSite %>tgproduct-<%#DataBinder.Eval(Container.DataItem,"ID")%>.<%=config.html%>' target="_blank"><div class="details"></div></a>
										</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",32);%>
						<asp:DataList id="dlProducts2" CellPadding="0" CellSpacing="12" GridLines="None" RepeatColumns="4"
							RepeatDirection="Horizontal" RepeatLayout="Table" Visible="true" Width="100%" runat="server">
							<ItemStyle CssClass="alignCenterTop" />
							<ItemTemplate>													
								<table cellpadding="3" cellspacing="0" style="border:1px #CCCCCC solid" align="center" width="100px" height="100px">
									<tr>
										<td>
											
                                            <div>
										       <div class="xp-pdt-img">
										           <a style="position:relative;" href='<%=webSite %>tgproduct-<%#DataBinder.Eval(Container.DataItem,"ID")%>.<%=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 class="pro_piclist_pmdiv"><%=GetTagImg(7,0,0)%></div> 
										    </div>
										</td>
									</tr>
								</table>
							</ItemTemplate>
						</asp:DataList>
					</div>
					<%}else{%>
					<div class="pro_wlist">
						<%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="dl_item" VerticalAlign="top"/>
							<ItemTemplate>													
								<table cellpadding="2" cellspacing="0" width="98%" class="shangpin">
									<tr>
										<td valign="top">
										    <div>
										       <div class="xp-pdt-img">
										           <a style="position:relative;" href='<%=webSite %>tgproduct-<%#DataBinder.Eval(Container.DataItem,"ID")%>.<%=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 class="pmdiv"><%=GetTagImg(7,0,0)%></div> 
										    </div>
										</td>
									</tr>
									<tr>
									    <td>
											<div class="qg-pdtname"><a href='<%=webSite %>tgproduct-<%#DataBinder.Eval(Container.DataItem,"ID")%>.<%=config.html%>' target="_blank"><%#DataBinder.Eval(Container.DataItem,"ProductName")%></a></div>
										</td>
									</tr>
									<tr>
									    <td style="color:#ff4e00; text-align:left;">
									        <%=GetResourceString("TogetherPurchasePrice")%>：<%#string.Format("{0:f}",DataBinder.Eval(Container.DataItem,"pmtprice")) %>
									    </td>
									</tr>
									<tr>
									    <td style="color:#ff4e00; text-align:left;">
									        <%=GetResourceString("LeastNumber")%>：<%#DataBinder.Eval(Container.DataItem, "minvalue")%>
									    </td>
									</tr>
									<tr>
									    <td style="color:#ff4e00; text-align:left;">
									       <span style='display:<%# (int)DataBinder.Eval(Container.DataItem,"AlreadyJoin")!=0 ? "" : "none"%>'><%=GetResourceString("TheQuantityPurchased")%>：<%#DataBinder.Eval(Container.DataItem,"AlreadyJoin") %></span>
									    </td>
									</tr>
									<tr>
									    <td style="text-align:left;">
									        <span class="pm_tdspan"><%=GetResourceString("RemainingTime")%>:
                                            <%#DataBinder.Eval(Container.DataItem,"leavingday") %>
									        </span>
									    </td>
									</tr>
								</table>
							</ItemTemplate>
						</asp:DataList>
					</div>
					<%}%>
			    </div><!--end plist-->
				    <!--商品列表结束-->
				    <asp:panel id="plPage" visible="true" runat="server">
				    <!-- 翻页开始-->
				    <div class="page clear">
					    <div class="fpage1 hide">
                            <input id="gopage" type="text" class="gopage" size="1" />
                        </div>
                        <div class="fpage">
                            <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><%=GetResourceString("Search_NoProducts")%></h3>
					    </div>
				    </asp:panel>
				    <div class="clear"></div>
				</div><!--content_right-->
				<div style="clear:both;"></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>  