Upload files to "ui/compiled"
Signed-off-by: kevin <kevin@codelab.nestict.africa>
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-09-17 17:01:12
|
||||
from '/var/www/html/yatmack/ui/ui/pagination.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_68cabf28eac701_01549401',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'08e23caf2fce069c5839e43f97410f5ee0ccac0f' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/pagination.tpl',
|
||||
1 => 1718518494,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
),
|
||||
),false)) {
|
||||
function content_68cabf28eac701_01549401 (Smarty_Internal_Template $_smarty_tpl) {
|
||||
if ($_smarty_tpl->tpl_vars['paginator']->value) {?>
|
||||
<nav aria-label="Page navigation example" style="margin-top: 6px;">
|
||||
<ul class="pagination justify-content-end" style="border-radius: 6px;">
|
||||
<li style="background: #D7DAE3;" <?php if (empty($_smarty_tpl->tpl_vars['paginator']->value['prev'])) {?>class="disabled page-item" <?php }?>>
|
||||
<a class="page-link" href="<?php echo $_smarty_tpl->tpl_vars['paginator']->value['url'];
|
||||
echo $_smarty_tpl->tpl_vars['paginator']->value['prev'];?>
|
||||
" aria-label="Previous">
|
||||
<span aria-hidden="true"><?php echo Lang::T('Prev');?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['paginator']->value['pages'], 'page');
|
||||
$_smarty_tpl->tpl_vars['page']->do_else = true;
|
||||
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['page']->value) {
|
||||
$_smarty_tpl->tpl_vars['page']->do_else = false;
|
||||
?>
|
||||
<li class="page-item <?php if ($_smarty_tpl->tpl_vars['paginator']->value['page'] == $_smarty_tpl->tpl_vars['page']->value) {?>active<?php } elseif ($_smarty_tpl->tpl_vars['page']->value == '...') {?>disabled<?php }?>"><a class="page-link"
|
||||
href="<?php echo $_smarty_tpl->tpl_vars['paginator']->value['url'];
|
||||
echo $_smarty_tpl->tpl_vars['page']->value;?>
|
||||
"><?php echo $_smarty_tpl->tpl_vars['page']->value;?>
|
||||
</a></li>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
<li style="background: #D7DAE3;" <?php if ($_smarty_tpl->tpl_vars['paginator']->value['page'] >= $_smarty_tpl->tpl_vars['paginator']->value['count']) {?>class="disabled page-item" <?php }?>>
|
||||
<a class="page-link" href="<?php echo $_smarty_tpl->tpl_vars['paginator']->value['url'];
|
||||
echo $_smarty_tpl->tpl_vars['paginator']->value['next'];?>
|
||||
" aria-label="Next">
|
||||
<span aria-hidden="true"><?php echo Lang::T('Next');?>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,396 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-12-18 17:38:05
|
||||
from '/var/www/html/yatmack/ui/ui/routers.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_694411cd9a16a5_15764470',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'0a52be33c1eedc5833cca9edb209cb9489c25a1a' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/routers.tpl',
|
||||
1 => 1757848876,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:pagination.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_694411cd9a16a5_15764470 (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">
|
||||
<h3 class="card-title"><?php echo Lang::T('Routers');?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<form id="site-search" method="post" action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
routers/list/">
|
||||
<div class="input-group">
|
||||
<div class="input-group-text">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="name" class="form-control"
|
||||
placeholder="<?php echo Lang::T('Search by Name');?>
|
||||
...">
|
||||
<button class="btn btn-success input-group-btn" type="submit"><?php echo Lang::T('Search');?>
|
||||
</button>
|
||||
<!-- <div class="input-group-btn">
|
||||
</div> -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
routers/add" class="btn btn-primary btn-block"><i
|
||||
class="fa fa-add"> </i> <?php echo Lang::T('New Router');?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo Lang::T('Router Name');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('IP Address');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Status');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Uptime');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Free Memory');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('CPU Load');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Manage');?>
|
||||
</th>
|
||||
<th>ID</th>
|
||||
<th><?php echo Lang::T('Download');?>
|
||||
</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'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['ip_address'];?>
|
||||
</td>
|
||||
<td class="router-status" data-router-id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
"><span class="loading-spinner"></span><span class="loader">Loading...</span></td>
|
||||
<td class="router-uptime text-success" data-router-id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
"><span class="loading-spinner"></span><span class="loader">Loading...</span></td>
|
||||
<td class="router-used-memory text-warning" data-router-id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
"><span class="loading-spinner"></span><span class="loader">Loading...</span></td>
|
||||
<td class="router-cpu-load text-primary" data-router-id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
"><span class="loading-spinner"></span><span class="loader">Loading...</span></td>
|
||||
<td>
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
routers/edit/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
" class="btn btn-info btn-xs"><?php echo Lang::T('Edit');?>
|
||||
</a>
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
routers/delete/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
" id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
"
|
||||
onclick="return confirm('<?php echo Lang::T('Delete');?>
|
||||
?')"
|
||||
class="btn btn-danger btn-xs"><i class="fa fa-trash"></i></a>
|
||||
<button class="btn btn-warning btn-xs btn-reboot" data-router-id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
"><i class="fa fa-refresh"></i> <?php echo Lang::T('Reboot');?>
|
||||
</button>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
</td>
|
||||
<td>
|
||||
<form action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
routers/download" method="post" style="display:inline;">
|
||||
<input type="hidden" name="router_id" value="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
">
|
||||
<input type="hidden" name="router_name" value="<?php echo $_smarty_tpl->tpl_vars['ds']->value['name'];?>
|
||||
">
|
||||
<button type="submit" class="btn btn-success btn-xs">
|
||||
<i class="fa fa-download"></i> <?php echo Lang::T('Download');?>
|
||||
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php $_smarty_tpl->_subTemplateRender("file:pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
|
||||
?>
|
||||
</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);
|
||||
?>
|
||||
|
||||
<style>
|
||||
.loader {
|
||||
display: inline-block;
|
||||
animation: loading 1.5s infinite;
|
||||
margin: 0;
|
||||
color: #6c757d;
|
||||
font-style: italic;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.loading-spinner {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 2px solid #f3f3f3;
|
||||
border-top: 2px solid #007bff;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
margin-right: 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.status.timeout {
|
||||
background-color: #ffc107;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.status.error {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.text-warning {
|
||||
color: #ffc107 !important;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.loading-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.router-uptime {
|
||||
color: #28a745; /* Green for uptime */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.router-used-memory {
|
||||
color: #fd7e14; /* Orange for memory */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.router-cpu-load {
|
||||
color: #d63384; /* Pink for CPU load */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.router-status {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.router-status .status {
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.router-status .online {
|
||||
background-color: #28a745;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.router-status .offline {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
$(document).ready(function() {
|
||||
// Get all router IDs
|
||||
var routerIds = [];
|
||||
$('.router-uptime, .router-used-memory, .router-total-memory, .router-cpu-load, .router-status').each(function() {
|
||||
var routerId = $(this).data('router-id');
|
||||
if (routerId && routerIds.indexOf(routerId) === -1) {
|
||||
routerIds.push(routerId);
|
||||
}
|
||||
});
|
||||
|
||||
// Option 1: Load all router data in parallel with individual timeouts (current implementation)
|
||||
var loadPromises = routerIds.map(function(routerId) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
$.ajax({
|
||||
url: '<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
routers/get_resources',
|
||||
data: { router_id: routerId },
|
||||
dataType: 'json',
|
||||
timeout: 8000, // 8 second timeout per router
|
||||
success: function(resources) {
|
||||
var result = {};
|
||||
result.routerId = routerId;
|
||||
result.resources = resources;
|
||||
resolve(result);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
var errorType = status === 'timeout' ? 'timeout' : 'error';
|
||||
var result = {};
|
||||
result.routerId = routerId;
|
||||
result.error = errorType;
|
||||
result.resources = null;
|
||||
resolve(result);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Process all results when they complete
|
||||
Promise.all(loadPromises).then(function(results) {
|
||||
results.forEach(function(result) {
|
||||
var routerId = result.routerId;
|
||||
var resources = result.resources;
|
||||
var error = result.error;
|
||||
|
||||
// Find all elements for this router
|
||||
var row = $('[data-router-id="' + routerId + '"]').first().closest('tr');
|
||||
|
||||
if (error) {
|
||||
// Handle error state
|
||||
row.find('.router-uptime').html('<span class="text-warning">' + (error === 'timeout' ? 'Timeout' : 'Error') + '</span>');
|
||||
row.find('.router-used-memory').html('<span class="text-warning">' + (error === 'timeout' ? 'Timeout' : 'Error') + '</span>');
|
||||
row.find('.router-cpu-load').html('<span class="text-warning">' + (error === 'timeout' ? 'Timeout' : 'Error') + '</span>');
|
||||
row.find('.router-status').html('<span class="status offline">' + (error === 'timeout' ? 'Timeout' : 'Error') + '</span>');
|
||||
} else if (resources) {
|
||||
// Update all fields for this router
|
||||
row.find('.router-uptime').html(resources.uptime || 'N/A');
|
||||
row.find('.router-used-memory').html(resources.freeMemory || 'N/A');
|
||||
row.find('.router-cpu-load').html(resources.cpuLoad || 'N/A');
|
||||
|
||||
// Update router status
|
||||
var statusElement = row.find('.router-status');
|
||||
if (resources.status === 'Online') {
|
||||
statusElement.html('<span class="status online">Online</span>');
|
||||
} else {
|
||||
statusElement.html('<span class="status offline">Offline</span>');
|
||||
}
|
||||
} else {
|
||||
// No data available
|
||||
row.find('.router-uptime').html('N/A');
|
||||
row.find('.router-used-memory').html('N/A');
|
||||
row.find('.router-cpu-load').html('N/A');
|
||||
row.find('.router-status').html('<span class="status offline">Offline</span>');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Option 2: Alternative bulk loading approach (commented out - uncomment to use)
|
||||
/*
|
||||
$.ajax({
|
||||
url: '<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
routers/get_all_resources',
|
||||
dataType: 'json',
|
||||
timeout: 15000, // 15 second timeout for bulk request
|
||||
success: function(allResources) {
|
||||
Object.keys(allResources).forEach(function(routerId) {
|
||||
var resources = allResources[routerId];
|
||||
var row = $('[data-router-id="' + routerId + '"]').first().closest('tr');
|
||||
|
||||
if (resources) {
|
||||
row.find('.router-uptime').html(resources.uptime || 'N/A');
|
||||
row.find('.router-used-memory').html(resources.freeMemory || 'N/A');
|
||||
row.find('.router-cpu-load').html(resources.cpuLoad || 'N/A');
|
||||
|
||||
var statusElement = row.find('.router-status');
|
||||
if (resources.status === 'Online') {
|
||||
statusElement.html('<span class="status online">Online</span>');
|
||||
} else {
|
||||
statusElement.html('<span class="status offline">Offline</span>');
|
||||
}
|
||||
} else {
|
||||
row.find('.router-uptime').html('N/A');
|
||||
row.find('.router-used-memory').html('N/A');
|
||||
row.find('.router-cpu-load').html('N/A');
|
||||
row.find('.router-status').html('<span class="status offline">Offline</span>');
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Bulk loading failed:', error);
|
||||
// Fallback to individual loading
|
||||
$('.router-uptime, .router-used-memory, .router-cpu-load, .router-status').html('<span class="text-danger">Error</span>');
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
// Reboot router
|
||||
$('.btn-reboot').on('click', function() {
|
||||
var routerId = $(this).data('router-id');
|
||||
if (confirm('Are you sure you want to reboot this router?')) {
|
||||
$.ajax({
|
||||
url: '<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
routers/reboot',
|
||||
data: { router_id: routerId },
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
if (response.status === 'Rebooting') {
|
||||
alert(response.message);
|
||||
} else {
|
||||
alert('Error: ' + response.message);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
alert('Failed to send reboot command. Please try again.');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
<?php echo '</script'; ?>
|
||||
><?php }
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
<?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>
|
||||
</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">•</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"> <?php echo Lang::T('View');?>
|
||||
</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"> <?php echo Lang::T('Edit');?>
|
||||
</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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,569 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-12-18 16:19:43
|
||||
from '/var/www/html/yatmack/ui/ui/app-notifications.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_6943ff6fd5d153_35327245',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'1870870741ab42d31e133a8aee62a5607308152f' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/app-notifications.tpl',
|
||||
1 => 1758106956,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_6943ff6fd5d153_35327245 (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);
|
||||
?>
|
||||
|
||||
<!-- Test Notification Modal -->
|
||||
<div class="modal fade" id="testNotificationModal" tabindex="-1" role="dialog" aria-labelledby="testNotificationModalLabel">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="testNotificationModalLabel">Test Notification</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="testNotificationForm">
|
||||
<div class="form-group">
|
||||
<label for="testPhone">Phone Number</label>
|
||||
<input type="text" class="form-control" id="testPhone" placeholder="Enter phone number for testing" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="testCustomerName">Customer Name</label>
|
||||
<input type="text" class="form-control" id="testCustomerName" value="John Doe" placeholder="Customer name">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="testPackageName">Package Name</label>
|
||||
<input type="text" class="form-control" id="testPackageName" value="Premium 10Mbps" placeholder="Package name">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="testPrice">Package Price</label>
|
||||
<input type="text" class="form-control" id="testPrice" value="5000" placeholder="Package price">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="testNotificationType">Notification Type</label>
|
||||
<select class="form-control" id="testNotificationType">
|
||||
<option value="sms">SMS</option>
|
||||
<option value="wa">WhatsApp</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Preview Message:</label>
|
||||
<div id="messagePreview" class="alert alert-info" style="white-space: pre-wrap;"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-primary" onclick="sendTestNotification()">Send Test</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
let currentTestType = '';
|
||||
let currentPlanType = '';
|
||||
|
||||
function testNotification(type, planType) {
|
||||
currentTestType = type;
|
||||
currentPlanType = planType;
|
||||
|
||||
// Update modal title
|
||||
document.getElementById('testNotificationModalLabel').textContent =
|
||||
'Test ' + type.replace('_', ' ').toUpperCase() + ' - ' + planType.toUpperCase();
|
||||
|
||||
// Show modal
|
||||
$('#testNotificationModal').modal('show');
|
||||
|
||||
// Update preview
|
||||
updateMessagePreview();
|
||||
}
|
||||
|
||||
function updateMessagePreview() {
|
||||
const customerName = document.getElementById('testCustomerName').value || 'John Doe';
|
||||
const packageName = document.getElementById('testPackageName').value || 'Premium 10Mbps';
|
||||
const price = document.getElementById('testPrice').value || '5000';
|
||||
|
||||
// Get the template from the form
|
||||
let template = '';
|
||||
if (currentTestType === 'expired') {
|
||||
if (currentPlanType === 'hotspot') {
|
||||
template = document.getElementById('expired_hotspot').value;
|
||||
} else {
|
||||
template = document.getElementById('expired_pppoe').value;
|
||||
}
|
||||
} else if (currentTestType === 'reminder_7_day') {
|
||||
if (currentPlanType === 'hotspot') {
|
||||
template = document.getElementById('reminder_7_day_hotspot').value;
|
||||
} else {
|
||||
template = document.getElementById('reminder_7_day_pppoe').value;
|
||||
}
|
||||
}
|
||||
|
||||
// Replace variables
|
||||
let preview = template
|
||||
.replace(/\[\[name\]\]/g, customerName)
|
||||
.replace(/\[\[username\]\]/g, 'testuser')
|
||||
.replace(/\[\[package\]\]/g, packageName)
|
||||
.replace(/\[\[plan\]\]/g, packageName)
|
||||
.replace(/\[\[price\]\]/g, price)
|
||||
.replace(/\[\[plan_type\]\]/g, currentPlanType.toUpperCase())
|
||||
.replace(/\[\[service_portal\]\]/g, 'https://portal.example.com')
|
||||
.replace(/\[\[support_contact\]\]/g, 'support@example.com')
|
||||
.replace(/\[\[expired_date\]\]/g, new Date().toLocaleDateString())
|
||||
.replace(/\[\[bills\]\]/g, '');
|
||||
|
||||
document.getElementById('messagePreview').textContent = preview;
|
||||
}
|
||||
|
||||
function sendTestNotification() {
|
||||
const phone = document.getElementById('testPhone').value;
|
||||
const customerName = document.getElementById('testCustomerName').value;
|
||||
const packageName = document.getElementById('testPackageName').value;
|
||||
const price = document.getElementById('testPrice').value;
|
||||
const notificationType = document.getElementById('testNotificationType').value;
|
||||
|
||||
if (!phone) {
|
||||
alert('Please enter a phone number');
|
||||
return;
|
||||
}
|
||||
|
||||
// Show loading
|
||||
const sendBtn = document.querySelector('#testNotificationModal .btn-primary');
|
||||
const originalText = sendBtn.textContent;
|
||||
sendBtn.textContent = 'Sending...';
|
||||
sendBtn.disabled = true;
|
||||
|
||||
// Send test notification
|
||||
fetch('<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
settings/test-notification', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: new URLSearchParams({
|
||||
phone: phone,
|
||||
customer_name: customerName,
|
||||
package_name: packageName,
|
||||
price: price,
|
||||
notification_type: notificationType,
|
||||
test_type: currentTestType,
|
||||
plan_type: currentPlanType
|
||||
})
|
||||
})
|
||||
.then(response => response.text())
|
||||
.then(data => {
|
||||
alert('Test notification sent!\nResult: ' + data);
|
||||
$('#testNotificationModal').modal('hide');
|
||||
})
|
||||
.catch(error => {
|
||||
alert('Error sending test notification: ' + error);
|
||||
})
|
||||
.finally(() => {
|
||||
sendBtn.textContent = originalText;
|
||||
sendBtn.disabled = false;
|
||||
});
|
||||
}
|
||||
|
||||
// Update preview when form fields change
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const formFields = ['testCustomerName', 'testPackageName', 'testPrice'];
|
||||
formFields.forEach(fieldId => {
|
||||
const field = document.getElementById(fieldId);
|
||||
if (field) {
|
||||
field.addEventListener('input', updateMessagePreview);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function testCronJob() {
|
||||
const resultDiv = document.getElementById('cronTestResult');
|
||||
resultDiv.innerHTML = '<i class="fa fa-spinner fa-spin"></i> Testing cron job...';
|
||||
|
||||
fetch('<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
settings/test-cron', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
}
|
||||
})
|
||||
.then(response => response.text())
|
||||
.then(data => {
|
||||
resultDiv.innerHTML = '<div class="alert alert-info"><pre>' + data + '</pre></div>';
|
||||
})
|
||||
.catch(error => {
|
||||
resultDiv.innerHTML = '<div class="alert alert-danger">Error: ' + error + '</div>';
|
||||
});
|
||||
}
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
<div class="container-fluid">
|
||||
<form class="form-horizontal" method="post" role="form" action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
settings/notifications-post">
|
||||
<div class="row">
|
||||
<div class="col-xxl-6 col-xxl-12">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header"
|
||||
style="display: grid; align-content: center; justify-content: center;">
|
||||
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title"><?php echo Lang::T('Messages Settings');?>
|
||||
</h5>
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-primary" title="save" type="submit"><span
|
||||
class="flaticon-381-save"
|
||||
aria-hidden="true"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-header" style="background-color: #f8f9fa; margin: 0 0 20px 0;">
|
||||
<h6 class="card-title" style="margin: 0; color: #495057; font-weight: bold;">
|
||||
<i class="fa fa-exclamation-triangle"></i> <?php echo Lang::T('Expiration & Reminder Messages');?>
|
||||
|
||||
</h6>
|
||||
<div class="btn-group pull-right">
|
||||
<button type="button" class="btn btn-info btn-sm" onclick="testNotification('expired', 'hotspot')">
|
||||
<i class="fa fa-wifi"></i> Test Hotspot Expiry
|
||||
</button>
|
||||
<button type="button" class="btn btn-success btn-sm" onclick="testNotification('expired', 'pppoe')">
|
||||
<i class="fa fa-ethernet"></i> Test PPPoE Expiry
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning btn-sm" onclick="testNotification('reminder_7_day', 'hotspot')">
|
||||
<i class="fa fa-clock-o"></i> Test 7-Day Reminder
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Plan Type Specific Templates -->
|
||||
<div class="form-group">
|
||||
<label class="control-label"><?php echo Lang::T('Expired Notification Messages');?>
|
||||
</label>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label class="control-label text-primary"><i class="fa fa-wifi"></i> <?php echo Lang::T('Hotspot Users');?>
|
||||
</label>
|
||||
<textarea style="overflow: hidden;" class="form-control"
|
||||
id="expired_hotspot" oninput="autoExpand(this)" name="expired[hotspot]"
|
||||
placeholder="Hello [[name]], your Hotspot internet package [[package]] has been expired. Please visit our portal at [[service_portal]] to renew your connection."
|
||||
rows="6"><?php if ($_smarty_tpl->tpl_vars['_json']->value['expired']['hotspot'] != '') {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_json']->value['expired']['hotspot']);
|
||||
} else { ?>Hello [[name]], your Hotspot internet package [[package]] has been expired. Please visit our portal at [[service_portal]] to renew your connection.<?php }?></textarea>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="control-label text-success"><i class="fa fa-ethernet"></i> <?php echo Lang::T('PPPoE Users');?>
|
||||
</label>
|
||||
<textarea style="overflow: hidden;" class="form-control"
|
||||
id="expired_pppoe" oninput="autoExpand(this)" name="expired[pppoe]"
|
||||
placeholder="Hello [[name]], your PPPoE internet package [[package]] has been expired. Please contact our support team at [[support_contact]] for renewal assistance."
|
||||
rows="6"><?php if ($_smarty_tpl->tpl_vars['_json']->value['expired']['pppoe'] != '') {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_json']->value['expired']['pppoe']);
|
||||
} else { ?>Hello [[name]], your PPPoE internet package [[package]] has been expired. Please contact our support team at [[support_contact]] for renewal assistance.<?php }?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
function autoExpand(element) {
|
||||
element.style.height = 'auto';
|
||||
element.style.height = (element.scrollHeight) + 'px';
|
||||
}
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
<p class="help-block">
|
||||
<b>[[name]]</b> Customer Name | <b>[[username]]</b> Customer username | <b>[[package]]</b> Package name | <b>[[price]]</b> Package price | <b>[[plan_type]]</b> Service type (Hotspot/PPPoE) | <b>[[service_portal]]</b> Hotspot portal URL | <b>[[support_contact]]</b> Support contact | <b>[[expired_date]]</b> Expiration date | <b>[[bills]]</b> Additional bills
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label"><?php echo Lang::T('Reminder 7 Days Messages');?>
|
||||
</label>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label class="control-label text-primary"><i class="fa fa-wifi"></i> <?php echo Lang::T('Hotspot Users');?>
|
||||
</label>
|
||||
<textarea class="form-control" id="reminder_7_day_hotspot"
|
||||
name="reminder_7_day[hotspot]"
|
||||
rows="4"><?php if ($_smarty_tpl->tpl_vars['_json']->value['reminder_7_day']['hotspot'] != '') {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_json']->value['reminder_7_day']['hotspot']);
|
||||
} else { ?>Hello *[[name]]*, your Hotspot package *[[package]]* will expire in 7 days. Visit [[service_portal]] to renew and avoid service interruption.<?php }?></textarea>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="control-label text-success"><i class="fa fa-ethernet"></i> <?php echo Lang::T('PPPoE Users');?>
|
||||
</label>
|
||||
<textarea class="form-control" id="reminder_7_day_pppoe"
|
||||
name="reminder_7_day[pppoe]"
|
||||
rows="4"><?php if ($_smarty_tpl->tpl_vars['_json']->value['reminder_7_day']['pppoe'] != '') {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_json']->value['reminder_7_day']['pppoe']);
|
||||
} else { ?>Hello *[[name]]*, your PPPoE package *[[package]]* will expire in 7 days. Contact [[support_contact]] to renew your connection.<?php }?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<p class="help-block">
|
||||
<b>[[name]]</b> Customer Name | <b>[[username]]</b> Customer username | <b>[[package]]</b> Package name | <b>[[price]]</b> Package price | <b>[[expired_date]]</b> Expiration date | <b>[[service_portal]]</b> Hotspot portal URL | <b>[[support_contact]]</b> Support contact | <b>[[bills]]</b> Additional bills
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label"><?php echo Lang::T('Reminder 3 Days Messages');?>
|
||||
</label>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label class="control-label text-primary"><i class="fa fa-wifi"></i> <?php echo Lang::T('Hotspot Users');?>
|
||||
</label>
|
||||
<textarea class="form-control" id="reminder_3_day_hotspot"
|
||||
name="reminder_3_day[hotspot]"
|
||||
rows="3"><?php if ($_smarty_tpl->tpl_vars['_json']->value['reminder_3_day']['hotspot'] != '') {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_json']->value['reminder_3_day']['hotspot']);
|
||||
} else { ?>Hello *[[name]]*, your Hotspot package *[[package]]* will expire in 3 days. Renew now at [[service_portal]] to maintain uninterrupted service.<?php }?></textarea>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="control-label text-success"><i class="fa fa-ethernet"></i> <?php echo Lang::T('PPPoE Users');?>
|
||||
</label>
|
||||
<textarea class="form-control" id="reminder_3_day_pppoe"
|
||||
name="reminder_3_day[pppoe]"
|
||||
rows="3"><?php if ($_smarty_tpl->tpl_vars['_json']->value['reminder_3_day']['pppoe'] != '') {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_json']->value['reminder_3_day']['pppoe']);
|
||||
} else { ?>Hello *[[name]]*, your PPPoE package *[[package]]* will expire in 3 days. Contact [[support_contact]] immediately to renew.<?php }?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<p class="help-block">
|
||||
<b>[[name]]</b> Customer Name | <b>[[username]]</b> Customer username | <b>[[package]]</b> Package name | <b>[[price]]</b> Package price | <b>[[expired_date]]</b> Expiration date | <b>[[service_portal]]</b> Hotspot portal URL | <b>[[support_contact]]</b> Support contact | <b>[[bills]]</b> Additional bills
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label"><?php echo Lang::T('Reminder 1 Day Messages');?>
|
||||
</label>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label class="control-label text-primary"><i class="fa fa-wifi"></i> <?php echo Lang::T('Hotspot Users');?>
|
||||
</label>
|
||||
<textarea class="form-control" id="reminder_1_day_hotspot"
|
||||
name="reminder_1_day[hotspot]"
|
||||
rows="3"><?php if ($_smarty_tpl->tpl_vars['_json']->value['reminder_1_day']['hotspot'] != '') {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_json']->value['reminder_1_day']['hotspot']);
|
||||
} else { ?>Hello *[[name]]*, your Hotspot package *[[package]]* will expire tomorrow. Please renew at [[service_portal]] to avoid service disruption.<?php }?></textarea>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="control-label text-success"><i class="fa fa-ethernet"></i> <?php echo Lang::T('PPPoE Users');?>
|
||||
</label>
|
||||
<textarea class="form-control" id="reminder_1_day_pppoe"
|
||||
name="reminder_1_day[pppoe]"
|
||||
rows="3"><?php if ($_smarty_tpl->tpl_vars['_json']->value['reminder_1_day']['pppoe'] != '') {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_json']->value['reminder_1_day']['pppoe']);
|
||||
} else { ?>Hello *[[name]]*, your PPPoE package *[[package]]* will expire tomorrow. Contact [[support_contact]] urgently to renew.<?php }?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<p class="help-block">
|
||||
<b>[[name]]</b> Customer Name | <b>[[username]]</b> Customer username | <b>[[package]]</b> Package name | <b>[[price]]</b> Package price | <b>[[expired_date]]</b> Expiration date | <b>[[service_portal]]</b> Hotspot portal URL | <b>[[support_contact]]</b> Support contact | <b>[[bills]]</b> Additional bills
|
||||
</p>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<!-- Debug Information Section -->
|
||||
<div class="card-header" style="background-color: #fff3cd; margin: 20px 0 10px 0; border-left: 4px solid #ffc107;">
|
||||
<h6 class="card-title" style="margin: 0; color: #856404; font-weight: bold;">
|
||||
<i class="fa fa-bug"></i> Debug Information
|
||||
</h6>
|
||||
</div>
|
||||
<div class="alert alert-warning">
|
||||
<h6><i class="fa fa-info-circle"></i> Troubleshooting Expiry Messages</h6>
|
||||
<p>If expiry messages are not working, check the following:</p>
|
||||
<ul>
|
||||
<li><strong>Cron Job:</strong> Ensure cron jobs are running: <code>php system/cron.php</code></li>
|
||||
<li><strong>Notification Settings:</strong> Check that "Expired Notification" is enabled in App Settings</li>
|
||||
<li><strong>SMS/WhatsApp Configuration:</strong> Verify SMS/WhatsApp settings are properly configured</li>
|
||||
<li><strong>Phone Numbers:</strong> Ensure customers have valid phone numbers in their profiles</li>
|
||||
<li><strong>Plan Type Detection:</strong> Check that plans have correct 'type' field (Hotspot/PPPOE)</li>
|
||||
</ul>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<strong>Current Notification Settings:</strong><br>
|
||||
<small class="text-muted">
|
||||
Expired: <?php echo (($tmp = $_smarty_tpl->tpl_vars['_c']->value['user_notification_expired'] ?? null)===null||$tmp==='' ? 'Not Set' ?? null : $tmp);?>
|
||||
<br>
|
||||
Reminder: <?php echo (($tmp = $_smarty_tpl->tpl_vars['_c']->value['user_notification_reminder'] ?? null)===null||$tmp==='' ? 'Not Set' ?? null : $tmp);?>
|
||||
<br>
|
||||
SMS URL: <?php echo (($tmp = $_smarty_tpl->tpl_vars['_c']->value['sms_url'] ?? null)===null||$tmp==='' ? 'Not Set' ?? null : $tmp);?>
|
||||
<br>
|
||||
WhatsApp URL: <?php echo (($tmp = $_smarty_tpl->tpl_vars['_c']->value['wa_url'] ?? null)===null||$tmp==='' ? 'Not Set' ?? null : $tmp);?>
|
||||
|
||||
</small>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<strong>Test Cron Job:</strong><br>
|
||||
<button type="button" class="btn btn-warning btn-sm" onclick="testCronJob()">
|
||||
<i class="fa fa-play"></i> Test Cron Job
|
||||
</button>
|
||||
<div id="cronTestResult" class="mt-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-header" style="background-color: #f8f9fa; margin: 20px 0 10px 0;">
|
||||
<h6 class="card-title" style="margin: 0; color: #495057; font-weight: bold;">
|
||||
<i class="fa fa-credit-card"></i> <?php echo Lang::T('Payment & Invoice Messages');?>
|
||||
|
||||
</h6>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label"><?php echo Lang::T('Invoice Notification
|
||||
Payment');?>
|
||||
</label>
|
||||
<div class="">
|
||||
<textarea class="form-control" id="invoice_paid" name="invoice_paid"
|
||||
placeholder="Hello [[name]], your internet package [[package]] has been expired"
|
||||
rows="20"><?php echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_json']->value['invoice_paid']);?>
|
||||
</textarea>
|
||||
</div>
|
||||
<p class="help-block">
|
||||
<b>[[company_name]]</b> Your Company Name at Settings.
|
||||
<b>[[address]]</b> Your Company Address at Settings.
|
||||
<b>[[phone]]</b> Your Company Phone at Settings.
|
||||
<b>[[invoice]]</b> invoice number.
|
||||
<b>[[date]]</b> Date invoice created.
|
||||
<b>[[payment_gateway]]</b> Payment gateway user paid from.
|
||||
<b>[[payment_channel]]</b> Payment channel user paid from.
|
||||
<b>[[type]]</b> is Hotspot/PPPOE.
|
||||
<b>[[plan_name]]</b> Internet Package.
|
||||
<b>[[plan_price]]</b> Internet Package Prices.
|
||||
<b>[[name]]</b> Receiver name.
|
||||
<b>[[user_name]]</b> Username internet.
|
||||
<b>[[user_password]]</b> User password.
|
||||
<b>[[expired_date]]</b> Expired datetime.
|
||||
<b>[[footer]]</b> Invoice Footer.
|
||||
<b>[[note]]</b> For Notes by admin.
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label"><?php echo Lang::T('Balance Notification
|
||||
Payment');?>
|
||||
</label>
|
||||
<div class="">
|
||||
<textarea class="form-control" id="invoice_balance"
|
||||
name="invoice_balance"
|
||||
placeholder="Hello [[name]], your internet package [[package]] has been expired"
|
||||
rows="20"><?php echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_json']->value['invoice_balance']);?>
|
||||
</textarea>
|
||||
</div>
|
||||
<p class="help-block">
|
||||
<b>[[company_name]]</b> Your Company Name at Settings.
|
||||
<b>[[address]]</b> Your Company Address at Settings.
|
||||
<b>[[phone]]</b> Your Company Phone at Settings.
|
||||
<b>[[invoice]]</b> invoice number.
|
||||
<b>[[date]]</b> Date invoice created.
|
||||
<b>[[payment_gateway]]</b> Payment gateway user paid from.
|
||||
<b>[[payment_channel]]</b> Payment channel user paid from.
|
||||
<b>[[type]]</b> is Hotspot/PPPOE.
|
||||
<b>[[plan_name]]</b> Internet Package.
|
||||
<b>[[plan_price]]</b> Internet Package Prices.
|
||||
<b>[[name]]</b> Receiver name.
|
||||
<b>[[user_name]]</b> Username internet.
|
||||
<b>[[user_password]]</b> User password.
|
||||
<b>[[trx_date]]</b> Transaction datetime.
|
||||
<b>[[balance_before]]</b> Balance Before.
|
||||
<b>[[balance]]</b> Balance After.
|
||||
<b>[[footer]]</b> Invoice Footer.
|
||||
</p>
|
||||
</div>
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['enable_balance'] == 'yes') {?>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label"><?php echo Lang::T('Send Balance');?>
|
||||
</label>
|
||||
<div class="">
|
||||
<textarea class="form-control" id="balance_send"
|
||||
name="balance_send"
|
||||
rows="3"><?php if ($_smarty_tpl->tpl_vars['_json']->value['balance_send']) {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_json']->value['balance_send']);
|
||||
} else {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_default']->value['balance_send']);
|
||||
}?></textarea>
|
||||
</div>
|
||||
<p class="help-block">
|
||||
<b>[[name]]</b> Receiver name.
|
||||
<b>[[balance]]</b> how much balance have been send.
|
||||
<b>[[current_balance]]</b> Current Balance.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="control-label"><?php echo Lang::T('Received Balance');?>
|
||||
</label>
|
||||
<div class="">
|
||||
<textarea class="form-control" id="balance_received"
|
||||
name="balance_received"
|
||||
rows="3"><?php if ($_smarty_tpl->tpl_vars['_json']->value['balance_received']) {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_json']->value['balance_received']);
|
||||
} else {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_default']->value['balance_received']);
|
||||
}?></textarea>
|
||||
</div>
|
||||
<p class="help-block">
|
||||
<b>[[name]]</b> Sender name.
|
||||
<b>[[balance]]</b> how much balance have been received.
|
||||
<b>[[current_balance]]</b> Current Balance.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
<hr>
|
||||
<div class="card-header" style="background-color: #f8f9fa; margin: 20px 0 10px 0;">
|
||||
<h6 class="card-title" style="margin: 0; color: #495057; font-weight: bold;">
|
||||
<i class="fa fa-user-plus"></i> <?php echo Lang::T('Registration Messages');?>
|
||||
|
||||
</h6>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label"><?php echo Lang::T('User Registration
|
||||
Message');?>
|
||||
</label>
|
||||
<div class="">
|
||||
<textarea class="form-control" id="user_registration"
|
||||
name="user_registration"
|
||||
placeholder="Welcome to [[company_name]]! Your account has been created successfully."
|
||||
rows="8"><?php if ($_smarty_tpl->tpl_vars['_json']->value['user_registration']) {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_json']->value['user_registration']);
|
||||
} else {
|
||||
echo Lang::htmlspecialchars($_smarty_tpl->tpl_vars['_default']->value['user_registration']);
|
||||
}?></textarea>
|
||||
</div>
|
||||
<p class="help-block">
|
||||
<b>[[company_name]]</b> Your Company Name from Settings.
|
||||
<b>[[name]]</b> Customer's full name.
|
||||
<b>[[user_name]]</b> Customer's username.
|
||||
<b>[[username]]</b> Customer's username (alternative).
|
||||
<b>[[password]]</b> Customer's password.
|
||||
<b>[[service_type]]</b> Service type (Hotspot/PPPOE).
|
||||
<b>[[footer]]</b> Company footer message.
|
||||
</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<button class="btn btn-success btn-block" type="submit"><?php echo Lang::T('Save
|
||||
Changes');?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</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);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,358 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-09-17 20:25:49
|
||||
from '/var/www/html/yatmack/ui/ui/recharge.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_68caef1d3f6014_06229700',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'2bd39c1d1b89c07b30366b9c2bcf3a17bed31a9a' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/recharge.tpl',
|
||||
1 => 1757857798,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_68caef1d3f6014_06229700 (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 col-md-12">
|
||||
<div class="card card-primary card-hovered card-stacked mb30">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?php echo Lang::T('Recharge Account');?>
|
||||
</h3></div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" method="post" role="form" action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
plan/recharge-confirm">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Select Account');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select <?php if ($_smarty_tpl->tpl_vars['cust']->value) {
|
||||
} else { ?>id="personSelect"<?php }?> class="form-select select2" style="height: 52px; background-color: white;"
|
||||
name="id_customer" style="width: 100%" data-placeholder="<?php echo Lang::T('Select a customer');?>
|
||||
..." data-ajax="true">
|
||||
<?php if ($_smarty_tpl->tpl_vars['cust']->value) {?>
|
||||
<option value="<?php echo $_smarty_tpl->tpl_vars['cust']->value['id'];?>
|
||||
"><?php echo $_smarty_tpl->tpl_vars['cust']->value['username'];?>
|
||||
• <?php echo $_smarty_tpl->tpl_vars['cust']->value['fullname'];?>
|
||||
• <?php echo $_smarty_tpl->tpl_vars['cust']->value['email'];?>
|
||||
</option>
|
||||
<?php }?>
|
||||
</select>
|
||||
<span class="help-block" id="customer-help">
|
||||
<?php echo Lang::T('Start typing to search for customers');?>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Type');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<label><input type="radio" id="Hot" name="type" value="Hotspot"> <?php echo Lang::T('Hotspot Plans');?>
|
||||
</label>
|
||||
<label><input type="radio" id="POE" name="type" value="PPPOE"> <?php echo Lang::T('PPPOE Plans');?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Routers');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select id="server" data-type="server" name="server" class="form-control" style="height: 52px; background-color: white; cursor: pointer; z-index: 1000;">
|
||||
<option value=''><?php echo Lang::T('Select Routers');?>
|
||||
</option>
|
||||
</select>
|
||||
<span class="help-block" id="server-help">
|
||||
<?php echo Lang::T('Select service type first to load available routers');?>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Service Plan');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select id="plan" name="plan" class="form-control" style="height: 52px; background-color: white; cursor: pointer; z-index: 1000;">
|
||||
<option value=''><?php echo Lang::T('Select Plans');?>
|
||||
</option>
|
||||
</select>
|
||||
<span class="help-block" id="plan-help">
|
||||
<?php echo Lang::T('Select a router and type first to load available plans');?>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Using');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="using" class="form-control" style="height: 52px; background-color: white; cursor: pointer; z-index: 1000;">
|
||||
<option value="cash"><?php echo Lang::T('Cash');?>
|
||||
</option>
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['enable_balance'] == 'yes') {?>
|
||||
<option value="balance"><?php echo Lang::T('Customer Balance');?>
|
||||
</option>
|
||||
<?php }?>
|
||||
<option value="zero"><?php echo $_smarty_tpl->tpl_vars['_c']->value['currency_code'];?>
|
||||
0</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4">Postpaid Recharge for the first time use <?php echo $_smarty_tpl->tpl_vars['_c']->value['currency_code'];?>
|
||||
0</p>
|
||||
</div>
|
||||
<center>
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-success mb-3"
|
||||
type="submit"><?php echo Lang::T('Recharge');?>
|
||||
</button>
|
||||
Or <a class="btn btn-outline-primary href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
customers/list"><?php echo Lang::T('Cancel');?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</form>
|
||||
</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);
|
||||
?>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
$(document).ready(function() {
|
||||
console.log('Recharge form loaded');
|
||||
console.log('jQuery version:', $.fn.jquery);
|
||||
console.log('Select2 available:', typeof $.fn.select2);
|
||||
|
||||
// Initialize customer select2 with AJAX (if not pre-selected)
|
||||
if ($('#personSelect').length > 0) {
|
||||
console.log('Initializing customer select2 with AJAX');
|
||||
setTimeout(function() {
|
||||
try {
|
||||
// Destroy existing select2 if it exists
|
||||
if ($('#personSelect').hasClass('select2-hidden-accessible')) {
|
||||
$('#personSelect').select2('destroy');
|
||||
console.log('Destroyed existing customer select2');
|
||||
}
|
||||
|
||||
$('#personSelect').select2({
|
||||
theme: "bootstrap",
|
||||
width: '100%',
|
||||
ajax: {
|
||||
url: function(params) {
|
||||
var url = './index.php?_route=autoload/customer_select2';
|
||||
if(params.term != undefined){
|
||||
url += '&s=' + encodeURIComponent(params.term);
|
||||
}
|
||||
console.log('Customer AJAX URL:', url);
|
||||
return url;
|
||||
},
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
data: function (params) {
|
||||
return {
|
||||
s: params.term || '',
|
||||
page: params.page || 1
|
||||
};
|
||||
},
|
||||
processResults: function (data, params) {
|
||||
console.log('Customer AJAX response:', data);
|
||||
return {
|
||||
results: data.results || []
|
||||
};
|
||||
},
|
||||
cache: true,
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Customer AJAX error:', error);
|
||||
console.error('Response:', xhr.responseText);
|
||||
}
|
||||
},
|
||||
minimumInputLength: 0,
|
||||
placeholder: '<?php echo Lang::T('Select a customer');?>
|
||||
...',
|
||||
allowClear: true
|
||||
});
|
||||
|
||||
console.log('Customer select2 initialized with AJAX');
|
||||
} catch (error) {
|
||||
console.error('Error initializing customer select2:', error);
|
||||
}
|
||||
}, 200);
|
||||
|
||||
// Add customer dropdown event handlers
|
||||
$('#personSelect').on('select2:open', function() {
|
||||
console.log('Customer dropdown opened');
|
||||
});
|
||||
|
||||
$('#personSelect').on('select2:select', function(e) {
|
||||
console.log('Customer selected:', e.params.data);
|
||||
});
|
||||
}
|
||||
|
||||
// Load servers when type changes
|
||||
$('input[type=radio][name="type"]').change(function(){
|
||||
console.log('Type changed:', $('input[name="type"]:checked').val());
|
||||
$("#server").html('<option value=""><?php echo Lang::T('Select Routers');?>
|
||||
</option>');
|
||||
$("#plan").html('<option value=""><?php echo Lang::T('Select Plans');?>
|
||||
</option>');
|
||||
$("#server-help").text('Loading routers...');
|
||||
$("#plan-help").text('Select a router first to load available plans');
|
||||
|
||||
if ($('#Hot').is(':checked')) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "html",
|
||||
url: "index.php?_route=autoload/server",
|
||||
success: function(msg){
|
||||
console.log('Servers loaded successfully');
|
||||
console.log('Servers HTML:', msg);
|
||||
$("#server").html(msg);
|
||||
$("#server").prop('disabled', false);
|
||||
|
||||
// Update help text
|
||||
var serverCount = $("#server option").length - 1;
|
||||
if (serverCount > 0) {
|
||||
$("#server-help").text('Found ' + serverCount + ' router(s) available');
|
||||
} else {
|
||||
$("#server-help").text('No routers found. Please add routers first.');
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Error loading servers:', error);
|
||||
$("#server-help").text('Error loading routers. Please check console for details.');
|
||||
alert('Error loading servers. Please check console for details.');
|
||||
}
|
||||
});
|
||||
} else if ($('#POE').is(':checked')) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "html",
|
||||
url: "index.php?_route=autoload/server",
|
||||
success: function(msg){
|
||||
console.log('Servers loaded successfully');
|
||||
console.log('Servers HTML:', msg);
|
||||
$("#server").html(msg);
|
||||
$("#server").prop('disabled', false);
|
||||
|
||||
// Update help text
|
||||
var serverCount = $("#server option").length - 1;
|
||||
if (serverCount > 0) {
|
||||
$("#server-help").text('Found ' + serverCount + ' router(s) available');
|
||||
} else {
|
||||
$("#server-help").text('No routers found. Please add routers first.');
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Error loading servers:', error);
|
||||
$("#server-help").text('Error loading routers. Please check console for details.');
|
||||
alert('Error loading servers. Please check console for details.');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Load plans when server changes
|
||||
$("#server").change(function(){
|
||||
var server = $("#server").val();
|
||||
var jenis = $('input[name="type"]:checked').val();
|
||||
|
||||
console.log('Server changed:', server, 'Type:', jenis);
|
||||
|
||||
if (server && jenis) {
|
||||
$("#plan-help").text('Loading plans...');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "html",
|
||||
url: "index.php?_route=autoload/plan",
|
||||
data: "jenis=" + jenis + "&server=" + server,
|
||||
success: function(msg){
|
||||
console.log('Plans loaded successfully');
|
||||
console.log('Plans HTML:', msg);
|
||||
$("#plan").html(msg);
|
||||
|
||||
// Ensure the dropdown is enabled and clickable
|
||||
$("#plan").prop('disabled', false);
|
||||
$("#plan").removeClass('disabled');
|
||||
|
||||
// Update help text
|
||||
var planCount = $("#plan option").length - 1;
|
||||
if (planCount > 0) {
|
||||
$("#plan-help").text('Found ' + planCount + ' plan(s) available');
|
||||
} else {
|
||||
$("#plan-help").text('No plans found for this router and type. Please create plans first.');
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Error loading plans:', error);
|
||||
$("#plan-help").text('Error loading plans. Please check console for details.');
|
||||
alert('Error loading plans. Please check console for details.');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$("#plan").html('<option value=""><?php echo Lang::T('Select Plans');?>
|
||||
</option>');
|
||||
$("#plan-help").text('Select a router and type first to load available plans');
|
||||
}
|
||||
});
|
||||
|
||||
// Add click handlers for debugging
|
||||
$("#server").click(function(){
|
||||
console.log('Server dropdown clicked');
|
||||
console.log('Server dropdown disabled:', $(this).prop('disabled'));
|
||||
console.log('Server dropdown options:', $(this).find('option').length);
|
||||
});
|
||||
|
||||
$("#plan").click(function(){
|
||||
console.log('Plan dropdown clicked');
|
||||
console.log('Plan dropdown disabled:', $(this).prop('disabled'));
|
||||
console.log('Plan dropdown options:', $(this).find('option').length);
|
||||
});
|
||||
|
||||
// Test AJAX endpoints directly
|
||||
$.ajax({
|
||||
url: './index.php?_route=autoload/customer_select2',
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
console.log('Customer AJAX test successful:', data);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Customer AJAX test failed:', error);
|
||||
console.error('Response:', xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: './index.php?_route=autoload/server',
|
||||
type: 'POST',
|
||||
dataType: 'html',
|
||||
success: function(data) {
|
||||
console.log('Server AJAX test successful:', data);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error('Server AJAX test failed:', error);
|
||||
console.error('Response:', xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
<?php echo '</script'; ?>
|
||||
><?php }
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-12-18 17:42:52
|
||||
from '/var/www/html/yatmack/ui/ui/reports-daily.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_694412ecd69446_01836618',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'3ffbb199ca29f9ed96652982b9a8a60361213887' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/reports-daily.tpl',
|
||||
1 => 1713580752,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:pagination.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_694412ecd69446_01836618 (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="card">
|
||||
<div class="col-md-12">
|
||||
<div class="invoice-wrap">
|
||||
<div class="card-header clearfix invoice-head">
|
||||
<h3 class="brand-logo text-uppercase text-bold left mt15">
|
||||
<span class="text"><?php echo Lang::T('Daily Reports');?>
|
||||
</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="clearfix invoice-subhead mb20">
|
||||
<div class="group clearfix left">
|
||||
<p class="text-bold mb5"><?php echo Lang::T('All Transactions at Date');?>
|
||||
:</p>
|
||||
<p class="small"><?php echo date($_smarty_tpl->tpl_vars['_c']->value['date_format'],strtotime($_smarty_tpl->tpl_vars['mdate']->value));?>
|
||||
<?php echo $_smarty_tpl->tpl_vars['mtime']->value;?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="group clearfix right">
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
export/print-by-date" class="btn btn-default" target="_blank"><i
|
||||
class="ion ion-printer"></i><?php echo Lang::T('Export for Print');?>
|
||||
</a>
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
export/pdf-by-date" class="btn btn-default"><i
|
||||
class="fa fa-file-pdf-o"></i><?php echo Lang::T('Export to PDF');?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo Lang::T('Username');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Type');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Plan Name');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Plan Price');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Created On');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Expires On');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Method');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Routers');?>
|
||||
</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>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['username'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['type'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['plan_name'];?>
|
||||
</td>
|
||||
<td class="text-right"><?php echo Lang::moneyFormat($_smarty_tpl->tpl_vars['ds']->value['price']);?>
|
||||
</td>
|
||||
<td><?php echo Lang::dateAndTimeFormat($_smarty_tpl->tpl_vars['ds']->value['recharged_on'],$_smarty_tpl->tpl_vars['ds']->value['recharged_time']);?>
|
||||
</td>
|
||||
<td><?php echo Lang::dateAndTimeFormat($_smarty_tpl->tpl_vars['ds']->value['expiration'],$_smarty_tpl->tpl_vars['ds']->value['time']);?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['method'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['routers'];?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?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="clearfix text-right total-sum mb10">
|
||||
<h4 class="text-uppercase text-bold"><?php echo Lang::T('Total Income');?>
|
||||
:</h4>
|
||||
<h3 class="sum"><?php echo Lang::moneyFormat($_smarty_tpl->tpl_vars['dr']->value);?>
|
||||
</h3>
|
||||
</div>
|
||||
<p class="text-center small text-info"><?php echo Lang::T('All Transactions at Date');?>
|
||||
:
|
||||
<?php echo date($_smarty_tpl->tpl_vars['_c']->value['date_format'],strtotime($_smarty_tpl->tpl_vars['mdate']->value));?>
|
||||
<?php echo $_smarty_tpl->tpl_vars['mtime']->value;?>
|
||||
</p>
|
||||
</div>
|
||||
</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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-12-18 17:05:29
|
||||
from '/var/www/html/yatmack/ui/ui/hotspot.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_69440a290aa457_82730110',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'4fc9d1aacd9b9e29cc2e209df58e39240ebb4c99' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/hotspot.tpl',
|
||||
1 => 1713579334,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:pagination.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_69440a290aa457_82730110 (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 echo Lang::T('Hotspot Plans');?>
|
||||
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-xs" title="save" href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
services/sync/hotspot"
|
||||
onclick="return confirm('This will sync/send hotspot plan to Mikrotik?')"><span
|
||||
class="fa fa-refresh" aria-hidden="true"></span> sync</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center row" style="padding: 15px">
|
||||
<div class="col-md-8">
|
||||
<form id="site-search" method="post" action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
services/hotspot/">
|
||||
<div class="input-group">
|
||||
<div class="input-group-text" id="basic-addon1">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="name" class="form-control"
|
||||
placeholder="<?php echo Lang::T('Search by Name');?>
|
||||
...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" id="button-addon2" style="height: 52px;" type="submit"><?php echo Lang::T('Search');?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
services/add" class="btn btn-primary btn-block"><i class="fa fa-plus">
|
||||
</i> <?php echo Lang::T('New Service Plan');?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo Lang::T('Plan Name');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Plan Type');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Bandwidth Plans');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Plan Category');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Plan Price');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Time Limit');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Data Limit');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Plan Validity');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Routers');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Expired IP Pool');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('ID');?>
|
||||
</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['enabled'] != 1) {?>class="danger" title="disabled" <?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['prepaid'] != 'yes') {?>class="warning" title="Postpaid" <?php }?>>
|
||||
<td class="headcol"><?php echo $_smarty_tpl->tpl_vars['ds']->value['name_plan'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['plan_type'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['name_bw'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['typebp'];?>
|
||||
</td>
|
||||
<td><?php echo Lang::moneyFormat($_smarty_tpl->tpl_vars['ds']->value['price']);?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['time_limit'];?>
|
||||
<?php echo $_smarty_tpl->tpl_vars['ds']->value['time_unit'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['data_limit'];?>
|
||||
<?php echo $_smarty_tpl->tpl_vars['ds']->value['data_unit'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['validity'];?>
|
||||
<?php echo $_smarty_tpl->tpl_vars['ds']->value['validity_unit'];?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($_smarty_tpl->tpl_vars['ds']->value['is_radius']) {?>
|
||||
<span class="label label-primary">RADIUS</span>
|
||||
<?php } else { ?>
|
||||
<?php if ($_smarty_tpl->tpl_vars['ds']->value['routers'] != '') {?>
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
routers/edit/0&name=<?php 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['pool_expired'];
|
||||
if ($_smarty_tpl->tpl_vars['ds']->value['list_expired']) {
|
||||
if ($_smarty_tpl->tpl_vars['ds']->value['pool_expired']) {?> |
|
||||
<?php }
|
||||
echo $_smarty_tpl->tpl_vars['ds']->value['list_expired'];
|
||||
}?></td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
services/edit/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
"
|
||||
class="btn btn-info btn-xs"><?php echo Lang::T('Edit');?>
|
||||
</a>
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
services/delete/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
" id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
"
|
||||
onclick="return confirm('<?php echo Lang::T('Delete');?>
|
||||
?')"
|
||||
class="btn btn-danger btn-xs"><i class="fa fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php $_smarty_tpl->_subTemplateRender("file:pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
|
||||
?>
|
||||
</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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-09-17 17:01:12
|
||||
from '/var/www/html/yatmack/ui/ui/sections/footer.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_68cabf28ebeef0_47697393',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'562328f41f658b67c29feebb3eacc9482a3384a0' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/sections/footer.tpl',
|
||||
1 => 1757933545,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
),
|
||||
),false)) {
|
||||
function content_68cabf28ebeef0_47697393 (Smarty_Internal_Template $_smarty_tpl) {
|
||||
?> </div>
|
||||
</div>
|
||||
<!--**********************************
|
||||
Content body end
|
||||
***********************************-->
|
||||
|
||||
<!--**********************************
|
||||
Footer start
|
||||
***********************************-->
|
||||
<div class="footer">
|
||||
<div class="copyright">
|
||||
<p>Designed & Developed with <span class="heart"></span> by <a href="https://www.nestict.africa/" target="_blank" rel="noopener noreferrer">NESTICT</a>
|
||||
© <span id="year"></span></p>
|
||||
</div>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
document.getElementById('year').textContent = new Date().getFullYear();
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!--**********************************
|
||||
Footer end
|
||||
***********************************-->
|
||||
</div>
|
||||
<!--**********************************
|
||||
Scripts
|
||||
***********************************-->
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/scripts/jquery.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/assets/vendor/global/global.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/scripts/bootstrap.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/assets/vendor/bootstrap-select/dist/js/bootstrap-select.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/assets/vendor/chart.js/Chart.bundle.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<!-- Chart piety plugin files -->
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/assets/vendor/peity/jquery.peity.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<!-- Apex Chart -->
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/assets/vendor/apexchart/apexchart.js?v=<?php echo '<?php'; ?>
|
||||
echo time(); <?php echo '?>'; ?>
|
||||
"><?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<!-- Dashboard 1 -->
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/assets/js/dashboard/dashboard-1.js?v=<?php echo '<?php'; ?>
|
||||
echo time(); <?php echo '?>'; ?>
|
||||
"><?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/assets/js/custom.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/assets/js/deznav-init.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/assets/js/demo.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<!--<?php echo '<script'; ?>
|
||||
src="ui/ui/assets/js/styleSwitcher.js"><?php echo '</script'; ?>
|
||||
> -->
|
||||
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/scripts/plugins/select2.full.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/scripts/pace.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
src="ui/ui/scripts/custom.js"><?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
|
||||
|
||||
<?php if ((isset($_smarty_tpl->tpl_vars['xfooter']->value))) {?>
|
||||
<?php echo $_smarty_tpl->tpl_vars['xfooter']->value;?>
|
||||
|
||||
<?php }?>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
$(document).ready(function() {
|
||||
// Select2 initialization (exclude AJAX elements)
|
||||
$('.select2:not([data-ajax])').select2({
|
||||
width: '100%',
|
||||
theme: 'bootstrap',
|
||||
containerCssClass: 'form-select'
|
||||
});
|
||||
$('.select2tag').select2({
|
||||
width: '100%',
|
||||
theme: 'bootstrap',
|
||||
tags: true,
|
||||
containerCssClass: 'form-select'
|
||||
});
|
||||
|
||||
// Button click event listeners
|
||||
var listAtts = document.querySelectorAll(`button[type="submit"]`);
|
||||
listAtts.forEach(function(el) {
|
||||
if (el.addEventListener) {
|
||||
el.addEventListener("click", function() {
|
||||
$(this).html(`<span class="loading"></span>`);
|
||||
}, false);
|
||||
} else {
|
||||
if (el.attachEvent) {
|
||||
el.attachEvent("click", function() {
|
||||
$(this).html(`<span class="loading"></span>`);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var listAtts = document.querySelectorAll(`[api-get-text]`);
|
||||
listAtts.forEach(function(el) {
|
||||
$.get(el.getAttribute('api-get-text'), function(data) {
|
||||
el.innerHTML = data;
|
||||
});
|
||||
});
|
||||
|
||||
function setCookie(name, value, days) {
|
||||
var expires = "";
|
||||
if (days) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
||||
expires = "; expires=" + date.toUTCString();
|
||||
}
|
||||
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
||||
}
|
||||
|
||||
function getCookie(name) {
|
||||
var nameEQ = name + "=";
|
||||
var ca = document.cookie.split(';');
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
||||
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}); // Close the $(document).ready(function() {
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
</body>
|
||||
|
||||
</html><?php }
|
||||
}
|
||||
@@ -0,0 +1,268 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-09-18 01:02:48
|
||||
from '/var/www/html/yatmack/ui/ui/logs-cron.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_68cb3008aa5af8_93939828',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'627ce4cb5b6e955190e2871363306142c8d43846' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/logs-cron.tpl',
|
||||
1 => 1758108485,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:pagination.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_68cb3008aa5af8_93939828 (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-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">
|
||||
<i class="fa fa-clock-o"></i> <?php echo Lang::T('Cron Job Logs');?>
|
||||
|
||||
</h5>
|
||||
<div class="btn-group pull-right">
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
logs/cron" class="btn btn-primary btn-sm">
|
||||
<i class="fa fa-refresh"></i> Refresh
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<!-- Statistics Overview -->
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-3">
|
||||
<div class="card bg-primary text-white">
|
||||
<div class="card-body">
|
||||
<h4><?php echo $_smarty_tpl->tpl_vars['stats']->value['total_runs'];?>
|
||||
</h4>
|
||||
<p>Total Runs (7 days)</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="card bg-success text-white">
|
||||
<div class="card-body">
|
||||
<h4><?php echo $_smarty_tpl->tpl_vars['stats']->value['successful_runs'];?>
|
||||
</h4>
|
||||
<p>Successful Runs</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="card bg-danger text-white">
|
||||
<div class="card-body">
|
||||
<h4><?php echo $_smarty_tpl->tpl_vars['stats']->value['failed_runs'];?>
|
||||
</h4>
|
||||
<p>Failed Runs</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="card bg-info text-white">
|
||||
<div class="card-body">
|
||||
<h4><?php echo $_smarty_tpl->tpl_vars['stats']->value['avg_execution_time'];?>
|
||||
s</h4>
|
||||
<p>Avg Execution Time</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Last Run Information -->
|
||||
<div class="alert alert-info">
|
||||
<h6><i class="fa fa-info-circle"></i> Last Run Information</h6>
|
||||
<p><strong>Last Run:</strong> <?php if ($_smarty_tpl->tpl_vars['stats']->value['last_run']) {
|
||||
echo $_smarty_tpl->tpl_vars['stats']->value['last_run'];
|
||||
} else { ?>Never<?php }?></p>
|
||||
<p><strong>Last Success:</strong> <?php if ($_smarty_tpl->tpl_vars['stats']->value['last_success']) {
|
||||
echo $_smarty_tpl->tpl_vars['stats']->value['last_success'];
|
||||
} else { ?>Never<?php }?></p>
|
||||
<p><strong>Last Failure:</strong> <?php if ($_smarty_tpl->tpl_vars['stats']->value['last_failure']) {
|
||||
echo $_smarty_tpl->tpl_vars['stats']->value['last_failure'];
|
||||
} else { ?>Never<?php }?></p>
|
||||
</div>
|
||||
|
||||
<!-- Filters -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-12">
|
||||
<form method="post" action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
logs/cron" class="form-inline">
|
||||
<div class="form-group mr-2">
|
||||
<input type="text" name="q" class="form-control" placeholder="Search error messages..." value="<?php echo $_smarty_tpl->tpl_vars['q']->value;?>
|
||||
">
|
||||
</div>
|
||||
<div class="form-group mr-2">
|
||||
<select name="cron_type" class="form-control">
|
||||
<option value="">All Types</option>
|
||||
<option value="main" <?php if ($_smarty_tpl->tpl_vars['cron_type']->value == 'main') {?>selected<?php }?>>Main Cron</option>
|
||||
<option value="reminder" <?php if ($_smarty_tpl->tpl_vars['cron_type']->value == 'reminder') {?>selected<?php }?>>Reminder Cron</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mr-2">
|
||||
<select name="status" class="form-control">
|
||||
<option value="">All Status</option>
|
||||
<option value="completed" <?php if ($_smarty_tpl->tpl_vars['status']->value == 'completed') {?>selected<?php }?>>Completed</option>
|
||||
<option value="failed" <?php if ($_smarty_tpl->tpl_vars['status']->value == 'failed') {?>selected<?php }?>>Failed</option>
|
||||
<option value="running" <?php if ($_smarty_tpl->tpl_vars['status']->value == 'running') {?>selected<?php }?>>Running</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fa fa-search"></i> Filter
|
||||
</button>
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
logs/cron" class="btn btn-default">
|
||||
<i class="fa fa-times"></i> Clear
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Logs Table -->
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Type</th>
|
||||
<th>Started</th>
|
||||
<th>Finished</th>
|
||||
<th>Status</th>
|
||||
<th>Duration</th>
|
||||
<th>Expired Users</th>
|
||||
<th>Notifications</th>
|
||||
<th>Auto Renewals</th>
|
||||
<th>Memory</th>
|
||||
<th>Error</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['d']->value, 'log');
|
||||
$_smarty_tpl->tpl_vars['log']->do_else = true;
|
||||
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['log']->value) {
|
||||
$_smarty_tpl->tpl_vars['log']->do_else = false;
|
||||
?>
|
||||
<tr class="<?php if ($_smarty_tpl->tpl_vars['log']->value['status'] == 'completed') {?>success<?php } elseif ($_smarty_tpl->tpl_vars['log']->value['status'] == 'failed') {?>danger<?php } else { ?>warning<?php }?>">
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['log']->value['id'];?>
|
||||
</td>
|
||||
<td>
|
||||
<span class="label label-<?php if ($_smarty_tpl->tpl_vars['log']->value['cron_type'] == 'main') {?>primary<?php } else { ?>info<?php }?>">
|
||||
<?php echo mb_strtoupper((string) $_smarty_tpl->tpl_vars['log']->value['cron_type'] ?? '', 'UTF-8');?>
|
||||
|
||||
</span>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['log']->value['started_at'];?>
|
||||
</td>
|
||||
<td><?php if ($_smarty_tpl->tpl_vars['log']->value['finished_at']) {
|
||||
echo $_smarty_tpl->tpl_vars['log']->value['finished_at'];
|
||||
} else { ?>-<?php }?></td>
|
||||
<td>
|
||||
<span class="label label-<?php if ($_smarty_tpl->tpl_vars['log']->value['status'] == 'completed') {?>success<?php } elseif ($_smarty_tpl->tpl_vars['log']->value['status'] == 'failed') {?>danger<?php } else { ?>warning<?php }?>">
|
||||
<?php echo mb_strtoupper((string) $_smarty_tpl->tpl_vars['log']->value['status'] ?? '', 'UTF-8');?>
|
||||
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($_smarty_tpl->tpl_vars['log']->value['execution_time']) {?>
|
||||
<?php echo $_smarty_tpl->tpl_vars['log']->value['execution_time'];?>
|
||||
s
|
||||
<?php } else { ?>
|
||||
-
|
||||
<?php }?>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge badge-info"><?php echo $_smarty_tpl->tpl_vars['log']->value['expired_users_processed'];?>
|
||||
</span>
|
||||
<?php if ($_smarty_tpl->tpl_vars['log']->value['expired_users_found'] != $_smarty_tpl->tpl_vars['log']->value['expired_users_processed']) {?>
|
||||
<small class="text-muted">(<?php echo $_smarty_tpl->tpl_vars['log']->value['expired_users_found'];?>
|
||||
found)</small>
|
||||
<?php }?>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge badge-success"><?php echo $_smarty_tpl->tpl_vars['log']->value['notifications_sent'];?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($_smarty_tpl->tpl_vars['log']->value['auto_renewals_attempted'] > 0) {?>
|
||||
<span class="badge badge-warning"><?php echo $_smarty_tpl->tpl_vars['log']->value['auto_renewals_successful'];?>
|
||||
/<?php echo $_smarty_tpl->tpl_vars['log']->value['auto_renewals_attempted'];?>
|
||||
</span>
|
||||
<?php } else { ?>
|
||||
-
|
||||
<?php }?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($_smarty_tpl->tpl_vars['log']->value['memory_usage']) {?>
|
||||
<?php echo $_smarty_tpl->tpl_vars['log']->value['memory_usage'];?>
|
||||
|
||||
<?php } else { ?>
|
||||
-
|
||||
<?php }?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($_smarty_tpl->tpl_vars['log']->value['error_message']) {?>
|
||||
<span class="text-danger" title="<?php echo $_smarty_tpl->tpl_vars['log']->value['error_message'];?>
|
||||
">
|
||||
<i class="fa fa-exclamation-triangle"></i>
|
||||
</span>
|
||||
<?php } else { ?>
|
||||
-
|
||||
<?php }?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($_smarty_tpl->tpl_vars['log']->do_else) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="11" class="text-center text-muted">
|
||||
<i class="fa fa-info-circle"></i> No cron logs found
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Pagination -->
|
||||
<?php $_smarty_tpl->_subTemplateRender("file:pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
|
||||
?>
|
||||
|
||||
<!-- Legend -->
|
||||
<div class="mt-3">
|
||||
<h6>Legend:</h6>
|
||||
<ul class="list-inline">
|
||||
<li><span class="label label-success">COMPLETED</span> - Cron job finished successfully</li>
|
||||
<li><span class="label label-danger">FAILED</span> - Cron job encountered an error</li>
|
||||
<li><span class="label label-warning">RUNNING</span> - Cron job is currently running</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-09-17 20:26:01
|
||||
from '/var/www/html/yatmack/ui/ui/recharge-confirm.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_68caef291f3fb5_43059686',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'637a99453ac765d6df88517e7643179436d4c833' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/recharge-confirm.tpl',
|
||||
1 => 1719138102,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_68caef291f3fb5_43059686 (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-md-6 col-md-offset-3">
|
||||
<div class="card card-primary card-hovered card-stacked mb30">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?php echo Lang::T('Confirm');?>
|
||||
</h3></div>
|
||||
<div class="card-body">
|
||||
<center><b><?php echo Lang::T('Customer');?>
|
||||
</b></center>
|
||||
<ul class="list-group list-group-unbordered">
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Username');?>
|
||||
</b> <span class="pull-right"><?php echo $_smarty_tpl->tpl_vars['cust']->value['username'];?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Name');?>
|
||||
</b> <span class="pull-right"><?php echo $_smarty_tpl->tpl_vars['cust']->value['fullname'];?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Phone Number');?>
|
||||
</b> <span class="pull-right"><?php echo $_smarty_tpl->tpl_vars['cust']->value['phonenumber'];?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Email');?>
|
||||
</b> <span class="pull-right"><?php echo $_smarty_tpl->tpl_vars['cust']->value['email'];?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Address');?>
|
||||
</b> <span class="pull-right"><?php echo $_smarty_tpl->tpl_vars['cust']->value['address'];?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Balance');?>
|
||||
</b> <span
|
||||
class="pull-right"><?php echo Lang::moneyFormat($_smarty_tpl->tpl_vars['cust']->value['balance']);?>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<center><b><?php echo Lang::T('Plan');?>
|
||||
</b></center>
|
||||
<ul class="list-group list-group-unbordered">
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Plan Name');?>
|
||||
</b> <span class="pull-right"><?php echo $_smarty_tpl->tpl_vars['plan']->value['name_plan'];?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Location');?>
|
||||
</b> <span
|
||||
class="pull-right"><?php if ($_smarty_tpl->tpl_vars['plan']->value['is_radius']) {?>Radius<?php } else {
|
||||
echo $_smarty_tpl->tpl_vars['plan']->value['routers'];
|
||||
}?></span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Type');?>
|
||||
</b> <span
|
||||
class="pull-right"><?php if ($_smarty_tpl->tpl_vars['plan']->value['prepaid'] == 'yes') {?>Prepaid<?php } else { ?>Postpaid<?php }?>
|
||||
<?php echo $_smarty_tpl->tpl_vars['plan']->value['type'];?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Plan Price');?>
|
||||
</b> <span
|
||||
class="pull-right"><?php if ($_smarty_tpl->tpl_vars['using']->value == 'zero') {
|
||||
echo Lang::moneyFormat(0);
|
||||
} else {
|
||||
echo Lang::moneyFormat($_smarty_tpl->tpl_vars['plan']->value['price']);
|
||||
}?></span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Plan Validity');?>
|
||||
</b> <span class="pull-right"><?php echo $_smarty_tpl->tpl_vars['plan']->value['validity'];?>
|
||||
|
||||
<?php echo $_smarty_tpl->tpl_vars['plan']->value['validity_unit'];?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Using');?>
|
||||
</b> <span class="pull-right"><?php echo ucwords($_smarty_tpl->tpl_vars['using']->value);?>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<center><b><?php echo Lang::T('Total');?>
|
||||
</b></center>
|
||||
<ul class="list-group list-group-unbordered">
|
||||
<?php if ($_smarty_tpl->tpl_vars['using']->value != 'zero' && $_smarty_tpl->tpl_vars['add_cost']->value > 0) {?>
|
||||
<?php
|
||||
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['bills']->value, 'v', false, 'k');
|
||||
$_smarty_tpl->tpl_vars['v']->do_else = true;
|
||||
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['k']->value => $_smarty_tpl->tpl_vars['v']->value) {
|
||||
$_smarty_tpl->tpl_vars['v']->do_else = false;
|
||||
?>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo $_smarty_tpl->tpl_vars['k']->value;?>
|
||||
</b> <span class="pull-right"><?php echo Lang::moneyFormat($_smarty_tpl->tpl_vars['v']->value);?>
|
||||
</span>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Additional Cost');?>
|
||||
</b> <span
|
||||
class="pull-right"><?php echo Lang::moneyFormat($_smarty_tpl->tpl_vars['add_cost']->value);?>
|
||||
</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Total');?>
|
||||
</b> <small>(<?php echo Lang::T('Plan Price');?>
|
||||
+<?php echo Lang::T('Additional Cost');?>
|
||||
)</small><span class="pull-right"
|
||||
style="font-size: large; font-weight:bolder; font-family: 'Courier New', Courier, monospace; "><?php echo Lang::moneyFormat($_smarty_tpl->tpl_vars['plan']->value['price']+$_smarty_tpl->tpl_vars['add_cost']->value);?>
|
||||
</span>
|
||||
</li>
|
||||
<?php } else { ?>
|
||||
<li class="list-group-item">
|
||||
<b><?php echo Lang::T('Total');?>
|
||||
</b> <span class="pull-right"
|
||||
style="font-size: large; font-weight:bolder; font-family: 'Courier New', Courier, monospace; "><?php if ($_smarty_tpl->tpl_vars['using']->value == 'zero') {
|
||||
echo Lang::moneyFormat(0);
|
||||
} else {
|
||||
echo Lang::moneyFormat($_smarty_tpl->tpl_vars['plan']->value['price']);
|
||||
}?></span>
|
||||
</li>
|
||||
<?php }?>
|
||||
</ul>
|
||||
<form class="form-horizontal" method="post" role="form" action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
plan/recharge-post">
|
||||
<input type="hidden" name="id_customer" value="<?php echo $_smarty_tpl->tpl_vars['cust']->value['id'];?>
|
||||
">
|
||||
<input type="hidden" name="plan" value="<?php echo $_smarty_tpl->tpl_vars['plan']->value['id'];?>
|
||||
">
|
||||
<input type="hidden" name="server" value="<?php echo $_smarty_tpl->tpl_vars['server']->value;?>
|
||||
">
|
||||
<input type="hidden" name="using" value="<?php echo $_smarty_tpl->tpl_vars['using']->value;?>
|
||||
">
|
||||
<input type="hidden" name="stoken" value="<?php echo App::getToken();?>
|
||||
">
|
||||
<center>
|
||||
<button class="btn btn-success mb-3" type="submit"><?php echo Lang::T('Recharge');?>
|
||||
</button><br>
|
||||
<a class="btn btn-outline-primary" href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
plan/recharge"><?php echo Lang::T('Cancel');?>
|
||||
</a>
|
||||
</center>
|
||||
</form>
|
||||
</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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,503 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-09-17 17:16:57
|
||||
from '/var/www/html/yatmack/ui/ui/plan.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_68cac2d9726574_68884552',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'6be11145f2e44fb62e85b7f62586d0954f7edb37' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/plan.tpl',
|
||||
1 => 1758036051,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:pagination.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_68cac2d9726574_68884552 (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">
|
||||
<h3 class="card-title">Plans</h3>
|
||||
<?php if (in_array($_smarty_tpl->tpl_vars['_admin']->value['user_type'],array('SuperAdmin','Admin'))) {?>
|
||||
<div>
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary" title="save" href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
plan/sync"
|
||||
onclick="return confirm('This will sync/send Caustomer active plan to Mikrotik?')"><span
|
||||
class="fa fa-refresh" aria-hidden="true"></span> sync</a>
|
||||
</div>
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-info" 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>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
</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/list/">
|
||||
<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 Username');?>
|
||||
..." 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="input-group-btn">
|
||||
</div> -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
plan/recharge" class="btn btn-primary btn-block"><i
|
||||
class="fa fa-add"> </i> <?php echo Lang::T('Recharge Account');?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="datatable" class="table table-bordered table-striped table-condensed table-hover border-primary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo Lang::T('Username');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Plan Name');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Plan Type');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Created On');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Expires On');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Status');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Time Left');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Method');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Routers');?>
|
||||
</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['is_off']) {?>class="danger" <?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['is_suspended']) {?>class="warning" <?php }?>>
|
||||
<td><a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
customers/viewu/<?php echo $_smarty_tpl->tpl_vars['ds']->value['username'];?>
|
||||
"><?php echo $_smarty_tpl->tpl_vars['ds']->value['username'];?>
|
||||
</a></td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['namebp'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['type'];?>
|
||||
</td>
|
||||
<td><?php echo Lang::dateAndTimeFormat($_smarty_tpl->tpl_vars['ds']->value['recharged_on'],$_smarty_tpl->tpl_vars['ds']->value['recharged_time']);?>
|
||||
</td>
|
||||
<td><?php echo Lang::dateAndTimeFormat($_smarty_tpl->tpl_vars['ds']->value['expiration'],$_smarty_tpl->tpl_vars['ds']->value['time']);?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($_smarty_tpl->tpl_vars['ds']->value['is_active']) {?>
|
||||
<span class="badge badge-success">Active</span>
|
||||
<?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['is_suspended'] && $_smarty_tpl->tpl_vars['ds']->value['is_expired']) {?>
|
||||
<span class="badge badge-warning">Suspended</span>
|
||||
<?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['is_suspended'] && !$_smarty_tpl->tpl_vars['ds']->value['is_expired']) {?>
|
||||
<span class="badge badge-info">Suspending</span>
|
||||
<?php } else { ?>
|
||||
<span class="badge badge-danger">Inactive</span>
|
||||
<?php }?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($_smarty_tpl->tpl_vars['ds']->value['is_suspended'] && !$_smarty_tpl->tpl_vars['ds']->value['is_expired']) {?>
|
||||
<span class="text-warning" id="countdown-<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
">
|
||||
<i class="fa fa-clock-o"></i> <span id="minutes-<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
">Calculating...</span>
|
||||
</span>
|
||||
<?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['is_expired']) {?>
|
||||
<span class="text-danger">Expired</span>
|
||||
<?php } else { ?>
|
||||
<span class="text-muted">-</span>
|
||||
<?php }?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['method'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['ds']->value['routers'];?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
plan/edit/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
"
|
||||
class="btn btn-warning btn-xs mb-1"><?php echo Lang::T('Edit');?>
|
||||
</a>
|
||||
<?php if (!$_smarty_tpl->tpl_vars['ds']->value['is_off'] && !($_smarty_tpl->tpl_vars['ds']->value['is_suspended'] && $_smarty_tpl->tpl_vars['ds']->value['is_expired'])) {?>
|
||||
<button type="button" class="btn btn-warning btn-xs mb-1"
|
||||
onclick="showSuspendModal(<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
, '<?php echo $_smarty_tpl->tpl_vars['ds']->value['username'];?>
|
||||
')"
|
||||
title="<?php echo Lang::T('Suspend Customer');?>
|
||||
">
|
||||
<i class="fa fa-pause"></i> <?php echo Lang::T('Suspend');?>
|
||||
|
||||
</button>
|
||||
<?php } elseif ($_smarty_tpl->tpl_vars['ds']->value['is_suspended'] && $_smarty_tpl->tpl_vars['ds']->value['is_expired']) {?>
|
||||
<span class="btn btn-secondary btn-xs mb-1 disabled">
|
||||
<i class="fa fa-pause"></i> <?php echo Lang::T('Suspended');?>
|
||||
|
||||
</span>
|
||||
<?php } else { ?>
|
||||
<span class="btn btn-secondary btn-xs mb-1 disabled">
|
||||
<i class="fa fa-ban"></i> <?php echo Lang::T('Inactive');?>
|
||||
|
||||
</span>
|
||||
<?php }?>
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
plan/recharge/<?php echo $_smarty_tpl->tpl_vars['ds']->value['customer_id'];?>
|
||||
"
|
||||
class="btn btn-success btn-xs mb-1"
|
||||
title="<?php echo Lang::T('Recharge Customer');?>
|
||||
">
|
||||
<i class="fa fa-refresh"></i> <?php echo Lang::T('Recharge');?>
|
||||
|
||||
</a>
|
||||
<?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/delete/<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
" id="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
"
|
||||
onclick="return confirm('<?php echo Lang::T('Delete');?>
|
||||
?')"
|
||||
class="btn btn-danger btn-xs"><i class="fa fa-trash"></i></a>
|
||||
<?php }?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php $_smarty_tpl->_subTemplateRender("file:pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Suspend Confirmation Modal -->
|
||||
<div class="modal fade" id="suspendModal" tabindex="-1" role="dialog" aria-labelledby="suspendModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="suspendModalLabel"><?php echo Lang::T('Suspend Customer');?>
|
||||
</h5>
|
||||
<button type="button" class="close" onclick="closeSuspendModal()" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<form id="suspendForm" method="post" action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
plan/suspend-confirm">
|
||||
<div class="modal-body">
|
||||
<input type="hidden" id="suspend_customer_id" name="id" value="">
|
||||
<div class="form-group">
|
||||
<label for="customer_name"><?php echo Lang::T('Customer');?>
|
||||
:</label>
|
||||
<input type="text" class="form-control" id="customer_name" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="suspension_date"><?php echo Lang::T('Suspension Date');?>
|
||||
:</label>
|
||||
<input type="date" class="form-control" id="suspension_date" name="suspension_date" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="suspension_time"><?php echo Lang::T('Suspension Time');?>
|
||||
:</label>
|
||||
<input type="time" class="form-control" id="suspension_time" name="suspension_time" required>
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<i class="fa fa-info-circle"></i> <?php echo Lang::T('The customer will be suspended at the specified date and time.');?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" onclick="closeSuspendModal()"><?php echo Lang::T('Cancel');?>
|
||||
</button>
|
||||
<button type="submit" class="btn btn-warning"><?php echo Lang::T('Suspend Customer');?>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Recharge Modal - Removed as recharge now navigates to dedicated page -->
|
||||
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
// Recharge Modal - Removed as recharge now navigates to dedicated page
|
||||
|
||||
|
||||
|
||||
// Recharge modal functions removed as recharge now navigates to dedicated page
|
||||
|
||||
function showSuspendModal(customerId, customerName) {
|
||||
document.getElementById('suspend_customer_id').value = customerId;
|
||||
document.getElementById('customer_name').value = customerName;
|
||||
|
||||
// Set default date and time (6 minutes from now)
|
||||
var now = new Date();
|
||||
now.setMinutes(now.getMinutes() + 6);
|
||||
|
||||
var dateStr = now.toISOString().split('T')[0];
|
||||
var timeStr = now.toTimeString().split(' ')[0].substring(0, 5);
|
||||
|
||||
document.getElementById('suspension_date').value = dateStr;
|
||||
document.getElementById('suspension_time').value = timeStr;
|
||||
|
||||
// Show modal using both jQuery and vanilla JS for compatibility
|
||||
if (typeof $ !== 'undefined' && $.fn.modal) {
|
||||
$('#suspendModal').modal('show');
|
||||
} else {
|
||||
// Fallback for vanilla JS
|
||||
var modal = document.getElementById('suspendModal');
|
||||
modal.style.display = 'block';
|
||||
modal.classList.add('show');
|
||||
document.body.classList.add('modal-open');
|
||||
|
||||
// Add backdrop
|
||||
var backdrop = document.createElement('div');
|
||||
backdrop.className = 'modal-backdrop fade show';
|
||||
backdrop.id = 'modal-backdrop';
|
||||
document.body.appendChild(backdrop);
|
||||
}
|
||||
}
|
||||
|
||||
function closeSuspendModal() {
|
||||
// Close modal using both jQuery and vanilla JS for compatibility
|
||||
if (typeof $ !== 'undefined' && $.fn.modal) {
|
||||
$('#suspendModal').modal('hide');
|
||||
} else {
|
||||
// Fallback for vanilla JS
|
||||
var modal = document.getElementById('suspendModal');
|
||||
modal.style.display = 'none';
|
||||
modal.classList.remove('show');
|
||||
document.body.classList.remove('modal-open');
|
||||
|
||||
// Remove backdrop
|
||||
var backdrop = document.getElementById('modal-backdrop');
|
||||
if (backdrop) {
|
||||
backdrop.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Close modal when clicking outside of it
|
||||
document.addEventListener('click', function(event) {
|
||||
var modal = document.getElementById('suspendModal');
|
||||
if (event.target === modal) {
|
||||
closeSuspendModal();
|
||||
}
|
||||
});
|
||||
|
||||
// Close modal with Escape key
|
||||
document.addEventListener('keydown', function(event) {
|
||||
if (event.key === 'Escape') {
|
||||
var modal = document.getElementById('suspendModal');
|
||||
if (modal.classList.contains('show')) {
|
||||
closeSuspendModal();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Countdown timer for suspended users
|
||||
function updateCountdowns() {
|
||||
var now = new Date().getTime();
|
||||
var hasExpired = false;
|
||||
|
||||
document.querySelectorAll('[id^="countdown-"]').forEach(function(element) {
|
||||
var customerId = element.id.replace('countdown-', '');
|
||||
var minutesElement = document.getElementById('minutes-' + customerId);
|
||||
|
||||
if (minutesElement) {
|
||||
// Get expiry time from the table row
|
||||
var row = element.closest('tr');
|
||||
var expiryCell = row.querySelector('td:nth-child(5)'); // Expires On column
|
||||
var expiryText = expiryCell.textContent.trim();
|
||||
|
||||
// Parse the expiry date and time
|
||||
var expiryDate = new Date(expiryText);
|
||||
|
||||
if (!isNaN(expiryDate.getTime())) {
|
||||
var timeLeft = expiryDate.getTime() - now;
|
||||
|
||||
if (timeLeft > 0) {
|
||||
var minutes = Math.floor(timeLeft / (1000 * 60));
|
||||
var hours = Math.floor(minutes / 60);
|
||||
var days = Math.floor(hours / 24);
|
||||
|
||||
var displayText = '';
|
||||
if (days > 0) {
|
||||
displayText = days + 'd ' + (hours % 24) + 'h ' + (minutes % 60) + 'm';
|
||||
} else if (hours > 0) {
|
||||
displayText = hours + 'h ' + (minutes % 60) + 'm';
|
||||
} else {
|
||||
displayText = minutes + 'm';
|
||||
}
|
||||
|
||||
minutesElement.textContent = displayText;
|
||||
} else {
|
||||
// Timer has expired - update UI immediately
|
||||
minutesElement.textContent = 'Expired';
|
||||
element.className = 'text-danger';
|
||||
|
||||
// Update the status badge to Inactive
|
||||
var statusCell = row.querySelector('td:nth-child(6)'); // Status column
|
||||
if (statusCell) {
|
||||
var badge = statusCell.querySelector('.badge');
|
||||
if (badge) {
|
||||
badge.className = 'badge badge-danger';
|
||||
badge.textContent = 'Inactive';
|
||||
}
|
||||
}
|
||||
|
||||
// Update the suspend button to show Inactive
|
||||
var suspendButton = row.querySelector('button[onclick*="showSuspendModal"]');
|
||||
if (suspendButton) {
|
||||
suspendButton.outerHTML = '<span class="btn btn-secondary btn-xs mb-1 disabled"><i class="fa fa-ban"></i> Inactive</span>';
|
||||
}
|
||||
|
||||
hasExpired = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// If any countdown expired, refresh the page after a short delay to sync with backend
|
||||
if (hasExpired) {
|
||||
setTimeout(function() {
|
||||
location.reload();
|
||||
}, 2000); // Wait 2 seconds before refreshing
|
||||
}
|
||||
}
|
||||
|
||||
// Update countdowns every 10 seconds for better real-time experience
|
||||
setInterval(updateCountdowns, 10000);
|
||||
|
||||
// Initial update
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
updateCountdowns();
|
||||
|
||||
// Initialize modal form interactions
|
||||
initializeModalForm();
|
||||
});
|
||||
|
||||
// Initialize Modal Form Interactions
|
||||
function initializeModalForm() {
|
||||
// Load servers when type changes
|
||||
$('input[type=radio][name="type"]').change(function(){
|
||||
$("#modal_server").html('<option value=""><?php echo Lang::T('Select Routers');?>
|
||||
</option>');
|
||||
$("#modal_plan").html('<option value=""><?php echo Lang::T('Select Plans');?>
|
||||
</option>');
|
||||
$("#modal-server-help").text('Loading routers...');
|
||||
$("#modal-plan-help").text('Select a router first to load available plans');
|
||||
|
||||
if ($('#modalHot').is(':checked') || $('#modalPOE').is(':checked')) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "html",
|
||||
url: "index.php?_route=autoload/server",
|
||||
success: function(msg){
|
||||
$("#modal_server").html(msg);
|
||||
$("#modal_server").prop('disabled', false);
|
||||
|
||||
// Update help text
|
||||
var serverCount = $("#modal_server option").length - 1;
|
||||
if (serverCount > 0) {
|
||||
$("#modal-server-help").text('Found ' + serverCount + ' router(s) available');
|
||||
} else {
|
||||
$("#modal-server-help").text('No routers found. Please add routers first.');
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
$("#modal-server-help").text('Error loading routers. Please try again.');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Load plans when server changes
|
||||
$("#modal_server").change(function(){
|
||||
var server = $("#modal_server").val();
|
||||
var jenis = $('input[name="type"]:checked').val();
|
||||
|
||||
if (server && jenis) {
|
||||
$("#modal-plan-help").text('Loading plans...');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
dataType: "html",
|
||||
url: "index.php?_route=autoload/plan",
|
||||
data: "jenis=" + jenis + "&server=" + server,
|
||||
success: function(msg){
|
||||
$("#modal_plan").html(msg);
|
||||
$("#modal_plan").prop('disabled', false);
|
||||
|
||||
// Update help text
|
||||
var planCount = $("#modal_plan option").length - 1;
|
||||
if (planCount > 0) {
|
||||
$("#modal-plan-help").text('Found ' + planCount + ' plan(s) available');
|
||||
} else {
|
||||
$("#modal-plan-help").text('No plans found for this router and type. Please create plans first.');
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
$("#modal-plan-help").text('Error loading plans. Please try again.');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$("#modal_plan").html('<option value=""><?php echo Lang::T('Select Plans');?>
|
||||
</option>');
|
||||
$("#modal-plan-help").text('Select a router and type first to load available plans');
|
||||
}
|
||||
});
|
||||
}
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<?php $_smarty_tpl->_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-09-18 01:02:48
|
||||
from '/var/www/html/yatmack/ui/ui/router-error.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_68cb30089f2c59_33113312',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'835672ecbe0b419aa67842d7f88c05944d874b22' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/router-error.tpl',
|
||||
1 => 1757849764,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
),
|
||||
),false)) {
|
||||
function content_68cb30089f2c59_33113312 (Smarty_Internal_Template $_smarty_tpl) {
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="48x48" href="favicon-48x48.png">
|
||||
<link rel="icon" type="image/png" sizes="64x64" href="favicon-64x64.png">
|
||||
<link rel="icon" type="image/svg+xml" href="favicon.svg">
|
||||
<title><?php echo Lang::T('Login');?>
|
||||
- <?php echo $_smarty_tpl->tpl_vars['_c']->value['CompanyName'];?>
|
||||
</title>
|
||||
<link rel="stylesheet" href="assets/vendor/chartist/css/chartist.min.css">
|
||||
<link href="assets/vendor/bootstrap-select/dist/css/bootstrap-select.min.css" rel="stylesheet">
|
||||
<link href="assets/css/style.css" rel="stylesheet">
|
||||
<meta http-equiv="refresh" content="<?php echo $_smarty_tpl->tpl_vars['time']->value;?>
|
||||
; url=<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
|
||||
">
|
||||
<style>
|
||||
::-moz-selection {
|
||||
/* Code for Firefox */
|
||||
color: red;
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
::selection {
|
||||
color: red;
|
||||
background: yellow;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="hold-transition skin-blue" style="background-color:#e9ecef;">
|
||||
<div class="container-fluid">
|
||||
<center>
|
||||
<div class="col-md-8" style="margin-top: 80px;">
|
||||
<div class="card card-danger card-solid">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">
|
||||
<?php echo $_smarty_tpl->tpl_vars['error_title']->value;?>
|
||||
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body" style="font-size: larger; text-align: start;">
|
||||
<h5 class="text-danger"><?php echo $_smarty_tpl->tpl_vars['error_message']->value;?>
|
||||
</h5>
|
||||
<hr>
|
||||
<h5 class="text-info">Mikrotik troubleshooting: </h5>
|
||||
<ol>
|
||||
<li>1. Make sure you use API Port, Default 8728</li>
|
||||
<li>2. Make sure Username and Password are correct</li>
|
||||
<li>3. Make sure your hosting is not blocking port to external</li>
|
||||
<li>4. Make sure your is Mikrotik accessible from MikroPulse</li>
|
||||
</ol>
|
||||
<span class="text-info">Note: </span>If you just update MikroPulse from upload files, try
|
||||
contact admin
|
||||
</div>
|
||||
<!-- <div class="card-footer">
|
||||
<div class="" role="group" aria-label="...">
|
||||
<a href="./update.php?step=4"
|
||||
class="btn btn-info btn-sm btn-block mb-3">Update Database</a>
|
||||
<a href="#" " class="btn btn-success btn-sm btn-block mb-4">Update
|
||||
Mikropulse</a>
|
||||
</div>
|
||||
<a href="javascript::history.back()" onclick="history.back()"
|
||||
class="btn btn-warning btn-block">back</a>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html><?php }
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-09-17 20:26:08
|
||||
from '/var/www/html/yatmack/ui/ui/invoice.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_68caef307615c6_22248505',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'8580083fb6cabf83ff42ec20bcb9cc41302be5ec' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/invoice.tpl',
|
||||
1 => 1713579462,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_68caef307615c6_22248505 (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-md-12 col-sm-12 col-md-offset-3">
|
||||
<div class="card card-hovered card-primary card-stacked mb30">
|
||||
<div class="card-header"><?php echo $_smarty_tpl->tpl_vars['in']->value['invoice'];?>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" method="post" action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
plan/print" target="_blank">
|
||||
<pre id="content"></pre>
|
||||
<textarea class="hidden" id="formcontent" name="content"><?php echo $_smarty_tpl->tpl_vars['invoice']->value;?>
|
||||
</textarea>
|
||||
<input type="hidden" name="id" value="<?php echo $_smarty_tpl->tpl_vars['in']->value['id'];?>
|
||||
">
|
||||
<div class="">
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
plan/list" class="btn btn-success btn-sm"><i
|
||||
class="fa fa-reply-all"></i><?php echo Lang::T('Finish');?>
|
||||
</a>
|
||||
<a href="https://api.whatsapp.com/send/?text=<?php echo $_smarty_tpl->tpl_vars['whatsapp']->value;?>
|
||||
" target="_blank"
|
||||
class="btn btn-primary btn-sm">
|
||||
<i class="fa fa-share"></i> WhatsApp</a>
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
plan/view/<?php echo $_smarty_tpl->tpl_vars['in']->value['id'];?>
|
||||
/send" class="btn btn-info btn-sm"><i
|
||||
class="fa fa-envelope"></i> <?php echo Lang::T("Resend");?>
|
||||
</a>
|
||||
<button type="submit" class="btn btn-info btn-sm"><i class="fa fa-print"></i>
|
||||
Print</button>
|
||||
<!-- <a href="nux://print?text=<?php echo urlencode($_smarty_tpl->tpl_vars['invoice']->value);?>
|
||||
"
|
||||
class="btn btn-success btn-sm hidden-md hidden-lg">
|
||||
<i class="fa fa-phone"></i>
|
||||
Print Invoice
|
||||
</a>
|
||||
<a href="https://github.com/hotspotbilling/android-printer"
|
||||
class="btn btn-success btn-sm hidden-xs hidden-sm" target="_blank">
|
||||
<i class="fa fa-phone"></i>
|
||||
Print Invoice
|
||||
</a> -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo '<script'; ?>
|
||||
type="text/javascript">
|
||||
var s5_taf_parent = window.location;
|
||||
document.getElementById('content').innerHTML = document.getElementById('formcontent').innerHTML;
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,621 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-09-17 17:01:12
|
||||
from '/var/www/html/yatmack/ui/ui/dashboard.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_68cabf28db77e8_90225257',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'8ca5bde7adf30e16d398afc5afbdb239fde67591' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/dashboard.tpl',
|
||||
1 => 1757858363,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:pagination.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_68cabf28db77e8_90225257 (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>
|
||||
.icon i{
|
||||
font-size: 36px;
|
||||
}
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="col-xl-3 col-xxl-3 col-lg-6 col-sm-6">
|
||||
<div class="card card-bd">
|
||||
<div class="bg-secondary card-border" style="background:#3444d5 !important;"></div>
|
||||
<div class="card-body box-style">
|
||||
<div class="media align-items-center col">
|
||||
<div class="inner media-body me-3">
|
||||
<h4 class=" num-text text-black font-w200 fs-48"><?php echo $_smarty_tpl->tpl_vars['_c']->value['currency_code'];
|
||||
echo number_format($_smarty_tpl->tpl_vars['iday']->value,0,$_smarty_tpl->tpl_vars['_c']->value['dec_point'],$_smarty_tpl->tpl_vars['_c']->value['thousands_sep']);?>
|
||||
</h4>
|
||||
<p class="fs-14"><?php echo Lang::T('Income Today');?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="icon" style="color: #864AD1;">
|
||||
<i class="fas fa-dollar-sign"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
reports/by-date" class="small-box-footer" style="color: #fc5130;"><?php echo Lang::T('View Reports');?>
|
||||
<i
|
||||
class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-3 col-xxl-3 col-lg-6 col-sm-6">
|
||||
<div class="card card-bd">
|
||||
<div class="bg-warning card-border"></div>
|
||||
<div class="card-body">
|
||||
<div class="media align-items-center col">
|
||||
<div class="inner media-body me-3">
|
||||
<h4 class="num-text text-black font-w200 fs-48"><?php echo $_smarty_tpl->tpl_vars['_c']->value['currency_code'];
|
||||
echo number_format($_smarty_tpl->tpl_vars['imonth']->value,0,$_smarty_tpl->tpl_vars['_c']->value['dec_point'],$_smarty_tpl->tpl_vars['_c']->value['thousands_sep']);?>
|
||||
</h4>
|
||||
<p class="fs-14"><?php echo Lang::T('Income This Month');?>
|
||||
</p>
|
||||
</div>
|
||||
<!--<div class="icon" style="color: #FFB930;">
|
||||
<i class="fa fa-chart-bar"></i>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="">
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
reports/by-period" class="small-box-footer" style="color: #fc5130;"><?php echo Lang::T('View Reports');?>
|
||||
<i
|
||||
class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-3 col-xxl-3 col-lg-6 col-sm-6">
|
||||
<div class="card card-bd">
|
||||
<div class="bg-success card-border"></div>
|
||||
<div class="card-body box-style">
|
||||
<div class="media align-items-center col">
|
||||
<div class="inner media-body me-3">
|
||||
<h4 class="num-text text-black font-w200 fs-48"><?php echo $_smarty_tpl->tpl_vars['u_act']->value;?>
|
||||
/<?php echo $_smarty_tpl->tpl_vars['u_all']->value;?>
|
||||
</h4>
|
||||
<p class="fs-14"><?php echo Lang::T('Users Active');?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="icon" style="color: #20F174;">
|
||||
<i class="fa fa-users"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
plan/list" class="small-box-footer" style="color: #fc5130;"><?php echo Lang::T('View All');?>
|
||||
<i
|
||||
class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-3 col-xxl-3 col-lg-6 col-sm-6">
|
||||
<div class="card card-bd">
|
||||
<div class="bg-info card-border"></div>
|
||||
<div class="card-body box-style">
|
||||
<div class="media align-items-center col">
|
||||
<div class="inner media-body me-3">
|
||||
<h4 class="num-text text-black font-w200 fs-48"><?php echo $_smarty_tpl->tpl_vars['c_all']->value;?>
|
||||
</h4>
|
||||
<p class="fs-14"><?php echo Lang::T('Total Users');?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="icon" style="color: #3ECDFF;">
|
||||
<i class="fa fa-users"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="" >
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
customers/list" class="small-box-footer" style="color: #fc5130;"><?php echo Lang::T('View All');?>
|
||||
<i
|
||||
class="fa fa-arrow-circle-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xl-3 col-xxl-3 col-lg-6 col-sm-6">
|
||||
<div class="card card-bd">
|
||||
<div class="bg-secondary card-border" style="background:#3444d5 !important;"></div>
|
||||
<div class="card-body box-style">
|
||||
<div class="media align-items-center col">
|
||||
<div class="inner media-body me-3">
|
||||
<h4 class=" num-text text-black font-w200 fs-48" id="total-online-users"></h4>
|
||||
<p class="fs-14"><?php echo Lang::T('Online Users');?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="icon" style="color: #864AD1;">
|
||||
<i class="fas fa-users"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-3 col-xxl-3 col-lg-6 col-sm-6">
|
||||
<div class="card card-bd">
|
||||
<div class="bg-warning card-border"></div>
|
||||
<div class="card-body">
|
||||
<div class="media align-items-center col">
|
||||
<div class="inner media-body me-3">
|
||||
<h4 class="num-text text-black font-w200 fs-48" id="total_data"></h4>
|
||||
<p class="fs-14"><?php echo Lang::T('Data Usage');?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="icon" style="color: #FFB930;">
|
||||
<i class="fas fa-signal"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-3 col-xxl-3 col-lg-6 col-sm-6">
|
||||
<div class="card card-bd">
|
||||
<div class="bg-success card-border"></div>
|
||||
<div class="card-body box-style">
|
||||
<div class="media align-items-center col">
|
||||
<div class="inner media-body me-3">
|
||||
<h4 class="num-text text-black font-w200 fs-48" id="online-hotspot-users"></h4>
|
||||
<p class="fs-14"><?php echo Lang::T('Online Hotspot Users');?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="icon" style="color: #20F174;">
|
||||
<i class="fas fa-wifi"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-3 col-xxl-3 col-lg-6 col-sm-6">
|
||||
<div class="card card-bd">
|
||||
<div class="bg-info card-border"></div>
|
||||
<div class="card-body box-style">
|
||||
<div class="media align-items-center col">
|
||||
<div class="inner media-body me-3">
|
||||
<h4 class="num-text text-black font-w200 fs-48" id="online-pppoe-users"></h4>
|
||||
<p class="fs-14"><?php echo Lang::T('Online PPPoE Users');?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="icon" style="color: #3ECDFF;">
|
||||
<i class="fas fa-network-wired"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<!-- solid sales graph -->
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['hide_mrc'] != 'yes') {?>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-th"></i>
|
||||
<h3 class="card-title"><?php echo Lang::T('Monthly Customers');?>
|
||||
</h3>
|
||||
<div class="card-tools pull-right">
|
||||
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
dashboard&refresh" class="btn bg-teal btn-xsm"><i
|
||||
class="fa fa-refresh"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="card-body text-center pb-0 px-2 pt-2">
|
||||
<div id="widgetChart1" class="widgetChart1 dashboard-chart"></div>
|
||||
</div> -->
|
||||
<div class="card-body border-radius-none">
|
||||
<canvas class="chart" id="chart" style="height: 200px;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<!-- solid sales graph -->
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['hide_tms'] != 'yes') {?>
|
||||
<div class="card card-solid ">
|
||||
<div class="card-header">
|
||||
<i class="fa fa-inbox"></i>
|
||||
<h3 class="card-title"><?php echo Lang::T('Total Monthly Sales');?>
|
||||
</h3>
|
||||
<div class="card-tools pull-right">
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
dashboard&refresh" class="btn bg-teal btn-sm"><i
|
||||
class="fa fa-refresh"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="card-body pb-0 px-2 pt-2">
|
||||
<div id="chartTimeline" class="timeline-chart"></div>
|
||||
</div> -->
|
||||
<div class="card-body border-radius-none">
|
||||
<canvas id="salesChart" class="monthly-project-chart" style="height: 200px;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['hide_uet'] != 'yes') {?>
|
||||
<div class="card card-warning card-hovered project-stats table-responsive">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?php echo Lang::T('Expired Users');?>
|
||||
</h3></div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo Lang::T('Fullname');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Username');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Created On');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Expires On');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Router');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Package');?>
|
||||
</th>
|
||||
<th><?php echo Lang::T('Action');?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['expire']->value, 'expired');
|
||||
$_smarty_tpl->tpl_vars['expired']->do_else = true;
|
||||
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['expired']->value) {
|
||||
$_smarty_tpl->tpl_vars['expired']->do_else = false;
|
||||
?>
|
||||
<tr>
|
||||
<td><a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
customers/viewu/<?php echo $_smarty_tpl->tpl_vars['expired']->value['username'];?>
|
||||
"><?php echo $_smarty_tpl->tpl_vars['expired']->value['fullname'];?>
|
||||
</a></td>
|
||||
<td><a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
customers/viewu/<?php echo $_smarty_tpl->tpl_vars['expired']->value['username'];?>
|
||||
"><?php echo $_smarty_tpl->tpl_vars['expired']->value['username'];?>
|
||||
</a></td>
|
||||
<td><?php echo Lang::dateAndTimeFormat($_smarty_tpl->tpl_vars['expired']->value['recharged_on'],$_smarty_tpl->tpl_vars['expired']->value['recharged_time']);?>
|
||||
|
||||
</td>
|
||||
<td><?php echo Lang::dateAndTimeFormat($_smarty_tpl->tpl_vars['expired']->value['expiration'],$_smarty_tpl->tpl_vars['expired']->value['time']);?>
|
||||
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['expired']->value['routers'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['expired']->value['namebp'];?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
plan/recharge/<?php echo $_smarty_tpl->tpl_vars['expired']->value['customer_id'];?>
|
||||
" id="<?php echo $_smarty_tpl->tpl_vars['expired']->value['customer_id'];?>
|
||||
" style="margin: 0px;color:black;"
|
||||
class="btn btn-warning btn-xs"><?php echo Lang::T('Recharge');?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
</table>
|
||||
</div>
|
||||
<?php $_smarty_tpl->_subTemplateRender("file:pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['disable_voucher'] != 'yes' && $_smarty_tpl->tpl_vars['stocks']->value['unused'] > 0 || $_smarty_tpl->tpl_vars['stocks']->value['used'] > 0) {?>
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['hide_vs'] != 'yes') {?>
|
||||
<div class="card card-primary card-hovered project-stats">
|
||||
<div class="card-header">Vouchers Stock</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo Lang::T('Plan Name');?>
|
||||
</th>
|
||||
<th>unused</th>
|
||||
<th>used</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['plans']->value, 'stok');
|
||||
$_smarty_tpl->tpl_vars['stok']->do_else = true;
|
||||
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['stok']->value) {
|
||||
$_smarty_tpl->tpl_vars['stok']->do_else = false;
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['stok']->value['name_plan'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['stok']->value['unused'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['stok']->value['used'];?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
<tr>
|
||||
<td>Total</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['stocks']->value['unused'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['stocks']->value['used'];?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['hide_aui'] != 'yes') {?>
|
||||
<div class="card card-hovered activities">
|
||||
<div class="card-header"><h3 class="card-title"><?php echo Lang::T('All Users Insights');?>
|
||||
</h3></div>
|
||||
<div class="card-body">
|
||||
<canvas id="userRechargesChart" style="height: 600px;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['hide_al'] != 'yes') {?>
|
||||
<div class="card card-info card-hovered activities" style="height: 600px;">
|
||||
<div class="card-header"><a class="card-title" href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
logs"><?php echo Lang::T('Activity Log');?>
|
||||
</a></div>
|
||||
<div class="card-body">
|
||||
<div id="DZ_W_TimeLine" class="widget-timeline dz-scroll ps ps--active-y" style="height: 460px;">
|
||||
<ul class="timeline">
|
||||
<?php
|
||||
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['dlog']->value, 'dlogs');
|
||||
$_smarty_tpl->tpl_vars['dlogs']->do_else = true;
|
||||
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['dlogs']->value) {
|
||||
$_smarty_tpl->tpl_vars['dlogs']->do_else = false;
|
||||
?>
|
||||
<li class="primary">
|
||||
<div class="timeline-badge primary"></div>
|
||||
<div class="timeline-panel text-muted">
|
||||
<span class="point"></span>
|
||||
<span class="time small text-muted"><?php echo Lang::timeElapsed($_smarty_tpl->tpl_vars['dlogs']->value['date'],true);?>
|
||||
</span>
|
||||
<p><?php echo $_smarty_tpl->tpl_vars['dlogs']->value['description'];?>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo '<script'; ?>
|
||||
src="https://cdn.jsdelivr.net/npm/chart.js@3.5.1/dist/chart.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
type="text/javascript">
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['hide_mrc'] != 'yes') {?>
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
var counts = JSON.parse('<?php echo json_encode($_smarty_tpl->tpl_vars['monthlyRegistered']->value);?>
|
||||
');
|
||||
var monthNames = [
|
||||
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
||||
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
|
||||
];
|
||||
var labels = [];
|
||||
var data = [];
|
||||
for (var i = 1; i <= 12; i++) {
|
||||
var month = counts.find(count => count.date === i);
|
||||
labels.push(month ? monthNames[i - 1] : monthNames[i - 1].substring(0, 3));
|
||||
data.push(month ? month.count : 0);
|
||||
}
|
||||
var ctx = document.getElementById('chart').getContext('2d');
|
||||
var chart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [{
|
||||
label: 'Registered Members',
|
||||
data: data,
|
||||
backgroundColor: '#fc5130',
|
||||
borderColor: '#fc5130',
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
scales: {
|
||||
x: {
|
||||
grid: {
|
||||
display: false
|
||||
}
|
||||
},
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
grid: {
|
||||
color: 'rgba(0, 0, 0, 0.1)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
<?php }?>
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['hide_tmc'] != 'yes') {?>
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
var monthlySales = JSON.parse('<?php echo json_encode($_smarty_tpl->tpl_vars['monthlySales']->value);?>
|
||||
');
|
||||
var monthNames = [
|
||||
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
||||
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
|
||||
];
|
||||
var labels = [];
|
||||
var data = [];
|
||||
for (var i = 1; i <= 12; i++) {
|
||||
var month = findMonthData(monthlySales, i);
|
||||
labels.push(month ? monthNames[i - 1] : monthNames[i - 1].substring(0, 3));
|
||||
data.push(month ? month.totalSales : 0);
|
||||
}
|
||||
var ctx = document.getElementById('salesChart').getContext('2d');
|
||||
var chart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
//type: 'radialBar',
|
||||
data: {
|
||||
labels: labels,
|
||||
datasets: [{
|
||||
label: 'Monthly Sales',
|
||||
data: data,
|
||||
backgroundColor: '#fc5130', // Customize the background color
|
||||
borderColor: '#fc5130', // Customize the border color
|
||||
borderWidth: 2
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
scales: {
|
||||
x: {
|
||||
grid: {
|
||||
display: false
|
||||
}
|
||||
},
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
grid: {
|
||||
color: 'rgba(0, 0, 0, 0.1)'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
function findMonthData(monthlySales, month) {
|
||||
for (var i = 0; i < monthlySales.length; i++) {
|
||||
if (monthlySales[i].month === month) {
|
||||
return monthlySales[i];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
<?php }?>
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['hide_aui'] != 'yes') {?>
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
// Get the data from PHP and assign it to JavaScript variables
|
||||
var u_act = '<?php echo $_smarty_tpl->tpl_vars['u_act']->value;?>
|
||||
';
|
||||
var c_all = '<?php echo $_smarty_tpl->tpl_vars['c_all']->value;?>
|
||||
';
|
||||
var u_all = '<?php echo $_smarty_tpl->tpl_vars['u_all']->value;?>
|
||||
';
|
||||
//lets calculate the inactive users as reported
|
||||
var expired = u_all - u_act;
|
||||
var inactive = c_all - u_all;
|
||||
// Create the chart data
|
||||
var data = {
|
||||
labels: ['Active Users', 'Expired Users', 'Inactive Users'],
|
||||
datasets: [{
|
||||
label: 'User Recharges',
|
||||
data: [parseInt(u_act), parseInt(expired), parseInt(inactive)],
|
||||
backgroundColor: ['rgba(4, 191, 13)', 'rgba(191, 35, 4)', 'rgba(0, 0, 255, 0.5'],
|
||||
borderColor: ['rgba(0, 255, 0, 1)', 'rgba(255, 99, 132, 1)', 'rgba(0, 0, 255, 0.7'],
|
||||
borderWidth: 1
|
||||
}]
|
||||
};
|
||||
// Create chart options
|
||||
var options = {
|
||||
responsive: true,
|
||||
aspectRatio: 1,
|
||||
plugins: {
|
||||
legend: {
|
||||
position: 'bottom',
|
||||
labels: {
|
||||
boxWidth: 15
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
// Get the canvas element and create the chart
|
||||
var ctx = document.getElementById('userRechargesChart').getContext('2d');
|
||||
var chart = new Chart(ctx, {
|
||||
type: 'pie',
|
||||
data: data,
|
||||
options: options
|
||||
});
|
||||
});
|
||||
|
||||
<?php }?>
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
src="https://code.jquery.com/jquery-3.6.0.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
$(document).ready(function() {
|
||||
$.ajax({
|
||||
url: "<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
onlineusers/summary", // Adjust this URL to your actual endpoint
|
||||
type: 'GET',
|
||||
dataType: 'json', // Ensure the expected response is JSON
|
||||
success: function(data) {
|
||||
console.log('Data fetched successfully:', data);
|
||||
// Check if data is null or missing properties and set defaults to 0
|
||||
$('#total-online-users').text(data.total_users || 0);
|
||||
$('#online-hotspot-users').text(data.hotspot_users || 0);
|
||||
$('#online-pppoe-users').text(data.ppp_users || 0);
|
||||
$('#total_data').text(data.total_bytes || 0);
|
||||
},
|
||||
error: function(error) {
|
||||
console.log('Error fetching data:', error);
|
||||
// Set all values to 0 in case of an error
|
||||
$('#total-online-users').text(0);
|
||||
$('#online-hotspot-users').text(0);
|
||||
$('#online-pppoe-users').text(0);
|
||||
$('#total_data').text(0);
|
||||
}
|
||||
});
|
||||
});
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<?php $_smarty_tpl->_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-09-17 20:25:50
|
||||
from '/var/www/html/yatmack/ui/ui/autoload-server.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_68caef1e5591a8_18492681',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'8e5ffc4f83e557b719bacdc912f57a375063c8ed' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/autoload-server.tpl',
|
||||
1 => 1712578762,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
),
|
||||
),false)) {
|
||||
function content_68caef1e5591a8_18492681 (Smarty_Internal_Template $_smarty_tpl) {
|
||||
?><option value=''><?php echo Lang::T('Select Routers');?>
|
||||
</option>
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['radius_enable']) {?>
|
||||
<option value="radius">Radius</option>
|
||||
<?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;
|
||||
?>
|
||||
<option value="<?php echo $_smarty_tpl->tpl_vars['ds']->value['name'];?>
|
||||
"><?php echo $_smarty_tpl->tpl_vars['ds']->value['name'];?>
|
||||
</option>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
<?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 }?>
|
||||
|
||||
</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>
|
||||
</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"> <?php echo Lang::T('View');?>
|
||||
</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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-09-17 20:25:56
|
||||
from '/var/www/html/yatmack/ui/ui/autoload.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_68caef2487ef42_12886001',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'938fa3566b44095e856068181e871c9bdbd8f1ae' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/autoload.tpl',
|
||||
1 => 1719137980,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
),
|
||||
),false)) {
|
||||
function content_68caef2487ef42_12886001 (Smarty_Internal_Template $_smarty_tpl) {
|
||||
?><option value="">Select Plans</option>
|
||||
<?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;
|
||||
?>
|
||||
<option value="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
">
|
||||
<?php if ($_smarty_tpl->tpl_vars['ds']->value['enabled'] != 1) {?>DISABLED PLAN • <?php }?>
|
||||
<?php echo $_smarty_tpl->tpl_vars['ds']->value['name_plan'];?>
|
||||
•
|
||||
<?php echo Lang::moneyFormat($_smarty_tpl->tpl_vars['ds']->value['price']);?>
|
||||
|
||||
<?php if ($_smarty_tpl->tpl_vars['ds']->value['prepaid'] != 'yes') {?> • POSTPAID <?php }?>
|
||||
</option>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-12-18 19:40:22
|
||||
from '/var/www/html/yatmack/ui/ui/paymentgateway.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_69442e76d65112_81453986',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'9429e7b796d9fca229920da6c20738be853b64e9' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/paymentgateway.tpl',
|
||||
1 => 1713579644,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_69442e76d65112_81453986 (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">
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-md-offset-3">
|
||||
<div class="card card-info card-hovered">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?php echo Lang::T('Payment Gateway');?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="table-responsive card-body">
|
||||
<table class="table table-striped table-condensed">
|
||||
<tbody>
|
||||
<?php
|
||||
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['pgs']->value, 'pg');
|
||||
$_smarty_tpl->tpl_vars['pg']->do_else = true;
|
||||
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['pg']->value) {
|
||||
$_smarty_tpl->tpl_vars['pg']->do_else = false;
|
||||
?>
|
||||
<tr>
|
||||
<td width="12" align="center" valign="center"><input type="checkbox" name="pgs[]"
|
||||
<?php if (in_array($_smarty_tpl->tpl_vars['pg']->value,$_smarty_tpl->tpl_vars['actives']->value)) {?>checked<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['pg']->value;?>
|
||||
"></td>
|
||||
<td><a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
paymentgateway/<?php echo $_smarty_tpl->tpl_vars['pg']->value;?>
|
||||
"
|
||||
class="btn btn-block btn-<?php if (in_array($_smarty_tpl->tpl_vars['pg']->value,$_smarty_tpl->tpl_vars['actives']->value)) {?>info<?php } else { ?>default<?php }?> text-left"><?php echo ucwords($_smarty_tpl->tpl_vars['pg']->value);?>
|
||||
</a>
|
||||
</td>
|
||||
<td width="12"><a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
paymentgateway/delete/<?php echo $_smarty_tpl->tpl_vars['pg']->value;?>
|
||||
"
|
||||
onclick="return confirm('<?php echo Lang::T('Delete');?>
|
||||
<?php echo $_smarty_tpl->tpl_vars['pg']->value;?>
|
||||
?')" class="btn btn-danger"><i
|
||||
class="fa fa-trash"></i></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer"><button type="submit" class="btn btn-primary btn-block" name="save"
|
||||
value="actives"><?php echo Lang::T('Save Changes');?>
|
||||
</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-12-18 17:05:44
|
||||
from '/var/www/html/yatmack/ui/ui/autoload-pool.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_69440a38d7fc96_35732448',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'94e13b845eb661db4d0acd438948d2cc5489fdaa' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/autoload-pool.tpl',
|
||||
1 => 1712578762,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
),
|
||||
),false)) {
|
||||
function content_69440a38d7fc96_35732448 (Smarty_Internal_Template $_smarty_tpl) {
|
||||
?><option value=''><?php echo Lang::T('Select Pool');?>
|
||||
</option>
|
||||
<?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;
|
||||
?>
|
||||
<option value="<?php echo $_smarty_tpl->tpl_vars['ds']->value['pool_name'];?>
|
||||
"><?php echo $_smarty_tpl->tpl_vars['ds']->value['pool_name'];
|
||||
if ($_smarty_tpl->tpl_vars['routers']->value == '') {?> - <?php echo $_smarty_tpl->tpl_vars['ds']->value['routers'];
|
||||
}?></option>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,309 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-12-18 17:05:31
|
||||
from '/var/www/html/yatmack/ui/ui/hotspot-add.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_69440a2ba78338_84984863',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'a6ac35c35881c7f09f450f4134deff1cb44e420d' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/hotspot-add.tpl',
|
||||
1 => 1757933545,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_69440a2ba78338_84984863 (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 col-md-12">
|
||||
<div class="card card-primary card-hovered card-stacked mb30">
|
||||
<div class="card-header"><?php echo Lang::T('Add Service Plan');?>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" method="post" role="form" action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
services/add-post">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Status');?>
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<input type="radio" name="enabled" value="1" checked> Enable
|
||||
<input type="radio" name="enabled" value="0"> Disable
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Type');?>
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<input type="radio" name="prepaid" onclick="prePaid()" value="yes" checked> Prepaid
|
||||
<input type="radio" name="prepaid" onclick="postPaid()" value="no"> Postpaid
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Plan Type');?>
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<input type="radio" name="plan_type" value="Personal" checked> Personal
|
||||
<input type="radio" name="plan_type" value="Business"> Business
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['radius_enable']) {?>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label">Radius</label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="checkbox" name="radius" onclick="isRadius(this)" value="1"> Radius Plan
|
||||
</label>
|
||||
</div>
|
||||
<p class="help-block col-md-4"><?php echo Lang::T('Cannot be change after saved');?>
|
||||
</p>
|
||||
</div>
|
||||
<?php }?>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Plan Name');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="name" name="name" maxlength="40">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Plan Type');?>
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<input type="radio" id="Unlimited" name="typebp" value="Unlimited" checked>
|
||||
<?php echo Lang::T('Unlimited');?>
|
||||
|
||||
<input type="radio" id="Limited" name="typebp" value="Limited"> <?php echo Lang::T('Limited');?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:none;" id="Type">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Limit Type');?>
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<input type="radio" id="Time_Limit" name="limit_type" value="Time_Limit" checked>
|
||||
<?php echo Lang::T('Time Limit');?>
|
||||
|
||||
<input type="radio" id="Data_Limit" name="limit_type" value="Data_Limit">
|
||||
<?php echo Lang::T('Data Limit');?>
|
||||
|
||||
<input type="radio" id="Both_Limit" name="limit_type" value="Both_Limit">
|
||||
<?php echo Lang::T('Both Limit');?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:none;" id="TimeLimit">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Time Limit');?>
|
||||
</label>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" id="time_limit" name="time_limit" value="0">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select class="form-select select2" id="time_unit" name="time_unit">
|
||||
<option value="Hrs"><?php echo Lang::T('Hrs');?>
|
||||
</option>
|
||||
<option value="Mins"><?php echo Lang::T('Mins');?>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:none;" id="DataLimit">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Data Limit');?>
|
||||
</label>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" id="data_limit" name="data_limit" value="0">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select class="form-select" style="height: 52px; background-color: white;" id="data_unit" name="data_unit">
|
||||
<option value="MB">MBs</option>
|
||||
<option value="GB">GBs</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><a
|
||||
href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
bandwidth/add"><?php echo Lang::T('Bandwidth Name');?>
|
||||
</a></label>
|
||||
<div class="col-md-6">
|
||||
<select id="id_bw" name="id_bw" class="form-select select2">
|
||||
<option value=""><?php echo Lang::T('Select Bandwidth');?>
|
||||
...</option>
|
||||
<?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;
|
||||
?>
|
||||
<option value="<?php echo $_smarty_tpl->tpl_vars['ds']->value['id'];?>
|
||||
"><?php echo $_smarty_tpl->tpl_vars['ds']->value['name_bw'];?>
|
||||
</option>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Plan Price');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text" id="basic-addon1"><?php echo $_smarty_tpl->tpl_vars['_c']->value['currency_code'];?>
|
||||
</span>
|
||||
<input type="number" class="form-control" name="price" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Shared Users');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="sharedusers" name="sharedusers" value="1">
|
||||
<p class="help-block"><?php echo Lang::T('1 user can be used for many devices?');?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Plan Validity');?>
|
||||
</label>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" id="validity" name="validity">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select class="form-select select2" id="validity_unit" name="validity_unit">
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4"><?php echo Lang::T('1 Period = 1 Month, Expires the 20th of each month');?>
|
||||
</p>
|
||||
</div>
|
||||
<span id="routerChoose" class="">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><a
|
||||
href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
routers/add"><?php echo Lang::T('Router Name');?>
|
||||
</a></label>
|
||||
<div class="col-md-6">
|
||||
<select id="routers" name="routers" required class="form-select select2">
|
||||
<option value=''><?php echo Lang::T('Select Routers');?>
|
||||
</option>
|
||||
<?php
|
||||
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['r']->value, 'rs');
|
||||
$_smarty_tpl->tpl_vars['rs']->do_else = true;
|
||||
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['rs']->value) {
|
||||
$_smarty_tpl->tpl_vars['rs']->do_else = false;
|
||||
?>
|
||||
<option value="<?php echo $_smarty_tpl->tpl_vars['rs']->value['name'];?>
|
||||
"><?php echo $_smarty_tpl->tpl_vars['rs']->value['name'];?>
|
||||
</option>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
</select>
|
||||
<p class="help-block"><?php echo Lang::T('Cannot be change after saved');?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
<legend><?php echo Lang::T('Expired Action');?>
|
||||
</legend>
|
||||
<div class="form-group row" id="ipPool">
|
||||
<label class="col-md-2 control-label"><a
|
||||
href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
pool/add"><?php echo Lang::T('Expired IP Pool');?>
|
||||
</a></label>
|
||||
<div class="col-md-6">
|
||||
<select id="pool_expired" name="pool_expired" class="form-select select2">
|
||||
<option value=''><?php echo Lang::T('Select Pool');?>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<center>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<button class="btn btn-success" type="submit"><?php echo Lang::T('Save Changes');?>
|
||||
</button>
|
||||
Or <a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
services/hotspot"><?php echo Lang::T('Cancel');?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
var preOpt = `<option value="Mins"><?php echo Lang::T('Mins');?>
|
||||
</option>
|
||||
<option value="Hrs"><?php echo Lang::T('Hrs');?>
|
||||
</option>
|
||||
<option value="Days"><?php echo Lang::T('Days');?>
|
||||
</option>
|
||||
<option value="Months"><?php echo Lang::T('Months');?>
|
||||
</option>`;
|
||||
var postOpt = `<option value="Period"><?php echo Lang::T('Period');?>
|
||||
</option>`;
|
||||
function prePaid() {
|
||||
$("#validity_unit").html(preOpt);
|
||||
}
|
||||
|
||||
function postPaid() {
|
||||
$("#validity_unit").html(postOpt);
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
prePaid()
|
||||
})
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['radius_enable']) {?>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
function isRadius(cek) {
|
||||
if (cek.checked) {
|
||||
$("#routerChoose").addClass('hidden');
|
||||
document.getElementById("routers").required = false;
|
||||
$("#pool_expired").html('');
|
||||
$.ajax({
|
||||
url: "index.php?_route=autoload/pool",
|
||||
data: "routers=radius",
|
||||
cache: false,
|
||||
success: function(msg) {
|
||||
$("#pool_expired").html(msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
document.getElementById("routers").required = true;
|
||||
$("#routerChoose").removeClass('hidden');
|
||||
}
|
||||
}
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<?php }?>
|
||||
</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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-12-18 17:04:57
|
||||
from '/var/www/html/yatmack/ui/ui/message-bulk.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_69440a09de5f76_95647507',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'cba6c0be1b673672973fcf86fe42360f1df48934' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/message-bulk.tpl',
|
||||
1 => 1713579562,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_69440a09de5f76_95647507 (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">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="card card-primary card-hovered card-stacked mb30">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?php echo Lang::T('Send Bulk Message');?>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" method="post" role="form" id="bulkMessageForm" action="">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Group');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select class="form-select" style="height: 52px; background-color: white;" name="group" id="group">
|
||||
<option value="all" selected><?php echo Lang::T('All Customers');?>
|
||||
</option>
|
||||
<option value="new"><?php echo Lang::T('New Customers');?>
|
||||
</option>
|
||||
<option value="expired"><?php echo Lang::T('Expired Customers');?>
|
||||
</option>
|
||||
<option value="active"><?php echo Lang::T('Active Customers');?>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Send Via');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select class="form-select" style="height: 52px; background-color: white;" name="via" id="via">
|
||||
<option value="sms" selected><?php echo Lang::T('SMS');?>
|
||||
</option>
|
||||
<option value="wa"><?php echo Lang::T('WhatsApp');?>
|
||||
</option>
|
||||
<option value="both"><?php echo Lang::T('SMS and WhatsApp');?>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Message per time');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select class="form-select" style="height: 52px; background-color: white;" name="batch" id="batch">
|
||||
<option value="5"><?php echo Lang::T('5 Messages');?>
|
||||
</option>
|
||||
<option value="10" selected><?php echo Lang::T('10 Messages');?>
|
||||
</option>
|
||||
<option value="15"><?php echo Lang::T('15 Messages');?>
|
||||
</option>
|
||||
<option value="20"><?php echo Lang::T('20 Messages');?>
|
||||
</option>
|
||||
<option value="20"><?php echo Lang::T('30 Messages');?>
|
||||
</option>
|
||||
<option value="20"><?php echo Lang::T('40 Messages');?>
|
||||
</option>
|
||||
<option value="20"><?php echo Lang::T('50 Messages');?>
|
||||
</option>
|
||||
<option value="20"><?php echo Lang::T('60 Messages');?>
|
||||
</option>
|
||||
</select><?php echo Lang::T('Use 20 and above if you are sending to all customers to avoid server time out');?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Delay');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select class="form-select" style="height: 52px; background-color: white;" name="delay" id="delay">
|
||||
<option value="0" selected><?php echo Lang::T('No Delay');?>
|
||||
</option>
|
||||
<option value="5"><?php echo Lang::T('5 Seconds');?>
|
||||
</option>
|
||||
<option value="10"><?php echo Lang::T('10 Seconds');?>
|
||||
</option>
|
||||
<option value="15"><?php echo Lang::T('15 Seconds');?>
|
||||
</option>
|
||||
<option value="20"><?php echo Lang::T('20 Seconds');?>
|
||||
</option>
|
||||
</select><?php echo Lang::T('Use at least 5 secs if you are sending to all customers to avoid being banned by your message provider');?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 control-label"><?php echo Lang::T('Message');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" id="message" name="message"
|
||||
placeholder="<?php echo Lang::T('Compose your message...');?>
|
||||
" rows="5"></textarea>
|
||||
<input name="test" type="checkcard"> <?php echo Lang::T('Testing [if checked no real message is sent]');?>
|
||||
|
||||
</div>
|
||||
<p class="help-block col-md-4">
|
||||
<?php echo Lang::T('Use placeholders:');?>
|
||||
|
||||
<br>
|
||||
<b>[[name]]</b> - <?php echo Lang::T('Customer Name');?>
|
||||
|
||||
<br>
|
||||
<b>[[user_name]]</b> - <?php echo Lang::T('Customer Username');?>
|
||||
|
||||
<br>
|
||||
<b>[[phone]]</b> - <?php echo Lang::T('Customer Phone');?>
|
||||
|
||||
<br>
|
||||
<b>[[company_name]]</b> - <?php echo Lang::T('Your Company Name');?>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<center>
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-success mb-3" type="submit" name=send value=now>
|
||||
<?php echo Lang::T('Send Message');?>
|
||||
</button>
|
||||
<a class="btn btn-outline-primary" href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
dashboard" class="btn btn-default"><?php echo Lang::T('Cancel');?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($_smarty_tpl->tpl_vars['batchStatus']->value) {?>
|
||||
<p><span class="label label-success">Total SMS Sent: <?php echo $_smarty_tpl->tpl_vars['totalSMSSent']->value;?>
|
||||
</span> <span class="label label-danger">Total SMS
|
||||
Failed: <?php echo $_smarty_tpl->tpl_vars['totalSMSFailed']->value;?>
|
||||
</span> <span class="label label-success">Total WhatsApp Sent:
|
||||
<?php echo $_smarty_tpl->tpl_vars['totalWhatsappSent']->value;?>
|
||||
</span> <span class="label label-danger">Total WhatsApp Failed:
|
||||
<?php echo $_smarty_tpl->tpl_vars['totalWhatsappFailed']->value;?>
|
||||
</span></p>
|
||||
<?php }?>
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="card card-primary card-hovered card-stacked mb30">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Message Results</h3>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="table-responsive">
|
||||
<table id="messageResultsTable" class="table table-bordered table-striped table-condensed table-hover border-primary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Phone</th>
|
||||
<th>Message</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['batchStatus']->value, 'customer');
|
||||
$_smarty_tpl->tpl_vars['customer']->do_else = true;
|
||||
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['customer']->value) {
|
||||
$_smarty_tpl->tpl_vars['customer']->do_else = false;
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['customer']->value['name'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['customer']->value['phone'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['customer']->value['message'];?>
|
||||
</td>
|
||||
<td><?php echo $_smarty_tpl->tpl_vars['customer']->value['status'];?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
</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('#messageResultsTable').DataTable();
|
||||
});
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-12-18 19:40:25
|
||||
from '/var/www/html/yatmack/system/paymentgateway/ui/bankstkpush.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_69442e79250de0_04468865',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'e55c1fbb39343a012d1e05d5709d5bac739ea069' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/system/paymentgateway/ui/bankstkpush.tpl',
|
||||
1 => 1757869030,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
'file:sections/header.tpl' => 1,
|
||||
'file:sections/footer.tpl' => 1,
|
||||
),
|
||||
),false)) {
|
||||
function content_69442e79250de0_04468865 (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">
|
||||
<form class="form-horizontal" method="post" role="form" action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
paymentgateway/BankStkPush" >
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="card card-primary card-hovered card-stacked mb30">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h4><?php echo Lang::T('BankStkPush Configuration');?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
banks/list" class="btn btn-info">
|
||||
<i class="fa fa-cog"></i> <?php echo Lang::T('Manage Banks');?>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php if ($_smarty_tpl->tpl_vars['banks']->value) {?>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><?php echo Lang::T('Select Bank Account');?>
|
||||
<span class="text-danger">*</span></label>
|
||||
<div class="col-md-6">
|
||||
<select class="form-control" name="selected_bank_id" id="selected_bank_id" required>
|
||||
<option value="">-- <?php echo Lang::T('Select Bank Account');?>
|
||||
--</option>
|
||||
<?php
|
||||
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['banks']->value, 'bank');
|
||||
$_smarty_tpl->tpl_vars['bank']->do_else = true;
|
||||
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['bank']->value) {
|
||||
$_smarty_tpl->tpl_vars['bank']->do_else = false;
|
||||
?>
|
||||
<option value="<?php echo $_smarty_tpl->tpl_vars['bank']->value->id;?>
|
||||
" <?php if ($_smarty_tpl->tpl_vars['bank']->value->id == $_smarty_tpl->tpl_vars['selected_bank_id']->value) {?>selected<?php }?>>
|
||||
<?php echo $_smarty_tpl->tpl_vars['bank']->value->name;?>
|
||||
- <?php echo $_smarty_tpl->tpl_vars['bank']->value->account_number;?>
|
||||
(<?php echo $_smarty_tpl->tpl_vars['bank']->value->account_name;?>
|
||||
)
|
||||
<?php if ($_smarty_tpl->tpl_vars['bank']->value->is_default) {?> - <?php echo Lang::T('DEFAULT');
|
||||
}?>
|
||||
</option>
|
||||
<?php
|
||||
}
|
||||
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
|
||||
</select>
|
||||
<small class="text-muted"><?php echo Lang::T('Only banks with STK Push support are shown');?>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($_smarty_tpl->tpl_vars['selected_bank']->value) {?>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><?php echo Lang::T('Selected Bank Details');?>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-body">
|
||||
<strong><?php echo Lang::T('Bank Name');?>
|
||||
:</strong> <?php echo $_smarty_tpl->tpl_vars['selected_bank']->value->name;?>
|
||||
<br>
|
||||
<strong><?php echo Lang::T('Account Number');?>
|
||||
:</strong> <code><?php echo $_smarty_tpl->tpl_vars['selected_bank']->value->account_number;?>
|
||||
</code><br>
|
||||
<strong><?php echo Lang::T('Account Name');?>
|
||||
:</strong> <?php echo $_smarty_tpl->tpl_vars['selected_bank']->value->account_name;?>
|
||||
<br>
|
||||
<?php if ($_smarty_tpl->tpl_vars['selected_bank']->value->bank_code) {?>
|
||||
<strong><?php echo Lang::T('Bank Code');?>
|
||||
:</strong> <span class="badge badge-info"><?php echo $_smarty_tpl->tpl_vars['selected_bank']->value->bank_code;?>
|
||||
</span><br>
|
||||
<?php }?>
|
||||
<?php if ($_smarty_tpl->tpl_vars['selected_bank']->value->paybill) {?>
|
||||
<strong><?php echo Lang::T('Paybill');?>
|
||||
:</strong> <code><?php echo $_smarty_tpl->tpl_vars['selected_bank']->value->paybill;?>
|
||||
</code><br>
|
||||
<?php }?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="alert alert-info">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
<?php echo Lang::T('After applying these changes, funds will be sent to the selected bank account. Please ensure the bank details are correct.');?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-3 col-lg-6">
|
||||
<button class="btn btn-primary waves-effect waves-light" type="submit">
|
||||
<i class="fa fa-save"></i> <?php echo Lang::T('Save Configuration');?>
|
||||
|
||||
</button>
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
banks/add" class="btn btn-success">
|
||||
<i class="fa fa-plus"></i> <?php echo Lang::T('Add New Bank');?>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="alert alert-warning">
|
||||
<h4><i class="fa fa-warning"></i> <?php echo Lang::T('No Banks Available');?>
|
||||
</h4>
|
||||
<p><?php echo Lang::T('No banks with STK Push support are currently available. Please add banks first.');?>
|
||||
</p>
|
||||
<a href="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
banks/add" class="btn btn-primary">
|
||||
<i class="fa fa-plus"></i> <?php echo Lang::T('Add First Bank');?>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
<?php }?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
/* Smarty version 4.3.1, created on 2025-09-17 17:33:34
|
||||
from '/var/www/html/yatmack/ui/ui/user-login.tpl' */
|
||||
|
||||
/* @var Smarty_Internal_Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
|
||||
'version' => '4.3.1',
|
||||
'unifunc' => 'content_68cac6becfc684_22454650',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'e8b4f2a010a0528cc3ba42274f02d4682f022f79' =>
|
||||
array (
|
||||
0 => '/var/www/html/yatmack/ui/ui/user-login.tpl',
|
||||
1 => 1757856356,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
),
|
||||
),false)) {
|
||||
function content_68cac6becfc684_22454650 (Smarty_Internal_Template $_smarty_tpl) {
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="48x48" href="favicon-48x48.png">
|
||||
<link rel="icon" type="image/png" sizes="64x64" href="favicon-64x64.png">
|
||||
<link rel="icon" type="image/svg+xml" href="favicon.svg">
|
||||
<title><?php echo Lang::T('Login');?>
|
||||
- <?php echo $_smarty_tpl->tpl_vars['_c']->value['CompanyName'];?>
|
||||
</title>
|
||||
<link rel="stylesheet" href="ui/ui/Css/lineicons.min.css">
|
||||
<link rel="stylesheet" href="ui/ui/Css/Style.css">
|
||||
|
||||
<meta http-equiv="refresh" content="<?php echo $_smarty_tpl->tpl_vars['time']->value;?>
|
||||
; url=<?php echo $_smarty_tpl->tpl_vars['url']->value;?>
|
||||
">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="login-div">
|
||||
<div class="logo"></div>
|
||||
<div class="title"><?php echo $_smarty_tpl->tpl_vars['_c']->value['CompanyName'];?>
|
||||
- Member Login</div>
|
||||
<?php if ((isset($_smarty_tpl->tpl_vars['notify']->value))) {?>
|
||||
<?php echo $_smarty_tpl->tpl_vars['notify']->value;?>
|
||||
|
||||
<?php }?>
|
||||
<form action="<?php echo $_smarty_tpl->tpl_vars['_url']->value;?>
|
||||
login/post" method="post">
|
||||
<div class="login-in">
|
||||
<div class="username">
|
||||
<i class="fa fa-user"></i>
|
||||
<div class="input-group">
|
||||
<?php if ($_smarty_tpl->tpl_vars['_c']->value['country_code_phone'] != '') {?>
|
||||
<span class="input-group-text" id="basic-addon1"><i
|
||||
class="fa fa-phone"></i></span>
|
||||
<?php } else { ?>
|
||||
<span class="input-group-text" id="basic-addon1"><i
|
||||
class="fa fa-user"></i></span>
|
||||
<?php }?>
|
||||
<input type="text" class="form-control" name="username"
|
||||
placeholder="<?php if ($_smarty_tpl->tpl_vars['_c']->value['country_code_phone'] != '') {
|
||||
echo $_smarty_tpl->tpl_vars['_c']->value['country_code_phone'];?>
|
||||
<?php echo Lang::T('Phone Number');
|
||||
} else { ?>Y123456789<?php }?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="password">
|
||||
<i class="fa fa-lock"></i>
|
||||
<input type="password" required class="form-control" name="password" placeholder="<?php echo Lang::T('Password');?>
|
||||
">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="buttons" value="<?php echo Lang::T('Login');?>
|
||||
">login</button>
|
||||
</form>
|
||||
</div>
|
||||
<?php echo '<script'; ?>
|
||||
src="assets/vendor/global/global.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
src="assets/vendor/bootstrap-select/dist/js/bootstrap-select.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
src="assets/vendor/chart.js/Chart.bundle.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<!-- Chart piety plugin files -->
|
||||
<?php echo '<script'; ?>
|
||||
src="assets/vendor/peity/jquery.peity.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<!-- Apex Chart -->
|
||||
<?php echo '<script'; ?>
|
||||
src="assets/vendor/apexchart/apexchart.js"><?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<!-- Dashboard 1 -->
|
||||
<?php echo '<script'; ?>
|
||||
src="assets/js/dashboard/dashboard-1.js"><?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
src="assets/js/custom.min.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
src="assets/js/deznav-init.js"><?php echo '</script'; ?>
|
||||
>
|
||||
<?php echo '<script'; ?>
|
||||
src="assets/js/demo.js"><?php echo '</script'; ?>
|
||||
>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<?php }
|
||||
}
|
||||
Reference in New Issue
Block a user