{include file="$template_path/html/header.html"}
<link href="{$template_data}scripts/plug/mobanboxmedia/jquery.mobanboxmedia.css" rel="stylesheet" />
</head>
<body class="app-skin">
{include file="$template_path/html/mb-settings.html"}
<section class="vbox">
  {include file="$template_path/html/pagenav.html"}
  <section>
    <section class="hbox stretch">
      {include file="$template_path/html/mobile-nav.html"}
      <section id="content" class="p-t-llg-xs">


        <section class="clearfix">

          <div class="container">
            <div class="row">
              <div class="col-xs-12">
                {$errorMessage}
              </div>
            </div>
          </div>

          <div class="container">
            <div class="pos-abt none" id="myScrollspy">
              <ul class="nav nav-tabs no-border nav-stacked affix" data-spy="affix" data-offset-top="150">

                {if $faqs>0 || check_login_bool() && $item.user_id == $smarty.session.user.user_id}
                <!--<li{if $smarty.get.controller == 'faq'} class=""{else} class=""{/if}>
                  <a href="/{$languageURL}items/faq/{$item.id}" title="常见问题解答">
                    <i class="i i-bubble"></i>
                    <span>
                      常见问题解答
                    </span>
                  </a>
                </li>-->
                {/if}
                {if check_login_bool() && $item.user_id == $smarty.session.user.user_id}
                <li{if $smarty.get.controller == 'edit'} class=""{else} class=""{/if}>
                <a href="/{$languageURL}items/edit/{$item.id}" title="编辑作品">
                  <i class="fa fa-edit"></i>
                    <span>
                      编辑作品
                    </span>
                </a>
                </li>
                {/if}
                {if check_login_bool() && $item.user_id == $smarty.session.user.user_id}
                <!--<li{if $smarty.get.controller == 'record'} class=""{else} class=""{/if}>
                <a href="/{$languageURL}items/record/{$item.id}" title="购买记录">
                  <i class="i i-lab"></i>
                    <span>
                      购买记录
                    </span>
                </a>
                </li>-->
                {/if}
              </ul>
            </div>

          </div>

        </section>


        <div class="clearfix bg-white-only">
          <div class=" container m-t-lg m-b-lg m-t-lg-xs m-b-sm-xs">
            <div class="row">
              <div class="col-xs-12 col-sm-6 col-md-8 col-lg-8">
                <h1 class="text-lg-xs m-t-none">
                  {$item.name}
                  {if $item.weekly_to}
                  <span class="btn btn-icon btn-ghost-success btn-rounded m-t-n-xs hidden-xs" title="这是一件推荐作品">
                    <i class="icon-like"></i>
                    <p class="none">这是一件推荐作品</p>
                  </span>
                  {/if}

                  {if $item.user.elite_author  == 'true'}
                  <span class="btn btn-icon btn-ghost-purple btn-rounded m-t-n-xs hidden-xs" title="该作品由精英作者发布">
                    <i class="icon-user-following"></i>
                  </span>
                  <p style="display:none;">该作品由精英作者发布</p>
                  {/if}

                  {if $item.user.power_elite_author  == 'true'}
                  <span class="btn btn-icon btn-ghost-danger btn-rounded m-t-n-xs hidden-xs" title="该作品由强力精英作者发布">
                    <i class="icon-magnet"></i>
                  </span>
                  <p class="none">该作品由强力精英作者发布</p>
                  {/if}
                </h1>
                <p class="text-grays text-d-xs">
                  作品主分类：
                  {foreach from=$item.categories item=e}
                  {foreach from=$e item=c name=foo}
                  <a href="/{$languageURL}categories/{$categories[$c].id}" class="text-skin" title="{$categories[$c].name}">{$categories[$c].name}</a>
                  {if !$smarty.foreach.foo.last}&gt;{/if}
                  {/foreach}
                  {/foreach}
                  发布时间：
                  <span class="text-skin">{$item.datetime|date_format:"%Y-%m-%d"}</span>
                </p>
                <p class="text-grays text-d-xs">Tags：
                  {foreach from=$item.tags item=t}
                  <a class="badge bg-light text-grays font-thin" href="/{$languageURL}items/tag/{$t.name}" title="{$t.name}" target="_blank">{$t.name}</a>
                  {/foreach}
                </p>

                <p class="satools m-t-md m-t-sm-xs m-b-none b-t-xs">
                  <a class="text-grays text-lg">
                    <i class="icon-wallet v-push m-r-sm"></i>
                    <span class="text-skin price-f">
                      {$item.price|string_format:"%.0f"}
                    </span>
                    <small>元</small>
                  </a>
                  <a href="#" class="text-grays text-lg m-l-md"><i class="icon-handbag v-push m-r-sm"></i><span class="price-f">{$item.sales}</span></a>
                  <a href="#comment" class="text-grays text-lg m-l-md"><i class="icon-speech v-push m-r-sm"></i><span class="price-f">{$item.comments}</span></a>
                  <a href="#" class="bg-skin pull-right visible-xs-block">
                    马上购买
                  </a>
                </p>

              </div>

              <div class="col-xs-12 col-sm-6 col-md-4 col-lg-4 text-right text-left-xs">


                <div class="arc-user block">
                  <a href="/{$languageURL}user/{$item.user.username}/" class="thumb-lg pull-right m-l" target="_blank" title="{$item.user.nickname}的主页">
                    {if $item.user.avatar != ''}
                    <img alt="{$item.user.username}" class="img-circle b-a b-3x b-white box-shadow" src="{$data_server}uploads/users/{$item.user.user_id}/A_{$item.user.avatar}" />
                    {else}
                    <img alt="{$item.user.username}" class="img-circle b-a b-3x b-white box-shadow" src="{$template_data}img/default-user.jpg" />
                    {/if}
                  </a>
                  <div class="clear">
                    <a href="/{$languageURL}user/{$item.user.username}/" class="block h3 text-skin m-t-sm m-b-xs" title="{$item.user.nickname}的主页" target="_blank">
                      @{$item.user.nickname}
                    </a>
                    <p class="block text-muted">
                      {foreach from=$user_badges item=b name=foo}
                      <img class="bphoto" src="{$data_server}{$b.photo}" alt="权威精英作者" title="" data-toggle="tooltip" data-placement="bottom" data-original-title="{$b.name|escape}" height="20" width="20">
                      {if $smarty.foreach.foo.last}{/if}
                      {/foreach}
                    </p>
                    <small class="block text-grays m-b-xs hidden-xs">
                      {if $user.profile_title != ''}{$user.profile_title}{else}作者太懒了，没填签名呢{/if}
                    </small>
                    <p class="block text-muted">
                      {if $follow.fromfrom < '1'}0{else}{$follow.fromfrom_count}{/if} 关注 / {if $follow.toto < '1'}0{else}{$follow.toto_count}{/if} 粉丝
                    </p>




                    {if check_login_bool() && $smarty.session.user.user_id != $user.user_id}

                    <div class="inline-block">
                      <a href="/{$languageURL}users/{$user.username}/?follow" id="follow-user">
                        <button id="follow" class="btn btn-xs-xs btn-rounded {if $user.is_follow}btn-skin{else}btn-ghost-skin{/if}" type="submit">{if $user.is_follow}<i class="icon-minus3 m-r-xs fs-16"></i>取消关注{else}<i class="icon-plus2 m-r-xs fs-16"></i>关注Ta{/if}</button>
                      </a>
                    </div>

                    <script type="text/javascript">
                      {literal}
                      seajs.use(["jq", "modules/follow"], function($, follow){
                        follow.followBtnInit($("#follow-user"), "/{/literal}{$languageURL}users/{$user.username}/?follow{literal}");
                      });
                      {/literal}
                    </script>


                    {elseif check_login_bool() && $smarty.session.user.user_id == $user.user_id}
                    <div class="inline-block">
                      <a href="###" class="btn btn-skin btn-xs-xs btn-rounded disabled">
                        不能关注自己
                      </a>
                    </div>
                    {else}
                    <div class="inline-block">
                      <button class="btn btn-ghost-skin btn-xs-xs btn-rounded" type="submit" data-toggle="modal" data-target="#myModal" data-toggle="tooltip" data-placement="bottom" data-original-title="您需要登录后才可以添加关注">
                        <i class="icon-plus2 m-r-xs fs-16"></i>关注Ta
                      </button>
                    </div>
                    {/if}


                  </div>
                </div>


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









        <div class="bg-lgray b-t b-b clear">
          <div class="container m-t-lg m-b-lg m-t-lg-xs m-b-lg-xs">
            <div class="row">
              <div class="col-xs-12">
                <section class="arc-panel block">
                  <div class="arc-body block">






                    <div class="post-item panel-shadow">
                      <div class="post-img ui image">
                        <div class="detailimg clr" id="previewdom">
                          <div id="previewobj"></div>
                        </div>

                        {if check_login_bool() && $smarty.session.user.user_id == $item.user_id}
                        <div class="ui green ribbon label huge t-l">
                          您自己的文件
                        </div>
                        {/if}


                        {if isset($item.is_buyed)}
                        <div class="ui blue ribbon label huge t-l">
                          您已购买过此文件
                        </div>
                        {/if}

                        {if check_login_bool() && $smarty.session.user.user_id == $item.user_id}
                        {else}
                        {if $item.free_file == 'true'}
                        {if check_login_bool()}

                        <a class="ui green ribbon label huge t-l" href="/{$languageURL}download/{$item.id}">
                          免费下载
                        </a>
                        {else}
                        <a class="ui green ribbon label huge t-l" href="#" data-toggle="modal" data-target="#myModal">
                          免费文件（登录下载）
                        </a>
                        {/if}
                        {/if}
                        {/if}


                        {if $item.free_file !== 'true'}
                        {if isset($item.is_buyed)}
                        {else}
                        {if !check_login_bool() || $smarty.session.user.user_id !== $item.user_id}
                        {if isset($item.user.license.personal)}
                        <div class="ui red ribbon label huge t-l fs-20 fm-sf">
                          <small>{$currency.symbol}</small>
                          <span class="p-r-xs">{$item.price|string_format:"%.0f"}</span>
                        </div>
                        {/if}

                        {/if}
                        {/if}
                        {/if}



                      </div>
                    </div>



                    {foreach from=$item.attributes item=a key=c}
                    <div class="b-b m-b-md p-b clearfix">
                      <table class="clearfix">
                        <tbody>
                        {if $a}
                        <tr>
                          <td class="fs-14 font-bold" width="50">{$attributeCategories[$c].name}</td>
                          <td class="fs-14">
                            {if is_array($a)}
                            {assign var=foo value=0}
                            {foreach from=$a item=ai}
                            {if $attributes[$ai].photo != ''}
                            <img class="tooltip" title="{$attributes[$ai].name|escape}" alt="{$attributes[$ai].name|escape}" src="{$data_server}/uploads/attributes/{$attributes[$ai].photo}" />
                            {else}
                            {if $attributeCategories[$c].type == 'input'}
                            <a class="text-muted m-r-sm">{$ai}</a>
                            {else}
                            <a class="text-muted m-r-sm">{$attributes[$ai].name}</a>
                            {/if}
                            {/if}
                            {assign var=foo value=$foo+1}
                            {/foreach}
                            {else}
                            {if $attributes[$a].photo != ''}
                            <img class="tooltip" title="{$attributes[$ai].name|escape}" alt="{$attributes[$a].name|escape}" src="{$data_server}/uploads/attributes/{$attributes[$a].photo}" />
                            {else}
                            {if $attributeCategories[$c].type == 'input'}
                            <a class="text-muted m-r-sm">{$a}</a>
                            {else}
                            <a class="text-muted m-r-sm">{$attributes[$a].name}</a>
                            {/if}
                            {/if}
                            {/if}
                          </td>
                        </tr>
                        {/if}
                        </tbody>
                      </table>
                    </div>
                    {/foreach}

                    {$item.description}



                  </div>
                  <div class="arc-body block gx m-t-lg text-center pos-rlt">
                    <span class="pos-abt gxspan block">
                      &nbsp;
                    </span>
                    <span class="pos-abt gxspand block">
                      &nbsp;
                    </span>
                    <h2 class="m-b-lg">
                      更新日志
                    </h2>
                    <div class="timeline">
                      <article class="timeline-item">
                        <div class="timeline-caption">
                          <div class="panel panel-default">
                            <div class="panel-body">
                              <span class="arrow left">
                              </span>
                              <span class="timeline-icon">
                                <i class="icon-ribbon time-icon bg-primary"></i>
                              </span>
                              <span class="timeline-date">
                                2015-05-31
                              </span>
                              <div class="text-sm">
                                小修改
                              </div>
                              <h5>
                                修复一处导航css错误
                              </h5>
                            </div>
                          </div>
                        </div>
                      </article>
                      <article class="timeline-item alt">
                        <div class="timeline-caption">
                          <div class="panel panel-default">
                            <div class="panel-body">
                              <span class="arrow right">
                              </span>
                              <span class="timeline-icon">
                                <i class="icon-directions time-icon bg-skin"></i>
                              </span>
                              <span class="timeline-date">
                                2015-05-30
                              </span>
                              <div class="text-sm">
                                新增php高版本支持
                              </div>
                              <h5>
                                修复支持php5.3+N版本，请下载最新包安装体验。
                              </h5>
                            </div>
                          </div>
                        </div>
                      </article>
                      <article class="timeline-item">
                        <div class="timeline-caption">
                          <div class="panel panel-default">
                            <div class="panel-body">
                              <span class="arrow left">
                              </span>
                              <span class="timeline-icon">
                                <i class="icon-picture time-icon bg-info"></i>
                              </span>
                              <span class="timeline-date">
                                2015-05-11
                              </span>
                              <h5>
                                模板发布
                              </h5>
                              <p>
                                <a class="text-skin">
                                  陈三哥
                                </a>
                                保留该文件所有权
                              </p>
                            </div>
                          </div>
                        </div>
                      </article>
                      <div class="timeline-footer">
                        <a href="#">
                          <i class="icon-plus2 time-icon inline-block bg-dark"></i>
                        </a>
                      </div>
                    </div>
                  </div>
                  <div class="arc-footer block">
                    <div class="post-bookmarks m-t-lg text-center">
                      {if check_login_bool()}
                      <button class="btn btn-ghost-dark btn-rounded p-l-lg p-r-lg btn-xs-xs" type="submit" data-toggle="modal" data-target="#cbook">
                        <i class="icon-star m-r-xs fs-16"></i>加入书签
                      </button>
                      {else}
                      <button class="btn btn-ghost-dark btn-rounded p-l-lg p-r-lg btn-xs-xs" type="submit" data-toggle="modal" data-target="#myModal">
                        <i class="icon-star m-r-xs fs-16"></i>加入书签
                      </button>
                      {/if}
                    </div>
                  </div>
                </section>
              </div>
            </div>
          </div>
        </div>
        <div class="clearfix bg-white-only p-t-md p-b-xs">
          <div class="container arc-btn-group">
            <div class="row">

              {if $item.demo_url}
              <div class="col-xs-6 col-sm-3 col-md-3 m-b">
                <a href="/{$languageURL}items/preview/{$item.id}" target='_blank' title="在线预览" class="btn btn-dark b-2x btn-block btn-lg">
                  <i class="icon-magnifier-add m-r-sm"></i>
                  在线演示
                </a>
              </div>
              <div class="col-xs-6 col-sm-3 col-md-3 m-b">
                <a target='_blank' title="截图预览" screenshot-img="{foreach from=$previewFiles item=file name=foo}{$file}{if !$smarty.foreach.foo.last}|{/if}{/foreach}" screenshot-tit="{$item.name|escape}" class="linkbtn screenbtn btn btn-info b-2x btn-block btn-lg">
                  <i class="icon-picture m-r-sm"></i>
                  图片演示
                </a>
              </div>
              <div class="col-xs-6 col-sm-3 col-md-3 m-b">

                {if check_login_bool() && $smarty.session.user.user_id == $item.user_id}
                <a href="###" class="btn btn-danger b-2x btn-block btn-lg btn-xs-xs">您自己的文件</a>
                {/if}


                {if isset($item.is_buyed)}
                <a href="/{$languageURL}download/{$item.id}" class="btn btn-danger b-2x btn-block btn-lg btn-xs-xs">下载 ( <small>已购</small> )</a>
                {/if}

                {if check_login_bool() && $smarty.session.user.user_id == $item.user_id}
                {else}
                {if $item.free_file == 'true'}
                {if check_login_bool()}
                <a href="/{$languageURL}download/{$item.id}" class="btn btn-danger b-2x btn-block btn-lg btn-xs-xs">免费下载</a>

                {else}
                <a href="#" data-toggle="modal" data-target="#myModal" class="btn btn-danger b-2x btn-block btn-lg btn-xs-xs">免费下载</a>
                {/if}
                {/if}
                {/if}


                {if $item.free_file !== 'true'}
                {if isset($item.is_buyed)}
                {else}
                {if !check_login_bool() || $smarty.session.user.user_id !== $item.user_id}
                <form action="/{$languageURL}items/{$item.id}" id="purchase-form" method="post" name="purchase-form">
                  <meta itemprop="price" content="$3">

                  <div class="btn-group block">

                    {if isset($item.user.license.personal)}
                    <div class="licenitem" id="licenitem-price">
                      <button class="btn btn-danger b-2x btn-block btn-lg btn-xs-xs" type="submit" data-toggle="modal" data-target="#myModal"><i class="icon-handbag fs-16 m-r-sm"></i>马上购买 ( <small>{$currency.symbol}</small> {$item.price|string_format:"%.0f"} )</button>
                    </div>
                    {/if}

                    {if isset($item.user.license.extended)}
                    <div class="licenitem none" id="licenitem-extend">
                      <button class="btn btn-danger b-2x btn-block btn-lg btn-xs-xs" id="purchase_button2" onclick="" type="submit" data-toggle="modal" data-target="#myModal"><i class="icon-handbag m-r-sm"></i>马上购买 ( <small>{$currency.symbol}</small> {$item.extended_price|string_format:"%.0f"} )</button>
                    </div>
                    {/if}

                    <select class="btn btn-danger b-2x btn-lg dropdown-toggle none" name="" id="lchoose">
                      {if isset($item.user.license.personal)}
                      <option value="1">共享许可</option>
                      {/if}
                      {if isset($item.user.license.extended)}
                      <option value="0">专有许可</option>
                      {/if}
                    </select>
                  </div>
                  {literal}
                  <script type="text/javascript">
                    seajs.use(["modules/licence"], function(lens){
                      lens.init({
                        "form": "purchase-form",
                        "price": '{/literal}{$item.price|string_format:"%.0f"}{literal}',
                        "prepaid_price": '{/literal}{$item.prepaid_price|string_format:"%.0f"}{literal}',
                        "extended_price": '{/literal}{if $item.extended_price < 0}0.00{else}{$item.extended_price|string_format:"%.2f"}{/if}{literal}',
                        "discount": '{/literal}{$meta.prepaid_price_discount}{literal}'
                      });
                    });
                  </script>
                  {/literal}

                </form>
                {/if}
                {/if}
                {/if}
              </div>
              <div class="col-xs-6 col-sm-3 col-md-3 m-b">
                <a href="#" class="btn btn-success b-2x btn-block btn-lg">
                  <i class="icon-share m-r-sm"></i>
                  分享
                </a>
              </div>
              {else}


              <div class="col-xs-12 col-sm-4 col-md-4 m-b">
                <a target='_blank' title="截图预览" screenshot-img="{foreach from=$previewFiles item=file name=foo}{$file}{if !$smarty.foreach.foo.last}|{/if}{/foreach}" screenshot-tit="{$item.name|escape}" class="linkbtn screenbtn btn btn-info b-2x btn-block btn-lg">
                  <i class="icon-picture m-r-sm"></i>
                  图片演示
                </a>
              </div>
              <div class="col-xs-12 col-sm-4 col-md-4 m-b">

                {if check_login_bool() && $smarty.session.user.user_id == $item.user_id}
                <a href="###" class="btn btn-danger b-2x btn-block btn-lg btn-xs-xs">您自己的文件</a>
                {/if}


                {if isset($item.is_buyed)}
                <a href="/{$languageURL}download/{$item.id}" class="btn btn-danger b-2x btn-block btn-lg btn-xs-xs">下载 ( <small>已购</small> )</a>
                {/if}

                {if check_login_bool() && $smarty.session.user.user_id == $item.user_id}
                {else}
                {if $item.free_file == 'true'}
                {if check_login_bool()}
                <a href="/{$languageURL}download/{$item.id}" class="btn btn-danger b-2x btn-block btn-lg btn-xs-xs">免费下载</a>

                {else}
                <a href="#" data-toggle="modal" data-target="#myModal" class="btn btn-danger b-2x btn-block btn-lg btn-xs-xs">免费下载</a>
                {/if}
                {/if}
                {/if}


                {if $item.free_file !== 'true'}
                {if isset($item.is_buyed)}
                {else}
                {if !check_login_bool() || $smarty.session.user.user_id !== $item.user_id}
                <form action="/{$languageURL}items/{$item.id}" id="purchase-form" method="post" name="purchase-form">
                  <meta itemprop="price" content="$3">

                  <div class="btn-group block">

                    {if isset($item.user.license.personal)}
                    <div class="licenitem" id="licenitem-price">
                      <button class="btn btn-danger b-2x btn-block btn-lg btn-xs-xs" type="submit" data-toggle="modal" data-target="#myModal"><i class="icon-handbag fs-16 m-r-sm"></i>马上购买 ( <small>{$currency.symbol}</small> {$item.price|string_format:"%.0f"} )</button>
                    </div>
                    {/if}

                    {if isset($item.user.license.extended)}
                    <div class="licenitem none" id="licenitem-extend">
                      <button class="btn btn-danger b-2x btn-block btn-lg btn-xs-xs" id="purchase_button2" onclick="" type="submit" data-toggle="modal" data-target="#myModal"><i class="icon-handbag m-r-sm"></i>马上购买 ( <small>{$currency.symbol}</small> {$item.extended_price|string_format:"%.0f"} )</button>
                    </div>
                    {/if}

                    <select class="btn btn-danger b-2x btn-lg dropdown-toggle none" name="" id="lchoose">
                      {if isset($item.user.license.personal)}
                      <option value="1">共享许可</option>
                      {/if}
                      {if isset($item.user.license.extended)}
                      <option value="0">专有许可</option>
                      {/if}
                    </select>
                  </div>
                  {literal}
                  <script type="text/javascript">
                    seajs.use(["modules/licence"], function(lens){
                      lens.init({
                        "form": "purchase-form",
                        "price": '{/literal}{$item.price|string_format:"%.0f"}{literal}',
                        "prepaid_price": '{/literal}{$item.prepaid_price|string_format:"%.0f"}{literal}',
                        "extended_price": '{/literal}{if $item.extended_price < 0}0.00{else}{$item.extended_price|string_format:"%.2f"}{/if}{literal}',
                        "discount": '{/literal}{$meta.prepaid_price_discount}{literal}'
                      });
                    });
                  </script>
                  {/literal}

                </form>
                {/if}
                {/if}
                {/if}
              </div>
              <div class="col-xs-12 col-sm-4 col-md-4 m-b">
                <a href="#" class="btn btn-success b-2x btn-block btn-lg">
                  <i class="icon-share m-r-sm"></i>
                  分享
                </a>
              </div>


              {/if}
            </div>
          </div>
        </div>
        <div class="arc-com bg-lgray b-t b-b clear" id="comment">
          <div class="container m-t-lg m-b-sm m-t-none-xs m-b-lg-xs">
            <div class="row">
              <div class="col-xs-12 col-md-8">
                <section class="panel arc-com-panel">
                  <div class="panel-heading clear b-b">
                    <h3 class="m-t-xs m-b-xs pull-left" style="font-size:21px;">
                      <i class="icon-speech m-r-sm"></i>
                      评论
                    </h3>
                  </div>
                  <div class="panel-body">
                    {include file="$template_path/html/duoshuo.html"}
                  </div>
                  <link rel="stylesheet" href="/mbthemes/css/duoshuo.css" type="text/css">
                </section>
              </div>
              {if $otherItems}
              <div class="col-xs-12 col-md-4">
                <section class="panel user-zuopin">
                  <div class="panel-heading b-b">
                    <h3 class="m-t-xs m-b-xs" style="font-size:21px;">
                      <i class="icon-list m-r-sm"></i>
                      {$item.user.nickname}的其它作品
                    </h3>
                  </div>
                  <div class="panel-body">
                    <div class="row row-sm">
                      {foreach from=$otherItems item=i}
                      <div class="col-xs-6">
                        <section class="panel mb-col sucai b-b no-shadow" style="border-radius:0;">
                          <div class="panel-body pic">
                            <a href="/{$languageURL}items/{$i.id}" title="{$i.name|escape}" target="_blank">
                              <img class="img-responsive" src="{$data_server}uploads/items/{$i.id}/{$i.thumbnail}" alt="{$i.name|escape}">
                              <div class="covers">
                              </div>
                              <div class="mtools">
                                <span>
                                  <i>
                                    +
                                  </i>
                                </span>
                              </div>
                            </a>
                          </div>
                          <div class="clearfix panel-footer no-border no-bgc no-p-t">
                            <h3 class="m-t-xs m-b-n-xs line-mb">
                              <a href="/{$languageURL}items/{$i.id}" class="mb-title" title="{$i.name|escape}" target="_blank">
                                {$i.name|escape}
                              </a>
                            </h3>
                          </div>
                        </section>
                      </div>
                      {/foreach}
                      <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                        <a href="/{$languageURL}user/{$item.user.username}" class="btn btn-ghost-dark b-2x btn-lg btn-block">
                          <i class="icon-magnifier-add"></i>
                          &nbsp;&nbsp;查看更多
                        </a>
                      </div>
                    </div>
                  </div>
                </section>
              </div>
              {else}

              {if $weeklyItems}

              <div class="col-xs-12 col-md-4">
                <section class="panel user-zuopin">
                  <div class="panel-heading b-b">
                    <h3 class="m-t-xs m-b-xs" style="font-size:21px;">
                      <i class="icon-list m-r-sm"></i>
                      其它作品推荐
                    </h3>
                  </div>
                  <div class="panel-body">
                    <div class="row row-sm">
                      {foreach from=$otherItems item=i}
                      <div class="col-xs-6">
                        <section class="panel mb-col sucai b-b no-shadow" style="border-radius:0;">
                          <div class="panel-body pic">
                            <a href="/{$languageURL}items/{$i.id}" title="{$i.name|escape}" target="_blank">
                              <img class="img-responsive" src="{$data_server}uploads/items/{$i.id}/{$i.thumbnail}" alt="{$i.name|escape}">
                              <div class="covers">
                              </div>
                              <div class="mtools">
                                <span>
                                  <i>
                                    +
                                  </i>
                                </span>
                              </div>
                            </a>
                          </div>
                          <div class="clearfix panel-footer no-border no-bgc no-p-t">
                            <h3 class="m-t-xs m-b-n-xs line-mb">
                              <a href="/{$languageURL}items/{$i.id}" class="mb-title" title="{$i.name|escape}" target="_blank">
                                {$i.name|escape}
                              </a>
                            </h3>
                          </div>
                        </section>
                      </div>
                      {/foreach}
                      <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                        <a href="/{$languageURL}user/{$item.user.username}" class="btn btn-ghost-dark b-2x btn-lg btn-block">
                          <i class="icon-magnifier-add"></i>
                          &nbsp;&nbsp;查看更多
                        </a>
                      </div>
                    </div>
                  </div>
                </section>
              </div>
              {/if}
              {/if}



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

        {include file="$template_path/html/footer.html"}

      </section>
    </section>
  </section>
</section>
{literal}
<script type="text/javascript">
  seajs.use(["pageui", "modules/screenshot"], function(ui, scre){
    ui.imgMagnifier("a.landscape-image-magnifier");
    scre.init("#previewdom", ".screenbtn", {
      preurl: "{/literal}{$item.theme_preview}{literal}",
      prename: "{/literal}{$item.name|escape}{literal}",
      preimgs: "{/literal}{foreach from=$previewFiles item=file name=foo}{$file}{if !$smarty.foreach.foo.last}|{/if}{/foreach}{literal}",
      prelink: "{/literal}/{$languageURL}items/screenshots/{$item.id}{literal}"
    });
    scre.init(".arc-btn-group", ".screenbtn", {
      preurl: "{/literal}{$item.theme_preview}{literal}",
      prename: "{/literal}{$item.name|escape}{literal}",
      preimgs: "{/literal}{foreach from=$previewFiles item=file name=foo}{$file}{if !$smarty.foreach.foo.last}|{/if}{/foreach}{literal}",
      prelink: "{/literal}/{$languageURL}items/screenshots/{$item.id}{literal}"
    });
  });
</script>
{/literal}
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    {include file="$template_path/items/purchase_panel.html"}
  </div>
</div>


{if check_login_bool()}

<!-- Modal -->
<div class="modal fade" id="cbook" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-sm">

    <form id="bookmark_form" method="post" action="#bookmark" enctype="multipart/form-data">
      <div class="modal-content">



        <div class="modal-header">
          <div class="clearfix form-group">
            <select class="form-control" id="collection_id" name="collection_id">
              {if $bookCollections}
              {foreach from=$bookCollections item=c}
              <option value="{$c.id}">{$c.name}</option>
              {/foreach}
              {else}
              <option value="none">请先新建书签集</option>
              {/if}
            </select>
          </div>
          <h4 class="modal-title" id="collection_create_link"><a list-show="0" href="#">新建书签集</a></h4>
        </div>
        <div class="modal-body" style="display:none;" id="collection_create_form">



          <div class="form-group">
            <label for="name">书签名称</label>
            <input id="name" class="form-control" name="name" type="text" value="" />
          </div>

          <div class="form-group">
            <label for="description">书签描述</label>
            <textarea id="description" class="form-control" name="description" rows="6"></textarea>
          </div>


          <div class="form-group">
            <label for="file_upload">书签封面</label>
            <input id="file_upload" name="file_upload" class="form-control" type="file">
            <span class="help-block m-b-none">(260 x 140px)</span>
          </div>

          <div class="checkbox i-checks">
            <label for="publically_visible">
              <input id="publically_visible" name="publically_visible" type="checkbox" checked="" value="1"><i></i> 分类是否公开?
            </label>
          </div>
        </div>
        <div class="modal-footer" href="javascript: void(0);">
          <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
          <input type="hidden" name="add_collection" value="yes" />
          <button type="submit" class="btn btn-info">添加至书签集！</button>
        </div>
      </div>
    </form>
    <script>
      {literal}
      seajs.use(["jq", "modules/collection"], function($, coll){
        coll.btninit("#collection_create_link a", "#collection_create_form");
      });
      {/literal}
    </script>
  </div>
</div>

{/if}
</body>
</html>