Compare commits
13 Commits
2023.11.17
...
2023.12.14
Author | SHA1 | Date | |
---|---|---|---|
9c22c22f6c | |||
518fe7563e | |||
adc2c808e2 | |||
a7a0f84df5 | |||
b7c663f4ee | |||
dd4329ad3d | |||
41b981cb70 | |||
431c971f3a | |||
653580722e | |||
6a0ad7f178 | |||
9d79121696 | |||
8e84c32616 | |||
486e22f020 |
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 2023.12.14
|
||||||
|
|
||||||
|
- Can send SMS using Mikrotik with Modem Installed
|
||||||
|
- Add Customer Type, so Customer can only show their PPPOE or Hotspot Package or both
|
||||||
|
|
||||||
## 2023.11.17
|
## 2023.11.17
|
||||||
|
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
|
[](https://s.id/standwithpalestine)
|
||||||
|
|
||||||
# PHPNuxBill - PHP Mikrotik Billing
|
# PHPNuxBill - PHP Mikrotik Billing
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Feature
|
## Feature
|
||||||
|
|
||||||
- Voucher Generator and Print
|
- Voucher Generator and Print
|
||||||
|
- FreeRadius
|
||||||
- Self registration
|
- Self registration
|
||||||
- User Balance
|
- User Balance
|
||||||
- Auto Renewal Package using Balance
|
- Auto Renewal Package using Balance
|
||||||
@ -35,7 +36,7 @@ Most current web servers with PHP & MySQL installed will be capable of running P
|
|||||||
Minimum Requirements
|
Minimum Requirements
|
||||||
|
|
||||||
- Linux or Windows OS
|
- Linux or Windows OS
|
||||||
- PHP Version 7.4
|
- Minimum PHP Version 7.4
|
||||||
- Both PDO & MySQLi Support
|
- Both PDO & MySQLi Support
|
||||||
- PHP-GD2 Image Library
|
- PHP-GD2 Image Library
|
||||||
- PHP-CURL
|
- PHP-CURL
|
||||||
|
@ -27,6 +27,7 @@ CREATE TABLE `tbl_customers` (
|
|||||||
`phonenumber` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
|
`phonenumber` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
|
||||||
`email` varchar(128) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1',
|
`email` varchar(128) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1',
|
||||||
`balance` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT 'For Money Deposit',
|
`balance` decimal(15,2) NOT NULL DEFAULT '0.00' COMMENT 'For Money Deposit',
|
||||||
|
`service_type` ENUM('Hotspot','PPPoE','Others') DEFAULT 'Others' COMMENT 'For selecting user type',
|
||||||
`auto_renewal` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Auto renewall using balance',
|
`auto_renewal` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Auto renewall using balance',
|
||||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`last_login` datetime DEFAULT NULL
|
`last_login` datetime DEFAULT NULL
|
||||||
|
@ -24,9 +24,40 @@ class Message
|
|||||||
global $config;
|
global $config;
|
||||||
run_hook('send_sms'); #HOOK
|
run_hook('send_sms'); #HOOK
|
||||||
if (!empty($config['sms_url'])) {
|
if (!empty($config['sms_url'])) {
|
||||||
$smsurl = str_replace('[number]', urlencode($phone), $config['sms_url']);
|
if (strlen($txt) > 160) {
|
||||||
$smsurl = str_replace('[text]', urlencode($txt), $smsurl);
|
$txts = str_split($txt, 160);
|
||||||
Http::getData($smsurl);
|
foreach ($txts as $txt) {
|
||||||
|
if (strlen($config['sms_url']) > 4 && substr($config['sms_url'], 0, 4) != "http") {
|
||||||
|
try {
|
||||||
|
$mikrotik = Mikrotik::info($config['sms_url']);
|
||||||
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
|
Mikrotik::sendSMS($client, $phone, $txt);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// ignore, add to logs
|
||||||
|
_log("Failed to send SMS using Mikrotik.\n" . $e->getMessage(), 'SMS', 0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$smsurl = str_replace('[number]', urlencode($phone), $config['sms_url']);
|
||||||
|
$smsurl = str_replace('[text]', urlencode($txt), $smsurl);
|
||||||
|
Http::getData($smsurl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (strlen($config['sms_url']) > 4 && substr($config['sms_url'], 0, 4) != "http") {
|
||||||
|
try {
|
||||||
|
$mikrotik = Mikrotik::info($config['sms_url']);
|
||||||
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
|
Mikrotik::sendSMS($client, $phone, $txt);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// ignore, add to logs
|
||||||
|
_log("Failed to send SMS using Mikrotik.\n" . $e->getMessage(), 'SMS', 0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$smsurl = str_replace('[number]', urlencode($phone), $config['sms_url']);
|
||||||
|
$smsurl = str_replace('[text]', urlencode($txt), $smsurl);
|
||||||
|
Http::getData($smsurl);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +107,8 @@ class Message
|
|||||||
return "$via: $msg";
|
return "$via: $msg";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function sendInvoice($cust, $trx){
|
public static function sendInvoice($cust, $trx)
|
||||||
|
{
|
||||||
global $config;
|
global $config;
|
||||||
$textInvoice = Lang::getNotifText('invoice_paid');
|
$textInvoice = Lang::getNotifText('invoice_paid');
|
||||||
$textInvoice = str_replace('[[company_name]]', $config['CompanyName'], $textInvoice);
|
$textInvoice = str_replace('[[company_name]]', $config['CompanyName'], $textInvoice);
|
||||||
|
@ -65,7 +65,7 @@ class Mikrotik
|
|||||||
);
|
);
|
||||||
$id = $client->sendSync($printRequest)->getProperty('.id');
|
$id = $client->sendSync($printRequest)->getProperty('.id');
|
||||||
$removeRequest = new RouterOS\Request('/ip/hotspot/active/remove');
|
$removeRequest = new RouterOS\Request('/ip/hotspot/active/remove');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$removeRequest
|
$removeRequest
|
||||||
->setArgument('numbers', $id)
|
->setArgument('numbers', $id)
|
||||||
);
|
);
|
||||||
@ -101,7 +101,7 @@ class Mikrotik
|
|||||||
Mikrotik::addHotspotPlan($client, $name, $sharedusers, $rate);
|
Mikrotik::addHotspotPlan($client, $name, $sharedusers, $rate);
|
||||||
} else {
|
} else {
|
||||||
$setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set');
|
$setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$setRequest
|
$setRequest
|
||||||
->setArgument('numbers', $profileID)
|
->setArgument('numbers', $profileID)
|
||||||
->setArgument('shared-users', $sharedusers)
|
->setArgument('shared-users', $sharedusers)
|
||||||
@ -132,7 +132,7 @@ class Mikrotik
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set');
|
$setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$setRequest
|
$setRequest
|
||||||
->setArgument('numbers', $profileID)
|
->setArgument('numbers', $profileID)
|
||||||
->setArgument('shared-users', 3)
|
->setArgument('shared-users', 3)
|
||||||
@ -155,7 +155,7 @@ class Mikrotik
|
|||||||
$profileID = $client->sendSync($printRequest)->getProperty('.id');
|
$profileID = $client->sendSync($printRequest)->getProperty('.id');
|
||||||
|
|
||||||
$removeRequest = new RouterOS\Request('/ip/hotspot/user/profile/remove');
|
$removeRequest = new RouterOS\Request('/ip/hotspot/user/profile/remove');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$removeRequest
|
$removeRequest
|
||||||
->setArgument('numbers', $profileID)
|
->setArgument('numbers', $profileID)
|
||||||
);
|
);
|
||||||
@ -173,7 +173,7 @@ class Mikrotik
|
|||||||
);
|
);
|
||||||
$userID = $client->sendSync($printRequest)->getProperty('.id');
|
$userID = $client->sendSync($printRequest)->getProperty('.id');
|
||||||
$removeRequest = new RouterOS\Request('/ip/hotspot/user/remove');
|
$removeRequest = new RouterOS\Request('/ip/hotspot/user/remove');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$removeRequest
|
$removeRequest
|
||||||
->setArgument('numbers', $userID)
|
->setArgument('numbers', $userID)
|
||||||
);
|
);
|
||||||
@ -397,7 +397,7 @@ class Mikrotik
|
|||||||
$poolID = $client->sendSync($printRequest)->getProperty('.id');
|
$poolID = $client->sendSync($printRequest)->getProperty('.id');
|
||||||
|
|
||||||
$removeRequest = new RouterOS\Request('/ip/pool/remove');
|
$removeRequest = new RouterOS\Request('/ip/pool/remove');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$removeRequest
|
$removeRequest
|
||||||
->setArgument('numbers', $poolID)
|
->setArgument('numbers', $poolID)
|
||||||
);
|
);
|
||||||
@ -433,7 +433,7 @@ class Mikrotik
|
|||||||
self::addPool($client, $name, $ip_address);
|
self::addPool($client, $name, $ip_address);
|
||||||
} else {
|
} else {
|
||||||
$setRequest = new RouterOS\Request('/ip/pool/set');
|
$setRequest = new RouterOS\Request('/ip/pool/set');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$setRequest
|
$setRequest
|
||||||
->setArgument('numbers', $poolID)
|
->setArgument('numbers', $poolID)
|
||||||
->setArgument('ranges', $ip_address)
|
->setArgument('ranges', $ip_address)
|
||||||
@ -473,7 +473,7 @@ class Mikrotik
|
|||||||
self::addPpoePlan($client, $name, $pool, $rate);
|
self::addPpoePlan($client, $name, $pool, $rate);
|
||||||
} else {
|
} else {
|
||||||
$setRequest = new RouterOS\Request('/ppp/profile/set');
|
$setRequest = new RouterOS\Request('/ppp/profile/set');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$setRequest
|
$setRequest
|
||||||
->setArgument('numbers', $profileID)
|
->setArgument('numbers', $profileID)
|
||||||
->setArgument('local-address', $pool)
|
->setArgument('local-address', $pool)
|
||||||
@ -496,9 +496,22 @@ class Mikrotik
|
|||||||
$profileID = $client->sendSync($printRequest)->getProperty('.id');
|
$profileID = $client->sendSync($printRequest)->getProperty('.id');
|
||||||
|
|
||||||
$removeRequest = new RouterOS\Request('/ppp/profile/remove');
|
$removeRequest = new RouterOS\Request('/ppp/profile/remove');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$removeRequest
|
$removeRequest
|
||||||
->setArgument('numbers', $profileID)
|
->setArgument('numbers', $profileID)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function sendSMS($client, $to, $message)
|
||||||
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
$smsRequest = new RouterOS\Request('/tool sms send');
|
||||||
|
$smsRequest
|
||||||
|
->setArgument('phone-number', $to)
|
||||||
|
->setArgument('message', $message);
|
||||||
|
$client->sendSync($smsRequest);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -326,7 +326,7 @@ class Package
|
|||||||
$c = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
$c = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||||
$p = ORM::for_table('tbl_plans')->where('id', $plan_id)->where('enabled', '1')->find_one();
|
$p = ORM::for_table('tbl_plans')->where('id', $plan_id)->where('enabled', '1')->find_one();
|
||||||
$b = ORM::for_table('tbl_user_recharges')->find_one($from_id);
|
$b = ORM::for_table('tbl_user_recharges')->find_one($from_id);
|
||||||
if($p['routers'] == $b['routers']){
|
if($p['routers'] == $b['routers'] && $b['routers'] != 'radius'){
|
||||||
$mikrotik = Mikrotik::info($p['routers']);
|
$mikrotik = Mikrotik::info($p['routers']);
|
||||||
}else{
|
}else{
|
||||||
$mikrotik = Mikrotik::info($b['routers']);
|
$mikrotik = Mikrotik::info($b['routers']);
|
||||||
@ -370,7 +370,7 @@ class Package
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// call the next mikrotik
|
// call the next mikrotik
|
||||||
if($p['routers'] != $b['routers']){
|
if($p['routers'] != $b['routers'] && $p['routers'] != 'radius'){
|
||||||
$mikrotik = Mikrotik::info($p['routers']);
|
$mikrotik = Mikrotik::info($p['routers']);
|
||||||
}
|
}
|
||||||
if ($p['type'] == 'Hotspot') {
|
if ($p['type'] == 'Hotspot') {
|
||||||
|
@ -345,7 +345,7 @@ try {
|
|||||||
r2(U . 'dashboard', 'e', 'not found');
|
r2(U . 'dashboard', 'e', 'not found');
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
if (isset($_SESSION['uid'])) {
|
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>');
|
||||||
|
@ -28,7 +28,8 @@ switch ($action) {
|
|||||||
'username' => '%' . $search . '%',
|
'username' => '%' . $search . '%',
|
||||||
'fullname' => '%' . $search . '%',
|
'fullname' => '%' . $search . '%',
|
||||||
'phonenumber' => '%' . $search . '%',
|
'phonenumber' => '%' . $search . '%',
|
||||||
'email' => '%' . $search . '%'
|
'email' => '%' . $search . '%',
|
||||||
|
'service_type' => '%' . $search . '%'
|
||||||
], $search);
|
], $search);
|
||||||
$d = ORM::for_table('tbl_customers')
|
$d = ORM::for_table('tbl_customers')
|
||||||
->where_raw("(`username` LIKE '%$search%' OR `fullname` LIKE '%$search%' OR `phonenumber` LIKE '%$search%' OR `email` LIKE '%$search%')", [$search, $search, $search, $search])
|
->where_raw("(`username` LIKE '%$search%' OR `fullname` LIKE '%$search%' OR `phonenumber` LIKE '%$search%' OR `email` LIKE '%$search%')", [$search, $search, $search, $search])
|
||||||
@ -225,8 +226,9 @@ switch ($action) {
|
|||||||
$password = _post('password');
|
$password = _post('password');
|
||||||
$pppoe_password = _post('pppoe_password');
|
$pppoe_password = _post('pppoe_password');
|
||||||
$email = _post('email');
|
$email = _post('email');
|
||||||
$address = _post('address');
|
$address = _post('address');
|
||||||
$phonenumber = _post('phonenumber');
|
$phonenumber = _post('phonenumber');
|
||||||
|
$service_type = _post('service_type');
|
||||||
run_hook('add_customer'); #HOOK
|
run_hook('add_customer'); #HOOK
|
||||||
$msg = '';
|
$msg = '';
|
||||||
if (Validator::Length($username, 35, 2) == false) {
|
if (Validator::Length($username, 35, 2) == false) {
|
||||||
@ -253,6 +255,7 @@ switch ($action) {
|
|||||||
$d->fullname = $fullname;
|
$d->fullname = $fullname;
|
||||||
$d->address = $address;
|
$d->address = $address;
|
||||||
$d->phonenumber = Lang::phoneFormat($phonenumber);
|
$d->phonenumber = Lang::phoneFormat($phonenumber);
|
||||||
|
$d->service_type = $service_type;
|
||||||
$d->save();
|
$d->save();
|
||||||
r2(U . 'customers/list', 's', $_L['account_created_successfully']);
|
r2(U . 'customers/list', 's', $_L['account_created_successfully']);
|
||||||
} else {
|
} else {
|
||||||
@ -268,6 +271,7 @@ switch ($action) {
|
|||||||
$email = _post('email');
|
$email = _post('email');
|
||||||
$address = _post('address');
|
$address = _post('address');
|
||||||
$phonenumber = Lang::phoneFormat(_post('phonenumber'));
|
$phonenumber = Lang::phoneFormat(_post('phonenumber'));
|
||||||
|
$service_type = _post('service_type');
|
||||||
run_hook('edit_customer'); #HOOK
|
run_hook('edit_customer'); #HOOK
|
||||||
$msg = '';
|
$msg = '';
|
||||||
if (Validator::Length($username, 16, 2) == false) {
|
if (Validator::Length($username, 16, 2) == false) {
|
||||||
@ -320,6 +324,7 @@ switch ($action) {
|
|||||||
$d->email = $email;
|
$d->email = $email;
|
||||||
$d->address = $address;
|
$d->address = $address;
|
||||||
$d->phonenumber = $phonenumber;
|
$d->phonenumber = $phonenumber;
|
||||||
|
$d->service_type = $service_type;
|
||||||
$d->save();
|
$d->save();
|
||||||
if ($userDiff || $pppoeDiff || $passDiff) {
|
if ($userDiff || $pppoeDiff || $passDiff) {
|
||||||
$c = ORM::for_table('tbl_user_recharges')->where('username', ($userDiff) ? $oldusername : $username)->find_one();
|
$c = ORM::for_table('tbl_user_recharges')->where('username', ($userDiff) ? $oldusername : $username)->find_one();
|
||||||
|
@ -219,7 +219,7 @@ switch ($action) {
|
|||||||
} else {
|
} else {
|
||||||
$msg .= $_L['Data_Not_Found'] . '<br>';
|
$msg .= $_L['Data_Not_Found'] . '<br>';
|
||||||
}
|
}
|
||||||
$p = ORM::for_table('tbl_plans')->where('id', $plan_id)->where('enabled', '1')->find_one();
|
$p = ORM::for_table('tbl_plans')->where('id', $id_plan)->where('enabled', '1')->find_one();
|
||||||
if ($d) {
|
if ($d) {
|
||||||
} else {
|
} else {
|
||||||
$msg .= ' Plan Not Found<br>';
|
$msg .= ' Plan Not Found<br>';
|
||||||
@ -231,7 +231,11 @@ switch ($action) {
|
|||||||
//$d->recharged_on = $recharged_on;
|
//$d->recharged_on = $recharged_on;
|
||||||
$d->expiration = $expiration;
|
$d->expiration = $expiration;
|
||||||
$d->time = $time;
|
$d->time = $time;
|
||||||
$d->routers = $p['routers'];
|
if($p['is_radius']){
|
||||||
|
$d->routers = 'radius';
|
||||||
|
}else{
|
||||||
|
$d->routers = $p['routers'];
|
||||||
|
}
|
||||||
$d->save();
|
$d->save();
|
||||||
Package::changeTo($username, $id_plan, $id);
|
Package::changeTo($username, $id_plan, $id);
|
||||||
_log('[' . $admin['username'] . ']: ' . 'Edit Plan for Customer ' . $d['username'] . ' to [' . $d['plan_name'] . '][' . Lang::moneyFormat($d['price']) . ']', 'Admin', $admin['id']);
|
_log('[' . $admin['username'] . ']: ' . 'Edit Plan for Customer ' . $d['username'] . ' to [' . $d['plan_name'] . '][' . Lang::moneyFormat($d['price']) . ']', 'Admin', $admin['id']);
|
||||||
|
@ -38,8 +38,14 @@ switch ($action) {
|
|||||||
$themes[] = $file;
|
$themes[] = $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$php = trim(shell_exec('which php'));
|
$r = ORM::for_table('tbl_routers')->find_many();
|
||||||
if (empty($php)) {
|
$ui->assign('r', $r);
|
||||||
|
if (function_exists("shell_exec")) {
|
||||||
|
$php = trim(shell_exec('which php'));
|
||||||
|
if (empty($php)) {
|
||||||
|
$php = 'php';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
$php = 'php';
|
$php = 'php';
|
||||||
}
|
}
|
||||||
$ui->assign('php', $php);
|
$ui->assign('php', $php);
|
||||||
@ -473,10 +479,9 @@ switch ($action) {
|
|||||||
$d->value = $tawkto;
|
$d->value = $tawkto;
|
||||||
$d->save();
|
$d->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($radius_enable) {
|
if ($radius_enable) {
|
||||||
try {
|
try {
|
||||||
Radius::getTableNas()->find_one(1);
|
Radius::getTableNas()->find_many();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$ui->assign("error_title", "RADIUS Error");
|
$ui->assign("error_title", "RADIUS Error");
|
||||||
$ui->assign("error_message", "Radius table not found.<br><br>" .
|
$ui->assign("error_message", "Radius table not found.<br><br>" .
|
||||||
|
@ -408,4 +408,8 @@ $_L['Change_title_in_user_Plan_order'] = 'Change title in user Plan order';
|
|||||||
$_L['Logs'] = 'Logs';
|
$_L['Logs'] = 'Logs';
|
||||||
$_L['Voucher_Format'] = 'Voucher Format';
|
$_L['Voucher_Format'] = 'Voucher Format';
|
||||||
$_L['Resend_To_Customer'] = 'Resend To Customer';
|
$_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['Others'] = 'Others';
|
||||||
|
$_L['PPPoE'] = 'PPPoE';
|
||||||
|
$_L['Hotspot'] = 'Hotspot';
|
||||||
|
@ -408,3 +408,7 @@ $_L['Change_title_in_user_Plan_order'] = 'Ubah judul dalam urutan paket pelangga
|
|||||||
$_L['Logs'] = 'Log';
|
$_L['Logs'] = 'Log';
|
||||||
$_L['Voucher_Format'] = 'Format Voucher';
|
$_L['Voucher_Format'] = 'Format Voucher';
|
||||||
$_L['Resend_To_Customer'] = 'Kirim Ulang Ke Pelanggan';
|
$_L['Resend_To_Customer'] = 'Kirim Ulang Ke Pelanggan';
|
||||||
|
$_L['Service_Type'] = 'Service Type';
|
||||||
|
$_L['Others'] = 'Lainnya';
|
||||||
|
$_L['PPPoE'] = 'PPPoE';
|
||||||
|
$_L['Hotspot'] = 'Hotspot';
|
@ -401,4 +401,8 @@ $_L['Deactivate'] = 'Deactivate';
|
|||||||
$_L['Sync'] = 'Sync';
|
$_L['Sync'] = 'Sync';
|
||||||
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
||||||
$_L['Location'] = 'Location';
|
$_L['Location'] = 'Location';
|
||||||
$_L['Voucher_Format'] = 'Voucher Format';
|
$_L['Voucher_Format'] = 'Voucher Format';
|
||||||
|
$_L['Service_Type'] = 'Service Type';
|
||||||
|
$_L['Others'] = 'Others';
|
||||||
|
$_L['PPPoE'] = 'PPPoE';
|
||||||
|
$_L['Hotspot'] = 'Hotspot';
|
@ -378,4 +378,8 @@ $_L['Deactivate'] = 'Deactivate';
|
|||||||
$_L['Sync'] = 'Sync';
|
$_L['Sync'] = 'Sync';
|
||||||
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
||||||
$_L['Location'] = 'Location';
|
$_L['Location'] = 'Location';
|
||||||
$_L['Voucher_Format'] = 'Voucher Format';
|
$_L['Voucher_Format'] = 'Voucher Format';
|
||||||
|
$_L['Service_Type'] = 'Service Type';
|
||||||
|
$_L['Others'] = 'Others';
|
||||||
|
$_L['PPPoE'] = 'PPPoE';
|
||||||
|
$_L['Hotspot'] = 'Hotspot';
|
@ -35,5 +35,8 @@
|
|||||||
],
|
],
|
||||||
"2023.10.24" : [
|
"2023.10.24" : [
|
||||||
"ALTER TABLE `nas` ADD `routers` VARCHAR(32) NOT NULL DEFAULT '' AFTER `description`;"
|
"ALTER TABLE `nas` ADD `routers` VARCHAR(32) NOT NULL DEFAULT '' AFTER `description`;"
|
||||||
|
],
|
||||||
|
"2023.12.15": [
|
||||||
|
"ALTER TABLE `tbl_customers` ADD `service_type` ENUM('Hotspot','PPPoE','Others') DEFAULT 'Others' COMMENT 'For selecting user type' AFTER `balance`;"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -225,6 +225,20 @@
|
|||||||
replaced.
|
replaced.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">Or use Mikrotik SMS</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select class="form-control" onchange="document.getElementById('sms_url').value = this.value">
|
||||||
|
<option value="">Select Router</option>
|
||||||
|
{foreach $r as $rs}
|
||||||
|
<option value="{$rs['name']}" {if $rs['name']==$_c['sms_url']}selected{/if}>{$rs['name']}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<p class="help-block col-md-4">Must include <b>[text]</b> & <b>[number]</b>, it will be
|
||||||
|
replaced.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<small id="emailHelp" class="form-text text-muted">You can use WhatsApp in here too. <a
|
<small id="emailHelp" class="form-text text-muted">You can use WhatsApp in here too. <a
|
||||||
href="https://wa.nux.my.id/login" target="_blank">Free Server</a></small>
|
href="https://wa.nux.my.id/login" target="_blank">Free Server</a></small>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
{include file="sections/header.tpl"}
|
{include file="sections/header.tpl"}
|
||||||
|
|
||||||
|
<center><a href="https://s.id/standwithpalestine" target="_blank"><img src="https://raw.githubusercontent.com/Safouene1/support-palestine-banner/master/banner-support.svg" class="img-responsive"></a></center>
|
||||||
|
<br><br>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="box box-hovered mb20 box-primary">
|
<div class="box box-hovered mb20 box-primary">
|
||||||
|
@ -72,6 +72,16 @@
|
|||||||
<textarea name="address" id="address" class="form-control"></textarea>
|
<textarea name="address" id="address" class="form-control"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">{Lang::T('Service Type')}</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select class="form-control" id="service_type" name="service_type">
|
||||||
|
<option value="Hotspot" {if $d['service_type'] eq 'Hotspot'}selected{/if}>Hotspot</option>
|
||||||
|
<option value="PPPoE" {if $d['service_type'] eq 'PPPoE'}selected{/if}>PPPoE</option>
|
||||||
|
<option value="Others" {if $d['service_type'] eq 'Others'}selected{/if}>Others</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-lg-offset-2 col-lg-10">
|
<div class="col-lg-offset-2 col-lg-10">
|
||||||
|
@ -77,6 +77,16 @@
|
|||||||
<textarea name="address" id="address" class="form-control">{$d['address']}</textarea>
|
<textarea name="address" id="address" class="form-control">{$d['address']}</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">{Lang::T('Service Type')}</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select class="form-control" id="service_type" name="service_type">
|
||||||
|
<option value="Hotspot" {if $d['service_type'] eq 'Hotspot'}selected{/if}>Hotspot</option>
|
||||||
|
<option value="PPPoE" {if $d['service_type'] eq 'PPPoE'}selected{/if}>PPPoE</option>
|
||||||
|
<option value="Others" {if $d['service_type'] eq 'Others'}selected{/if}>Others</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-lg-offset-2 col-lg-10">
|
<div class="col-lg-offset-2 col-lg-10">
|
||||||
|
@ -37,6 +37,9 @@
|
|||||||
onclick="this.select()">
|
onclick="this.select()">
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
|
<li class="list-group-item">
|
||||||
|
<b>{Lang::T('Service Type')}</b> <span class="pull-right">{Lang::T($d['service_type'])}</span>
|
||||||
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<b>{Lang::T('Balance')}</b> <span class="pull-right">{Lang::moneyFormat($d['balance'])}</span>
|
<b>{Lang::T('Balance')}</b> <span class="pull-right">{Lang::moneyFormat($d['balance'])}</span>
|
||||||
</li>
|
</li>
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
<th>{$_L['Phone_Number']}</th>
|
<th>{$_L['Phone_Number']}</th>
|
||||||
<th>{$_L['Email']}</th>
|
<th>{$_L['Email']}</th>
|
||||||
<th>{$_L['Package']}</th>
|
<th>{$_L['Package']}</th>
|
||||||
|
<th>{Lang::T('Service Type')}</th>
|
||||||
<th>{$_L['Created_On']}</th>
|
<th>{$_L['Created_On']}</th>
|
||||||
<th>{$_L['Manage']}</th>
|
<th>{$_L['Manage']}</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -48,6 +49,7 @@
|
|||||||
<td align="center" api-get-text="{$_url}autoload/customer_is_active/{$ds['id']}">
|
<td align="center" api-get-text="{$_url}autoload/customer_is_active/{$ds['id']}">
|
||||||
<span class="label label-default">•</span>
|
<span class="label label-default">•</span>
|
||||||
</td>
|
</td>
|
||||||
|
<td>{$ds['service_type']}</td>
|
||||||
<td>{Lang::dateTimeFormat($ds['created_at'])}</td>
|
<td>{Lang::dateTimeFormat($ds['created_at'])}</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="{$_url}customers/view/{$ds['id']}" id="{$ds['id']}" style="margin: 0px;"
|
<a href="{$_url}customers/view/{$ds['id']}" id="{$ds['id']}" style="margin: 0px;"
|
||||||
|
@ -74,6 +74,11 @@
|
|||||||
style="width:100%; border: 0px;" onmouseleave="this.type = 'password'"
|
style="width:100%; border: 0px;" onmouseleave="this.type = 'password'"
|
||||||
onmouseenter="this.type = 'text'" onclick="this.select()"></td>
|
onmouseenter="this.type = 'text'" onclick="this.select()"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small text-success text-uppercase text-normal">{Lang::T('Service Type')}</td>
|
||||||
|
<td class="small mb15">{$_user['service_type']}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
{if $_c['enable_balance'] == 'yes'}
|
{if $_c['enable_balance'] == 'yes'}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="small text-warning text-uppercase text-normal">{Lang::T('Balance')}</td>
|
<td class="small text-warning text-uppercase text-normal">{Lang::T('Balance')}</td>
|
||||||
|
@ -6,218 +6,368 @@
|
|||||||
<div class="box-header">{Lang::T('Order Internet Package')}</div>
|
<div class="box-header">{Lang::T('Order Internet Package')}</div>
|
||||||
</div>
|
</div>
|
||||||
{if $_c['radius_enable']}
|
{if $_c['radius_enable']}
|
||||||
{if Lang::arrayCount($radius_hotspot)>0}
|
{if $_user['service_type'] == 'PPPoE'}
|
||||||
<ol class="breadcrumb">
|
{if Lang::arrayCount($radius_pppoe)>0}
|
||||||
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li>
|
<ol class="breadcrumb">
|
||||||
<li>{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</li>
|
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li>
|
||||||
</ol>
|
<li>{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</li>
|
||||||
<div class="row">
|
</ol>
|
||||||
{foreach $radius_hotspot as $plan}
|
<div class="row">
|
||||||
<div class="col col-md-4">
|
{foreach $radius_pppoe as $plan}
|
||||||
<div class="box box-primary">
|
<div class="col col-md-4">
|
||||||
<div class="box-header text-bold">{$plan['name_plan']}</div>
|
<div class="box box-primary">
|
||||||
<div class="table-responsive">
|
<div class="box-header text-bold">{$plan['name_plan']}</div>
|
||||||
<table class="table table-bordered table-striped">
|
<div class="table-responsive">
|
||||||
<tbody>
|
<table class="table table-bordered table-striped">
|
||||||
<tr>
|
<tbody>
|
||||||
<td>{Lang::T('Type')}</td>
|
<tr>
|
||||||
<td>{$plan['type']}</td>
|
<td>{Lang::T('Type')}</td>
|
||||||
</tr>
|
<td>{$plan['type']}</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td>{Lang::T('Price')}</td>
|
<tr>
|
||||||
<td>{Lang::moneyFormat($plan['price'])}</td>
|
<td>{Lang::T('Price')}</td>
|
||||||
</tr>
|
<td>{Lang::moneyFormat($plan['price'])}</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td>{Lang::T('Validity')}</td>
|
<tr>
|
||||||
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
<td>{Lang::T('Validity')}</td>
|
||||||
</tr>
|
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
||||||
</tbody>
|
</tr>
|
||||||
</table>
|
</tbody>
|
||||||
</div>
|
</table>
|
||||||
<div class="box-body">
|
|
||||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
|
||||||
<a href="{$_url}order/buy/radius/{$plan['id']}"
|
|
||||||
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
|
|
||||||
class="btn btn-sm btn-block btn-warning text-black">Buy</a>
|
|
||||||
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
|
|
||||||
<a href="{$_url}order/pay/radius/{$plan['id']}"
|
|
||||||
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
|
|
||||||
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
|
|
||||||
<a href="{$_url}order/send/radius/{$plan['id']}"
|
|
||||||
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
|
|
||||||
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
<div class="box-body">
|
||||||
</div>
|
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||||
{/if}
|
<a href="{$_url}order/buy/radius/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')" class="btn btn-sm btn-block btn-warning text-black">Buy</a>
|
||||||
{if Lang::arrayCount($radius_pppoe)>0}
|
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
<ol class="breadcrumb">
|
<a href="{$_url}order/pay/radius/{$plan['id']}" onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')" class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
|
||||||
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li>
|
{/if}
|
||||||
<li>{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</li>
|
|
||||||
</ol>
|
|
||||||
<div class="row">
|
|
||||||
{foreach $radius_pppoe as $plan}
|
|
||||||
<div class="col col-md-4">
|
|
||||||
<div class="box box- box-primary">
|
|
||||||
<div class="box-header text-bold">{$plan['name_plan']}</div>
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-bordered table-striped">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>{Lang::T('Type')}</td>
|
|
||||||
<td>{$plan['type']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>{Lang::T('Price')}</td>
|
|
||||||
<td>{Lang::moneyFormat($plan['price'])}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>{Lang::T('Validity')}</td>
|
|
||||||
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="box-body">
|
|
||||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
|
||||||
<a href="{$_url}order/buy/radius/{$plan['id']}"
|
|
||||||
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
|
|
||||||
class="btn btn-sm btn-block btn-warning text-black">Buy</a>
|
|
||||||
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
|
|
||||||
<a href="{$_url}order/pay/radius/{$plan['id']}"
|
|
||||||
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
|
|
||||||
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
|
|
||||||
<a href="{$_url}order/send/radius/{$plan['id']}"
|
|
||||||
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
|
|
||||||
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/send/radius/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this for friend account?')}')" class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{elseif $_user['service_type'] == 'Hotspot'}
|
||||||
|
{if Lang::arrayCount($radius_hotspot)>0}
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li>
|
||||||
|
<li>{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
{foreach $radius_hotspot as $plan}
|
||||||
|
<div class="col col-md-4">
|
||||||
|
<div class="box box-primary">
|
||||||
|
<div class="box-header text-bold">{$plan['name_plan']}</div>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Type')}</td>
|
||||||
|
<td>{$plan['type']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Price')}</td>
|
||||||
|
<td>{Lang::moneyFormat($plan['price'])}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Validity')}</td>
|
||||||
|
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||||
|
<a href="{$_url}order/buy/radius/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')" class="btn btn-sm btn-block btn-warning text-black">Buy</a>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/pay/radius/{$plan['id']}" onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')" class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/send/radius/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this for friend account?')}')" class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{elseif $_user['service_type'] == 'Others' || $_user['service_type'] == '' && (Lang::arrayCount($radius_pppoe)>0 || Lang::arrayCount($radius_hotspot)>0)}
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li>
|
||||||
|
<li>{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</li>
|
||||||
|
</ol>
|
||||||
|
<div class="row">
|
||||||
|
{if Lang::arrayCount($radius_pppoe)>0}
|
||||||
|
{foreach $radius_pppoe as $plan}
|
||||||
|
<div class="col col-md-4">
|
||||||
|
<div class="box box-primary">
|
||||||
|
<div class="box-header text-bold">{$plan['name_plan']}</div>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Type')}</td>
|
||||||
|
<td>{$plan['type']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Price')}</td>
|
||||||
|
<td>{Lang::moneyFormat($plan['price'])}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Validity')}</td>
|
||||||
|
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||||
|
<a href="{$_url}order/buy/pppoe/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this? your active package will be overwritten')}')" class="btn btn-sm btn-block btn-warning text-black">Buy</a>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/pay/pppoe/{$plan['id']}" onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwritten')}')" class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/send/pppoe/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this for friend account?')}')" class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/foreach}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{if Lang::arrayCount($radius_hotspot)>0}
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li>
|
||||||
|
<li>{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</li>
|
||||||
|
</ol>
|
||||||
|
{foreach $radius_hotspot as $plan}
|
||||||
|
<div class="col col-md-4">
|
||||||
|
<div class="box box-primary">
|
||||||
|
<div class="box-header text-bold">{$plan['name_plan']}</div>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Type')}</td>
|
||||||
|
<td>{$plan['type']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Price')}</td>
|
||||||
|
<td>{Lang::moneyFormat($plan['price'])}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Validity')}</td>
|
||||||
|
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||||
|
<a href="{$_url}order/buy/hotspot/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this? your active package will be overwritten')}')" class="btn btn-sm btn-block btn-warning text-black">Buy</a>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/pay/hotspot/{$plan['id']}" onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwritten')}')" class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/send/hotspot/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this for friend account?')}')" class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/foreach}
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{foreach $routers as $router}
|
{foreach $routers as $router}
|
||||||
{if Validator::isRouterHasPlan($plans_hotspot, $router['name']) || Validator::isRouterHasPlan($plans_pppoe, $router['name'])}
|
{if Validator::isRouterHasPlan($plans_hotspot, $router['name']) || Validator::isRouterHasPlan($plans_pppoe, $router['name'])}
|
||||||
<div class="box box-solid box-primary bg-gray">
|
<div class="box box-solid box-primary bg-gray">
|
||||||
<div class="box-header text-white text-bold">{$router['name']}</div>
|
<div class="box-header text-white text-bold">{$router['name']}</div>
|
||||||
{if $router['description'] != ''}
|
{if $router['description'] != ''}
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
{$router['description']}
|
{$router['description']}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
|
||||||
{if Validator::countRouterPlan($plans_hotspot, $router['name'])>0}
|
|
||||||
<div class="box-header text-white">{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</div>
|
|
||||||
<div class="box-body row">
|
|
||||||
{foreach $plans_hotspot as $plan}
|
|
||||||
{if $router['name'] eq $plan['routers']}
|
|
||||||
<div class="col col-md-4">
|
|
||||||
<div class="box box-primary">
|
|
||||||
<div class="box-header text-center text-bold">{$plan['name_plan']}</div>
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-bordered table-striped">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>{Lang::T('Type')}</td>
|
|
||||||
<td>{$plan['type']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>{Lang::T('Price')}</td>
|
|
||||||
<td>{Lang::moneyFormat($plan['price'])}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>{Lang::T('Validity')}</td>
|
|
||||||
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="box-body">
|
|
||||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
|
||||||
<a href="{$_url}order/buy/{$router['id']}/{$plan['id']}"
|
|
||||||
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
|
|
||||||
class="btn btn-sm btn-block btn-warning text-black">Buy</a>
|
|
||||||
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
|
|
||||||
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}"
|
|
||||||
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
|
|
||||||
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
|
|
||||||
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}"
|
|
||||||
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
|
|
||||||
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
{/foreach}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
{if Validator::countRouterPlan($plans_pppoe,$router['name'])>0}
|
|
||||||
<div class="box-header text-white">{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</div>
|
|
||||||
<div class="box-body row">
|
|
||||||
{foreach $plans_pppoe as $plan}
|
|
||||||
{if $router['name'] eq $plan['routers']}
|
|
||||||
<div class="col col-md-4">
|
|
||||||
<div class="box box- box-primary">
|
|
||||||
<div class="box-header text-bold text-center">{$plan['name_plan']}</div>
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-bordered table-striped">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>{Lang::T('Type')}</td>
|
|
||||||
<td>{$plan['type']}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>{Lang::T('Price')}</td>
|
|
||||||
<td>{Lang::moneyFormat($plan['price'])}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>{Lang::T('Validity')}</td>
|
|
||||||
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<div class="box-body">
|
|
||||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
|
||||||
<a href="{$_url}order/buy/{$router['id']}/{$plan['id']}"
|
|
||||||
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
|
|
||||||
class="btn btn-sm btn-block btn-warning text-black">Buy</a>
|
|
||||||
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
|
|
||||||
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}"
|
|
||||||
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
|
|
||||||
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
|
|
||||||
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}"
|
|
||||||
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
|
|
||||||
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
{/foreach}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
{if $_user['service_type'] == 'Hotspot' && Validator::countRouterPlan($plans_hotspot, $router['name'])>0}
|
||||||
|
<div class="box-header text-white">{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</div>
|
||||||
|
<div class="box-body row">
|
||||||
|
{foreach $plans_hotspot as $plan}
|
||||||
|
{if $router['name'] eq $plan['routers']}
|
||||||
|
<div class="col col-md-4">
|
||||||
|
<div class="box box-primary">
|
||||||
|
<div class="box-header text-center text-bold">{$plan['name_plan']}</div>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Type')}</td>
|
||||||
|
<td>{$plan['type']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Price')}</td>
|
||||||
|
<td>{Lang::moneyFormat($plan['price'])}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Validity')}</td>
|
||||||
|
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||||
|
<a href="{$_url}order/buy/{$router['id']}/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')" class="btn btn-sm btn-block btn-warning text-black">Buy</a>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}" onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')" class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this for friend account?')}')" class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{if $_user['service_type'] == 'PPPoE' && Validator::countRouterPlan($plans_pppoe,$router['name'])>0}
|
||||||
|
<div class="box-header text-white">{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</div>
|
||||||
|
<div class="box-body row">
|
||||||
|
{foreach $plans_pppoe as $plan}
|
||||||
|
{if $router['name'] eq $plan['routers']}
|
||||||
|
<div class="col col-md-4">
|
||||||
|
<div class="box box- box-primary">
|
||||||
|
<div class="box-header text-bold text-center">{$plan['name_plan']}</div>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Type')}</td>
|
||||||
|
<td>{$plan['type']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Price')}</td>
|
||||||
|
<td>{Lang::moneyFormat($plan['price'])}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Validity')}</td>
|
||||||
|
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||||
|
<a href="{$_url}order/buy/{$router['id']}/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')" class="btn btn-sm btn-block btn-warning text-black">Buy</a>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}" onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')" class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this for friend account?')}')" class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{if $_user['service_type'] == 'Others' || $_user['service_type'] == '' && (Validator::countRouterPlan($plans_hotspot, $router['name'])>0 || Validator::countRouterPlan($plans_pppoe, $router['name'])>0)}
|
||||||
|
<div class="box-header text-white">{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</div>
|
||||||
|
<div class="box-body row">
|
||||||
|
{foreach $plans_hotspot as $plan}
|
||||||
|
{if $router['name'] eq $plan['routers']}
|
||||||
|
<div class="col col-md-4">
|
||||||
|
<div class="box box-primary">
|
||||||
|
<div class="box-header text-center text-bold">{$plan['name_plan']}</div>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Type')}</td>
|
||||||
|
<td>{$plan['type']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Price')}</td>
|
||||||
|
<td>{Lang::moneyFormat($plan['price'])}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Validity')}</td>
|
||||||
|
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||||
|
<a href="{$_url}order/buy/{$router['id']}/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')" class="btn btn-sm btn-block btn-warning text-black">Buy</a>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}" onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')" class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this for friend account?')}')" class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
|
<div class="box-header text-white">{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</div>
|
||||||
|
<div class="box-body row">
|
||||||
|
{foreach $plans_pppoe as $plan}
|
||||||
|
{if $router['name'] eq $plan['routers']}
|
||||||
|
<div class="col col-md-4">
|
||||||
|
<div class="box box- box-primary">
|
||||||
|
<div class="box-header text-bold text-center">{$plan['name_plan']}</div>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Type')}</td>
|
||||||
|
<td>{$plan['type']}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Price')}</td>
|
||||||
|
<td>{Lang::moneyFormat($plan['price'])}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{Lang::T('Validity')}</td>
|
||||||
|
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||||
|
<a href="{$_url}order/buy/{$router['id']}/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')" class="btn btn-sm btn-block btn-warning text-black">Buy</a>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}" onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')" class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
|
||||||
|
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}" onclick="return confirm('{Lang::T('Buy this for friend account?')}')" class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{include file="sections/user-footer.tpl"}
|
{include file="sections/user-footer.tpl"}
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version": "2023.11.17"
|
"version": "2023.12.14"
|
||||||
}
|
}
|
Reference in New Issue
Block a user