_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); ?>

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']);?>

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']);?>

tpl_vars['u_act']->value;?> /tpl_vars['u_all']->value;?>

tpl_vars['c_all']->value;?>

tpl_vars['_c']->value['hide_mrc'] != 'yes') {?>
tpl_vars['_c']->value['hide_tms'] != 'yes') {?>
tpl_vars['_c']->value['hide_uet'] != 'yes') {?>

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; ?> smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
tpl_vars['expired']->value['fullname'];?> tpl_vars['expired']->value['username'];?> tpl_vars['expired']->value['recharged_on'],$_smarty_tpl->tpl_vars['expired']->value['recharged_time']);?> tpl_vars['expired']->value['expiration'],$_smarty_tpl->tpl_vars['expired']->value['time']);?> tpl_vars['expired']->value['routers'];?> tpl_vars['expired']->value['namebp'];?>
  _subTemplateRender("file:pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); ?>
tpl_vars['_c']->value['disable_voucher'] != 'yes' && $_smarty_tpl->tpl_vars['stocks']->value['unused'] > 0 || $_smarty_tpl->tpl_vars['stocks']->value['used'] > 0) {?> tpl_vars['_c']->value['hide_vs'] != 'yes') {?>
Vouchers Stock
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; ?> smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
unused used
tpl_vars['stok']->value['name_plan'];?> tpl_vars['stok']->value['unused'];?> tpl_vars['stok']->value['used'];?>
Total tpl_vars['stocks']->value['unused'];?> tpl_vars['stocks']->value['used'];?>
tpl_vars['_c']->value['hide_aui'] != 'yes') {?>

tpl_vars['_c']->value['hide_al'] != 'yes') {?>
    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; ?>
  • tpl_vars['dlogs']->value['date'],true);?>

    tpl_vars['dlogs']->value['description'];?>

  • smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
src="https://cdn.jsdelivr.net/npm/chart.js@3.5.1/dist/chart.min.js"> > type="text/javascript"> tpl_vars['_c']->value['hide_mrc'] != 'yes') {?> document.addEventListener("DOMContentLoaded", function() { var counts = JSON.parse('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)' } } } } }); }); tpl_vars['_c']->value['hide_tmc'] != 'yes') {?> document.addEventListener("DOMContentLoaded", function() { var monthlySales = JSON.parse('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; } 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 = 'tpl_vars['u_act']->value;?> '; var c_all = 'tpl_vars['c_all']->value;?> '; var u_all = '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 }); }); > src="https://code.jquery.com/jquery-3.6.0.min.js"> > > $(document).ready(function() { $.ajax({ url: "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); } }); }); > _subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); } }