<?php /* Smarty version 2.6.22, created on 2017-12-13 16:34:53
         compiled from D:%5CphpStudy%5CWWW/templates/home/default%5Citems%5Cindex.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', 'D:\\phpStudy\\WWW/templates/home/default\\items\\index.html', 36, false),array('modifier', 'date_format', 'D:\\phpStudy\\WWW/templates/home/default\\items\\index.html', 87, false),array('modifier', 'string_format', 'D:\\phpStudy\\WWW/templates/home/default\\items\\index.html', 125, false),array('modifier', 'nl2br', 'D:\\phpStudy\\WWW/templates/home/default\\items\\index.html', 209, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['template_path'])."/html/header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['template_path'])."/js/arc.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['template_path'])."/html/jstemplate.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php if (check_login_bool ( ) && $_SESSION['user']['user_id'] == $this->_tpl_vars['item']['user_id'] || $_SESSION['user']['access'] || isset ( $this->_tpl_vars['item']['is_buyed'] )): ?>

<link href="/mbthemes/scripts/libs/jquery/mobanboxeditor/mb/css/mobanboxeditor.min.css" rel="stylesheet"/>
<link href="//cdn.bootcss.com/highlight.js/9.0.0/styles/github.min.css" rel="stylesheet">
<script type="text/javascript">
  <?php echo '
  seajs.use("/mbthemes/scripts/libs/jquery/mobanboxeditor/mb/js/main");
  '; ?>

</script>
<?php else: ?>

<link href="/mbthemes/scripts/libs/jquery/mobanboxeditor/mb/css/mobanboxeditor.min.css" rel="stylesheet"/>
<link href="//cdn.bootcss.com/highlight.js/9.0.0/styles/github.min.css" rel="stylesheet">
<script type="text/javascript"><?php echo 'seajs.use("/mbthemes/scripts/libs/jquery/mobanboxeditor/mb/js/main_no");'; ?>
</script>
<?php endif; ?>
</head>
<body>
<div class="app" id="app">
  <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['template_path'])."/html/mobile-nav.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  <!-- content -->
  <div id="content" class="app-content box-shadow-z4" role="main">
    <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['template_path'])."/html/pagenav.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
    <div class="app-body" id="view">
      <!-- ############ PAGE START-->
      <div class="white b-t">
        <div class="container">
          <div class="row-col">
            <div class="col-sm">
              <div class="box pos-rlt b-l b-r b-b m-b-0">
                <div class="p-a">
                  <div><?php echo $this->_tpl_vars['errorMessage']; ?>
</div>
                  <div class="item">
                    <img data-original="<?php echo $this->_tpl_vars['item']['theme_preview']; ?>
" src="/mbthemes/assets/images/load-big.png" class="m-w img-responsive" alt="<?php echo ((is_array($_tmp=$this->_tpl_vars['item']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
                    <div class="item-overlay black-overlay w-full animated fadeIn">
                      <ul class="center nav" style="top: 46%">
                        <li class="nav-item inline dropdown">
                          <a class="nav-link text-skin" title="分享本作品到" data-toggle="dropdown" aria-expanded="false">
                            <i class="icon-share md-36"></i>
                          </a>
                          <div class="dropdown-menu dropdown-menu-scale pull-right dark">
                            <div class="bdsharebuttonbox text-skin-hover">
                              <a href="#" class="dropdown-item p-y-sm" data-cmd="tsina" title="分享到新浪微博">微博</a>
                              <a href="#" class="dropdown-item p-y-sm" data-cmd="sqq" title="分享到QQ好友">QQ好友</a>
                              <a href="#" class="dropdown-item p-y-sm" data-cmd="weixin" title="分享到微信">微信</a>
                              <a href="#" class="dropdown-item p-y-sm" data-cmd="qzone" title="分享到QQ空间">QQ空间</a>
                            </div>
                            <script><?php echo 'window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"1","bdMiniList":["qzone","tsina","weixin","renren","tieba","sqq","copy"],"bdPic":"","bdStyle":"1","bdSize":"32"},"share":{"bdSize":16}};with(document)0[(getElementsByTagName(\'head\')[0]||body).appendChild(createElement(\'script\')).src=\'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=\'+~(-new Date()/36e5)];'; ?>
</script>
                          </div>
                        </li>
                      </ul>
                    </div>
                  </div>
                </div>

                <div class="p-a-md p-t-sm b-b">
                  <h2 class="">
                    <?php echo $this->_tpl_vars['item']['name']; ?>

                    <?php if ($this->_tpl_vars['item']['weekly_to']): ?>
                    <a data-toggle="tooltip" data-placement="bottom" title="这是一件推荐作品" class="btn btn-icon btn-social btn-f-i rounded b-skin text-skin b-a">
                      <i class="ht">荐</i>
                      <i class="icon-like"></i>
                    </a>
                    <?php endif; ?>

                    <?php if ($this->_tpl_vars['item']['user']['elite_author'] == 'true'): ?>
                    <a data-toggle="tooltip" data-placement="bottom" title="该作品由精英作者发布" class="btn btn-icon btn-social btn-f-i rounded b-danger text-danger b-a">
                      <i class="ht">精</i>
                      <i class="icon-user-following"></i>
                    </a>
                    <?php endif; ?>

                    <?php if ($this->_tpl_vars['item']['user']['power_elite_author'] == 'true'): ?>
                    <a data-toggle="tooltip" data-placement="bottom" title="该作品由强力精英作者发布" class="btn btn-icon btn-social btn-f-i rounded b-accent text-accent b-a">
                      <i class="ht">强</i>
                      <i class="icon-magnet"></i>
                    </a>
                    <?php endif; ?>
                  </h2>
                  <p class="text-grey p-t-xs">作品主分类： <?php $_from = $this->_tpl_vars['item']['categories']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['e']):
?>
                    <?php $_from = $this->_tpl_vars['e']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['foo'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['foo']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['c']):
        $this->_foreach['foo']['iteration']++;
?>
                    <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
categories/<?php echo $this->_tpl_vars['categories'][$this->_tpl_vars['c']]['id']; ?>
" class="text-skin" title="<?php echo $this->_tpl_vars['categories'][$this->_tpl_vars['c']]['name']; ?>
"><?php echo $this->_tpl_vars['categories'][$this->_tpl_vars['c']]['name']; ?>
</a>
                    <?php if (! ($this->_foreach['foo']['iteration'] == $this->_foreach['foo']['total'])): ?>&gt;<?php endif; ?>
                    <?php endforeach; endif; unset($_from); ?>
                    <?php endforeach; endif; unset($_from); ?> <span class="m-l">发布时间： <?php echo ((is_array($_tmp=$this->_tpl_vars['item']['datetime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d") : smarty_modifier_date_format($_tmp, "%Y-%m-%d")); ?>
</span></p>
                  <p class="text-grays m-b-0 text-muted h6">Tags：
                    <?php $_from = $this->_tpl_vars['item']['tags']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['t']):
?>
                    <a title="<?php echo $this->_tpl_vars['t']['name']; ?>
" class="text-u-c btn btn-xs rounded grey-200 text-dark"><?php echo $this->_tpl_vars['t']['name']; ?>
</a>
                    <?php endforeach; endif; unset($_from); ?>
                    <!--/<?php echo $this->_tpl_vars['languageURL']; ?>
items/tag/<?php echo $this->_tpl_vars['t']['name']; ?>
-->
                  </p>

                  <?php if (check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>
                  <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/edit/<?php echo $this->_tpl_vars['item']['id']; ?>
" title="编辑作品" class="ribbon ribbon-danger text-md" style="top: 100px">
                    编辑作品
                  </a>
                  <?php endif; ?>
                  <?php if (isset ( $this->_tpl_vars['item']['is_buyed'] )): ?>
                  <a class="ribbon ribbon-skin text-md animated zoomIn" style="top: 100px">
                    您已购买过此文件
                  </a>
                  <?php endif; ?>
                  <?php if (check_login_bool ( ) && $_SESSION['user']['user_id'] == $this->_tpl_vars['item']['user_id']): ?>
                  <?php else: ?>
                  <?php if ($this->_tpl_vars['item']['free_file'] == 'true'): ?>
                  <?php if (check_login_bool ( )): ?>
                  <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
download/<?php echo $this->_tpl_vars['item']['id']; ?>
" class="ribbon ribbon-skin text-md animated zoomIn" style="top: 100px">
                    免费下载
                  </a>
                  <?php else: ?>
                  <a class="ribbon ribbon-skin text-md animated zoomIn" style="top: 100px" href="#" data-toggle="modal" data-target="#loginModal">
                    免费文件（登录下载）
                  </a>
                  <?php endif; ?>
                  <?php endif; ?>
                  <?php endif; ?>
                  <?php if ($this->_tpl_vars['item']['free_file'] !== 'true'): ?>
                  <?php if (isset ( $this->_tpl_vars['item']['is_buyed'] )): ?>
                  <?php else: ?>
                  <?php if (! check_login_bool ( ) || $_SESSION['user']['user_id'] !== $this->_tpl_vars['item']['user_id']): ?>
                  <?php if (isset ( $this->_tpl_vars['item']['user']['license']['personal'] )): ?>
                  <a class="ribbon ribbon-skin text-md" style="top: 100px; padding: .0em 1.5em .4em;">
                    <span class="price-rmb animated zoomIn"><small><?php echo $this->_tpl_vars['currency']['symbol']; ?>
</small><?php echo ((is_array($_tmp=$this->_tpl_vars['item']['price'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
</span>
                  </a>
                  <?php endif; ?>
                  <?php endif; ?>
                  <?php endif; ?>
                  <?php endif; ?>



                </div>


                <div class="p-x-md p-t-md">
                  <ul class="nav nav-tabs arc-tabs">
                    <li class="nav-item">
                      <a class="active b-3x b-skin" href data-toggle="tab" data-target="#arcinfo">作品介绍</a>
                    </li>
                    <li class="nav-item">
                      <?php if (check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>
                      <a class="b-3x text-danger b-skin" href data-toggle="tab" data-target="#arcque">添加常见问题</a>
                      <?php else: ?>
                      <a class="b-3x b-skin" href data-toggle="tab" data-target="#arcque">常见问题</a>
                      <?php endif; ?>
                    </li>
                    <li class="nav-item">
                      <a class="b-3x b-skin" href data-toggle="tab" data-target="#arcbuy">购买记录 <span class="text-muted">(</span><span class="p-x-xs text-skin"><?php echo $this->_tpl_vars['item']['sales']; ?>
</span><span class="text-muted">)</span></a>
                    </li>
                  </ul>
                </div>
                <div class="tab-content p-a-md m-t-sm b-b">
                  <div class="tab-pane animated fadeIn text-muted active" id="arcinfo">

                    <?php $_from = $this->_tpl_vars['item']['attributes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['c'] => $this->_tpl_vars['a']):
?>
                    <div class="clearfix p-b">
                      <?php if ($this->_tpl_vars['a']): ?>
                      <p class="arcinfo m-b-sm text-skin-hover">
                        <span class="text-skin m-r-sm _800"><?php echo $this->_tpl_vars['attributeCategories'][$this->_tpl_vars['c']]['name']; ?>
</span>
                        <?php if (is_array ( $this->_tpl_vars['a'] )): ?>
                        <?php $this->assign('foo', 0); ?>
                        <?php $_from = $this->_tpl_vars['a']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['ai']):
?>
                        <?php if ($this->_tpl_vars['attributes'][$this->_tpl_vars['ai']]['photo'] != ''): ?>
                        <img class="tooltip" title="<?php echo ((is_array($_tmp=$this->_tpl_vars['attributes'][$this->_tpl_vars['ai']]['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" alt="<?php echo ((is_array($_tmp=$this->_tpl_vars['attributes'][$this->_tpl_vars['ai']]['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" src="<?php echo $this->_tpl_vars['data_server']; ?>
/uploads/attributes/<?php echo $this->_tpl_vars['attributes'][$this->_tpl_vars['ai']]['photo']; ?>
" />
                        <?php else: ?>
                        <?php if ($this->_tpl_vars['attributeCategories'][$this->_tpl_vars['c']]['type'] == 'input'): ?>
                        <a class="text-muted m-r"><?php echo $this->_tpl_vars['ai']; ?>
</a>
                        <?php else: ?>
                        <a class="text-muted m-r"><?php echo $this->_tpl_vars['attributes'][$this->_tpl_vars['ai']]['name']; ?>
</a>
                        <?php endif; ?>
                        <?php endif; ?>
                        <?php $this->assign('foo', $this->_tpl_vars['foo']+1); ?>
                        <?php endforeach; endif; unset($_from); ?>
                        <?php else: ?>
                        <?php if ($this->_tpl_vars['attributes'][$this->_tpl_vars['a']]['photo'] != ''): ?>
                        <img class="tooltip" title="<?php echo ((is_array($_tmp=$this->_tpl_vars['attributes'][$this->_tpl_vars['ai']]['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" alt="<?php echo ((is_array($_tmp=$this->_tpl_vars['attributes'][$this->_tpl_vars['a']]['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" src="<?php echo $this->_tpl_vars['data_server']; ?>
/uploads/attributes/<?php echo $this->_tpl_vars['attributes'][$this->_tpl_vars['a']]['photo']; ?>
" />
                        <?php else: ?>
                        <?php if ($this->_tpl_vars['attributeCategories'][$this->_tpl_vars['c']]['type'] == 'input'): ?>
                        <a class="text-muted m-r"><?php echo $this->_tpl_vars['a']; ?>
</a>
                        <?php else: ?>
                        <a class="text-muted m-r"><?php echo $this->_tpl_vars['attributes'][$this->_tpl_vars['a']]['name']; ?>
</a>
                        <?php endif; ?>
                        <?php endif; ?>
                        <?php endif; ?>
                      </p>
                      <?php endif; ?>
                    </div>
                    <?php endforeach; endif; unset($_from); ?>
                    <div class="arcinfo"><?php echo $this->_tpl_vars['item']['description']; ?>
</div>
                  </div>
                  <div class="tab-pane animated fadeIn" id="arcque">

                    <?php if ($this->_tpl_vars['faq']): ?>

                    <div class="">
                      <div class="" id="faq-index">

                        <?php $_from = $this->_tpl_vars['faq']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['f']):
?>
                        <div class="m-b text-muted">
                          <span class="pull-left w-40 dark circle m-r-sm">
                            问
                          </span>
                          <div class="clear">
                            <div class="dark m-l rounded r pos-rlt inline">
                              <span class="arrow left b-dark"></span>
                              <div class="p-x p-y-sm">
                                <?php echo ((is_array($_tmp=$this->_tpl_vars['f']['question'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>

                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="m-b">
                          <span class="pull-right w-40 skin circle m-l-sm">
                            答
                          </span>


                          <div class="clear text-right">
                            <div class="skin m-l rounded r pos-rlt inline m-r-sm">
                              <span class="arrow right b-skin"></span>
                              <div class="p-x p-y-sm">
                                <?php echo ((is_array($_tmp=$this->_tpl_vars['f']['answer'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>

                                <?php if (check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>
                                <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/faq/<?php echo $this->_tpl_vars['item']['id']; ?>
/?del=<?php echo $this->_tpl_vars['f']['id']; ?>
">删除</a>
                                <?php endif; ?>
                              </div>
                            </div>
                          </div>
                        </div>
                        <?php endforeach; endif; unset($_from); ?>
                      </div>
                    </div>
                    <?php else: ?>
                    <div class="text-center h5 text-muted p-y-md">
                      <?php if (check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>
                      创建常见问题解答，提高售后服务质量
                      <?php else: ?>
                      作者尚未创建常见问题解答
                      <?php endif; ?>
                    </div>
                    <?php endif; ?>

                    <?php if (check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>
                    <div class="p-t-md p-b">
                      <h5 class="text-muted">创建常见问题解答</h5>
                    </div>
                    <div class="p-t-md b-t b-b-t">
                      <form action="" method="post">

                        <div class="row">
                          <fieldset>
                            <div class="col-xs-12 col-md-6">
                              <div class="form-group m-b-md row">
                                <label for="item_question" class="col-sm-2 text-muted ">
                                  <span class="w-40 pull-left dark circle m-r">
                                    问
                                  </span>
                                </label>
                                <div class="col-sm-10">
                                  <textarea class="form-control" id="item_question" name="question" rows="4"></textarea>
                                </div>
                              </div>
                            </div>

                            <div class="col-xs-12 col-md-6">
                              <div class="form-group m-b-md row">
                                <label for="item_answer" class="col-sm-2">
                                  <span class="w-40 pull-left text-muted skin circle m-r">
                                    答
                                  </span>
                                </label>
                                <div class="col-sm-10">
                                  <textarea class="form-control" id="item_answer" name="answer" rows="4"></textarea>
                                </div>
                              </div>
                            </div>
                          </fieldset>
                        </div>

                        <div class="p-t-md form-submit b-t b-b-t">
                          <input type="hidden" name="add" value="yes" />
                          <button type="submit" name="add" class="btntheme post-reply btn skin">创建问答</button>
                        </div>

                      </form>
                    </div>
                    <?php endif; ?>


                  </div>
                  <div class="tab-pane animated fadeIn text-muted" id="arcbuy">
                    <?php if ($this->_tpl_vars['record']): ?>
                    <div class="faqlist" id="faq-index">
                      <table cellspacing="0" cellpadding="0" class="table table-hover general_table" id="sales_table">
                        <thead>
                        <tr class="skin">
                          <th>用户名</th>
                          <th>昵称</th>
                          <th>时间</th>
                          <th>金额</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php $_from = $this->_tpl_vars['record']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['f']):
?>
                        <tr>
                          <td><?php echo $this->_tpl_vars['f']['username']; ?>
</td>
                          <td><?php echo $this->_tpl_vars['f']['nickname']; ?>
</td>
                          <td><?php echo $this->_tpl_vars['f']['datetime']; ?>
</td>
                          <td><?php echo $this->_tpl_vars['f']['price']; ?>
</td>
                        </tr>
                        <?php endforeach; endif; unset($_from); ?>
                        </tbody>
                      </table>
                    </div>
                    <?php else: ?>
                    <div class="text-center h5 text-muted p-y-md">尚无购买记录</div>
                    <?php endif; ?>
                  </div>
                </div>

                <?php if ($this->_tpl_vars['otherItems']): ?>
                <div class="p-x-md p-t-md b-b">
                  <h4 class="m-b-lg"><span class="p-b-sm b-b b-skin b-3x">他的其它作品</span></h4>


                  <div class="row text-skin-hover hidden-md-down">


                    <?php $_from = $this->_tpl_vars['otherItems']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['i']):
?>
                    <div class="col-xs-6 col-sm-6 col-md-4">
                      <div class="box mb-co-b b-a">
                        <div class="item dark">
                          <div class="img-container fx-img-rotate-l fx-opt-zoom-out">
                            <img data-original="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/items/<?php echo $this->_tpl_vars['i']['id']; ?>
/<?php echo $this->_tpl_vars['i']['thumbnail']; ?>
" src="/mbthemes/assets/images/load.png" class="img-responsive" alt="<?php echo ((is_array($_tmp=$this->_tpl_vars['i']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
">
                            <div class="img-options">
                              <div class="img-options-content">
                                <?php if ($this->_tpl_vars['i']['demo_url']): ?>
                                <a data-toggle="ajaxModal" data-src="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/itempreview/<?php echo $this->_tpl_vars['i']['id']; ?>
" href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/preview/<?php echo $this->_tpl_vars['i']['id']; ?>
" class="btn skin m-r-md hidden-xs-down" title="在线演示">
                                  <i class="icon-eye"></i>
                                </a>
                                <?php else: ?>
                                <?php endif; ?>
                                <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank" class="btn danger text-white">
                                  <i class="icon-magnifier-add"></i>
                                </a>
                              </div>
                            </div>
                          </div>
                        </div>
                        <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank" class="md-btn md-raised md-fab md-mini m-r pos-rlt md-fab-offset pull-right white"><i class="icon-plus2 md-24"></i></a>
                        <div class="p-a">
                          <div class="text-muted">
                            <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank" title="更新日期" class="hidden-xs-down m-r"><i class="icon-clock m-r-xs"></i> <?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['i']['datetime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%m-%d") : smarty_modifier_date_format($_tmp, "%m-%d")))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
</a>
                            <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
#comment" target="_blank" title="评论" class="m-r"><i class="icon-bubbles m-r-xs"></i> <?php echo ((is_array($_tmp=$this->_tpl_vars['i']['comments'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
</a>
                            <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank" title="销量"><i class="icon-handbag m-r-xs"></i> <?php echo ((is_array($_tmp=$this->_tpl_vars['i']['sales'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
</a>
                          </div>
                          <div class="h-2xx"><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank" class="h6"><?php echo ((is_array($_tmp=$this->_tpl_vars['i']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
</a></div>
                          <div class="clearfix m-t-xs">
                            <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['userss'][$this->_tpl_vars['i']['user_id']]['username']; ?>
" target="_blank" class="pull-left m-r-sm">
                              <span class="w-32 avatar">
                                <?php if ($this->_tpl_vars['userss'][$this->_tpl_vars['i']['user_id']]['avatar'] != ''): ?>
                                <img src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/users/<?php echo $this->_tpl_vars['i']['user_id']; ?>
/A_<?php echo $this->_tpl_vars['userss'][$this->_tpl_vars['i']['user_id']]['avatar']; ?>
" />
                                <?php else: ?>
                                <span class="circle skin _100 w-32 fs-80">
                                  NP
                                </span>
                                <?php endif; ?>
                                <i class="on b-white left"></i>
                              </span>
                            </a>
                            <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['userss'][$this->_tpl_vars['i']['user_id']]['username']; ?>
" target="_blank" class="pull-left m-t-sm clear">
                              <?php echo $this->_tpl_vars['userss'][$this->_tpl_vars['i']['user_id']]['nickname']; ?>

                            </a>
                            <div class="pull-right">
                              <div class="h-32"><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank" class="price">￥<span class="text-lg"> <?php if ($this->_tpl_vars['i']['free_file'] == 'true'): ?>0<?php else: ?><?php echo $this->_tpl_vars['i']['price']; ?>
<?php endif; ?></span></a></div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <?php endforeach; endif; unset($_from); ?>


                  </div>
                </div>
                <?php else: ?>
                <?php if ($this->_tpl_vars['weeklyItems']): ?>
                <div class="p-x-md p-t-md b-b">
                  <h4 class="m-b-lg"><span class="p-b-sm b-b b-skin b-3x">猜你喜欢</span></h4>
                  <div class="row text-skin-hover">
                    <?php $_from = $this->_tpl_vars['weeklyItems']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['i']):
?>
                    <div class="col-xs-6 col-sm-6 col-md-4">
                      <div class="box mb-co-b b-a">
                        <div class="item dark">
                          <div class="img-container fx-img-rotate-l fx-opt-zoom-out">
                            <img data-original="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/items/<?php echo $this->_tpl_vars['i']['id']; ?>
/<?php echo $this->_tpl_vars['i']['thumbnail']; ?>
" src="/mbthemes/assets/images/load.png" class="img-responsive" alt="<?php echo ((is_array($_tmp=$this->_tpl_vars['i']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
">
                            <div class="img-options">
                              <div class="img-options-content">
                                <?php if ($this->_tpl_vars['i']['demo_url']): ?>
                                <a data-toggle="ajaxModal" data-src="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/itempreview/<?php echo $this->_tpl_vars['i']['id']; ?>
" href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/preview/<?php echo $this->_tpl_vars['i']['id']; ?>
" class="btn skin m-r-md hidden-xs-down" title="在线演示">
                                  <i class="icon-eye"></i>
                                </a>
                                <?php else: ?>
                                <?php endif; ?>
                                <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank" class="btn danger text-white">
                                  <i class="icon-magnifier-add"></i>
                                </a>
                              </div>
                            </div>
                          </div>
                        </div>
                        <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank" class="md-btn md-raised md-fab md-mini m-r pos-rlt md-fab-offset pull-right white"><i class="icon-plus2 md-24"></i></a>
                        <div class="p-a">
                          <div class="text-muted">
                            <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank" title="更新日期" class="hidden-xs-down m-r"><i class="icon-clock m-r-xs"></i> <?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['i']['datetime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%m-%d") : smarty_modifier_date_format($_tmp, "%m-%d")))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
</a>
                            <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
#comment" target="_blank" title="评论" class="m-r"><i class="icon-bubbles m-r-xs"></i> <?php echo ((is_array($_tmp=$this->_tpl_vars['i']['comments'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
</a>
                            <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank" title="销量"><i class="icon-handbag m-r-xs"></i> <?php echo ((is_array($_tmp=$this->_tpl_vars['i']['sales'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
</a>
                          </div>
                          <div class="h-2xx"><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank" class="h6"><?php echo ((is_array($_tmp=$this->_tpl_vars['i']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
</a></div>
                          <div class="clearfix m-t-xs">
                            <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['userss'][$this->_tpl_vars['i']['user_id']]['username']; ?>
" target="_blank" class="pull-left m-r-sm">
                              <span class="w-32 avatar">
                                <?php if ($this->_tpl_vars['userss'][$this->_tpl_vars['i']['user_id']]['avatar'] != ''): ?>
                                <img src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/users/<?php echo $this->_tpl_vars['i']['user_id']; ?>
/A_<?php echo $this->_tpl_vars['userss'][$this->_tpl_vars['i']['user_id']]['avatar']; ?>
" />
                                <?php else: ?>
                                <span class="w-32 circle skin fs-80 _100">
                                  NP
                                </span>
                                <?php endif; ?>
                                <i class="on b-white left"></i>
                              </span>
                            </a>
                            <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['userss'][$this->_tpl_vars['i']['user_id']]['username']; ?>
" target="_blank" class="pull-left m-t-sm clear">
                              <?php echo $this->_tpl_vars['userss'][$this->_tpl_vars['i']['user_id']]['nickname']; ?>

                            </a>
                            <div class="pull-right">
                              <div class="h-32"><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
" target="_blank" class="price">￥<span class="text-lg"> <?php if ($this->_tpl_vars['i']['free_file'] == 'true'): ?>0<?php else: ?><?php echo $this->_tpl_vars['i']['price']; ?>
<?php endif; ?></span></a></div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <?php endforeach; endif; unset($_from); ?>
                  </div>
                </div>
                <?php endif; ?>
                <?php endif; ?>



                <div class="clearfix" id="comment">
                  <h4 class="m-b-md p-x-md p-t-md"><span class="p-b-sm b-b b-skin b-3x">咨询评论</span></h4>
                  <?php if ($this->_tpl_vars['comments']): ?>
                  <div class="clearfix pinglun">
                    <?php $_from = $this->_tpl_vars['comments']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['c']):
?>
                    <div class="sl-item p-x-md">
                      <div class="b-b p-t-md">
                        <div class="sl-left dropdown myDrop">
                          <a data-toggle="ajaxUser" data-src="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/portfolio/<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['username']; ?>
" href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['username']; ?>
" class="pull-left myUserAjax">
                            <span class="w-40 avatar">
                              <?php if ($this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['avatar'] != ''): ?>
                              <img src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/users/<?php echo $this->_tpl_vars['c']['user_id']; ?>
/A_<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['avatar']; ?>
" />
                              <?php else: ?>
                              <span class="circle skin _100 w-40 fs-80">
                                NP
                              </span>
                              <?php endif; ?>
                            </span>
                          </a>
                        </div>
                        <div class="sl-content">
                          <div class="sl-date text-muted"><?php echo ((is_array($_tmp=$this->_tpl_vars['c']['datetime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d %H:%M") : smarty_modifier_date_format($_tmp, "%Y-%m-%d %H:%M")); ?>
</div>
                          <div class="sl-author">
                            <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['username']; ?>
" class="comment__username h6" target="_blank">
                              <span class=" text-skin"><?php echo $this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['nickname']; ?>
</span>
                              <?php if ($this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['username'] == admin): ?>
                              <span class="text-sm" title="此人为网站管理员"> 管理员</span>
                              <?php endif; ?>
                              <?php if ($this->_tpl_vars['item']['user_id'] == $this->_tpl_vars['c']['user_id']): ?>
                              <span class="label deep-orange">作者</span>
                              <?php elseif (isset ( $this->_tpl_vars['buyFromUsers'][$this->_tpl_vars['c']['user_id']] )): ?>
                              <span class="label dark">买家</span>
                              <?php endif; ?>
                            </a>
                          </div>
                          <div class="arcinfo m-t m-b">
                            <?php echo ((is_array($_tmp=$this->_tpl_vars['c']['comment'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>

                          </div>
                          <div class="sl-footer m-b-md">
                            <?php if (check_login_bool ( )): ?>
                            <a data-toggle="ajaxCom" href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/reply/<?php echo $this->_tpl_vars['c']['id']; ?>
" class="text-muted" data-toggle="collapse" data-target="#reply-<?php echo $this->_tpl_vars['c']['id']; ?>
">
                              <i class="icon-action-undo"></i> 回复
                            </a>
                            <?php else: ?>
                            <a class="text-muted" data-toggle="modal" data-target="#loginModal" title="登录后才可以回复他">
                              <i class="icon-action-undo"></i> 回复
                            </a>
                            <?php endif; ?>
                          </div>
                          <?php if (isset ( $this->_tpl_vars['c']['reply'] )): ?>
                          <?php $_from = $this->_tpl_vars['c']['reply']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['cc']):
?>
                          <div class="sl-item">
                            <div class="sl-left dropdown myDrop">
                              <a data-toggle="ajaxUser" data-src="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/portfolio/<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['cc']['user_id']]['username']; ?>
" href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['cc']['user_id']]['username']; ?>
" class="pull-left myUserAjax">
                                <span class="w-32 avatar">
                                  <?php if ($this->_tpl_vars['users'][$this->_tpl_vars['cc']['user_id']]['avatar'] != ''): ?>
                                  <img src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/users/<?php echo $this->_tpl_vars['cc']['user_id']; ?>
/A_<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['cc']['user_id']]['avatar']; ?>
" />
                                  <?php else: ?>
                                  <span class="circle skin _100 w-32 fs-80">
                                    NP
                                  </span>
                                  <?php endif; ?>
                                </span>
                              </a>
                            </div>
                            <div class="sl-content">
                              <div class="sl-date text-muted"><?php echo ((is_array($_tmp=$this->_tpl_vars['cc']['datetime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d %H:%M") : smarty_modifier_date_format($_tmp, "%Y-%m-%d %H:%M")); ?>
</div>
                              <div class="m-b">
                                <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['cc']['user_id']]['username']; ?>
" class="comment__username" target="_blank"><?php echo $this->_tpl_vars['users'][$this->_tpl_vars['cc']['user_id']]['nickname']; ?>
</a>
                                <?php if ($this->_tpl_vars['users'][$this->_tpl_vars['cc']['user_id']]['username'] == admin): ?>
                                <span class="text-sm" title="此人为网站管理员"> 管理员</span>
                                <?php endif; ?>
                                <?php if ($this->_tpl_vars['item']['user_id'] == $this->_tpl_vars['cc']['user_id']): ?>
                                <span class="label deep-orange">作者</span>
                                <?php elseif (isset ( $this->_tpl_vars['buyFromUsers'][$this->_tpl_vars['cc']['user_id']] )): ?>
                                <span class="label dark">买家</span>
                                <?php endif; ?>
                                <span class="text-muted"> <?php echo ((is_array($_tmp=$this->_tpl_vars['cc']['comment'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>
</span>
                              </div>
                            </div>
                          </div>
                          <?php endforeach; endif; unset($_from); ?>
                          <?php endif; ?>
                        </div>
                      </div>
                    </div>
                    <?php endforeach; endif; unset($_from); ?>
                  </div>
                  <?php echo $this->_tpl_vars['paging']; ?>

                  <?php else: ?>
                  <div class="clearfix text-center h5 p-a-lg text-muted">暂时没有评论</div>
                  <?php endif; ?>
                </div>
                <div class="m-a-0 b-t collapse in" aria-expanded="true" id="comment-form">
                  <?php if (check_login_bool ( ) && $_SESSION['user']['user_id'] == $this->_tpl_vars['item']['user_id'] || $_SESSION['user']['access'] || isset ( $this->_tpl_vars['item']['is_buyed'] )): ?>
                  <form class="tjform" action="" method="post">
                    <textarea id='zixun' name="comment" class="no-borders no-shadows" style='height:230px; width:100%;'></textarea>

                    <div class="box-footer b-t clearfix">
                      <label for="reply_notification" class="md-check m-t-sm">
                        <input type="checkbox" checked="" class="has-value" id="reply_notification" name="reply_notification" value="1">
                        <i class="skin"></i>
                        当我收到一个回复时提醒我
                      </label>
                      <button type="submit" name="add" class="btn skin b-skin pull-right tjbtn">提交评论</button>
                    </div>
                  </form>
                  <?php else: ?>
                  <form class="tjform" action="" method="post">
                    <textarea id='zixun' name="comment" class="no-borders no-shadows" style='height:230px; width:100%;'></textarea>
                    <div class="box-footer b-t clearfix">
                      <label for="reply_notification" class="md-check m-t-sm">
                        <input type="checkbox" checked="" class="has-value" id="reply_notification" name="reply_notification" value="1">
                        <i class="skin"></i>
                        当我收到一个回复时提醒我
                      </label>
                      <?php if (check_login_bool ( )): ?>
                      <button type="submit" name="add" class="btn skin b-skin pull-right tjbtn">提交评论</button>
                      <?php else: ?>
                      <a class="btn skin b-skin pull-right" data-toggle="modal" data-target="#loginModal" title="登录后才可以发表评论">提交评论</a>
                      <?php endif; ?>
                    </div>
                  </form>
                  <?php endif; ?>
                </div>
              </div>
            </div>
            <div class="col-sm w-xl w-auto-xs b-r right-bar">
              <div class="box box-bar text-center m-b-0">
                <div class="p-a-md">
                  <p>
                    <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['item']['user']['username']; ?>
/" class="hover">
                      <?php if ($this->_tpl_vars['item']['user']['avatar'] != ''): ?>
                      <img alt="<?php echo $this->_tpl_vars['item']['user']['username']; ?>
" class="img-circle w-96 hover-rotate360" src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/users/<?php echo $this->_tpl_vars['item']['user']['user_id']; ?>
/A_<?php echo $this->_tpl_vars['item']['user']['avatar']; ?>
" />
                      <?php else: ?>
                      <span class="w-96 circle skin avatar text-md">
                        <span class="price opacity" style="vertical-align: 0%;">NOPIC</span>
                      </span>
                      <?php endif; ?>
                    </a>
                  </p>
                  <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['item']['user']['username']; ?>
/" class="text-md block">@<?php echo $this->_tpl_vars['item']['user']['nickname']; ?>
</a>
                  <p class="m-t-xs">
                    <?php $_from = $this->_tpl_vars['user_badges']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['foo'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['foo']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['b']):
        $this->_foreach['foo']['iteration']++;
?>
                    <img class="bphoto" src="<?php echo $this->_tpl_vars['data_server']; ?>
<?php echo $this->_tpl_vars['b']['photo']; ?>
" title="" data-toggle="tooltip" data-placement="bottom" data-original-title="<?php echo ((is_array($_tmp=$this->_tpl_vars['b']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" height="18" width="18">
                    <?php if (($this->_foreach['foo']['iteration'] == $this->_foreach['foo']['total'])): ?><?php endif; ?>
                    <?php endforeach; endif; unset($_from); ?>
                  </p>
                  <p><small class="h-1x text-grey" style="font-size: 90%"><?php if ($this->_tpl_vars['user']['profile_title'] != ''): ?><?php echo $this->_tpl_vars['user']['profile_title']; ?>
<?php else: ?>作者太懒了，没填签名呢<?php endif; ?></small></p>
                  <div>
                    <?php if (check_login_bool ( ) && $_SESSION['user']['user_id'] != $this->_tpl_vars['user']['user_id']): ?>
                    <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
users/<?php echo $this->_tpl_vars['user']['username']; ?>
/?follow" id="follow-user">
                      <button id="follow" class="btn btn-social rounded btn-sm <?php if ($this->_tpl_vars['user']['is_follow']): ?>skin<?php else: ?>white b-skin<?php endif; ?>" type="submit"><?php if ($this->_tpl_vars['user']['is_follow']): ?><i class="icon-minus3 m-r-xs"></i>取消关注<?php else: ?><i class="icon-plus2 m-r-xs"></i>关注Ta<?php endif; ?></button>
                    </a>

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

                    </script>
                    <?php elseif (check_login_bool ( ) && $_SESSION['user']['user_id'] == $this->_tpl_vars['user']['user_id']): ?>
                    <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
edit/" class="btn btn-social rounded btn-sm white">
                      编辑资料
                    </a>
                    <?php else: ?>
                    <button class="btn btn-social rounded btn-sm white" type="submit" data-toggle="modal" data-target="#loginModal" data-toggle="tooltip" data-placement="bottom" data-original-title="您需要登录后才可以添加关注">
                      <i class="icon-plus2 m-r-xs fs-16"></i>关注Ta
                    </button>
                    <?php endif; ?>
                  </div>
                </div>
                <div class="row no-gutter text-skin-hover b-t b-b">
                  <div class="col-xs-6 b-r">
                    <a class="p-x p-y-sm block text-center" href="#comment" ui-scroll-to="comment">
                      <i class="icon-bubbles md-24 text-muted m-v-sm inline"></i>
                      <span class="block">评论<small>(<?php echo $this->_tpl_vars['item']['comments']; ?>
)</small></span>
                    </a>
                  </div>
                  <div class="col-xs-6">
                    <?php if (check_login_bool ( )): ?>
                    <a class="p-x p-y-sm block text-center" data-toggle="modal" data-target="#cbook">
                      <i class="icon-tag md-24 text-muted m-v-sm inline"></i>
                      <span class="block">收藏</span>
                    </a>
                    <?php else: ?>
                    <a class="p-x p-y-sm block text-center" data-toggle="modal" data-target="#loginModal">
                      <i class="icon-tag md-24 text-muted m-v-sm inline"></i>
                      <span class="block">收藏</span>
                    </a>
                    <?php endif; ?>
                  </div>
                </div>
                <div class="clearfix p-a b-b">
                  <?php if (check_login_bool ( ) && $_SESSION['user']['user_id'] == $this->_tpl_vars['item']['user_id']): ?>
                  <a href="###" class="btn btn-block skin text-white btn-lg">您自己的文件</a>
                  <?php endif; ?>
                  <?php if (isset ( $this->_tpl_vars['item']['is_buyed'] )): ?>
                  <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
download/<?php echo $this->_tpl_vars['item']['id']; ?>
" class="btn btn-lg btn-block skin text-white">
                    下载 ( <small>已购</small> )
                  </a>
                  <?php endif; ?>
                  <?php if (check_login_bool ( ) && $_SESSION['user']['user_id'] == $this->_tpl_vars['item']['user_id']): ?>
                  <?php else: ?>
                  <?php if ($this->_tpl_vars['item']['free_file'] == 'true'): ?>
                  <?php if (check_login_bool ( )): ?>
                  <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
download/<?php echo $this->_tpl_vars['item']['id']; ?>
" class="btn btn-block skin text-white btn-lg">
                    免费下载
                  </a>
                  <?php else: ?>
                  <a href="#"  data-toggle="modal" data-target="#loginModal" class="btn btn-block skin text-white btn-lg">
                    免费下载
                  </a>
                  <?php endif; ?>
                  <?php endif; ?>
                  <?php endif; ?>


                  <?php if ($this->_tpl_vars['item']['free_file'] !== 'true'): ?>
                  <?php if (isset ( $this->_tpl_vars['item']['is_buyed'] )): ?>
                  <?php else: ?>
                  <?php if (! check_login_bool ( ) || $_SESSION['user']['user_id'] !== $this->_tpl_vars['item']['user_id']): ?>
                  <form action="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['item']['id']; ?>
" id="purchase-form" method="post" name="purchase-form">
                    <meta itemprop="price" content="$3">

                    <div class="btn-group block">

                      <?php if (isset ( $this->_tpl_vars['item']['user']['license']['personal'] )): ?>
                      <div class="licenitem" id="licenitem-price">
                        <button class="btn btn-block skin text-white p-y-sm" type="submit" data-toggle="modal" data-target="#loginModal">购买 <span class="price"><?php echo $this->_tpl_vars['currency']['symbol']; ?>
<span class="text-lg"> <?php echo ((is_array($_tmp=$this->_tpl_vars['item']['price'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
</span></span></button>
                      </div>
                      <?php endif; ?>

                      <?php if (isset ( $this->_tpl_vars['item']['user']['license']['extended'] )): ?>
                      <div class="licenitem none" id="licenitem-extend">
                        <button class="btn btn-block skin text-white p-y-sm" id="purchase_button2" onclick="" type="submit" data-toggle="modal" data-target="#loginModal">购买 <span class="price"><?php echo $this->_tpl_vars['currency']['symbol']; ?>
<span class="text-lg"> <?php echo ((is_array($_tmp=$this->_tpl_vars['item']['extended_price'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
</span></span></button>
                      </div>
                      <?php endif; ?>

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


                  </form>
                  <?php endif; ?>
                  <?php endif; ?>
                  <?php endif; ?>


                  <div class="row row-sm m-t">
                    <?php if ($this->_tpl_vars['item']['demo_url']): ?>
                    <div class="col-xs-6">
                      <a data-toggle="ajaxModal" data-src="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/itempreview/<?php echo $this->_tpl_vars['item']['id']; ?>
" href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/preview/<?php echo $this->_tpl_vars['item']['id']; ?>
" target='_blank' title="在线预览" class="btn btn-outline b-blue-grey-600 text-blue-grey-600 btn-block p-y-sm">
                        在线演示
                      </a>
                    </div>
                    <div class="col-xs-6 arc-btn-group">
                      <a data-toggle="MobanBoxAjax" href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/screenshots/<?php echo $this->_tpl_vars['item']['id']; ?>
" title="截图预览" class="linkbtn screenbtn btn btn-outline b-blue-grey-300 text-blue-grey-300 btn-block p-y-sm">
                        截图演示
                      </a>
                    </div>
                    <?php else: ?>
                    <div class="col-xs-12 arc-btn-group">
                      <a data-toggle="MobanBoxAjax" href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/screenshots/<?php echo $this->_tpl_vars['item']['id']; ?>
" title="截图预览" class="linkbtn screenbtn btn btn-outline b-blue-grey-300 text-blue-grey-300 btn-block p-y-sm">
                        截图演示
                      </a>
                    </div>
                    <?php endif; ?>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- ############ PAGE END-->
    <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['template_path'])."/html/footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  </div>
  <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['template_path'])."/html/backtop.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['template_path'])."/html/mb-settings.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  <!-- ############ LAYOUT END-->
</div>
<?php echo '
<style>
  .opacity{
    opacity: 1;
  }
  .screenbtn img{
    width: 100%;
  }
  .pinglun .sl-item:last-child .b-b{border-bottom-width: 0;}
  .sl-content {
    padding-bottom:5px;
  }
  .sl-left+.sl-content {
    margin-left: 50px;
  }
  .sl-content .label {
    padding: .35em .75em .25em;
  }
  .sl-left{
    margin-left: 0;
  }
  .sl-item .sl-item .sl-left{
    margin-left: -10px;
  }
  .sl-item .sl-item .sl-left+.sl-content {
    margin-left: 40px;
  }
  .sl-item .b-b{
    border-bottom-style: dotted;
  }
  .b-b-t{
    border-top-style:dotted;
  }
  .sl-content p.h6{
    line-height: 1.6;
  }
  .sl-item:hover{
    background-color: rgba(0,0,0,0.008)
  }
  .sl-item:hover .sl-item{
    background-color: transparent;
  }
  .arc-tabs a{
    display: block;
    font-weight: normal;
    line-height: 1.8;
    font-size: 1.1rem;
    margin-right: 1rem;
  }
  .arc-tabs a.active{
    font-size: 1.5rem;
    line-height: 1.1;
    padding-bottom: 0.5rem;
    border-bottom-style: solid;
  }
  thead .skin:hover{ color:#777}
</style>
'; ?>

<div class="modal animated zoomIn" id="loginModal">
  <div class="row-col h-v">
    <div class="row-cell v-m">
      <div class="modal-dialog">
        <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['template_path'])."/items/purchase_panel.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
      </div>
    </div>
  </div>
</div>
<?php if (check_login_bool ( )): ?>
<div class="modal black-overlay fade" id="cbook" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="row-col h-v">
    <div class="row-cell v-m">
      <div class="modal-dialog modal-sm animated zoomIn">
        <form id="bookmark_form" method="post" action="#bookmark" enctype="multipart/form-data">
          <div class="modal-content dark lt">
            <div class="modal-header">
              <div class="clearfix form-group">
                <select class="form-control" id="collection_id" name="collection_id">
                  <?php if ($this->_tpl_vars['bookCollections']): ?>
                  <?php $_from = $this->_tpl_vars['bookCollections']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['c']):
?>
                  <option value="<?php echo $this->_tpl_vars['c']['id']; ?>
" class="text-dark"><?php echo $this->_tpl_vars['c']['name']; ?>
</option>
                  <?php endforeach; endif; unset($_from); ?>
                  <?php else: ?>
                  <option value="none">请先新建书签集</option>
                  <?php endif; ?>
                </select>
              </div>
              <h6 id="collection_create_link"><a list-show="0" href="#">新建书签集</a></h6>
            </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="block m-t-xs">(260 x 140px)</span>
              </div>
              <label class="md-switch" for="publically_visible">
                <input id="publically_visible" name="publically_visible" type="checkbox" checked="" value="1">
                <i class="skin"></i>
                是否为公开书签集?
              </label>
            </div>
            <div class="modal-footer" href="javascript: void(0);">
              <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">关闭</button>
              <input type="hidden" name="add_collection" value="yes" />
              <button type="submit" class="btn skin b-skin btn-sm p-x-md">添加至书签集！</button>
            </div>
          </div>
        </form>
        <script>
          <?php echo '
          seajs.use(["jq", "modules/collection"], function($, coll){
            coll.btninit("#collection_create_link a", "#collection_create_form");
          });
          '; ?>

        </script>
      </div>
    </div>
  </div>
</div>
<?php endif; ?>


<?php if (check_login_bool ( ) && $_SESSION['user']['user_id'] == $this->_tpl_vars['item']['user_id'] || $_SESSION['user']['access'] || isset ( $this->_tpl_vars['item']['is_buyed'] )): ?>
<script src="//cdn.bootcss.com/highlight.js/9.0.0/highlight.min.js"></script>
<script type="text/javascript">
  <?php echo '
  $(function(){
    $(\'pre code\').each(function(i, block) {
      hljs.highlightBlock(block);
    });
  });
  '; ?>

</script>
<?php else: ?>
<script src="//cdn.bootcss.com/highlight.js/9.0.0/highlight.min.js"></script>
<script type="text/javascript">
  <?php echo '
  $(function(){
    $(\'pre code\').each(function(i, block) {
      hljs.highlightBlock(block);
    });
  });
  '; ?>

</script>
<?php endif; ?>
<script src="/mbthemes/scripts/ajax_items.min.js"></script>
<script type="text/javascript">
  <?php echo '
  $(function() {
    $("img.img-responsive").lazyload({
      effect : "fadeIn",
      threshold : 200
    });
  });
  '; ?>

</script>
</body>
</html>