<?php
/* Smarty version 4.5.3, created on 2026-03-17 20:57:58
  from '/var/www/html/admin/ui/ui_custom/admin/pppoe/list.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.3',
  'unifunc' => 'content_69b996265f3f73_48541686',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '58c410bc299ceec247f3d6c6c4aac6db1a23e58f' => 
    array (
      0 => '/var/www/html/admin/ui/ui_custom/admin/pppoe/list.tpl',
      1 => 1770489334,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:sections/header.tpl' => 1,
    'file:pagination.tpl' => 1,
    'file:sections/footer.tpl' => 1,
  ),
),false)) {
function content_69b996265f3f73_48541686 (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="row">
    <div class="col-sm-12">
        <div class="card border-0 shadow-sm mb-3">
            <div class="card-header bg-primary bg-gradient text-white">
                <div class="btn-group float-end">
                    <a class="btn btn-light btn-sm" title="save" href="<?php echo Text::url('');?>
services/sync/pppoe"
                        onclick="return ask(this, '<?php echo Lang::T('This will sync/send PPPOE plan to Mikrotik');?>
?')"><i
                            class="isax isax-refresh" aria-hidden="true"></i> sync</a>
                </div><?php echo Lang::T('PPPOE Package');?>

            </div>
            <form id="site-search" method="post" action="<?php echo Text::url('');?>
services/pppoe">
                <div class="card-body">
                    <div class="row g-2" style="padding: 5px">
                        <div class="col-lg-2">
                            <div class="input-group">
                                <button type="button" class="btn btn-danger" title="Clear Search Query"
                                    onclick="window.location.href='<?php echo Text::url('');?>
services/pppoe'"><i
                                        class="isax isax-close-circle"></i></button>
                                <input type="text" name="name" class="form-control"
                                    placeholder="<?php echo Lang::T('Search by Name');?>
...">
                            </div>
                        </div>
                        <div class="col-lg-1 col-xs-4">
                            <select class="form-select" id="type1" name="type1">
                                <option value=""><?php echo Lang::T('Prepaid');?>
 &amp; <?php echo Lang::T('Postpaid');?>
</option>
                                <option value="yes" <?php if ($_smarty_tpl->tpl_vars['type1']->value == 'yes') {?>selected<?php }?>><?php echo Lang::T('Prepaid');?>
</option>
                                <option value="no" <?php if ($_smarty_tpl->tpl_vars['type1']->value == 'no') {?>selected<?php }?>><?php echo Lang::T('Postpaid');?>
</option>
                            </select>
                        </div>
                        <div class="col-lg-1 col-xs-4">
                            <select class="form-select" id="type2" name="type2">
                                <option value=""><?php echo Lang::T('Type');?>
</option>
                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['type2s']->value, 't');
$_smarty_tpl->tpl_vars['t']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['t']->value) {
$_smarty_tpl->tpl_vars['t']->do_else = false;
?>
                                    <option value="<?php echo $_smarty_tpl->tpl_vars['t']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['type2']->value == $_smarty_tpl->tpl_vars['t']->value) {?>selected<?php }?>><?php echo Lang::T($_smarty_tpl->tpl_vars['t']->value);?>

                                    </option>
                                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                            </select>
                        </div>
                        <div class="col-lg-1 col-xs-4">
                            <select class="form-select" id="bandwidth" name="bandwidth">
                                <option value="">Bandwidth</option>
                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['bws']->value, 'b');
$_smarty_tpl->tpl_vars['b']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['b']->value) {
$_smarty_tpl->tpl_vars['b']->do_else = false;
?>
                                    <option value="<?php echo $_smarty_tpl->tpl_vars['b']->value['id'];?>
" <?php if ($_smarty_tpl->tpl_vars['bandwidth']->value == $_smarty_tpl->tpl_vars['b']->value['id']) {?>selected<?php }?>>
                                        <?php echo $_smarty_tpl->tpl_vars['b']->value['name_bw'];?>

                                    </option>
                                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                            </select>
                        </div>
                        <div class="col-lg-1 col-xs-4">
                            <select class="form-select" id="type3" name="type3">
                                <option value=""><?php echo Lang::T('Category');?>
</option>
                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['type3s']->value, 't');
$_smarty_tpl->tpl_vars['t']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['t']->value) {
$_smarty_tpl->tpl_vars['t']->do_else = false;
?>
                                    <option value="<?php echo $_smarty_tpl->tpl_vars['t']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['type3']->value == $_smarty_tpl->tpl_vars['t']->value) {?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['t']->value;?>

                                    </option>
                                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                            </select>
                        </div>
                        <div class="col-lg-1 col-xs-4">
                            <select class="form-select" id="valid" name="valid">
                                <option value=""><?php echo Lang::T('Validity');?>
</option>
                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['valids']->value, 'v');
$_smarty_tpl->tpl_vars['v']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->do_else = false;
?>
                                    <option value="<?php echo $_smarty_tpl->tpl_vars['v']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['valid']->value == $_smarty_tpl->tpl_vars['v']->value) {?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['v']->value;?>

                                    </option>
                                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                            </select>
                        </div>
                        <div class="col-lg-1 col-xs-4">
                            <select class="form-select" id="router" name="router">
                                <option value=""><?php echo Lang::T('Location');?>
</option>
                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['routers']->value, 'r');
$_smarty_tpl->tpl_vars['r']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['r']->value) {
$_smarty_tpl->tpl_vars['r']->do_else = false;
?>
                                    <option value="<?php echo $_smarty_tpl->tpl_vars['r']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['router']->value == $_smarty_tpl->tpl_vars['r']->value) {?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['r']->value;?>
</option>
                                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                                <option value="radius" <?php if ($_smarty_tpl->tpl_vars['router']->value == 'radius') {?>selected<?php }?>>Radius</option>
                            </select>
                        </div>
                        <div class="col-lg-1 col-xs-4">
                            <select class="form-select" id="device" name="device">
                                <option value=""><?php echo Lang::T('Device');?>
</option>
                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['devices']->value, 'r');
$_smarty_tpl->tpl_vars['r']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['r']->value) {
$_smarty_tpl->tpl_vars['r']->do_else = false;
?>
                                    <option value="<?php echo $_smarty_tpl->tpl_vars['r']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['device']->value == $_smarty_tpl->tpl_vars['r']->value) {?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['r']->value;?>
</option>
                                <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                            </select>
                        </div>
                        <div class="col-lg-1 col-xs-4">
                            <select class="form-select" id="status" name="status">
                                <option value="-"><?php echo Lang::T('Status');?>
</option>
                                <option value="1" <?php if ($_smarty_tpl->tpl_vars['status']->value == '1') {?>selected<?php }?>><?php echo Lang::T('Enabled');?>
</option>
                                <option value="0" <?php if ($_smarty_tpl->tpl_vars['status']->value == '0') {?>selected<?php }?>><?php echo Lang::T('Disable');?>
</option>
                            </select>
                        </div>
                        <div class="col-lg-1 col-xs-8">
                            <button class="btn btn-success w-100" type="submit"><span
                                    class="fa fa-search"></span></button>
                        </div>
                        <div class="col-lg-1 col-xs-4">
                            <a href="<?php echo Text::url('');?>
services/pppoe-add" class="btn btn-primary w-100"
                                title="<?php echo Lang::T('New Service Plan');?>
"><i class="isax isax-add-circle"></i></a>
                        </div>
                    </div>
                </div>
            </form>
            <div class="table-responsive">
                <div style="margin-left: 5px; margin-right: 5px;">
                    <table class="table table-hover table-bordered">
                        <thead>
                            <tr>
                                <th></th>
                                <th colspan="4" class="text-center"><?php echo Lang::T('Internet Plan');?>
</th>
                                <th></th>
                                <th colspan="2" class="text-center" style="background-color: rgb(243, 241, 172);">
                                    <?php echo Lang::T('Expired');?>
</th>
                                <th colspan="4"></th>
                            </tr>
                            <tr>
                                <th><?php echo Lang::T('Name');?>
</th>
                                <th><?php echo Lang::T('Type');?>
</th>
                                <th><a href="<?php echo Text::url('');?>
bandwidth/list"><?php echo Lang::T('Bandwidth');?>
</a></th>
                                <th><?php echo Lang::T('Price');?>
</th>
                                <th><?php echo Lang::T('Validity');?>
</th>
                                <th><a href="<?php echo Text::url('');?>
pool/list"><?php echo Lang::T('IP Pool');?>
</a></th>
                                <th style="background-color: rgb(243, 241, 172);"><?php echo Lang::T('Internet Plan');?>
</th>
                                <th style="background-color: rgb(243, 241, 172);"><?php echo Lang::T('Date');?>
</th>
                                <th><a href="<?php echo Text::url('');?>
routers/list"><?php echo Lang::T('Location');?>
</a></th>
                                <th><?php echo Lang::T('Device');?>
</th>
                                <th><?php echo Lang::T('Manage');?>
</th>
                                <th>ID</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['enabled'] != 1) {?>class="danger" title="disabled" <?php }?>>
                                    <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['name_plan'];?>
</td>
                                    <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['plan_type'];?>
 <?php if ($_smarty_tpl->tpl_vars['ds']->value['prepaid'] != 'yes') {?><b><?php echo Lang::T('Postpaid');?>
</b>
                                    <?php } else { ?>
                                        <?php echo Lang::T('Prepaid');?>

                                    <?php }?></td>
                                <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['name_bw'];?>
</td>
                                <td><?php echo Lang::moneyFormat($_smarty_tpl->tpl_vars['ds']->value['price']);
if (!empty($_smarty_tpl->tpl_vars['ds']->value['price_old'])) {?>
                                        <sup
                                            style="text-decoration: line-through; color: red"><?php echo Lang::moneyFormat($_smarty_tpl->tpl_vars['ds']->value['price_old']);?>
</sup>
                                    <?php }?>
                                </td>
                                <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['validity'];?>
 <?php echo $_smarty_tpl->tpl_vars['ds']->value['validity_unit'];?>
</td>
                                <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['pool'];?>
</td>
                                <td><?php if ($_smarty_tpl->tpl_vars['ds']->value['plan_expired']) {?><a
                                        href="<?php echo Text::url('');?>
services/pppoe-edit/<?php echo $_smarty_tpl->tpl_vars['ds']->value['plan_expired'];?>
"><?php echo Lang::T('Yes');?>
</a><?php } else {
echo Lang::T('No');?>

                                    <?php }?></td>
                                <td><?php if ($_smarty_tpl->tpl_vars['ds']->value['prepaid'] == 'no') {
echo $_smarty_tpl->tpl_vars['ds']->value['expired_date'];
}?></td>
                                <td>
                                    <?php if ($_smarty_tpl->tpl_vars['ds']->value['is_radius']) {?>
                                        <span class="badge bg-primary">RADIUS</span>
                                    <?php } else { ?>
                                        <?php if ($_smarty_tpl->tpl_vars['ds']->value['routers'] != '') {?>
                                            <a href="<?php echo Text::url('routers/edit/0&name=');
echo $_smarty_tpl->tpl_vars['ds']->value['routers'];?>
"><?php echo $_smarty_tpl->tpl_vars['ds']->value['routers'];?>
</a>
                                        <?php }?>
                                    <?php }?>
                                </td>
                                <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['device'];?>
</td>
                                <td>
                                    <a href="<?php echo Text::url('');?>
services/pppoe-edit/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
"
                                        class="btn btn-info btn-sm"><?php echo Lang::T('Edit');?>
</a>
                                    <a href="<?php echo Text::url('');?>
services/pppoe-delete/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
"
                                        onclick="return ask(this, '<?php echo Lang::T('Delete');?>
?')" id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
"
                                        class="btn btn-danger btn-sm"><i class="isax isax-trash"></i></a>
                                </td>
                                <td><?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
</td>
                            </tr>
                            <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="card-footer">
                <?php $_smarty_tpl->_subTemplateRender("file:pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>
                <div class="alert alert-info" role="alert">
                    <h4 class="alert-heading"><?php echo Lang::T('Create expired Internet Plan');?>
</h4>
                    <p><?php echo Lang::T('When customer expired, you can move it to Expired Internet Plan');?>
</p>
                </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);
}
}
