<?php /* Smarty version 2.6.22, created on 2014-02-23 18:04:39
         compiled from /home/joomaria/public_html/zipmarket/apps/items/views/faq.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'url', '/home/joomaria/public_html/zipmarket/apps/items/views/faq.html', 6, false),array('modifier', 'nl2br', '/home/joomaria/public_html/zipmarket/apps/items/views/faq.html', 34, false),array('modifier', 'escape', '/home/joomaria/public_html/zipmarket/apps/items/views/faq.html', 83, false),)), $this); ?>
  <div class="page-info">
    <div class="container">
      <div id="breadcrumbs">
        <a href='/' class="first">صفحه اصلی</a> \  <a href="/categories/all/">محصولات</a>  \ 	<?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']; ?>
/<?php echo ((is_array($_tmp=$this->_tpl_vars['categories'][$this->_tpl_vars['c']]['name'])) ? $this->_run_mod_handler('url', true, $_tmp) : smarty_modifier_url($_tmp)); ?>
" title=""><?php echo $this->_tpl_vars['categories'][$this->_tpl_vars['c']]['name']; ?>
</a> <?php if (! ($this->_foreach['foo']['iteration'] == $this->_foreach['foo']['total'])): ?> \ <?php endif; ?>
								<?php endforeach; endif; unset($_from); ?>
							<?php endforeach; endif; unset($_from); ?>  \
     </div>
   <h1 class="page-title"><?php echo $this->_tpl_vars['item']['name']; ?>
</h1>
    </div>
      <div id="tabsy">
          <ul>
            <li class="<?php if ($_GET['controller'] != 'faq' && $_GET['controller'] != 'comments' && $_GET['controller'] != 'edit'): ?> selected <?php endif; ?> "><div></div><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/<?php echo $this->_tpl_vars['item']['id']; ?>
/<?php echo ((is_array($_tmp=$this->_tpl_vars['item']['name'])) ? $this->_run_mod_handler('url', true, $_tmp) : smarty_modifier_url($_tmp)); ?>
">جزئیات محصول</a></li>
			<?php if ($this->_tpl_vars['faqs'] > 0 || check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>
			<li class="<?php if ($_GET['controller'] == 'faq'): ?>selected<?php endif; ?>"><div></div><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/faq/<?php echo $this->_tpl_vars['item']['id']; ?>
/<?php echo ((is_array($_tmp=$this->_tpl_vars['item']['name'])) ? $this->_run_mod_handler('url', true, $_tmp) : smarty_modifier_url($_tmp)); ?>
"><?php echo $this->_tpl_vars['lang']['faqs']; ?>
</a></li>
			<?php endif; ?>
			<?php if (check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>
			<li class="last<?php if ($_GET['controller'] == 'edit'): ?>selected<?php endif; ?>" ><div></div><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/edit/<?php echo $this->_tpl_vars['item']['id']; ?>
/<?php echo ((is_array($_tmp=$this->_tpl_vars['item']['name'])) ? $this->_run_mod_handler('url', true, $_tmp) : smarty_modifier_url($_tmp)); ?>
"><?php echo $this->_tpl_vars['lang']['edit']; ?>
</a></li>
			<?php endif; ?>
			<li class="last<?php if ($_GET['controller'] == 'comments'): ?>selected<?php endif; ?> last"><div></div><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/comments/<?php echo $this->_tpl_vars['item']['id']; ?>
/<?php echo ((is_array($_tmp=$this->_tpl_vars['item']['name'])) ? $this->_run_mod_handler('url', true, $_tmp) : smarty_modifier_url($_tmp)); ?>
"><?php echo $this->_tpl_vars['lang']['comments1']; ?>
</a><div class="last"></div></li>
          </ul>
      </div>
  </div>
    <div id="content">
      <div class="container">
	  		<?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'])."/zipmarket/apps/items/views/purchase_panel.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div class="content-s">
	<?php if ($this->_tpl_vars['faq']): ?>  
  <div 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="content-box">
  <strong class="question"><p><?php echo ((is_array($_tmp=$this->_tpl_vars['f']['question'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>
</p></strong>
  <div class="answer new-typography"><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" style="float: left; margin-top:5px; margin-bottom: -5px; font-size: 10px; color: silver;">
	      	<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']; ?>
"><?php echo $this->_tpl_vars['lang']['delete']; ?>
</a>
  </div>
    	<?php endif; ?>
</div>
 <?php endforeach; endif; unset($_from); ?>
  </div>
<?php else: ?>
 <div class="content-box vertical-space"><?php echo $this->_tpl_vars['lang']['no_faq']; ?>
</div>
<?php endif; ?>
<?php if (check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>
         <h2 class="box-heading">ایجاد پرسش و پاسخ</h2>
            <div class="content-box">
	            <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"><?php echo $this->_tpl_vars['lang']['question']; ?>
</label>
                <div class="inputs">
				 <textarea id="item_question" name="question" rows="10"></textarea>
                </div>
              </div>
			
              <div class="input-group">
                <label for="item_answer"><?php echo $this->_tpl_vars['lang']['answer']; ?>
</label>
                <div class="inputs">
				<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="btn-icon post-reply"><?php echo $this->_tpl_vars['lang']['create_faq']; ?>
</button>
            </div>
          </form>          
         </div>
<?php endif; ?>

        <div class="more-work">
        <div>
       <?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']; ?>
/<?php echo ((is_array($_tmp=$this->_tpl_vars['i']['name'])) ? $this->_run_mod_handler('url', true, $_tmp) : smarty_modifier_url($_tmp)); ?>
"><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="" data-item-category="" data-item-cost="<?php echo $this->_tpl_vars['i']['price']; ?>
 <?php echo $this->_tpl_vars['currency']['symbol']; ?>
" 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']; ?>
/preview.jpg" data-preview-width="" height="80" 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)); ?>
" width="80" /></a>          
        	<?php endforeach; endif; unset($_from); ?>
		<?php endif; ?>
		<?php if ($this->_tpl_vars['otherItemsCount'] < 7): ?>
    	<?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=7) ? 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']);
?>
          <div class="thumbnail"></div>
        <?php endfor; endif; ?>      
		<?php endif; ?>
        </div>
        <div class="clear"><!-- --></div>
        <small><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/portfolio/<?php echo $this->_tpl_vars['item']['user']['username']; ?>
"><?php echo $this->_tpl_vars['lang']['more_items_by']; ?>
 <?php echo $this->_tpl_vars['item']['user']['username']; ?>
</a></small>
      </div>
</div>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['root_path'])."/zipmarket/apps/items/views/rightside.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
      </div>
    </div>