<?php /* Smarty version 2.6.22, created on 2014-02-25 01:40:14
         compiled from D:/Program+Files/Ampps/www/zipmarket%5Capps%5Cusers%5Cviews/statement.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'D:/Program Files/Ampps/www/zipmarket\\apps\\users\\views/statement.html', 33, false),array('modifier', 'string_format', 'D:/Program Files/Ampps/www/zipmarket\\apps\\users\\views/statement.html', 69, false),)), $this); ?>
<?php if ($_SESSION['user']['power_elite_author'] == 'true' || $_SESSION['user']['elite_author'] == 'true'): ?>
<div class="<?php if ($_SESSION['user']['power_elite_author'] == 'true'): ?>power-elite-author<?php endif; ?><?php if ($_SESSION['user']['elite_author'] == 'true'): ?>elite-author<?php endif; ?>">
  <div class="page-info">
    <div class="container">
      <div id="breadcrumbs">
        <a href='/' class="first">صفحه اصلی</a> /<a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
users/<?php echo $_SESSION['user']['username']; ?>
/">داشبورد من</a> /</div>
       <h2 class="page-title"><?php echo $this->_tpl_vars['lang']['statement']; ?>
 </h2>
    </div>
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['root_path'])."/zipmarket/apps/users/views/tabsy.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  </div>
</div>
<?php else: ?>
  <div class="page-info">
    <div class="container">
      <div id="breadcrumbs">
        <a href='/' class="first">صفحه اصلی</a> /<a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
users/<?php echo $_SESSION['user']['username']; ?>
/">داشبورد من</a> /</div>
       <h1 class="page-title"><?php echo $this->_tpl_vars['lang']['statement']; ?>
 </h1>
    </div>
	<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['root_path'])."/zipmarket/apps/users/views/tabsy.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  </div>
<?php endif; ?>
    <div id="content">
      <div class="container">
   <?php echo $this->_tpl_vars['errorMessage']; ?>
 
<div class="content-s">
<h2 class="statement-heading">
<?php if ($this->_tpl_vars['nav']['prev']['show'] == 'true'): ?>
<a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
statement/?month=<?php echo $this->_tpl_vars['nav']['prev']['month']; ?>
&amp;year=<?php echo $this->_tpl_vars['nav']['prev']['year']; ?>
" class="slider-control slider-prev">Previous</a> 
<?php else: ?>
<span class="slider-control slider-prev-disabled">Previous</span>
<?php endif; ?> 

<?php echo $this->_tpl_vars['lang']['statement_for']; ?>
 <?php echo ((is_array($_tmp=$this->_tpl_vars['lang']['monthArr'][$_GET['month']])) ? $this->_run_mod_handler('date_format', true, $_tmp, 'F Y') : smarty_modifier_date_format($_tmp, 'F Y')); ?>


<?php if ($this->_tpl_vars['nav']['next']['show'] == 'true'): ?> 
<a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
statement/?month=<?php echo $this->_tpl_vars['nav']['next']['month']; ?>
&amp;year=<?php echo $this->_tpl_vars['nav']['next']['year']; ?>
" class="slider-control slider-next">Next</a>
<?php else: ?>
<span class="slider-control slider-next-disabled">Next</span>
<?php endif; ?>
</h2>
  <div class="general_table_border">
   	  <table class="general_table" cellpadding="0" cellspacing="0">
      <thead>
        <tr>
          <th width="80"><?php echo $this->_tpl_vars['lang']['date']; ?>
</th>
          <th width="40"><?php echo $this->_tpl_vars['lang']['type']; ?>
</th>
          <th width="60"><?php echo $this->_tpl_vars['lang']['amount']; ?>
</th>
          <th width="370"><?php echo $this->_tpl_vars['lang']['details']; ?>
</th>
        </tr>
      </thead>
      <tbody>
	    <?php if ($this->_tpl_vars['statement']): ?>
	    	<?php $_from = $this->_tpl_vars['statement']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['s']):
?>  
	      <tr style="text-transform:capitalize">
	        <td><?php echo ((is_array($_tmp=$this->_tpl_vars['s']['datetime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, 'j F Y') : smarty_modifier_date_format($_tmp, 'j F Y')); ?>
</td>
	        <td><strong>
	        	<?php if ($this->_tpl_vars['s']['type'] == 'deposit'): ?>
	        		<?php echo $this->_tpl_vars['lang']['deposit']; ?>

	        	<?php elseif ($this->_tpl_vars['s']['type'] == 'withdraw'): ?>
	        		<?php echo $this->_tpl_vars['lang']['withdraw_money']; ?>

	        	<?php elseif ($this->_tpl_vars['s']['type'] == 'order' && $this->_tpl_vars['s']['owner_id'] == $_SESSION['user']['user_id']): ?>
	        		<?php echo $this->_tpl_vars['lang']['receive_money']; ?>

	        	<?php else: ?>
	        		<?php echo $this->_tpl_vars['lang']['purchase_money']; ?>

	        	<?php endif; ?>
	        </strong></td>
	        <td>
	        	<?php if ($this->_tpl_vars['s']['type'] == 'deposit'): ?>
	        		<?php echo ((is_array($_tmp=$this->_tpl_vars['s']['price'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
 <?php echo $this->_tpl_vars['currency']['symbol']; ?>

	        	<?php elseif ($this->_tpl_vars['s']['type'] == 'withdraw'): ?>
	        		<?php echo ((is_array($_tmp=$this->_tpl_vars['s']['price'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
 -<?php echo $this->_tpl_vars['currency']['symbol']; ?>

	        	<?php elseif ($this->_tpl_vars['s']['type'] == 'order' && $this->_tpl_vars['s']['owner_id'] == $_SESSION['user']['user_id']): ?>
	        		<?php echo ((is_array($_tmp=$this->_tpl_vars['s']['receive'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
 <?php echo $this->_tpl_vars['currency']['symbol']; ?>
 
	        	<?php else: ?>
	        		<?php echo ((is_array($_tmp=$this->_tpl_vars['s']['price'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
 -<?php echo $this->_tpl_vars['currency']['symbol']; ?>

	        	<?php endif; ?>
	        </td>
	        <td>
	        	<?php if ($this->_tpl_vars['s']['type'] == 'deposit'): ?>
	        		<?php echo $this->_tpl_vars['lang']['deposit_money']; ?>

	        	<?php elseif ($this->_tpl_vars['s']['type'] == 'withdraw'): ?>
	        		<?php echo $this->_tpl_vars['lang']['earning_money']; ?>

	        	<?php elseif ($this->_tpl_vars['s']['type'] == 'order' && $this->_tpl_vars['s']['owner_id'] == $_SESSION['user']['user_id']): ?>
	        		<?php if ($this->_tpl_vars['s']['referal'] == 'buy'): ?>
	        			<?php echo $this->_tpl_vars['lang']['sold_item']; ?>
 <?php echo $this->_tpl_vars['s']['item_name']; ?>

	        		<?php else: ?>
	        			<?php echo $this->_tpl_vars['lang']['referal_money']; ?>

	        		<?php endif; ?>
	        	<?php else: ?>
	        		<?php echo $this->_tpl_vars['lang']['buy_item']; ?>
 <?php echo $this->_tpl_vars['s']['item_name']; ?>

	        	<?php endif; ?>
	        </td>
	      </tr>
	      <?php endforeach; endif; unset($_from); ?>
		  
		<?php else: ?>
		<tr>
		<td></td>
		<td></td>
		<td></td>
		<td>هیچ رکوردی ثبت نشده است .</td>
		</tr>
	    <?php endif; ?>
      </tbody>
    </table>
  </div>
</div>
	<div class="sidebar-l sidebar-right">
  <h2 class="box-heading"><?php echo $this->_tpl_vars['lang']['download_csv']; ?>
</h2>
  <div class="content-box" style="text-align:justify;">
    <?php echo $this->_tpl_vars['download_csv_info']; ?>

  </div>
    <h2 class="box-heading"><?php echo $this->_tpl_vars['lang']['past_statements']; ?>
</h2>
    <div class="content-box">
      <ul class="feature-list">
				<?php unset($this->_sections['year']);
$this->_sections['year']['name'] = 'year';
$this->_sections['year']['start'] = (int)$this->_tpl_vars['registrationDate'][0];
$this->_sections['year']['loop'] = is_array($_loop=$this->_tpl_vars['today']['year']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['year']['step'] = ((int)1) == 0 ? 1 : (int)1;
$this->_sections['year']['show'] = true;
$this->_sections['year']['max'] = $this->_sections['year']['loop'];
if ($this->_sections['year']['start'] < 0)
    $this->_sections['year']['start'] = max($this->_sections['year']['step'] > 0 ? 0 : -1, $this->_sections['year']['loop'] + $this->_sections['year']['start']);
else
    $this->_sections['year']['start'] = min($this->_sections['year']['start'], $this->_sections['year']['step'] > 0 ? $this->_sections['year']['loop'] : $this->_sections['year']['loop']-1);
if ($this->_sections['year']['show']) {
    $this->_sections['year']['total'] = min(ceil(($this->_sections['year']['step'] > 0 ? $this->_sections['year']['loop'] - $this->_sections['year']['start'] : $this->_sections['year']['start']+1)/abs($this->_sections['year']['step'])), $this->_sections['year']['max']);
    if ($this->_sections['year']['total'] == 0)
        $this->_sections['year']['show'] = false;
} else
    $this->_sections['year']['total'] = 0;
if ($this->_sections['year']['show']):

            for ($this->_sections['year']['index'] = $this->_sections['year']['start'], $this->_sections['year']['iteration'] = 1;
                 $this->_sections['year']['iteration'] <= $this->_sections['year']['total'];
                 $this->_sections['year']['index'] += $this->_sections['year']['step'], $this->_sections['year']['iteration']++):
$this->_sections['year']['rownum'] = $this->_sections['year']['iteration'];
$this->_sections['year']['index_prev'] = $this->_sections['year']['index'] - $this->_sections['year']['step'];
$this->_sections['year']['index_next'] = $this->_sections['year']['index'] + $this->_sections['year']['step'];
$this->_sections['year']['first']      = ($this->_sections['year']['iteration'] == 1);
$this->_sections['year']['last']       = ($this->_sections['year']['iteration'] == $this->_sections['year']['total']);
?>
				  <?php unset($this->_sections['month']);
$this->_sections['month']['name'] = 'month';
$this->_sections['month']['start'] = (int)1;
$this->_sections['month']['loop'] = is_array($_loop=12) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['month']['step'] = ((int)1) == 0 ? 1 : (int)1;
$this->_sections['month']['show'] = true;
$this->_sections['month']['max'] = $this->_sections['month']['loop'];
if ($this->_sections['month']['start'] < 0)
    $this->_sections['month']['start'] = max($this->_sections['month']['step'] > 0 ? 0 : -1, $this->_sections['month']['loop'] + $this->_sections['month']['start']);
else
    $this->_sections['month']['start'] = min($this->_sections['month']['start'], $this->_sections['month']['step'] > 0 ? $this->_sections['month']['loop'] : $this->_sections['month']['loop']-1);
if ($this->_sections['month']['show']) {
    $this->_sections['month']['total'] = min(ceil(($this->_sections['month']['step'] > 0 ? $this->_sections['month']['loop'] - $this->_sections['month']['start'] : $this->_sections['month']['start']+1)/abs($this->_sections['month']['step'])), $this->_sections['month']['max']);
    if ($this->_sections['month']['total'] == 0)
        $this->_sections['month']['show'] = false;
} else
    $this->_sections['month']['total'] = 0;
if ($this->_sections['month']['show']):

            for ($this->_sections['month']['index'] = $this->_sections['month']['start'], $this->_sections['month']['iteration'] = 1;
                 $this->_sections['month']['iteration'] <= $this->_sections['month']['total'];
                 $this->_sections['month']['index'] += $this->_sections['month']['step'], $this->_sections['month']['iteration']++):
$this->_sections['month']['rownum'] = $this->_sections['month']['iteration'];
$this->_sections['month']['index_prev'] = $this->_sections['month']['index'] - $this->_sections['month']['step'];
$this->_sections['month']['index_next'] = $this->_sections['month']['index'] + $this->_sections['month']['step'];
$this->_sections['month']['first']      = ($this->_sections['month']['iteration'] == 1);
$this->_sections['month']['last']       = ($this->_sections['month']['iteration'] == $this->_sections['month']['total']);
?>
				  	<?php if ($this->_sections['year']['index'] == $this->_tpl_vars['registrationDate'][0] && $this->_sections['month']['index'] >= $this->_tpl_vars['registrationDate'][1]): ?>
					  	<?php if ($this->_sections['month']['index'] < $this->_tpl_vars['today']['month']): ?>
					  		<li><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
statement/?month=<?php echo $this->_sections['month']['index']; ?>
&amp;year=<?php echo $this->_sections['year']['index']; ?>
"><?php echo $this->_tpl_vars['lang']['statement_for']; ?>
 <?php echo ((is_array($_tmp=$this->_tpl_vars['lang']['monthArr'][$this->_sections['month']['index']])) ? $this->_run_mod_handler('date_format', true, $_tmp, 'F Y') : smarty_modifier_date_format($_tmp, 'F Y')); ?>
 </a></li>
					  	<?php elseif ($this->_sections['month']['index'] == $this->_tpl_vars['today']['month']): ?>
					  		<li><a href="/<?php echo $this->_tpl_vars['languageURL']; ?>
statement/?month=<?php echo $this->_sections['month']['index']; ?>
&amp;year=<?php echo $this->_sections['year']['index']; ?>
"><?php echo $this->_tpl_vars['lang']['current_month']; ?>
</a></li>
					  	<?php endif; ?>
					  <?php endif; ?>
				  <?php endfor; endif; ?>
				<?php endfor; endif; ?>
      </ul>
    </div>
</div>
    </div>
	   </div>