<?php
/* Smarty version 3.1.29, created on 2017-07-02 09:55:47
  from "/var/www/h3ysh156/data/www/freyamu.ru/views/templates/default/admin/editor/prisons.tpl" */

if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
  'has_nocache_code' => false,
  'version' => '3.1.29',
  'unifunc' => 'content_5958b513cfe5e2_15130308',
  'file_dependency' => 
  array (
    '7b51739e67982261a1596e9ebd5906b44cae2eb7' => 
    array (
      0 => '/var/www/h3ysh156/data/www/freyamu.ru/views/templates/default/admin/editor/prisons.tpl',
      1 => 1479256532,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5958b513cfe5e2_15130308 ($_smarty_tpl) {
if (!is_callable('smarty_modifier_date_format')) require_once '/var/www/h3ysh156/data/www/freyamu.ru/library/Smarty/plugins/modifier.date_format.php';
?>
<h1 style="text-align: center;">Prisons</h1>
<form method="post" action="/admin/editor/prisons">
    <table width="100%" style="">
        <tr>
            <td>Nick</td>
            <td><input type="text" name="Name" placeholder="Nick"></td>
        </tr>
        <td>Reason</td>
        <td><input type="text" name="Reason" placeholder="Reason"></td>
        </tr>
        <td>Freedom date</td>
        <td><input name="Date" value="0" type="date"><input type="time" value="0" name="Time"></td>
        </tr>
        <td colspan="2"><input type="submit" name="add_prison" class="btn btn-primary" value="Save"></td>
        </tr>
    </table>
    <form method="post" action="/admin/editor/prisons">
        <table style="margin-top: 12px;" width="100%" style="">
            <tr class="head-table">
                <td>Nick</td>
                <td>Reason</td>
                <td>Freedom date</td>
                <td>Free</td>
            </tr>
            <?php if (!empty($_smarty_tpl->tpl_vars['Prisons']->value)) {?>

            <?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['Prisons']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_prison_0_saved_item = isset($_smarty_tpl->tpl_vars['prison']) ? $_smarty_tpl->tpl_vars['prison'] : false;
$__foreach_prison_0_saved_key = isset($_smarty_tpl->tpl_vars['key']) ? $_smarty_tpl->tpl_vars['key'] : false;
$_smarty_tpl->tpl_vars['prison'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['key'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['prison']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['key']->value => $_smarty_tpl->tpl_vars['prison']->value) {
$_smarty_tpl->tpl_vars['prison']->_loop = true;
$__foreach_prison_0_saved_local_item = $_smarty_tpl->tpl_vars['prison'];
?>
            <?php if ($_smarty_tpl->tpl_vars['i']->value%2 == 0) {?>
                <tr style="background: rgba(164,157,157,0.5)">
            <?php } else { ?>
                <tr>
            <?php }?>
                <td><?php echo $_smarty_tpl->tpl_vars['prison']->value['Name'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['prison']->value['ban_desc'];?>
</td>
                <?php if (($_smarty_tpl->tpl_vars['prison']->value['ban_time'] == 1)) {?>
                    <td>None</td>
                <?php } else { ?>
                    <td><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['prison']->value['ban_time'],"%D %H:%M");?>
</td>
                <?php }?>
                <td><button name="delete_prison" value="<?php echo $_smarty_tpl->tpl_vars['prison']->value['Name'];?>
">Free</button></td>
            </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['prison'] = $__foreach_prison_0_saved_local_item;
}
if ($__foreach_prison_0_saved_item) {
$_smarty_tpl->tpl_vars['prison'] = $__foreach_prison_0_saved_item;
}
if ($__foreach_prison_0_saved_key) {
$_smarty_tpl->tpl_vars['key'] = $__foreach_prison_0_saved_key;
}
?>

            <?php } else { ?>
                <p>List Empty</p>
            <?php }?>
        </table>
    </form>
<?php }
}
