<?php /* Smarty version 2.6.22, created on 2014-02-25 15:11:44
         compiled from D:/Program+Files/Ampps/www/zipmarket%5Capps%5Cusers%5Cadmin/edit.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'string_format', 'D:/Program Files/Ampps/www/zipmarket\\apps\\users\\admin/edit.html', 34, false),array('modifier', 'date_format', 'D:/Program Files/Ampps/www/zipmarket\\apps\\users\\admin/edit.html', 38, false),)), $this); ?>
﻿<div class="page-info">
    <div class="container">
      <div id="breadcrumbs">
        <a href="/admin" class="first">Home</a> \ <a href="/admin/?m=users&c=list">Users</a> \
      </div>
      <h1 class="page-title"><?php echo $this->_tpl_vars['user']['username']; ?>
</h1>
    </div>
     <div id="tabsy">
      <ul>
		<?php if ($this->_tpl_vars['user']['items'] != '0'): ?>
		<li class="selected"><div></div><a href="/admin/?m=users&c=edit&id=<?php echo $this->_tpl_vars['user']['user_id']; ?>
">Profile</a></li>
		<li><div></div><a href="/admin/?m=users&c=balance&id=<?php echo $this->_tpl_vars['user']['user_id']; ?>
">Edit Balance</a></li>
		<li class="last"><div></div><a href="/admin/?m=items&c=list&user=<?php echo $this->_tpl_vars['user']['user_id']; ?>
">Portfolio</a><div class="last"></div></li>
		<?php else: ?>
		<li class="selected"><div></div><a href="/admin/?m=users&c=edit&id=<?php echo $this->_tpl_vars['user']['user_id']; ?>
">Profile</a></li>
		 <li class="last"><div></div><a href="/admin/?m=users&c=balance&id=<?php echo $this->_tpl_vars['user']['user_id']; ?>
">Edit Balance</a><div class="last"></div></li>
		<?php endif; ?>
      </ul>
	</div>
  </div>
    <div id="content">
      <div class="container">
	  		<?php echo $this->_tpl_vars['errorMessage']; ?>

<div class="sidebar-l" id="ziper">
     <div class="basic-user-info">
	 
	 <?php if ($this->_tpl_vars['user']['avatar'] != ''): ?>
	 <img class="img-border" src="<?php echo $this->_tpl_vars['data_server']; ?>
/uploads/users/<?php echo $this->_tpl_vars['user']['user_id']; ?>
/A_<?php echo $this->_tpl_vars['user']['avatar']; ?>
" style="margin-top:15px" height="80" width="80">
	 <?php else: ?>
	 <img class="img-border" src="/static/img/default-user.jpg" style="margin-top:15px" height="80" width="80">
	 <?php endif; ?>

     <h2><?php echo $this->_tpl_vars['user']['username']; ?>
</h2>
	 Current Balance: <?php echo ((is_array($_tmp=$this->_tpl_vars['user']['total'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
 <?php echo $this->_tpl_vars['currency']['symbol']; ?>
<br>	
	<?php if ($this->_tpl_vars['user']['ip_address'] != ''): ?>
	 IP Address <?php echo $this->_tpl_vars['user']['ip_address']; ?>
<br>
	<?php endif; ?>
     Member Since <?php echo ((is_array($_tmp=$this->_tpl_vars['user']['register_datetime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, 'j F Y') : smarty_modifier_date_format($_tmp, 'j F Y')); ?>
<br>
    <?php if ($this->_tpl_vars['user']['last_login_datetime'] != ''): ?>
     Last sign in: <?php echo ((is_array($_tmp=$this->_tpl_vars['user']['last_login_datetime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "l, j F Y H:i:s") : smarty_modifier_date_format($_tmp, "l, j F Y H:i:s")); ?>
<br>
    <?php endif; ?>

    </div>
<ul class="side-tabs">
    <li><a href="javascript:;" class="icon-process">Personal Information</a></li>
	<li><a href="javascript:;" class="icon-key">Change Password</a></li> 
    <li><a href="javascript:;" class="icon-badge">Badges</a></li>
	
</ul>
</div>
<script type="text/javascript">
<?php echo '
$(document).ready(function(){
	
	//default settings
	
	$("#taber ul li:eq(0)").siblings().hide();
	
	//end default
	
	$("#ziper ul li").click(function(){
		
		var val = $(this).index();
	
		showthis(val+1);
		
		});

function showthis(val){
	
		var btn_index = val-1;
		
		//sidebar buttons
		$("#ziper ul li:eq("+btn_index+")").siblings().removeClass("active");
		$("#ziper ul li:eq("+btn_index+")").addClass("active");
		//end sidebar buttons
		
		//tab contents 
		$("#taber ul li:eq("+btn_index+")").show();
		$("#taber ul li:eq("+btn_index+")").siblings().hide();
		//$("#tab"+val).show();
	
		}// end if
	
	});'; ?>

</script>
<div id="taber" class="content-s">
<form id="sampleform" action="" method="post" enctype="multipart/form-data">
<?php if (! isset ( $this->_tpl_vars['personalEdit'] )): ?>
 <ul style="list-style-type: none;">
  <li>
   <div class="horizontal-form">

	<?php $_from = $this->_tpl_vars['groups']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['g']):
?>
    <div class="input-group">
      <label for="group_<?php echo $this->_tpl_vars['g']['ug_id']; ?>
"><?php echo $this->_tpl_vars['g']['name']; ?>
</label>
      <div class="inputs">
		<input id="group_<?php echo $this->_tpl_vars['g']['ug_id']; ?>
" type="checkbox" name="groups[<?php echo $this->_tpl_vars['g']['ug_id']; ?>
]" values="yes" <?php if (isset ( $_POST['groups'][$this->_tpl_vars['g']['ug_id']] )): ?>checked="checked"<?php endif; ?>>
      </div>
    </div>
	<?php endforeach; endif; unset($_from); ?>
   
    <div class="input-group">
      <label>Status:</label>
      <div class="inputs">
        <select id="istatus" name="status">
		 <option value="activate" <?php if ($_POST['status'] == 'activate'): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['lang']['activate']; ?>
</option>
		  <option value="waiting" <?php if ($_POST['status'] == 'waiting'): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['lang']['waiting']; ?>
</option>
		 <option value="banned" <?php if ($_POST['status'] == 'banned'): ?>selected="selected"<?php endif; ?>>Banned</option>
        </select>
      </div>
    </div>
	
	<?php if ($this->_tpl_vars['user']['quiz'] == 'true'): ?>
    <div class="input-group">
     <label for="commission_percent">Commission %</label>
      <div class="inputs">
       <input type="text" id="commission_percent" name="commission_percent" value="<?php echo $this->_tpl_vars['user']['commission_percent']; ?>
">
	   <small>Set single commission percent</small>
      </div>
    </div>
	<?php endif; ?>
    <div class="input-group">
      <label for="firstname"><?php echo $this->_tpl_vars['lang']['first_name']; ?>
:</label>
      <div class="right">
       <strong><?php echo $this->_tpl_vars['user']['firstname']; ?>
</strong>
      </div>
    </div>
    <div class="input-group">
     <label for="surname"><?php echo $this->_tpl_vars['lang']['last_name']; ?>
:</label>
      <div class="right">
       <strong><?php echo $this->_tpl_vars['user']['lastname']; ?>
</strong>
      </div>
    </div>
    <div class="input-group">
     <label for="email"><?php echo $this->_tpl_vars['lang']['email']; ?>
:</label>
      <div class="right">
       <strong><?php echo $this->_tpl_vars['user']['email']; ?>
</strong>
      </div>
    </div>
	<?php if ($this->_tpl_vars['user']['firmname'] != ''): ?>
    <div class="input-group">
     <label for="invoice_to"><?php echo $this->_tpl_vars['lang']['company_name']; ?>
:</label>
      <div class="right">
        <strong><?php echo $this->_tpl_vars['user']['firmname']; ?>
</strong>
      </div>
    </div>
    <?php endif; ?>

	<?php if ($this->_tpl_vars['user']['live_city'] != ''): ?>
    <div class="input-group">
     <label for="lives_in">Lives In:</label>
      <div class="right">
        <strong><?php echo $this->_tpl_vars['user']['live_city']; ?>
</strong>
      </div>
    </div>
    <?php endif; ?>
		
    <?php if ($this->_tpl_vars['user']['country']['name'] != ''): ?>
    <div class="input-group">
      <label for="country"><?php echo $this->_tpl_vars['lang']['country']; ?>
:</label>
       <div class="right">
         <strong><?php echo $this->_tpl_vars['user']['country']['name']; ?>
</strong>
       </div>
     </div>
    <?php endif; ?>
		
    <div class="input-group">
     <label>Deposit Money:</label>
      <div class="right">
        <strong><?php echo ((is_array($_tmp=$this->_tpl_vars['user']['stats']['deposit'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
 <?php echo $this->_tpl_vars['currency']['symbol']; ?>
</strong>
      </div>
    </div>
	
    <?php if (! isset ( $this->_tpl_vars['user']['stats']['items'] )): ?><?php else: ?>
    <div class="input-group">
     <label><?php echo $this->_tpl_vars['lang']['buy_items']; ?>
:</label>
      <div class="right">
        <strong><?php echo $this->_tpl_vars['user']['buy']; ?>
 for <?php echo ((is_array($_tmp=$this->_tpl_vars['user']['stats']['total'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f")); ?>
 <?php echo $this->_tpl_vars['currency']['symbol']; ?>
</strong>
      </div>
    </div>
	<?php endif; ?>
	
    <div class="input-group">
     <label>Can sell items?</label>
      <div class="right">
	<?php if ($this->_tpl_vars['user']['quiz'] == 'true'): ?>
        <strong>Yes</strong>
	<?php else: ?>
        <strong>No</strong>
	<?php endif; ?>
      </div>
    </div>
		
    <div class="input-group">
     <label><?php echo $this->_tpl_vars['lang']['sign_up']; ?>
:</label>
      <div class="right">
        <strong><?php echo ((is_array($_tmp=$this->_tpl_vars['user']['register_datetime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "l, j F Y H:i:s") : smarty_modifier_date_format($_tmp, "l, j F Y H:i:s")); ?>
</strong>
      </div>
    </div>
		
    <?php if ($this->_tpl_vars['user']['last_login_datetime'] != ''): ?>
    <div class="input-group">
      <label>Last sign in:</label>
       <div class="right">
         <strong><?php echo ((is_array($_tmp=$this->_tpl_vars['user']['last_login_datetime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "l, j F Y H:i:s") : smarty_modifier_date_format($_tmp, "l, j F Y H:i:s")); ?>
</strong>
       </div>
    </div>
	<?php endif; ?>
		
	<?php if ($this->_tpl_vars['user']['ip_address'] != ''): ?>
    <div class="input-group">
     <label>IP address:</label>
      <div class="right">
        <strong><?php echo $this->_tpl_vars['user']['ip_address']; ?>
</strong>
      </div>
    </div>
	<?php endif; ?>
		
	<?php if ($this->_tpl_vars['user']['profile_title'] != ''): ?>
    <div class="input-group">
      <label>Profile Heading:</label>
      <div class="right">
        <strong><?php echo $this->_tpl_vars['user']['profile_title']; ?>
</strong>
      </div>
    </div>
    <?php endif; ?>
		
	<?php if ($this->_tpl_vars['user']['profile_desc'] != ''): ?>
    <div class="input-group">
      <label>Profile Text:</label>
       <div class="right">
         <strong><?php echo $this->_tpl_vars['user']['profile_desc']; ?>
</strong>
       </div>
    </div>
	<?php endif; ?>
	
	<?php if ($this->_tpl_vars['user']['hesab_saheb'] != ''): ?>
    <div class="input-group">
     <label for="hesab_saheb">نام صاحب حساب :</label>
      <div class="right">
        <strong><?php echo $this->_tpl_vars['user']['hesab_saheb']; ?>
</strong>
      </div>
    </div>
    <?php endif; ?>
	
	<?php if ($this->_tpl_vars['user']['hesab_bank'] != ''): ?>
    <div class="input-group">
     <label for="hesab_bank">نام بانک :</label>
      <div class="right">
        <strong><?php echo $this->_tpl_vars['user']['hesab_bank']; ?>
</strong>
      </div>
    </div>
    <?php endif; ?>
	
	<?php if ($this->_tpl_vars['user']['hesab_shomre'] != ''): ?>
    <div class="input-group">
     <label for="hesab_shomre">شماره حساب :</label>
      <div class="right">
        <strong><?php echo $this->_tpl_vars['user']['hesab_shomre']; ?>
</strong>
      </div>
    </div>
    <?php endif; ?>
	
	<?php if ($this->_tpl_vars['user']['hesab_cart'] != ''): ?>
    <div class="input-group">
     <label for="hesab_cart">شماره کارت :</label>
      <div class="right">
        <strong><?php echo $this->_tpl_vars['user']['hesab_cart']; ?>
</strong>
      </div>
    </div>
    <?php endif; ?>
	
	<?php if ($this->_tpl_vars['user']['hesab_shaba'] != ''): ?>
    <div class="input-group">
     <label for="hesab_shaba">شناسه شبا :</label>
      <div class="right">
        <strong><?php echo $this->_tpl_vars['user']['hesab_shaba']; ?>
</strong>
      </div>
    </div>
    <?php endif; ?>
   </div>
  </li>
 
 
 
 
  <li>
    <div id="password" class="horizontal-form">
     <div class="input-group">
      <label for="change_password">Change password:</label>
        <div class="inputs">
         <input id="change_password" name="password" type="text" value="">
        </div>
      </div>
    </div>
  </li>
 
 
 
   <li>
    <h3 class="underlined">Badges</h3>
      <div id="profile" class="horizontal-form">
	  
       <div class="input-group" style="margin-bottom:0px;">
          <div class="inputs">
           <input id="power_elite_author" name="power_elite_author" value="true" type="checkbox" class="checkbox" <?php if ($_POST['power_elite_author'] == 'true'): ?>checked="checked"<?php endif; ?>>
		   &nbsp;  <img src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/badges/power_elite_author.png" alt="" /> &nbsp; Power Elite Author
          </div>
        </div>
       <div class="input-group" style="margin-bottom:0px;">
          <div class="inputs">
           <input id="elite_author" name="elite_author" value="true" type="checkbox" class="checkbox" <?php if ($_POST['elite_author'] == 'true'): ?>checked="checked"<?php endif; ?>> 
		   &nbsp; <img src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/badges/elite_author.png" alt="" /> &nbsp;  Elite Author
          </div>
        </div>
	  <?php if ($this->_tpl_vars['badges']): ?>
       <?php $_from = $this->_tpl_vars['badges']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['b']):
?>
       <div class="input-group" style="margin-bottom:0px;">
          <div class="inputs">
           <input id="badge_<?php echo $this->_tpl_vars['b']['id']; ?>
" name="badges[]" value="<?php echo $this->_tpl_vars['b']['id']; ?>
" type="checkbox" <?php if (is_array ( $_POST['badges'] ) && in_array ( $this->_tpl_vars['b']['id'] , $_POST['badges'] )): ?>checked="checked"<?php endif; ?>> 		 
		 <?php if ($this->_tpl_vars['b']['photo'] != ''): ?> &nbsp; 
		 <img src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/badges/<?php echo $this->_tpl_vars['b']['photo']; ?>
" alt="" />
		 <?php endif; ?> &nbsp; <?php echo $this->_tpl_vars['b']['name']; ?>

          </div>
        </div>
		<?php endforeach; endif; unset($_from); ?>
	   <?php endif; ?>
	   
       <div class="input-group" style="margin-bottom:0px;">
          <div class="inputs">
           <input id="featured_author" name="featured_author" value="true" type="checkbox" class="checkbox" <?php if ($_POST['featured_author'] == 'true'): ?>checked="checked"<?php endif; ?>>
		   &nbsp; <img src="<?php echo $this->_tpl_vars['data_server']; ?>
uploads/badges/author_was_featured.png" alt="" /> &nbsp; <?php echo $this->_tpl_vars['lang']['featured_author']; ?>

          </div>
        </div>
	   </div>
    </li>
 
 </ul>
	<?php echo $this->_tpl_vars['lang']['edit_from_site']; ?>

	<?php endif; ?>
    <div class="form-submit">
	  <?php if ($_GET['c'] == 'edit'): ?>	
        <button id="personal_info_submit_button" class="btn-icon save" type="submit" name="edit"><?php echo $this->_tpl_vars['lang']['edit']; ?>
</button>
      <?php else: ?>
		<button id="personal_info_submit_button" class="btn-icon save" type="submit" name="add"><?php echo $this->_tpl_vars['lang']['edit']; ?>
</button>
	  <?php endif; ?>
    </div>
 
 
 </form>
</div>



    </div>
  </div>