<?php /* Smarty version 2.6.22, created on 2015-12-29 14:10:20
         compiled from E:/xampp/htdocs/templates/home/default%5Citems%5Cfaq.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'nl2br', 'E:/xampp/htdocs/templates/home/default\\items\\faq.html', 46, false),array('modifier', 'escape', 'E:/xampp/htdocs/templates/home/default\\items\\faq.html', 108, 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);
 ?>
<link href="<?php echo $this->_tpl_vars['template_data']; ?>
css/custom/resource.css" rel="stylesheet" />
<link href="<?php echo $this->_tpl_vars['template_data']; ?>
css/custom/mobile.css" media="screen" rel="stylesheet" type="text/css" />
</head>
<body>
<?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="pagetit pagetabs">
  <div class="navblock">
    <ul class="titnav clr">
      <li><a href="/" title="主页">主页</a></li>
      <li class="pipe">&gt;</li>
      <li><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
categories/all/" title="文件">文件</a></li>
      <li class="pipe">&gt;</li>
      <?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']++;
?>
          <li><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
categories/<?php echo $this->_tpl_vars['categories'][$this->_tpl_vars['c']]['id']; ?>
" title="<?php echo $this->_tpl_vars['categories'][$this->_tpl_vars['c']]['name']; ?>
"><?php echo $this->_tpl_vars['categories'][$this->_tpl_vars['c']]['name']; ?>
</a></li>
          <?php if (! ($this->_foreach['foo']['iteration'] == $this->_foreach['foo']['total'])): ?><li class="pipe">&gt;</li><?php endif; ?>
        <?php endforeach; endif; unset($_from); ?>
      <?php endforeach; endif; unset($_from); ?>
    </ul>
    <h2><?php echo $this->_tpl_vars['item']['name']; ?>
</h2>
    <ul class="pagetab clr">
      <li><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['item']['id']; ?>
" title="文件详情">作品详情</a></li>
      <?php if ($this->_tpl_vars['faqs'] > 0 || check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>
      <li><a<?php if ($_GET['controller'] == 'faq'): ?> class="active"<?php endif; ?> href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/faq/<?php echo $this->_tpl_vars['item']['id']; ?>
" title="常见问题解答">常见问题解答</a></li>
      <?php endif; ?>
      <?php if (check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>
      <li><a<?php if ($_GET['controller'] == 'edit'): ?> class="active"<?php endif; ?> href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/edit/<?php echo $this->_tpl_vars['item']['id']; ?>
" title="编辑">编辑</a></li>
      <?php endif; ?>
        <?php if (check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>
        <li><a<?php if ($_GET['controller'] == 'record'): ?> class="active"<?php endif; ?> href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/record/<?php echo $this->_tpl_vars['item']['id']; ?>
" title="购买记录">购买记录</a></li>
        <?php endif; ?>
      <li><a<?php if ($_GET['controller'] == 'comments'): ?> class="active"<?php endif; ?> href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/comments/<?php echo $this->_tpl_vars['item']['id']; ?>
" title="评论">评论</a></li>
    </ul>
  </div>
</div>
<div class="resourcebg">
  <div class="pageblock clr">
    <?php echo $this->_tpl_vars['errorMessage']; ?>

    <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['root_path'])."/apps/items/views/purchase_panel.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
    <div class="leftdetail">
      <?php if ($this->_tpl_vars['faq']): ?>
      <div class="faqlist" 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="faqitem">
        <h3 class="question"><?php echo ((is_array($_tmp=$this->_tpl_vars['f']['question'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>
</h3>
        <div class="answer"><p><?php echo ((is_array($_tmp=$this->_tpl_vars['f']['answer'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>
</p></div>
        <?php if (check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>
        <div class="controls"><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></div>
        <?php endif; ?>
        </div>
        <?php endforeach; endif; unset($_from); ?>
      </div>
      <?php else: ?>
      <div class="nofaqblock">尚无常见问题与解答</div>
      <?php endif; ?>

      <?php if (check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>
      <h3 class="contenttit">创建常见问题解答</h3>
      <div class="contentbox">
        <!--<script type="text/javascript" src="<?php echo $this->_tpl_vars['data_server']; ?>
nicEditors/nicEdit.js"></script>-->
        <!--<script type="text/javascript">-->
        <!--<?php echo 'bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });'; ?>
-->
        <!--</script>-->
        <form action="" method="post">
          <fieldset class="horizontal-form">
            <div class="input-group">
              <label for="item_question">问题</label>
              <div class="inputs">

                  <!--初始化编辑器-->
                  <script id="item_question" name="question" type="text/plain">
             </script>

                <!--<textarea id="item_question" name="question" rows="10"></textarea>-->
              </div>
            </div>
            <div class="input-group">
              <label for="item_answer">解答</label>
              <div class="inputs">
                  <script id="item_answer" name="answer" type="text/plain">
                  </script>

                  <!-- 配置文件 -->
                  <script type="text/javascript" src="<?php echo $this->_tpl_vars['template_data']; ?>
ueditor/ueditor.config.js"></script>
                  <!-- 编辑器源码文件 -->
                  <script type="text/javascript" src="<?php echo $this->_tpl_vars['template_data']; ?>
ueditor/ueditor.all.js"></script>
                  <!-- 实例化编辑器 -->
                  <script type="text/javascript">
                      var ue = UE.getEditor('item_question');
                      var ue = UE.getEditor('item_answer');
                  </script>

                <!--<textarea id="item_answer" name="answer" rows="10"></textarea>-->
              </div>
            </div>
          </fieldset>
          <div class="form-submit"><input type="hidden" name="add" value="yes" />
            <button type="submit" name="add" class="btntheme post-reply">创建问答</button>
          </div>
        </form>
      </div>
      <?php endif; ?>

      <div class="otheritems clr">
      <?php if ($this->_tpl_vars['otherItems']): ?>
      <?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']):
?>   
      <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['i']['id']; ?>
"><img alt="<?php echo ((is_array($_tmp=$this->_tpl_vars['i']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" border="0" class="landscape-image-magnifier preload no_preview" data-item-author="作者 <?php echo $this->_tpl_vars['item']['user']['username']; ?>
" data-item-category="<?php $_from = $this->_tpl_vars['i']['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']++;
?><?php echo $this->_tpl_vars['categories'][$this->_tpl_vars['c']]['name']; ?>
 <?php if (! ($this->_foreach['foo']['iteration'] == $this->_foreach['foo']['total'])): ?> \ <?php endif; ?><?php endforeach; endif; unset($_from); ?><?php endforeach; endif; unset($_from); ?>" data-item-cost="<?php echo $this->_tpl_vars['i']['price']; ?>
" data-item-name="<?php echo ((is_array($_tmp=$this->_tpl_vars['i']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" data-preview-height="" data-preview-url="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/items/<?php echo $this->_tpl_vars['i']['id']; ?>
/<?php echo $this->_tpl_vars['i']['theme_preview']; ?>
" data-preview-width="" src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/items/<?php echo $this->_tpl_vars['i']['id']; ?>
/<?php echo $this->_tpl_vars['i']['thumbnail']; ?>
" title="<?php echo ((is_array($_tmp=$this->_tpl_vars['i']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" /></a>          
      <?php endforeach; endif; unset($_from); ?>
      <?php endif; ?>
      <?php if ($this->_tpl_vars['otherItemsCount'] < 6): ?>
      <?php unset($this->_sections['foo']);
$this->_sections['foo']['name'] = 'foo';
$this->_sections['foo']['start'] = (int)$this->_tpl_vars['otherItemsCount'];
$this->_sections['foo']['loop'] = is_array($_loop=6) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['foo']['step'] = ((int)1) == 0 ? 1 : (int)1;
$this->_sections['foo']['show'] = true;
$this->_sections['foo']['max'] = $this->_sections['foo']['loop'];
if ($this->_sections['foo']['start'] < 0)
    $this->_sections['foo']['start'] = max($this->_sections['foo']['step'] > 0 ? 0 : -1, $this->_sections['foo']['loop'] + $this->_sections['foo']['start']);
else
    $this->_sections['foo']['start'] = min($this->_sections['foo']['start'], $this->_sections['foo']['step'] > 0 ? $this->_sections['foo']['loop'] : $this->_sections['foo']['loop']-1);
if ($this->_sections['foo']['show']) {
    $this->_sections['foo']['total'] = min(ceil(($this->_sections['foo']['step'] > 0 ? $this->_sections['foo']['loop'] - $this->_sections['foo']['start'] : $this->_sections['foo']['start']+1)/abs($this->_sections['foo']['step'])), $this->_sections['foo']['max']);
    if ($this->_sections['foo']['total'] == 0)
        $this->_sections['foo']['show'] = false;
} else
    $this->_sections['foo']['total'] = 0;
if ($this->_sections['foo']['show']):

            for ($this->_sections['foo']['index'] = $this->_sections['foo']['start'], $this->_sections['foo']['iteration'] = 1;
                 $this->_sections['foo']['iteration'] <= $this->_sections['foo']['total'];
                 $this->_sections['foo']['index'] += $this->_sections['foo']['step'], $this->_sections['foo']['iteration']++):
$this->_sections['foo']['rownum'] = $this->_sections['foo']['iteration'];
$this->_sections['foo']['index_prev'] = $this->_sections['foo']['index'] - $this->_sections['foo']['step'];
$this->_sections['foo']['index_next'] = $this->_sections['foo']['index'] + $this->_sections['foo']['step'];
$this->_sections['foo']['first']      = ($this->_sections['foo']['iteration'] == 1);
$this->_sections['foo']['last']       = ($this->_sections['foo']['iteration'] == $this->_sections['foo']['total']);
?>
        <span class="emptyitem"></span>
      <?php endfor; endif; ?>      
      <?php endif; ?>
      </div>
      <a class="otherlink" href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/portfolio/<?php echo $this->_tpl_vars['item']['user']['username']; ?>
"><?php echo $this->_tpl_vars['item']['user']['nickname']; ?>
的其它作品</a>
    </div>
    <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['root_path'])."/apps/items/views/rightside.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  </div>
</div>
<?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);
 ?>
</body>
</html>