{include file="$template_path/html/header.html"}
{include file="$template_path/js/index.html"}
{include file="$template_path/html/jstemplate.html"}
</head>
<body>
<div class="app" id="app">
  {include file="$template_path/html/mobile-nav.html"}
  <!-- content -->
  <div id="content" class="app-content box-shadow-z4" role="main">
    {include file="$template_path/html/pagenav.html"}
    <div class="app-body" id="view">
      <!-- ############ PAGE START-->
      <div class="clearfix grey-100 p-t-md p-b-md">
        <div class="container">

          <div class="row">
            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-2">
              <h3 class="m-t-none m-b-none phone-h2">
                {$categoriesList9}
                <b class="label text-sm rounded danger up">{$allRows}</b>
              </h3>
            </div>
            <div class="col-lg-6 small-nav">
              {$categoriesList7}
            </div>
            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-4 text-right">
              <form action="" id="sortbyform" method="get">
                <input id="order-type" name="order" type="hidden" value="{if $smarty.get.order == 'asc'}desc{else}asc{/if}" />
                <input type="hidden" id="sort_by" name="sort_by" />
                <div class="btn-group m-t-xs">

                  <a href="javascript: void(0);" onclick="document.getElementById('sort_by').value='sales_count';document.getElementById('sortbyform').submit();"{if $smarty.get.sort_by == 'sales_count'} class="btn p-l-md p-r p-y-xs btn-outline skin" {else} class="btn p-l-md p-r p-y-xs btn-outline b-skin text-skin"{/if} title="" data-toggle="tooltip" data-placement="bottom" data-original-title="按销量排序">
                  销量
                  <i class="icon-xjt1 m-l-xs"></i>
                  </a>
                  <a href="javascript: void(0);" onclick="document.getElementById('sort_by').value='cost';document.getElementById('sortbyform').submit();"{if $smarty.get.sort_by == 'cost'} class="btn p-l-md p-r p-y-xs btn-outline skin" {else} class="btn p-l-md p-r p-y-xs btn-outline b-skin text-skin"{/if} title="" data-toggle="tooltip" data-placement="bottom" data-original-title="按价格排序">
                  价格
                  <i class="icon-xjt1 m-l-xs"></i>
                  </a>
                  <a href="javascript: void(0);" onclick="document.getElementById('sort_by').value='published_at';document.getElementById('sortbyform').submit();"{if $smarty.get.sort_by == 'published_at'} class="btn p-l-md p-r p-y-xs btn-outline skin" {else} class="btn p-l-md p-r p-y-xs btn-outline b-skin text-skin"{/if} data-toggle="tooltip" data-placement="bottom" data-original-title="按日期排序">
                  日期
                  <i class="icon-xjt1 m-l-xs"></i>
                  </a>

                </div>

              </form>
            </div>
          </div>


          {if $items}
          <div class="row m-t" id="moban-items">
            {foreach from=$items item=i name=foo}
            <div class="col-xs-6 col-sm-6 col-md-4 moban-items">
              <section class="box mb-col b-a pos-rlt image">
                <div class="browser clearfix">
                  <span class="col-xs-3 col-sm-3">
                    <i class="yuan"></i>
                  </span>
                  <span class="col-xs-6 col-sm-6">
                    <em>
                    </em>
                  </span>
                  <span class="col-xs-3 col-sm-3 three">
                    <i class="icon-cross2"></i>
                    <i class="icon-check_box_outline_blank"></i>
                    <i class="icon-minus3"></i>
                  </span>
                </div>
                <div class="box-body pic">
                  <div class="img-container fx-img-rotate-l fx-opt-zoom-out">
                    <img data-original="{$data_server}uploads/items/{$i.id}/{$i.thumbnail}" src="{$data_server}uploads/items/{$i.id}/{$i.thumbnail}" alt="{$i.name|escape}" class="img-responsive">
                    <div class="img-options opw">
                      <div class="img-options-content">
                        {if $i.demo_url}
                        <a data-toggle="ajaxModal" data-src="/{$languageURL}items/itempreview/{$i.id}" href="/{$languageURL}items/preview/{$i.id}" class="btn btn-lg skin m-r-md hidden-xs-down" title="在线演示">
                          <i class="icon-eye"></i>
                        </a>
                        {else}
                        <a data-toggle="MobanBoxAjax" href="/{$languageURL}items/screenshots/{$i.id}" title="截图预览" class="linkbtn screenbtn btn btn-lg skin m-r-md hidden-xs-down">
                          截图演示
                        </a>
                        {/if}
                        <a data-src="/{$languageURL}items/itemsview/{$i.id}" href="/{$languageURL}items/{$i.id}" target="_blank" class="btn btn-lg danger" title="查看详情">
                          <i class="icon-magnifier-add"></i>
                        </a>
                      </div>
                    </div>
                    <a href="/{$languageURL}items/{$i.id}#comment" target="_blank" class="sale" title="评论">
                      <i class="icon-bubbles m-r-xs"></i> {$i.comments|escape}
                    </a>
                  </div>
                </div>
                <a href="/{$languageURL}items/{$i.id}" class="ribbon ribbon-skin price" title="销量">
                  <i class="icon-handbag m-r-xs"></i> <span class="text-lg">{$i.sales|escape}</span>
                </a>
                <div class="mb-footer">
                  <div class="text-muted m-b-xs">
                    <a href="/{$languageURL}items/{$i.id}" target="_blank" class="m-r"><i class="icon-clock m-r-xs"></i> {$i.datetime|date_format:"%m-%d"|escape}</a>
                  </div>
                  <div class="h-2xx"><a href="/{$languageURL}items/{$i.id}" target="_blank" class="h5">{$i.name|escape}</a></div>
                  <div class="clearfix m-t-xs">
                    <div class="pull-left m-r-sm dropdown myDrop userdrops">
                      <a data-toggle="ajaxUser" data-src="/{$languageURL}user/portfolio/{$users[$i.user_id].username}" href="/{$languageURL}user/{$users[$i.user_id].username}" class="pull-left myUserAjax">
                        <span class="w-32 avatar">
                          {if $users[$i.user_id].avatar != ''}
                          <img src="{$data_server}uploads/users/{$i.user_id}/A_{$users[$i.user_id].avatar}" />
                          {else}
                          <span class="circle skin _100 w-32 fs-80">
                            NP
                          </span>
                          {/if}
                        </span>
                      </a>
                    </div>
                    <a href="/{$languageURL}user/{$users[$i.user_id].username}" target="_blank" class="pull-left m-t-sm clear">
                      {$users[$i.user_id].nickname}
                    </a>
                    <div class="pull-right">
                      <div class="h-32"><span class="price-rmb text-skin"><small>￥</small>{if $i.free_file == 'true'}0{else}{$i.price}{/if}</span></div>
                    </div>
                  </div>
                </div>
              </section>
            </div>
            {/foreach}

          </div>
          {$paging}
          {else}
          <div class="row">
            <div class="col-xs-12 no-items text-center">
              <div class="h-v-5 row-col">
                <div class="row-cell v-m text-center animated fadeIn">
                  <h3 class="m-t text-muted"><i class="icon-sad h1 m-r" style="vertical-align: -7px"></i>还没有作品哦</h3>
                </div>
              </div>
            </div>
          </div>
          {/if}

        </div>
      </div>
      <!-- ############ PAGE END-->
    </div>
    {include file="$template_path/html/footer.html"}
  </div>
  {include file="$template_path/html/backtop.html"}
  {include file="$template_path/html/mb-settings.html"}
  <!-- ############ LAYOUT END-->
</div>
<script src="/mbthemes/scripts/ajax.js"></script>
<script type="text/javascript">
  {literal}
  seajs.use("/mbthemes/scripts/libs/jquery/infinite/infinite");
  {/literal}
</script>
</body>
</html>