Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
2d095aef08 | |||
c906d47674 | |||
5dd430f9b2 | |||
7c88be8865 | |||
b45f5a5587 | |||
10e788e9a2 | |||
7ceb883826 | |||
80e78d9796 | |||
534d62d944 | |||
1857c145d1 | |||
12cdef4f66 | |||
b4bec8964d | |||
64f52d6c1c | |||
b504723e7c | |||
470c219e61 | |||
5867a0c9ca | |||
f38da8d3c0 | |||
7e0e09f9bf | |||
90e6283426 | |||
24df116003 |
15
CHANGELOG.md
15
CHANGELOG.md
@ -2,6 +2,21 @@
|
|||||||
|
|
||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 2024.1.17
|
||||||
|
|
||||||
|
- Add minor change, for plugin, menu can have notifications by @Focuslinkstech
|
||||||
|
|
||||||
|
## 2024.1.16
|
||||||
|
|
||||||
|
- Add yellow color to table for plan not allowed to purchase
|
||||||
|
- Fix Radius pool select
|
||||||
|
- add price to reminder notification
|
||||||
|
- Support thermal printer for invoice
|
||||||
|
|
||||||
|
## 2024.1.15
|
||||||
|
|
||||||
|
- Fix cron job for Plan only for admin by @Focuslinkstech
|
||||||
|
|
||||||
## 2024.1.11
|
## 2024.1.11
|
||||||
|
|
||||||
- Add Plan only for admin by @Focuslinkstech
|
- Add Plan only for admin by @Focuslinkstech
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
- Hotspot & PPPOE
|
- Hotspot & PPPOE
|
||||||
- Easy Installation
|
- Easy Installation
|
||||||
- Multi Language
|
- Multi Language
|
||||||
- Payment Gateway Midtrans, Xendit and Tripay
|
- Payment Gateway
|
||||||
- SMS validation for login
|
- SMS validation for login
|
||||||
- Whatsapp Notification to Consumer
|
- Whatsapp Notification to Consumer
|
||||||
- Telegram Notification for Admin
|
- Telegram Notification for Admin
|
||||||
|
@ -104,7 +104,8 @@ CREATE TABLE `tbl_plans` (
|
|||||||
`is_radius` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 is radius',
|
`is_radius` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 is radius',
|
||||||
`pool` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
`pool` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||||
`pool_expired` varchar(40) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
|
`pool_expired` varchar(40) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
|
||||||
`enabled` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0 disabled\r\n'
|
`enabled` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0 disabled\r\n',
|
||||||
|
`allow_purchase` enum('yes','no') DEFAULT 'yes' COMMENT 'allow to show package in buy package page'
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `tbl_pool`;
|
DROP TABLE IF EXISTS `tbl_pool`;
|
||||||
@ -309,4 +310,4 @@ VALUES (
|
|||||||
'Active',
|
'Active',
|
||||||
'2022-09-06 16:09:50',
|
'2022-09-06 16:09:50',
|
||||||
'2014-06-23 01:43:07'
|
'2014-06-23 01:43:07'
|
||||||
);
|
);
|
||||||
|
@ -16,8 +16,10 @@ $menu_registered = array();
|
|||||||
* Admin/Sales menu: AFTER_DASHBOARD, CUSTOMERS, PREPAID, SERVICES, REPORTS, VOUCHER, AFTER_ORDER, NETWORK, SETTINGS, AFTER_PAYMENTGATEWAY
|
* Admin/Sales menu: AFTER_DASHBOARD, CUSTOMERS, PREPAID, SERVICES, REPORTS, VOUCHER, AFTER_ORDER, NETWORK, SETTINGS, AFTER_PAYMENTGATEWAY
|
||||||
* | Customer menu: AFTER_DASHBOARD, ORDER, HISTORY, ACCOUNTS
|
* | Customer menu: AFTER_DASHBOARD, ORDER, HISTORY, ACCOUNTS
|
||||||
* @param string icon from ion icon, ion-person, only for AFTER_
|
* @param string icon from ion icon, ion-person, only for AFTER_
|
||||||
|
* @param string label for showing label or number of notification or update
|
||||||
|
* @param string color Label color
|
||||||
*/
|
*/
|
||||||
function register_menu($name, $admin, $function, $position, $icon = '')
|
function register_menu($name, $admin, $function, $position, $icon = '', $label = '', $color = 'success')
|
||||||
{
|
{
|
||||||
global $menu_registered;
|
global $menu_registered;
|
||||||
$menu_registered[] = [
|
$menu_registered[] = [
|
||||||
@ -25,7 +27,9 @@ function register_menu($name, $admin, $function, $position, $icon = '')
|
|||||||
"admin" => $admin,
|
"admin" => $admin,
|
||||||
"position" => $position,
|
"position" => $position,
|
||||||
"icon" => $icon,
|
"icon" => $icon,
|
||||||
"function" => $function
|
"function" => $function,
|
||||||
|
"label" => $label,
|
||||||
|
"color" => $color
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,4 +52,3 @@ function run_hook($action){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,4 +99,38 @@ class Lang
|
|||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* $pad_type
|
||||||
|
* 0 Left
|
||||||
|
* 1 right
|
||||||
|
* 2 center
|
||||||
|
* */
|
||||||
|
public static function pad($text, $pad_string = ' ', $pad_type = 0){
|
||||||
|
global $config;
|
||||||
|
$cols = 37;
|
||||||
|
if($config['printer_cols']){
|
||||||
|
$cols = $config['printer_cols'];
|
||||||
|
}
|
||||||
|
$text = trim($text);
|
||||||
|
$texts = explode("\n", $text);
|
||||||
|
if(count($texts)>1){
|
||||||
|
$text = '';
|
||||||
|
foreach($texts as $t){
|
||||||
|
$text.= self::pad(trim($t), $pad_string, $pad_type)."\n";
|
||||||
|
}
|
||||||
|
return $text;
|
||||||
|
}else{
|
||||||
|
return str_pad(trim($text), $cols, $pad_string, $pad_type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function pads($textLeft, $textRight, $pad_string = ' '){
|
||||||
|
global $config;
|
||||||
|
$cols = 37;
|
||||||
|
if($config['printer_cols']){
|
||||||
|
$cols = $config['printer_cols'];
|
||||||
|
}
|
||||||
|
return $textLeft.str_pad($textRight, $cols-strlen($textLeft), $pad_string, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,14 +62,15 @@ class Message
|
|||||||
if (!empty($config['wa_url'])) {
|
if (!empty($config['wa_url'])) {
|
||||||
$waurl = str_replace('[number]', urlencode($phone), $config['wa_url']);
|
$waurl = str_replace('[number]', urlencode($phone), $config['wa_url']);
|
||||||
$waurl = str_replace('[text]', urlencode($txt), $waurl);
|
$waurl = str_replace('[text]', urlencode($txt), $waurl);
|
||||||
Http::getData($waurl);
|
return Http::getData($waurl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function sendPackageNotification($phone, $name, $package, $message, $via)
|
public static function sendPackageNotification($phone, $name, $package, $price, $message, $via)
|
||||||
{
|
{
|
||||||
$msg = str_replace('[[name]]', "*$name*", $message);
|
$msg = str_replace('[[name]]', $name, $message);
|
||||||
$msg = str_replace('[[package]]', "*$package*", $msg);
|
$msg = str_replace('[[package]]', $package, $msg);
|
||||||
|
$msg = str_replace('[[price]]', $price, $msg);
|
||||||
if (
|
if (
|
||||||
!empty($phone) && strlen($phone) > 5
|
!empty($phone) && strlen($phone) > 5
|
||||||
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
||||||
@ -85,9 +86,9 @@ class Message
|
|||||||
|
|
||||||
public static function sendBalanceNotification($phone, $name, $balance, $balance_now, $message, $via)
|
public static function sendBalanceNotification($phone, $name, $balance, $balance_now, $message, $via)
|
||||||
{
|
{
|
||||||
$msg = str_replace('[[name]]', "*$name*", $message);
|
$msg = str_replace('[[name]]', $name, $message);
|
||||||
$msg = str_replace('[[current_balance]]', Lang::moneyFormat($balance_now), $msg);
|
$msg = str_replace('[[current_balance]]', Lang::moneyFormat($balance_now), $msg);
|
||||||
$msg = str_replace('[[balance]]', "*" . Lang::moneyFormat($balance) . "*", $msg);
|
$msg = str_replace('[[balance]]', Lang::moneyFormat($balance), $msg);
|
||||||
if (
|
if (
|
||||||
!empty($phone) && strlen($phone) > 5
|
!empty($phone) && strlen($phone) > 5
|
||||||
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
&& !empty($message) && in_array($via, ['sms', 'wa'])
|
||||||
|
@ -108,6 +108,21 @@ try {
|
|||||||
ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'), 'radius');
|
ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'), 'radius');
|
||||||
ORM::configure('return_result_sets', true, 'radius');
|
ORM::configure('return_result_sets', true, 'radius');
|
||||||
}
|
}
|
||||||
|
} catch (Throwable $e) {
|
||||||
|
$ui = new Smarty();
|
||||||
|
$ui->setTemplateDir(['custom' => File::pathFixer('ui/ui_custom/'), 'default' => File::pathFixer('ui/ui/')]);
|
||||||
|
$ui->assign('_url', APP_URL . '/index.php?_route=');
|
||||||
|
$ui->setCompileDir(File::pathFixer('ui/compiled/'));
|
||||||
|
$ui->setConfigDir(File::pathFixer('ui/conf/'));
|
||||||
|
$ui->setCacheDir(File::pathFixer('ui/cache/'));
|
||||||
|
$ui->assign("error_title", "PHPNuxBill Crash");
|
||||||
|
if (isset($_SESSION['uid'])) {
|
||||||
|
$ui->assign("error_message", $e->getMessage() . '<br>');
|
||||||
|
} else {
|
||||||
|
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||||
|
}
|
||||||
|
$ui->display('router-error.tpl');
|
||||||
|
die();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$ui = new Smarty();
|
$ui = new Smarty();
|
||||||
$ui->setTemplateDir(['custom' => File::pathFixer('ui/ui_custom/'), 'default' => File::pathFixer('ui/ui/')]);
|
$ui->setTemplateDir(['custom' => File::pathFixer('ui/ui_custom/'), 'default' => File::pathFixer('ui/ui/')]);
|
||||||
@ -118,7 +133,7 @@ try {
|
|||||||
$ui->assign("error_title", "PHPNuxBill Crash");
|
$ui->assign("error_title", "PHPNuxBill Crash");
|
||||||
if (isset($_SESSION['uid'])) {
|
if (isset($_SESSION['uid'])) {
|
||||||
$ui->assign("error_message", $e->getMessage() . '<br>');
|
$ui->assign("error_message", $e->getMessage() . '<br>');
|
||||||
}else{
|
} else {
|
||||||
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||||
}
|
}
|
||||||
$ui->display('router-error.tpl');
|
$ui->display('router-error.tpl');
|
||||||
@ -130,13 +145,13 @@ function _notify($msg, $type = 'e')
|
|||||||
$_SESSION['ntype'] = $type;
|
$_SESSION['ntype'] = $type;
|
||||||
$_SESSION['notify'] = $msg;
|
$_SESSION['notify'] = $msg;
|
||||||
}
|
}
|
||||||
if(empty($config['language'])){
|
if (empty($config['language'])) {
|
||||||
$config['language'] = 'english';
|
$config['language'] = 'english';
|
||||||
}
|
}
|
||||||
$lan_file = File::pathFixer('system/lan/' . $config['language'] . '/common.lan.php');
|
$lan_file = File::pathFixer('system/lan/' . $config['language'] . '/common.lan.php');
|
||||||
if(file_exists($lan_file)){
|
if (file_exists($lan_file)) {
|
||||||
require $lan_file;
|
require $lan_file;
|
||||||
}else{
|
} else {
|
||||||
die("$lan_file not found");
|
die("$lan_file not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +205,11 @@ $_notifmsg_default = json_decode(file_get_contents(File::pathFixer('system/uploa
|
|||||||
|
|
||||||
//register all plugin
|
//register all plugin
|
||||||
foreach (glob(File::pathFixer("system/plugin/*.php")) as $filename) {
|
foreach (glob(File::pathFixer("system/plugin/*.php")) as $filename) {
|
||||||
include $filename;
|
try {
|
||||||
|
include $filename;
|
||||||
|
} catch (Throwable $e) {
|
||||||
|
} catch (Exception $e) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -223,7 +242,13 @@ function _admin($login = true)
|
|||||||
|
|
||||||
function _log($description, $type = '', $userid = '0')
|
function _log($description, $type = '', $userid = '0')
|
||||||
{
|
{
|
||||||
Log::put($type, $description, $userid);
|
$d = ORM::for_table('tbl_logs')->create();
|
||||||
|
$d->date = date('Y-m-d H:i:s');
|
||||||
|
$d->type = $type;
|
||||||
|
$d->description = $description;
|
||||||
|
$d->userid = $userid;
|
||||||
|
$d->ip = $_SERVER["REMOTE_ADDR"];
|
||||||
|
$d->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
function Lang($key)
|
function Lang($key)
|
||||||
@ -293,7 +318,8 @@ function time_elapsed_string($datetime, $full = false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$full) $string = array_slice($string, 0, 1);
|
if (!$full)
|
||||||
|
$string = array_slice($string, 0, 1);
|
||||||
return $string ? implode(', ', $string) . ' ago' : 'just now';
|
return $string ? implode(', ', $string) . ' ago' : 'just now';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -306,7 +332,6 @@ if ($handler == '') {
|
|||||||
$handler = 'default';
|
$handler = 'default';
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$sys_render = File::pathFixer('system/controllers/' . $handler . '.php');
|
$sys_render = File::pathFixer('system/controllers/' . $handler . '.php');
|
||||||
if (file_exists($sys_render)) {
|
if (file_exists($sys_render)) {
|
||||||
$menus = array();
|
$menus = array();
|
||||||
@ -321,12 +346,20 @@ try {
|
|||||||
if (!empty($menu['icon'])) {
|
if (!empty($menu['icon'])) {
|
||||||
$menus[$menu['position']] .= '<i class="' . $menu['icon'] . '"></i>';
|
$menus[$menu['position']] .= '<i class="' . $menu['icon'] . '"></i>';
|
||||||
}
|
}
|
||||||
|
if (!empty($menu['label'])) {
|
||||||
|
$menus[$menu['position']] .= '<span class="pull-right-container">';
|
||||||
|
$menus[$menu['position']] .= '<small class="label pull-right bg-' . $menu['color'] . '">' . $menu['label'] . '</small></span>';
|
||||||
|
}
|
||||||
$menus[$menu['position']] .= '<span class="text">' . $menu['name'] . '</span></a></li>';
|
$menus[$menu['position']] .= '<span class="text">' . $menu['name'] . '</span></a></li>';
|
||||||
} else if (!$menu['admin'] && _auth(false)) {
|
} else if (!$menu['admin'] && _auth(false)) {
|
||||||
$menus[$menu['position']] .= '<li' . (($routes[1] == $menu['function']) ? ' class="active"' : '') . '><a href="' . U . 'plugin/' . $menu['function'] . '">';
|
$menus[$menu['position']] .= '<li' . (($routes[1] == $menu['function']) ? ' class="active"' : '') . '><a href="' . U . 'plugin/' . $menu['function'] . '">';
|
||||||
if (!empty($menu['icon'])) {
|
if (!empty($menu['icon'])) {
|
||||||
$menus[$menu['position']] .= '<i class="' . $menu['icon'] . '"></i>';
|
$menus[$menu['position']] .= '<i class="' . $menu['icon'] . '"></i>';
|
||||||
}
|
}
|
||||||
|
if (!empty($menu['label'])) {
|
||||||
|
$menus[$menu['position']] .= '<span class="pull-right-container">';
|
||||||
|
$menus[$menu['position']] .= '<small class="label pull-right bg-' . $menu['color'] . '">' . $menu['label'] . '</small></span>';
|
||||||
|
}
|
||||||
$menus[$menu['position']] .= '<span class="text">' . $menu['name'] . '</span></a></li>';
|
$menus[$menu['position']] .= '<span class="text">' . $menu['name'] . '</span></a></li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -338,9 +371,17 @@ try {
|
|||||||
} else {
|
} else {
|
||||||
r2(U . 'dashboard', 'e', 'not found');
|
r2(U . 'dashboard', 'e', 'not found');
|
||||||
}
|
}
|
||||||
|
} catch (Throwable $e) {
|
||||||
|
if (!isset($_SESSION['aid']) || empty($_SESSION['aid'])) {
|
||||||
|
r2(U . 'home', 'e', $e->getMessage());
|
||||||
|
}
|
||||||
|
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||||
|
$ui->assign("error_title", "PHPNuxBill Crash");
|
||||||
|
$ui->display('router-error.tpl');
|
||||||
|
die();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
if (!isset($_SESSION['aid']) || empty($_SESSION['aid'])) {
|
if (!isset($_SESSION['aid']) || empty($_SESSION['aid'])) {
|
||||||
r2(U . 'home' , 'e', $e->getMessage());
|
r2(U . 'home', 'e', $e->getMessage());
|
||||||
}
|
}
|
||||||
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||||
$ui->assign("error_title", "PHPNuxBill Crash");
|
$ui->assign("error_title", "PHPNuxBill Crash");
|
||||||
|
@ -96,6 +96,12 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
|||||||
$router = ORM::for_table('tbl_routers')->where('name', $bill['routers'])->find_one();
|
$router = ORM::for_table('tbl_routers')->where('name', $bill['routers'])->find_one();
|
||||||
if ($config['enable_balance'] == 'yes') {
|
if ($config['enable_balance'] == 'yes') {
|
||||||
$plan = ORM::for_table('tbl_plans')->find_one($bill['plan_id']);
|
$plan = ORM::for_table('tbl_plans')->find_one($bill['plan_id']);
|
||||||
|
if(!$plan['enabled']){
|
||||||
|
r2(U . "home", 'e', 'Plan is not exists');
|
||||||
|
}
|
||||||
|
if($plan['allow_purchase'] != 'yes'){
|
||||||
|
r2(U . "home", 'e', 'Cannot recharge this plan');
|
||||||
|
}
|
||||||
if ($user['balance'] > $plan['price']) {
|
if ($user['balance'] > $plan['price']) {
|
||||||
r2(U . "order/pay/$router[id]/$bill[plan_id]", 'e', 'Order Plan');
|
r2(U . "order/pay/$router[id]/$bill[plan_id]", 'e', 'Order Plan');
|
||||||
} else {
|
} else {
|
||||||
|
@ -23,7 +23,7 @@ switch ($action) {
|
|||||||
$q = (_post('q') ? _post('q') : _get('q'));
|
$q = (_post('q') ? _post('q') : _get('q'));
|
||||||
$keep = _post('keep');
|
$keep = _post('keep');
|
||||||
if (!empty($keep)) {
|
if (!empty($keep)) {
|
||||||
ORM::raw_execute("DELETE FROM tbl_logs WHERE date < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL $keep DAY))");
|
ORM::raw_execute("DELETE FROM tbl_logs WHERE UNIX_TIMESTAMP(date) < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL $keep DAY))");
|
||||||
r2(U . "logs/list/", 's', "Delete logs older than $keep days");
|
r2(U . "logs/list/", 's', "Delete logs older than $keep days");
|
||||||
}
|
}
|
||||||
if ($q != '') {
|
if ($q != '') {
|
||||||
|
@ -149,6 +149,12 @@ switch ($action) {
|
|||||||
if (empty($plan)) {
|
if (empty($plan)) {
|
||||||
r2(U . "order/package", 'e', Lang::T("Plan Not found"));
|
r2(U . "order/package", 'e', Lang::T("Plan Not found"));
|
||||||
}
|
}
|
||||||
|
if(!$plan['enabled']){
|
||||||
|
r2(U . "home", 'e', 'Plan is not exists');
|
||||||
|
}
|
||||||
|
if($plan['allow_purchase'] != 'yes'){
|
||||||
|
r2(U . "home", 'e', 'Cannot recharge this plan');
|
||||||
|
}
|
||||||
if ($routes['2'] == 'radius') {
|
if ($routes['2'] == 'radius') {
|
||||||
$router_name = 'radius';
|
$router_name = 'radius';
|
||||||
} else {
|
} else {
|
||||||
@ -166,7 +172,7 @@ switch ($action) {
|
|||||||
"\nPrice: " . $p['price']);
|
"\nPrice: " . $p['price']);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo "no renewall | plan enabled: $p[enabled] | User balance: $c[balance] | price $p[price]\n";
|
r2(U . "home", 'e', 'Plan is not exists');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'send':
|
case 'send':
|
||||||
@ -179,6 +185,12 @@ switch ($action) {
|
|||||||
if (empty($plan)) {
|
if (empty($plan)) {
|
||||||
r2(U . "order/package", 'e', Lang::T("Plan Not found"));
|
r2(U . "order/package", 'e', Lang::T("Plan Not found"));
|
||||||
}
|
}
|
||||||
|
if(!$plan['enabled']){
|
||||||
|
r2(U . "home", 'e', 'Plan is not exists');
|
||||||
|
}
|
||||||
|
if($plan['allow_purchase'] != 'yes'){
|
||||||
|
r2(U . "home", 'e', 'Cannot recharge this plan');
|
||||||
|
}
|
||||||
if ($routes['2'] == 'radius') {
|
if ($routes['2'] == 'radius') {
|
||||||
$router_name = 'radius';
|
$router_name = 'radius';
|
||||||
} else {
|
} else {
|
||||||
|
@ -68,6 +68,8 @@ switch ($action) {
|
|||||||
Mikrotik::removePool($client, $d['pool_name']);
|
Mikrotik::removePool($client, $d['pool_name']);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
//ignore exception, it means router has already deleted
|
//ignore exception, it means router has already deleted
|
||||||
|
} catch(Throwable $e){
|
||||||
|
//ignore exception, it means router has already deleted
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$d->delete();
|
$d->delete();
|
||||||
|
@ -159,7 +159,7 @@ switch ($action) {
|
|||||||
case 'print':
|
case 'print':
|
||||||
$id = _post('id');
|
$id = _post('id');
|
||||||
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
||||||
$ui->assign('d', $d);
|
$ui->assign('in', $d);
|
||||||
|
|
||||||
$ui->assign('date', Lang::dateAndTimeFormat($d['recharged_on'], $d['recharged_time']));
|
$ui->assign('date', Lang::dateAndTimeFormat($d['recharged_on'], $d['recharged_time']));
|
||||||
run_hook('print_invoice'); #HOOK
|
run_hook('print_invoice'); #HOOK
|
||||||
|
@ -173,6 +173,8 @@ switch ($action) {
|
|||||||
Mikrotik::removeHotspotPlan($client, $d['name_plan']);
|
Mikrotik::removeHotspotPlan($client, $d['name_plan']);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
//ignore exception, it means router has already deleted
|
//ignore exception, it means router has already deleted
|
||||||
|
} catch(Throwable $e){
|
||||||
|
//ignore exception, it means router has already deleted
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -441,6 +443,8 @@ switch ($action) {
|
|||||||
Mikrotik::removePpoePlan($client, $d['name_plan']);
|
Mikrotik::removePpoePlan($client, $d['name_plan']);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
//ignore exception, it means router has already deleted
|
//ignore exception, it means router has already deleted
|
||||||
|
} catch(Throwable $e){
|
||||||
|
//ignore exception, it means router has already deleted
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$d->delete();
|
$d->delete();
|
||||||
|
@ -35,16 +35,16 @@ if (php_sapi_name() !== 'cli') {
|
|||||||
echo "<pre>";
|
echo "<pre>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!file_exists('../config.php')){
|
if (!file_exists('../config.php')) {
|
||||||
die("config.php file not found");
|
die("config.php file not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!file_exists('orm.php')){
|
if (!file_exists('orm.php')) {
|
||||||
die("orm.php file not found");
|
die("orm.php file not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!file_exists('uploads/notifications.default.json')){
|
if (!file_exists('uploads/notifications.default.json')) {
|
||||||
die("uploads/notifications.default.json file not found");
|
die("uploads/notifications.default.json file not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +68,13 @@ $_notifmsg_default = json_decode(file_get_contents('uploads/notifications.defaul
|
|||||||
|
|
||||||
//register all plugin
|
//register all plugin
|
||||||
foreach (glob(File::pathFixer("plugin/*.php")) as $filename) {
|
foreach (glob(File::pathFixer("plugin/*.php")) as $filename) {
|
||||||
include $filename;
|
try{
|
||||||
|
include $filename;
|
||||||
|
} catch(Throwable $e){
|
||||||
|
//ignore plugin error
|
||||||
|
}catch(Exception $e){
|
||||||
|
//ignore plugin error
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = ORM::for_table('tbl_appconfig')->find_many();
|
$result = ORM::for_table('tbl_appconfig')->find_many();
|
||||||
@ -111,9 +117,9 @@ foreach ($d as $ds) {
|
|||||||
echo " : EXPIRED \r\n";
|
echo " : EXPIRED \r\n";
|
||||||
$u = ORM::for_table('tbl_user_recharges')->where('id', $ds['id'])->find_one();
|
$u = ORM::for_table('tbl_user_recharges')->where('id', $ds['id'])->find_one();
|
||||||
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
||||||
$m = ORM::for_table('tbl_routers')->where('name', $ds['routers'])->find_one();
|
$m = Mikrotik::info($ds['routers']);
|
||||||
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||||
|
$price = Lang::moneyFormat($p['price']);
|
||||||
if ($p['is_radius']) {
|
if ($p['is_radius']) {
|
||||||
if (empty($p['pool_expired'])) {
|
if (empty($p['pool_expired'])) {
|
||||||
print_r(Radius::customerDeactivate($c['username']));
|
print_r(Radius::customerDeactivate($c['username']));
|
||||||
@ -130,14 +136,14 @@ foreach ($d as $ds) {
|
|||||||
}
|
}
|
||||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||||
}
|
}
|
||||||
Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], $textExpired, $config['user_notification_expired']);
|
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], $price, $textExpired, $config['user_notification_expired'])."\n";
|
||||||
//update database user dengan status off
|
//update database user dengan status off
|
||||||
$u->status = 'off';
|
$u->status = 'off';
|
||||||
$u->save();
|
$u->save();
|
||||||
|
|
||||||
// autorenewal from deposit
|
// autorenewal from deposit
|
||||||
if ($config['enable_balance'] == 'yes' && $c['auto_renewal']) {
|
if ($config['enable_balance'] == 'yes' && $c['auto_renewal']) {
|
||||||
if ($p && $p['enabled'] && $c['balance'] >= $p['price']) {
|
if ($p && $p['enabled'] && $c['balance'] >= $p['price'] && $p['allow_purchase'] == 'yes') {
|
||||||
if (Package::rechargeUser($ds['customer_id'], $p['routers'], $p['id'], 'Customer', 'Balance')) {
|
if (Package::rechargeUser($ds['customer_id'], $p['routers'], $p['id'], 'Customer', 'Balance')) {
|
||||||
// if success, then get the balance
|
// if success, then get the balance
|
||||||
Balance::min($ds['customer_id'], $p['price']);
|
Balance::min($ds['customer_id'], $p['price']);
|
||||||
@ -156,7 +162,8 @@ foreach ($d as $ds) {
|
|||||||
} else {
|
} else {
|
||||||
echo "no renewall | balance $config[enable_balance] auto_renewal $c[auto_renewal]\n";
|
echo "no renewall | balance $config[enable_balance] auto_renewal $c[auto_renewal]\n";
|
||||||
}
|
}
|
||||||
} else echo " : ACTIVE \r\n";
|
} else
|
||||||
|
echo " : ACTIVE \r\n";
|
||||||
} else {
|
} else {
|
||||||
$date_now = strtotime(date("Y-m-d H:i:s"));
|
$date_now = strtotime(date("Y-m-d H:i:s"));
|
||||||
$expiration = strtotime($ds['expiration'] . ' ' . $ds['time']);
|
$expiration = strtotime($ds['expiration'] . ' ' . $ds['time']);
|
||||||
@ -167,7 +174,7 @@ foreach ($d as $ds) {
|
|||||||
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
||||||
$m = ORM::for_table('tbl_routers')->where('name', $ds['routers'])->find_one();
|
$m = ORM::for_table('tbl_routers')->where('name', $ds['routers'])->find_one();
|
||||||
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||||
|
$price = Lang::moneyFormat($p['price']);
|
||||||
if ($p['is_radius']) {
|
if ($p['is_radius']) {
|
||||||
if (empty($p['pool_expired'])) {
|
if (empty($p['pool_expired'])) {
|
||||||
print_r(Radius::customerDeactivate($c['username']));
|
print_r(Radius::customerDeactivate($c['username']));
|
||||||
@ -184,14 +191,14 @@ foreach ($d as $ds) {
|
|||||||
}
|
}
|
||||||
Mikrotik::removePpoeActive($client, $c['username']);
|
Mikrotik::removePpoeActive($client, $c['username']);
|
||||||
}
|
}
|
||||||
Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], $textExpired, $config['user_notification_expired']);
|
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], $price, $textExpired, $config['user_notification_expired'])."\n";
|
||||||
|
|
||||||
$u->status = 'off';
|
$u->status = 'off';
|
||||||
$u->save();
|
$u->save();
|
||||||
|
|
||||||
// autorenewal from deposit
|
// autorenewal from deposit
|
||||||
if ($config['enable_balance'] == 'yes' && $c['auto_renewal']) {
|
if ($config['enable_balance'] == 'yes' && $c['auto_renewal']) {
|
||||||
if ($p && $p['enabled'] && $c['balance'] >= $p['price']) {
|
if ($p && $p['enabled'] && $c['balance'] >= $p['price'] && $p['allow_purchase'] == 'yes') {
|
||||||
if (Package::rechargeUser($ds['customer_id'], $p['routers'], $p['id'], 'Customer', 'Balance')) {
|
if (Package::rechargeUser($ds['customer_id'], $p['routers'], $p['id'], 'Customer', 'Balance')) {
|
||||||
// if success, then get the balance
|
// if success, then get the balance
|
||||||
Balance::min($ds['customer_id'], $p['price']);
|
Balance::min($ds['customer_id'], $p['price']);
|
||||||
@ -206,6 +213,7 @@ foreach ($d as $ds) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else echo " : ACTIVE \r\n";
|
} else
|
||||||
|
echo " : ACTIVE \r\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,13 @@ $_notifmsg_default = json_decode(file_get_contents('uploads/notifications.defaul
|
|||||||
|
|
||||||
//register all plugin
|
//register all plugin
|
||||||
foreach (glob(File::pathFixer("plugin/*.php")) as $filename) {
|
foreach (glob(File::pathFixer("plugin/*.php")) as $filename) {
|
||||||
include $filename;
|
try{
|
||||||
|
include $filename;
|
||||||
|
} catch(Throwable $e){
|
||||||
|
//ignore plugin error
|
||||||
|
}catch(Exception $e){
|
||||||
|
//ignore plugin error
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = ORM::for_table('tbl_appconfig')->find_many();
|
$result = ORM::for_table('tbl_appconfig')->find_many();
|
||||||
@ -98,13 +104,15 @@ print_r([$day1, $day3, $day7]);
|
|||||||
foreach ($d as $ds) {
|
foreach ($d as $ds) {
|
||||||
if (in_array($ds['expiration'], [$day1, $day3, $day7])) {
|
if (in_array($ds['expiration'], [$day1, $day3, $day7])) {
|
||||||
$u = ORM::for_table('tbl_user_recharges')->where('id', $ds['id'])->find_one();
|
$u = ORM::for_table('tbl_user_recharges')->where('id', $ds['id'])->find_one();
|
||||||
|
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||||
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
||||||
|
$price = Lang::moneyFormat($p['price']);
|
||||||
if ($ds['expiration'] == $day7) {
|
if ($ds['expiration'] == $day7) {
|
||||||
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], Lang::getNotifText('reminder_7_day'), $config['user_notification_reminder']) . "\n";
|
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $p['name_plan'], $price, Lang::getNotifText('reminder_7_day'), $config['user_notification_reminder']) . "\n";
|
||||||
} else if ($ds['expiration'] == $day3) {
|
} else if ($ds['expiration'] == $day3) {
|
||||||
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], Lang::getNotifText('reminder_3_day'), $config['user_notification_reminder']) . "\n";
|
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $p['name_plan'], $price, Lang::getNotifText('reminder_3_day'), $config['user_notification_reminder']) . "\n";
|
||||||
} else if ($ds['expiration'] == $day1) {
|
} else if ($ds['expiration'] == $day1) {
|
||||||
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], Lang::getNotifText('reminder_1_day'), $config['user_notification_reminder']) . "\n";
|
echo Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $p['name_plan'], $price, Lang::getNotifText('reminder_1_day'), $config['user_notification_reminder']) . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
-----------------------------------
|
-----------------------------------
|
||||||
Language Name: English
|
Language Name: English
|
||||||
Contributor: Ismail Marzuqi
|
Contributor: Ismail Marzuqi
|
||||||
Web: www.phpnuxbill.com
|
|
||||||
Email: iesien22@yahoo.com
|
|
||||||
|
|
||||||
2017
|
2017
|
||||||
Contributor: Ibnu Maksum (@ibnux)
|
Contributor: Ibnu Maksum (@ibnux)
|
||||||
@ -261,7 +259,6 @@ $_L['Plan_Not_found'] = 'Plan Not found';
|
|||||||
$_L['Failed_to_create_transaction'] = 'Failed to create transaction.';
|
$_L['Failed_to_create_transaction'] = 'Failed to create transaction.';
|
||||||
$_L['Seller_has_not_yet_setup_Xendit_payment_gateway'] = 'Seller has not yet setup Xendit payment gateway';
|
$_L['Seller_has_not_yet_setup_Xendit_payment_gateway'] = 'Seller has not yet setup Xendit payment gateway';
|
||||||
$_L['Admin_has_not_yet_setup_Xendit_payment_gateway_please_tell_admin'] = 'Admin has not yet setup Xendit payment gateway, please tell admin';
|
$_L['Admin_has_not_yet_setup_Xendit_payment_gateway_please_tell_admin'] = 'Admin has not yet setup Xendit payment gateway, please tell admin';
|
||||||
$_L['Buy_this_your_active_package_will_be_overwrite'] = 'Buy this? your active package will be overwrite';
|
|
||||||
$_L['You_already_have_unpaid_transaction_cancel_it_or_pay_it'] = 'You already have unpaid transaction, cancel it or pay it.';
|
$_L['You_already_have_unpaid_transaction_cancel_it_or_pay_it'] = 'You already have unpaid transaction, cancel it or pay it.';
|
||||||
$_L['Transaction_Not_found'] = 'Transaction Not found';
|
$_L['Transaction_Not_found'] = 'Transaction Not found';
|
||||||
$_L['Cancel_it'] = 'Cancel it?';
|
$_L['Cancel_it'] = 'Cancel it?';
|
||||||
@ -314,7 +311,6 @@ $_L['User_Notification'] = 'User Notification';
|
|||||||
$_L['Expired_Notification'] = 'Expired Notification';
|
$_L['Expired_Notification'] = 'Expired Notification';
|
||||||
$_L['User_will_get_notification_when_package_expired'] = 'User will get notification when package expired';
|
$_L['User_will_get_notification_when_package_expired'] = 'User will get notification when package expired';
|
||||||
$_L['Expired_Notification_Message'] = 'Expired Notification Message';
|
$_L['Expired_Notification_Message'] = 'Expired Notification Message';
|
||||||
$_L['bnameb_will_be_replaced_with_Customer_Name_bpackageb_will_be_replaced_with_Package_name'] = '<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.';
|
|
||||||
$_L['Payment_Notification'] = 'Payment Notification';
|
$_L['Payment_Notification'] = 'Payment Notification';
|
||||||
$_L['User_will_get_invoice_notification_when_buy_package_or_package_refilled'] = 'User will get invoice notification when buy package or package refilled';
|
$_L['User_will_get_invoice_notification_when_buy_package_or_package_refilled'] = 'User will get invoice notification when buy package or package refilled';
|
||||||
$_L['Current_IP'] = 'Current IP';
|
$_L['Current_IP'] = 'Current IP';
|
||||||
@ -411,12 +407,14 @@ $_L['Resend_To_Customer'] = 'Resend To Customer';
|
|||||||
$_L['Your_friend_do_not_have_active_package'] = 'Your friend do not have active package';
|
$_L['Your_friend_do_not_have_active_package'] = 'Your friend do not have active package';
|
||||||
$_L['Service_Type'] = 'Service Type';
|
$_L['Service_Type'] = 'Service Type';
|
||||||
$_L['Others'] = 'Others';
|
$_L['Others'] = 'Others';
|
||||||
$_L['PPPoE'] = 'PPPoE';
|
$_L['PPPoE'] = 'PPPoE';
|
||||||
$_L['Hotspot'] = 'Hotspot';
|
$_L['Hotspot'] = 'Hotspot';
|
||||||
$_L['Disable_Registration'] = 'Disable Registration';
|
$_L['Disable_Registration'] = 'Disable Registration';
|
||||||
$_L['Customer_just_Login_with_Phone_number_and_Voucher_Code_Voucher_will_be_password'] = 'Customer just Login with Phone number and Voucher Code, Voucher will be password';
|
$_L['Customer_just_Login_with_Phone_number_and_Voucher_Code_Voucher_will_be_password'] = 'Customer just Login with Phone number and Voucher Code, Voucher will be password';
|
||||||
$_L['Login__Activate_Voucher'] = 'Login / Activate Voucher';
|
$_L['Login__Activate_Voucher'] = 'Login / Activate Voucher';
|
||||||
$_L['After_Customer_activate_voucher_or_login_customer_will_be_redirected_to_this_url'] = 'After Customer activate voucher or login, customer will be redirected to this url';
|
$_L['After_Customer_activate_voucher_or_login_customer_will_be_redirected_to_this_url'] = 'After Customer activate voucher or login, customer will be redirected to this url';
|
||||||
$_L['Voucher_Prefix'] = 'Voucher Prefix';
|
$_L['Voucher_Prefix'] = 'Voucher Prefix';
|
||||||
$_L['Voucher_activation_success_now_you_can_login'] = 'Voucher activation success, now you can login';
|
$_L['Voucher_activation_success_now_you_can_login'] = 'Voucher activation success, now you can login';
|
||||||
$_L['Client_Can_Purchase'] = 'Client Can Purchase';
|
$_L['Client_Can_Purchase'] = 'Client Can Purchase';
|
||||||
|
$_L['Buy_this_your_active_package_will_be_overwritten'] = 'Buy this? your active package will be overwritten';
|
||||||
|
$_L['Pay_this_with_Balance_your_active_package_will_be_overwritten'] = 'Pay this with Balance? your active package will be overwritten';
|
||||||
|
@ -3,9 +3,6 @@
|
|||||||
-----------------------------------
|
-----------------------------------
|
||||||
Language Name: Indonesia
|
Language Name: Indonesia
|
||||||
Contributor: Ismail Marzuqi
|
Contributor: Ismail Marzuqi
|
||||||
Web: www.phpnuxbill.com
|
|
||||||
Email: iesien22@yahoo.com
|
|
||||||
|
|
||||||
2017
|
2017
|
||||||
Contributor: Ibnu Maksum (@ibnux)
|
Contributor: Ibnu Maksum (@ibnux)
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
rows="3">{if $_json['expired']!=''}{Lang::htmlspecialchars($_json['expired'])}{else}Hello [[name]], your internet package [[package]] has been expired.{/if}</textarea>
|
rows="3">{if $_json['expired']!=''}{Lang::htmlspecialchars($_json['expired'])}{else}Hello [[name]], your internet package [[package]] has been expired.{/if}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block col-md-4">
|
<p class="help-block col-md-4">
|
||||||
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
|
<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name. <b>[[price]]</b> will be replaced with Package price.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
rows="3">{Lang::htmlspecialchars($_json['reminder_7_day'])}</textarea>
|
rows="3">{Lang::htmlspecialchars($_json['reminder_7_day'])}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block col-md-4">
|
<p class="help-block col-md-4">
|
||||||
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
|
<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name. <b>[[price]]</b> will be replaced with Package price.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
rows="3">{Lang::htmlspecialchars($_json['reminder_3_day'])}</textarea>
|
rows="3">{Lang::htmlspecialchars($_json['reminder_3_day'])}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block col-md-4">
|
<p class="help-block col-md-4">
|
||||||
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
|
<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name. <b>[[price]]</b> will be replaced with Package price.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
rows="3">{Lang::htmlspecialchars($_json['reminder_1_day'])}</textarea>
|
rows="3">{Lang::htmlspecialchars($_json['reminder_1_day'])}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block col-md-4">
|
<p class="help-block col-md-4">
|
||||||
{Lang::T('<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name.')}
|
<b>[[name]]</b> will be replaced with Customer Name. <b>[[package]]</b> will be replaced with Package name. <b>[[price]]</b> will be replaced with Package price.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,6 +53,14 @@
|
|||||||
<input type="text" class="form-control" id="phone" name="phone" value="{$_c['phone']}">
|
<input type="text" class="form-control" id="phone" name="phone" value="{$_c['phone']}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label"><i class="glyphicon glyphicon-print"></i> Print Max Char</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input type="number" required class="form-control" id="printer_cols" placeholder="37" name="printer_cols"
|
||||||
|
value="{$_c['printer_cols']}">
|
||||||
|
</div>
|
||||||
|
<span class="help-block col-md-4">For invoice print using Thermal Printer</span>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">Theme</label>
|
<label class="col-md-2 control-label">Theme</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
@ -175,21 +175,20 @@
|
|||||||
if (cek.checked) {
|
if (cek.checked) {
|
||||||
$("#routerChoose").addClass('hidden');
|
$("#routerChoose").addClass('hidden');
|
||||||
document.getElementById("routers").required = false;
|
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 {
|
} else {
|
||||||
document.getElementById("routers").required = true;
|
document.getElementById("routers").required = true;
|
||||||
$("#routerChoose").removeClass('hidden');
|
$("#routerChoose").removeClass('hidden');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
|
||||||
$.ajax({
|
|
||||||
url: "index.php?_route=autoload/pool",
|
|
||||||
data: "routers=radius",
|
|
||||||
cache: false,
|
|
||||||
success: function(msg) {
|
|
||||||
$("#pool_expired").html(msg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 2000);
|
|
||||||
</script>
|
</script>
|
||||||
{/literal}
|
{/literal}
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-12">
|
<div class="col-sm-12 col-md-12">
|
||||||
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
||||||
<div class="panel-heading">{$_L['Edit_Plan']}</div>
|
<div class="panel-heading">{$_L['Edit_Plan']} || {$d['name_plan']}</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<form class="form-horizontal" method="post" role="form" action="{$_url}services/edit-post">
|
<form class="form-horizontal" method="post" role="form" action="{$_url}services/edit-post">
|
||||||
<input type="hidden" name="id" value="{$d['id']}">
|
<input type="hidden" name="id" value="{$d['id']}">
|
||||||
@ -179,7 +179,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{if $_c['radius_enable']}
|
{if $_c['radius_enable'] && $d['is_radius']}
|
||||||
{literal}
|
{literal}
|
||||||
<script>
|
<script>
|
||||||
function isRadius(cek) {
|
function isRadius(cek) {
|
||||||
|
@ -49,7 +49,8 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{foreach $d as $ds}
|
{foreach $d as $ds}
|
||||||
<tr {if $ds['enabled'] != 1}class="danger" title="disabled" {/if}>
|
<tr {if $ds['enabled'] != 1}class="danger" title="disabled"
|
||||||
|
{elseif $ds['allow_purchase'] != 'yes'}class="warning" title="Customer can't purchase" {/if}>
|
||||||
<td>{$ds['name_plan']}</td>
|
<td>{$ds['name_plan']}</td>
|
||||||
<td>{$ds['typebp']}</td>
|
<td>{$ds['typebp']}</td>
|
||||||
<td>{$ds['name_bw']}</td>
|
<td>{$ds['name_bw']}</td>
|
||||||
|
@ -21,30 +21,27 @@
|
|||||||
<table width="200">
|
<table width="200">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<fieldset>
|
<pre style="border-style: none; background-color: white;"><b>{Lang::pad($_c['CompanyName'],' ', 2)}</b>
|
||||||
<center>
|
{Lang::pad($_c['address'],' ', 2)}
|
||||||
<b>{$_c['CompanyName']}</b><br>
|
{Lang::pad($_c['phone'],' ', 2)}
|
||||||
{$_c['address']}<br>
|
{Lang::pad("", '=')}
|
||||||
{$_c['phone']}<br>
|
{Lang::pads("Invoice", $in['invoice'], ' ')}
|
||||||
</center>
|
{Lang::pads($_L['Date'], $date, ' ')}
|
||||||
============================================<br>
|
{Lang::pads($_L['Sales'], $_admin['fullname'], ' ')}
|
||||||
INVOICE: <b>{$d['invoice']}</b> - {$_L['Date']} : {$date}<br>
|
{Lang::pad("", '=')}
|
||||||
{$_L['Sales']} : {$_admin['fullname']}<br>
|
{Lang::pads($_L['Type'], $in['type'], ' ')}
|
||||||
============================================<br>
|
{Lang::pads($_L['Plan_Name'], $in['plan_name'], ' ')}
|
||||||
{$_L['Type']} : <b>{$d['type']}</b><br>
|
{Lang::pads($_L['Plan_Price'], Lang::moneyFormat($in['price']), ' ')}
|
||||||
{$_L['Plan_Name']} : <b>{$d['plan_name']}</b><br>
|
{Lang::pad($in['method'], ' ', 2)}
|
||||||
{$_L['Plan_Price']} : <b>{Lang::moneyFormat($d['price'])}</b><br>
|
|
||||||
<br>
|
{Lang::pads($_L['Username'], $in['username'], ' ')}
|
||||||
{$_L['Username']} : <b>{$d['username']}</b><br>
|
{Lang::pads($_L['Password'], '**********', ' ')}
|
||||||
{$_L['Password']} : **********<br>
|
{if $in['type'] != 'Balance'}
|
||||||
{if $in['type'] != 'Balance'}
|
{Lang::pads($_L['Created_On'], Lang::dateAndTimeFormat($in['recharged_on'],$in['recharged_time']), ' ')}
|
||||||
<br>
|
{Lang::pads($_L['Expires_On'], Lang::dateAndTimeFormat($in['expiration'],$in['time']), ' ')}
|
||||||
{$_L['Created_On']} : <b>{Lang::dateAndTimeFormat($d['recharged_on'],$d['recharged_time'])}</b><br>
|
{/if}
|
||||||
{$_L['Expires_On']} : <b>{Lang::dateAndTimeFormat($d['expiration'],$d['time'])}</b><br>
|
{Lang::pad("", '=')}
|
||||||
{/if}
|
{Lang::pad($_c['note'],' ', 2)}</pre>
|
||||||
============================================<br>
|
|
||||||
<center>{$_c['note']}</center>
|
|
||||||
</fieldset>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -5,42 +5,36 @@
|
|||||||
<div class="panel panel-hovered panel-primary panel-stacked mb30">
|
<div class="panel panel-hovered panel-primary panel-stacked mb30">
|
||||||
<div class="panel-heading">{$in['invoice']}</div>
|
<div class="panel-heading">{$in['invoice']}</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="well">
|
<pre><b>{Lang::pad($_c['CompanyName'],' ', 2)}</b>
|
||||||
<fieldset>
|
{Lang::pad($_c['address'],' ', 2)}
|
||||||
<center>
|
{Lang::pad($_c['phone'],' ', 2)}
|
||||||
<b>{$_c['CompanyName']}</b><br>
|
{Lang::pad("", '=')}
|
||||||
{$_c['address']}<br>
|
{Lang::pads("Invoice", $in['invoice'], ' ')}
|
||||||
{$_c['phone']}<br>
|
{Lang::pads($_L['Date'], $date, ' ')}
|
||||||
</center>
|
{Lang::pads($_L['Sales'], $_admin['fullname'], ' ')}
|
||||||
====================================================<br>
|
{Lang::pad("", '=')}
|
||||||
INVOICE: <b>{$in['invoice']}</b> - {$_L['Date']} : {$date}<br>
|
{Lang::pads($_L['Type'], $in['type'], ' ')}
|
||||||
{$_L['Sales']} : {$_admin['fullname']}<br>
|
{Lang::pads($_L['Plan_Name'], $in['plan_name'], ' ')}
|
||||||
====================================================<br>
|
{Lang::pads($_L['Plan_Price'], Lang::moneyFormat($in['price']), ' ')}
|
||||||
{$_L['Type']} : <b>{$in['type']}</b><br>
|
{Lang::pad($in['method'], ' ', 2)}
|
||||||
{$_L['Plan_Name']} : <b>{$in['plan_name']}</b><br>
|
|
||||||
{$_L['Plan_Price']} : <b>{Lang::moneyFormat($in['price'])}</b><br>
|
{Lang::pads($_L['Username'], $in['username'], ' ')}
|
||||||
{$in['method']}<br>
|
{Lang::pads($_L['Password'], '**********', ' ')}
|
||||||
<br>
|
{if $in['type'] != 'Balance'}
|
||||||
{$_L['Username']} : <b>{$in['username']}</b><br>
|
{Lang::pads($_L['Created_On'], Lang::dateAndTimeFormat($in['recharged_on'],$in['recharged_time']), ' ')}
|
||||||
{$_L['Password']} : **********<br>
|
{Lang::pads($_L['Expires_On'], Lang::dateAndTimeFormat($in['expiration'],$in['time']), ' ')}
|
||||||
{if $in['type'] != 'Balance'}
|
{/if}
|
||||||
<br>
|
{Lang::pad("", '=')}
|
||||||
{$_L['Created_On']} : <b>{Lang::dateAndTimeFormat($in['recharged_on'],$in['recharged_time'])}</b><br>
|
{Lang::pad($_c['note'],' ', 2)}</pre>
|
||||||
{$_L['Expires_On']} : <b>{Lang::dateAndTimeFormat($in['expiration'],$in['time'])}</b><br>
|
<form class="form-horizontal" method="post" action="{$_url}prepaid/print" target="_blank">
|
||||||
{/if}
|
<input type="hidden" name="id" value="{$in['id']}">
|
||||||
=====================================================<br>
|
<a href="{$_url}prepaid/list" class="btn btn-primary btn-sm"><i
|
||||||
<center>{$_c['note']}</center>
|
class="ion-reply-all"></i>{$_L['Finish']}</a>
|
||||||
</fieldset>
|
<a href="{$_url}prepaid/view/{$in['id']}/send" class="btn btn-info text-black btn-sm"><i
|
||||||
</div>
|
class="glyphicon glyphicon-envelope"></i> {Lang::T("Resend To Customer")}</a>
|
||||||
<form class="form-horizontal" method="post" action="{$_url}prepaid/print" target="_blank">
|
<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-print"></i>
|
||||||
<input type="hidden" name="id" value="{$in['id']}">
|
{$_L['Click_Here_to_Print']}</button>
|
||||||
<a href="{$_url}prepaid/list" class="btn btn-primary btn-sm"><i
|
</form>
|
||||||
class="ion-reply-all"></i>{$_L['Finish']}</a>
|
|
||||||
<a href="{$_url}prepaid/view/{$in['id']}/send" class="btn btn-info text-black btn-sm"><i
|
|
||||||
class="glyphicon glyphicon-envelope"></i> {Lang::T("Resend To Customer")}</a>
|
|
||||||
<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-print"></i>
|
|
||||||
{$_L['Click_Here_to_Print']}</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-12">
|
<div class="col-sm-12 col-md-12">
|
||||||
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
||||||
<div class="panel-heading">{$_L['Edit_Plan']}</div>
|
<div class="panel-heading">{$_L['Edit_Plan']} || {$d['name_plan']}</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<form class="form-horizontal" method="post" role="form" action="{$_url}services/edit-pppoe-post">
|
<form class="form-horizontal" method="post" role="form" action="{$_url}services/edit-pppoe-post">
|
||||||
<input type="hidden" name="id" value="{$d['id']}">
|
<input type="hidden" name="id" value="{$d['id']}">
|
||||||
@ -121,7 +121,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{if $_c['radius_enable'] and $d['is_radius']}
|
{if $_c['radius_enable'] && $d['is_radius']}
|
||||||
{literal}
|
{literal}
|
||||||
<script>
|
<script>
|
||||||
document.getElementById("routers").required = false;
|
document.getElementById("routers").required = false;
|
||||||
|
@ -47,7 +47,8 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{foreach $d as $ds}
|
{foreach $d as $ds}
|
||||||
<tr {if $ds['enabled'] != 1}class="danger" title="disabled" {/if}>
|
<tr {if $ds['enabled'] != 1}class="danger" title="disabled"
|
||||||
|
{elseif $ds['allow_purchase'] != 'yes'}class="warning" title="Customer can't purchase" {/if}>
|
||||||
<td>{$ds['name_plan']}</td>
|
<td>{$ds['name_plan']}</td>
|
||||||
<td>{$ds['name_bw']}</td>
|
<td>{$ds['name_bw']}</td>
|
||||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<link rel="stylesheet" href="ui/ui/fonts/MaterialDesign/css/materialdesignicons.min.css">
|
<link rel="stylesheet" href="ui/ui/fonts/MaterialDesign/css/materialdesignicons.min.css">
|
||||||
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
::-moz-selection {
|
::-moz-selection {
|
||||||
/* Code for Firefox */
|
/* Code for Firefox */
|
||||||
@ -57,9 +57,16 @@
|
|||||||
<div class="box-footer">
|
<div class="box-footer">
|
||||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||||
<a href="./update.php?step=4" class="btn btn-info btn-sm btn-block">Update Database</a>
|
<a href="./update.php?step=4" class="btn btn-info btn-sm btn-block">Update Database</a>
|
||||||
<a href="{$_url}community#update" class="btn btn-primary btn-sm btn-block">Update
|
<a href="{$_url}community#update" class="btn btn-success btn-sm btn-block">Update
|
||||||
PHPNuxBill</a>
|
PHPNuxBill</a>
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||||
|
<a href="https://github.com/hotspotbilling/phpnuxbill/discussions" target="_blank"
|
||||||
|
class="btn btn-success btn-sm btn-block">Ask Github Community</a>
|
||||||
|
<a href="https://t.me/phpnuxbill" target="_blank"
|
||||||
|
class="btn btn-primary btn-sm btn-block">Ask Telegram Community</a>
|
||||||
|
</div>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a href="javascript::history.back()" onclick="history.back()"
|
<a href="javascript::history.back()" onclick="history.back()"
|
||||||
class="btn btn-warning btn-block">back</a>
|
class="btn btn-warning btn-block">back</a>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version": "2024.1.11"
|
"version": "2024.1.17"
|
||||||
}
|
}
|
Reference in New Issue
Block a user