<?php require_once(THEME_ROOT . '/blocks/head.php'); ?>
<?php require_once(THEME_ROOT . '/blocks/top.php'); ?>

<br><br>
<div class="container">
    <div class="row">
        <div class="main" style="text-align:center;">
            <h3><?php echo T('Операции');?></h3>
        </div>
        <div class="col-sm-12 col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><?php echo T('История операций'); ?></h3>
                </div>

                <div class="table-responsive">
                    <table class="table table-bordered-off table-striped-off table-hover-off" style="margin-bottom: 0px; text-align: center;">
                        <thead>
                            <tr>
                                <td><?php echo T('Операция'); ?></td>
                                <td><?php echo T('Дата'); ?></td>
                                <td><?php echo T('Сумма').' ('.html($valu).')'; ?></td>
                                <td><?php echo T('Система'); ?></td>
                                <td><?php echo T('Статус'); ?></td>
                            </tr>
                        </thead>
                        <tbody>
                            <?php
                            $list = login_list_operations($login);
                            if ($list) {
                                foreach ($list as $item) { ?>
                                    <tr style="text-align: center;">
                                        <td><?php echo T(escape($item['operation'])); ?></td>
                                        <td><?php echo format_date($item['date']); ?></td>
                                        <td><?php echo format_currency($item['summa'], $val); ?></td>
                                        <td><?php echo escape($item['system']); ?></td>
                                        <td><?php echo $item['status'] ? T('Успешно') : T('Ожидает'); ?></td>
                                    </tr>
                                <?php }
                            } else { ?>
                                <tr>
                                    <td colspan="5" class="danger" align="center"><?php echo T('Записей не обнаружено'); ?></td>
                                </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<?php 
	require_once(THEME_ROOT."/blocks/footer.php");
?>
