<?php /* Smarty version 2.6.22, created on 2014-03-15 14:50:39
         compiled from /home/hamyarwp/public_html/market/zipmarket/apps/items/views/comments.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'url', '/home/hamyarwp/public_html/market/zipmarket/apps/items/views/comments.html', 6, false),array('modifier', 'date_format', '/home/hamyarwp/public_html/market/zipmarket/apps/items/views/comments.html', 65, false),array('modifier', 'nl2br', '/home/hamyarwp/public_html/market/zipmarket/apps/items/views/comments.html', 71, 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; ?>" id="faq-tab"><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="<?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="<?php if ($_GET['controller'] == 'comments'): ?>selected last<?php endif; ?>  <?php if (check_login_bool ( ) && $this->_tpl_vars['item']['user_id'] == $_SESSION['user']['user_id']): ?>last<?php endif; ?>"><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['paging']): ?>
    <div class="page-controls">
      <div class="pagination">
     <?php echo $this->_tpl_vars['paging']; ?>

      </div>
    </div>
   <?php endif; ?>
<?php if ($this->_tpl_vars['comments']): ?>
<div class="comment-list">
    <?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="comment">
  <div class="comment__user">
    <div>
   <div class="avatar-wrapper">
    <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['username']; ?>
" class="avatar" title="<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['username']; ?>
">
	<?php if ($this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['avatar'] != ''): ?> 
    <img alt="<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['username']; ?>
" class="" height="80" 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']; ?>
" width="80" />
    <?php else: ?>
    <img alt="<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['username']; ?>
" class="" height="80" src="<?php echo $this->_tpl_vars['data_server']; ?>
img/default-user.jpg" width="80" />
    <?php endif; ?>
    </a>
   </div>
  </div>
 <ul class="badges"></ul>
</div>
  <div class="comment__container">
    <div class="content-box comment__body">
        <div class="comment__header">
          <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"><?php echo $this->_tpl_vars['users'][$this->_tpl_vars['c']['user_id']]['username']; ?>
</a>
        <?php if ($this->_tpl_vars['item']['user_id'] == $this->_tpl_vars['c']['user_id']): ?>
		<strong class="comment__user-type--author">فروشنده</strong>
		<?php elseif (isset ( $this->_tpl_vars['buyFromUsers'][$this->_tpl_vars['c']['user_id']] )): ?>
		<strong class="comment__user-type--purchased">خریدار</strong>
	    <?php endif; ?>	
          <div class="comment__meta">
        <?php echo $this->_tpl_vars['lang']['posted']; ?>
 <?php echo ((is_array($_tmp=$this->_tpl_vars['c']['datetime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, 'j F Y') : smarty_modifier_date_format($_tmp, 'j F Y')); ?>

        <?php if ($this->_tpl_vars['c']['report_by'] == '0'): ?>
        <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/comments/<?php echo $this->_tpl_vars['item']['id']; ?>
/?report=<?php echo $this->_tpl_vars['c']['id']; ?>
" class="glyph-flag fancybox"><span class="glyph-alt"><?php echo $this->_tpl_vars['lang']['report']; ?>
</span></a>
        <?php endif; ?> 
         </div>
        </div>
        <p><?php echo ((is_array($_tmp=$this->_tpl_vars['c']['comment'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>
</p>      
    </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="comment__reply ">
  <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['cc']['user_id']]['username']; ?>
" class='comment__reply__avatar'>
  <?php if ($this->_tpl_vars['users'][$this->_tpl_vars['cc']['user_id']]['avatar'] != ''): ?> 
    <img alt="<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['cc']['user_id']]['username']; ?>
" height="30" 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']; ?>
" width="30" />
  <?php else: ?>
  	<img alt="<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['cc']['user_id']]['username']; ?>
" class="avt" height="30" src="/static/img/default-user.jpg" width="30" />
  <?php endif; ?>
 </a>
  <div class="comment__reply__body">
      <div class="comment__header">
        <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"><?php echo $this->_tpl_vars['users'][$this->_tpl_vars['cc']['user_id']]['username']; ?>
</a>
        
        <?php if ($this->_tpl_vars['item']['user_id'] == $this->_tpl_vars['cc']['user_id']): ?>
		<strong class="comment__user-type--author">فروشنده</strong>
		<?php elseif (isset ( $this->_tpl_vars['buyFromUsers'][$this->_tpl_vars['cc']['user_id']] )): ?>
		<strong class="comment__user-type--purchased">خریدار</strong>
	    <?php endif; ?>	
       <div class="comment__meta">
  <?php echo $this->_tpl_vars['lang']['posted']; ?>
 <?php echo ((is_array($_tmp=$this->_tpl_vars['cc']['datetime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, 'j F Y') : smarty_modifier_date_format($_tmp, 'j F Y')); ?>

  <?php if ($this->_tpl_vars['cc']['report_by'] == '0'): ?>
    <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/comments/<?php echo $this->_tpl_vars['item']['id']; ?>
/?report=<?php echo $this->_tpl_vars['cc']['id']; ?>
" onclick="return confirm('<?php echo $this->_tpl_vars['lang']['are_you_sure_report']; ?>
');" class="glyph-flag fancybox"><span class="glyph-alt"><?php echo $this->_tpl_vars['lang']['report']; ?>
</span></a>
  <?php endif; ?>
       </div>
      </div>
      <p><?php echo ((is_array($_tmp=$this->_tpl_vars['cc']['comment'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp)); ?>
</p>
  </div>
</div>
<?php endforeach; endif; unset($_from); ?>
<?php endif; ?>
  	  <div id="replyhere_<?php echo $this->_tpl_vars['c']['id']; ?>
"></div>
	<?php echo '<script language="javascript">
 $("'; ?>
#replyhere_<?php echo $this->_tpl_vars['c']['id']; ?>
<?php echo '").load("'; ?>
/<?php echo $this->_tpl_vars['languageURL']; ?>
items/reply/<?php echo $this->_tpl_vars['c']['id']; ?>
<?php echo '");
</script>'; ?>

  </div>
</div> 
<?php endforeach; endif; unset($_from); ?>   
</div>
<?php else: ?>
<div class="content-box vertical-space">
هیچ نظری برای این محصول ثبت نشده است .
</div>
<?php endif; ?>
<?php if (check_login_bool ( )): ?>
         <h2 class="box-heading">افزودن نظر</h2>
            <div class="content-box">
             <form action="" method="post">
              <fieldset class="horizontal-form">
                <div class="input-group">
                  <label for="item_comment_content"><?php echo $this->_tpl_vars['lang']['comment']; ?>
</label>
                  <div class="inputs">
					<textarea class="big input supertall" name="comment" rows="1"></textarea></div>
                </div>

                <div class="input-group">
                  <label for="reply_notification">اشتراک ایمیل ؟</label>
                  <div class="inputs">
                    <label for="reply_notification">
                      <input class="checkbox" id="reply_notification" name="reply_notification" type="checkbox" value="1" />
                      <?php echo $this->_tpl_vars['lang']['comment_reply_notify']; ?>

                    </label>
                  </div>
                </div>
              </fieldset>
              <div class="form-submit">
              <button type="submit" name="add" class="btn-icon post-reply"><?php echo $this->_tpl_vars['lang']['post_comment']; ?>
</button>
              </div>
            </form>          
           </div>
<?php echo '
<script type="text/javascript">
$(function(){
$("textarea").live("keyup keydown",function(){
var h=$(this);
h.height(20).height(h[0].scrollHeight); 
});});

</script>
'; ?>

<?php endif; ?>
      </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 class="clear"><!-- --></div>
      </div>
    </div>
        <div class="clear"><!-- --></div>