From 1c63cd674c00a358909b1fa3814ba8041047d5a8 Mon Sep 17 00:00:00 2001 From: Ibnu Maksum Date: Sat, 17 Sep 2022 21:05:24 +0700 Subject: [PATCH] no themes --- .gitignore | 6 +++++- system/boot.php | 2 -- system/cache/index.html | 0 system/controllers/callback.php | 29 ++++++++++------------------ system/controllers/prepaid.php | 2 +- system/plugin/index.html | 0 ui/ui/admin.tpl | 16 ++++++++-------- ui/ui/invoice-print.tpl | 10 +++++----- ui/ui/login.tpl | 9 ++++----- ui/ui/page-edit.tpl | 2 +- ui/ui/print-by-date.tpl | 8 ++++---- ui/ui/print-by-period.tpl | 8 ++++---- ui/ui/print-voucher.tpl | 4 ++-- ui/ui/register-otp.tpl | 17 ++++++++--------- ui/ui/register-rotp.tpl | 17 ++++++++--------- ui/ui/register.tpl | 17 ++++++++--------- ui/ui/sections/footer.tpl | 34 ++++++++++++++++----------------- ui/ui/sections/header.tpl | 26 ++++++++++++------------- ui/ui/sections/user-footer.tpl | 24 +++++++++++------------ ui/ui/sections/user-header.tpl | 26 ++++++++++++------------- 20 files changed, 123 insertions(+), 134 deletions(-) create mode 100644 system/cache/index.html create mode 100644 system/plugin/index.html diff --git a/.gitignore b/.gitignore index f9978048..1025436b 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 72fd5d22..7d352b33 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 00000000..e69de29b diff --git a/system/controllers/callback.php b/system/controllers/callback.php index 279805b4..e37859ce 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 5b9111d0..b6938971 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 00000000..e69de29b diff --git a/ui/ui/admin.tpl b/ui/ui/admin.tpl index d85d4e82..55880f6d 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 80c36eb9..c4a2cedf 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 a5321dc3..97e42e55 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 71e76d14..a029eea2 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 45e5a813..9033b00c 100644 --- a/ui/ui/print-by-period.tpl +++ b/ui/ui/print-by-period.tpl @@ -4,8 +4,8 @@ {$_title} - - + +