<?php
/* Smarty version 4.3.1, created on 2025-09-17 17:08:51
  from '/var/www/html/yatmack/ui/ui/voucher.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.3.1',
  'unifunc' => 'content_68cac0f3464331_12933062',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '9132aaddb82f6bbacdb0983f17c84a0de279ae03' => 
    array (
      0 => '/var/www/html/yatmack/ui/ui/voucher.tpl',
      1 => 1713580650,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:sections/header.tpl' => 1,
    'file:sections/footer.tpl' => 1,
  ),
),false)) {
function content_68cac0f3464331_12933062 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_subTemplateRender("file:sections/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>
            <div class="container-fluid">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="card card-hovered mb20 card-primary">
                            <div class="card-header">
                                <?php if (in_array($_smarty_tpl->tpl_vars['_admin']->value['user_type'],array('SuperAdmin','Admin'))) {?>
                                    <div class="btn-group pull-right">
                                        <a class="btn btn-danger btn-xs" title="Remove used Voucher" href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plan/remove-voucher"
                                            onclick="return confirm('Delete all used voucher code?')"><span
                                                class="fa fa-trash" aria-hidden="true"></span> Delete All</a>
                                    </div>
                                <?php }?>
                                &nbsp;
                            </div>
                            <div class="card-body">
                                <div class="md-whiteframe-z1 mb20 text-center row">
                                    <div class="col-md-8 mb-3">
                                        <form id="site-search" method="post" action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plan/voucher/">
                                            <div class="input-group">
                                                <div class="input-group-text">
                                                    <span class="fa fa-search"></span>
                                                </div>
                                                <input type="text" name="search" class="form-control" placeholder="<?php echo Lang::T('Search by Code Voucher');?>
..." value="<?php echo $_smarty_tpl->tpl_vars['search']->value;?>
">
                                                <button class="btn btn-success input-group-btn" type="submit"><?php echo Lang::T('Search');?>
</button>
                                                <!-- <div class="">
                                                </div> -->
                                            </div>
                                        </form>
                                    </div>
                                    <div class="col-md-4">
                                        <div class="btn-group btn-group-justified mb-3" role="group">
                                            <div class="btn-group" role="group">
                                                <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plan/add-voucher" class="btn btn-primary btn-block"><i class="ion ion-android-add"></i> <?php echo Lang::T('Add Vouchers');?>
</a>
                                            </div>
                                        </div>
                                        <div class="btn-group btn-group-justified" role="group">
                                            <div class="btn-group" role="group">
                                                <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plan/print-voucher" target="print_voucher" class="btn btn-info btn-block"><i class="ion ion-android-print"></i> Print</a>
                                            </div>
                                        </div>
                                    </div>&nbsp;
                                </div>
                                <div class="table-responsive">
                                    <table id="datatable" class="table table-bordered table-striped table-condensed">
                                        <thead>
                                            <tr>
                                                <th>ID</th>
                                                <th><?php echo Lang::T('Type');?>
</th>
                                                <th><?php echo Lang::T('Routers');?>
</th>
                                                <th><?php echo Lang::T('Plan Name');?>
</th>
                                                <th><?php echo Lang::T('Code Voucher');?>
</th>
                                                <th><?php echo Lang::T('Status Voucher');?>
</th>
                                                <th><?php echo Lang::T('Customer');?>
</th>
                                                <th><?php echo Lang::T('Generated By');?>
</th>
                                                <th><?php echo Lang::T('Manage');?>
</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['d']->value, 'ds');
$_smarty_tpl->tpl_vars['ds']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['ds']->value) {
$_smarty_tpl->tpl_vars['ds']->do_else = false;
?>
                                                <tr <?php if ($_smarty_tpl->tpl_vars['ds']->value['status'] == '1') {?>class="danger" <?php }?>>
                                                    <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
</td>
                                                    <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['type'];?>
</td>
                                                    <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['routers'];?>
</td>
                                                    <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['name_plan'];?>
</td>
                                                    <td style="background-color: black; color: black;"
                                                        onmouseleave="this.style.backgroundColor = 'black';"
                                                        onmouseenter="this.style.backgroundColor = 'white';">
                                                        <?php echo $_smarty_tpl->tpl_vars['ds']->value['code'];?>
</td>
                                                    <td><?php if ($_smarty_tpl->tpl_vars['ds']->value['status'] == '0') {?> <label class="btn-tag btn-tag-success">Not
                                                            Use</label> <?php } else { ?> <label class="btn-tag btn-tag-danger">Used</label>
                                                        <?php }?></td>
                                                    <td><?php if ($_smarty_tpl->tpl_vars['ds']->value['user'] == '0') {?> -
                                                        <?php } else { ?><a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
customers/viewu/<?php echo $_smarty_tpl->tpl_vars['ds']->value['user'];?>
"><?php echo $_smarty_tpl->tpl_vars['ds']->value['user'];?>
</a>
                                                        <?php }?></td>
                                                    <td><?php if ($_smarty_tpl->tpl_vars['ds']->value['generated_by']) {?>
                                                            <a
                                                                href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
settings/users-view/<?php echo $_smarty_tpl->tpl_vars['ds']->value['generated_by'];?>
"><?php echo $_smarty_tpl->tpl_vars['admins']->value[$_smarty_tpl->tpl_vars['ds']->value['generated_by']];?>
</a>
                                                        <?php } else { ?> -
                                                        <?php }?>
                                                    </td>
                                                    <td>
                                                        <?php if ($_smarty_tpl->tpl_vars['ds']->value['status'] != '1') {?>
                                                            <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plan/voucher-view/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
" id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
"
                                                                style="margin: 0px;"
                                                                class="btn btn-success btn-xs mb-2">&nbsp;&nbsp;<?php echo Lang::T('View');?>
&nbsp;&nbsp;</a>
                                                        <?php }?>
                                                        <?php if (in_array($_smarty_tpl->tpl_vars['_admin']->value['user_type'],array('SuperAdmin','Admin'))) {?>
                                                            <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plan/voucher-delete/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
" id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
"
                                                                class="btn btn-danger btn-xs"
                                                                onclick="return confirm('<?php echo Lang::T('Delete');?>
?')"><i
                                                                    class="fa fa-trash"></i></a>
                                                        <?php }?>
                                                    </td>
                                                </tr>
                                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                        </tbody>
                                    </table>
                                </div>
                                <ul class="pagination pagination-sm">
                                    <?php if ($_smarty_tpl->tpl_vars['page']->value > 0) {?>
                                        <li><a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plan/voucher&p=<?php echo $_smarty_tpl->tpl_vars['page']->value-1;?>
&code=<?php echo $_smarty_tpl->tpl_vars['_code']->value;?>
"><?php echo Lang::T('Prev');?>
</a></li>
                                    <?php }?>
                                    <?php if ($_smarty_tpl->tpl_vars['d']->value) {?>
                                        <li><a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plan/voucher&p=<?php echo $_smarty_tpl->tpl_vars['page']->value+1;?>
&code=<?php echo $_smarty_tpl->tpl_vars['_code']->value;?>
"><?php echo Lang::T('Next');?>
</a></li>
                                    <?php }?>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
<?php $_smarty_tpl->_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
}
}
