<?php
/* Smarty version 4.3.1, created on 2025-09-18 09:14:45
  from '/var/www/html/yatmack/ui/ui/customers.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.3.1',
  'unifunc' => 'content_68cba355a89fd6_59414922',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '0aa844c7d907ac7375f7654b5cb0ff4a56a69051' => 
    array (
      0 => '/var/www/html/yatmack/ui/ui/customers.tpl',
      1 => 1757855233,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:sections/header.tpl' => 1,
    'file:sections/footer.tpl' => 1,
  ),
),false)) {
function content_68cba355a89fd6_59414922 (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">
                <style>
                    .dataTables_wrapper .dataTables_paginate .paginate_button {
                        display: inline-block;
                        padding: 5px 10px;
                        margin-right: 5px;
                        border: 1px solid #ccc;
                        background-color: #fff;
                        color: #333;
                        cursor: pointer;
                    }
                </style>
                <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-primary btn-xs" title="save" href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
customers/csv"
                                        onclick="return confirm('This will export to CSV?')"><span class="fa fa-download"
                                            aria-hidden="true"></span> CSV</a>
                                </div>
                                <?php }?>
                                <?php echo Lang::T('Manage Contact');?>

                            </div>
                            <div class="card-body">
                                <div class="md-whiteframe-z1 mb20 text-center">
                                    <div class="col-md-6">
                                        <form method="post" action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
customers/list" class="form-inline">
                                            <div class="form-group">
                                                <label for="filter" class="control-label" style="margin-right: 10px;"><?php echo Lang::T('Filter by Status');?>
:</label>
                                                <select name="filter" id="filter" class="form-control" onchange="this.form.submit()">
                                                    <option value="All" <?php if ($_smarty_tpl->tpl_vars['filter']->value == 'All') {?>selected<?php }?>><?php echo Lang::T('All Status');?>
</option>
                                                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['statuses']->value, 'status');
$_smarty_tpl->tpl_vars['status']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['status']->value) {
$_smarty_tpl->tpl_vars['status']->do_else = false;
?>
                                                        <option value="<?php echo $_smarty_tpl->tpl_vars['status']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['filter']->value == $_smarty_tpl->tpl_vars['status']->value) {?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['status']->value;?>
</option>
                                                    <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                                </select>
                                            </div>
                                        </form>
                                    </div>
                                    <div class="col-md-6">
                                        <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
customers/add" class="btn btn-primary btn-block"><i class="fa fa-plus">
                                            </i> <?php echo Lang::T('Add New Client');?>
</a>
                                    </div>&nbsp;
                                </div>
                                <div class="table-responsive table_mobile">
                                    <div class="alert alert-info">
                                        <strong><?php echo Lang::T('Showing');?>
:</strong> <?php echo count($_smarty_tpl->tpl_vars['d']->value);?>
 <?php echo Lang::T('customers');?>
 
                                        <?php if ($_smarty_tpl->tpl_vars['filter']->value != 'All') {?>(<?php echo Lang::T('Status');?>
: <?php echo $_smarty_tpl->tpl_vars['filter']->value;?>
)<?php }?>
                                    </div>
                                    <table id="customerTable" class="table table-bordered table-striped table-condensed">
                                        <thead>
                                            <tr>
                                                <th><?php echo Lang::T('Full Name');?>
</th>
                                                <th><?php echo Lang::T('Username');?>
</th>
                                                <th><?php echo Lang::T('Acc Type');?>
</th>
                                                <th><?php echo Lang::T('Area');?>
</th>
                                                <th><?php echo Lang::T('Package');?>
</th>
                                                <th><?php echo Lang::T('Service');?>
</th>
                                                <th><?php echo Lang::T('Status');?>
</th>
                                                <!--<th><?php echo Lang::T('Created On');?>
</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'] != 'Active') {?>class="danger"<?php }?>>
                                                <td onclick="window.location.href = '<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
customers/view/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
'"
                                                    style="cursor: pointer;"><?php echo $_smarty_tpl->tpl_vars['ds']->value['fullname'];?>
</td>
                                                <td onclick="window.location.href = '<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
customers/view/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
'"
                                                    style="cursor:pointer;"><?php echo $_smarty_tpl->tpl_vars['ds']->value['username'];?>
</td>
                                                <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['account_type'];?>
</td>
                                                <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['address'];?>
</td>
                                                <td align="center" api-get-text="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
autoload/customer_is_active/<?php echo $_smarty_tpl->tpl_vars['d']->value['id'];?>
">
                                                    <span class="label label-default">&bull;</span>
                                                </td>
                                                <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['service_type'];?>
</td>
                                                <td>
                                                    <span class="label label-<?php if ($_smarty_tpl->tpl_vars['ds']->value['status'] == 'Active') {?>success<?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['status'] == 'Banned') {?>danger<?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['status'] == 'Disabled') {?>warning<?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['status'] == 'Suspended') {?>danger<?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['status'] == 'Limited') {?>warning<?php } else { ?>default<?php }?>">
                                                        <?php echo $_smarty_tpl->tpl_vars['ds']->value['status'];?>

                                                    </span>
                                                </td>
                                                <!--<td><?php echo Lang::dateTimeFormat($_smarty_tpl->tpl_vars['ds']->value['created_at']);?>
</td>-->
                                                <td align="center">
                                                    <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
customers/view/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
" id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
"
                                                        style="margin: 0px; color:black"
                                                        class="btn btn-success btn-xs">&nbsp;&nbsp;<?php echo Lang::T('View');?>
&nbsp;&nbsp;</a>
                                                    <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
customers/edit/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
" id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
"
                                                        style="margin: 0px; color:black"
                                                        class="btn btn-info btn-xs">&nbsp;&nbsp;<?php echo Lang::T('Edit');?>
&nbsp;&nbsp;</a>
                                                    <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
plan/recharge/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
" id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
" style="margin: 0px;color:black;"
                                                        class="btn btn-warning btn-xs"><?php echo Lang::T('Recharge');?>
</a>
                                                </td>
                                            </tr>
                                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <?php echo '<script'; ?>
 src="https://code.jquery.com/jquery-3.6.0.min.js"><?php echo '</script'; ?>
>
                <?php echo '<script'; ?>
 src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"><?php echo '</script'; ?>
>
                <?php echo '<script'; ?>
>
                    var $j = jQuery.noConflict();
                    $j(document).ready(function () {
                        $j('#customerTable').DataTable({
                            "pagingType": "full_numbers"
                        });
                    });
                <?php echo '</script'; ?>
>
            </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);
}
}
