diff --git a/.gitignore b/.gitignore index f997804..1025436 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,8 @@ system/config.php ui/compiled/*.php ui/cache/*.php test.php -pages/ \ No newline at end of file +pages/ +system/cache/** +system/plugin/** +!system/cache/index.html +!system/plugin/index.html \ No newline at end of file diff --git a/system/boot.php b/system/boot.php index 72fd5d2..7d352b3 100644 --- a/system/boot.php +++ b/system/boot.php @@ -72,7 +72,6 @@ function _notify($msg, $type = 'e') } require_once('system/vendors/smarty/libs/Smarty.class.php'); -$_theme = APP_URL . '/ui/ui'; $lan_file = 'system/lan/' . $config['language'] . '/common.lan.php'; require($lan_file); $ui = new Smarty(); @@ -84,7 +83,6 @@ $ui->assign('app_url', APP_URL); $ui->assign('_domain', str_replace('www.', '', parse_url(APP_URL, PHP_URL_HOST))); define('U', APP_URL . '/index.php?_route='); $ui->assign('_url', APP_URL . '/index.php?_route='); -$ui->assign('_theme', $_theme); $ui->assign('_path', __DIR__); $ui->assign('_c', $config); $ui->assign('_L', $_L); diff --git a/system/cache/index.html b/system/cache/index.html new file mode 100644 index 0000000..e69de29 diff --git a/system/controllers/callback.php b/system/controllers/callback.php index 279805b..e37859c 100644 --- a/system/controllers/callback.php +++ b/system/controllers/callback.php @@ -3,26 +3,17 @@ /** * PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/) **/ -_auth(); -$ui->assign('_system_menu', 'order'); + $action = $routes['1']; -$user = User::_info(); -$ui->assign('_user', $user); -require('system/autoload/Paymentgateway.php'); -require('system/autoload/Recharge.php'); +if(file_exists('system/paymentgateway/'.$action.'.php')){ + include 'system/paymentgateway/'.$action.'.php'; + if(function_exists($action.'_payment_notification')){ + call_user_func($action.'_payment_notification'); + die(); + } +} -switch ($action) { - case 'xendit': - echo "done"; - break; - case 'midtrans': - echo "done"; - break; - case 'tripay': - echo '{"success": true}'; - break; - default: - echo "not found"; -} \ No newline at end of file +header('HTTP/1.1 404 Not Found'); +echo 'Not Found'; \ No newline at end of file diff --git a/system/controllers/prepaid.php b/system/controllers/prepaid.php index 5b9111d..b693897 100644 --- a/system/controllers/prepaid.php +++ b/system/controllers/prepaid.php @@ -708,7 +708,7 @@ switch ($action) { break; case 'refill': - $ui->assign('xfooter', ''); + $ui->assign('xfooter', ''); $c = ORM::for_table('tbl_customers')->find_many(); $ui->assign('c', $c); diff --git a/system/plugin/index.html b/system/plugin/index.html new file mode 100644 index 0000000..e69de29 diff --git a/ui/ui/admin.tpl b/ui/ui/admin.tpl index d85d4e8..55880f6 100644 --- a/ui/ui/admin.tpl +++ b/ui/ui/admin.tpl @@ -4,22 +4,22 @@ {$_title} - {$_L['Login']} - + - - + + - - + + - - + + - + diff --git a/ui/ui/invoice-print.tpl b/ui/ui/invoice-print.tpl index 80c36eb..c4a2ced 100644 --- a/ui/ui/invoice-print.tpl +++ b/ui/ui/invoice-print.tpl @@ -4,12 +4,12 @@ {$_title} - - + + @@ -48,8 +48,8 @@ - - + + {if isset($xfooter)} {$xfooter} {/if} diff --git a/ui/ui/login.tpl b/ui/ui/login.tpl index a5321dc..97e42e5 100644 --- a/ui/ui/login.tpl +++ b/ui/ui/login.tpl @@ -4,15 +4,14 @@ {$_title} - {$_L['Login']} - + - - + + - - + diff --git a/ui/ui/page-edit.tpl b/ui/ui/page-edit.tpl index 71e76d1..a029eea 100644 --- a/ui/ui/page-edit.tpl +++ b/ui/ui/page-edit.tpl @@ -23,7 +23,7 @@ - + - + + {if isset($xfooter)} {$xfooter} {/if} diff --git a/ui/ui/print-by-period.tpl b/ui/ui/print-by-period.tpl index 45e5a81..9033b00 100644 --- a/ui/ui/print-by-period.tpl +++ b/ui/ui/print-by-period.tpl @@ -4,8 +4,8 @@ {$_title} - - + +