<%@ page language="C#" autoeventwireup="true" inherits="Search_Shop, WebApp_deploy" title="店铺搜索页" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<%@ Register TagPrefix="hl" TagName="TextFormat" Src="UserControls/ProductTextFormat.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" runat="server">
<head runat="server">
    <script src="Skin/CommStyle/js/jquery-1.8.3.min.js" type="text/javascript"></script>
    <link href="Skin/TopStyle/Basic.css" rel="stylesheet" type="text/css" />
    <link href="Skin/CommStyle/main.css" rel="stylesheet" type="text/css" />
    <link href="/Skin/Default/Class/layout.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/Js/f_function.js"></script>
    <title></title>
    
    <script type="text/javascript">
        //<!CDATA[
        $(function () {
            var order = '';
            var arrow = '';
            var class_val = 'sort_desc';

            switch (order) {
                case 'store_credit desc': order = 'store_credit asc'; class_val = 'sort_desc'; break;
                case 'store_credit asc': order = 'store_credit desc'; class_val = 'sort_asc'; break;
                default: order = 'store_credit asc';
            }
            $('#credit_grade').addClass(class_val);
            $('#credit_grade').click(function () { query('order', order); return false; });
        });
        function query(name, value) {
            $("input[name='" + name + "']").val(value);
            $('#searchStore').submit();
        }

        //]]>
    </script>
</head>
<body>
    <form runat="server" id="form1">
    <hl:Top ID="Top1" runat="server" />
    <div id="main" class="main">
        <div class="keyword">
            <h4>
                当前位置：</h4>
            <a href="Index.aspx">首页</a><span>&nbsp;</span>
            <asp:Literal ID="Literaltop_menu" runat="server" />
        </div>
        <div class="content">
            <div class="left">
                <div class="module_sidebar">
                    <h2>
                        <b>店铺分类</b>STORE SORT</h2>
                    <div class="wrap">
                        <div class="wrap_child">
                            <asp:Literal ID="ShowShopClassList_Literal" runat="server" />
                        </div>
                    </div>
                </div>
            </div>
            <div class="right sort-bar">
                <div class="shop_con_list" id="main-nav-holder">
                    <nav class="nc-gl-sort-bar" id="main-nav">
          <input type="hidden" name="order" value=""/>
          <input type="hidden" name="act" value="store_class"/>
          <input type="hidden" name="cate_id" value=""/>
          <div class="box sort-bar">
            <div class="sidebox width5">
             <span class="display_span">店铺名称:</span>
              <div class="selectbox">
                <input id="SearchShopName" runat="server" class="table_text" style="width:80px;" />
              </div>
            </div>
            <div class="sidebox width9">
              <span class="display_span">店主名:</span>
              <div class="selectbox">
                <input id="SearchSalerName" runat="server" class="table_text" style="width:80px;" />
              </div>
            </div>
            <div class="sidebox width9">
              <span class="display_span">所在地:</span>
              <div class="selectbox">
         <asp:DropDownList ID="ProvinceCity" runat="server"></asp:DropDownList>
              </div>
            </div>
            <div class="sidebox width5" style=" background-image: none">
              <div class="selectbox">
<asp:Button Text="搜索" ID="SearchShopButton" runat="server" OnClick="SearchShopButton_Click" CssClass="btn"/>
              </div>
            </div>
          </div>
      </nav>
                </div>
                <div class="shop_list">
                    <table width="100%">
                        <tr>
                            <th>
                                店铺
                            </th>
                            <th class="width2">
                                商品数量
                            </th>
                            <th class="width4">
                                店主
                            </th>
                            <th class="width4">
                                <a id="credit_grade" href="javascript:void(0);">信用度</a>
                            </th>
                            <th class="width4">
                                所在地
                            </th>
                        </tr>
                        <asp:Repeater ID="Repeater1" runat="server">
                            <ItemTemplate>
                                <tr>
                                    <td class="width1">
                                        <div class="picture">
                                            <a target="_blank" href="/Store/ShopIndex.aspx?ShopID=<%#Eval("ShopID") %>"><span
                                                class="thumb size60"><i></i>
                                                <asp:Image ID="ShopImage" runat="server" onerror="this.src='/Images/NofinePic.gif'"
                                                    ImageUrl='<%# Eval("ShopImageUrl") %>' Width="60px" Height="60px" />
                                            </span></a>
                                        </div>
                                        <h3>
                                            <a target="_blank" href="/Store/ShopIndex.aspx?ShopID=<%#Eval("ShopID") %>">
                                                <%#Eval("ShopName")%></a>
                                        </h3>
                                    </td>
                                    <td class="align2">
                                        <asp:Label ID="ProductType" Text='<%#getProductCount(Eval("ShopID")) %>' runat="server" />
                                    </td>
                                    <td class="align2">
                                        <p class="name">
                                            <%#Eval("ShopOwnerName") %>
                                        </p>
                                        <p>
                                         <asp:Literal ID="ltrUserName" runat="server" Text='<%#getLinkUser(Eval("ShopOwnerID")) %>'></asp:Literal>
                                        </p>
                                    </td>
                                    <td class="align2">
                                        <span class="seller-crown level-5">
                                            <asp:Label ID="Label1" runat="server" Text='<%# "<script type=text/javascript>displayStar("+getSalerCredit((int)Eval("ShopOwnerID"))+")</script>"%>'></asp:Label>
                                              
                                        </span>
                                    </td>
                                    <td class="align2">
                                        <%#Eval("Province")%>&nbsp<%#Eval("City")%>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
                </div>
                <table id="tError" runat="server">
                    <tbody>
                        <tr>
                            <td style="border-bottom: none;" colspan="16">
                                <div id="no_results">
                                    没有找到符合条件的店铺</div>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div class="pagination">
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" FirstPageText="首页" LastPageText="最后页"
                                NextPageText="下一页" PrevPageText="上一页" UrlPaging="false" 
                        AlwaysShow="True" PageSize="1"
                                PagingButtonClass="paginationPage" 
                        onpagechanged="AspNetPager1_PageChanged" >
                            </webdiyer:AspNetPager>
                    
                </div>
            </div>
        </div>
    </div>
    <hl:Foot ID="Foot1" runat="server" />
    </form>
</body>
</html>
