<%@ Page language="c#" Codebehind="List.aspx.cs" AutoEventWireup="true" Inherits="XpShop.WebUI.List" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="LeftNav2" Src="Modules/LeftNav2.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Modules/Footer.ascx" %>
<%@ Register TagPrefix="uc1" TagName="ListBuyLimited" Src="Modules/ListBuyLimited.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><%=name%> <%=config.SiteTitle%></title>
		<!--#include file="../../inc/head.inc"-->
		<link href="<%=webSite %>Template/<%=config.TemplateFolder%>/style/pop.css" type="text/css" rel="stylesheet" />
		<script src="<%=webSite %>inc/getParmByUrl.js" type="text/javascript"></script>
		<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/custom_list.js" type="text/javascript"></script>
		<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/list_compare.js" type="text/javascript"></script>
		<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/jquery.easydrag.handler.beta2.js" type="text/javascript"></script>
		<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/multi_popup.js" type="text/javascript"></script>
		<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/AddFav.js" type="text/javascript"></script>
        <script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/AjaxLimitDefault.js" type="text/javascript"></script>
		<link href="<%=webSite %>Template/<%=config.TemplateFolder%>/style/list.css" type="text/css" rel="stylesheet" />
        <script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/jcarousellite_1.0.1.js" type="text/javascript"></script>
		<script type="text/javascript">
		    var extend = '<%=config.html %>';
			var baseUrl="<%=webSite %>";
			var compareUrl="<%=webSite %>Compare.aspx";
			var productID = 0;
		    var parentNo = <%=parentno %>;
		    var categoryNo = <%=categoryno %>;
        </script>
	</head>
	<body>
		<uc1:Header id="Header1" runat="server"></uc1:Header>
		<div class="xp-w clear">
		    <!--位置导航开始-->
		    <div class="path"><%=position%></div>
		    <!--位置导航结束-->
		    <div id="content_left">
		        <!--分类开始-->
                <uc1:LeftNav2 id="LeftNav1" runat="server"></uc1:LeftNav2> 
                <script type="text/javascript">
                    $(document).ready(function(){
                        $('#cid_' + parentNo).click();
	                    $('#cid_' + categoryNo).click();
	                });
                </script>   
                <!--end--> 
		        <!--限时抢购开始-->
                <uc1:ListBuyLimited id="ListBuyLimited" runat="server"></uc1:ListBuyLimited>   
                <!--end-->             
                
		        <!--销售排行开始-->
		        <div class="lframe">
                    <div class="tl"></div>
                    <div class="tr"></div>
                    <div class="tm">
                        <div class="title">销售排行榜</div>
                    </div>
                    <div class="ml"></div>
                    <div class="mr"></div>
                    <div class="mm">
                        <ul class="ul_topsale">
                            <li>
                            <asp:Repeater ID="rptTopSale" runat="server">
                                <ItemTemplate>
                                    <ul class="noimg noimg1" <%#Container.ItemIndex == 0 ? "style='display:none;'" : "style=' '"%>>
                                        <li class="text clear">
                                            <div class="index"><%#Container.ItemIndex+1 %></div>
                                            <div class="img">
                                                <a href='/<%=ShopFolder %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank"><img height="50" width="50" src="<%=webSite %>upload/ProductImg/<%# DataBinder.Eval(Container.DataItem,"ImgFolder")%><%#DataBinder.Eval(Container.DataItem,"ProductImg")%>" alt="<%#DataBinder.Eval(Container.DataItem,"ProductName")%>" /></a>
                                            </div>
                                            <div class="titile"><a href='/<%=ShopFolder %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' title='<%#DataBinder.Eval(Container.DataItem,"ProductName")%>' target="_blank"><%#DataBinder.Eval(Container.DataItem,"ProductName")%></a></div>
                                            <div class="price"><% if(MemberShowPrice()) {%><%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem,"MemberPrice","{0:f}")%><% }%></div>
                                        </li>
                                    </ul>
                                    <ul class="img img1" <%#Container.ItemIndex == 0 ? "style=' '" : "style='display:none;'"%>>
                                        <li class="text clear">
                                            <div class="index"><%#Container.ItemIndex+1 %></div>
                                            <div class="img">
                                                <a href='/<%=ShopFolder %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank"><img src="<%=webSite %>upload/ProductImg/<%# DataBinder.Eval(Container.DataItem,"ImgFolder")%><%#DataBinder.Eval(Container.DataItem,"ProductImg")%>" alt="<%#DataBinder.Eval(Container.DataItem,"ProductName")%>" /></a>
                                            </div>
                                            <div class="titile"><a href='/<%=ShopFolder %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' title='<%#DataBinder.Eval(Container.DataItem,"ProductName")%>' target="_blank"><%#DataBinder.Eval(Container.DataItem,"ProductName")%></a></div>
                                            <div class="price"><% if(MemberShowPrice()) {%><%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem,"MemberPrice","{0:f}")%><% }%></div>
                                        </li>
                                    </ul>
                                </ItemTemplate>
                            </asp:Repeater>
                            </li>
                        </ul>
                    </div>
                    <div class="bl"></div>
                    <div class="br"></div>
                    <div class="bm"></div>
                </div>
                <script type="text/javascript">
                    $(document).ready(function(){
	                    $(".noimg1").each(function(){
	                        var obj = $(this);
	                        $(this).children(".text div.titile").mouseover(function(){
	                            $('ul.img1').hide();
	                            $('.noimg1').show();
	                            obj.next().show();
	                            obj.hide();
	                        });
	                    });
                    });
                </script> 
                <!--end-->  
                
				<!--最近浏览的商品开始-->
				<div class="lframe">
                    <div class="tl"></div>
                    <div class="tr"></div>
                    <div class="tm">最近浏览的商品</div>
                    <div class="ml"></div>
                    <div class="mr"></div>
                    <div class="mm">
                        <ul class="list-newview">
                            <asp:Repeater ID="rptRecent" runat="server">
                                <ItemTemplate>
                                <li class="clear">
                                    <div class="img"><a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank" ><img src="<%=webSite %>upload/ProductImg/<%#DataBinder.Eval(Container.DataItem,"ImgFolder")%><%#DataBinder.Eval(Container.DataItem,"ProductImg")%>" alt='' /></a></div>
                                    <div class="name"><a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank" ><%#DataBinder.Eval(Container.DataItem,"ProductName")%></a></div>
                                </li>
                                </ItemTemplate>
                                <SeparatorTemplate>
                                    <li class="space"></li>
                                </SeparatorTemplate>
                            </asp:Repeater>
                        </ul>
                    </div>
                    <div class="bl"></div>
                    <div class="br"></div>
                    <div class="bm"></div>
                </div>
                <!--最近浏览的商品结束-->
                <div style="margin-bottom:6px;">
                    <%if(productad != ""){%><%=productad%>
                    <%}else{ %>
                    <%=GetAD(41)%>
                    <%} %>
                </div>
                
		        <asp:Literal id="ltrAD" runat="server"></asp:Literal>
		    </div>
		    <div id="content_right">
		        
		        <div class="xp-list-hotpdt">
                    <!--热卖推荐开始-->
                    <div class="xp-hotsale">
                        <div class="mt"><h2>热卖推荐</h2></div>
                        <div class="mc">
                            <div class="lista"><div class="listprev listprev disabled">&nbsp;</div></div>
                            <div id="listcarousel" class="listcarousel">
                                <div class="jCarouselLite">
	                                <ul>
	                                    <asp:Repeater ID="rptHotPdt" runat="server">
                                            <ItemTemplate>	
                                                <li>
                                                    <dl>
	                                                    <dt>
		                                                    <a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank"><img src="<%=webSite %>upload/ProductImg/<%# DataBinder.Eval(Container.DataItem,"ImgFolder")%><%#DataBinder.Eval(Container.DataItem,"Img5")%>" alt="" /></a>
                                                         </dt>
                                                         <dd class="xp-hotsale-price">
                                                            <% if(MemberShowPrice()) {%><%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem,"MemberPrice","{0:f}")%><% }%>
	                                                     </dd>
	                                                     <dd class="btns">
                                                            <a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank">立即抢购</a>
                                                        </dd>
	                                                     <dd class="xp-hotsale-name">
	                                                        <a title='<%#DataBinder.Eval(Container.DataItem,"ProductName")%>' href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank"><%#DataBinder.Eval(Container.DataItem,"ProductName")%></a>
		                                                 </dd>
		                                                 <%--<dd class="xp-hotsale-desc">
		                                                    <%#Regex.Replace(DataBinder.Eval(Container.DataItem, "ShortDesc").ToString(), @"<[^>]*>", "", RegexOptions.IgnoreCase)%>
		                                                 </dd>--%>
                                                    </dl>
                                                </li>								
                                            </ItemTemplate>
                                        </asp:Repeater>
	                                </ul>
	                            </div>
                            </div>
                            <div class="listb"><div class="listnext listnext">&nbsp;</div></div>
                            
                            <script type="text/javascript">
                                $("#listcarousel").jCarouselLite({btnNext: ".listnext",btnPrev: ".listprev",visible:2,circular: false,scroll:2,speed:300});
                            </script>
                        </div>
                    </div>
                    <!--end-->
                    <!--促销专区开始-->
                    <div class="xp-market">
                        <div class="mt"><h2>促销活动</h2></div>
                        <div class="mc">
                            <ul>
                            <asp:Repeater ID="rptNews" runat="server">
	                            <ItemTemplate>
	                                <li><a href='<%=webSite %>articles/News-<%#DataBinder.Eval(Container.DataItem,"ArticleID")%>.html' title='<%#DataBinder.Eval(Container.DataItem,"Title")%>' target='_blank'><%#DataBinder.Eval(Container.DataItem, "Title")%></a></li>
                                </ItemTemplate>
                            </asp:Repeater>
	                        </ul>
                        </div>
                    </div>                    
	                <!--促销专区结束--> 
                </div>
		        
		        
		        <div id="filter">
		            <div class="top"><%=name%> - 商品筛选</div>
		            <div id="ScreeningBar">
						<%=screening%>
		            </div>
		            <div class="clear"></div>			            
		        </div>	    		        
		        <!--商品列表开始-->
		        <div class="list_style clear">
					<div style="float:left; line-height:36px; margin-right:10px;"><asp:Label ID="lblPdtNum" runat="server"></asp:Label></div>
					<div class="sort_mode">排序方式：</div>
					<%=GetSortMode()%>
					<div class="display_mode">
						<%=GetDisplayMode()%>
					</div>
					<div class="page_change">
						<asp:Label ID="lblTopPage" CssClass="pagelblpage" runat="server"></asp:Label>
					</div>
		        </div>
			    <div class="plist clear">
					<% if(Request.QueryString["display"] == "1") {%>
					<div class="pro_hlist">
						<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 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>
												<%#int.Parse(DataBinder.Eval(Container.DataItem, "PiNo").ToString()) != 0 ? "<div class='xp-pi" + DataBinder.Eval(Container.DataItem, "PiNo") + "'></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 %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target=_blank ><%#DataBinder.Eval(Container.DataItem,"ProductName")%></a>
											        </td>
											    </tr>
											    <tr>
											        <td><%#DataBinder.Eval(Container.DataItem,"ShortDesc")%></td>
											    </tr>
											    <tr>
											        <td>
                                                        <div class="xp-list-marketprice1">
                                                            <%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem,"MarketPrice","{0:f}")%><%--&nbsp;&nbsp;&nbsp;&nbsp;<span><%#int.Parse(DataBinder.Eval(Container.DataItem,"Quantity").ToString()) > 20 ? "" : ("仅剩<font color=red><b>" + DataBinder.Eval(Container.DataItem,"Quantity") + "</b></font>件")%></span>--%>
                                                        </div>
											            <div class="xp-list-memberprice1">
                                                            <% if(MemberShowPrice()) {%><%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem,"MemberPrice","{0:f}")%><% }%>
                                                        </div>
											            <%--<%=GetResourceString("MarketPrice")%>：<%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem, "MarketPrice", "{0:f}")%>--%>
											        </td>
											    </tr>
										    </table>
										</td>
										<td width="20%" valign="bottom">
										    <div class="clear">
							                    <a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank"><div class="details"></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>
							                <div class="clear" style=" padding:5px 0px 5px 0px !important; padding:0px;">
							                    <%# Compare(DataBinder.Eval(Container.DataItem, "ProductID").ToString(), DataBinder.Eval(Container.DataItem, "ProductName").ToString(), Request.Url.ToString())%>
							                </div>
										</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">
						<asp:DataList id="dlProducts2" CellPadding="3" 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">
									<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>
												<%#int.Parse(DataBinder.Eval(Container.DataItem, "PiNo").ToString()) != 0 ? "<div class='xp-pi" + DataBinder.Eval(Container.DataItem, "PiNo") + "'></div>" : ""%>
                                            </div>
										</td>
									</tr>
								</table>
							</ItemTemplate>
						</asp:DataList>
					</div>
					<%}else{%>
					<div class="pro_wlist">
						<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"/>
							<ItemTemplate>													
								<table cellpadding="3" cellspacing="0" width="100%">
							        <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>
												<%#int.Parse(DataBinder.Eval(Container.DataItem, "PiNo").ToString()) != 0 ? "<div class='xp-pi" + DataBinder.Eval(Container.DataItem, "PiNo") + "'></div>" : ""%>
                                            </div>
								        </td>
								    </tr>
									<tr>
						                <td>
						                    <div class="listheightoverflow"><a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target=_blank ><%#DataBinder.Eval(Container.DataItem,"ProductName")%> <%#DataBinder.Eval(Container.DataItem,"ShortDesc")%></a></div>
						                </td>
						            </tr>
							        <tr>
							            <td>
							                <div class="xp-list-memberprice">
                                                <% if(MemberShowPrice()) {%><%=GetCurrencySign()%><%#DataBinder.Eval(Container.DataItem,"MemberPrice","{0:f}")%><% }%>
                                            </div>
							            </td>
							        </tr>
							        <tr>
							            <td>
							                <div style="margin:auto; width:165px;">
							                <a href='<%=webSite %>products/product-<%#DataBinder.Eval(Container.DataItem,"ProductID")%>.<%=config.html%>' target="_blank"><div class="details"></div></a>
							                <a><div class="favorite" pid='<%#DataBinder.Eval(Container.DataItem,"ProductID")%>'></div></a>
							                <%# Compare(DataBinder.Eval(Container.DataItem, "ProductID").ToString(), DataBinder.Eval(Container.DataItem, "ProductName").ToString(), Request.Url.ToString())%>
							                </div>
							            </td>
							        </tr>
								</table>
							</ItemTemplate>
						</asp:DataList>
					</div>
					<%}%>
			    </div><!--end plist-->
				<!--商品列表结束-->
				
				<asp:panel id="plPage" visible="true" runat="server">
				<!-- 翻页开始-->
				<div class="page clear">
                    <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>抱歉，没有找到符合条件的商品！</h3>
					</div>
				</asp:panel>
					        
		    </div>
		</div>			
		<div class="xp-w clear">
		    <uc1:Helper id="Helper1" runat="server"></uc1:Helper>
		</div>
		<div class="xp-w clear">
		    <uc1:Footer id="Footer1" runat="server"></uc1:Footer>
		</div>
		
		<div id="btnCompare" class="compare_hidden">
            <button id="doCompare"><%=GetResourceString("ProductCompare")%></button>
        </div>
        <!--显示要对比的商品-->
        <div id="compareContent"><h6><a title="清空" id="compareClose" class="close"></a>商品比较</h6><div style="display:block;" class="comPro"><ul id="comProlist"></ul><img src="<%=webSite %>Template/<%=config.TemplateFolder%>/images/compare_15.gif" id="compareImg"></div></div>
        <div class="lframe popTip" id="ShowFav" style="display:none;">
	        <div class="tl"></div>
	        <div class="tr"></div>
	        <div class="tm" id="popupHead">
	            <div class="poptitle">商品收藏</div>
	            <div id="closepop" class="hand popclose">关闭</div>
	        </div>
	        <div class="ml"></div>
	        <div class="mr"></div>
	        <div class="mm tipcontent" style="text-align:center;">
		        <br />
		        <br />
		        收藏类别:<select id="ddlFavCat"></select>
		        <input type="button" id="btnAddFav" value="确定" />
		        <input type="button" id="btnFav" style="display:none;" />
		        <br /><br />
	            <a id="NewFC" href="#">添加分类</a>     <a href="#" id="EditFC">修改分类</a>    <a href="#" id="DelFC">删除分类</a>
	            <div id="newFCContent" style="display:none; text-align:center;"><input type="text" id="txtNewFCName" name="txtNewFCName" /><input type="button" id="btnAddFC" value="保存" /></div>
	        </div>
	        <div class="bl"></div>
	        <div class="br"></div>
	        <div class="bm"></div>
        </div>
        
		<script type="text/javascript">
		    $(document).ready(function(){
		        $('.favorite').click(function(){
		            productID = $(this).attr('pid');
		            $('#btnFav').click();
		        });
		    });
		</script>
	</body>
</html>