<?php
/* Smarty version 3.1.29, created on 2016-10-27 08:24:09
  from "/var/www/fr8992/data/www/evomu.ru/views/templates/evomu/user/referrals.tpl" */

if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
  'has_nocache_code' => false,
  'version' => '3.1.29',
  'unifunc' => 'content_58118f79636545_62043199',
  'file_dependency' => 
  array (
    'f05f35c43063df4f49d3a30511bc0240edf0c312' => 
    array (
      0 => '/var/www/fr8992/data/www/evomu.ru/views/templates/evomu/user/referrals.tpl',
      1 => 1476792356,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_58118f79636545_62043199 ($_smarty_tpl) {
echo '<script'; ?>
 src="/web/templates/default/js/referrals.js"><?php echo '</script'; ?>
>

    <h1>Реферальная система</h1>
	<a href="/user" class="back-to-user-menu">Back to user menu</a>
<div class="right-block">
    <h3 style="text-align: center;">Информация</h3>
    <table  width="100%" border="1">
        <tr>
            <td>Шаг 1</td>
            <td>Нужен 10 Ресет, Награда 40 WCoinC</td>
        </tr>
        <tr>
            <td>Шаг 2</td>
            <td>Нужен 20 Ресет, Награда 80 WCoinC</td>
        </tr>
        <tr>
            <td>Шаг 3</td>
            <td>Нужен 30 Ресет, Награда 120 WCoinC</td>
        </tr>
        <tr>
            <td>Шаг 4</td>
            <td>Нужен 40 Ресет, Награда 160 WCoinC</td>
        </tr>
        <tr>
            <td>Шаг 5</td>
            <td>Нужен 50 Ресет, Награда 200 WCoinC</td>
        </tr>
        <tr>
            <td>Награда будет начислена</td>
            <td><?php echo $_smarty_tpl->tpl_vars['ActiveChar']->value;?>
</td>
        </tr>

    </table>
    <h3 style="text-align: center;">Ваши Рефералы</h3>
    <?php if ($_smarty_tpl->tpl_vars['ReferralList']->value == 0) {?>
        <h4>Не найдено ни одного реферала</h4>
    <?php } else { ?>
        <form action="/user/referrals" method="post">

        <table class="ranking-table" width="100%" style="text-align:center;">
        <thead>
            <th>№</th>
            <th>Ник реферала</th>
            <th>Уровень</th>
            <th>Ресет</th>
        </thead>
        <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable(1, null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'i', 0);?>
        <?php
$_from = $_smarty_tpl->tpl_vars['ReferralList']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_Referral_0_saved_item = isset($_smarty_tpl->tpl_vars['Referral']) ? $_smarty_tpl->tpl_vars['Referral'] : false;
$_smarty_tpl->tpl_vars['Referral'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['Referral']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['Referral']->value) {
$_smarty_tpl->tpl_vars['Referral']->_loop = true;
$__foreach_Referral_0_saved_local_item = $_smarty_tpl->tpl_vars['Referral'];
?>

            <?php if ($_smarty_tpl->tpl_vars['Referral']->value == 0) {?>
                <?php if ($_smarty_tpl->tpl_vars['i']->value%2 == 0) {?>
                    <tr class="ranking-zebra">
                        <?php } else { ?>
                    <tr>
                <?php }?>
                <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                <td>unknown</td>
                <td>0</td>
                <td>0</td>
            <?php } else { ?>
                <?php if ($_smarty_tpl->tpl_vars['i']->value%2 == 0) {?>
                    <tr class="active-referral" class="ranking-zebra">
                        <?php } else { ?>
                    <tr class="active-referral">
                <?php }?>
                <td><?php echo $_smarty_tpl->tpl_vars['i']->value;?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['Referral']->value['Name'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['Referral']->value['cLevel'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['Referral']->value['Resets'];?>
</td>
                <tr class="no-ranking-zebra">
                    <td colspan="4">
                        <ul class="step-list">
                            <?php
$_from = $_smarty_tpl->tpl_vars['Referral']->value['ListReward'];
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_step_1_saved_item = isset($_smarty_tpl->tpl_vars['step']) ? $_smarty_tpl->tpl_vars['step'] : false;
$_smarty_tpl->tpl_vars['step'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['step']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['step']->value) {
$_smarty_tpl->tpl_vars['step']->_loop = true;
$__foreach_step_1_saved_local_item = $_smarty_tpl->tpl_vars['step'];
?>
                                <li>
                                    Шаг <?php echo $_smarty_tpl->tpl_vars['step']->value;?>
 Нужен Ресет: <?php echo $_smarty_tpl->tpl_vars['ReferralConfigs']->value['Steps'][$_smarty_tpl->tpl_vars['step']->value]['NeedReset'];?>

                                    <?php if ($_smarty_tpl->tpl_vars['Referral']->value['Resets'] >= $_smarty_tpl->tpl_vars['ReferralConfigs']->value['Steps'][$_smarty_tpl->tpl_vars['step']->value]['NeedReset']) {?>
                                        <button name="get_reward_referral" value="<?php echo $_smarty_tpl->tpl_vars['step']->value;
echo $_smarty_tpl->tpl_vars['Referral']->value['Name'];?>
">Получить награду</button>
                                    <?php }?>
                                </li>
                            <?php
$_smarty_tpl->tpl_vars['step'] = $__foreach_step_1_saved_local_item;
}
if ($__foreach_step_1_saved_item) {
$_smarty_tpl->tpl_vars['step'] = $__foreach_step_1_saved_item;
}
?>
                        </ul>
                    </td>
                </tr>
            <?php }?>
            </tr>
            <?php $_smarty_tpl->tpl_vars['i'] = new Smarty_Variable($_smarty_tpl->tpl_vars['i']->value+1, null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'i', 0);?>
        <?php
$_smarty_tpl->tpl_vars['Referral'] = $__foreach_Referral_0_saved_local_item;
}
if ($__foreach_Referral_0_saved_item) {
$_smarty_tpl->tpl_vars['Referral'] = $__foreach_Referral_0_saved_item;
}
?>
        </table>

        </form>
    <?php }?>
	</div>
<?php }
}
