diff --git a/ui/compiled/08e23caf2fce069c5839e43f97410f5ee0ccac0f_0.file.pagination.tpl.php b/ui/compiled/08e23caf2fce069c5839e43f97410f5ee0ccac0f_0.file.pagination.tpl.php new file mode 100644 index 0000000..f551d5d --- /dev/null +++ b/ui/compiled/08e23caf2fce069c5839e43f97410f5ee0ccac0f_0.file.pagination.tpl.php @@ -0,0 +1,61 @@ +_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) {?> + +_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); +?> +
+
+
+
+
+

+

+
+
+
+
+
+ +
+
+ + +
  +
+
+
+ + + + + + + + + + + + + + + + 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; +?> + tpl_vars['ds']->value['enabled'] != 1) {?>class="danger" title="disabled" > + + + + + + + + + + + smarty->ext->_foreach->restore($_smarty_tpl, 1);?> + +
+ + + + + + +ID +
tpl_vars['ds']->value['name'];?> +tpl_vars['ds']->value['ip_address'];?> +Loading...Loading...Loading...Loading... + + + + + tpl_vars['ds']->value['id'];?> + +
+ + + +
+
+
+ _subTemplateRender("file:pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +?> +
+
+
+
+
+_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +?> + + + + +> +$(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: '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('' + (error === 'timeout' ? 'Timeout' : 'Error') + ''); + row.find('.router-used-memory').html('' + (error === 'timeout' ? 'Timeout' : 'Error') + ''); + row.find('.router-cpu-load').html('' + (error === 'timeout' ? 'Timeout' : 'Error') + ''); + row.find('.router-status').html('' + (error === 'timeout' ? 'Timeout' : 'Error') + ''); + } 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('Online'); + } else { + statusElement.html('Offline'); + } + } 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('Offline'); + } + }); + }); + + // Option 2: Alternative bulk loading approach (commented out - uncomment to use) + /* + $.ajax({ + url: '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('Online'); + } else { + statusElement.html('Offline'); + } + } 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('Offline'); + } + }); + }, + 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('Error'); + } + }); + */ + + // 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: '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.'); + } + }); + } + }); +}); + +>_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); +?> +
+ +
+
+
+
+ tpl_vars['_admin']->value['user_type'],array('SuperAdmin','Admin'))) {?> +
+ CSV +
+ + + +
+
+
+
+
+
+ + +
+
+
+
+ + + +
  +
+
+
+ +: tpl_vars['d']->value);?> + + + tpl_vars['filter']->value != 'All') {?>( +: tpl_vars['filter']->value;?> +) +
+ + + + + + + + + + + + + + + + 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; +?> + tpl_vars['ds']->value['status'] != 'Active') {?>class="danger"> + + + + + + + + + + + smarty->ext->_foreach->restore($_smarty_tpl, 1);?> + +
+ + + + + + + +
tpl_vars['ds']->value['fullname'];?> +tpl_vars['ds']->value['username'];?> +tpl_vars['ds']->value['account_type'];?> +tpl_vars['ds']->value['address'];?> + + + tpl_vars['ds']->value['service_type'];?> + + + tpl_vars['ds']->value['status'];?> + + + +    +   +    +   + + +
+
+
+
+
+
+ + src="https://code.jquery.com/jquery-3.6.0.min.js"> +> + + src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"> +> + +> + var $j = jQuery.noConflict(); + $j(document).ready(function () { + $j('#customerTable').DataTable({ + "pagingType": "full_numbers" + }); + }); + +> +
+_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +} +} diff --git a/ui/compiled/1870870741ab42d31e133a8aee62a5607308152f_0.file.app-notifications.tpl.php b/ui/compiled/1870870741ab42d31e133a8aee62a5607308152f_0.file.app-notifications.tpl.php new file mode 100644 index 0000000..36fed9e --- /dev/null +++ b/ui/compiled/1870870741ab42d31e133a8aee62a5607308152f_0.file.app-notifications.tpl.php @@ -0,0 +1,569 @@ +_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); +?> + + + + + +> +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('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 = ' Testing cron job...'; + + fetch('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 = '
' + data + '
'; + }) + .catch(error => { + resultDiv.innerHTML = '
Error: ' + error + '
'; + }); +} + +> +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + +
+
+ + + +
+
+ +
+ +
+
+ + +
+
+ + +
+
+ +> + function autoExpand(element) { + element.style.height = 'auto'; + element.style.height = (element.scrollHeight) + 'px'; + } + +> +

+ [[name]] Customer Name | [[username]] Customer username | [[package]] Package name | [[price]] Package price | [[plan_type]] Service type (Hotspot/PPPoE) | [[service_portal]] Hotspot portal URL | [[support_contact]] Support contact | [[expired_date]] Expiration date | [[bills]] Additional bills +

+
+
+ +
+
+ + +
+
+ + +
+
+

+ [[name]] Customer Name | [[username]] Customer username | [[package]] Package name | [[price]] Package price | [[expired_date]] Expiration date | [[service_portal]] Hotspot portal URL | [[support_contact]] Support contact | [[bills]] Additional bills +

+
+
+ +
+
+ + +
+
+ + +
+
+

+ [[name]] Customer Name | [[username]] Customer username | [[package]] Package name | [[price]] Package price | [[expired_date]] Expiration date | [[service_portal]] Hotspot portal URL | [[support_contact]] Support contact | [[bills]] Additional bills +

+
+
+ +
+
+ + +
+
+ + +
+
+

+ [[name]] Customer Name | [[username]] Customer username | [[package]] Package name | [[price]] Package price | [[expired_date]] Expiration date | [[service_portal]] Hotspot portal URL | [[support_contact]] Support contact | [[bills]] Additional bills +

+
+
+ + +
+
+ Debug Information +
+
+
+
Troubleshooting Expiry Messages
+

If expiry messages are not working, check the following:

+
    +
  • Cron Job: Ensure cron jobs are running: php system/cron.php
  • +
  • Notification Settings: Check that "Expired Notification" is enabled in App Settings
  • +
  • SMS/WhatsApp Configuration: Verify SMS/WhatsApp settings are properly configured
  • +
  • Phone Numbers: Ensure customers have valid phone numbers in their profiles
  • +
  • Plan Type Detection: Check that plans have correct 'type' field (Hotspot/PPPOE)
  • +
+
+
+ Current Notification Settings:
+ + Expired: tpl_vars['_c']->value['user_notification_expired'] ?? null)===null||$tmp==='' ? 'Not Set' ?? null : $tmp);?> +
+ Reminder: tpl_vars['_c']->value['user_notification_reminder'] ?? null)===null||$tmp==='' ? 'Not Set' ?? null : $tmp);?> +
+ SMS URL: tpl_vars['_c']->value['sms_url'] ?? null)===null||$tmp==='' ? 'Not Set' ?? null : $tmp);?> +
+ WhatsApp URL: tpl_vars['_c']->value['wa_url'] ?? null)===null||$tmp==='' ? 'Not Set' ?? null : $tmp);?> + +
+
+
+ Test Cron Job:
+ +
+
+
+
+ +
+
+ + +
+
+
+ +
+ +
+

+ [[company_name]] Your Company Name at Settings. + [[address]] Your Company Address at Settings. + [[phone]] Your Company Phone at Settings. + [[invoice]] invoice number. + [[date]] Date invoice created. + [[payment_gateway]] Payment gateway user paid from. + [[payment_channel]] Payment channel user paid from. + [[type]] is Hotspot/PPPOE. + [[plan_name]] Internet Package. + [[plan_price]] Internet Package Prices. + [[name]] Receiver name. + [[user_name]] Username internet. + [[user_password]] User password. + [[expired_date]] Expired datetime. + [[footer]] Invoice Footer. + [[note]] For Notes by admin. +

+
+
+ +
+ +
+

+ [[company_name]] Your Company Name at Settings. + [[address]] Your Company Address at Settings. + [[phone]] Your Company Phone at Settings. + [[invoice]] invoice number. + [[date]] Date invoice created. + [[payment_gateway]] Payment gateway user paid from. + [[payment_channel]] Payment channel user paid from. + [[type]] is Hotspot/PPPOE. + [[plan_name]] Internet Package. + [[plan_price]] Internet Package Prices. + [[name]] Receiver name. + [[user_name]] Username internet. + [[user_password]] User password. + [[trx_date]] Transaction datetime. + [[balance_before]] Balance Before. + [[balance]] Balance After. + [[footer]] Invoice Footer. +

+
+ tpl_vars['_c']->value['enable_balance'] == 'yes') {?> +
+
+ +
+ +
+

+ [[name]] Receiver name. + [[balance]] how much balance have been send. + [[current_balance]] Current Balance. +

+
+
+
+
+ +
+ +
+

+ [[name]] Sender name. + [[balance]] how much balance have been received. + [[current_balance]] Current Balance. +

+
+
+ +
+
+
+ + +
+
+
+ +
+ +
+

+ [[company_name]] Your Company Name from Settings. + [[name]] Customer's full name. + [[user_name]] Customer's username. + [[username]] Customer's username (alternative). + [[password]] Customer's password. + [[service_type]] Service type (Hotspot/PPPOE). + [[footer]] Company footer message. +

+
+
+
+ +
+
+
+
+
+
+ +
+_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +} +} diff --git a/ui/compiled/201e26bc65c44cfa78a421ed22efe33068dd5cd0_0.file.header.tpl.php b/ui/compiled/201e26bc65c44cfa78a421ed22efe33068dd5cd0_0.file.header.tpl.php new file mode 100644 index 0000000..ca7f2c7 --- /dev/null +++ b/ui/compiled/201e26bc65c44cfa78a421ed22efe33068dd5cd0_0.file.header.tpl.php @@ -0,0 +1,1012 @@ +_decodeProperties($_smarty_tpl, array ( + 'version' => '4.3.1', + 'unifunc' => 'content_68cabf28e5e415_50547382', + 'has_nocache_code' => false, + 'file_dependency' => + array ( + '201e26bc65c44cfa78a421ed22efe33068dd5cd0' => + array ( + 0 => '/var/www/html/yatmack/ui/ui/sections/header.tpl', + 1 => 1758108402, + 2 => 'file', + ), + ), + 'includes' => + array ( + ), +),false)) { +function content_68cabf28e5e415_50547382 (Smarty_Internal_Template $_smarty_tpl) { +?> + + + + + + + + + + + + <?php echo $_smarty_tpl->tpl_vars['_title']->value;?> + - <?php echo $_smarty_tpl->tpl_vars['_c']->value['CompanyName'];?> + + + + + + + + + + + + src="ui/ui/scripts/sweetalert2.all.min.js"> +> + + + tpl_vars['xheader']->value))) {?> + tpl_vars['xheader']->value;?> + + + + + + +
+ + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+
+ + tpl_vars['_c']->value['maintenance_mode'] == 1) {?> +
+

+    +

+
+ + +
+ tpl_vars['notify']->value))) {?> + +> + // Display SweetAlert toast notification + Swal.fire({ + icon: 'tpl_vars['notify_t']->value == "s") {?>successerror', + title: 'tpl_vars['notify']->value;?> +', + toast: true, + position: 'top-end', + showConfirmButton: false, + timer: 5000, + timerProgressBar: true, + didOpen: (toast) => { + toast.addEventListener('mouseenter', Swal.stopTimer) + toast.addEventListener('mouseleave', Swal.resumeTimer) + } + }); + +> + _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); +?> +
+
+
+
+
+

+

+
+
+
+ +
+ + + + + +
+
+
+ +
+ + +
+
+
+ +
+ + + + + +
+
+ +
+ +
+ + + + + +
+
+
+ +
+ +
+

Postpaid Recharge for the first time use tpl_vars['_c']->value['currency_code'];?> + 0

+
+
+ +
+
+
+
+
+
+
+_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +?> + + +> +$(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: ' +...', + 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(''); + $("#plan").html(''); + $("#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(''); + $("#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); + } + }); +}); + +>_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); +?> +
+
+
+
+
+
+ +
+
+
+
+

+:

+

tpl_vars['_c']->value['date_format'],strtotime($_smarty_tpl->tpl_vars['mdate']->value));?> + tpl_vars['mtime']->value;?> +

+
+
+ + + + +
+
+
+ + + + + + + + + + + + + + + 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; +?> + + + + + + + + + + + smarty->ext->_foreach->restore($_smarty_tpl, 1);?> + +
+ + + + + + + +
tpl_vars['ds']->value['username'];?> +tpl_vars['ds']->value['type'];?> +tpl_vars['ds']->value['plan_name'];?> +tpl_vars['ds']->value['price']);?> +tpl_vars['ds']->value['recharged_on'],$_smarty_tpl->tpl_vars['ds']->value['recharged_time']);?> +tpl_vars['ds']->value['expiration'],$_smarty_tpl->tpl_vars['ds']->value['time']);?> +tpl_vars['ds']->value['method'];?> +tpl_vars['ds']->value['routers'];?> +
+
+ _subTemplateRender("file:pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +?> +
+

+:

+

tpl_vars['dr']->value);?> +

+
+

+: + tpl_vars['_c']->value['date_format'],strtotime($_smarty_tpl->tpl_vars['mdate']->value));?> + tpl_vars['mtime']->value;?> +

+
+
+
+
+
+
+_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +} +} diff --git a/ui/compiled/4fc9d1aacd9b9e29cc2e209df58e39240ebb4c99_0.file.hotspot.tpl.php b/ui/compiled/4fc9d1aacd9b9e29cc2e209df58e39240ebb4c99_0.file.hotspot.tpl.php new file mode 100644 index 0000000..7915cc8 --- /dev/null +++ b/ui/compiled/4fc9d1aacd9b9e29cc2e209df58e39240ebb4c99_0.file.hotspot.tpl.php @@ -0,0 +1,176 @@ +_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); +?> +
+
+
+
+
+ + +
+ sync +
+
+
+
+
+ +
+
+ + + +
  +
+
+ + + + + + + + + + + + + + + + + + + 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; +?> + tpl_vars['ds']->value['enabled'] != 1) {?>class="danger" title="disabled" tpl_vars['ds']->value['prepaid'] != 'yes') {?>class="warning" title="Postpaid" > + + + + + + + + + + + + + + smarty->ext->_foreach->restore($_smarty_tpl, 1);?> + +
+ + + + + + + + + + + +
tpl_vars['ds']->value['name_plan'];?> +tpl_vars['ds']->value['plan_type'];?> +tpl_vars['ds']->value['name_bw'];?> +tpl_vars['ds']->value['typebp'];?> +tpl_vars['ds']->value['price']);?> +tpl_vars['ds']->value['time_limit'];?> + tpl_vars['ds']->value['time_unit'];?> +tpl_vars['ds']->value['data_limit'];?> + tpl_vars['ds']->value['data_unit'];?> +tpl_vars['ds']->value['validity'];?> + tpl_vars['ds']->value['validity_unit'];?> + + tpl_vars['ds']->value['is_radius']) {?> + RADIUS + + tpl_vars['ds']->value['routers'] != '') {?> + tpl_vars['ds']->value['routers'];?> + + + + tpl_vars['ds']->value['pool_expired']; +if ($_smarty_tpl->tpl_vars['ds']->value['list_expired']) { +if ($_smarty_tpl->tpl_vars['ds']->value['pool_expired']) {?> | + tpl_vars['ds']->value['list_expired']; +}?>tpl_vars['ds']->value['id'];?> + + + + +
+
+ _subTemplateRender("file:pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +?> +
+
+
+
+
+_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +} +} diff --git a/ui/compiled/562328f41f658b67c29feebb3eacc9482a3384a0_0.file.footer.tpl.php b/ui/compiled/562328f41f658b67c29feebb3eacc9482a3384a0_0.file.footer.tpl.php new file mode 100644 index 0000000..aa5f372 --- /dev/null +++ b/ui/compiled/562328f41f658b67c29feebb3eacc9482a3384a0_0.file.footer.tpl.php @@ -0,0 +1,185 @@ +_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) { +?>
+
+ + + + +
+ + + + + src="ui/ui/scripts/jquery.min.js"> +> + + src="ui/ui/assets/vendor/global/global.min.js"> +> + + src="ui/ui/scripts/bootstrap.min.js"> +> + + src="ui/ui/assets/vendor/bootstrap-select/dist/js/bootstrap-select.min.js"> +> + + src="ui/ui/assets/vendor/chart.js/Chart.bundle.min.js"> +> + + + + src="ui/ui/assets/vendor/peity/jquery.peity.min.js"> +> + + + + src="ui/ui/assets/vendor/apexchart/apexchart.js?v= + echo time(); '; ?> +"> +> + + + + src="ui/ui/assets/js/dashboard/dashboard-1.js?v= + echo time(); '; ?> +"> +> + + + src="ui/ui/assets/js/custom.min.js"> +> + + src="ui/ui/assets/js/deznav-init.js"> +> + + src="ui/ui/assets/js/demo.js"> +> + + + + + src="ui/ui/scripts/plugins/select2.full.min.js"> +> + + src="ui/ui/scripts/pace.min.js"> +> + + src="ui/ui/scripts/custom.js"> +> + + + + tpl_vars['xfooter']->value))) {?> + tpl_vars['xfooter']->value;?> + + + + +> + $(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(``); + }, false); + } else { + if (el.attachEvent) { + el.attachEvent("click", function() { + $(this).html(``); + }); + } + } + }); + + 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() { + +> + + + +_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); +?> + +
+
+
+
+
+
+ + +
+ +
+
+ + +
+
+
+
+

tpl_vars['stats']->value['total_runs'];?> +

+

Total Runs (7 days)

+
+
+
+
+
+
+

tpl_vars['stats']->value['successful_runs'];?> +

+

Successful Runs

+
+
+
+
+
+
+

tpl_vars['stats']->value['failed_runs'];?> +

+

Failed Runs

+
+
+
+
+
+
+

tpl_vars['stats']->value['avg_execution_time'];?> +s

+

Avg Execution Time

+
+
+
+
+ + +
+
Last Run Information
+

Last Run: tpl_vars['stats']->value['last_run']) { +echo $_smarty_tpl->tpl_vars['stats']->value['last_run']; +} else { ?>Never

+

Last Success: tpl_vars['stats']->value['last_success']) { +echo $_smarty_tpl->tpl_vars['stats']->value['last_success']; +} else { ?>Never

+

Last Failure: tpl_vars['stats']->value['last_failure']) { +echo $_smarty_tpl->tpl_vars['stats']->value['last_failure']; +} else { ?>Never

+
+ + +
+
+
+
+ +
+
+ +
+
+ +
+ + + Clear + +
+
+
+ + +
+ + + + + + + + + + + + + + + + + + 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; +?> + + + + + + + + + + + + + + tpl_vars['log']->do_else) { +?> + + + + smarty->ext->_foreach->restore($_smarty_tpl, 1);?> + +
IDTypeStartedFinishedStatusDurationExpired UsersNotificationsAuto RenewalsMemoryError
tpl_vars['log']->value['id'];?> + + + tpl_vars['log']->value['cron_type'] ?? '', 'UTF-8');?> + + + tpl_vars['log']->value['started_at'];?> +tpl_vars['log']->value['finished_at']) { +echo $_smarty_tpl->tpl_vars['log']->value['finished_at']; +} else { ?>- + + tpl_vars['log']->value['status'] ?? '', 'UTF-8');?> + + + + tpl_vars['log']->value['execution_time']) {?> + tpl_vars['log']->value['execution_time'];?> +s + + - + + + tpl_vars['log']->value['expired_users_processed'];?> + + tpl_vars['log']->value['expired_users_found'] != $_smarty_tpl->tpl_vars['log']->value['expired_users_processed']) {?> + (tpl_vars['log']->value['expired_users_found'];?> + found) + + + tpl_vars['log']->value['notifications_sent'];?> + + + tpl_vars['log']->value['auto_renewals_attempted'] > 0) {?> + tpl_vars['log']->value['auto_renewals_successful'];?> +/tpl_vars['log']->value['auto_renewals_attempted'];?> + + + - + + + tpl_vars['log']->value['memory_usage']) {?> + tpl_vars['log']->value['memory_usage'];?> + + + - + + + tpl_vars['log']->value['error_message']) {?> + + + + + - + +
+ No cron logs found +
+
+ + + _subTemplateRender("file:pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +?> + + +
+
Legend:
+
    +
  • COMPLETED - Cron job finished successfully
  • +
  • FAILED - Cron job encountered an error
  • +
  • RUNNING - Cron job is currently running
  • +
+
+ +
+
+
+
+
+ +_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +} +} diff --git a/ui/compiled/637a99453ac765d6df88517e7643179436d4c833_0.file.recharge-confirm.tpl.php b/ui/compiled/637a99453ac765d6df88517e7643179436d4c833_0.file.recharge-confirm.tpl.php new file mode 100644 index 0000000..293c2c5 --- /dev/null +++ b/ui/compiled/637a99453ac765d6df88517e7643179436d4c833_0.file.recharge-confirm.tpl.php @@ -0,0 +1,186 @@ +_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); +?> +
+
+
+
+
+

+

+
+
+
+
    +
  • + + tpl_vars['cust']->value['username'];?> + +
  • +
  • + + tpl_vars['cust']->value['fullname'];?> + +
  • +
  • + + tpl_vars['cust']->value['phonenumber'];?> + +
  • +
  • + + tpl_vars['cust']->value['email'];?> + +
  • +
  • + + tpl_vars['cust']->value['address'];?> + +
  • +
  • + + tpl_vars['cust']->value['balance']);?> + +
  • +
+
+
+
    +
  • + + tpl_vars['plan']->value['name_plan'];?> + +
  • +
  • + + tpl_vars['plan']->value['is_radius']) {?>Radiustpl_vars['plan']->value['routers']; +}?> +
  • +
  • + + tpl_vars['plan']->value['prepaid'] == 'yes') {?>PrepaidPostpaid + tpl_vars['plan']->value['type'];?> + +
  • +
  • + + tpl_vars['using']->value == 'zero') { +echo Lang::moneyFormat(0); +} else { +echo Lang::moneyFormat($_smarty_tpl->tpl_vars['plan']->value['price']); +}?> +
  • +
  • + + tpl_vars['plan']->value['validity'];?> + + tpl_vars['plan']->value['validity_unit'];?> + +
  • +
  • + + tpl_vars['using']->value);?> + +
  • +
+
+
+
    + tpl_vars['using']->value != 'zero' && $_smarty_tpl->tpl_vars['add_cost']->value > 0) {?> + 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; +?> +
  • + tpl_vars['k']->value;?> + tpl_vars['v']->value);?> + +
  • + smarty->ext->_foreach->restore($_smarty_tpl, 1);?> +
  • + + tpl_vars['add_cost']->value);?> + +
  • +
  • + + ( + + +)tpl_vars['plan']->value['price']+$_smarty_tpl->tpl_vars['add_cost']->value);?> + +
  • + +
  • + + tpl_vars['using']->value == 'zero') { +echo Lang::moneyFormat(0); +} else { +echo Lang::moneyFormat($_smarty_tpl->tpl_vars['plan']->value['price']); +}?> +
  • + +
+
+ + + + + +
+
+ + +
+
+
+
+
+
+
+_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +} +} diff --git a/ui/compiled/6be11145f2e44fb62e85b7f62586d0954f7edb37_0.file.plan.tpl.php b/ui/compiled/6be11145f2e44fb62e85b7f62586d0954f7edb37_0.file.plan.tpl.php new file mode 100644 index 0000000..153dc43 --- /dev/null +++ b/ui/compiled/6be11145f2e44fb62e85b7f62586d0954f7edb37_0.file.plan.tpl.php @@ -0,0 +1,503 @@ +_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); +?> +
+
+
+
+
+

Plans

+ tpl_vars['_admin']->value['user_type'],array('SuperAdmin','Admin'))) {?> +
+
+ sync +
+
+ CSV +
+
+ +   +
+
+
+
+ +
+
+ + +
  +
+
+ + + + + + + + + + + + + + + + + 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; +?> + + tpl_vars['ds']->value['is_off']) {?>class="danger" tpl_vars['ds']->value['is_suspended']) {?>class="warning" > + + + + + + + + + + + + smarty->ext->_foreach->restore($_smarty_tpl, 1);?> + +
+ + + + + + + + + +
tpl_vars['ds']->value['username'];?> +tpl_vars['ds']->value['namebp'];?> +tpl_vars['ds']->value['type'];?> +tpl_vars['ds']->value['recharged_on'],$_smarty_tpl->tpl_vars['ds']->value['recharged_time']);?> +tpl_vars['ds']->value['expiration'],$_smarty_tpl->tpl_vars['ds']->value['time']);?> + + tpl_vars['ds']->value['is_active']) {?> + Active + tpl_vars['ds']->value['is_suspended'] && $_smarty_tpl->tpl_vars['ds']->value['is_expired']) {?> + Suspended + tpl_vars['ds']->value['is_suspended'] && !$_smarty_tpl->tpl_vars['ds']->value['is_expired']) {?> + Suspending + + Inactive + + + tpl_vars['ds']->value['is_suspended'] && !$_smarty_tpl->tpl_vars['ds']->value['is_expired']) {?> + + Calculating... + + tpl_vars['ds']->value['is_expired']) {?> + Expired + + - + + tpl_vars['ds']->value['method'];?> +tpl_vars['ds']->value['routers'];?> + + + + tpl_vars['ds']->value['is_off'] && !($_smarty_tpl->tpl_vars['ds']->value['is_suspended'] && $_smarty_tpl->tpl_vars['ds']->value['is_expired'])) {?> + + tpl_vars['ds']->value['is_suspended'] && $_smarty_tpl->tpl_vars['ds']->value['is_expired']) {?> + + + + + + + + + + + + + + + tpl_vars['_admin']->value['user_type'],array('SuperAdmin','Admin'))) {?> + + +
+
+ _subTemplateRender("file:pagination.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +?> +
+
+
+
+
+ + + + + + + + +> + // 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 = ' Inactive'; + } + + 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(''); + $("#modal_plan").html(''); + $("#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(''); + $("#modal-plan-help").text('Select a router and type first to load available plans'); + } + }); + } + +> + +_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +} +} diff --git a/ui/compiled/835672ecbe0b419aa67842d7f88c05944d874b22_0.file.router-error.tpl.php b/ui/compiled/835672ecbe0b419aa67842d7f88c05944d874b22_0.file.router-error.tpl.php new file mode 100644 index 0000000..5c4adbd --- /dev/null +++ b/ui/compiled/835672ecbe0b419aa67842d7f88c05944d874b22_0.file.router-error.tpl.php @@ -0,0 +1,101 @@ +_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) { +?> + + + + + + + + + + + + <?php echo Lang::T('Login');?> + - <?php echo $_smarty_tpl->tpl_vars['_c']->value['CompanyName'];?> + + + + + + + + + +
+
+
+
+
+

+ tpl_vars['error_title']->value;?> + +

+
+
+
tpl_vars['error_message']->value;?> +
+
+
Mikrotik troubleshooting:
+
    +
  1. 1. Make sure you use API Port, Default 8728
  2. +
  3. 2. Make sure Username and Password are correct
  4. +
  5. 3. Make sure your hosting is not blocking port to external
  6. +
  7. 4. Make sure your is Mikrotik accessible from MikroPulse
  8. +
+ Note: If you just update MikroPulse from upload files, try + contact admin +
+ +
+
+
+
+ + +_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); +?> +
+
+
+
+
tpl_vars['in']->value['invoice'];?> +
+
+
+

+                                    
+                                    
+                                    
+ + + + WhatsApp + + + + +
+
+
+
+
+
+ + type="text/javascript"> + var s5_taf_parent = window.location; + document.getElementById('content').innerHTML = document.getElementById('formcontent').innerHTML; + +> +
+_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +} +} diff --git a/ui/compiled/8ca5bde7adf30e16d398afc5afbdb239fde67591_0.file.dashboard.tpl.php b/ui/compiled/8ca5bde7adf30e16d398afc5afbdb239fde67591_0.file.dashboard.tpl.php new file mode 100644 index 0000000..3d348bb --- /dev/null +++ b/ui/compiled/8ca5bde7adf30e16d398afc5afbdb239fde67591_0.file.dashboard.tpl.php @@ -0,0 +1,621 @@ +_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);?> + + + + + +
+unusedused
tpl_vars['stok']->value['name_plan'];?> +tpl_vars['stok']->value['unused'];?> +tpl_vars['stok']->value['used'];?> +
Totaltpl_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); +} +} diff --git a/ui/compiled/8e5ffc4f83e557b719bacdc912f57a375063c8ed_0.file.autoload-server.tpl.php b/ui/compiled/8e5ffc4f83e557b719bacdc912f57a375063c8ed_0.file.autoload-server.tpl.php new file mode 100644 index 0000000..b638585 --- /dev/null +++ b/ui/compiled/8e5ffc4f83e557b719bacdc912f57a375063c8ed_0.file.autoload-server.tpl.php @@ -0,0 +1,41 @@ +_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) { +?> +tpl_vars['_c']->value['radius_enable']) {?> + +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; +?> + +smarty->ext->_foreach->restore($_smarty_tpl, 1); +} +} diff --git a/ui/compiled/9132aaddb82f6bbacdb0983f17c84a0de279ae03_0.file.voucher.tpl.php b/ui/compiled/9132aaddb82f6bbacdb0983f17c84a0de279ae03_0.file.voucher.tpl.php new file mode 100644 index 0000000..2b82a2f --- /dev/null +++ b/ui/compiled/9132aaddb82f6bbacdb0983f17c84a0de279ae03_0.file.voucher.tpl.php @@ -0,0 +1,191 @@ +_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); +?> +
+
+
+
+
+ tpl_vars['_admin']->value['user_type'],array('SuperAdmin','Admin'))) {?> + + +   +
+
+
+
+ +
+
+
+
+ + +
+
+
+
+ Print +
+
+
  +
+
+ + + + + + + + + + + + + + + + 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; +?> + tpl_vars['ds']->value['status'] == '1') {?>class="danger" > + + + + + + + + + + + smarty->ext->_foreach->restore($_smarty_tpl, 1);?> + +
ID + + + + + + + +
tpl_vars['ds']->value['id'];?> +tpl_vars['ds']->value['type'];?> +tpl_vars['ds']->value['routers'];?> +tpl_vars['ds']->value['name_plan'];?> + + tpl_vars['ds']->value['code'];?> +tpl_vars['ds']->value['status'] == '0') {?> + tpl_vars['ds']->value['user'] == '0') {?> - + tpl_vars['ds']->value['user'];?> + + tpl_vars['ds']->value['generated_by']) {?> + tpl_vars['admins']->value[$_smarty_tpl->tpl_vars['ds']->value['generated_by']];?> + + - + + + tpl_vars['ds']->value['status'] != '1') {?> +    +   + + tpl_vars['_admin']->value['user_type'],array('SuperAdmin','Admin'))) {?> + + +
+
+
    + tpl_vars['page']->value > 0) {?> +
  • +
  • + + tpl_vars['d']->value) {?> +
  • +
  • + +
+
+
+
+
+
+_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +} +} diff --git a/ui/compiled/938fa3566b44095e856068181e871c9bdbd8f1ae_0.file.autoload.tpl.php b/ui/compiled/938fa3566b44095e856068181e871c9bdbd8f1ae_0.file.autoload.tpl.php new file mode 100644 index 0000000..8133790 --- /dev/null +++ b/ui/compiled/938fa3566b44095e856068181e871c9bdbd8f1ae_0.file.autoload.tpl.php @@ -0,0 +1,44 @@ +_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) { +?> +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; +?> + +smarty->ext->_foreach->restore($_smarty_tpl, 1); +} +} diff --git a/ui/compiled/9429e7b796d9fca229920da6c20738be853b64e9_0.file.paymentgateway.tpl.php b/ui/compiled/9429e7b796d9fca229920da6c20738be853b64e9_0.file.paymentgateway.tpl.php new file mode 100644 index 0000000..509503f --- /dev/null +++ b/ui/compiled/9429e7b796d9fca229920da6c20738be853b64e9_0.file.paymentgateway.tpl.php @@ -0,0 +1,80 @@ +_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); +?> +
+
+
+
+
+
+

+

+
+
+ + + 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; +?> + + + + + + smarty->ext->_foreach->restore($_smarty_tpl, 1);?> + +
tpl_vars['pg']->value,$_smarty_tpl->tpl_vars['actives']->value)) {?>checked value="tpl_vars['pg']->value;?> +">tpl_vars['pg']->value);?> + +
+
+ +
+
+
+
+
+_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +} +} diff --git a/ui/compiled/94e13b845eb661db4d0acd438948d2cc5489fdaa_0.file.autoload-pool.tpl.php b/ui/compiled/94e13b845eb661db4d0acd438948d2cc5489fdaa_0.file.autoload-pool.tpl.php new file mode 100644 index 0000000..2259d5b --- /dev/null +++ b/ui/compiled/94e13b845eb661db4d0acd438948d2cc5489fdaa_0.file.autoload-pool.tpl.php @@ -0,0 +1,40 @@ +_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) { +?> +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; +?> + +smarty->ext->_foreach->restore($_smarty_tpl, 1); +} +} diff --git a/ui/compiled/a6ac35c35881c7f09f450f4134deff1cb44e420d_0.file.hotspot-add.tpl.php b/ui/compiled/a6ac35c35881c7f09f450f4134deff1cb44e420d_0.file.hotspot-add.tpl.php new file mode 100644 index 0000000..a0513eb --- /dev/null +++ b/ui/compiled/a6ac35c35881c7f09f450f4134deff1cb44e420d_0.file.hotspot-add.tpl.php @@ -0,0 +1,309 @@ +_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); +?> +
+
+
+
+
+
+
+
+
+ +
+ Enable + Disable +
+
+
+ +
+ Prepaid + Postpaid +
+
+ +
+ +
+ Personal + Business +
+
+ tpl_vars['_c']->value['radius_enable']) {?> +
+ +
+ +
+

+

+
+ +
+ +
+ +
+
+
+ +
+ + + + + +
+
+ + + +
+ +
+ +
+
+
+ +
+
+ tpl_vars['_c']->value['currency_code'];?> + + +
+
+
+
+ +
+ +

+

+
+
+
+ +
+ +
+
+ +
+

+

+
+ +
+ +
+ +

+

+
+
+
+ + +
+ +
+ +
+
+
+
+
+ + Or + +
+
+
+
+
+
+
+
+ +> + var preOpt = ` + + + `; + var postOpt = ``; + function prePaid() { + $("#validity_unit").html(preOpt); + } + + function postPaid() { + $("#validity_unit").html(postOpt); + } + document.addEventListener("DOMContentLoaded", function(event) { + prePaid() + }) + +> + tpl_vars['_c']->value['radius_enable']) {?> + + +> + 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'); + } + } + +> + + +
+_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +} +} diff --git a/ui/compiled/cba6c0be1b673672973fcf86fe42360f1df48934_0.file.message-bulk.tpl.php b/ui/compiled/cba6c0be1b673672973fcf86fe42360f1df48934_0.file.message-bulk.tpl.php new file mode 100644 index 0000000..ac17a88 --- /dev/null +++ b/ui/compiled/cba6c0be1b673672973fcf86fe42360f1df48934_0.file.message-bulk.tpl.php @@ -0,0 +1,231 @@ +_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); +?> +
+ +
+
+
+
+

+

+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ +
+ + + +
+

+ + +
+ [[name]] - + +
+ [[user_name]] - + +
+ [[phone]] - + +
+ [[company_name]] - + +

+
+
+
+
+ + + +
+
+
+
+ +
+
+
+ + tpl_vars['batchStatus']->value) {?> +

Total SMS Sent: tpl_vars['totalSMSSent']->value;?> + Total SMS + Failed: tpl_vars['totalSMSFailed']->value;?> + Total WhatsApp Sent: + tpl_vars['totalWhatsappSent']->value;?> + Total WhatsApp Failed: + tpl_vars['totalWhatsappFailed']->value;?> +

+ +
+
+
+

Message Results

+
+ +
+ + + + + + + + + + + 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; +?> + + + + + + + smarty->ext->_foreach->restore($_smarty_tpl, 1);?> + +
NamePhoneMessageStatus
tpl_vars['customer']->value['name'];?> +tpl_vars['customer']->value['phone'];?> +tpl_vars['customer']->value['message'];?> +tpl_vars['customer']->value['status'];?> +
+
+ +
+
+ +
+ + + src="https://code.jquery.com/jquery-3.6.0.min.js"> +> + + src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"> +> + +> + var $j = jQuery.noConflict(); + + $j(document).ready(function () { + $j('#messageResultsTable').DataTable(); + }); + +> +
+_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +} +} diff --git a/ui/compiled/e55c1fbb39343a012d1e05d5709d5bac739ea069_0.file.bankstkpush.tpl.php b/ui/compiled/e55c1fbb39343a012d1e05d5709d5bac739ea069_0.file.bankstkpush.tpl.php new file mode 100644 index 0000000..c019307 --- /dev/null +++ b/ui/compiled/e55c1fbb39343a012d1e05d5709d5bac739ea069_0.file.bankstkpush.tpl.php @@ -0,0 +1,160 @@ +_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); +?> +
+
+
+
+
+
+
+
+

+

+
+ +
+
+
+ tpl_vars['banks']->value) {?> +
+ +
+ + + +
+
+ + tpl_vars['selected_bank']->value) {?> +
+ +
+
+
+ +: tpl_vars['selected_bank']->value->name;?> +
+ +: tpl_vars['selected_bank']->value->account_number;?> +
+ +: tpl_vars['selected_bank']->value->account_name;?> +
+ tpl_vars['selected_bank']->value->bank_code) {?> + +: tpl_vars['selected_bank']->value->bank_code;?> +
+ + tpl_vars['selected_bank']->value->paybill) {?> + +: tpl_vars['selected_bank']->value->paybill;?> +
+ +
+
+
+
+ + +
+
+
+ + + +
+
+
+ +
+
+ + + + + +
+
+ +
+

+

+

+

+ + + + +
+ +
+
+
+
+
+
+ + +_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); +} +} diff --git a/ui/compiled/e8b4f2a010a0528cc3ba42274f02d4682f022f79_0.file.user-login.tpl.php b/ui/compiled/e8b4f2a010a0528cc3ba42274f02d4682f022f79_0.file.user-login.tpl.php new file mode 100644 index 0000000..597e4e9 --- /dev/null +++ b/ui/compiled/e8b4f2a010a0528cc3ba42274f02d4682f022f79_0.file.user-login.tpl.php @@ -0,0 +1,123 @@ +_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) { +?> + + + + + + + + + + + + <?php echo Lang::T('Login');?> + - <?php echo $_smarty_tpl->tpl_vars['_c']->value['CompanyName'];?> + + + + + + + + +
+ +
tpl_vars['_c']->value['CompanyName'];?> + - Member Login
+ tpl_vars['notify']->value))) {?> + tpl_vars['notify']->value;?> + + +
+ + +
+
+ + src="assets/vendor/global/global.min.js"> +> + + src="assets/vendor/bootstrap-select/dist/js/bootstrap-select.min.js"> +> + + src="assets/vendor/chart.js/Chart.bundle.min.js"> +> + + + src="assets/vendor/peity/jquery.peity.min.js"> +> + + + + src="assets/vendor/apexchart/apexchart.js"> +> + + + + src="assets/js/dashboard/dashboard-1.js"> +> + + + src="assets/js/custom.min.js"> +> + + src="assets/js/deznav-init.js"> +> + + src="assets/js/demo.js"> +> + + + +