<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productlist.aspx.cs" Inherits="TW.UI.productlist" %>

<!DOCTYPE html>
<html>
<head lang="en">
	
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv=X-UA-Compatible content=IE=EmulateIE9 />
<script type="text/javascript" src="/static/card/js/configweb.js"></script>
	<title><%=Pagefn%><%=protit%>商品列表_<%=config.SiteName %></title>
	<link rel="stylesheet" href="/static/card/css/public.css" />
    <link rel="stylesheet" href="/static/card/css/trade.css" />
    <link rel="stylesheet" href="/static/card/css/bootstrap.pagination.css">
    <script type="text/javascript" src="/static/card/js/jquery-1.11.3.js"></script>
    <script type="text/javascript" src="/static/card/js/tools.js"></script>
    <script type="text/javascript" src="/static/card/js/jquery.superslide.js"></script>
    <script type="text/javascript" src="/static/card/js/browse.js"></script>
    <script type="text/javascript" src="/static/card/js/jquery.twbsPagination.js"></script>
    <script type="text/javascript">
        $(function () {
            var czlx = $("#czlx").val();
            var classid = $("#classid").val();
            var letter = $("#letter").val();
            var proid = $("#proid").val();
            var price = $("#price").val();
            var ord = $("#ord").val();

            if (czlx != "") {
                $("ul#typeUlId li span").removeClass("current");
                $("ul#typeUlId li[data='" + czlx + "'] span").addClass("current");
            }
            if (classid != 0) {
                $("ul#cardTypeUlId li span").removeClass("current");
                $("ul#cardTypeUlId li[value='" + classid + "'] span").addClass("current");
            }
            if (letter != "") {
                $("ul#indexUlId li span").removeClass("current");
                $("ul#indexUlId li[data='" + letter + "'] span").addClass("current");
            }
            if (price != "") {
                $("ul#rangeUlId li span").removeClass("current");
                $("ul#rangeUlId li[data='" + price + "'] span").addClass("current");
            }
            if (ord != "") {
                $("ul#sortUlId li span").removeClass("current");
                if (ord == "jgdesc") {
                    $("ul#sortUlId li[data='jg'] span#jg").addClass("current");
                    $("ul#sortUlId li[data='jg'] span#jg").html("价格由高到低");
                    $(".jgsortlibox").html("<span class=\"jgsortspan\" data=\"jgdesc\">价格由高到低</span><span class=\"jgsortspan\" data=\"jgasc\">价格由低到高</span>");
                }
                else if (ord == "jgasc") {
                    $("ul#sortUlId li[data='jg'] span#jg").addClass("current");
                    $("ul#sortUlId li[data='jg'] span#jg").html("价格由低到高");
                    $(".jgsortlibox").html("<span class=\"jgsortspan\" data=\"jgasc\">价格由低到高</span><span class=\"jgsortspan\" data=\"jgdesc\">价格由高到低</span>");
                }
                else {
                    $("ul#sortUlId li[data='" + ord + "'] span").addClass("current");
                    $("ul#sortUlId li[data='jg'] span#jg").html("价格");
                }
            }

            $("ul#typeUlId li").click(function () {
                $("#czlx").val($(this).attr("data"));
                filterpro();
            });
            $("ul#cardTypeUlId li").click(function () {
                $("#classid").val($(this).attr("value"));
                filterpro();
            });
            $("ul#indexUlId li").click(function () {
                $("#letter").val($(this).attr("data"));
                filterpro();
            });
            $("ul#rangeUlId li").click(function () {
                $("#price").val($(this).attr("data"));
                filterpro();
            });

            $("ul#sortUlId li").click(function () {
                var tdata = $(this).attr("data");
                if (tdata != "jg") {
                    $("#ord").val(tdata);
                    filterpro();
                }
            });
            $("ul#sortUlId li[data='jg']").hover(function () {
                $(".cons-box .cons-row.sort .cons-select").css("overflow", "visible");
                $(this).find(".jgsortbox").show();
            }, function () {
                $(".cons-box .cons-row.sort .cons-select").css("overflow", "hidden");
                $(this).find(".jgsortbox").hide();
            });
            $("ul#sortUlId li[data='jg'] .jgsortbox .jgsortlibox .jgsortspan").click(function () {
                $("#ord").val($(this).attr("data"));
                filterpro();
            });

            $(".carousel-wrapper").slide({
                titCell: ".pagers",
                mainCell: ".item-list",
                prevCell: ".carousel-prev",
                nextCell: ".carousel-next",
                effect: "leftLoop",
                autoPage: true
            }).hover(function () {
                $(this).find(".carousel-btn").animate({
                    "opacity": "1"
                }, 500);
            }, function () {
                $(this).find(".carousel-btn").animate({
                    "opacity": "0"
                }, 500);
            });
        });
        function filterpro() {
            var czlx = $("#czlx").val();
            var classid = $("#classid").val();
            var letter = $("#letter").val();
            var proid = $("#proid").val();
            var price = $("#price").val();
            var ord = $("#ord").val();
            window.location.href = "?czlx=" + czlx + "&classid=" + classid + "&letter=" + letter + "&proid=" + proid + "&price=" + price + "&ord=" + ord;
        }

    </script>
</head>
<body>
<TW:Header ID="Header1" runat="server"/>
<div class="content">
    <div class="container clearfix">
        <div class="trade-left pull-left">
            <asp:Panel ID="pnlFilterBox" CssClass="cons-box" runat="server">
                <input type="hidden" id="czlx" name="czlx" value="<%=czlx %>"/>
                <input type="hidden" id="classid" name="classid" value="<%=classid %>" />
                <input type="hidden" id="letter" name="letter" value="<%=letter %>"/>
                <input type="hidden" id="proid" name="proid" value="<%=proid %>"/>
                <input type="hidden" id="price" name="price" value="<%=price %>"/>
                <input type="hidden" id="ord" name="ord" value="<%=ord %>"/>

            	<div class="cons-row clearfix">
                    <div class="cons-label">
                        充值类型&nbsp;&nbsp;&nbsp;&nbsp;<i class="icon icon-right-red"></i>
                    </div>
                    <div class="cons-select">
                        <ul id="typeUlId">
                        	<li data=""><span class="current">全部</span></li>
                            <li data="km"><span>卡密</span></li>
                            <li data="zc"><span>直充</span></li>
                        </ul>
                    </div>
                </div>
                <asp:Panel ID="cardTypeDivId" runat="server" CssClass="cons-row clearfix" Visible="False">
                    <div class="cons-label">
                        分类&nbsp;&nbsp;&nbsp;&nbsp;<i class="icon icon-right-red"></i>
                    </div>
                    <div class="cons-select">
                        <ul id="cardTypeUlId">
                            <li value="0"><span class="current">全部</span></li>
                            <asp:Repeater ID="rptProClass" runat="server">
                            <ItemTemplate>
                            <li value="<%#Eval("Id") %>"><span><%#Eval("Title") %></span></li>
                            </ItemTemplate>
                            </asp:Repeater>
                        </ul>
                    </div>
                </asp:Panel>
                <div class="cons-row clearfix">
                    <div class="cons-label">
                        索引&nbsp;&nbsp;&nbsp;&nbsp;<i class="icon icon-right-red"></i>
                    </div>
                    <div class="cons-select">
                        <asp:PlaceHolder ID="phLetterSY" runat="server" Visible="False">
                        <ul id="indexUlId">
                            <li data=""><span class="current">全部</span></li>
                            <li data="a,b,c,d"><span>ABCD</span></li>
                            <li data="e,f,g,h"><span>EFGH</span></li>
                            <li data="i,j,k,l"><span>IJKL</span></li>
                            <li data="m,n,o,p"><span>MNOP</span></li>
                            <li data="q,r,s,t"><span>QRST</span></li>
                            <li data="u,v,w,x"><span>UVWX</span></li>
                            <li data="y,z"><span>YZ</span></li>
                        </ul>
                        </asp:PlaceHolder>
                        <asp:PlaceHolder ID="phProIdSY" runat="server" Visible="False">
                        <ul id="gameUlId">
                        	<li>
                                <span class="current"><asp:Literal ID="litProIdSYTit" runat="server"></asp:Literal></span> 
                                <a href="/productlist.aspx"><i class="icon icon-wrong"></i></a>
                            </li>
                        </ul>
                        </asp:PlaceHolder>
                    </div>
                </div>
                <div class="cons-row clearfix">
                    <div class="cons-label">
                        价格&nbsp;&nbsp;&nbsp;&nbsp;<i class="icon icon-right-red"></i>
                    </div>
                    <div class="cons-select">
                        <ul id="rangeUlId">
                            <li data=""><span class="current">全部</span></li>
                            <li data="0,49"><span>0-49</span></li>
                            <li data="50,99"><span>50-99</span></li>
                            <li data="100,199"><span>100-199</span></li>
                            <li data="200"><span>200以上</span></li>
                        </ul>
                    </div>
                </div>
                <div class="cons-row sort clearfix">
                    <div class="cons-label">
                        排序&nbsp;&nbsp;&nbsp;&nbsp;<i class="icon icon-right-red"></i>
                    </div>
                    <div class="cons-select">
                        <ul id="sortUlId">
                            <li data=""><span class="current">全部</span></li>
                            <li data="xl"><span>销量</span></li>
                            <li data="jg" style="position:relative;">
                                <span id="jg">价格</span>
                                <ul class="jgsortbox">
                                    <li data="jg" class="jgsortlibox">
                                        <span class="jgsortspan" data="jgasc">价格由低到高</span>
                                        <span class="jgsortspan" data="jgdesc">价格由高到低</span>
                                    </li>
                                </ul>
                            </li>
                            <li data="sjsj"><span>上架时间</span></li>
                        </ul>
                    </div>
                </div>
            </asp:Panel>

            <div class="goods-box">
                <ul class="card-list clearfix" id="pageListTable">
                    <asp:Panel ID="plErrorMsg" runat="server" style="text-align:center;margin-top:100px;" Visible="False">
                        <p style="font-size:30px;color:#ea4444;font-weight:blod;"><asp:Literal ID="litErrorMsg" runat="server"></asp:Literal></p>
                    </asp:Panel>

                    <asp:Repeater ID="Repeater1" runat="server" 
                    onitemdatabound="Repeater1_ItemDataBound">
                    <ItemTemplate>
                    <li class="card-item">
                        <h2><asp:Literal ID="litBigTitle" runat="server"></asp:Literal></h2>
                        <div class="carousel-wrapper">
                            <div class="tempWrap">
                                <ul class="item-list">
                                    <asp:Repeater ID="rptGoods" runat="server">
                                    <ItemTemplate>
                                    <li>
                                        <div class="price"><del>原价：￥<%#Eval("OrgPrice")%></del><strong>￥<%#Eval("PTPrice")%></strong></div>
                                        <div class="img"><a href="/goodsview.aspx?id=<%#Eval("Id")%>" target="_blank"><img src="/uploads/?<%#Eval("Thumb")%>_500x300.jpg"></a></div>
                                        <h4><a href="/goodsview.aspx?id=<%#Eval("Id")%>" target="_blank"><%#Eval("Title")%></a></h4>
                                    </li>
                                    </ItemTemplate>
                                    </asp:Repeater>
                                </ul>
                            </div>
                            <asp:PlaceHolder ID="phGdsSwitch" runat="server" Visible="False">
                            <ul class="pagers">
                                <asp:Literal ID="litGoodsCount" runat="server"></asp:Literal>
                            </ul>
                            <a class="carousel-btn carousel-prev" href="javascript:void(0);" style="opacity: 0;"></a>
                            <a class="carousel-btn carousel-next" href="javascript:void(0);" style="opacity: 0;"></a>
                            </asp:PlaceHolder>
                        </div>
                    </li>
                    </ItemTemplate>
                    </asp:Repeater>
                </ul>
            </div>
            
            <link rel="stylesheet" type="text/css" href="/images/page.css">
            <%=pager %>

        </div>
        <div class="trade-right pull-left">
            <div class="sale-best">
                <div class="title">
                    销量排行
                </div>
                <asp:Repeater ID="rptGoodsOrdSlNum" runat="server">
                <ItemTemplate>
                <div class="goods-title">
                    <span class="no"><%#Container.ItemIndex+1 %></span>
                    <a href='/goodsview.aspx?id=<%#Eval("Id") %>' target="_blank"><%#Eval("Title") %></a>
                </div>
                <%#Container.ItemIndex + 1 == 1 ? "<div class=\"goods-img\"><a href=\"/goodsview.aspx?id=" + Eval("Id") + "\" target=\"_blank\"><img src=\"/uploads/?" + Eval("Thumb") + "_500x300.jpg\"></a></div>" : ""%>
                </ItemTemplate>
                </asp:Repeater>
            </div>
        </div>
    </div>
</div>
<TW:Footer ID="Footer1" runat="server" />
</body>


