<?php
/* Smarty version 3.1.29, created on 2016-10-18 16:46:15
  from "/var/www/gredy/data/www/evomu.ru/views/templates/default/user/charactermarket/index.tpl" */

if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
  'has_nocache_code' => false,
  'version' => '3.1.29',
  'unifunc' => 'content_580627a7587646_12040336',
  'file_dependency' => 
  array (
    'a43cf298dd2b69ca649546e5d8cfb045c66d17e8' => 
    array (
      0 => '/var/www/gredy/data/www/evomu.ru/views/templates/default/user/charactermarket/index.tpl',
      1 => 1476791563,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_580627a7587646_12040336 ($_smarty_tpl) {
echo '<script'; ?>
 src="/web/templates/default/js/tooltip.js" type="text/javascript"><?php echo '</script'; ?>
>
        <div class="title1" >
    <h1>Магазин персонажей</h1>
    <a href="/user" class="back-to-user-menu">Вернуться</a>
</div>
<div id="changepass">
       <p>
           <span><?php echo $_smarty_tpl->tpl_vars['Valutes']->value[$_smarty_tpl->tpl_vars['Config']->value['Valute']]['Name'];?>
: <?php echo $_smarty_tpl->tpl_vars['CharacterValutes']->value[$_smarty_tpl->tpl_vars['Config']->value['Valute']]['Count'];?>
</span>
            <span style="float: left;"><a href="/user/charmarket/sell">Продать</a><a href="/user/charmarket/mylist">Мои персонажи</a></span>
        <table class="" cellpadding="0" cellspacing="0">
        <thead><tr class="">
            <td>Ник</td>
            <td>Класс</td>
            <td>Уровень</td>
            <td>Ресет</td>
            <td>Гранд ресет</td>
            <td>Цена</td>
            <td>Купить</td>
        </tr>
        </thead>
                <?php
$_from = $_smarty_tpl->tpl_vars['Market']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_char_0_saved_item = isset($_smarty_tpl->tpl_vars['char']) ? $_smarty_tpl->tpl_vars['char'] : false;
$__foreach_char_0_saved_key = isset($_smarty_tpl->tpl_vars['i']) ? $_smarty_tpl->tpl_vars['i'] : false;
$_smarty_tpl->tpl_vars['char'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['i'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['char']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['i']->value => $_smarty_tpl->tpl_vars['char']->value) {
$_smarty_tpl->tpl_vars['char']->_loop = true;
$__foreach_char_0_saved_local_item = $_smarty_tpl->tpl_vars['char'];
?>



                    <tbody>
                    <tr id="user_list_<?php echo $_smarty_tpl->tpl_vars['char']->value['Name'];?>
" onmouseout="UnTip();" onMouseover="Tip('<table><tr valign=top><td style=padding-right:10px;><img src=<?php echo Character::GetImageCharacter($_smarty_tpl->tpl_vars['char']->value['Class']);?>
></td><td> Ник: <b><?php echo $_smarty_tpl->tpl_vars['char']->value['Name'];?>
</b><br>Класс: <b><?php echo Character::GetClassName($_smarty_tpl->tpl_vars['char']->value['Class']);?>
</b><br>Zen: <b><?php echo $_smarty_tpl->tpl_vars['char']->value['Money'];?>
</b><br>Уровень <b><?php echo $_smarty_tpl->tpl_vars['char']->value['cLevel'];?>
</b><br>Ресет <b><?php echo $_smarty_tpl->tpl_vars['char']->value['Resets'];?>
</b><br>Гранд ресет <b><?php echo $_smarty_tpl->tpl_vars['char']->value['gr_res'];?>
</b><br>Свободных поинтов <b><?php echo $_smarty_tpl->tpl_vars['char']->value['LevelUpPoint'];?>
</b><br><br>Сила: <b><?php echo $_smarty_tpl->tpl_vars['char']->value['Strength'];?>
</b><br>Ловкость: <b><?php echo $_smarty_tpl->tpl_vars['char']->value['Dexterity'];?>
</b><br>Жизн. сила: <b><?php echo $_smarty_tpl->tpl_vars['char']->value['Vitality'];?>
</b><br>Маг. сила: <b><?php echo $_smarty_tpl->tpl_vars['char']->value['Energy'];?>
</b><br>Лид. навыки: <b><?php echo $_smarty_tpl->tpl_vars['char']->value['Leadership'];?>
</b><br><br><font color=yellow><b>Стоимость: <?php echo $_smarty_tpl->tpl_vars['Valutes']->value[$_smarty_tpl->tpl_vars['Config']->value['Valute']]['Name'];?>
 <?php echo $_smarty_tpl->tpl_vars['char']->value['price'];?>
</b></font><br></td></tr><tr><td colspan=2 align=center>Нажмите для просмотра инвенторя</td></tr></table>')" onMouseout="hideddrivetip()" >
                        <td><a href="#" onclick="getUserInventory('<?php echo $_smarty_tpl->tpl_vars['char']->value['Name'];?>
'); return false;"><b><?php echo $_smarty_tpl->tpl_vars['char']->value['Name'];?>
</b></a></td>
                        <td><?php echo Character::GetClassName($_smarty_tpl->tpl_vars['char']->value['Class']);?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['char']->value['cLevel'];?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['char']->value['Resets'];?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['char']->value['gr_res'];?>
</td>
                        <td><?php echo $_smarty_tpl->tpl_vars['char']->value['price'];?>
</td>
                        <td><form action="/user/charmarket" method="POST">
                        <?php if ($_SESSION['login'] == $_smarty_tpl->tpl_vars['char']->value['AccountID']) {?>
                        <button class="btn btn-primary" value="<?php echo $_smarty_tpl->tpl_vars['char']->value['id'];?>
" name="take_character" type="submit">Забрать</button>
                        <?php } else { ?>
                        <button class="btn btn-primary" value="<?php echo $_smarty_tpl->tpl_vars['char']->value['id'];?>
" name="buy_character" type="submit">Купить</button>
                        <?php }?>
                        </form></td>
                    </tr>
                    <tr id="user_Inv_hiddentr_<?php echo $_smarty_tpl->tpl_vars['char']->value['Name'];?>
" style="display:none;">
                        <td colspan="6" id="user_Inv_data_<?php echo $_smarty_tpl->tpl_vars['char']->value['Name'];?>
">
                        </td>
                    </tr>
                    </tbody>
                <?php
$_smarty_tpl->tpl_vars['char'] = $__foreach_char_0_saved_local_item;
}
if ($__foreach_char_0_saved_item) {
$_smarty_tpl->tpl_vars['char'] = $__foreach_char_0_saved_item;
}
if ($__foreach_char_0_saved_key) {
$_smarty_tpl->tpl_vars['i'] = $__foreach_char_0_saved_key;
}
?>
            </table>
       </p>
</div>

<?php echo '<script'; ?>
>
    function getUserInventory(userName) {
        $.post("/user/charmarket/view", {
                    getUserInventory: userName
                },
                function(data) {
                    $('#user_Inv_hiddentr_' + userName).toggle("slow");
                    if(data == '') {
                        $('#user_Inv_data_' + userName).html("<div>Инвентарь пуст</div>");
                    } else {
                        $('#user_Inv_data_' + userName).html(data);
                    }
                    $('#user_list_' + userName).css('background', 'none');

                });
        $('#user_list_' + userName).css('background', '#ccc');
        $('#user_Inv_hiddentr_' + userName).css('background', '#ccc');
    }
<?php echo '</script'; ?>
>



<?php }
}
