<?php /* Smarty version 2.6.22, created on 2014-03-09 23:39:59
         compiled from /home/hamyarwp/public_html/market/zipmarket/apps/items/views/top_sellers.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', '/home/hamyarwp/public_html/market/zipmarket/apps/items/views/top_sellers.html', 13, false),array('modifier', 'url', '/home/hamyarwp/public_html/market/zipmarket/apps/items/views/top_sellers.html', 28, false),array('modifier', 'escape', '/home/hamyarwp/public_html/market/zipmarket/apps/items/views/top_sellers.html', 28, false),)), $this); ?>
<div class="page-info">
    <div class="container">
      <div id="breadcrumbs">
        <a href="/" class="first">صفحه اصلی </a> /<a href="/categories/all/">محصولات</a> /</div>
      <h1 class="page-title">پرفروش ترین محصولات</h1>
    </div>
  </div>
<div id="content">
  <div class="container">
  <div class="content-l">
    <div class="week-switcher">
  <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
items/top_sellers/<?php echo $this->_tpl_vars['prevDate']; ?>
" class="slider-control slider-prev">قبلی</a>
  <?php echo $this->_tpl_vars['lang']['week_ending']; ?>
 <?php echo ((is_array($_tmp=$this->_tpl_vars['endDate'])) ? $this->_run_mod_handler('date_format', true, $_tmp, 'j F Y') : smarty_modifier_date_format($_tmp, 'j F Y')); ?>

   <?php if ($this->_tpl_vars['nextDate']): ?>
     <a href="<?php echo $this->_tpl_vars['languageURL']; ?>
items/top_sellers/<?php echo $this->_tpl_vars['nextDate']; ?>
" class="slider-control slider-next">بعدی</a>
    <?php else: ?>
	<span class="slider-control slider-next-disabled">بعدی</span>
   <?php endif; ?>
</div>
    <h2>پرفروش ترین محصولات هفته</h2>
<?php if ($this->_tpl_vars['topSellItems']): ?>
<ul class="item-grid">
		<?php $this->assign('position', '0'); ?>
				<?php $_from = $this->_tpl_vars['topSellItems']; 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['i']):
        $this->_foreach['foo']['iteration']++;
?>
			<?php $this->assign('position', $this->_tpl_vars['position']+1); ?>
    <li class="source">
  <div class="thumbnail">
  <a href="/<?php echo $this->_tpl_vars['langaugeURL']; ?>
items/<?php echo $this->_tpl_vars['i']['item_id']; ?>
/<?php echo ((is_array($_tmp=$this->_tpl_vars['i']['name'])) ? $this->_run_mod_handler('url', true, $_tmp) : smarty_modifier_url($_tmp)); ?>
"><img data-tooltip="<?php echo ((is_array($_tmp=$this->_tpl_vars['i']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" alt="<?php echo ((is_array($_tmp=$this->_tpl_vars['i']['name'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" class="landscape-image-magnifier preload no_preview" data-item-author="by <?php echo $this->_tpl_vars['users'][$this->_tpl_vars['i']['user_id']]['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']; ?>
 <?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']['item_id']; ?>
/preview.jpg" data-preview-width="" src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/items/<?php echo $this->_tpl_vars['i']['item_id']; ?>
/<?php echo $this->_tpl_vars['i']['thumbnail']; ?>
" title="" border="0" width="80" height="80"></a>  </div>

  <div class="item-info">
    <h3>
      <a href="/<?php echo $this->_tpl_vars['langaugeURL']; ?>
items/<?php echo $this->_tpl_vars['i']['item_id']; ?>
/<?php echo ((is_array($_tmp=$this->_tpl_vars['i']['name'])) ? $this->_run_mod_handler('url', true, $_tmp) : smarty_modifier_url($_tmp)); ?>
"><?php echo $this->_tpl_vars['i']['name']; ?>
</a>
    </h3>

	    <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['i']['user_id']]['username']; ?>
/" class="author"><?php echo $this->_tpl_vars['users'][$this->_tpl_vars['i']['user_id']]['username']; ?>
</a>

      </div>

  <small class="meta"></small>

  <div class="sale-info">
    <small class="sale-count"><?php echo $this->_tpl_vars['i']['sales']; ?>
 <?php echo $this->_tpl_vars['lang']['sales']; ?>
</small>
    <small class="price"><?php echo $this->_tpl_vars['i']['price']; ?>
 <?php echo $this->_tpl_vars['currency']['symbol']; ?>
</small>
    <div class="rating">
      
<?php unset($this->_sections['foo']);
$this->_sections['foo']['name'] = 'foo';
$this->_sections['foo']['start'] = (int)1;
$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']);
?><?php if ($this->_tpl_vars['i']['rating'] >= $this->_sections['foo']['index']): ?><img src="/static/img/star-on.png" alt="" /><?php else: ?><img src="/static/img/star-off.png" alt="" /><?php endif; ?><?php endfor; endif; ?>
  </div>
      </div>
</li>
	<?php endforeach; endif; unset($_from); ?>
</ul>
	<?php else: ?>
				<div class="content-box vertical-space"><?php echo $this->_tpl_vars['lang']['no_items']; ?>
</div>
	<?php endif; ?>
    <br><br>
      <h2><?php echo $this->_tpl_vars['lang']['three_monthly']; ?>
 <?php echo ((is_array($_tmp=$this->_tpl_vars['endMonthlyDate'])) ? $this->_run_mod_handler('date_format', true, $_tmp, 'j F Y') : smarty_modifier_date_format($_tmp, 'j F Y')); ?>
</h2>
	<?php if ($this->_tpl_vars['topMonthlyItems']): ?>
<ul class="item-grid">
<?php $_from = $this->_tpl_vars['topMonthlyItems']; 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['i']):
        $this->_foreach['foo']['iteration']++;
?>
  			<?php $this->assign('position', $this->_tpl_vars['position']+1); ?>
    <li class="source">
  <div class="thumbnail">
  <a href="/<?php echo $this->_tpl_vars['langaugeURL']; ?>
items/<?php echo $this->_tpl_vars['i']['item_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)); ?>
" class="landscape-image-magnifier preload no_preview" data-item-author="توسط <?php echo $this->_tpl_vars['users'][$this->_tpl_vars['i']['user_id']]['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']; ?>
 <?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']['item_id']; ?>
/preview.jpg" data-preview-width="" src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/items/<?php echo $this->_tpl_vars['i']['item_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)); ?>
" border="0" width="80" height="80"></a>  </div>
  <div class="item-info">
    <h3>
      <a href="/<?php echo $this->_tpl_vars['langaugeURL']; ?>
items/<?php echo $this->_tpl_vars['i']['item_id']; ?>
/<?php echo ((is_array($_tmp=$this->_tpl_vars['i']['name'])) ? $this->_run_mod_handler('url', true, $_tmp) : smarty_modifier_url($_tmp)); ?>
"><?php echo $this->_tpl_vars['i']['name']; ?>
</a>
    </h3>
    <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['users'][$this->_tpl_vars['i']['user_id']]['username']; ?>
/" class="author"><?php echo $this->_tpl_vars['users'][$this->_tpl_vars['i']['user_id']]['username']; ?>
</a>
      </div>
  <small class="meta"></small>
  <div class="sale-info">
    <small class="sale-count"><?php echo $this->_tpl_vars['i']['sales']; ?>
 <?php echo $this->_tpl_vars['lang']['sales']; ?>
</small>
    <small class="price"><?php echo $this->_tpl_vars['i']['price']; ?>
 <?php echo $this->_tpl_vars['currency']['symbol']; ?>
</small>
    <div class="rating">
      <?php unset($this->_sections['foo']);
$this->_sections['foo']['name'] = 'foo';
$this->_sections['foo']['start'] = (int)1;
$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']);
?><?php if ($this->_tpl_vars['i']['rating'] >= $this->_sections['foo']['index']): ?><img src="/static/img/star-on.png" alt="" /><?php else: ?><img src="/static/img/star-off.png" alt="" /><?php endif; ?><?php endfor; endif; ?> 
  </div>
      </div>
</li>
	<?php endforeach; endif; unset($_from); ?>
</ul>
	<?php else: ?>
		<div class="content-box vertical-space"><?php echo $this->_tpl_vars['lang']['no_items']; ?>
</div>
	<?php endif; ?>
  </div>
<div class="sidebar-s sidebar-right">
<?php if ($this->_tpl_vars['topAuthors']): ?>
    <h2 class="box-heading" style="font-size:17px!important;"><?php echo $this->_tpl_vars['lang']['top_authors_in']; ?>
 <?php echo ((is_array($_tmp=$this->_tpl_vars['lang']['monthArr'][$this->_tpl_vars['month']])) ? $this->_run_mod_handler('date_format', true, $_tmp, 'F') : smarty_modifier_date_format($_tmp, 'F')); ?>
</h2>
	<?php $_from = $this->_tpl_vars['topAuthors']; 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['u']):
        $this->_foreach['foo']['iteration']++;
?>
      <div class="content-box top-author">
<div class="avatar-wrapper">
    <a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['u']['username']; ?>
" class="avatar" title="<?php echo $this->_tpl_vars['u']['username']; ?>
">
<?php if ($this->_tpl_vars['u']['avatar'] != ''): ?>  
  <img alt="<?php echo $this->_tpl_vars['u']['username']; ?>
" class="m6 left" height="80" src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/users/<?php echo $this->_tpl_vars['u']['user_id']; ?>
/A_<?php echo $this->_tpl_vars['u']['avatar']; ?>
" width="80" />
<?php else: ?>
	<img alt="<?php echo $this->_tpl_vars['u']['username']; ?>
" class="" height="80" src="<?php echo $this->_tpl_vars['data_server']; ?>
img/default-user.jpg" width="80" />
<?php endif; ?>
</a>
</div>
       <strong><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
user/<?php echo $this->_tpl_vars['u']['username']; ?>
"><?php echo $this->_tpl_vars['u']['username']; ?>
</a></strong>
       <br>
       <small><?php echo $this->_tpl_vars['u']['sales']; ?>
 <?php echo $this->_tpl_vars['lang']['sales']; ?>
</small>
     </div>
   <?php endforeach; endif; unset($_from); ?>
		
</div>
 <?php endif; ?>	
      </div>
    </div> </div>