<?php
/* Smarty version 3.1.29, created on 2025-11-06 12:00:13
  from "/home/firenetv/mtkapi.site/templates/js/page/logcredit_js.tpl" */

if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
  'has_nocache_code' => false,
  'version' => '3.1.29',
  'unifunc' => 'content_690c639d9ae4a3_31670171',
  'file_dependency' => 
  array (
    '61aba5a1f0bc73ca79d18dd70b390772d478ccfa' => 
    array (
      0 => '/home/firenetv/mtkapi.site/templates/js/page/logcredit_js.tpl',
      1 => 1752583782,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_690c639d9ae4a3_31670171 ($_smarty_tpl) {
echo '<script'; ?>
>
$('document').ready(function()
{
    $.fn.dataTable.ext.errMode = () => swal(`Failed`, `Failed getting data from AJAX.`, `warning`, {
        button: false,
        closeOnClickOutside: false,
        timer: 3000
    }).then(() => {
        location.reload()
    });
	table = $('.table-credits').dataTable({
        "bProcessing": false,
        "bServerSide": true,
        "ajax": {
            "url": "/log-credit-serverside",
            "type": "POST"
        },
        "language": {                
                "infoFiltered": ""
            },
		order: [[0, 'desc']],
        columnDefs: [
          {
            width: '20%',
            targets: 0,
          },
          {
            width: '20%',
            targets: 1,
          },
          {
            width: '20%',
            targets: 2,
          },
          {
            width: '20%',
            targets: 3,
          },
          {
            width: '20%',
            targets: 4,
          },
        ],
	});
	function getD(){
        $.ajax({
            url: "<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
serverside/data/get_data.php",
            type: "GET",
            dataType: "JSON",
        	cache: false,
            success: function(data)
            {
        		if(data.response == 1){
       
                }
                if(data.response == 2){
                	swal(`Error`, data.licmsg, `error`, {
                        button: false,
                        closeOnClickOutside: false,
                        timer: 5000
                    }).then(() => {
                        location.reload()
                    });
                }
                if(data.response == 3){
                	swal(`Error`, data.licmsg, `error`, {
                        button: false,
                        closeOnClickOutside: false,
                        timer: 5000
                    }).then(() => {
                        location.reload()
                    });
                }
            },
            error: function (jqXHR, textStatus, errorThrown)
            {
                swal(`Error`, `Error parsing data.`, `error`, {
                    button: false,
                    closeOnClickOutside: false,
                    timer: 3000
                }).then(() => {
                    location.reload()
                });
            },
            complete: function(){
        
        	}
        });
    }
    getD()
});
<?php echo '</script'; ?>
><?php }
}
