forked from kevinowino869/mitrobill
Compare commits
75 Commits
2023.10.17
...
2023.12.19
Author | SHA1 | Date | |
---|---|---|---|
5e76c3e214 | |||
e2c0fa5690 | |||
3afb7b9954 | |||
13b448da69 | |||
017518b308 | |||
4ae19849a1 | |||
d666e052f4 | |||
9c22c22f6c | |||
518fe7563e | |||
adc2c808e2 | |||
a7a0f84df5 | |||
b7c663f4ee | |||
dd4329ad3d | |||
41b981cb70 | |||
431c971f3a | |||
653580722e | |||
6a0ad7f178 | |||
9d79121696 | |||
8e84c32616 | |||
486e22f020 | |||
21d83268f7 | |||
e886249091 | |||
d5ab0e1b44 | |||
05aca0356f | |||
cced38527b | |||
452642831c | |||
69ea0d0b7f | |||
4b596d91bd | |||
9c5e3007a2 | |||
d3893d88a4 | |||
1ed55103a3 | |||
bd8dd87384 | |||
9190660c1c | |||
d241b2cec6 | |||
80c76cd6dc | |||
a1648a4178 | |||
c8d19a859f | |||
90cfc3e6d9 | |||
88a3e2d205 | |||
0039f47947 | |||
c2f1f07cfc | |||
f61ebb642e | |||
77e7a96f96 | |||
5c57c5df11 | |||
9e09611816 | |||
09ead77d7b | |||
703f9a7463 | |||
ef25633275 | |||
02a68589a1 | |||
25cd07e975 | |||
4e7a60aa6f | |||
baca2d706f | |||
4f975fbf0d | |||
cded80a632 | |||
f0d130b6b9 | |||
a18c07ba42 | |||
36b47a3e8d | |||
37f72d881e | |||
e99108a34a | |||
ddb3b8a718 | |||
3c4920f958 | |||
e2da5b67bf | |||
49c8fe5d55 | |||
9402da311c | |||
51ab4a35c5 | |||
d037b2bef4 | |||
d95e4d1d84 | |||
7ebf95f4be | |||
8cbe32e313 | |||
0d27503e8d | |||
1ae687bda2 | |||
d59f696fde | |||
b9537d4a4b | |||
e88d1f02a6 | |||
eda7967f66 |
27
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ibnux
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is. Error connecting to router is not a bug, is your router port is not accessable, ask community for help, go to discussion or telegram group
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
51
CHANGELOG.md
51
CHANGELOG.md
@ -2,6 +2,57 @@
|
||||
|
||||
# CHANGELOG
|
||||
|
||||
## 2023.12.19
|
||||
|
||||
- Fix Search Customer
|
||||
- Disable Registration, Customer just activate voucher Code, and the voucher will be their password
|
||||
- Remove all used voucher codes
|
||||
|
||||
## 2023.12.18
|
||||
|
||||
- Split sms to 160 characters only for Mikrotik Modem
|
||||
|
||||
## 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
|
||||
|
||||
- Error details not show in Customer
|
||||
|
||||
## 2023.11.15
|
||||
|
||||
- Customer Multi Router package
|
||||
- Fix edit package, Admin can change Customer to another router
|
||||
|
||||
## 2023.11.9
|
||||
|
||||
- fix bug variable in cron
|
||||
- fix update plan
|
||||
|
||||
## 2023.10.27
|
||||
|
||||
- Backup and restore database
|
||||
- Fix checking radius client
|
||||
|
||||
## 2023.10.25
|
||||
|
||||
- fix wrong file check in cron, error only for newly installed
|
||||
|
||||
## 2023.10.24
|
||||
|
||||
- Fix logic cronjob
|
||||
- assign router to NAS, but not yet used
|
||||
- Fix Pagination
|
||||
- Move Alert from hardcode
|
||||
|
||||
## 2023.10.20
|
||||
|
||||
- View Invoice
|
||||
- Resend Invoice
|
||||
- Custom Voucher
|
||||
|
||||
## 2023.10.17
|
||||
|
||||
- Happy Birthday To Me 🎂 \(^o^)/
|
||||
|
@ -1,3 +1,5 @@
|
||||
[](https://s.id/standwithpalestine)
|
||||
|
||||
# PHPNuxBill - PHP Mikrotik Billing
|
||||
|
||||

|
||||
@ -5,6 +7,7 @@
|
||||
## Feature
|
||||
|
||||
- Voucher Generator and Print
|
||||
- FreeRadius
|
||||
- Self registration
|
||||
- User Balance
|
||||
- Auto Renewal Package using Balance
|
||||
@ -33,7 +36,7 @@ Most current web servers with PHP & MySQL installed will be capable of running P
|
||||
Minimum Requirements
|
||||
|
||||
- Linux or Windows OS
|
||||
- PHP Version 7.4
|
||||
- Minimum PHP Version 7.4
|
||||
- Both PDO & MySQLi Support
|
||||
- PHP-GD2 Image Library
|
||||
- PHP-CURL
|
||||
@ -56,9 +59,9 @@ The problem with windows is hard to set cronjob, better Linux
|
||||
|
||||
[Docker Repository](https://github.com/animegasan/phpnuxbill)
|
||||
|
||||
## RADIUS system
|
||||
## Freeradius
|
||||
|
||||
Still on development
|
||||
Support [Freeradius with Database](https://github.com/hotspotbilling/phpnuxbill/wiki/FreeRadius)
|
||||
|
||||
## Community Support
|
||||
|
||||
|
@ -27,6 +27,7 @@ CREATE TABLE `tbl_customers` (
|
||||
`phonenumber` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
|
||||
`email` varchar(128) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1',
|
||||
`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',
|
||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`last_login` datetime DEFAULT NULL
|
||||
@ -280,7 +281,7 @@ ALTER TABLE `tbl_voucher`
|
||||
|
||||
INSERT INTO
|
||||
`tbl_appconfig` (`id`, `setting`, `value`)
|
||||
VALUES (1, 'CompanyName', 'PHPNuxBill'), (2, 'currency_code', 'Rp.'), (3, 'language', 'indonesia'), (4, 'show-logo', '1'), (5, 'nstyle', 'blue'), (6, 'timezone', 'Asia/Jakarta'), (7, 'dec_point', ','), (8, 'thousands_sep', '.'), (9, 'rtl', '0'), (10, 'address', ''), (11, 'phone', ''), (12, 'date_format', 'd M Y'), (13, 'note', 'Thank you...');
|
||||
VALUES (1, 'CompanyName', 'PHPNuxBill'), (2, 'currency_code', 'Rp.'), (3, 'language', 'english'), (4, 'show-logo', '1'), (5, 'nstyle', 'blue'), (6, 'timezone', 'Asia/Jakarta'), (7, 'dec_point', ','), (8, 'thousands_sep', '.'), (9, 'rtl', '0'), (10, 'address', ''), (11, 'phone', ''), (12, 'date_format', 'd M Y'), (13, 'note', 'Thank you...');
|
||||
|
||||
--
|
||||
|
||||
|
@ -9,7 +9,8 @@ CREATE TABLE `nas` (
|
||||
`secret` varchar(60) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'secret',
|
||||
`server` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`community` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
|
||||
`description` varchar(200) COLLATE utf8mb4_general_ci DEFAULT 'RADIUS Client'
|
||||
`description` varchar(200) COLLATE utf8mb4_general_ci DEFAULT 'RADIUS Client',
|
||||
`routers` varchar(32) COLLATE utf8mb4_general_ci NOT NULL DEFAULT ''
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
DROP TABLE IF EXISTS `radacct`;
|
||||
|
@ -25,7 +25,7 @@ try {
|
||||
}
|
||||
|
||||
if ($cn == '1') {
|
||||
if ($_POST['radius'] == 'yes') {
|
||||
if (isset($_POST['radius']) && $_POST['radius'] == 'yes') {
|
||||
$input = '<?php
|
||||
|
||||
define(\'APP_URL\', \'' . $appurl . '\');
|
||||
@ -83,7 +83,7 @@ if($_app_stage!=\'Live\'){
|
||||
fclose($fh);
|
||||
$sql = file_get_contents('phpnuxbill.sql');
|
||||
$qr = $dbh->exec($sql);
|
||||
if ($_POST['radius'] == 'yes') {
|
||||
if (isset($_POST['radius']) && $_POST['radius'] == 'yes') {
|
||||
$sql = file_get_contents('radius.sql');
|
||||
$qrs = $dbh->exec($sql);
|
||||
}
|
||||
|
@ -1,31 +1,27 @@
|
||||
|
||||
<center><strong style="font-size:38px">{$_c['CompanyName']}</strong></center>
|
||||
<table width="100%" border="1" cellspacing="0" cellpadding="4" bordercolor="#757575">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" align="left">Pendaftaran dan Informasi Billing buka <b>billing.ibnux.net</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" align="left">Wireless Hotspot:
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td>iBNuXnet</td>
|
||||
<td>iBNuXnet-P</td>
|
||||
<td>iBNuXnet-Q</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CitraGadingBlokP 3/4</td>
|
||||
<td>CitraGadingBlokQ 2/3/4/5/6</td>
|
||||
<td>iBNuXnet 5Ghz</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" align="left">Voucher yang sudah dibeli tidak dapat dikembalikan</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" align="center"><b>hotspot.ibnux.net</b></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td valign="middle">
|
||||
<center><strong style="font-size:38px">[[company_name]]</strong></center>
|
||||
<table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolor="#757575">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="4" width="1">[[qrcode]]
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:25px">
|
||||
[[price]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:20px">
|
||||
[[voucher_code]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:15px">
|
||||
[[plan]]</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
@ -86,4 +86,17 @@ class Lang
|
||||
{
|
||||
return ucwords(str_replace('_', ' ', $text));
|
||||
}
|
||||
|
||||
public static function randomUpLowCase($text){
|
||||
$jml = strlen($text);
|
||||
$result = '';
|
||||
for($i = 0; $i < $jml;$i++){
|
||||
if(rand(0,99)%2){
|
||||
$result .= strtolower(substr($text,$i,1));
|
||||
}else{
|
||||
$result .= substr($text,$i,1);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
@ -24,9 +24,34 @@ class Message
|
||||
global $config;
|
||||
run_hook('send_sms'); #HOOK
|
||||
if (!empty($config['sms_url'])) {
|
||||
$smsurl = str_replace('[number]', urlencode($phone), $config['sms_url']);
|
||||
$smsurl = str_replace('[text]', urlencode($txt), $smsurl);
|
||||
Http::getData($smsurl);
|
||||
if (strlen($config['sms_url']) > 4 && substr($config['sms_url'], 0, 4) != "http") {
|
||||
if (strlen($txt) > 160) {
|
||||
$txts = str_split($txt, 160);
|
||||
foreach ($txts as $txt) {
|
||||
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{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,4 +100,31 @@ class Message
|
||||
}
|
||||
return "$via: $msg";
|
||||
}
|
||||
|
||||
public static function sendInvoice($cust, $trx)
|
||||
{
|
||||
global $config;
|
||||
$textInvoice = Lang::getNotifText('invoice_paid');
|
||||
$textInvoice = str_replace('[[company_name]]', $config['CompanyName'], $textInvoice);
|
||||
$textInvoice = str_replace('[[address]]', $config['address'], $textInvoice);
|
||||
$textInvoice = str_replace('[[phone]]', $config['phone'], $textInvoice);
|
||||
$textInvoice = str_replace('[[invoice]]', $trx['invoice'], $textInvoice);
|
||||
$textInvoice = str_replace('[[date]]', Lang::dateAndTimeFormat($trx['recharged_on'], $trx['recharged_time']), $textInvoice);
|
||||
$textInvoice = str_replace('[[payment_gateway]]', $config['gateway'], $textInvoice);
|
||||
$textInvoice = str_replace('[[payment_channel]]', $config['channel'], $textInvoice);
|
||||
$textInvoice = str_replace('[[type]]', $trx['type'], $textInvoice);
|
||||
$textInvoice = str_replace('[[plan_name]]', $trx['plan_name'], $textInvoice);
|
||||
$textInvoice = str_replace('[[plan_price]]', Lang::moneyFormat($trx['price']), $textInvoice);
|
||||
$textInvoice = str_replace('[[name]]', $cust['fullname'], $textInvoice);
|
||||
$textInvoice = str_replace('[[user_name]]', $trx['username'], $textInvoice);
|
||||
$textInvoice = str_replace('[[user_password]]', $cust['password'], $textInvoice);
|
||||
$textInvoice = str_replace('[[expired_date]]', Lang::dateAndTimeFormat($trx['expiration'], $trx['time']), $textInvoice);
|
||||
$textInvoice = str_replace('[[footer]]', $config['note'], $textInvoice);
|
||||
|
||||
if ($config['user_notification_payment'] == 'sms') {
|
||||
Message::sendSMS($cust['phonenumber'], $textInvoice);
|
||||
} else if ($config['user_notification_payment'] == 'wa') {
|
||||
Message::sendWhatsapp($cust['phonenumber'], $textInvoice);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||
* by https://t.me/ibnux
|
||||
@ -15,20 +16,20 @@ class Mikrotik
|
||||
|
||||
public static function getClient($ip, $user, $pass)
|
||||
{
|
||||
global $ui;
|
||||
//try {
|
||||
$iport = explode(":", $ip);
|
||||
return new RouterOS\Client($iport[0], $user, $pass, ($iport[1]) ? $iport[1] : null);
|
||||
// } catch (Exception $e) {
|
||||
// $ui->assign("error_title", "Mikrotik Connection Error");
|
||||
// $ui->assign("error_message", "Unable to connect to the router : $ip<br>" . $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||
// $ui->display('router-error.tpl');
|
||||
// die();
|
||||
// }
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$iport = explode(":", $ip);
|
||||
return new RouterOS\Client($iport[0], $user, $pass, ($iport[1]) ? $iport[1] : null);
|
||||
}
|
||||
|
||||
public static function isUserLogin($client, $username)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request(
|
||||
'/ip hotspot active print',
|
||||
RouterOS\Query::where('user', $username)
|
||||
@ -38,6 +39,10 @@ class Mikrotik
|
||||
|
||||
public static function logMeIn($client, $user, $pass, $ip, $mac)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$addRequest = new RouterOS\Request('/ip/hotspot/active/login');
|
||||
$client->sendSync(
|
||||
$addRequest
|
||||
@ -50,13 +55,17 @@ class Mikrotik
|
||||
|
||||
public static function logMeOut($client, $user)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request(
|
||||
'/ip hotspot active print',
|
||||
RouterOS\Query::where('user', $user)
|
||||
);
|
||||
$id = $client->sendSync($printRequest)->getProperty('.id');
|
||||
$removeRequest = new RouterOS\Request('/ip/hotspot/active/remove');
|
||||
$client(
|
||||
$client->sendSync(
|
||||
$removeRequest
|
||||
->setArgument('numbers', $id)
|
||||
);
|
||||
@ -64,6 +73,10 @@ class Mikrotik
|
||||
|
||||
public static function addHotspotPlan($client, $name, $sharedusers, $rate)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$addRequest = new RouterOS\Request('/ip/hotspot/user/profile/add');
|
||||
$client->sendSync(
|
||||
$addRequest
|
||||
@ -75,6 +88,10 @@ class Mikrotik
|
||||
|
||||
public static function setHotspotPlan($client, $name, $sharedusers, $rate)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request(
|
||||
'/ip hotspot user profile print .proplist=.id',
|
||||
RouterOS\Query::where('name', $name)
|
||||
@ -84,7 +101,7 @@ class Mikrotik
|
||||
Mikrotik::addHotspotPlan($client, $name, $sharedusers, $rate);
|
||||
} else {
|
||||
$setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set');
|
||||
$client(
|
||||
$client->sendSync(
|
||||
$setRequest
|
||||
->setArgument('numbers', $profileID)
|
||||
->setArgument('shared-users', $sharedusers)
|
||||
@ -95,6 +112,10 @@ class Mikrotik
|
||||
|
||||
public static function setHotspotExpiredPlan($client, $name, $pool)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request(
|
||||
'/ip hotspot user profile print .proplist=.id',
|
||||
RouterOS\Query::where('name', $name)
|
||||
@ -111,7 +132,7 @@ class Mikrotik
|
||||
);
|
||||
} else {
|
||||
$setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set');
|
||||
$client(
|
||||
$client->sendSync(
|
||||
$setRequest
|
||||
->setArgument('numbers', $profileID)
|
||||
->setArgument('shared-users', 3)
|
||||
@ -123,6 +144,10 @@ class Mikrotik
|
||||
|
||||
public static function removeHotspotPlan($client, $name)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request(
|
||||
'/ip hotspot user profile print .proplist=.id',
|
||||
RouterOS\Query::where('name', $name)
|
||||
@ -130,7 +155,7 @@ class Mikrotik
|
||||
$profileID = $client->sendSync($printRequest)->getProperty('.id');
|
||||
|
||||
$removeRequest = new RouterOS\Request('/ip/hotspot/user/profile/remove');
|
||||
$client(
|
||||
$client->sendSync(
|
||||
$removeRequest
|
||||
->setArgument('numbers', $profileID)
|
||||
);
|
||||
@ -138,13 +163,17 @@ class Mikrotik
|
||||
|
||||
public static function removeHotspotUser($client, $username)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request(
|
||||
'/ip hotspot user print .proplist=.id',
|
||||
RouterOS\Query::where('name', $username)
|
||||
);
|
||||
$userID = $client->sendSync($printRequest)->getProperty('.id');
|
||||
$removeRequest = new RouterOS\Request('/ip/hotspot/user/remove');
|
||||
$client(
|
||||
$client->sendSync(
|
||||
$removeRequest
|
||||
->setArgument('numbers', $userID)
|
||||
);
|
||||
@ -152,6 +181,10 @@ class Mikrotik
|
||||
|
||||
public static function addHotspotUser($client, $plan, $customer)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$addRequest = new RouterOS\Request('/ip/hotspot/user/add');
|
||||
if ($plan['typebp'] == "Limited") {
|
||||
if ($plan['limit_type'] == "Time_Limit") {
|
||||
@ -216,6 +249,10 @@ class Mikrotik
|
||||
|
||||
public static function setHotspotUser($client, $user, $pass)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request('/ip/hotspot/user/print');
|
||||
$printRequest->setArgument('.proplist', '.id');
|
||||
$printRequest->setQuery(RouterOS\Query::where('name', $user));
|
||||
@ -229,6 +266,10 @@ class Mikrotik
|
||||
|
||||
public static function setHotspotUserPackage($client, $user, $plan)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request('/ip/hotspot/user/print');
|
||||
$printRequest->setArgument('.proplist', '.id');
|
||||
$printRequest->setQuery(RouterOS\Query::where('name', $user));
|
||||
@ -242,6 +283,10 @@ class Mikrotik
|
||||
|
||||
public static function removeHotspotActiveUser($client, $username)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$onlineRequest = new RouterOS\Request('/ip/hotspot/active/print');
|
||||
$onlineRequest->setArgument('.proplist', '.id');
|
||||
$onlineRequest->setQuery(RouterOS\Query::where('user', $username));
|
||||
@ -254,7 +299,10 @@ class Mikrotik
|
||||
|
||||
public static function removePpoeUser($client, $username)
|
||||
{
|
||||
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request('/ppp/secret/print');
|
||||
//$printRequest->setArgument('.proplist', '.id');
|
||||
$printRequest->setQuery(RouterOS\Query::where('name', $username));
|
||||
@ -266,6 +314,10 @@ class Mikrotik
|
||||
|
||||
public static function addPpoeUser($client, $plan, $customer)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$addRequest = new RouterOS\Request('/ppp/secret/add');
|
||||
if (!empty($customer['pppoe_password'])) {
|
||||
$pass = $customer['pppoe_password'];
|
||||
@ -284,6 +336,10 @@ class Mikrotik
|
||||
|
||||
public static function setPpoeUser($client, $user, $pass)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request('/ppp/secret/print');
|
||||
$printRequest->setArgument('.proplist', '.id');
|
||||
$printRequest->setQuery(RouterOS\Query::where('name', $user));
|
||||
@ -297,6 +353,10 @@ class Mikrotik
|
||||
|
||||
public static function setPpoeUserPlan($client, $user, $plan)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request('/ppp/secret/print');
|
||||
$printRequest->setArgument('.proplist', '.id');
|
||||
$printRequest->setQuery(RouterOS\Query::where('name', $user));
|
||||
@ -310,6 +370,10 @@ class Mikrotik
|
||||
|
||||
public static function removePpoeActive($client, $username)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$onlineRequest = new RouterOS\Request('/ppp/active/print');
|
||||
$onlineRequest->setArgument('.proplist', '.id');
|
||||
$onlineRequest->setQuery(RouterOS\Query::where('name', $username));
|
||||
@ -322,6 +386,10 @@ class Mikrotik
|
||||
|
||||
public static function removePool($client, $name)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request(
|
||||
'/ip pool print .proplist=.id',
|
||||
RouterOS\Query::where('name', $name)
|
||||
@ -329,7 +397,7 @@ class Mikrotik
|
||||
$poolID = $client->sendSync($printRequest)->getProperty('.id');
|
||||
|
||||
$removeRequest = new RouterOS\Request('/ip/pool/remove');
|
||||
$client(
|
||||
$client->sendSync(
|
||||
$removeRequest
|
||||
->setArgument('numbers', $poolID)
|
||||
);
|
||||
@ -337,6 +405,10 @@ class Mikrotik
|
||||
|
||||
public static function addPool($client, $name, $ip_address)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$addRequest = new RouterOS\Request('/ip/pool/add');
|
||||
$client->sendSync(
|
||||
$addRequest
|
||||
@ -347,6 +419,10 @@ class Mikrotik
|
||||
|
||||
public static function setPool($client, $name, $ip_address)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request(
|
||||
'/ip pool print .proplist=.id',
|
||||
RouterOS\Query::where('name', $name)
|
||||
@ -357,7 +433,7 @@ class Mikrotik
|
||||
self::addPool($client, $name, $ip_address);
|
||||
} else {
|
||||
$setRequest = new RouterOS\Request('/ip/pool/set');
|
||||
$client(
|
||||
$client->sendSync(
|
||||
$setRequest
|
||||
->setArgument('numbers', $poolID)
|
||||
->setArgument('ranges', $ip_address)
|
||||
@ -368,6 +444,10 @@ class Mikrotik
|
||||
|
||||
public static function addPpoePlan($client, $name, $pool, $rate)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$addRequest = new RouterOS\Request('/ppp/profile/add');
|
||||
$client->sendSync(
|
||||
$addRequest
|
||||
@ -380,6 +460,10 @@ class Mikrotik
|
||||
|
||||
public static function setPpoePlan($client, $name, $pool, $rate)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request(
|
||||
'/ppp profile print .proplist=.id',
|
||||
RouterOS\Query::where('name', $name)
|
||||
@ -389,7 +473,7 @@ class Mikrotik
|
||||
self::addPpoePlan($client, $name, $pool, $rate);
|
||||
} else {
|
||||
$setRequest = new RouterOS\Request('/ppp/profile/set');
|
||||
$client(
|
||||
$client->sendSync(
|
||||
$setRequest
|
||||
->setArgument('numbers', $profileID)
|
||||
->setArgument('local-address', $pool)
|
||||
@ -401,6 +485,10 @@ class Mikrotik
|
||||
|
||||
public static function removePpoePlan($client, $name)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$printRequest = new RouterOS\Request(
|
||||
'/ppp profile print .proplist=.id',
|
||||
RouterOS\Query::where('name', $name)
|
||||
@ -408,9 +496,22 @@ class Mikrotik
|
||||
$profileID = $client->sendSync($printRequest)->getProperty('.id');
|
||||
|
||||
$removeRequest = new RouterOS\Request('/ppp/profile/remove');
|
||||
$client(
|
||||
$client->sendSync(
|
||||
$removeRequest
|
||||
->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);
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ class Package
|
||||
}
|
||||
|
||||
|
||||
$b = ORM::for_table('tbl_user_recharges')->where('customer_id', $id_customer)->find_one();
|
||||
$b = ORM::for_table('tbl_user_recharges')->where('customer_id', $id_customer)->where('routers', $router_name)->find_one();
|
||||
|
||||
$mikrotik = Mikrotik::info($router_name);
|
||||
if ($p['validity_unit'] == 'Months') {
|
||||
@ -317,49 +317,68 @@ class Package
|
||||
}
|
||||
|
||||
$in = ORM::for_table('tbl_transactions')->where('username', $c['username'])->order_by_desc('id')->find_one();
|
||||
|
||||
$textInvoice = Lang::getNotifText('invoice_paid');
|
||||
$textInvoice = str_replace('[[company_name]]', $_c['CompanyName'], $textInvoice);
|
||||
$textInvoice = str_replace('[[address]]', $_c['address'], $textInvoice);
|
||||
$textInvoice = str_replace('[[phone]]', $_c['phone'], $textInvoice);
|
||||
$textInvoice = str_replace('[[invoice]]', $in['invoice'], $textInvoice);
|
||||
$textInvoice = str_replace('[[date]]', Lang::dateTimeFormat($date_now), $textInvoice);
|
||||
$textInvoice = str_replace('[[payment_gateway]]', $_c['gateway'], $textInvoice);
|
||||
$textInvoice = str_replace('[[payment_channel]]', $_c['channel'], $textInvoice);
|
||||
$textInvoice = str_replace('[[type]]', $in['type'], $textInvoice);
|
||||
$textInvoice = str_replace('[[plan_name]]', $in['plan_name'], $textInvoice);
|
||||
$textInvoice = str_replace('[[plan_price]]', Lang::moneyFormat($in['price']), $textInvoice);
|
||||
$textInvoice = str_replace('[[name]]', $c['fullname'], $textInvoice);
|
||||
$textInvoice = str_replace('[[user_name]]', $in['username'], $textInvoice);
|
||||
$textInvoice = str_replace('[[user_password]]', $c['password'], $textInvoice);
|
||||
$textInvoice = str_replace('[[expired_date]]', Lang::dateAndTimeFormat($in['expiration'], $in['time']), $textInvoice);
|
||||
$textInvoice = str_replace('[[footer]]', $_c['note'], $textInvoice);
|
||||
|
||||
if ($_c['user_notification_payment'] == 'sms') {
|
||||
Message::sendSMS($c['phonenumber'], $textInvoice);
|
||||
} else if ($_c['user_notification_payment'] == 'wa') {
|
||||
Message::sendWhatsapp($c['phonenumber'], $textInvoice);
|
||||
}
|
||||
Message::sendInvoice($c, $in);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function changeTo($username, $plan_id)
|
||||
public static function changeTo($username, $plan_id, $from_id)
|
||||
{
|
||||
global $_c;
|
||||
$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();
|
||||
$b = ORM::for_table('tbl_user_recharges')->where('customer_id', $c['id'])->find_one();
|
||||
$mikrotik = Mikrotik::info($p['routers']);
|
||||
$b = ORM::for_table('tbl_user_recharges')->find_one($from_id);
|
||||
if($p['routers'] == $b['routers'] && $b['routers'] != 'radius'){
|
||||
$mikrotik = Mikrotik::info($p['routers']);
|
||||
}else{
|
||||
$mikrotik = Mikrotik::info($b['routers']);
|
||||
}
|
||||
// delete first
|
||||
if ($p['type'] == 'Hotspot') {
|
||||
if ($b) {
|
||||
if (!$p['is_radius']) {
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
}
|
||||
} else {
|
||||
if (!$p['is_radius']) {
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($b) {
|
||||
if (!$p['is_radius']) {
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
}
|
||||
} else {
|
||||
if (!$p['is_radius']) {
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
}
|
||||
}
|
||||
}
|
||||
// call the next mikrotik
|
||||
if($p['routers'] != $b['routers'] && $p['routers'] != 'radius'){
|
||||
$mikrotik = Mikrotik::info($p['routers']);
|
||||
}
|
||||
if ($p['type'] == 'Hotspot') {
|
||||
if ($b) {
|
||||
if ($p['is_radius']) {
|
||||
Radius::customerAddPlan($c, $p, $b['expiration'].''.$b['time']);
|
||||
}else{
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
Mikrotik::addHotspotUser($client, $p, $c);
|
||||
}
|
||||
} else {
|
||||
@ -367,10 +386,6 @@ class Package
|
||||
Radius::customerAddPlan($c, $p, $b['expiration'].''.$b['time']);
|
||||
}else{
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
Mikrotik::addHotspotUser($client, $p, $c);
|
||||
}
|
||||
}
|
||||
@ -380,10 +395,6 @@ class Package
|
||||
Radius::customerAddPlan($c, $p);
|
||||
}else{
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
Mikrotik::addPpoeUser($client, $p, $c);
|
||||
}
|
||||
} else {
|
||||
@ -391,10 +402,6 @@ class Package
|
||||
Radius::customerAddPlan($c, $p);
|
||||
}else{
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
Mikrotik::addPpoeUser($client, $p, $c);
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,88 @@
|
||||
|
||||
class Paginator
|
||||
{
|
||||
public static function build($table, $colVal = [], $query='', $per_page = '10')
|
||||
{
|
||||
global $routes;
|
||||
global $_L;
|
||||
$url = U . implode('/', $routes);
|
||||
$query = urlencode($query);
|
||||
$adjacents = "2";
|
||||
$page = (int)(empty(_get('p')) ? 1 : _get('p'));
|
||||
$pagination = "";
|
||||
foreach($colVal as $k=>$v) {
|
||||
if(strpos($v,'%') === false) {
|
||||
$table = $table->where($k, $v);
|
||||
}else{
|
||||
$table = $table->where_like($k, $v);
|
||||
}
|
||||
}
|
||||
$totalReq = $table->count();
|
||||
$page = ($page == 0 ? 1 : $page);
|
||||
$next = $page + 1;
|
||||
$lastpage = ceil($totalReq / $per_page);
|
||||
$lpm1 = $lastpage - 1;
|
||||
$limit = $per_page;
|
||||
$startpoint = ($page * $limit) - $limit;
|
||||
if ($lastpage >= 1) {
|
||||
$pagination .= '<ul class="pagination pagination-sm">';
|
||||
if ($lastpage < 7 + ($adjacents * 2)) {
|
||||
for ($counter = 1; $counter <= $lastpage; $counter++) {
|
||||
if ($counter == $page)
|
||||
$pagination .= "<li class='active'><a href='javascript:void(0);'>$counter</a></li>";
|
||||
else
|
||||
$pagination .= "<li><a href='{$url}&p=$counter&q=$query'>$counter</a></li>";
|
||||
}
|
||||
} elseif ($lastpage > 5 + ($adjacents * 2)) {
|
||||
if ($page < 1 + ($adjacents * 2)) {
|
||||
for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++) {
|
||||
if ($counter == $page)
|
||||
$pagination .= "<li class='active'><a href='javascript:void(0);'>$counter</a></li>";
|
||||
else
|
||||
$pagination .= "<li><a href='{$url}&p=$counter&q=$query'>$counter</a></li>";
|
||||
}
|
||||
$pagination .= "<li class='disabled'><a href='#'>...</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=$lpm1&q=$query'>$lpm1</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=$lastpage&q=$query'>$lastpage</a></li>";
|
||||
} elseif ($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2)) {
|
||||
$pagination .= "<li><a href='{$url}&p=1&q=$query'>1</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=2&q=$query'>2</a></li>";
|
||||
$pagination .= "<li class='disabled'><a href='#'>...</a></li>";
|
||||
for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) {
|
||||
if ($counter == $page)
|
||||
$pagination .= "<li class='active'><a href='javascript:void(0);'>$counter</a></li>";
|
||||
else
|
||||
$pagination .= "<li><a href='{$url}&p=$counter&q=$query'>$counter</a></li>";
|
||||
}
|
||||
$pagination .= "<li class='disabled'><a href='#'>...</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=$lpm1&q=$query'>$lpm1</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=$lastpage&q=$query'>$lastpage</a></li>";
|
||||
} else {
|
||||
$pagination .= "<li><a href='{$url}&p=1&q=$query'>1</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=2&q=$query'>2</a></li>";
|
||||
$pagination .= "<li><a href='#'>...</a></li>";
|
||||
for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) {
|
||||
if ($counter == $page)
|
||||
$pagination .= "<li class='active'><a class='disabled'>$counter</a></li>";
|
||||
else
|
||||
$pagination .= "<li><a href='{$url}&p=$counter&q=$query'>$counter</a></li>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($page < $counter - 1) {
|
||||
$pagination .= "<li><a href='{$url}&p=$next&q=$query'>" . $_L['Next'] . "</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=$lastpage&q=$query'>" . $_L['Last'] . "</a></li>";
|
||||
} else {
|
||||
$pagination .= "<li class='disabled'><a class='disabled'>" . $_L['Next'] . "</a></li>";
|
||||
$pagination .= "<li class='disabled'><a class='disabled'>" . $_L['Last'] . "</a></li>";
|
||||
}
|
||||
$pagination .= "</ul>";
|
||||
|
||||
return array("startpoint" => $startpoint, "limit" => $limit, "found" => $totalReq, "page" => $page, "lastpage" => $lastpage, "contents" => $pagination);
|
||||
}
|
||||
}
|
||||
|
||||
public static function bootstrap($table, $w1 = '', $c1 = '', $w2 = '', $c2 = '', $w3 = '', $c3 = '', $w4 = '', $c4 = '', $per_page = '10')
|
||||
{
|
||||
global $routes;
|
||||
@ -17,16 +99,30 @@ class Paginator
|
||||
$page = (int)(!isset($routes['2']) ? 1 : $routes['2']);
|
||||
$pagination = "";
|
||||
|
||||
if ($w1 != '') {
|
||||
$totalReq = ORM::for_table($table)->where($w1, $c1)->count();
|
||||
} elseif ($w2 != '') {
|
||||
$totalReq = ORM::for_table($table)->where($w1, $c1)->where($w2, $c2)->count();
|
||||
} elseif ($w3 != '') {
|
||||
$totalReq = ORM::for_table($table)->where($w1, $c1)->where($w2, $c2)->where($w3, $c3)->count();
|
||||
} elseif ($w4 != '') {
|
||||
$totalReq = ORM::for_table($table)->where($w1, $c1)->where($w2, $c2)->where($w3, $c3)->where($w4, $c4)->count();
|
||||
} else {
|
||||
$totalReq = ORM::for_table($table)->count();
|
||||
if(is_object($table)){
|
||||
if ($w1 != '') {
|
||||
$totalReq = $table->where($w1, $c1)->count();
|
||||
} elseif ($w2 != '') {
|
||||
$totalReq = $table->where($w1, $c1)->where($w2, $c2)->count();
|
||||
} elseif ($w3 != '') {
|
||||
$totalReq = $table->where($w1, $c1)->where($w2, $c2)->where($w3, $c3)->count();
|
||||
} elseif ($w4 != '') {
|
||||
$totalReq = $table->where($w1, $c1)->where($w2, $c2)->where($w3, $c3)->where($w4, $c4)->count();
|
||||
} else {
|
||||
$totalReq = $table->count();
|
||||
}
|
||||
}else{
|
||||
if ($w1 != '') {
|
||||
$totalReq = ORM::for_table($table)->where($w1, $c1)->count();
|
||||
} elseif ($w2 != '') {
|
||||
$totalReq = ORM::for_table($table)->where($w1, $c1)->where($w2, $c2)->count();
|
||||
} elseif ($w3 != '') {
|
||||
$totalReq = ORM::for_table($table)->where($w1, $c1)->where($w2, $c2)->where($w3, $c3)->count();
|
||||
} elseif ($w4 != '') {
|
||||
$totalReq = ORM::for_table($table)->where($w1, $c1)->where($w2, $c2)->where($w3, $c3)->where($w4, $c4)->count();
|
||||
} else {
|
||||
$totalReq = ORM::for_table($table)->count();
|
||||
}
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
@ -109,11 +205,18 @@ class Paginator
|
||||
$adjacents = "2";
|
||||
$page = (int)(!isset($routes['2']) ? 1 : $routes['2']);
|
||||
$pagination = "";
|
||||
|
||||
if ($w1 != '') {
|
||||
$totalReq = ORM::for_table($table)->where_raw($w1, $c1)->count();
|
||||
} else {
|
||||
$totalReq = ORM::for_table($table)->count();
|
||||
if(is_object($table)){
|
||||
if ($w1 != '') {
|
||||
$totalReq = $table->where_raw($w1, $c1)->count();
|
||||
} else {
|
||||
$totalReq = $table->count();
|
||||
}
|
||||
}else{
|
||||
if ($w1 != '') {
|
||||
$totalReq = ORM::for_table($table)->where_raw($w1, $c1)->count();
|
||||
} else {
|
||||
$totalReq = ORM::for_table($table)->count();
|
||||
}
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
|
@ -15,7 +15,15 @@ class Radius
|
||||
public static function getClient()
|
||||
{
|
||||
global $config;
|
||||
return (empty($config['radius_client'])) ? shell_exec('which radclient') : $config['radius_client'];
|
||||
if(empty($config['radius_client'])){
|
||||
if(function_exists("shell_exec")){
|
||||
shell_exec('which radclient');
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}else{
|
||||
$config['radius_client'];
|
||||
}
|
||||
}
|
||||
|
||||
public static function getTableNas()
|
||||
@ -43,20 +51,7 @@ class Radius
|
||||
return ORM::for_table('radusergroup', 'radius');
|
||||
}
|
||||
|
||||
public static function nasList($search = null)
|
||||
{
|
||||
if ($search == null) {
|
||||
return ORM::for_table('nas', 'radius')->find_many();
|
||||
} else {
|
||||
return ORM::for_table('nas', 'radius')
|
||||
->where_like('nasname', $search)
|
||||
->where_like('shortname', $search)
|
||||
->where_like('description', $search)
|
||||
->find_many();
|
||||
}
|
||||
}
|
||||
|
||||
public static function nasAdd($name, $ip, $ports, $secret, $description = "", $type = 'other', $server = null, $community = null)
|
||||
public static function nasAdd($name, $ip, $ports, $secret, $routers = "", $description = "", $type = 'other', $server = null, $community = null)
|
||||
{
|
||||
$n = Radius::getTableNas()->create();
|
||||
$n->nasname = $ip;
|
||||
@ -67,11 +62,12 @@ class Radius
|
||||
$n->description = $description;
|
||||
$n->server = $server;
|
||||
$n->community = $community;
|
||||
$n->routers = $routers;
|
||||
$n->save();
|
||||
return $n->id();
|
||||
}
|
||||
|
||||
public static function nasUpdate($id, $name, $ip, $ports, $secret, $description = "", $type = 'other', $server = null, $community = null)
|
||||
public static function nasUpdate($id, $name, $ip, $ports, $secret, $routers = "", $description = "", $type = 'other', $server = null, $community = null)
|
||||
{
|
||||
$n = Radius::getTableNas()->find_one($id);
|
||||
if (empty($n)) {
|
||||
@ -85,6 +81,7 @@ class Radius
|
||||
$n->description = $description;
|
||||
$n->server = $server;
|
||||
$n->community = $community;
|
||||
$n->routers = $routers;
|
||||
return $n->save();
|
||||
}
|
||||
|
||||
@ -132,17 +129,17 @@ class Radius
|
||||
}
|
||||
}
|
||||
|
||||
public static function customerDeactivate($username, $radiusDisconnect = true) {
|
||||
{
|
||||
global $radius_pass;
|
||||
$r = Radius::getTableCustomer()->where_equal('username', $username)->whereEqual('attribute', 'Cleartext-Password')->findOne();
|
||||
if ($r) {
|
||||
// no need to delete, because it will make ID got higher
|
||||
// we just change the password
|
||||
$r->value = md5(time() . $username . $radius_pass);
|
||||
$r->save();
|
||||
if($radiusDisconnect)
|
||||
return Radius::disconnectCustomer($username);
|
||||
public static function customerDeactivate($username, $radiusDisconnect = true)
|
||||
{ {
|
||||
global $radius_pass;
|
||||
$r = Radius::getTableCustomer()->where_equal('username', $username)->whereEqual('attribute', 'Cleartext-Password')->findOne();
|
||||
if ($r) {
|
||||
// no need to delete, because it will make ID got higher
|
||||
// we just change the password
|
||||
$r->value = md5(time() . $username . $radius_pass);
|
||||
$r->save();
|
||||
if ($radiusDisconnect)
|
||||
return Radius::disconnectCustomer($username);
|
||||
}
|
||||
}
|
||||
return '';
|
||||
@ -300,6 +297,10 @@ class Radius
|
||||
|
||||
public static function disconnectCustomer($username)
|
||||
{
|
||||
global $_app_stage;
|
||||
if ($_app_stage == 'demo') {
|
||||
return null;
|
||||
}
|
||||
$nas = Radius::getTableNas()->findMany();
|
||||
$count = count($nas) * 15;
|
||||
set_time_limit($count);
|
||||
|
@ -22,7 +22,7 @@ class User
|
||||
public static function _billing()
|
||||
{
|
||||
$id = $_SESSION['uid'];
|
||||
$d = ORM::for_table('tbl_user_recharges')->where('customer_id', $id)->find_one();
|
||||
$d = ORM::for_table('tbl_user_recharges')->where('customer_id', $id)->find_many();
|
||||
return $d;
|
||||
}
|
||||
}
|
||||
|
@ -116,7 +116,11 @@ try {
|
||||
$ui->setConfigDir(File::pathFixer('ui/conf/'));
|
||||
$ui->setCacheDir(File::pathFixer('ui/cache/'));
|
||||
$ui->assign("error_title", "PHPNuxBill Crash");
|
||||
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||
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();
|
||||
}
|
||||
@ -126,9 +130,15 @@ function _notify($msg, $type = 'e')
|
||||
$_SESSION['ntype'] = $type;
|
||||
$_SESSION['notify'] = $msg;
|
||||
}
|
||||
|
||||
if(empty($config['language'])){
|
||||
$config['language'] = 'english';
|
||||
}
|
||||
$lan_file = File::pathFixer('system/lan/' . $config['language'] . '/common.lan.php');
|
||||
require $lan_file;
|
||||
if(file_exists($lan_file)){
|
||||
require $lan_file;
|
||||
}else{
|
||||
die("$lan_file not found");
|
||||
}
|
||||
|
||||
$ui = new Smarty();
|
||||
|
||||
@ -164,19 +174,8 @@ function _msglog($type, $msg)
|
||||
if (isset($_SESSION['notify'])) {
|
||||
$notify = $_SESSION['notify'];
|
||||
$ntype = $_SESSION['ntype'];
|
||||
if ($ntype == 's') {
|
||||
$ui->assign('notify', '<div class="alert alert-info">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>' . $notify . '</div></div>');
|
||||
} else {
|
||||
$ui->assign('notify', '<div class="alert alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>' . $notify . '</div></div>');
|
||||
}
|
||||
$ui->assign('notify', $notify);
|
||||
$ui->assign('notify_t', $ntype);
|
||||
unset($_SESSION['notify']);
|
||||
unset($_SESSION['ntype']);
|
||||
}
|
||||
@ -346,8 +345,11 @@ try {
|
||||
r2(U . 'dashboard', 'e', 'not found');
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$ui->assign("error_title", "PHPNuxBill Crash");
|
||||
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();
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ switch ($action) {
|
||||
if (empty($s)) {
|
||||
$c = ORM::for_table('tbl_customers')->limit(30)->find_many();
|
||||
} else {
|
||||
$c = ORM::for_table('tbl_customers')->where_raw("(`username` LIKE '%$s%' OR `fullname` LIKE '%$s%' OR `phonenumber` LIKE '%$s%' OR `email` LIKE '%$s%')", [$s, $s, $s, $s])->limit(30)->find_many();
|
||||
$c = ORM::for_table('tbl_customers')->where_raw("(`username` LIKE '%$s%' OR `fullname` LIKE '%$s%' OR `phonenumber` LIKE '%$s%' OR `email` LIKE '%$s%')")->limit(30)->find_many();
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
foreach ($c as $cust) {
|
||||
|
@ -12,18 +12,18 @@ _auth();
|
||||
|
||||
$action = $routes['1'];
|
||||
$user = User::_info();
|
||||
$bill = User::_billing();
|
||||
|
||||
switch ($action) {
|
||||
case 'isLogin':
|
||||
$bill = ORM::for_table('tbl_user_recharges')->where('id', $routes['2'])->where('username', $user['username'])->findOne();
|
||||
if ($bill['type'] == 'Hotspot' && $bill['status'] == 'on') {
|
||||
$m = Mikrotik::info($bill['routers']);
|
||||
$client = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
||||
if (Mikrotik::isUserLogin($client, $user['username'])) {
|
||||
die('<a href="' . U . 'home&mikrotik=logout" onclick="return confirm(\''.Lang::T('Disconnect Internet?').'\')" class="btn btn-success btn-xs btn-block">'.Lang::T('You are Online, Logout?').'</a>');
|
||||
die('<a href="' . U . 'home&mikrotik=logout&id='.$bill['id'].'" onclick="return confirm(\''.Lang::T('Disconnect Internet?').'\')" class="btn btn-success btn-xs btn-block">'.Lang::T('You are Online, Logout?').'</a>');
|
||||
} else {
|
||||
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
|
||||
die('<a href="' . U . 'home&mikrotik=login" onclick="return confirm(\''.Lang::T('Connect to Internet?').'\')" class="btn btn-danger btn-xs btn-block">'.Lang::T('Not Online, Login now?').'</a>');
|
||||
die('<a href="' . U . 'home&mikrotik=login&id='.$bill['id'].'" onclick="return confirm(\''.Lang::T('Connect to Internet?').'\')" class="btn btn-danger btn-xs btn-block">'.Lang::T('Not Online, Login now?').'</a>');
|
||||
}else{
|
||||
die(Lang::T('Your account not connected to internet'));
|
||||
}
|
||||
|
@ -22,10 +22,10 @@ switch ($action) {
|
||||
run_hook('view_list_bandwidth'); #HOOK
|
||||
$name = _post('name');
|
||||
if ($name != ''){
|
||||
$paginator = Paginator::bootstrap('tbl_bandwidth','name_bw','%'.$name.'%');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_bandwidth'), ['name_bw' => '%' . $name . '%'], $name);
|
||||
$d = ORM::for_table('tbl_bandwidth')->where_like('name_bw','%'.$name.'%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}else{
|
||||
$paginator = Paginator::bootstrap('tbl_bandwidth');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_bandwidth'));
|
||||
$d = ORM::for_table('tbl_bandwidth')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}
|
||||
|
||||
|
@ -24,14 +24,21 @@ switch ($action) {
|
||||
$search = _post('search');
|
||||
run_hook('list_customers'); #HOOK
|
||||
if ($search != '') {
|
||||
$paginator = Paginator::bootstrapRaw('tbl_customers', "(`username` LIKE '%$search%' OR `fullname` LIKE '%$search%' OR `phonenumber` LIKE '%$search%' OR `email` LIKE '%$search%')", [$search, $search, $search, $search]);
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_customers'), [
|
||||
'username' => '%' . $search . '%',
|
||||
'fullname' => '%' . $search . '%',
|
||||
'phonenumber' => '%' . $search . '%',
|
||||
'email' => '%' . $search . '%',
|
||||
'service_type' => '%' . $search . '%'
|
||||
], $search);
|
||||
$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%')")
|
||||
->offset($paginator['startpoint'])
|
||||
->limit($paginator['limit'])
|
||||
->order_by_desc('id')->find_many();
|
||||
->order_by_asc('username')
|
||||
->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::bootstrap('tbl_customers');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_customers'));
|
||||
$d = ORM::for_table('tbl_customers')
|
||||
->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}
|
||||
@ -125,25 +132,24 @@ switch ($action) {
|
||||
$v = $routes['3'];
|
||||
if (empty($v) || $v == 'order') {
|
||||
$v = 'order';
|
||||
// $paginator = Paginator::bootstrap('tbl_payment_gateway', 'username', $customer['username']);
|
||||
// print_r($paginator);
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_payment_gateway'),['username'=>$customer['username']]);
|
||||
$order = ORM::for_table('tbl_payment_gateway')
|
||||
->where('username', $customer['username'])
|
||||
->offset(0)
|
||||
->limit(30)
|
||||
->offset($paginator['startpoint'])
|
||||
->limit($paginator['limit'])
|
||||
->order_by_desc('id')
|
||||
->find_many();
|
||||
// $ui->assign('paginator', $paginator);
|
||||
$ui->assign('paginator', $paginator);
|
||||
$ui->assign('order', $order);
|
||||
} else if ($v == 'activation') {
|
||||
// $paginator = Paginator::bootstrap('tbl_transactions', 'username', $customer['username']);
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_transactions'),['username'=>$customer['username']]);
|
||||
$activation = ORM::for_table('tbl_transactions')
|
||||
->where('username', $customer['username'])
|
||||
->offset(0)
|
||||
->limit(30)
|
||||
->offset($paginator['startpoint'])
|
||||
->limit($paginator['limit'])
|
||||
->order_by_desc('id')
|
||||
->find_many();
|
||||
// $ui->assign('paginator', $paginator);
|
||||
$ui->assign('paginator', $paginator);
|
||||
$ui->assign('activation', $activation);
|
||||
}
|
||||
$package = ORM::for_table('tbl_user_recharges')->where('username', $customer['username'])->find_one();
|
||||
@ -223,6 +229,7 @@ switch ($action) {
|
||||
$email = _post('email');
|
||||
$address = _post('address');
|
||||
$phonenumber = _post('phonenumber');
|
||||
$service_type = _post('service_type');
|
||||
run_hook('add_customer'); #HOOK
|
||||
$msg = '';
|
||||
if (Validator::Length($username, 35, 2) == false) {
|
||||
@ -249,6 +256,7 @@ switch ($action) {
|
||||
$d->fullname = $fullname;
|
||||
$d->address = $address;
|
||||
$d->phonenumber = Lang::phoneFormat($phonenumber);
|
||||
$d->service_type = $service_type;
|
||||
$d->save();
|
||||
r2(U . 'customers/list', 's', $_L['account_created_successfully']);
|
||||
} else {
|
||||
@ -264,6 +272,7 @@ switch ($action) {
|
||||
$email = _post('email');
|
||||
$address = _post('address');
|
||||
$phonenumber = Lang::phoneFormat(_post('phonenumber'));
|
||||
$service_type = _post('service_type');
|
||||
run_hook('edit_customer'); #HOOK
|
||||
$msg = '';
|
||||
if (Validator::Length($username, 16, 2) == false) {
|
||||
@ -316,6 +325,7 @@ switch ($action) {
|
||||
$d->email = $email;
|
||||
$d->address = $address;
|
||||
$d->phonenumber = $phonenumber;
|
||||
$d->service_type = $service_type;
|
||||
$d->save();
|
||||
if ($userDiff || $pppoeDiff || $passDiff) {
|
||||
$c = ORM::for_table('tbl_user_recharges')->where('username', ($userDiff) ? $oldusername : $username)->find_one();
|
||||
|
@ -84,27 +84,29 @@ if (_post('send') == 'balance') {
|
||||
if ($router) {
|
||||
r2(U . "order/send/$router[id]/$active[plan_id]&u=" . trim(_post('username')), 's', Lang::T('Review package before recharge'));
|
||||
} else {
|
||||
r2(U . 'package/order', 'w', Lang::T('Your friend do not have active package'));
|
||||
r2(U . 'home', 'w', Lang::T('Your friend do not have active package'));
|
||||
}
|
||||
}
|
||||
|
||||
//Client Page
|
||||
$bill = User::_billing();
|
||||
$ui->assign('_bill', $bill);
|
||||
$ui->assign('_bills', User::_billing());
|
||||
|
||||
if(isset($_GET['recharge']) && $_GET['recharge'] == 1){
|
||||
$router = ORM::for_table('tbl_routers')->where('name', $bill['routers'])->find_one();
|
||||
if ($config['enable_balance'] == 'yes') {
|
||||
$plan = ORM::for_table('tbl_plans')->find_one($bill['plan_id']);
|
||||
if($user['balance']>$plan['price']){
|
||||
r2(U . "order/pay/$router[id]/$bill[plan_id]", 'e', 'Order Plan');
|
||||
if(isset($_GET['recharge']) && !empty($_GET['recharge'])){
|
||||
$bill = ORM::for_table('tbl_user_recharges')->where('id', $_GET['recharge'])->where('username', $user['username'])->findOne();
|
||||
if ($bill) {
|
||||
$router = ORM::for_table('tbl_routers')->where('name', $bill['routers'])->find_one();
|
||||
if ($config['enable_balance'] == 'yes') {
|
||||
$plan = ORM::for_table('tbl_plans')->find_one($bill['plan_id']);
|
||||
if($user['balance']>$plan['price']){
|
||||
r2(U . "order/pay/$router[id]/$bill[plan_id]", 'e', 'Order Plan');
|
||||
}else{
|
||||
r2(U . "order/buy/$router[id]/$bill[plan_id]", 'e', 'Order Plan');
|
||||
}
|
||||
}else{
|
||||
r2(U . "order/buy/$router[id]/$bill[plan_id]", 'e', 'Order Plan');
|
||||
}
|
||||
}else{
|
||||
r2(U . "order/buy/$router[id]/$bill[plan_id]", 'e', 'Order Plan');
|
||||
}
|
||||
}else if(isset($_GET['deactivate']) && $_GET['deactivate'] == 1){
|
||||
}else if(isset($_GET['deactivate']) && !empty($_GET['deactivate'])){
|
||||
$bill = ORM::for_table('tbl_user_recharges')->where('id', $_GET['deactivate'])->where('username', $user['username'])->findOne();
|
||||
if ($bill) {
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $bill['plan_id'])->find_one();
|
||||
if($p['is_radius']){
|
||||
@ -139,6 +141,7 @@ if(isset($_GET['recharge']) && $_GET['recharge'] == 1){
|
||||
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
|
||||
$ui->assign('nux_mac', $_SESSION['nux-mac']);
|
||||
$ui->assign('nux_ip', $_SESSION['nux-ip']);
|
||||
$bill = ORM::for_table('tbl_user_recharges')->where('id', $_GET['id'])->where('username', $user['username'])->findOne();
|
||||
if ($_GET['mikrotik'] == 'login') {
|
||||
$m = Mikrotik::info($bill['routers']);
|
||||
$c = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
||||
|
@ -42,8 +42,113 @@ switch ($do) {
|
||||
|
||||
break;
|
||||
|
||||
case 'activation':
|
||||
$voucher = _post('voucher');
|
||||
$username = _post('username');
|
||||
$v1 = ORM::for_table('tbl_voucher')->where('code', $voucher)->find_one();
|
||||
if ($v1) {
|
||||
// coucher exists, check customer exists or not
|
||||
$user = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||
if (!$user) {
|
||||
$d = ORM::for_table('tbl_customers')->create();
|
||||
$d->username = alphanumeric($username, "+_.");
|
||||
$d->password = $voucher;
|
||||
$d->fullname = '';
|
||||
$d->address = '';
|
||||
$d->email = '';
|
||||
$d->phonenumber = (strlen($username) < 21) ? $username : '';
|
||||
if ($d->save()) {
|
||||
$user = ORM::for_table('tbl_customers')->where('username', $username)->find_one($d->id());
|
||||
if (!$user) {
|
||||
r2(U . 'login', 'e', Lang::T('Voucher activation failed'));
|
||||
}
|
||||
} else {
|
||||
r2(U . 'login', 'e', Lang::T('Voucher activation failed').'.');
|
||||
}
|
||||
}
|
||||
if ($v1['status'] == 0) {
|
||||
$oldPass = $user['password'];
|
||||
// change customer password to voucher code
|
||||
$user->password = $voucher;
|
||||
$user->save();
|
||||
// voucher activation
|
||||
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Activation", "Voucher")) {
|
||||
$v1->status = "1";
|
||||
$v1->user = $user['username'];
|
||||
$v1->save();
|
||||
// add customer to mikrotik
|
||||
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
|
||||
try{
|
||||
$m = Mikrotik::info($v1['routers']);
|
||||
$c = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
||||
Mikrotik::logMeIn($c, $user['username'], $user['password'], $_SESSION['nux-ip'], $_SESSION['nux-mac']);
|
||||
if(!empty($config['voucher_redirect'])){
|
||||
r2($config['voucher_redirect'], 's', Lang::T("Voucher activation success, you are connected to internet"));
|
||||
}else{
|
||||
r2(U . "login", 's', Lang::T("Voucher activation success, you are connected to internet"));
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
if(!empty($config['voucher_redirect'])){
|
||||
r2($config['voucher_redirect'], 's', Lang::T("Voucher activation success, now you can login"));
|
||||
}else{
|
||||
r2(U . "login", 's', Lang::T("Voucher activation success, now you can login"));
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($config['voucher_redirect'])){
|
||||
r2($config['voucher_redirect'], 's', Lang::T("Voucher activation success, now you can login"));
|
||||
}else{
|
||||
r2(U . "login", 's', Lang::T("Voucher activation success, now you can login"));
|
||||
}
|
||||
} else {
|
||||
// if failed to recharge, restore old password
|
||||
$user->password = $oldPass;
|
||||
$user->save();
|
||||
r2(U . 'login', 'e', Lang::T("Failed to activate voucher"));
|
||||
}
|
||||
} else {
|
||||
// used voucher
|
||||
// check if voucher used by this username
|
||||
if ($v1['user'] == $user['username']) {
|
||||
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
|
||||
try{
|
||||
$m = Mikrotik::info($v1['routers']);
|
||||
$c = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
||||
Mikrotik::logMeIn($c, $user['username'], $user['password'], $_SESSION['nux-ip'], $_SESSION['nux-mac']);
|
||||
if(!empty($config['voucher_redirect'])){
|
||||
r2($config['voucher_redirect'], 's', Lang::T("Voucher activation success, you are connected to internet"));
|
||||
}else{
|
||||
r2(U . "login", 's', Lang::T("Voucher activation success, now you can login"));
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
if(!empty($config['voucher_redirect'])){
|
||||
r2($config['voucher_redirect'], 's', Lang::T("Voucher activation success, now you can login"));
|
||||
}else{
|
||||
r2(U . "login", 's', Lang::T("Voucher activation success, now you can login"));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(!empty($config['voucher_redirect'])){
|
||||
r2($config['voucher_redirect'], 's', Lang::T("Voucher activation success, you are connected to internet"));
|
||||
}else{
|
||||
r2(U . "login", 's', Lang::T("Voucher activation success, now you can login"));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// voucher used by other customer
|
||||
r2(U . 'login', 'e', $_L['Voucher_Not_Valid']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// voucher not found
|
||||
r2(U . 'login', 'e', $_L['Voucher_Not_Valid']);
|
||||
}
|
||||
default:
|
||||
run_hook('customer_view_login'); #HOOK
|
||||
$ui->display('user-login.tpl');
|
||||
if($config['disable_registration']=='yes'){
|
||||
$ui->display('user-login-noreg.tpl');
|
||||
}else{
|
||||
$ui->display('user-login.tpl');
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -20,43 +20,42 @@ if ($admin['user_type'] != 'Admin') {
|
||||
|
||||
switch ($action) {
|
||||
case 'list':
|
||||
$name = _post('name');
|
||||
$q = (_post('q') ? _post('q') : _get('q'));
|
||||
$keep = _post('keep');
|
||||
if (!empty($keep)) {
|
||||
ORM::raw_execute("DELETE FROM tbl_logs WHERE date < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL $keep DAY))");
|
||||
r2(U . "logs/list/", 's', "Delete logs older than $keep days");
|
||||
}
|
||||
if ($name != '') {
|
||||
$paginator = Paginator::bootstrap('tbl_logs', 'description', '%' . $name . '%');
|
||||
$d = ORM::for_table('tbl_logs')->where_like('description', '%' . $name . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
if ($q != '') {
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_logs'), ['description' => '%' . $q . '%'], $q);
|
||||
$d = ORM::for_table('tbl_logs')->where_like('description', '%' . $q . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::bootstrap('tbl_logs');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_logs'));
|
||||
$d = ORM::for_table('tbl_logs')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}
|
||||
|
||||
$ui->assign('name', $name);
|
||||
$ui->assign('d', $d);
|
||||
$ui->assign('q', $q);
|
||||
$ui->assign('paginator', $paginator);
|
||||
$ui->display('logs.tpl');
|
||||
break;
|
||||
case 'radius':
|
||||
$name = _post('name');
|
||||
$q = (_post('q') ? _post('q') : _get('q'));
|
||||
$keep = _post('keep');
|
||||
$page = (isset($routes['2']) ? intval($routes['2']) : 0);
|
||||
$pageNow = $page * 20;
|
||||
if (!empty($keep)) {
|
||||
ORM::raw_execute("DELETE FROM radpostauth WHERE UNIX_TIMESTAMP(authdate) < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL $keep DAY))", [], 'radius');
|
||||
r2(U . "logs/radius/", 's', "Delete logs older than $keep days");
|
||||
}
|
||||
if ($name != '') {
|
||||
$d = ORM::for_table('radpostauth', 'radius')->where_like('username', '%' . $name . '%')->offset($pageNow)->limit(10)->order_by_desc('id')->find_many();
|
||||
if ($q != '') {
|
||||
$paginator = Paginator::build(ORM::for_table('radpostauth', 'radius'), ['username' => '%' . $q . '%'], $q);
|
||||
$d = ORM::for_table('radpostauth', 'radius')->where_like('username', '%' . $q . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
} else {
|
||||
$d = ORM::for_table('radpostauth', 'radius')->offset($pageNow)->limit(10)->order_by_desc('id')->find_many();
|
||||
$paginator = Paginator::build(ORM::for_table('radpostauth', 'radius'));
|
||||
$d = ORM::for_table('radpostauth', 'radius')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}
|
||||
|
||||
$ui->assign('page', $page);
|
||||
$ui->assign('name', $name);
|
||||
$ui->assign('d', $d);
|
||||
$ui->assign('q', $q);
|
||||
$ui->assign('paginator', $paginator);
|
||||
$ui->display('logs-radius.tpl');
|
||||
break;
|
||||
|
@ -19,7 +19,7 @@ switch ($action) {
|
||||
break;
|
||||
case 'history':
|
||||
$ui->assign('_system_menu', 'history');
|
||||
$paginator = Paginator::bootstrap('tbl_payment_gateway', 'username', $user['username']);
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_payment_gateway'),['username'=>$user['username']]);
|
||||
$d = ORM::for_table('tbl_payment_gateway')
|
||||
->where('username', $user['username'])
|
||||
->order_by_desc('id')
|
||||
@ -31,49 +31,58 @@ switch ($action) {
|
||||
run_hook('customer_view_order_history'); #HOOK
|
||||
$ui->display('user-orderHistory.tpl');
|
||||
break;
|
||||
case 'package':
|
||||
if (strpos($user['email'], '@') === false) {
|
||||
r2(U . 'accounts/profile', 'e', Lang::T("Please enter your email address"));
|
||||
}
|
||||
$ui->assign('_title', 'Order Plan');
|
||||
$ui->assign('_system_menu', 'package');
|
||||
if (!empty($_SESSION['nux-router'])) {
|
||||
if ($_SESSION['nux-router'] == 'radius') {
|
||||
case 'balance':
|
||||
if (strpos($user['email'], '@') === false) {
|
||||
r2(U . 'accounts/profile', 'e', Lang::T("Please enter your email address"));
|
||||
}
|
||||
$ui->assign('_title', 'Top Up');
|
||||
$ui->assign('_system_menu', 'balance');
|
||||
$plans_balance = ORM::for_table('tbl_plans')->where('enabled', '1')->where('type', 'Balance')->find_many();
|
||||
$ui->assign('plans_balance', $plans_balance);
|
||||
$ui->display('user-orderBalance.tpl');
|
||||
break;
|
||||
case 'package':
|
||||
if (strpos($user['email'], '@') === false) {
|
||||
r2(U . 'accounts/profile', 'e', Lang::T("Please enter your email address"));
|
||||
}
|
||||
$ui->assign('_title', 'Order Plan');
|
||||
$ui->assign('_system_menu', 'package');
|
||||
if (!empty($_SESSION['nux-router'])) {
|
||||
if ($_SESSION['nux-router'] == 'radius') {
|
||||
$radius_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'PPPOE')->find_many();
|
||||
$radius_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'Hotspot')->find_many();
|
||||
} else {
|
||||
$routers = ORM::for_table('tbl_routers')->where('id', $_SESSION['nux-router'])->find_many();
|
||||
$rs = [];
|
||||
foreach ($routers as $r) {
|
||||
$rs[] = $r['name'];
|
||||
}
|
||||
$plans_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where_in('routers', $rs)->where('is_radius', 0)->where('type', 'PPPOE')->find_many();
|
||||
$plans_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where_in('routers', $rs)->where('is_radius', 0)->where('type', 'Hotspot')->find_many();
|
||||
}
|
||||
} else {
|
||||
$radius_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'PPPOE')->find_many();
|
||||
$radius_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'Hotspot')->find_many();
|
||||
} else {
|
||||
$routers = ORM::for_table('tbl_routers')->where('id', $_SESSION['nux-router'])->find_many();
|
||||
$rs = [];
|
||||
foreach ($routers as $r) {
|
||||
$rs[] = $r['name'];
|
||||
}
|
||||
$plans_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where_in('routers', $rs)->where('is_radius', 0)->where('type', 'PPPOE')->find_many();
|
||||
$plans_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where_in('routers', $rs)->where('is_radius', 0)->where('type', 'Hotspot')->find_many();
|
||||
}
|
||||
} else {
|
||||
$radius_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'PPPOE')->find_many();
|
||||
$radius_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'Hotspot')->find_many();
|
||||
|
||||
$routers = ORM::for_table('tbl_routers')->find_many();
|
||||
$plans_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 0)->where('type', 'PPPOE')->find_many();
|
||||
$plans_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 0)->where('type', 'Hotspot')->find_many();
|
||||
}
|
||||
$plans_balance = ORM::for_table('tbl_plans')->where('enabled', '1')->where('type', 'Balance')->find_many();
|
||||
$ui->assign('routers', $routers);
|
||||
$ui->assign('radius_pppoe', $radius_pppoe);
|
||||
$ui->assign('radius_hotspot', $radius_hotspot);
|
||||
$ui->assign('plans_pppoe', $plans_pppoe);
|
||||
$ui->assign('plans_hotspot', $plans_hotspot);
|
||||
$ui->assign('plans_balance', $plans_balance);
|
||||
run_hook('customer_view_order_plan'); #HOOK
|
||||
$ui->display('user-orderPlan.tpl');
|
||||
break;
|
||||
$routers = ORM::for_table('tbl_routers')->find_many();
|
||||
$plans_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 0)->where('type', 'PPPOE')->find_many();
|
||||
$plans_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 0)->where('type', 'Hotspot')->find_many();
|
||||
}
|
||||
$ui->assign('routers', $routers);
|
||||
$ui->assign('radius_pppoe', $radius_pppoe);
|
||||
$ui->assign('radius_hotspot', $radius_hotspot);
|
||||
$ui->assign('plans_pppoe', $plans_pppoe);
|
||||
$ui->assign('plans_hotspot', $plans_hotspot);
|
||||
run_hook('customer_view_order_plan'); #HOOK
|
||||
$ui->display('user-orderPlan.tpl');
|
||||
break;
|
||||
case 'unpaid':
|
||||
$d = ORM::for_table('tbl_payment_gateway')
|
||||
->where('username', $user['username'])
|
||||
->where('status', 1)
|
||||
->find_one();
|
||||
run_hook('customer_find_unpaid'); #HOOK
|
||||
run_hook('custome
|
||||
r_find_unpaid'); #HOOK
|
||||
if ($d) {
|
||||
if (empty($d['pg_url_payment'])) {
|
||||
r2(U . "order/buy/" . $trx['routers_id'] . '/' . $trx['plan_id'], 'w', Lang::T("Checking payment"));
|
||||
|
@ -12,7 +12,19 @@ $action = $routes['1'];
|
||||
$admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
if(strpos($action,"-post")===false){
|
||||
if(strpos($action,"-reset")!==false){
|
||||
$action = str_replace("-reset","",$action);
|
||||
$path = "pages/".str_replace(".","",$action).".html";
|
||||
$temp = "pages_template/".str_replace(".","",$action).".html";
|
||||
if(file_exists($temp)){
|
||||
if(!copy($temp, $path)){
|
||||
file_put_contents($path, Http::getData('https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/pages_template/'.$action.'.html'));
|
||||
}
|
||||
}else{
|
||||
file_put_contents($path, Http::getData('https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/pages_template/'.$action.'.html'));
|
||||
}
|
||||
r2(U . 'pages/'.$action);
|
||||
}else if(strpos($action,"-post")===false){
|
||||
$path = "pages/".str_replace(".","",$action).".html";
|
||||
//echo $path;
|
||||
run_hook('view_edit_pages'); #HOOK
|
||||
|
@ -24,10 +24,10 @@ switch ($action) {
|
||||
|
||||
$name = _post('name');
|
||||
if ($name != '') {
|
||||
$paginator = Paginator::bootstrap('tbl_pool', 'pool_name', '%' . $name . '%');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_pool'), ['pool_name' => '%' . $name . '%'], $name);
|
||||
$d = ORM::for_table('tbl_pool')->where_like('pool_name', '%' . $name . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::bootstrap('tbl_pool');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_pool'));
|
||||
$d = ORM::for_table('tbl_pool')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}
|
||||
|
||||
@ -62,11 +62,11 @@ switch ($action) {
|
||||
$d = ORM::for_table('tbl_pool')->find_one($id);
|
||||
if ($d) {
|
||||
if ($d['routers'] != 'radius') {
|
||||
try{
|
||||
try {
|
||||
$mikrotik = Mikrotik::info($d['routers']);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removePool($client, $d['pool_name']);
|
||||
}catch(Exception $e){
|
||||
} catch (Exception $e) {
|
||||
//ignore exception, it means router has already deleted
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||
* by https://t.me/ibnux
|
||||
@ -49,9 +50,9 @@ switch ($action) {
|
||||
}
|
||||
$p = ORM::for_table('tbl_plans')->findOne($plan['plan_id']);
|
||||
$c = ORM::for_table('tbl_customers')->findOne($plan['customer_id']);
|
||||
if($plan['routers'] == 'radius'){
|
||||
Radius::customerAddPlan($c, $p, $plan['expiration'].' '.$plan['time']);
|
||||
}else{
|
||||
if ($plan['routers'] == 'radius') {
|
||||
Radius::customerAddPlan($c, $p, $plan['expiration'] . ' ' . $plan['time']);
|
||||
} else {
|
||||
if ($plan['type'] == 'Hotspot') {
|
||||
Mikrotik::addHotspotUser($client, $p, $c);
|
||||
} else if ($plan['type'] == 'PPPOE') {
|
||||
@ -66,10 +67,10 @@ switch ($action) {
|
||||
$ui->assign('_title', $_L['Customers']);
|
||||
$username = _post('username');
|
||||
if ($username != '') {
|
||||
$paginator = Paginator::bootstrap('tbl_user_recharges', 'username', '%' . $username . '%');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_user_recharges'), ['username' => '%' . $username . '%'], $username);
|
||||
$d = ORM::for_table('tbl_user_recharges')->where_like('username', '%' . $username . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::bootstrap('tbl_user_recharges');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_user_recharges'));
|
||||
$d = ORM::for_table('tbl_user_recharges')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}
|
||||
|
||||
@ -136,12 +137,31 @@ switch ($action) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 'view':
|
||||
$id = $routes['2'];
|
||||
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
||||
$ui->assign('in', $d);
|
||||
|
||||
if (!empty($routes['3']) && $routes['3'] == 'send') {
|
||||
$c = ORM::for_table('tbl_customers')->where('username', $d['username'])->find_one();
|
||||
if ($c) {
|
||||
Message::sendInvoice($c, $d);
|
||||
r2(U . 'prepaid/view/' . $id, 's', "Success send to customer");
|
||||
}
|
||||
r2(U . 'prepaid/view/' . $id, 'd', "Customer not found");
|
||||
}
|
||||
$ui->assign('_title', 'View Invoice');
|
||||
$ui->assign('date', Lang::dateAndTimeFormat($d['recharged_on'], $d['recharged_time']));
|
||||
$ui->display('invoice.tpl');
|
||||
break;
|
||||
|
||||
|
||||
case 'print':
|
||||
$id = _post('id');
|
||||
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
||||
$ui->assign('d', $d);
|
||||
|
||||
$ui->assign('date', date("Y-m-d H:i:s"));
|
||||
$ui->assign('date', Lang::dateAndTimeFormat($d['recharged_on'], $d['recharged_time']));
|
||||
run_hook('print_invoice'); #HOOK
|
||||
$ui->display('invoice-print.tpl');
|
||||
break;
|
||||
@ -151,7 +171,7 @@ switch ($action) {
|
||||
$d = ORM::for_table('tbl_user_recharges')->find_one($id);
|
||||
if ($d) {
|
||||
$ui->assign('d', $d);
|
||||
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->find_many();
|
||||
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->where_not_equal('type', 'Balance')->find_many();
|
||||
$ui->assign('p', $p);
|
||||
run_hook('view_edit_customer_plan'); #HOOK
|
||||
$ui->display('prepaid-edit.tpl');
|
||||
@ -199,7 +219,11 @@ switch ($action) {
|
||||
} else {
|
||||
$msg .= $_L['Data_Not_Found'] . '<br>';
|
||||
}
|
||||
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $id_plan)->where('enabled', '1')->find_one();
|
||||
if ($d) {
|
||||
} else {
|
||||
$msg .= ' Plan Not Found<br>';
|
||||
}
|
||||
if ($msg == '') {
|
||||
run_hook('edit_customer_plan'); #HOOK
|
||||
$d->username = $username;
|
||||
@ -207,8 +231,13 @@ switch ($action) {
|
||||
//$d->recharged_on = $recharged_on;
|
||||
$d->expiration = $expiration;
|
||||
$d->time = $time;
|
||||
if($p['is_radius']){
|
||||
$d->routers = 'radius';
|
||||
}else{
|
||||
$d->routers = $p['routers'];
|
||||
}
|
||||
$d->save();
|
||||
Package::changeTo($username, $id_plan);
|
||||
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']);
|
||||
r2(U . 'prepaid/list', 's', $_L['Updated_Successfully']);
|
||||
} else {
|
||||
@ -218,11 +247,11 @@ switch ($action) {
|
||||
|
||||
case 'voucher':
|
||||
$ui->assign('xfooter', '<script type="text/javascript" src="ui/lib/c/voucher.js"></script>');
|
||||
|
||||
$ui->assign('_title', $_L['Prepaid_Vouchers']);
|
||||
$code = _post('code');
|
||||
if ($code != '') {
|
||||
$ui->assign('code', $code);
|
||||
$paginator = Paginator::bootstrap('tbl_voucher', 'code', '%' . $code . '%');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_voucher'), ['code' => '%' . $code . '%'], $code);
|
||||
$d = ORM::for_table('tbl_plans')->where('enabled', '1')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where_like('tbl_voucher.code', '%' . $code . '%')
|
||||
@ -230,7 +259,7 @@ switch ($action) {
|
||||
->limit($paginator['limit'])
|
||||
->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::bootstrap('tbl_voucher');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_voucher'));
|
||||
$d = ORM::for_table('tbl_plans')->where('enabled', '1')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->offset($paginator['startpoint'])
|
||||
@ -245,7 +274,7 @@ switch ($action) {
|
||||
break;
|
||||
|
||||
case 'add-voucher':
|
||||
|
||||
$ui->assign('_title', $_L['Add_Voucher']);
|
||||
$c = ORM::for_table('tbl_customers')->find_many();
|
||||
$ui->assign('c', $c);
|
||||
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->find_many();
|
||||
@ -256,15 +285,27 @@ switch ($action) {
|
||||
$ui->display('voucher-add.tpl');
|
||||
break;
|
||||
|
||||
case 'remove-voucher':
|
||||
$d = ORM::for_table('tbl_voucher')->where_equal('status', '1')->findMany();
|
||||
if ($d) {
|
||||
$d->delete();
|
||||
r2(U . 'prepaid/voucher', 's', $_L['Delete_Successfully']);
|
||||
}
|
||||
case 'print-voucher':
|
||||
$from_id = _post('from_id');
|
||||
$planid = _post('planid');
|
||||
$pagebreak = _post('pagebreak');
|
||||
$limit = _post('limit');
|
||||
|
||||
if ($pagebreak < 1) $pagebreak = 6;
|
||||
$vpl = _post('vpl');
|
||||
if (empty($vpl)) {
|
||||
$vpl = 3;
|
||||
}
|
||||
if ($pagebreak < 1) $pagebreak = 12;
|
||||
|
||||
if ($limit < 1) $limit = $pagebreak * 2;
|
||||
if (empty($from_id)) {
|
||||
$from_id = 0;
|
||||
}
|
||||
|
||||
if ($from_id > 0 && $planid > 0) {
|
||||
$v = ORM::for_table('tbl_plans')
|
||||
@ -315,9 +356,12 @@ switch ($action) {
|
||||
->where('tbl_voucher.status', '0')
|
||||
->count();
|
||||
}
|
||||
$template = file_get_contents("pages/Voucher.html");
|
||||
$template = str_replace('[[company_name]]', $config['CompanyName'], $template);
|
||||
|
||||
$ui->assign('_title', $_L['Voucher_Hotspot']);
|
||||
$ui->assign('from_id', $from_id);
|
||||
$ui->assign('vpl', $vpl);
|
||||
$ui->assign('pagebreak', $pagebreak);
|
||||
|
||||
$plans = ORM::for_table('tbl_plans')->find_many();
|
||||
@ -325,7 +369,20 @@ switch ($action) {
|
||||
$ui->assign('limit', $limit);
|
||||
$ui->assign('planid', $planid);
|
||||
|
||||
$ui->assign('v', $v);
|
||||
$voucher = [];
|
||||
$n = 1;
|
||||
foreach ($v as $vs) {
|
||||
$temp = $template;
|
||||
$temp = str_replace('[[qrcode]]', '<img src="qrcode/?data=' . $vs['code'] . '">', $temp);
|
||||
$temp = str_replace('[[price]]', Lang::moneyFormat($vs['price']), $temp);
|
||||
$temp = str_replace('[[voucher_code]]', $vs['code'], $temp);
|
||||
$temp = str_replace('[[plan]]', $vs['name_plan'], $temp);
|
||||
$temp = str_replace('[[counter]]', $n, $temp);
|
||||
$voucher[] = $temp;
|
||||
$n++;
|
||||
}
|
||||
|
||||
$ui->assign('voucher', $voucher);
|
||||
$ui->assign('vc', $vc);
|
||||
|
||||
//for counting pagebreak
|
||||
@ -354,7 +411,11 @@ switch ($action) {
|
||||
run_hook('create_voucher'); #HOOK
|
||||
for ($i = 0; $i < $numbervoucher; $i++) {
|
||||
$code = strtoupper(substr(md5(time() . rand(10000, 99999)), 0, $lengthcode));
|
||||
//TODO: IMPLEMENT Voucher Generator
|
||||
if ($config['voucher_format'] == 'low') {
|
||||
$code = strtolower($code);
|
||||
} else if ($config['voucher_format'] == 'rand') {
|
||||
$code = Lang::randomUpLowCase($code);
|
||||
}
|
||||
$d = ORM::for_table('tbl_voucher')->create();
|
||||
$d->type = $type;
|
||||
$d->routers = $server;
|
||||
|
@ -21,6 +21,7 @@ switch ($action) {
|
||||
case 'nas-add':
|
||||
$ui->assign('_system_menu', 'network');
|
||||
$ui->assign('_title', "Network Access Server");
|
||||
$ui->assign('routers', ORM::for_table('tbl_routers')->find_many());
|
||||
$ui->display('radius-nas-add.tpl');
|
||||
break;
|
||||
case 'nas-add-post':
|
||||
@ -32,6 +33,7 @@ switch ($action) {
|
||||
$server = _post('server', null);
|
||||
$community = _post('community', null);
|
||||
$description = _post('description');
|
||||
$routers = _post('routers');
|
||||
$msg = '';
|
||||
|
||||
if (Validator::Length($shortname, 30, 2) == false) {
|
||||
@ -54,7 +56,7 @@ switch ($action) {
|
||||
$msg .= 'NAS IP Exists<br>';
|
||||
}
|
||||
if ($msg == '') {
|
||||
$id = Radius::nasAdd($shortname, $nasname, $ports, $secret, $description, $type, $server, $community);
|
||||
$id = Radius::nasAdd($shortname, $nasname, $ports, $secret, $routers, $description, $type, $server, $community);
|
||||
if ($id > 0) {
|
||||
r2(U . 'radius/nas-list/', 's', "NAS Added");
|
||||
} else {
|
||||
@ -74,6 +76,7 @@ switch ($action) {
|
||||
$d = ORM::for_table('nas', 'radius')->where_equal('shortname', _get('name'))->find_one();
|
||||
}
|
||||
if ($d) {
|
||||
$ui->assign('routers', ORM::for_table('tbl_routers')->find_many());
|
||||
$ui->assign('d', $d);
|
||||
$ui->display('radius-nas-edit.tpl');
|
||||
} else {
|
||||
@ -91,6 +94,7 @@ switch ($action) {
|
||||
$server = _post('server', null);
|
||||
$community = _post('community', null);
|
||||
$description = _post('description');
|
||||
$routers = _post('routers');
|
||||
$msg = '';
|
||||
|
||||
if (Validator::Length($shortname, 30, 2) == false) {
|
||||
@ -109,7 +113,7 @@ switch ($action) {
|
||||
$type = null;
|
||||
}
|
||||
if ($msg == '') {
|
||||
if (Radius::nasUpdate($id, $shortname, $nasname, $ports, $secret, $description, $type, $server, $community)) {
|
||||
if (Radius::nasUpdate($id, $shortname, $nasname, $ports, $secret, $routers, $description, $type, $server, $community)) {
|
||||
r2(U . 'radius/list/', 's', "NAS Saved");
|
||||
} else {
|
||||
r2(U . 'radius/nas-add', 'e', 'NAS NOT Exists');
|
||||
@ -131,10 +135,22 @@ switch ($action) {
|
||||
$ui->assign('_title', "Network Access Server");
|
||||
$name = _post('name');
|
||||
if (empty($name)) {
|
||||
$nas = Radius::nasList();
|
||||
$paginator = Paginator::build(ORM::for_table('nas', 'radius'));
|
||||
$nas = ORM::for_table('nas', 'radius')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many();
|
||||
} else {
|
||||
$nas = Radius::nasList($name);
|
||||
$paginator = Paginator::build(ORM::for_table('nas', 'radius'), [
|
||||
'nasname' => '%'.$search.'%',
|
||||
'shortname' => '%'.$search.'%',
|
||||
'description' => '%'.$search.'%'
|
||||
]);
|
||||
$nas = ORM::for_table('nas', 'radius')
|
||||
->where_like('nasname', $search)
|
||||
->where_like('shortname', $search)
|
||||
->where_like('description', $search)
|
||||
->offset($paginator['startpoint'])->limit($paginator['limit'])
|
||||
->find_many();
|
||||
}
|
||||
$ui->assign('paginator', $paginator);
|
||||
$ui->assign('name', $name);
|
||||
$ui->assign('nas', $nas);
|
||||
$ui->display('radius-nas.tpl');
|
||||
|
@ -59,11 +59,8 @@ switch ($do) {
|
||||
$ui->assign('address', $address);
|
||||
$ui->assign('email', $email);
|
||||
$ui->assign('phonenumber', $phonenumber);
|
||||
$ui->assign('notify', '<div class="alert alert-success">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>Verification code is Wrong</div></div>');
|
||||
$ui->assign('notify', 'Wrong Verification code');
|
||||
$ui->assign('notify_t', 'd');
|
||||
$ui->display('register-otp.tpl');
|
||||
exit();
|
||||
}else{
|
||||
@ -95,11 +92,8 @@ switch ($do) {
|
||||
$ui->assign('address', $address);
|
||||
$ui->assign('email', $email);
|
||||
$ui->assign('phonenumber', $phonenumber);
|
||||
$ui->assign('notify', '<div class="alert alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>Failed to register</div></div>');
|
||||
$ui->assign('notify', 'Failed to register');
|
||||
$ui->assign('notify_t', 'd');
|
||||
run_hook('view_otp_register'); #HOOK
|
||||
$ui->display('register-rotp.tpl');
|
||||
}
|
||||
@ -109,11 +103,8 @@ switch ($do) {
|
||||
$ui->assign('address', $address);
|
||||
$ui->assign('email', $email);
|
||||
$ui->assign('phonenumber', $phonenumber);
|
||||
$ui->assign('notify', '<div class="alert alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>' . $msg . '</div></div>');
|
||||
$ui->assign('notify', $msg);
|
||||
$ui->assign('notify_t', 'd');
|
||||
$ui->display('register.tpl');
|
||||
}
|
||||
break;
|
||||
@ -134,22 +125,16 @@ switch ($do) {
|
||||
//expired 10 minutes
|
||||
if(file_exists($otpPath) && time()-filemtime($otpPath)<1200){
|
||||
$ui->assign('username', $username);
|
||||
$ui->assign('notify', '<div class="alert alert-success">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>Please wait '.(1200-(time()-filemtime($otpPath))).' seconds before sending another SMS</div></div>');
|
||||
$ui->assign('notify', 'Please wait '.(1200-(time()-filemtime($otpPath))).' seconds before sending another SMS');
|
||||
$ui->assign('notify_t', 'd');
|
||||
$ui->display('register-otp.tpl');
|
||||
}else{
|
||||
$otp = rand(100000,999999);
|
||||
file_put_contents($otpPath, $otp);
|
||||
Message::sendSMS($username,$config['CompanyName']."\nYour Verification code are: $otp");
|
||||
$ui->assign('username', $username);
|
||||
$ui->assign('notify', '<div class="alert alert-success">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>Verification code has been sent to your phone</div></div>');
|
||||
$ui->assign('notify', 'Verification code has been sent to your phone');
|
||||
$ui->assign('notify_t', 's');
|
||||
$ui->display('register-otp.tpl');
|
||||
}
|
||||
}else{
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||
* by https://t.me/ibnux
|
||||
@ -12,8 +13,8 @@ $action = $routes['1'];
|
||||
$admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
if($admin['user_type'] != 'Admin' AND $admin['user_type'] != 'Sales'){
|
||||
r2(U."dashboard",'e',$_L['Do_Not_Access']);
|
||||
if ($admin['user_type'] != 'Admin' and $admin['user_type'] != 'Sales') {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
}
|
||||
|
||||
$mdate = date('Y-m-d');
|
||||
@ -26,24 +27,44 @@ $month_n = date('n');
|
||||
|
||||
switch ($action) {
|
||||
case 'by-date':
|
||||
case 'daily-report':
|
||||
$paginator = Paginator::bootstrap('tbl_transactions','recharged_on',$mdate);
|
||||
$d = ORM::for_table('tbl_transactions')->where('recharged_on',$mdate)->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
$dr = ORM::for_table('tbl_transactions')->where('recharged_on',$mdate)->sum('price');
|
||||
case 'activation':
|
||||
$q = (_post('q') ? _post('q') : _get('q'));
|
||||
$keep = _post('keep');
|
||||
if (!empty($keep)) {
|
||||
ORM::raw_execute("DELETE FROM tbl_transactions WHERE date < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL $keep DAY))");
|
||||
r2(U . "logs/list/", 's', "Delete logs older than $keep days");
|
||||
}
|
||||
if ($q != '') {
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_transactions'), ['invoice' => '%' . $q . '%'], $q);
|
||||
$d = ORM::for_table('tbl_transactions')->where_like('invoice', '%' . $q . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_transactions'));
|
||||
$d = ORM::for_table('tbl_transactions')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}
|
||||
|
||||
$ui->assign('d',$d);
|
||||
$ui->assign('dr',$dr);
|
||||
$ui->assign('mdate',$mdate);
|
||||
$ui->assign('mtime',$mtime);
|
||||
$ui->assign('paginator',$paginator);
|
||||
$ui->assign('activation', $d);
|
||||
$ui->assign('q', $q);
|
||||
$ui->assign('paginator', $paginator);
|
||||
$ui->display('reports-activation.tpl');
|
||||
break;
|
||||
case 'daily-report':
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_transactions'), ['recharged_on' => $mdate]);
|
||||
$d = ORM::for_table('tbl_transactions')->where('recharged_on', $mdate)->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
$dr = ORM::for_table('tbl_transactions')->where('recharged_on', $mdate)->sum('price');
|
||||
|
||||
$ui->assign('d', $d);
|
||||
$ui->assign('dr', $dr);
|
||||
$ui->assign('mdate', $mdate);
|
||||
$ui->assign('mtime', $mtime);
|
||||
$ui->assign('paginator', $paginator);
|
||||
run_hook('view_daily_reports'); #HOOK
|
||||
$ui->display('reports-daily.tpl');
|
||||
break;
|
||||
|
||||
case 'by-period':
|
||||
$ui->assign('mdate',$mdate);
|
||||
$ui->assign('mtime',$mtime);
|
||||
$ui->assign('tdate', $tdate);
|
||||
$ui->assign('mdate', $mdate);
|
||||
$ui->assign('mtime', $mtime);
|
||||
$ui->assign('tdate', $tdate);
|
||||
run_hook('view_reports_by_period'); #HOOK
|
||||
$ui->display('reports-period.tpl');
|
||||
break;
|
||||
@ -54,33 +75,33 @@ switch ($action) {
|
||||
$stype = _post('stype');
|
||||
|
||||
$d = ORM::for_table('tbl_transactions');
|
||||
if ($stype != ''){
|
||||
$d->where('type', $stype);
|
||||
}
|
||||
if ($stype != '') {
|
||||
$d->where('type', $stype);
|
||||
}
|
||||
|
||||
$d->where_gte('recharged_on', $fdate);
|
||||
$d->where_lte('recharged_on', $tdate);
|
||||
$d->order_by_desc('id');
|
||||
$x = $d->find_many();
|
||||
|
||||
$dr = ORM::for_table('tbl_transactions');
|
||||
if ($stype != ''){
|
||||
$dr->where('type', $stype);
|
||||
}
|
||||
$dr = ORM::for_table('tbl_transactions');
|
||||
if ($stype != '') {
|
||||
$dr->where('type', $stype);
|
||||
}
|
||||
|
||||
$dr->where_gte('recharged_on', $fdate);
|
||||
$dr->where_lte('recharged_on', $tdate);
|
||||
$xy = $dr->sum('price');
|
||||
$xy = $dr->sum('price');
|
||||
|
||||
$ui->assign('d',$x);
|
||||
$ui->assign('dr',$xy);
|
||||
$ui->assign('fdate',$fdate);
|
||||
$ui->assign('tdate',$tdate);
|
||||
$ui->assign('stype',$stype);
|
||||
$ui->assign('d', $x);
|
||||
$ui->assign('dr', $xy);
|
||||
$ui->assign('fdate', $fdate);
|
||||
$ui->assign('tdate', $tdate);
|
||||
$ui->assign('stype', $stype);
|
||||
run_hook('view_reports_period'); #HOOK
|
||||
$ui->display('reports-period-view.tpl');
|
||||
break;
|
||||
|
||||
default:
|
||||
$ui->display('a404.tpl');
|
||||
}
|
||||
}
|
||||
|
@ -27,10 +27,10 @@ switch ($action) {
|
||||
|
||||
$name = _post('name');
|
||||
if ($name != '') {
|
||||
$paginator = Paginator::bootstrap('tbl_routers', 'name', '%' . $name . '%');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_routers'), ['name' => '%' . $name . '%'], $name);
|
||||
$d = ORM::for_table('tbl_routers')->where_like('name', '%' . $name . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::bootstrap('tbl_routers');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_routers'));
|
||||
$d = ORM::for_table('tbl_routers')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}
|
||||
|
||||
|
@ -120,10 +120,10 @@ switch ($action) {
|
||||
|
||||
$name = _post('name');
|
||||
if ($name != '') {
|
||||
$paginator = Paginator::bootstrap('tbl_plans', 'name_plan', '%' . $name . '%', 'type', 'Hotspot');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_plans'), ['name_plan' => '%' . $name . '%', 'type' => 'Hotspot'], $name);
|
||||
$d = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'Hotspot')->where_like('tbl_plans.name_plan', '%' . $name . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::bootstrap('tbl_plans', 'type', 'Hotspot');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_plans'), ['type' => 'Hotspot']);
|
||||
$d = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'Hotspot')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many();
|
||||
}
|
||||
|
||||
@ -167,11 +167,11 @@ switch ($action) {
|
||||
if ($d['is_radius']) {
|
||||
Radius::planDelete($d['id']);
|
||||
} else {
|
||||
try{
|
||||
try {
|
||||
$mikrotik = Mikrotik::info($d['routers']);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotPlan($client, $d['name_plan']);
|
||||
}catch(Exception $e){
|
||||
} catch (Exception $e) {
|
||||
//ignore exception, it means router has already deleted
|
||||
}
|
||||
}
|
||||
@ -302,7 +302,7 @@ switch ($action) {
|
||||
$validity_unit = _post('validity_unit');
|
||||
$pool_expired = _post('pool_expired');
|
||||
$enabled = _post('enabled');
|
||||
|
||||
$routers = _post('routers');
|
||||
$msg = '';
|
||||
if (Validator::UnsignedNumber($validity) == false) {
|
||||
$msg .= 'The validity must be a number' . '<br>';
|
||||
@ -377,10 +377,10 @@ switch ($action) {
|
||||
|
||||
$name = _post('name');
|
||||
if ($name != '') {
|
||||
$paginator = Paginator::bootstrap('tbl_plans', 'name_plan', '%' . $name . '%', 'type', 'Hotspot');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_plans'), ['name_plan' => '%' . $name . '%', 'type' => 'PPPOE'], $name);
|
||||
$d = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'PPPOE')->where_like('tbl_plans.name_plan', '%' . $name . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::bootstrap('tbl_plans', 'type', 'Hotspot');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_plans'), ['type' => 'PPPOE'], $name);
|
||||
$d = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'PPPOE')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many();
|
||||
}
|
||||
|
||||
@ -431,11 +431,11 @@ switch ($action) {
|
||||
if ($d['is_radius']) {
|
||||
Radius::planDelete($d['id']);
|
||||
} else {
|
||||
try{
|
||||
try {
|
||||
$mikrotik = Mikrotik::info($d['routers']);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removePpoePlan($client, $d['name_plan']);
|
||||
}catch(Exception $e){
|
||||
} catch (Exception $e) {
|
||||
//ignore exception, it means router has already deleted
|
||||
}
|
||||
}
|
||||
@ -613,10 +613,10 @@ switch ($action) {
|
||||
$ui->assign('_title', Lang::T('Balance Plans'));
|
||||
$name = _post('name');
|
||||
if ($name != '') {
|
||||
$paginator = Paginator::bootstrap('tbl_plans', 'name_plan', '%' . $name . '%', 'type', 'Balance');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_plans'), ['name_plan' => '%' . $name . '%', 'type' => 'Balance'], $name);
|
||||
$d = ORM::for_table('tbl_plans')->where('tbl_plans.type', 'Balance')->where_like('tbl_plans.name_plan', '%' . $name . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::bootstrap('tbl_plans', 'type', 'Hotspot');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_plans'), ['type' => 'Balance'], $name);
|
||||
$d = ORM::for_table('tbl_plans')->where('tbl_plans.type', 'Balance')->offset($paginator['startpoint'])->limit($paginator['limit'])->find_many();
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||
* by https://t.me/ibnux
|
||||
@ -22,11 +23,11 @@ switch ($action) {
|
||||
$logo = 'system/uploads/logo.default.png';
|
||||
}
|
||||
$ui->assign('logo', $logo);
|
||||
if(empty($_c['radius_client'])){
|
||||
try{
|
||||
if ($_c['radius_enable'] && empty($_c['radius_client'])) {
|
||||
try {
|
||||
$_c['radius_client'] = Radius::getClient();
|
||||
$ui->assign('_c', $_c);
|
||||
}catch(Exception $e){
|
||||
} catch (Exception $e) {
|
||||
//ignore
|
||||
}
|
||||
}
|
||||
@ -37,12 +38,18 @@ switch ($action) {
|
||||
$themes[] = $file;
|
||||
}
|
||||
}
|
||||
$php = trim(shell_exec('which php'));
|
||||
if(empty($php)){
|
||||
$r = ORM::for_table('tbl_routers')->find_many();
|
||||
$ui->assign('r', $r);
|
||||
if (function_exists("shell_exec")) {
|
||||
$php = trim(shell_exec('which php'));
|
||||
if (empty($php)) {
|
||||
$php = 'php';
|
||||
}
|
||||
} else {
|
||||
$php = 'php';
|
||||
}
|
||||
$ui->assign('php', $php);
|
||||
$ui->assign('dir', str_replace('controllers','', __DIR__));
|
||||
$ui->assign('dir', str_replace('controllers', '', __DIR__));
|
||||
$ui->assign('themes', $themes);
|
||||
run_hook('view_app_settings'); #HOOK
|
||||
$ui->display('app-settings.tpl');
|
||||
@ -76,10 +83,10 @@ switch ($action) {
|
||||
|
||||
$username = _post('username');
|
||||
if ($username != '') {
|
||||
$paginator = Paginator::bootstrap('tbl_users', 'username', '%' . $username . '%');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_users'), ['username' => '%' . $username . '%'], $username);
|
||||
$d = ORM::for_table('tbl_users')->where_like('username', '%' . $username . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_asc('id')->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::bootstrap('tbl_users');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_users'));
|
||||
$d = ORM::for_table('tbl_users')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_asc('id')->find_many();
|
||||
}
|
||||
|
||||
@ -236,235 +243,25 @@ switch ($action) {
|
||||
break;
|
||||
|
||||
case 'app-post':
|
||||
$company = _post('company');
|
||||
$footer = _post('footer');
|
||||
$enable_balance = _post('enable_balance');
|
||||
$allow_balance_transfer = _post('allow_balance_transfer');
|
||||
$disable_voucher = _post('disable_voucher');
|
||||
$telegram_bot = _post('telegram_bot');
|
||||
$telegram_target_id = _post('telegram_target_id');
|
||||
$sms_url = _post('sms_url');
|
||||
$wa_url = _post('wa_url');
|
||||
$minimum_transfer = _post('minimum_transfer');
|
||||
$user_notification_expired = _post('user_notification_expired');
|
||||
$user_notification_reminder = _post('user_notification_reminder');
|
||||
$user_notification_payment = _post('user_notification_payment');
|
||||
$address = _post('address');
|
||||
$tawkto = _post('tawkto');
|
||||
$http_proxy = _post('http_proxy');
|
||||
$http_proxyauth = _post('http_proxyauth');
|
||||
$radius_enable = _post('radius_enable');
|
||||
$radius_client = _post('radius_client');
|
||||
$theme = _post('theme');
|
||||
$company = _post('CompanyName');
|
||||
run_hook('save_settings'); #HOOK
|
||||
|
||||
|
||||
if (!empty($_FILES['logo']['name'])) {
|
||||
if(function_exists('imagecreatetruecolor')){
|
||||
if (function_exists('imagecreatetruecolor')) {
|
||||
if (file_exists('system/uploads/logo.png')) unlink('system/uploads/logo.png');
|
||||
File::resizeCropImage($_FILES['logo']['tmp_name'], 'system/uploads/logo.png', 1078, 200, 100);
|
||||
if (file_exists($_FILES['logo']['tmp_name'])) unlink($_FILES['logo']['tmp_name']);
|
||||
}else{
|
||||
} else {
|
||||
r2(U . 'settings/app', 'e', 'PHP GD is not installed');
|
||||
}
|
||||
}
|
||||
if ($company == '') {
|
||||
r2(U . 'settings/app', 'e', $_L['All_field_is_required']);
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'CompanyName')->find_one();
|
||||
$d->value = $company;
|
||||
$d->save();
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'address')->find_one();
|
||||
$d->value = $address;
|
||||
$d->save();
|
||||
|
||||
$phone = _post('phone');
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'phone')->find_one();
|
||||
$d->value = $phone;
|
||||
$d->save();
|
||||
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'http_proxy')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $http_proxy;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'http_proxy';
|
||||
$d->value = $http_proxy;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'http_proxyauth')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $http_proxyauth;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'http_proxyauth';
|
||||
$d->value = $http_proxyauth;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'theme')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $theme;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'theme';
|
||||
$d->value = $theme;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'CompanyFooter')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $footer;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'CompanyFooter';
|
||||
$d->value = $footer;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'disable_voucher')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $disable_voucher;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'disable_voucher';
|
||||
$d->value = $disable_voucher;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'enable_balance')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $enable_balance;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'enable_balance';
|
||||
$d->value = $enable_balance;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'allow_balance_transfer')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $allow_balance_transfer;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'allow_balance_transfer';
|
||||
$d->value = $allow_balance_transfer;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'minimum_transfer')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $minimum_transfer;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'minimum_transfer';
|
||||
$d->value = $minimum_transfer;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'telegram_bot')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $telegram_bot;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'telegram_bot';
|
||||
$d->value = $telegram_bot;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'telegram_target_id')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $telegram_target_id;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'telegram_target_id';
|
||||
$d->value = $telegram_target_id;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'sms_url')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $sms_url;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'sms_url';
|
||||
$d->value = $sms_url;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'wa_url')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $wa_url;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'wa_url';
|
||||
$d->value = $wa_url;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'user_notification_expired')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $user_notification_expired;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'user_notification_expired';
|
||||
$d->value = $user_notification_expired;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'user_notification_reminder')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $user_notification_reminder;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'user_notification_reminder';
|
||||
$d->value = $user_notification_reminder;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'user_notification_payment')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $user_notification_payment;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'user_notification_payment';
|
||||
$d->value = $user_notification_payment;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'tawkto')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $tawkto;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'tawkto';
|
||||
$d->value = $tawkto;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
if ($radius_enable) {
|
||||
try {
|
||||
Radius::getTableNas()->find_one(1);
|
||||
Radius::getTableNas()->find_many();
|
||||
} catch (Exception $e) {
|
||||
$ui->assign("error_title", "RADIUS Error");
|
||||
$ui->assign("error_message", "Radius table not found.<br><br>" .
|
||||
@ -474,34 +271,20 @@ switch ($action) {
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'radius_enable')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $radius_enable;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'radius_enable';
|
||||
$d->value = $radius_enable;
|
||||
$d->save();
|
||||
// save all settings
|
||||
foreach($_POST as $key => $value) {
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', $key)->find_one();
|
||||
if ($d) {
|
||||
$d->value = $value;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = $key;
|
||||
$d->value = $value;
|
||||
$d->save();
|
||||
}
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'radius_client')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $radius_client;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'radius_client';
|
||||
$d->value = $radius_client;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$note = _post('note');
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'note')->find_one();
|
||||
$d->value = $note;
|
||||
$d->save();
|
||||
|
||||
_log('[' . $admin['username'] . ']: ' . $_L['Settings_Saved_Successfully'], 'Admin', $admin['id']);
|
||||
|
||||
r2(U . 'settings/app', 's', $_L['Settings_Saved_Successfully']);
|
||||
@ -663,20 +446,12 @@ switch ($action) {
|
||||
|
||||
$dbc = new mysqli($db_host, $db_user, $db_password, $db_name);
|
||||
if ($result = $dbc->query('SHOW TABLE STATUS')) {
|
||||
$size = 0;
|
||||
$decimals = 2;
|
||||
$tables = array();
|
||||
while ($row = $result->fetch_array()) {
|
||||
$size += $row["Data_length"] + $row["Index_length"];
|
||||
$total_size = ($row["Data_length"] + $row["Index_length"]) / 1024;
|
||||
$tables[$row['Name']]['size'] = number_format($total_size, '0');
|
||||
$tables[$row['Name']]['rows'] = $row["Rows"];
|
||||
$tables[$row['Name']]['rows'] = ORM::for_table($row["Name"])->count();
|
||||
$tables[$row['Name']]['name'] = $row["Name"];
|
||||
}
|
||||
$mbytes = number_format($size / (1024 * 1024), $decimals, $config['dec_point'], $config['thousands_sep']);
|
||||
|
||||
$ui->assign('tables', $tables);
|
||||
$ui->assign('dbsize', $mbytes);
|
||||
run_hook('view_database'); #HOOK
|
||||
$ui->display('dbstatus.tpl');
|
||||
}
|
||||
@ -686,92 +461,52 @@ switch ($action) {
|
||||
if ($admin['user_type'] != 'Admin') {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
}
|
||||
|
||||
try {
|
||||
run_hook('backup_database'); #HOOK
|
||||
$mysqli = new mysqli($db_host, $db_user, $db_password, $db_name);
|
||||
if ($mysqli->connect_errno) {
|
||||
throw new Exception("Failed to connect to MySQL: " . $mysqli->connect_error);
|
||||
}
|
||||
|
||||
header('Pragma: public');
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Content-Type: application/force-download');
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Type: application/download');
|
||||
header('Content-Disposition: attachment;filename="backup_' . date('Y-m-d_h_i_s') . '.sql"');
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
|
||||
ob_start();
|
||||
$f_output = fopen("php://output", 'w');
|
||||
|
||||
print("-- pjl SQL Dump\n");
|
||||
print("-- Server version:" . $mysqli->server_info . "\n");
|
||||
print("-- Generated: " . date('Y-m-d h:i:s') . "\n");
|
||||
print('-- Current PHP version: ' . phpversion() . "\n");
|
||||
print('-- Host: ' . $db_host . "\n");
|
||||
print('-- Database:' . $db_name . "\n");
|
||||
|
||||
$aTables = array();
|
||||
$strSQL = 'SHOW TABLES';
|
||||
if (!$res_tables = $mysqli->query($strSQL))
|
||||
throw new Exception("MySQL Error: " . $mysqli->error . 'SQL: ' . $strSQL);
|
||||
|
||||
while ($row = $res_tables->fetch_array()) {
|
||||
$aTables[] = $row[0];
|
||||
}
|
||||
|
||||
$res_tables->free();
|
||||
|
||||
foreach ($aTables as $table) {
|
||||
print("-- --------------------------------------------------------\n");
|
||||
print("-- Structure for '" . $table . "'\n");
|
||||
print("--\n\n");
|
||||
|
||||
$strSQL = 'SHOW CREATE TABLE ' . $table;
|
||||
if (!$res_create = $mysqli->query($strSQL))
|
||||
throw new Exception("MySQL Error: " . $mysqli->error . 'SQL: ' . $strSQL);
|
||||
$row_create = $res_create->fetch_assoc();
|
||||
|
||||
print("\n" . $row_create['Create Table'] . ";\n");
|
||||
print("-- --------------------------------------------------------\n");
|
||||
print('-- Dump Data for `' . $table . "`\n");
|
||||
print("--\n\n");
|
||||
$res_create->free();
|
||||
|
||||
$strSQL = 'SELECT * FROM ' . $table;
|
||||
if (!$res_select = $mysqli->query($strSQL))
|
||||
throw new Exception("MySQL Error: " . $mysqli->error . 'SQL: ' . $strSQL);
|
||||
|
||||
$fields_info = $res_select->fetch_fields();
|
||||
|
||||
while ($values = $res_select->fetch_assoc()) {
|
||||
$strFields = '';
|
||||
$strValues = '';
|
||||
foreach ($fields_info as $field) {
|
||||
if ($strFields != '') $strFields .= ',';
|
||||
$strFields .= "`" . $field->name . "`";
|
||||
|
||||
if ($strValues != '') $strValues .= ',';
|
||||
$strValues .= '"' . preg_replace('/[^(\x20-\x7F)\x0A]*/', '', $values[$field->name] . '"');
|
||||
}
|
||||
print("INSERT INTO " . $table . " (" . $strFields . ") VALUES (" . $strValues . ");\n");
|
||||
}
|
||||
print("\n\n\n");
|
||||
$res_select->free();
|
||||
}
|
||||
_log('[' . $admin['username'] . ']: ' . $_L['Download_Database_Backup'], 'Admin', $admin['id']);
|
||||
} catch (Exception $e) {
|
||||
print($e->getMessage());
|
||||
$tables = $_POST['tables'];
|
||||
set_time_limit(-1);
|
||||
header('Pragma: public');
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Content-Type: application/force-download');
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Type: application/download');
|
||||
header('Content-Disposition: attachment;filename="phpnuxbill_' . count($tables) . '_tables_' . date('Y-m-d_H_i') . '.json"');
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
$array = [];
|
||||
foreach ($tables as $table) {
|
||||
$array[$table] = ORM::for_table($table)->find_array();
|
||||
}
|
||||
echo json_encode($array);
|
||||
break;
|
||||
case 'dbrestore':
|
||||
if ($admin['user_type'] != 'Admin') {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
}
|
||||
if (file_exists($_FILES['json']['tmp_name'])) {
|
||||
$suc = 0;
|
||||
$fal = 0;
|
||||
$json = json_decode(file_get_contents($_FILES['json']['tmp_name']), true);
|
||||
foreach ($json as $table => $records) {
|
||||
ORM::raw_execute("TRUNCATE $table;");
|
||||
foreach ($records as $rec) {
|
||||
$t = ORM::for_table($table)->create();
|
||||
foreach ($rec as $k => $v) {
|
||||
if ($k != 'id') {
|
||||
$t->set($k, $v);
|
||||
}
|
||||
}
|
||||
if ($t->save()) {
|
||||
$suc++;
|
||||
} else {
|
||||
$fal++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (file_exists($_FILES['json']['tmp_name'])) unlink($_FILES['json']['tmp_name']);
|
||||
r2(U . "settings/dbstatus", 's', "Restored $suc success $fal failed");
|
||||
} else {
|
||||
r2(U . "settings/dbstatus", 'e', 'Upload failed');
|
||||
}
|
||||
|
||||
fclose($f_output);
|
||||
print(ob_get_clean());
|
||||
$mysqli->close();
|
||||
|
||||
break;
|
||||
|
||||
case 'language':
|
||||
if ($admin['user_type'] != 'Admin') {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
|
@ -42,7 +42,7 @@ switch ($action) {
|
||||
|
||||
case 'list-activated':
|
||||
$ui->assign('_system_menu', 'list-activated');
|
||||
$paginator = Paginator::bootstrap('tbl_transactions', 'username', $user['username']);
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_transactions'), ['username' => $user['username']]);
|
||||
$d = ORM::for_table('tbl_transactions')->where('username', $user['username'])->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
|
||||
$ui->assign('d', $d);
|
||||
|
@ -35,6 +35,18 @@ if (php_sapi_name() !== 'cli') {
|
||||
echo "<pre>";
|
||||
}
|
||||
|
||||
if(!file_exists('../config.php')){
|
||||
die("config.php file not found");
|
||||
}
|
||||
|
||||
|
||||
if(!file_exists('orm.php')){
|
||||
die("orm.php file not found");
|
||||
}
|
||||
|
||||
if(!file_exists('uploads/notifications.default.json')){
|
||||
die("uploads/notifications.default.json file not found");
|
||||
}
|
||||
|
||||
require_once '../config.php';
|
||||
require_once 'orm.php';
|
||||
@ -103,10 +115,10 @@ foreach ($d as $ds) {
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||
|
||||
if ($p['is_radius']) {
|
||||
if (!empty($p['pool_expired'])) {
|
||||
if (empty($p['pool_expired'])) {
|
||||
print_r(Radius::customerDeactivate($c['username']));
|
||||
} else {
|
||||
Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $plan['pool_expired'], ':=');
|
||||
Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $p['pool_expired'], ':=');
|
||||
print_r(Radius::disconnectCustomer($c['username']));
|
||||
}
|
||||
} else {
|
||||
@ -117,8 +129,8 @@ foreach ($d as $ds) {
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
}
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], $textExpired, $config['user_notification_expired']);
|
||||
}
|
||||
Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], $textExpired, $config['user_notification_expired']);
|
||||
//update database user dengan status off
|
||||
$u->status = 'off';
|
||||
$u->save();
|
||||
@ -157,10 +169,10 @@ foreach ($d as $ds) {
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||
|
||||
if ($p['is_radius']) {
|
||||
if (!empty($p['pool_expired'])) {
|
||||
if (empty($p['pool_expired'])) {
|
||||
print_r(Radius::customerDeactivate($c['username']));
|
||||
} else {
|
||||
Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $plan['pool_expired'], ':=');
|
||||
Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $p['pool_expired'], ':=');
|
||||
print_r(Radius::disconnectCustomer($c['username']));
|
||||
}
|
||||
} else {
|
||||
@ -171,8 +183,8 @@ foreach ($d as $ds) {
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
}
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], $textExpired, $config['user_notification_expired']);
|
||||
}
|
||||
Message::sendPackageNotification($c['phonenumber'], $c['fullname'], $u['namebp'], $textExpired, $config['user_notification_expired']);
|
||||
|
||||
$u->status = 'off';
|
||||
$u->save();
|
||||
|
@ -35,6 +35,19 @@ if(php_sapi_name() !== 'cli'){
|
||||
echo "<pre>";
|
||||
}
|
||||
|
||||
if(!file_exists('../config.php')){
|
||||
die("config.php file not found");
|
||||
}
|
||||
|
||||
|
||||
if(!file_exists('orm.php')){
|
||||
die("orm.php file not found");
|
||||
}
|
||||
|
||||
if(!file_exists('uploads/notifications.default.json')){
|
||||
die("uploads/notifications.default.json file not found");
|
||||
}
|
||||
|
||||
require_once '../config.php';
|
||||
require_once 'orm.php';
|
||||
require_once 'autoload/PEAR2/Autoload.php';
|
||||
|
@ -20,7 +20,7 @@ $_L['Register_Voucher_Failed'] = 'Voucher not found, please buy voucher befor re
|
||||
$_L['Register_Success'] = 'Register Success! You can login now';
|
||||
$_L['Sign_In_Member'] = 'Log in to Member Panel';
|
||||
$_L['Register_Member'] = 'Register as Member';
|
||||
$_L['Sign_In_Admin'] = 'Masuk ke Admin Panel';
|
||||
$_L['Sign_In_Admin'] = 'Enter Admin Area';
|
||||
$_L['Logo'] = 'PHPNuxBill';
|
||||
$_L['Username'] = 'Username';
|
||||
$_L['Password'] = 'Password';
|
||||
@ -355,7 +355,7 @@ $_L['Invoice_Balance_Message'] = 'Invoice Balance Message';
|
||||
$_L['Invoice_Notification_Payment'] = 'Invoice Notification Payment';
|
||||
$_L['Balance_Notification_Payment'] = 'Balance Notification Payment';
|
||||
$_L['Balance_Plans'] = 'Balance Plans';
|
||||
$_L['Buy_Balance'] = 'Buy Balance?';
|
||||
$_L['Buy_Balance'] = 'Buy Balance';
|
||||
$_L['Price'] = 'Price';
|
||||
$_L['Validity'] = 'Validity';
|
||||
$_L['Disable_auto_renewal'] = 'Disable auto renewal?';
|
||||
@ -403,6 +403,17 @@ $_L['Deactivate'] = 'Deactivate';
|
||||
$_L['Sync'] = 'Sync';
|
||||
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
||||
$_L['Location'] = 'Location';
|
||||
$_L['Radius_Plans'] = 'Radius Plans';
|
||||
$_L['Change_title_in_user_Plan_order'] = 'Change title in user Plan order';
|
||||
$_L['Logs'] = 'Logs';
|
||||
$_L['Radius_Plans'] = 'Radius Plans';
|
||||
$_L['Change_title_in_user_Plan_order'] = 'Change title in user Plan order';
|
||||
$_L['Logs'] = 'Logs';
|
||||
$_L['Voucher_Format'] = 'Voucher Format';
|
||||
$_L['Resend_To_Customer'] = 'Resend To Customer';
|
||||
$_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';
|
||||
$_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['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';
|
||||
|
@ -14,387 +14,401 @@ Contributor: Ibnu Maksum (@ibnux)
|
||||
|
||||
$_L['Login'] = 'Masuk';
|
||||
$_L['Register'] = 'Daftar';
|
||||
$_L['Announcement'] = 'Pengumuman';
|
||||
$_L['Announcement'] = 'Pemberitahuan';
|
||||
$_L['Registration_Info'] = 'Info Pendaftaran';
|
||||
$_L['Register_Voucher_Failed'] = 'Voucher tidak ditemukan, mohon beli dulu Voucher sebelum mendaftar';
|
||||
$_L['Register_Success'] = 'Pendaftaran sukses!<br>silahkan masuk';
|
||||
$_L['Sign_In_Member'] = 'Masuk ke Member Panel';
|
||||
$_L['Register_Member'] = 'Mendaftar sebagai pelanggan<br>pastikan anda sudah membeli voucher';
|
||||
$_L['Register_Voucher_Failed'] = 'Voucher tidak ditemukan, silakan beli voucher sebelum mendaftar';
|
||||
$_L['Register_Success'] = 'Daftar Sukses! Anda dapat masuk sekarang';
|
||||
$_L['Sign_In_Member'] = 'Masuk ke Panel Anggota';
|
||||
$_L['Register_Member'] = 'Daftar sebagai Anggota';
|
||||
$_L['Sign_In_Admin'] = 'Masuk ke Admin Panel';
|
||||
$_L['Logo'] = 'PHPNuxBill';
|
||||
$_L['Username'] = 'Username';
|
||||
$_L['Password'] = 'Password';
|
||||
$_L['PasswordsNotMatch'] = 'Sandi tidak sama';
|
||||
$_L['account_already_exist'] = 'Username sudah ada yang menggunakan';
|
||||
$_L['Manage'] = 'Proses';
|
||||
$_L['Username'] = 'Nama Pengguna';
|
||||
$_L['Password'] = 'Kata Sandi';
|
||||
$_L['PasswordsNotMatch'] = 'Kata Sandi tidak cocok';
|
||||
$_L['account_already_exist'] = 'Akun telah ada';
|
||||
$_L['Manage'] = 'Mengelola';
|
||||
$_L['Submit'] = 'Kirim';
|
||||
$_L['Save'] = 'Simpan Perubahan';
|
||||
$_L['Save'] = 'Simpan perubahan';
|
||||
$_L['Cancel'] = 'Batal';
|
||||
$_L['Edit'] = 'Edit';
|
||||
$_L['Edit'] = 'Sunting';
|
||||
$_L['Delete'] = 'Hapus';
|
||||
$_L['Welcome'] = 'Selamat Datang';
|
||||
$_L['Created_Successfully'] = 'Data berhasil di buat';
|
||||
$_L['Updated_Successfully'] = 'Data berhasil di ubah';
|
||||
$_L['Delete_Successfully'] = 'Berhasil menghapus data';
|
||||
$_L['Created_Successfully'] = 'Data Berhasil Dibuat';
|
||||
$_L['Updated_Successfully'] = 'Data Berhasil Diperbarui';
|
||||
$_L['Delete_Successfully'] = 'Data Berhasil Dihapus';
|
||||
|
||||
$_L['Static_Pages'] = "Halaman statis";
|
||||
$_L['Static_Pages'] = "Halaman Statis";
|
||||
$_L['Failed_Save_Page'] = "Gagal menyimpan halaman, pastikan diperbolehkan menulis file di folder pages, <i>chmod 664 pages/*.html<i>";
|
||||
$_L['Success_Save_Page'] = "Sukses menyimpan halaman";
|
||||
$_L['Info_Page'] = "Kadang harus di-refresh 3 kali baru konten berubah";
|
||||
$_L['Success_Save_Page'] = "Menyimpan halaman sukses";
|
||||
$_L['Info_Page'] = "Terkadang Anda perlu menyegarkan 3 kali hingga konten berubah";
|
||||
|
||||
$_L['Dashboard'] = 'Beranda';
|
||||
$_L['Search_Contact'] = 'Cari username member...';
|
||||
$_L['Dashboard'] = 'Dasbor';
|
||||
$_L['Search_Contact'] = 'Cari Member...';
|
||||
$_L['My_Account'] = 'Akun Saya';
|
||||
$_L['My_Profile'] = 'Profil Saya';
|
||||
$_L['Settings'] = 'Pengaturan';
|
||||
$_L['Edit_Profile'] = 'Ubah Profil';
|
||||
$_L['Change_Password'] = 'Ganti Password';
|
||||
$_L['Edit_Profile'] = 'Sunting profil';
|
||||
$_L['Change_Password'] = 'Ganti kata sandi';
|
||||
$_L['Logout'] = 'Keluar';
|
||||
|
||||
$_L['Services'] = 'Layanan';
|
||||
$_L['Bandwidth_Plans'] = 'Daftar Bandwidth';
|
||||
$_L['Bandwidth_Plans'] = 'Paket Bandwidth';
|
||||
$_L['BW_Name'] = 'Nama Bandwidth';
|
||||
$_L['New_Bandwidth'] = 'Tambah Data Bandwidth';
|
||||
$_L['Edit_Bandwidth'] = 'Ubah Data Bandwidth';
|
||||
$_L['Add_Bandwidth'] = 'Tambah Bandwidth Baru';
|
||||
$_L['Rate_Download'] = 'Rate Download';
|
||||
$_L['Rate_Upload'] = 'Rate Upload';
|
||||
$_L['BW_already_exist'] = 'Nama Bandwidth Sudah Ada';
|
||||
$_L['New_Bandwidth'] = 'Baru Bandwidth';
|
||||
$_L['Edit_Bandwidth'] = 'Sunting Bandwidth';
|
||||
$_L['Add_Bandwidth'] = 'Tambahkan Bandwidth Baru';
|
||||
$_L['Rate_Download'] = 'Nilai Unduhan';
|
||||
$_L['Rate_Upload'] = 'Nilai Unggahan';
|
||||
$_L['BW_already_exist'] = 'NamanBandwidth Sudah Ada';
|
||||
$_L['Hotspot_Plans'] = 'Paket Hotspot';
|
||||
$_L['PPPOE_Plans'] = 'Paket PPPOE';
|
||||
$_L['PPPOE_Plans'] = 'Paket PPPoE';
|
||||
$_L['Plan_Name'] = 'Nama Paket';
|
||||
$_L['New_Plan'] = 'Tambah Paket Baru';
|
||||
$_L['Add_Plan'] = 'Tambah Paket Baru';
|
||||
$_L['Edit_Plan'] = 'Ubah Paket';
|
||||
$_L['New_Plan'] = 'Paket Layanan Baru';
|
||||
$_L['Add_Plan'] = 'Tambah Paket Layanan';
|
||||
$_L['Edit_Plan'] = 'Sunting Paket Layanan';
|
||||
$_L['Plan_already_exist'] = 'Nama Paket Sudah Ada';
|
||||
$_L['Plan_Type'] = 'Jenis Paket';
|
||||
$_L['Plan_Price'] = 'Harga';
|
||||
$_L['Limit_Type'] = 'Jenis Limit';
|
||||
$_L['Unlimited'] = 'Unlimited';
|
||||
$_L['Limited'] = 'Limited';
|
||||
$_L['Time_Limit'] = 'TimeBase';
|
||||
$_L['Data_Limit'] = 'QuotaBase';
|
||||
$_L['Both_Limit'] = 'Keduanya';
|
||||
$_L['Plan_Validity'] = 'Masa Aktif';
|
||||
$_L['Select_BW'] = 'Pilih Nama Bandwidth';
|
||||
$_L['Shared_Users'] = 'Shared Users';
|
||||
$_L['Plan_Price'] = 'Harga Paket';
|
||||
$_L['Limit_Type'] = 'Tipe Batas';
|
||||
$_L['Unlimited'] = 'Tak terbatas';
|
||||
$_L['Limited'] = 'Terbatas';
|
||||
$_L['Time_Limit'] = 'Batas waktu';
|
||||
$_L['Data_Limit'] = 'Batas Data';
|
||||
$_L['Both_Limit'] = 'Keduanya Membatasi';
|
||||
$_L['Plan_Validity'] = 'Waktu Paket';
|
||||
$_L['Select_BW'] = 'Pilih Bandwidth';
|
||||
$_L['Shared_Users'] = 'Berbagi Pelanggan';
|
||||
|
||||
$_L['user_type_help'] = 'Pilih Sales jika ingin fasilitas Pengaturan dinonaktifkan';
|
||||
$_L['Current_Password'] = 'Password Sekarang';
|
||||
$_L['New_Password'] = 'Password Baru';
|
||||
$_L['user_type_help'] = 'Pilih Sales untuk menonaktifkan akses ke Pengaturan';
|
||||
$_L['Current_Password'] = 'Kata sandi saat ini';
|
||||
$_L['New_Password'] = 'Kata sandi baru';
|
||||
$_L['Administrator'] = 'Administrator';
|
||||
$_L['Sales'] = 'Sales';
|
||||
$_L['Member'] = 'Member';
|
||||
$_L['Confirm_New_Password'] = 'Konfirmasi Password';
|
||||
$_L['Confirm_Password'] = 'Konfirmasi Password';
|
||||
$_L['Member'] = 'Anggota';
|
||||
$_L['Confirm_New_Password'] = 'Konfirmasi sandi baru';
|
||||
$_L['Confirm_Password'] = 'konfirmasi sandi';
|
||||
$_L['Full_Name'] = 'Nama Lengkap';
|
||||
$_L['User_Type'] = 'Posisi User';
|
||||
$_L['Address'] = 'Alamat Lengkap';
|
||||
$_L['Created_On'] = 'Tanggal Aktif';
|
||||
$_L['Expires_On'] = 'Tanggal Expire';
|
||||
$_L['Phone_Number'] = 'Nomor HP';
|
||||
$_L['User_Delete_Ok'] = 'User berhasil di hapus';
|
||||
$_L['Full_Administrator'] = 'Full Administrator';
|
||||
$_L['password_change_help'] = 'Kosongkan jika tidak ingin mengganti password';
|
||||
$_L['currency_help'] = 'Kosongkan jika tidak ingin mengatur kode Mata Uang';
|
||||
$_L['Theme_Style'] = 'Theme Style';
|
||||
$_L['Theme_Color'] = 'Theme Color';
|
||||
$_L['Default_Language'] = 'Bahasa';
|
||||
$_L['User_Type'] = 'Tipe Pelanggan';
|
||||
$_L['Address'] = 'Alamat';
|
||||
$_L['Created_On'] = 'Dibuat pada';
|
||||
$_L['Expires_On'] = 'Kadaluarsa pada';
|
||||
$_L['Phone_Number'] = 'Nomor telepon';
|
||||
$_L['User_Delete_Ok'] = 'Pelanggan berhasil dihapus';
|
||||
$_L['Full_Administrator'] = 'Administrator Penuh';
|
||||
$_L['password_change_help'] = 'Biarkan Kosong apabila tidak ingin mengubah Kata Sandi';
|
||||
$_L['currency_help'] = 'Kosongkan jika Anda tidak ingin menampilkan kode mata uang';
|
||||
$_L['Theme_Style'] = 'Gaya Tema';
|
||||
$_L['Theme_Color'] = 'Warna Tema';
|
||||
$_L['Default_Language'] = 'Bahasa Bawaan';
|
||||
|
||||
$_L['Network'] = 'Network';
|
||||
$_L['Routers'] = 'Routers';
|
||||
$_L['Network'] = 'Jaringan';
|
||||
$_L['Routers'] = 'Router';
|
||||
$_L['Pool'] = 'IP Pool';
|
||||
$_L['New_Router'] = 'Router Baru';
|
||||
$_L['Add_Router'] = 'Tambah Router';
|
||||
$_L['Edit_Router'] = 'Ubah Router';
|
||||
$_L['New_Router'] = 'Router baru';
|
||||
$_L['Add_Router'] = 'Tambahkan Router';
|
||||
$_L['Edit_Router'] = 'Sunting Router';
|
||||
$_L['Router_Name'] = 'Nama Router';
|
||||
$_L['IP_Address'] = 'IP Address';
|
||||
$_L['Router_Secret'] = 'Password Router';
|
||||
$_L['Description'] = 'Deskripsi';
|
||||
$_L['Router_already_exist'] = 'IP Router sudah digunakan';
|
||||
$_L['IP_Address'] = 'Alamat IP';
|
||||
$_L['Router_Secret'] = 'Rahasia Router';
|
||||
$_L['Description'] = 'Deskrispi';
|
||||
$_L['Router_already_exist'] = 'IP Router Sudah Ada';
|
||||
$_L['Pool_Name'] = 'Nama Pool';
|
||||
$_L['Range_IP'] = 'Rentang IP';
|
||||
$_L['New_Pool'] = 'Pool Baru';
|
||||
$_L['Add_Pool'] = 'Tambah Pool';
|
||||
$_L['Edit_Pool'] = 'Ubah Pool';
|
||||
$_L['New_Pool'] = 'Pool baru';
|
||||
$_L['Add_Pool'] = 'Tambahkan Pool';
|
||||
$_L['Edit_Pool'] = 'Sunting Pool';
|
||||
$_L['Pool_already_exist'] = 'Nama Pool Sudah Ada';
|
||||
|
||||
$_L['Prepaid'] = 'Billing';
|
||||
$_L['Prepaid_User'] = 'Billing';
|
||||
$_L['Prepaid_Vouchers'] = 'Kelola Voucher';
|
||||
$_L['Refill_Account'] = 'Refill Akun';
|
||||
$_L['Recharge_Account'] = 'Perpanjang Akun';
|
||||
$_L['Prepaid'] = 'Prabayar';
|
||||
$_L['Prepaid_User'] = 'Pengguna Prabayar';
|
||||
$_L['Prepaid_Vouchers'] = 'Voucher Prabayar';
|
||||
$_L['Refill_Account'] = 'Isi Ulang Akun';
|
||||
$_L['Recharge_Account'] = 'Isi Ulang Akun';
|
||||
$_L['Select_Account'] = 'Pilih Akun';
|
||||
$_L['Service_Plan'] = 'Paket';
|
||||
$_L['Recharge'] = 'Isi Ulang Akun';
|
||||
$_L['Service_Plan'] = 'Paket Layanan';
|
||||
$_L['Recharge'] = 'Isi Ulang';
|
||||
$_L['Method'] = 'Metode';
|
||||
$_L['account_created_successfully'] = 'Account Created Successfully';
|
||||
$_L['account_created_successfully'] = 'Akun Berhasil Dibuat';
|
||||
|
||||
$_L['Database_Status'] = 'Status Database';
|
||||
$_L['Total_Database_Size'] = 'Ukuran Database';
|
||||
$_L['Download_Database_Backup'] = 'Download Database Backup';
|
||||
$_L['Total_Database_Size'] = 'Ukuran Total Database';
|
||||
$_L['Download_Database_Backup'] = 'Unduh Cadangan Database';
|
||||
$_L['Table_Name'] = 'Nama Tabel';
|
||||
$_L['Rows'] = 'Rows';
|
||||
$_L['Size'] = 'Size';
|
||||
$_L['Rows'] = 'Baris';
|
||||
$_L['Size'] = 'Ukuran';
|
||||
|
||||
$_L['Customers'] = 'Kontak Member';
|
||||
$_L['Add_Contact'] = 'Tambah Kontak Baru';
|
||||
$_L['Edit_Contact'] = 'Edit Kontak';
|
||||
$_L['List_Contact'] = 'List Kontak';
|
||||
$_L['Customers'] = 'Pelanggan';
|
||||
$_L['Add_Contact'] = 'Tambahkan Kontak Baru';
|
||||
$_L['Edit_Contact'] = 'Sunting Kontak';
|
||||
$_L['List_Contact'] = 'Daftar Kontak';
|
||||
$_L['Manage_Accounts'] = 'Kelola Kontak';
|
||||
|
||||
$_L['Reports'] = 'Laporan';
|
||||
$_L['Daily_Report'] = 'Laporan Harian';
|
||||
$_L['Period_Reports'] = 'Laporan Periode';
|
||||
$_L['All_Transactions'] = 'Semua Transaksi';
|
||||
$_L['Total_Income'] = 'Total Pendapatan';
|
||||
$_L['Total_Income'] = 'Jumlah Pemasukan';
|
||||
$_L['All_Transactions_at_Date'] = 'Semua Transaksi pada Tanggal';
|
||||
$_L['Export_for_Print'] = 'Cetak Laporan';
|
||||
$_L['Print'] = 'Print';
|
||||
$_L['Export_to_PDF'] = 'Export ke PDF';
|
||||
$_L['Click_Here_to_Print'] = 'Klik Disini untuk Cetak Laporan';
|
||||
$_L['You_can_use_html_tag'] = 'Boleh menggunakan tag html';
|
||||
$_L['Date_Format'] = 'Format Tanggal';
|
||||
$_L['Total_Income'] = 'Jumlah Pemasukan';
|
||||
$_L['Export_for_Print'] = 'Ekspor untuk Cetak';
|
||||
$_L['Print'] = 'Cetak';
|
||||
$_L['Export_to_PDF'] = 'Ekspor ke PDF';
|
||||
$_L['Click_Here_to_Print'] = 'Klik Disini untuk Mencetak';
|
||||
$_L['You_can_use_html_tag'] = 'Anda dapat menggunakan tag html';
|
||||
$_L['Date_Format'] = 'Format tanggal';
|
||||
$_L['Income_Today'] = 'Pendapatan Hari Ini';
|
||||
$_L['Income_This_Month'] = 'Pendapatan Bulan Ini';
|
||||
$_L['Users_Active'] = 'Member Aktif';
|
||||
$_L['Total_Users'] = 'Total Member';
|
||||
$_L['Users'] = 'User';
|
||||
$_L['Edit_User'] = 'Ubah Pengguna';
|
||||
$_L['Last_Login'] = 'Terakhir Login';
|
||||
$_L['Administrator_Users'] = 'Pengguna Admin';
|
||||
$_L['Income_This_Month'] = 'Penghasilan Bulan Ini';
|
||||
$_L['Users_Active'] = 'Pelanggan Aktif';
|
||||
$_L['Total_Users'] = 'Total Pelanggan';
|
||||
$_L['Users'] = 'Pelanggan';
|
||||
$_L['Edit_User'] = 'Sunting Pelanggan';
|
||||
$_L['Last_Login'] = 'Terakhir Masuk';
|
||||
$_L['Administrator_Users'] = 'Pengguna Administrator';
|
||||
$_L['Manage_Administrator'] = 'Kelola Administrator';
|
||||
$_L['Add_New_Administrator'] = 'Tambah Administrator';
|
||||
$_L['Add_New_Administrator'] = 'Tambahkan Administrator Baru';
|
||||
$_L['Localisation'] = 'Lokalisasi';
|
||||
$_L['Backup_Restore'] = 'Backup/Restore';
|
||||
$_L['Backup_Restore'] = 'Cadangkan/Pulihkan';
|
||||
|
||||
$_L['General_Settings'] = 'Pengaturan Umum';
|
||||
$_L['Date'] = 'Tanggal';
|
||||
$_L['Login_Successful'] = 'Login Berhasil';
|
||||
$_L['Failed_Login'] = 'Gagal Login';
|
||||
$_L['Login_Successful'] = 'Berhasil Masuk';
|
||||
$_L['Failed_Login'] = 'Gagal Masuk';
|
||||
$_L['Settings_Saved_Successfully'] = 'Pengaturan Berhasil Disimpan';
|
||||
$_L['User_Updated_Successfully'] = 'Berhasil mengubah pengguna';
|
||||
$_L['User_Expired_Today'] = 'Member Expire Hari Ini';
|
||||
$_L['Activity_Log'] = 'Aktifitas Log';
|
||||
$_L['User_Updated_Successfully'] = 'Pengguna Berhasil Diperbarui';
|
||||
$_L['User_Expired_Today'] = 'Pengguna Kedaluwarsa, Hari Ini';
|
||||
$_L['Activity_Log'] = 'Log aktivitas';
|
||||
$_L['View_Reports'] = 'Lihat Laporan';
|
||||
$_L['View_All'] = 'Lihat Semua';
|
||||
$_L['View_All'] = 'Lihat semua';
|
||||
$_L['Number_of_Vouchers'] = 'Jumlah Voucher';
|
||||
$_L['Length_Code'] = 'Panjang Kode';
|
||||
$_L['Length_Code'] = 'Kode Panjang';
|
||||
$_L['Code_Voucher'] = 'Kode Voucher';
|
||||
$_L['Voucher'] = 'Voucher';
|
||||
$_L['Voucher_Hotspot'] = 'Voucher Hotspot';
|
||||
$_L['Status_Voucher'] = 'Status Voucher';
|
||||
$_L['Add_Voucher'] = 'Tambah';
|
||||
$_L['Voucher_Successfully'] = 'Berhasil membuat Voucher baru';
|
||||
$_L['Generate'] = 'Generate';
|
||||
$_L['Print_Info'] = 'Print bolak balik, biar mudah dipotong dan hemat kertas';
|
||||
$_L['Status_Voucher'] = 'Voucher Status';
|
||||
$_L['Add_Voucher'] = 'Tambah Voucher';
|
||||
$_L['Voucher_Successfully'] = 'Buat Voucher Berhasil';
|
||||
$_L['Generate'] = 'Menghasilkan';
|
||||
$_L['Print_Info'] = 'Info Cetak';
|
||||
|
||||
$_L['From_Date'] = 'Dari Tanggal';
|
||||
$_L['To_Date'] = 'Hingga Tanggal';
|
||||
$_L['From_Date'] = 'Dari tanggal';
|
||||
$_L['To_Date'] = 'Hingga saat ini';
|
||||
$_L['New_Service'] = 'Layanan Baru';
|
||||
$_L['Type'] = 'Jenis';
|
||||
$_L['Finish'] = 'Selesai';
|
||||
$_L['App_Name'] = 'Nama Perusahaan';
|
||||
$_L['App_Name_Help_Text'] = 'Nama ini akan tampil pada judul';
|
||||
$_L['Next'] = 'Next';
|
||||
$_L['Last'] = 'Last';
|
||||
$_L['Timezone'] = 'Timezone';
|
||||
$_L['Decimal_Point'] = 'Pemisah Desimal';
|
||||
$_L['Finish'] = 'Menyelesaikan';
|
||||
$_L['App_Name'] = 'Nama Aplikasi/ Nama Perusahaan';
|
||||
$_L['App_Name_Help_Text'] = 'Nama ini akan ditampilkan pada Judul';
|
||||
$_L['Next'] = 'Berikutnya';
|
||||
$_L['Last'] = 'Terakhir';
|
||||
$_L['Timezone'] = 'Zona waktu';
|
||||
$_L['Decimal_Point'] = 'Titik Desimal';
|
||||
$_L['Thousands_Separator'] = 'Pemisah Ribuan';
|
||||
$_L['Currency_Code'] = 'Mata Uang';
|
||||
$_L['Currency_Code'] = 'Kode mata uang';
|
||||
|
||||
$_L['Order_Voucher'] = 'Beli Voucher';
|
||||
$_L['Voucher_Activation'] = 'Aktifasi Voucher';
|
||||
$_L['List_Activated_Voucher'] = 'List Aktifasi Voucher';
|
||||
$_L['Enter_Voucher_Code'] = 'Masukkan kode voucher disini';
|
||||
$_L['Private_Message'] = 'Pesan Singkat';
|
||||
$_L['Inbox'] = 'Inbox';
|
||||
$_L['Outbox'] = 'Outbox';
|
||||
$_L['Compose'] = 'Compose';
|
||||
$_L['Send_to'] = 'Send to';
|
||||
$_L['Title'] = 'Title';
|
||||
$_L['Message'] = 'Message';
|
||||
$_L['Order_Voucher'] = 'Pesan Voucher';
|
||||
$_L['Voucher_Activation'] = 'Aktivasi Voucher';
|
||||
$_L['List_Activated_Voucher'] = 'Daftar Voucher yang Diaktifkan';
|
||||
$_L['Enter_Voucher_Code'] = 'Masukkan kode voucher di sini';
|
||||
$_L['Private_Message'] = 'Pesan Pribadi';
|
||||
$_L['Inbox'] = 'Kotak Masuk';
|
||||
$_L['Outbox'] = 'Kotak Keluar';
|
||||
$_L['Compose'] = 'Menyusun';
|
||||
$_L['Send_to'] = 'Kirim ke';
|
||||
$_L['Title'] = 'Judul';
|
||||
$_L['Message'] = 'Pesan';
|
||||
$_L['Account_Information'] = 'Informasi Akun Anda';
|
||||
$_L['Welcome_Text_User'] = 'Selamat datang di Member Panel, disini Anda dapat mengetahui:';
|
||||
$_L['Welcome_Text_Admin'] = '<b>PHPNuxBill</b> adalah sebuah aplikasi billing Hotspot dan PPPOE untuk Mikrotik dengan menggunakan bahasa pemograman PHP dan menggunakan API Mikrotik sebagai komunikasi dengan router. Jika aplikasi ini sangat berguna bagi bisnis Anda silahkan Anda donasi berapapun.<br>Pantau proyek <a href="https://github.com/hotspotbilling/phpnuxbill" target="_blank">disini</a>';
|
||||
$_L['Welcome_Text_User'] = 'Selamat datang di halaman Anggota Panel, di halaman ini Anda dapat:';
|
||||
$_L['Welcome_Text_Admin'] = '<b>PHPNuxBill</b> adalah penagihan Hotspot dan PPPoE untuk Mikrotik menggunakan PHP dan Mikrotik API untuk berkomunikasi dengan router. Jika Anda mendapat lebih banyak keuntungan dengan aplikasi ini, silakan berdonasi kepada kami.<br>Tonton proyek <a href="https://github.com/hotspotbilling/phpnuxbill" target="_blank">Disini</a>';
|
||||
|
||||
//update
|
||||
$_L['Invalid_Username_or_Password'] = 'Username atau Password Salah';
|
||||
$_L['Do_Not_Access'] = 'Anda tidak diijinkan untuk mengakses halaman ini';
|
||||
$_L['Incorrect_Current_Password'] = 'Password Saat ini Salah';
|
||||
$_L['Password_Changed_Successfully'] = 'Berhasil mengganti password, Silahkan login kembali';
|
||||
$_L['All_field_is_required'] = 'Semua bidang wajib di isi';
|
||||
$_L['Voucher_Not_Valid'] = 'Voucher Tidak Benar';
|
||||
$_L['Activation_Vouchers_Successfully'] = 'Berhasil melakukan aktivasi Voucher.';
|
||||
$_L['Data_Not_Found'] = 'Data tidak ditemukan';
|
||||
$_L['Search_by_Username'] = 'Cari berdasarkan Username';
|
||||
$_L['Invalid_Username_or_Password'] = 'Nama pengguna dan kata sandi salah';
|
||||
$_L['Do_Not_Access'] = 'Anda tidak memiliki izin untuk mengakses halaman ini';
|
||||
$_L['Incorrect_Current_Password'] = 'Kata Sandi Saat Ini Salah';
|
||||
$_L['Password_Changed_Successfully'] = 'Kata sandi berhasil diubah, Silakan login kembali';
|
||||
$_L['All_field_is_required'] = 'Semua bidang wajib diisi';
|
||||
$_L['Voucher_Not_Valid'] = 'Voucher Tidak Berlaku';
|
||||
$_L['Activation_Vouchers_Successfully'] = 'Aktivasi Voucher Berhasil';
|
||||
$_L['Data_Not_Found'] = 'Data Tidak Ditemukan';
|
||||
$_L['Search_by_Username'] = 'Cari berdasarkan Nama Pengguna';
|
||||
$_L['Search_by_Name'] = 'Cari berdasarkan Nama';
|
||||
$_L['Search_by_Code'] = 'Cari Kode Voucher';
|
||||
$_L['Search'] = 'Pencarian';
|
||||
$_L['Select_Customer'] = 'Pilih Member';
|
||||
$_L['Select_Routers'] = 'Pilih Routers';
|
||||
$_L['Search_by_Code'] = 'Cari berdasarkan Kode Voucher';
|
||||
$_L['Search'] = 'Mencari';
|
||||
$_L['Select_Customer'] = 'Pilih pelanggan';
|
||||
$_L['Select_Routers'] = 'Pilih Router';
|
||||
$_L['Select_Plans'] = 'Pilih Paket';
|
||||
$_L['Select_Pool'] = 'Pilih Pool';
|
||||
$_L['Hrs'] = 'Jam';
|
||||
$_L['Mins'] = 'Menit';
|
||||
$_L['Days'] = 'Hari';
|
||||
$_L['Months'] = 'Bulan';
|
||||
$_L['Add_Language'] = 'Tambah Bahasa';
|
||||
|
||||
$_L['Add_Language'] = 'Tambahkan Bahasa';
|
||||
$_L['Name_Lang'] = 'Nama Bahasa';
|
||||
$_L['Folder_Lang'] = 'Nama Folder';
|
||||
$_L['Translator'] = 'Translator';
|
||||
$_L['Lang_already_exist'] = 'Nama bahasa sudah ada';
|
||||
$_L['Translator'] = 'Penerjemah';
|
||||
$_L['Lang_already_exist'] = 'Nama Bahasa Sudah Ada';
|
||||
|
||||
$_L['Payment_Gateway'] = 'Payment Gateway';
|
||||
$_L['Community'] = 'Community';
|
||||
$_L['1_user_can_be_used_for_many_devices'] = '1 user can be used for many devices?';
|
||||
$_L['Cannot_be_change_after_saved'] = 'Cannot be change after saved';
|
||||
$_L['Payment_Gateway'] = 'Gerbang Pembayaran';
|
||||
$_L['Community'] = 'Komunitas';
|
||||
$_L['1_user_can_be_used_for_many_devices'] = '1 pengguna bisa digunakan untuk banyak perangkat?';
|
||||
$_L['Cannot_be_change_after_saved'] = 'Tidak dapat diubah setelah disimpan';
|
||||
|
||||
$_L['Explain_Coverage_of_router'] = 'Jelaskan Cakupan wilayah hotspot';
|
||||
$_L['Name_of_Area_that_router_operated'] = 'Nama Lokasi/Wilayah Router beroperasi';
|
||||
$_L['Payment_Notification_URL_Recurring_Notification_URL_Pay_Account_Notification_URL'] = 'Payment Notification URL, Recurring Notification URL, Pay Account Notification URL';
|
||||
$_L['Finish_Redirect_URL_Unfinish_Redirect_URL_Error_Redirect_URL'] = 'Finish Redirect URL, Unfinish Redirect URL, Error Redirect URL';
|
||||
$_L['Explain_Coverage_of_router'] = 'Jelaskan Cakupan router';
|
||||
$_L['Name_of_Area_that_router_operated'] = 'Nama area tempat router dioperasikan';
|
||||
$_L['Payment_Notification_URL_Recurring_Notification_URL_Pay_Account_Notification_URL'] = 'URL Notifikasi Pembayaran, URL Notifikasi Berulang, URL Notifikasi Akun Bayar';
|
||||
$_L['Finish_Redirect_URL_Unfinish_Redirect_URL_Error_Redirect_URL'] = 'Selesaikan URL Pengalihan, Selesaikan URL Pengalihan, URL Pengalihan Kesalahan';
|
||||
$_L['Status'] = 'Status';
|
||||
$_L['Plan_Not_found'] = 'Paket tidak ditemukan';
|
||||
$_L['Failed_to_create_transaction'] = 'Gagal Membuat Transaksi.';
|
||||
$_L['Seller_has_not_yet_setup_Xendit_payment_gateway'] = 'Admin belum mengaktifkan pembayarana melalui Xendit';
|
||||
$_L['Admin_has_not_yet_setup_Xendit_payment_gateway_please_tell_admin'] = 'Admin belum mengaktifkan pembayaran Xendit, Mohon beritahu dmin';
|
||||
$_L['Buy_this_your_active_package_will_be_overwrite'] = 'Beli? Paket yang aktif akan dinonaktifkan';
|
||||
$_L['You_already_have_unpaid_transaction_cancel_it_or_pay_it'] = 'Anda masih memiliki transaksi yang belum dibayar, Bayar atau Batalkan.';
|
||||
$_L['Transaction_Not_found'] = 'Transaksi tidak ditemukan';
|
||||
$_L['Cancel_it'] = 'Batalkan?';
|
||||
$_L['expired'] = 'Kadaluarsa';
|
||||
$_L['Check_for_Payment'] = 'Cek Pembayaran';
|
||||
$_L['Transaction_still_unpaid'] = 'Transaksi Belum dibayar.';
|
||||
$_L['Paid_Date'] = 'Tanggal Bayar';
|
||||
$_L['Plan_Not_found'] = 'Paket Tidak ditemukan';
|
||||
$_L['Failed_to_create_transaction'] = 'Gagal membuat transaksi.';
|
||||
$_L['Seller_has_not_yet_setup_Xendit_payment_gateway'] = 'Penjual belum menyiapkan gateway pembayaran Xendit';
|
||||
$_L['Admin_has_not_yet_setup_Xendit_payment_gateway_please_tell_admin'] = 'Admin belum menyiapkan gerbang pembayaran Xendit, mohon beritahu admin';
|
||||
$_L['Buy_this_your_active_package_will_be_overwrite'] = 'Beli ini? Paket aktif Anda akan ditimpa';
|
||||
$_L['You_already_have_unpaid_transaction_cancel_it_or_pay_it'] = 'Anda sudah memiliki transaksi yang belum dibayar, batalkan atau bayar.';
|
||||
$_L['Transaction_Not_found'] = 'Transaksi Tidak ditemukan';
|
||||
$_L['Cancel_it'] = 'Batalkan itu?';
|
||||
$_L['expired'] = 'kedaluwarsa';
|
||||
$_L['Check_for_Payment'] = 'Periksa Pembayaran';
|
||||
$_L['Transaction_still_unpaid'] = 'Transaksi masih belum dibayar.';
|
||||
$_L['Paid_Date'] = 'Tanggal Pembayaran';
|
||||
$_L['Transaction_has_been_paid'] = 'Transaksi telah dibayar.';
|
||||
$_L['PAID'] = 'LUNAS';
|
||||
$_L['CANCELED'] = 'BATAL';
|
||||
$_L['PAID'] = 'DIBAYAR';
|
||||
$_L['CANCELED'] = 'DIBATALKAN';
|
||||
$_L['UNPAID'] = 'BELUM DIBAYAR';
|
||||
$_L['PAY_NOW'] = 'BAYAR SEKARANG';
|
||||
$_L['Buy_Hotspot_Plan'] = 'Beli Paket Hotspot';
|
||||
$_L['Buy_PPOE_Plan'] = 'Beli Paket PPOE';
|
||||
$_L['Buy_PPOE_Plan'] = 'Beli Paket PPPoE';
|
||||
$_L['Package'] = 'Paket';
|
||||
$_L['Order_Internet_Package'] = 'Beli Paket Internet';
|
||||
$_L['Unknown_Command'] = 'Perintah tidak dikenal.';
|
||||
$_L['Checking_payment'] = 'Cek pembayaran';
|
||||
$_L['Create_Transaction_Success'] = 'Transaksi sukses dibuat';
|
||||
$_L['Order_Internet_Package'] = 'Pesan Paket Internet';
|
||||
$_L['Unknown_Command'] = 'Perintah Tidak Diketahui.';
|
||||
$_L['Checking_payment'] = 'Memeriksa pembayaran';
|
||||
$_L['Create_Transaction_Success'] = 'Transaksi Berhasil Dibuat';
|
||||
$_L['You_have_unpaid_transaction'] = 'Anda memiliki transaksi yang belum dibayar';
|
||||
$_L['TripayPayment_Channel'] = 'TripayPayment Channel';
|
||||
$_L['Payment_Channel'] = 'Payment Channel';
|
||||
$_L['Payment_check_failed'] = 'Gagal cek pembayaran.';
|
||||
$_L['Order_Package'] = 'Beli Paket';
|
||||
$_L['Transactions'] = 'Daftar Transaksi';
|
||||
$_L['TripayPayment_Channel'] = 'Saluran Pembayaran Tripay';
|
||||
$_L['Payment_Channel'] = 'Saluran Pembayaran';
|
||||
$_L['Payment_check_failed'] = 'Pemeriksaan pembayaran gagal.';
|
||||
$_L['Order_Package'] = 'Pesan Paket';
|
||||
$_L['Transactions'] = 'Transaksi';
|
||||
$_L['Payments'] = 'Pembayaran';
|
||||
$_L['History'] = 'Riwayat';
|
||||
$_L['Order_History'] = 'Riwayat Pembelian';
|
||||
$_L['Gateway'] = 'Gateway';
|
||||
$_L['Order_History'] = 'Riwayat Pesanan';
|
||||
$_L['Gateway'] = 'Gerbang';
|
||||
$_L['Date_Done'] = 'Tanggal Selesai';
|
||||
$_L['Unpaid_Order'] = 'Pembelian belum dibayar';
|
||||
$_L['Payment_Gateway_Not_Found'] = 'Payment Gateway Tidak ditemukan';
|
||||
$_L['Payment_Gateway_saved_successfully'] = 'Payment Gateway telah disimpan';
|
||||
$_L['ORDER'] = 'BELI';
|
||||
$_L['Unpaid_Order'] = 'Pesanan Belum Dibayar';
|
||||
$_L['Payment_Gateway_Not_Found'] = 'Gerbang Pembayaran Tidak Ditemukan';
|
||||
$_L['Payment_Gateway_saved_successfully'] = 'Gerbang Pembayaran berhasil disimpan';
|
||||
$_L['ORDER'] = 'MEMESAN';
|
||||
$_L['Package_History'] = 'Riwayat Paket';
|
||||
$_L['Buy_History'] = 'Riwayat Pembelian';
|
||||
$_L['Buy_History'] = 'Riwayat Beli';
|
||||
$_L['Activation_History'] = 'Riwayat Aktivasi';
|
||||
$_L['Buy_Package'] = 'Beli Paket';
|
||||
$_L['Email'] = 'Email';
|
||||
$_L['Company_Footer'] = 'Company Footer';
|
||||
$_L['Will_show_below_user_pages'] = 'Akan muncul di bawah halaman pelanggan';
|
||||
$_L['Request_OTP'] = 'Meminta kode OTP';
|
||||
$_L['Email'] = 'Surel';
|
||||
$_L['Company_Footer'] = 'Catatan Kaki Perusahaan';
|
||||
$_L['Will_show_below_user_pages'] = 'Akan ditampilkan di bawah halaman pengguna';
|
||||
$_L['Request_OTP'] = 'Minta OTP';
|
||||
$_L['Verification_Code'] = 'Kode Verifikasi';
|
||||
$_L['SMS_Verification_Code'] = 'Kode Verifikasi SMS';
|
||||
$_L['Please_enter_your_email_address'] = 'Masukkan alamat email';
|
||||
$_L['Failed_to_create_Paypal_transaction'] = 'gagal membuat transaksi Paypal';
|
||||
$_L['Please_enter_your_email_address'] = 'Silakan masukkan alamat email Anda';
|
||||
$_L['Failed_to_create_Paypal_transaction'] = 'Gagal membuat transaksi Paypal.';
|
||||
$_L['Plugin'] = 'Plugin';
|
||||
$_L['Plugin_Manager'] = 'Plugin Manager';
|
||||
$_L['User_Notification'] = 'Notifikasi Pelanggan';
|
||||
$_L['Expired_Notification'] = 'Notifikasi Kadaluarsa';
|
||||
$_L['User_will_get_notification_when_package_expired'] = 'Pelanggan akan mendapatkan Notifikasi jika paket kadaluarsa';
|
||||
$_L['Expired_Notification_Message'] = 'Pesan jika paket kadaluarsa';
|
||||
$_L['bnameb_will_be_replaced_with_Customer_Name_bpackageb_will_be_replaced_with_Package_name'] = '<b>[[name]]</b> akan diganti dengan nama konsumen. <b>[[package]]</b> akan diganti dengan nama paket internet.';
|
||||
$_L['Plugin_Manager'] = 'Manajer Plugin';
|
||||
$_L['User_Notification'] = 'Pemberitahuan Pelanggan';
|
||||
$_L['Expired_Notification'] = 'Pemberitahuan Kedaluarsa';
|
||||
$_L['User_will_get_notification_when_package_expired'] = 'Pengguna akan mendapat notifikasi ketika paket sudah habis masa berlakunya';
|
||||
$_L['Expired_Notification_Message'] = 'Pesan Pemberitahuan Kedaluwarsa';
|
||||
$_L['bnameb_will_be_replaced_with_Customer_Name_bpackageb_will_be_replaced_with_Package_name'] = '<b>[[name]]</b> akan diganti dengan Nama pelanggan. <b>[[package]]</b> akan diganti dengan nama paket.';
|
||||
$_L['Payment_Notification'] = 'Notifikasi Pembayaran';
|
||||
$_L['User_will_get_invoice_notification_when_buy_package_or_package_refilled'] = 'Pelanggan akan mendapatkan Notifikasi pembayaran setelah melakukan pembelian paket';
|
||||
$_L['Current_IP'] = 'IP anda';
|
||||
$_L['Current_MAC'] = 'MAC anda';
|
||||
$_L['Login_Status'] = 'Status Internet';
|
||||
$_L['Login_Request_successfully'] = 'Sukses melakukan menyalakan koneksi internet';
|
||||
$_L['Logout_Request_successfully'] = 'Sukses melakukan pemutusan koneksi internet';
|
||||
$_L['Disconnect_Internet'] = 'Putuskan Internet?';
|
||||
$_L['Not_Online_Login_now'] = 'Internet mati, Nyalakan?';
|
||||
$_L['You_are_Online_Logout'] = 'Internet hidup, Putuskan?';
|
||||
$_L['Connect_to_Internet'] = 'Koneksikan internet?';
|
||||
$_L['Your_account_not_connected_to_internet'] = 'Akun tidak terkoneksi dengan internet';
|
||||
$_L['Balance'] = 'Saldo';
|
||||
$_L['Balance_System'] = 'Sistem Saldo';
|
||||
$_L['Enable_System'] = 'Aktifkan Saldo';
|
||||
$_L['Allow_Transfer'] = 'Bolehkan Transfer';
|
||||
$_L['Telegram_Notification'] = 'Telegram Notification';
|
||||
$_L['SMS_OTP_Registration'] = 'SMS OTP Registration';
|
||||
$_L['Whatsapp_Notification'] = 'Whatsapp Notification';
|
||||
$_L['Tawkto_Chat_Widget'] = 'Tawk.to Chat Widget';
|
||||
$_L['Invoice'] = 'Invoice';
|
||||
$_L['Country_Code_Phone'] = 'Kode Negara Telepon';
|
||||
$_L['Voucher_activation_menu_will_be_hidden'] = 'Info Pembelian Voucher dan Redeem akan disembunyikan';
|
||||
$_L['Customer_can_deposit_money_to_buy_voucher'] = 'Pelanggan dapat topup saldo untuk langganan Internet';
|
||||
$_L['Allow_balance_transfer_between_customers'] = 'Bolehkan transfer saldo antar pelanggan';
|
||||
$_L['Refill_Balance'] = 'Refill Balance';
|
||||
$_L['Balance_Plans'] = 'Balance Plans';
|
||||
$_L['Expired_IP_Pool'] = 'Expired IP Pool';
|
||||
$_L['Company_Logo'] = 'Company Logo';
|
||||
$_L['Disable_Voucher'] = 'Disable Voucher';
|
||||
$_L['Minimum_Balance_Transfer'] = 'Minimum Balance Transfer';
|
||||
$_L['Reminder_Notification'] = 'Reminder Notification';
|
||||
$_L['Invoice_Footer'] = 'Invoice Footer';
|
||||
$_L['User_will_get_invoice_notification_when_buy_package_or_package_refilled'] = 'Pengguna akan mendapatkan notifikasi invoice saat membeli paket atau isi ulang paket';
|
||||
$_L['Current_IP'] = 'IP saat ini';
|
||||
$_L['Current_MAC'] = 'MAC saat ini';
|
||||
$_L['Login_Status'] = 'Status Masuk';
|
||||
$_L['Login_Request_successfully'] = 'Permintaan Masuk berhasil';
|
||||
$_L['Logout_Request_successfully'] = 'Permintaan Keluar berhasil';
|
||||
$_L['Disconnect_Internet'] = 'Putuskan sambungan Internet?';
|
||||
$_L['Not_Online_Login_now'] = 'Tidak , Masuk sekarang?';
|
||||
$_L['You_are_Online_Logout'] = 'Kamu sedang aktif, ingin keluar?';
|
||||
$_L['Connect_to_Internet'] = 'Hubungkan ke Internet?';
|
||||
$_L['Your_account_not_connected_to_internet'] = 'Akun Anda tidak terhubung ke internet';
|
||||
|
||||
$_L['Reminder_7_days'] = 'Reminder 7 days';
|
||||
$_L['Reminder_3_days'] = 'Reminder 3 days';
|
||||
$_L['Reminder_1_day'] = 'Reminder 1 day';
|
||||
$_L['PPPOE_Password'] = 'PPPOE Password';
|
||||
$_L['User_Cannot_change_this_only_admin_if_it_Empty_it_will_use_user_password'] = 'User Cannot change this, only admin. if it Empty it will use user password';
|
||||
$_L['Invoice_Balance_Message'] = 'Invoice Balance Message';
|
||||
$_L['Invoice_Notification_Payment'] = 'Invoice Notification Payment';
|
||||
$_L['Balance_Notification_Payment'] = 'Balance Notification Payment';
|
||||
$_L['Buy_Balance'] = 'Buy Balance?';
|
||||
$_L['Price'] = 'Price';
|
||||
$_L['Validity'] = 'Validity';
|
||||
$_L['Disable_auto_renewal'] = 'Disable auto renewal?';
|
||||
$_L['Auto_Renewal_On'] = 'Auto Renewal On';
|
||||
$_L['Enable_auto_renewal'] = 'Enable auto renewal?';
|
||||
$_L['Auto_Renewal_Off'] = 'Auto Renewal Off';
|
||||
$_L['Pay_With_Balance'] = 'Pay With Balance';
|
||||
$_L['Pay_this_with_Balance_your_active_package_will_be_overwrite'] = 'Pay this with Balance? your active package will be overwrite';
|
||||
$_L['Success_to_buy_package'] = 'Success to buy package';
|
||||
$_L['Auto_Renewal'] = 'Auto Renewal';
|
||||
$_L['View'] = 'View';
|
||||
$_L['Back'] = 'Back';
|
||||
$_L['Active'] = 'Active';
|
||||
$_L['Transfer_Balance'] = 'Transfer Balance';
|
||||
$_L['Send_your_balance'] = 'Send your balance?';
|
||||
$_L['Send'] = 'Send';
|
||||
$_L['Cannot_send_to_yourself'] = 'Cannot send to yourself';
|
||||
$_L['Sending_balance_success'] = 'Sending balance success';
|
||||
$_L['From'] = 'From';
|
||||
$_L['To'] = 'To';
|
||||
$_L['insufficient_balance'] = 'insufficient balance';
|
||||
$_L['Send_Balance'] = 'Send Balance';
|
||||
$_L['Received_Balance'] = 'Received Balance';
|
||||
$_L['Minimum_Transfer'] = 'Minimum Transfer';
|
||||
$_L['Proxy'] = 'Proxy';
|
||||
$_L['Proxy_Server'] = 'Proxy Server';
|
||||
$_L['Proxy_Server_Login'] = 'Proxy Server Login';
|
||||
$_L['Hotspot_Plan'] = 'Hotspot Plan';
|
||||
$_L['PPPOE_Plan'] = 'PPPOE Plan';
|
||||
$_L['UNKNOWN'] = 'UNKNOWN';
|
||||
$_L['Are_You_Sure'] = 'Are You Sure?';
|
||||
$_L['Success_to_send_package'] = 'Success to send package';
|
||||
$_L['Target_has_active_plan_different_with_current_plant'] = 'Target has active plan, different with current plant.';
|
||||
$_L['Recharge_a_friend'] = 'Recharge a friend';
|
||||
$_L['Buy_for_friend'] = 'Buy for friend';
|
||||
$_L['Buy_this_for_friend_account'] = 'Buy this for friend account?';
|
||||
$_L['Review_package_before_recharge'] = 'Review package before recharge';
|
||||
$_L['Activate'] = 'Activate';
|
||||
$_L['Deactivate'] = 'Deactivate';
|
||||
$_L['Sync'] = 'Sync';
|
||||
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
||||
$_L['Location'] = 'Location';
|
||||
$_L['Failed_to_create_transaction_'] = 'Gagal membuat transaksi. ';
|
||||
$_L['Failed_to_check_status_transaction_'] = 'Gagal memeriksa status transaksi. ';
|
||||
$_L['Disable_Voucher'] = 'Nonaktifkan Voucher';
|
||||
$_L['Balance'] = 'Saldo';
|
||||
$_L['Balance_System'] = 'Saldo Sistem';
|
||||
$_L['Enable_System'] = 'Aktifkan Sistem';
|
||||
$_L['Allow_Transfer'] = 'Izinkan Transfer';
|
||||
$_L['Telegram_Notification'] = 'Pemberitahuan Telegram';
|
||||
$_L['SMS_OTP_Registration'] = 'Pendaftaran SMS OTP';
|
||||
$_L['Whatsapp_Notification'] = 'Pemberitahuan WhatsApp';
|
||||
$_L['Tawkto_Chat_Widget'] = 'Widget Obrolan Tawk.to';
|
||||
$_L['Invoice'] = 'Faktur';
|
||||
$_L['Country_Code_Phone'] = 'Kode Negara Telepon';
|
||||
$_L['Voucher_activation_menu_will_be_hidden'] = 'Menu aktivasi voucher akan disembunyikan';
|
||||
$_L['Customer_can_deposit_money_to_buy_voucher'] = 'Pelanggan dapat menyetor uang untuk membeli voucher';
|
||||
$_L['Allow_balance_transfer_between_customers'] = 'Izinkan transfer saldo antar pelanggan';
|
||||
$_L['Reminder_Notification'] = 'Pemberitahuan Pengingat';
|
||||
$_L['Reminder_Notification_Message'] = 'Pesan Pemberitahuan Pengingat';
|
||||
$_L['Reminder_7_days'] = 'Pengingat 7 hari';
|
||||
$_L['Reminder_3_days'] = 'Pengingat 3 hari';
|
||||
$_L['Reminder_1_day'] = 'Pengingat 1 hari';
|
||||
$_L['PPPOE_Password'] = 'Kata sandi PPPoE';
|
||||
$_L['User_Cannot_change_this_only_admin_if_it_Empty_it_will_use_user_password'] = 'Pelanggan tidak dapat mengubah ini, hanya Admin. Jika kosong maka akan menggunakan kata sandi pelanggan';
|
||||
$_L['Invoice_Balance_Message'] = 'Faktur Pesan Saldo';
|
||||
$_L['Invoice_Notification_Payment'] = 'Faktur Pemberitahuan Pembayaran';
|
||||
$_L['Balance_Notification_Payment'] = 'Saldo Pemberitahuan Pembayaran';
|
||||
$_L['Balance_Plans'] = 'Paket Saldo';
|
||||
$_L['Buy_Balance'] = 'Beli Saldo';
|
||||
$_L['Price'] = 'Harga';
|
||||
$_L['Validity'] = 'Waktu';
|
||||
$_L['Disable_auto_renewal'] = 'Nonaktifkan perpanjangan otomatis?';
|
||||
$_L['Auto_Renewal_On'] = 'Perpanjangan Otomatis Aktif';
|
||||
$_L['Enable_auto_renewal'] = 'Aktifkan perpanjangan otomatis?';
|
||||
$_L['Auto_Renewal_Off'] = 'Perpanjangan Otomatis Mati';
|
||||
$_L['Refill_Balance'] = 'Isi Ulang Saldo';
|
||||
$_L['Invoice_Footer'] = 'Catatan Kaki Faktur';
|
||||
$_L['Pay_With_Balance'] = 'Bayar dengan Saldo';
|
||||
$_L['Pay_this_with_Balance_your_active_package_will_be_overwrite'] = 'Bayar ini dengan Saldo? Paket aktif Anda akan ditimpa';
|
||||
$_L['Success_to_buy_package'] = 'Berhasil membeli paket';
|
||||
$_L['Auto_Renewal'] = 'Perpanjangan otomatis';
|
||||
$_L['View'] = 'Melihat';
|
||||
$_L['Back'] = 'Kembali';
|
||||
$_L['Active'] = 'Aktif';
|
||||
$_L['Transfer_Balance'] = 'Kirim Saldo';
|
||||
$_L['Send_your_balance'] = 'Kirim saldo Anda?';
|
||||
$_L['Send'] = 'Kirim';
|
||||
$_L['Cannot_send_to_yourself'] = 'Tidak dapat mengirim ke diri Anda sendiri';
|
||||
$_L['Sending_balance_success'] = 'Berhasil mengirim saldo';
|
||||
$_L['From'] = 'Dari';
|
||||
$_L['To'] = 'Ke';
|
||||
$_L['insufficient_balance'] = 'Saldo tidak mencukupi';
|
||||
$_L['Send_Balance'] = 'Kirim Saldo';
|
||||
$_L['Received_Balance'] = 'Saldo yang Diterima';
|
||||
$_L['Minimum_Balance_Transfer'] = 'Minimal Transfer Saldo';
|
||||
$_L['Minimum_Transfer'] = 'Minimal Transfer';
|
||||
$_L['Company_Logo'] = 'Logo Perusahaan';
|
||||
$_L['Expired_IP_Pool'] = 'IP Pool Kedaluwarsa';
|
||||
$_L['Proxy'] = 'Proksi';
|
||||
$_L['Proxy_Server'] = 'Server Proksi';
|
||||
$_L['Proxy_Server_Login'] = 'Masuk Server Proksi';
|
||||
$_L['Hotspot_Plan'] = 'Paket Hotspot';
|
||||
$_L['PPPOE_Plan'] = 'Paket PPPoE';
|
||||
$_L['UNKNOWN'] = 'TIDAK DIKENAL';
|
||||
$_L['Are_You_Sure'] = 'Apa kamu yakin?';
|
||||
$_L['Success_to_send_package'] = 'Berhasil mengirim paket';
|
||||
$_L['Target_has_active_plan_different_with_current_plant'] = 'Target mempunyai paket aktif, berbeda dengan paket saat ini.';
|
||||
$_L['Recharge_a_friend'] = 'Isi ulang teman';
|
||||
$_L['Buy_for_friend'] = 'Beli untuk teman';
|
||||
$_L['Buy_this_for_friend_account'] = 'Beli ini untuk akun teman?';
|
||||
$_L['Review_package_before_recharge'] = 'Tinjau paket sebelum mengisi ulang';
|
||||
$_L['Activate'] = 'Mengaktifkan Paket';
|
||||
$_L['Deactivate'] = 'Menonaktifkan Paket';
|
||||
$_L['Sync'] = 'Sinkronisasi';
|
||||
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Gagal membuat transaksi PaymeTrust.';
|
||||
$_L['Location'] = 'Lokasi';
|
||||
$_L['Radius_Plans'] = 'Paket Radius';
|
||||
$_L['Change_title_in_user_Plan_order'] = 'Ubah judul dalam urutan paket pelanggan';
|
||||
$_L['Logs'] = 'Log';
|
||||
$_L['Voucher_Format'] = 'Format Voucher';
|
||||
$_L['Resend_To_Customer'] = 'Kirim Ulang Ke Pelanggan';
|
||||
$_L['Service_Type'] = 'Service Type';
|
||||
$_L['Others'] = 'Lainnya';
|
||||
$_L['PPPoE'] = 'PPPoE';
|
||||
$_L['Hotspot'] = 'Hotspot';
|
@ -354,7 +354,7 @@ $_L['User_Cannot_change_this_only_admin_if_it_Empty_it_will_use_user_password']
|
||||
$_L['Invoice_Balance_Message'] = 'Invoice Balance Message';
|
||||
$_L['Invoice_Notification_Payment'] = 'Invoice Notification Payment';
|
||||
$_L['Balance_Notification_Payment'] = 'Balance Notification Payment';
|
||||
$_L['Buy_Balance'] = 'Buy Balance?';
|
||||
$_L['Buy_Balance'] = 'Buy Balance';
|
||||
$_L['Price'] = 'Price';
|
||||
$_L['Validity'] = 'Validity';
|
||||
$_L['Disable_auto_renewal'] = 'Disable auto renewal?';
|
||||
@ -401,3 +401,8 @@ $_L['Deactivate'] = 'Deactivate';
|
||||
$_L['Sync'] = 'Sync';
|
||||
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
||||
$_L['Location'] = 'Location';
|
||||
$_L['Voucher_Format'] = 'Voucher Format';
|
||||
$_L['Service_Type'] = 'Service Type';
|
||||
$_L['Others'] = 'Others';
|
||||
$_L['PPPoE'] = 'PPPoE';
|
||||
$_L['Hotspot'] = 'Hotspot';
|
@ -330,7 +330,7 @@ $_L['Invoice_Balance_Message'] = 'Invoice Balance Message';
|
||||
$_L['Invoice_Notification_Payment'] = 'Invoice Notification Payment';
|
||||
$_L['Balance_Notification_Payment'] = 'Balance Notification Payment';
|
||||
$_L['Balance_Plans'] = 'Balance Plans';
|
||||
$_L['Buy_Balance'] = 'Buy Balance?';
|
||||
$_L['Buy_Balance'] = 'Buy Balance';
|
||||
$_L['Price'] = 'Price';
|
||||
$_L['Validity'] = 'Validity';
|
||||
$_L['Disable_auto_renewal'] = 'Disable auto renewal?';
|
||||
@ -378,3 +378,8 @@ $_L['Deactivate'] = 'Deactivate';
|
||||
$_L['Sync'] = 'Sync';
|
||||
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
||||
$_L['Location'] = 'Location';
|
||||
$_L['Voucher_Format'] = 'Voucher Format';
|
||||
$_L['Service_Type'] = 'Service Type';
|
||||
$_L['Others'] = 'Others';
|
||||
$_L['PPPoE'] = 'PPPoE';
|
||||
$_L['Hotspot'] = 'Hotspot';
|
@ -32,5 +32,11 @@
|
||||
],
|
||||
"2023.10.1" : [
|
||||
"ALTER TABLE `tbl_plans` ADD `is_radius` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '1 is radius' AFTER `routers`; "
|
||||
],
|
||||
"2023.10.24" : [
|
||||
"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`;"
|
||||
]
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['App_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" required class="form-control" id="company" name="company"
|
||||
<input type="text" required class="form-control" id="CompanyName" name="CompanyName"
|
||||
value="{$_c['CompanyName']}">
|
||||
</div>
|
||||
<span class="help-block col-md-4">{$_L['App_Name_Help_Text']}</span>
|
||||
@ -34,7 +34,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Company Footer')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" required class="form-control" id="footer" name="footer"
|
||||
<input type="text" required class="form-control" id="CompanyFooter" name="CompanyFooter"
|
||||
value="{$_c['CompanyFooter']}">
|
||||
</div>
|
||||
<span class="help-block col-md-4">{Lang::T('Will show below user pages')}</span>
|
||||
@ -54,17 +54,37 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Theme</label>
|
||||
<div class="col-md-6">
|
||||
<select name="theme" id="theme" class="form-control">
|
||||
<option value="default" {if $_c['theme'] eq 'default'}selected="selected" {/if}>Default</option>
|
||||
{foreach $themes as $theme}
|
||||
<option value="{$theme}" {if $_c['theme'] eq $theme}selected="selected" {/if}>{Lang::ucWords($theme)}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4"><a href="https://github.com/hotspotbilling/phpnuxbill/wiki/Themes" target="_blank">Theme info</a></p>
|
||||
<label class="col-md-2 control-label">Theme</label>
|
||||
<div class="col-md-6">
|
||||
<select name="theme" id="theme" class="form-control">
|
||||
<option value="default" {if $_c['theme'] eq 'default'}selected="selected" {/if}>Default
|
||||
</option>
|
||||
{foreach $themes as $theme}
|
||||
<option value="{$theme}" {if $_c['theme'] eq $theme}selected="selected" {/if}>
|
||||
{Lang::ucWords($theme)}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4"><a
|
||||
href="https://github.com/hotspotbilling/phpnuxbill/wiki/Themes" target="_blank">Theme
|
||||
info</a></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">APP URL</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" readonly class="form-control" value="{$app_url}">
|
||||
</div>
|
||||
<p class="help-block col-md-4">edit at config.php</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-primary btn-xs" title="save" type="submit"><span
|
||||
class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span></button>
|
||||
</div>
|
||||
Voucher
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Disable Voucher')}</label>
|
||||
<div class="col-md-6">
|
||||
@ -78,24 +98,71 @@
|
||||
<p class="help-block col-md-4">{Lang::T('Voucher activation menu will be hidden')}</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">APP URL</label>
|
||||
<label class="col-md-2 control-label">{Lang::T('Voucher Format')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" readonly class="form-control" value="{$app_url}">
|
||||
<select name="voucher_format" id="voucher_format" class="form-control">
|
||||
<option value="up" {if $_c['voucher_format'] == 'up'}selected="selected" {/if}>UPPERCASE
|
||||
</option>
|
||||
<option value="low" {if $_c['voucher_format'] == 'low'}selected="selected" {/if}>
|
||||
lowercase
|
||||
</option>
|
||||
<option value="rand" {if $_c['voucher_format'] == 'rand'}selected="selected" {/if}>
|
||||
RaNdoM
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4">edit at config.php</p>
|
||||
<p class="help-block col-md-4">UPPERCASE lowercase RaNdoM</p>
|
||||
</div>
|
||||
{if $_c['disable_voucher'] != 'yes'}
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Disable Registration')}</label>
|
||||
<div class="col-md-6">
|
||||
<select name="disable_registration" id="disable_registration" class="form-control">
|
||||
<option value="no" {if $_c['disable_registration'] == 'no'}selected="selected" {/if}>No
|
||||
</option>
|
||||
<option value="yes" {if $_c['disable_registration'] == 'yes'}selected="selected" {/if}>
|
||||
Yes
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4">
|
||||
{Lang::T('Customer just Login with Phone number and Voucher Code, Voucher will be password')}
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Redirect after Activation</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="voucher_redirect" name="voucher_redirect"
|
||||
placeholder="https://192.168.88.1/status" value="{$voucher_redirect}">
|
||||
</div>
|
||||
<p class="help-block col-md-4">
|
||||
{Lang::T('After Customer activate voucher or login, customer will be redirected to this url')}
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-primary btn-xs" title="save" type="submit"><span
|
||||
class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span></button>
|
||||
</div>
|
||||
FreeRadius
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label text-muted">Enable Radius</label>
|
||||
<label class="col-md-2 control-label">Enable Radius</label>
|
||||
<div class="col-md-6">
|
||||
<select name="radius_enable" id="radius_enable" class="form-control text-muted">
|
||||
<option value="0">No</option>
|
||||
<option value="1" {if $_c['radius_enable']}selected="selected" {/if}>Yes</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4"><a href="https://github.com/hotspotbilling/phpnuxbill/wiki/FreeRadius" target="_blank">Radius Instructions</a></p>
|
||||
<p class="help-block col-md-4"><a
|
||||
href="https://github.com/hotspotbilling/phpnuxbill/wiki/FreeRadius"
|
||||
target="_blank">Radius Instructions</a></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label text-muted">Radius Client</label>
|
||||
<label class="col-md-2 control-label">Radius Client</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="radius_client" value="{$_c['radius_client']}">
|
||||
</div>
|
||||
@ -152,13 +219,13 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Telegram Bot Token</label>
|
||||
<div class="col-md-6">
|
||||
<input type="password" class="form-control" id="telegram_bot" name="telegram_bot" onmouseleave="this.type = 'password'"
|
||||
onmouseenter="this.type = 'text'"
|
||||
<input type="password" class="form-control" id="telegram_bot" name="telegram_bot"
|
||||
onmouseleave="this.type = 'password'" onmouseenter="this.type = 'text'"
|
||||
value="{$_c['telegram_bot']}" placeholder="123456:asdasgdkuasghddlashdashldhalskdklasd">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Telegram Target ID</label>
|
||||
<label class="col-md-2 control-label">Telegram User/Channel/Group ID</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="telegram_target_id" name="telegram_target_id"
|
||||
value="{$_c['telegram_target_id']}" placeholder="12345678">
|
||||
@ -185,6 +252,22 @@
|
||||
replaced.
|
||||
</p>
|
||||
</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
|
||||
href="https://wa.nux.my.id/login" target="_blank">Free Server</a></small>
|
||||
</div>
|
||||
@ -316,9 +399,9 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Proxy Server Login')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="password" class="form-control" id="http_proxyauth" name="http_proxyauth" autocomplete="off"
|
||||
value="{$_c['http_proxyauth']}" placeholder="username:password" onmouseleave="this.type = 'password'"
|
||||
onmouseenter="this.type = 'text'">
|
||||
<input type="password" class="form-control" id="http_proxyauth" name="http_proxyauth"
|
||||
autocomplete="off" value="{$_c['http_proxyauth']}" placeholder="username:password"
|
||||
onmouseleave="this.type = 'password'" onmouseenter="this.type = 'text'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -335,16 +418,16 @@
|
||||
add dst-host={$_domain}
|
||||
add dst-host=*.{$_domain}</pre>
|
||||
|
||||
<pre>
|
||||
<pre>
|
||||
# Expired Cronjob Every 5 Minutes
|
||||
*/5 * * * * cd {$dir} && {$php} cron.php
|
||||
|
||||
# Expired Cronjob Every 5 Minutes
|
||||
# Expired Cronjob Every 1 Hour
|
||||
0 * * * * cd {$dir} && {$php} cron.php
|
||||
</pre>
|
||||
<pre>
|
||||
<pre>
|
||||
# Reminder Cronjob Every 7 AM
|
||||
0 7 * * * cd {$dir} && {$php} reminder.php
|
||||
0 7 * * * cd {$dir} && {$php} cron_reminder.php
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,5 +1,8 @@
|
||||
{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="col-sm-6">
|
||||
<div class="box box-hovered mb20 box-primary">
|
||||
|
@ -72,6 +72,16 @@
|
||||
<textarea name="address" id="address" class="form-control"></textarea>
|
||||
</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="col-lg-offset-2 col-lg-10">
|
||||
|
@ -77,6 +77,16 @@
|
||||
<textarea name="address" id="address" class="form-control">{$d['address']}</textarea>
|
||||
</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="col-lg-offset-2 col-lg-10">
|
||||
|
@ -37,6 +37,9 @@
|
||||
onclick="this.select()">
|
||||
</li>
|
||||
{/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">
|
||||
<b>{Lang::T('Balance')}</b> <span class="pull-right">{Lang::moneyFormat($d['balance'])}</span>
|
||||
</li>
|
||||
@ -124,6 +127,7 @@
|
||||
{if Lang::arrayCount($activation)}
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$_L['Invoice']}</th>
|
||||
<th>{$_L['Username']}</th>
|
||||
<th>{$_L['Plan_Name']}</th>
|
||||
<th>{$_L['Plan_Price']}</th>
|
||||
@ -135,7 +139,8 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $activation as $ds}
|
||||
<tr>
|
||||
<tr onclick="window.location.href = '{$_url}prepaid/view/{$ds['id']}'" style="cursor:pointer;">
|
||||
<td>{$ds['invoice']}</td>
|
||||
<td>{$ds['username']}</td>
|
||||
<td>{$ds['plan_name']}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||
|
@ -33,6 +33,7 @@
|
||||
<th>{$_L['Phone_Number']}</th>
|
||||
<th>{$_L['Email']}</th>
|
||||
<th>{$_L['Package']}</th>
|
||||
<th>{Lang::T('Service Type')}</th>
|
||||
<th>{$_L['Created_On']}</th>
|
||||
<th>{$_L['Manage']}</th>
|
||||
</tr>
|
||||
@ -48,6 +49,7 @@
|
||||
<td align="center" api-get-text="{$_url}autoload/customer_is_active/{$ds['id']}">
|
||||
<span class="label label-default">•</span>
|
||||
</td>
|
||||
<td>{$ds['service_type']}</td>
|
||||
<td>{Lang::dateTimeFormat($ds['created_at'])}</td>
|
||||
<td align="center">
|
||||
<a href="{$_url}customers/view/{$ds['id']}" id="{$ds['id']}" style="margin: 0px;"
|
||||
|
@ -149,7 +149,7 @@
|
||||
$.getJSON("./version.json?" + Math.random(), function(data) {
|
||||
var localVersion = data.version;
|
||||
$('#version').html('Version: ' + localVersion);
|
||||
$.getJSON("https://raw.githubusercontent.com/ibnux/phpnuxbill/master/version.json?" + Math
|
||||
$.getJSON("https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/version.json?" + Math
|
||||
.random(),
|
||||
function(data) {
|
||||
var latestVersion = data.version;
|
||||
|
@ -1,41 +1,59 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel mb20 panel-primary">
|
||||
<div class="panel-heading">{$_L['Database_Status']}</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="col-md-9">{$_L['Total_Database_Size']}: {$dbsize} MB </div>
|
||||
<div class="col-md-3 text-right">
|
||||
<a href="{$_url}settings/dbbackup/" class="btn btn-primary btn-xs"><i class="fa fa-download"></i> {$_L['Download_Database_Backup']}</a>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50%">{$_L['Table_Name']}</th>
|
||||
<th>{$_L['Rows']}</th>
|
||||
<th>{$_L['Size']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $tables as $tbl}
|
||||
<tr>
|
||||
<td>{$tbl['name']}</td>
|
||||
<td>{$tbl['rows']}</td>
|
||||
<td>{$tbl['size']} Kb</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">Backup Database</div>
|
||||
<form method="post" action="{$_url}settings/dbbackup">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50%">{$_L['Table_Name']}</th>
|
||||
<th>{$_L['Rows']}</th>
|
||||
<th>Select</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $tables as $tbl}
|
||||
<tr>
|
||||
<td>{$tbl['name']}</td>
|
||||
<td>{$tbl['rows']}</td>
|
||||
<td><input type="checkbox" checked name="tables[]" value="{$tbl['name']}"></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">Dont select logs if it failed</div>
|
||||
<div class="col-md-4 text-right">
|
||||
<button type="submit" class="btn btn-primary btn-xs btn-block"><i
|
||||
class="fa fa-download"></i>
|
||||
{$_L['Download_Database_Backup']}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">Restore Database</div>
|
||||
<form method="post" action="{$_url}settings/dbrestore" enctype="multipart/form-data">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-7"><input type="file" name="json" accept="application/json"></div>
|
||||
<div class="col-md-5 text-right">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-xs"><i class="fa fa-upload"></i>
|
||||
Restore Dabase</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="panel-footer">Restoring database will clean up data and then restore all the data</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,9 +1,9 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<div class="col-md-6 col-sm-12 col-md-offset-3">
|
||||
<div class="panel panel-hovered panel-primary panel-stacked mb30">
|
||||
<div class="panel-heading">PRINT INVOICE</div>
|
||||
<div class="panel-heading">{$in['invoice']}</div>
|
||||
<div class="panel-body">
|
||||
<div class="well">
|
||||
<fieldset>
|
||||
@ -19,6 +19,7 @@
|
||||
{$_L['Type']} : <b>{$in['type']}</b><br>
|
||||
{$_L['Plan_Name']} : <b>{$in['plan_name']}</b><br>
|
||||
{$_L['Plan_Price']} : <b>{Lang::moneyFormat($in['price'])}</b><br>
|
||||
{$in['method']}<br>
|
||||
<br>
|
||||
{$_L['Username']} : <b>{$in['username']}</b><br>
|
||||
{$_L['Password']} : **********<br>
|
||||
@ -33,10 +34,12 @@
|
||||
</div>
|
||||
<form class="form-horizontal" method="post" action="{$_url}prepaid/print" target="_blank">
|
||||
<input type="hidden" name="id" value="{$in['id']}">
|
||||
<a href="{$_url}prepaid/list" class="btn btn-primary btn-sm"><i
|
||||
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>
|
||||
<a href="{$_url}prepaid/list" class="btn btn-primary"><i
|
||||
class="ion-reply-all"></i>{$_L['Finish']}</a>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="name" class="form-control" value="{$name}"
|
||||
<input type="text" name="q" class="form-control" value="{$q}"
|
||||
placeholder="{$_L['Search_by_Name']}...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
|
||||
@ -53,16 +53,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<nav aria-label="...">
|
||||
<ul class="pager">
|
||||
{if $page > 0}
|
||||
<li class="previous "><a href="{$_url}logs/radius/{$page-1}"><span
|
||||
aria-hidden="true">←</span> Newer</a></li>
|
||||
{/if}
|
||||
<li class="next"><a href="{$_url}logs/radius/{$page+1}">Older <span
|
||||
aria-hidden="true">→</span></a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{$paginator['contents']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="name" class="form-control" value="{$name}"
|
||||
<input type="text" name="q" class="form-control" value="{$q}"
|
||||
placeholder="{$_L['Search_by_Name']}...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
|
||||
|
@ -2,40 +2,61 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel mb20 panel-primary panel-hovered">
|
||||
<div class="panel-heading">{$pageHeader}</div>
|
||||
<div id="myNicPanel" style="width: 100%;"></div>
|
||||
<div id="panel-edit" class="panel-body">{$htmls}</div>
|
||||
<div class="panel-heading">
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-danger btn-xs" title="Reset File" href="{$_url}pages/{$PageFile}-reset" onclick="return confirm('Reset File?')"><span
|
||||
class="glyphicon glyphicon-refresh" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
{$pageHeader}
|
||||
</div>
|
||||
<div id="myNicPanel" style="width: 100%;"></div>
|
||||
<div id="panel-edit" class="panel-body">{$htmls}</div>
|
||||
{if $writeable}
|
||||
<div class="panel-footer">
|
||||
<a href="javascript:saveIt()" class="btn btn-primary btn-block">SAVE</a>
|
||||
<br>
|
||||
<p class="help-block">{$_L['Info_Page']}</p>
|
||||
<input type="text" class="form-control" onclick="this.select()" readonly value="{$app_url}/pages/{$PageFile}.html">
|
||||
<input type="text" class="form-control" onclick="this.select()" readonly
|
||||
value="{$app_url}/pages/{$PageFile}.html">
|
||||
</div>
|
||||
{else}
|
||||
<div class="panel-footer">
|
||||
{$_L['Failed_Save_Page']}
|
||||
</div>
|
||||
{/if}
|
||||
{if $PageFile=='Voucher'}
|
||||
<div class="panel-footer">
|
||||
<p class="help-block">
|
||||
<b>[[company_name]]</b> Your Company Name at Settings.<br>
|
||||
<b>[[price]]</b> Plan Price.<br>
|
||||
<b>[[voucher_code]]</b> Voucher Code.<br>
|
||||
<b>[[plan]]</b> Voucher Plan.<br>
|
||||
<b>[[counter]]</b> Counter.<br>
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="formpages" class="hidden" method="post" role="form" action="{$_url}pages/{$PageFile}-post" >
|
||||
<form id="formpages" class="hidden" method="post" role="form" action="{$_url}pages/{$PageFile}-post">
|
||||
<textarea name="html" id="html"></textarea>
|
||||
</form>
|
||||
<script src="ui/ui/scripts/nicEdit.js"></script>
|
||||
<script type="text/javascript">
|
||||
var myNicEditor
|
||||
bkLib.onDomLoaded(function() {
|
||||
myNicEditor = new nicEditor();
|
||||
myNicEditor.setPanel('myNicPanel');
|
||||
myNicEditor.addInstance('panel-edit');
|
||||
});
|
||||
function saveIt(){
|
||||
//alert(document.getElementById('panel-edit').innerHTML);
|
||||
document.getElementById('html').value = nicEditors.findEditor('panel-edit').getContent()
|
||||
document.getElementById('formpages').submit();
|
||||
}
|
||||
</script>
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
var myNicEditor
|
||||
bkLib.onDomLoaded(function() {
|
||||
myNicEditor = new nicEditor({fullPanel : true});
|
||||
myNicEditor.setPanel('myNicPanel');
|
||||
myNicEditor.addInstance('panel-edit');
|
||||
});
|
||||
|
||||
{include file="sections/footer.tpl"}
|
||||
function saveIt() {
|
||||
//alert(document.getElementById('panel-edit').innerHTML);
|
||||
document.getElementById('html').value = nicEditors.findEditor('panel-edit').getContent()
|
||||
document.getElementById('formpages').submit();
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
{include file="sections/footer.tpl"}
|
@ -23,7 +23,7 @@
|
||||
<select id="id_plan" name="id_plan" class="form-control select2">
|
||||
{foreach $p as $ps}
|
||||
<option value="{$ps['id']}" {if $d['plan_id'] eq $ps['id']} selected {/if}>
|
||||
{$ps['name_plan']}</option>
|
||||
{if $ps['is_radius']=='1'}Radius{else}{$ps['routers']}{/if} - {$ps['name_plan']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
|
@ -63,11 +63,13 @@
|
||||
<form method="post" action="{$_url}prepaid/print-voucher/" class="no-print">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="btn btn-default btn-sm">
|
||||
<tr>
|
||||
<td>ID > <input type="text" name="from_id" style="width:40px" value="{$from_id}"> limit <input
|
||||
type="text" name="limit" style="width:40px" value="{$limit}"></td>
|
||||
<td>From ID > <input type="text" name="from_id" style="width:40px" value="{$from_id}"> limit
|
||||
<input type="text" name="limit" style="width:40px" value="{$limit}"></td>
|
||||
<td>Voucher PerLine <input type="text" style="width:40px" name="vpl" value="{$vpl}">
|
||||
vouchers</td>
|
||||
<td>PageBreak after <input type="text" style="width:40px" name="pagebreak" value="{$pagebreak}">
|
||||
vouchers</td>
|
||||
<td>Plans <select id="plan_id" name="planid" style="width:150px">
|
||||
<td>Plans <select id="plan_id" name="planid" style="width:50px">
|
||||
<option value="0">--all--</option>
|
||||
{foreach $plans as $plan}
|
||||
<option value="{$plan['id']}" {if $plan['id']==$planid}selected{/if}>{$plan['name_plan']}
|
||||
@ -78,65 +80,31 @@
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<center><button type="button" id="actprint"
|
||||
<center><button type="button" onclick="window.print()"
|
||||
class="btn btn-default btn-sm no-print">{$_L['Click_Here_to_Print']}</button><br>
|
||||
{$_L['Print_Info']}<br>
|
||||
show {$v|@count} vouchers from {$vc} vouchers<br>
|
||||
from ID {$v[0]['id']} limit {$limit} vouchers
|
||||
</center>
|
||||
</form>
|
||||
<div id="printable">
|
||||
<div id="printable" align="center">
|
||||
<hr>
|
||||
{foreach $v as $vs}
|
||||
{$n = 1}
|
||||
{foreach $voucher as $vs}
|
||||
{$jml = $jml + 1}
|
||||
<table width="100%" height="200" border="0" cellspacing="0" cellpadding="1" style="margin-bottom:5px">
|
||||
<tbody>
|
||||
{if $n == 1}
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center" valign="middle"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td width="50%" valign="middle" style="padding-right:10px">
|
||||
<center><strong style="font-size:38px">{$_L['Voucher_Hotspot']}</strong><span
|
||||
class="no-print"> ID {$vs['id']}</span></center>
|
||||
<table width="100%" border="1" cellspacing="0" cellpadding="1"
|
||||
bordercolor="#757575">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="5" width="1"><img src="qrcode/?data={$vs['code']}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:25px">
|
||||
{Lang::moneyFormat($vs['price'])}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:20px">
|
||||
{$_L['Code_Voucher']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:25px">
|
||||
{$vs['code']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:15px">
|
||||
{$vs['name_plan']}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" style="padding-left:10px">
|
||||
{include file="$_path/../pages/Voucher.html"}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
{/if}
|
||||
<td>{$vs}</td>
|
||||
{if $n == $vpl}
|
||||
</table>
|
||||
{$n = 1}
|
||||
{else}
|
||||
{$n = $n + 1}
|
||||
{/if}
|
||||
|
||||
|
||||
{if $jml == $pagebreak}
|
||||
{$jml = 0}
|
||||
<!-- pageBreak -->
|
||||
|
@ -57,6 +57,18 @@
|
||||
<p class="help-block">{Lang::T('Explain Coverage of router')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"><a href="{$_url}routers/add">{$_L['Routers']}</a></label>
|
||||
<div class="col-md-6">
|
||||
<select id="routers" name="routers" class="form-control select2">
|
||||
<option value="">No Router</option>
|
||||
{foreach $routers as $rs}
|
||||
<option value="{$rs['name']}">{$rs['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4">Assign NAS to Router</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-primary waves-effect waves-light"
|
||||
|
@ -57,6 +57,19 @@
|
||||
<p class="help-block">{Lang::T('Explain Coverage of router')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"><a href="{$_url}routers/add">{$_L['Routers']}</a></label>
|
||||
<div class="col-md-6">
|
||||
<select id="routers" name="routers" class="form-control select2">
|
||||
<option value="">No Router</option>
|
||||
{foreach $routers as $rs}
|
||||
<option {if $rs['name'] == $d['routers']}selected{/if} value="{$rs['name']}">{$rs['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4">Assign NAS to Router</p>
|
||||
</div>
|
||||
<div class="form-gro
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-primary waves-effect waves-light"
|
||||
|
@ -38,6 +38,7 @@
|
||||
<th>Port</th>
|
||||
<th>Server</th>
|
||||
<th>Community</th>
|
||||
<th>Routers</th>
|
||||
<th>{$_L['Manage']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -51,6 +52,7 @@
|
||||
<td>{$ds['ports']}</td>
|
||||
<td>{$ds['server']}</td>
|
||||
<td>{$ds['community']}</td>
|
||||
<td>{$ds['routers']}</td>
|
||||
<td align="center">
|
||||
<a href="{$_url}radius/nas-edit/{$ds['id']}" class="btn btn-info btn-xs">{$_L['Edit']}</a>
|
||||
<a href="{$_url}radius/nas-delete/{$ds['id']}" id="{$ds['id']}"
|
||||
|
@ -22,10 +22,11 @@
|
||||
<hr>
|
||||
</div>
|
||||
{if isset($notify)}
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
{$notify}
|
||||
</div>
|
||||
<div class="alert alert-{if $notify_t == 's'}success{else}danger{/if}">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>{$notify}</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="row">
|
||||
|
@ -34,10 +34,11 @@
|
||||
<hr>
|
||||
</div>
|
||||
{if isset($notify)}
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
{$notify}
|
||||
</div>
|
||||
<div class="alert alert-{if $notify_t == 's'}success{else}danger{/if}">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>{$notify}</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="row">
|
||||
|
@ -22,10 +22,11 @@
|
||||
<hr>
|
||||
</div>
|
||||
{if isset($notify)}
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
{$notify}
|
||||
</div>
|
||||
<div class="alert alert-{if $notify_t == 's'}success{else}danger{/if}">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>{$notify}</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="row">
|
||||
|
70
ui/ui/reports-activation.tpl
Normal file
70
ui/ui/reports-activation.tpl
Normal file
@ -0,0 +1,70 @@
|
||||
{include file="sections/header.tpl"}
|
||||
<!-- pool -->
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-hovered mb20 panel-primary">
|
||||
<div class="panel-heading">
|
||||
Activity Log
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="text-center" style="padding: 15px">
|
||||
<div class="col-md-4">
|
||||
<form id="site-search" method="post" action="{$_url}reports/activation">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="q" class="form-control" value="{$q}"
|
||||
placeholder="{$_L['Invoice']}...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="table-responsive">
|
||||
<table id="datatable" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$_L['Invoice']}</th>
|
||||
<th>{$_L['Username']}</th>
|
||||
<th>{$_L['Plan_Name']}</th>
|
||||
<th>{$_L['Plan_Price']}</th>
|
||||
<th>{$_L['Type']}</th>
|
||||
<th>{$_L['Created_On']}</th>
|
||||
<th>{$_L['Expires_On']}</th>
|
||||
<th>{$_L['Method']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $activation as $ds}
|
||||
<tr>
|
||||
<td onclick="window.location.href = '{$_url}prepaid/view/{$ds['id']}'"
|
||||
style="cursor:pointer;">{$ds['invoice']}</td>
|
||||
<td onclick="window.location.href = '{$_url}customers/viewu/{$ds['username']}'"
|
||||
style="cursor:pointer;">{$ds['username']}</td>
|
||||
<td>{$ds['plan_name']}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||
<td>{$ds['type']}</td>
|
||||
<td class="text-success">
|
||||
{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}
|
||||
</td>
|
||||
<td class="text-danger">{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
|
||||
<td>{$ds['method']}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$paginator['contents']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="sections/footer.tpl"}
|
@ -38,8 +38,8 @@
|
||||
<div class="col-md-3">
|
||||
<img src="./ui/ui/images/error.png" class="img-responsive hidden-sm hidden-xs">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="box box-danger box-solid text-center">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-danger box-solid">
|
||||
|
||||
<section class="content-header">
|
||||
<h1 class="text-center">
|
||||
|
@ -183,6 +183,8 @@
|
||||
href="{$_url}reports/daily-report">{$_L['Daily_Report']}</a></li>
|
||||
<li {if $_routes[1] eq 'by-period'}class="active" {/if}><a
|
||||
href="{$_url}reports/by-period">{$_L['Period_Reports']}</a></li>
|
||||
<li {if $_routes[1] eq 'activation'}class="active" {/if}><a
|
||||
href="{$_url}reports/activation">{Lang::T('Activation History')}</a></li>
|
||||
{$_MENU_REPORTS}
|
||||
</ul>
|
||||
</li>
|
||||
@ -250,8 +252,8 @@
|
||||
href="{$_url}settings/notifications">{Lang::T('User Notification')}</a></li>
|
||||
<li {if $_routes[1] eq 'users'}class="active" {/if}><a
|
||||
href="{$_url}settings/users">{$_L['Administrator_Users']}</a></li>
|
||||
{* <li {if $_routes[1] eq 'dbstatus'}class="active" {/if}><a
|
||||
href="{$_url}settings/dbstatus">{$_L['Backup_Restore']}</a></li> *}
|
||||
<li {if $_routes[1] eq 'dbstatus'}class="active" {/if}><a
|
||||
href="{$_url}settings/dbstatus">{$_L['Backup_Restore']}</a></li>
|
||||
<li {if $_routes[0] eq 'pluginmanager'}class="active" {/if}>
|
||||
<a href="{$_url}pluginmanager">{Lang::T('Plugin Manager')}</a>
|
||||
</li>
|
||||
@ -301,4 +303,11 @@
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
{if isset($notify)}{$notify}{/if}
|
||||
{if isset($notify)}
|
||||
<div class="alert alert-{if $notify_t == 's'}success{else}danger{/if}">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>{$notify}</div>
|
||||
</div>
|
||||
{/if}
|
@ -125,6 +125,14 @@
|
||||
</li>
|
||||
{/if}
|
||||
{if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' }
|
||||
{if $_c['enable_balance'] == 'yes'}
|
||||
<li {if $_system_menu eq 'balance'}class="active" {/if}>
|
||||
<a href="{$_url}order/balance">
|
||||
<i class="ion ion-ios-cart"></i>
|
||||
<span>{Lang::T('Buy Balance')}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
<li {if $_system_menu eq 'package'}class="active" {/if}>
|
||||
<a href="{$_url}order/package">
|
||||
<i class="ion ion-ios-cart"></i>
|
||||
@ -157,4 +165,12 @@
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
{if isset($notify)}{$notify}{/if}
|
||||
|
||||
{if isset($notify)}
|
||||
<div class="alert alert-{if $notify_t == 's'}success{else}danger{/if}">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>{$notify}</div>
|
||||
</div>
|
||||
{/if}
|
@ -8,7 +8,7 @@
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{Lang::T('Unpaid Order')}</h3>
|
||||
</div>
|
||||
<table class="table table-condensed table-bordered table-striped table-hover">
|
||||
<table class="table table-condensed table-bordered table-striped table-hover" style="margin-bottom: 0px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{Lang::T('expired')}</td>
|
||||
@ -62,7 +62,8 @@
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{$_L['Account_Information']}</h3>
|
||||
</div>
|
||||
<table class="table table-bordered table-striped table-bordered table-hover">
|
||||
<table class="table table-bordered table-striped table-bordered table-hover mb-0"
|
||||
style="margin-bottom: 0px;">
|
||||
<tr>
|
||||
<td class="small text-success text-uppercase text-normal">{$_L['Username']}</td>
|
||||
<td class="small mb15">{$_user['username']}</td>
|
||||
@ -73,6 +74,11 @@
|
||||
style="width:100%; border: 0px;" onmouseleave="this.type = 'password'"
|
||||
onmouseenter="this.type = 'text'" onclick="this.select()"></td>
|
||||
</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'}
|
||||
<tr>
|
||||
<td class="small text-warning text-uppercase text-normal">{Lang::T('Balance')}</td>
|
||||
@ -88,84 +94,95 @@
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $_bill}
|
||||
</table>
|
||||
{if $_bills}
|
||||
{foreach $_bills as $_bill}
|
||||
{if $_bill['routers'] != 'radius'}
|
||||
<tr>
|
||||
<td class="small text-primary text-uppercase text-normal">{strtoupper(Lang::T('Location'))}</td>
|
||||
<td class="small mb15">{$_bill['routers']}</td>
|
||||
</tr>
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{$_bill['routers']}</h3>
|
||||
</div>
|
||||
{else}
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</h3>
|
||||
</div>
|
||||
{/if}
|
||||
<tr>
|
||||
<td class="small text-primary text-uppercase text-normal">{$_L['Plan_Name']}</td>
|
||||
<td class="small mb15">
|
||||
{$_bill['namebp']}
|
||||
{if $_bill['status'] == 'on'}
|
||||
<a class="label label-danger pull-right" href="{$_url}home&deactivate=1"
|
||||
onclick="return confirm('{Lang::T('Deactivate')}?')">{Lang::T('Deactivate')}</a>
|
||||
{else}
|
||||
<a class="label label-warning pull-right" href="{$_url}order/package">{Lang::T('expired')}</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="small text-info text-uppercase text-normal">{$_L['Created_On']}</td>
|
||||
<td class="small mb15">
|
||||
{if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['recharged_on'],$_bill['recharged_time'])}
|
||||
{/if} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="small text-danger text-uppercase text-normal">{$_L['Expires_On']}</td>
|
||||
<td class="small mb15 text-danger">
|
||||
{if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['expiration'],$_bill['time'])}{/if}
|
||||
<a class="label label-primary pull-right" href="{$_url}home&recharge=1"
|
||||
onclick="return confirm('{Lang::T('Recharge')}?')">{Lang::T('Recharge')}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{if $nux_ip}
|
||||
<table class="table table-bordered table-striped table-bordered table-hover" style="margin-bottom: 0px;">
|
||||
<tr>
|
||||
<td class="small text-primary text-uppercase text-normal">{Lang::T('Current IP')}</td>
|
||||
<td class="small mb15">{$nux_ip}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $nux_mac}
|
||||
<tr>
|
||||
<td class="small text-primary text-uppercase text-normal">{Lang::T('Current MAC')}</td>
|
||||
<td class="small mb15">{$nux_mac}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_bill['routers'] != 'radius'}
|
||||
<tr>
|
||||
<td class="small text-primary text-uppercase text-normal">{Lang::T('Login Status')}</td>
|
||||
<td class="small mb15" id="login_status">
|
||||
<img src="ui/ui/images/loading.gif">
|
||||
<td class="small text-primary text-uppercase text-normal">{$_L['Plan_Name']}</td>
|
||||
<td class="small mb15">
|
||||
{$_bill['namebp']}
|
||||
{if $_bill['status'] == 'on'}
|
||||
<a class="label label-danger pull-right" href="{$_url}home&deactivate={$_bill['id']}"
|
||||
onclick="return confirm('{Lang::T('Deactivate')}?')">{Lang::T('Deactivate')}</a>
|
||||
{else}
|
||||
<a class="label label-warning pull-right" href="{$_url}order/package">{Lang::T('expired')}</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
</table>
|
||||
{if $_c['disable_voucher'] == 'yes'}
|
||||
<div class="box-footer">
|
||||
{if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' }
|
||||
<a href="{$_url}order/package" class="btn btn-primary btn-block">
|
||||
<i class="ion ion-ios-cart"></i>
|
||||
{Lang::T('Order Package')}
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
<tr>
|
||||
<td class="small text-info text-uppercase text-normal">{$_L['Created_On']}</td>
|
||||
<td class="small mb15">
|
||||
{if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['recharged_on'],$_bill['recharged_time'])}
|
||||
{/if} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="small text-danger text-uppercase text-normal">{$_L['Expires_On']}</td>
|
||||
<td class="small mb15 text-danger">
|
||||
{if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['expiration'],$_bill['time'])}{/if}
|
||||
<a class="label label-primary pull-right" href="{$_url}home&recharge={$_bill['id']}"
|
||||
onclick="return confirm('{Lang::T('Recharge')}?')">{Lang::T('Recharge')}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{if $nux_ip}
|
||||
<tr>
|
||||
<td class="small text-primary text-uppercase text-normal">{Lang::T('Current IP')}</td>
|
||||
<td class="small mb15">{$nux_ip}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $nux_mac}
|
||||
<tr>
|
||||
<td class="small text-primary text-uppercase text-normal">{Lang::T('Current MAC')}</td>
|
||||
<td class="small mb15">{$nux_mac}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on' && $_bill['routers'] != 'radius'}
|
||||
<tr>
|
||||
<td class="small text-primary text-uppercase text-normal">{Lang::T('Login Status')}</td>
|
||||
<td class="small mb15" id="login_status_{$_bill['id']}">
|
||||
<img src="ui/ui/images/loading.gif">
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
{if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on'}
|
||||
<script>
|
||||
setTimeout(() => {
|
||||
$.ajax({
|
||||
url: "index.php?_route=autoload_user/isLogin",
|
||||
cache: false,
|
||||
success: function(msg) {
|
||||
$("#login_status").html(msg);
|
||||
}
|
||||
});
|
||||
}, 2000);
|
||||
</script>
|
||||
{if $_c['disable_voucher'] == 'yes'}
|
||||
<div class="box-footer">
|
||||
{if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' }
|
||||
<a href="{$_url}order/package" class="btn btn-primary btn-block">
|
||||
<i class="ion ion-ios-cart"></i>
|
||||
{Lang::T('Order Package')}
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{if $_bills}
|
||||
{foreach $_bills as $_bill}
|
||||
{if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on'}
|
||||
<script>
|
||||
setTimeout(() => {
|
||||
$.ajax({
|
||||
url: "index.php?_route=autoload_user/isLogin/{$_bill['id']}",
|
||||
cache: false,
|
||||
success: function(msg) {
|
||||
$("#login_status_{$_bill['id']}").html(msg);
|
||||
}
|
||||
});
|
||||
}, 2000);
|
||||
</script>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes'}
|
||||
<div class="box box-primary box-solid mb30">
|
||||
|
82
ui/ui/user-login-noreg.tpl
Normal file
82
ui/ui/user-login-noreg.tpl
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>{$_title} - {$_L['Login']}</title>
|
||||
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
||||
|
||||
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="ui/ui/styles/adminlte.min.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="hidden-xs" style="height:150px"></div>
|
||||
<div class="form-head mb20">
|
||||
<h1 class="site-logo h2 mb5 mt5 text-center text-uppercase text-bold"
|
||||
style="text-shadow: 2px 2px 4px #757575;">{$_c['CompanyName']}</h1>
|
||||
<hr>
|
||||
</div>
|
||||
{if isset($notify)}
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-sm-offset-3">
|
||||
{$notify}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">{$_L['Announcement']}</div>
|
||||
<div class="panel-body">
|
||||
{include file="$_path/../pages/Announcement.html"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">{Lang::T('Login / Activate Voucher')}</div>
|
||||
<div class="panel-body">
|
||||
<form action="{$_url}login/activation" method="post">
|
||||
<div class="form-group">
|
||||
<label>{$_L['Phone_Number']}</label>
|
||||
<div class="input-group">
|
||||
{if $_c['country_code_phone']!= ''}
|
||||
<span class="input-group-addon" id="basic-addon1">+</span>
|
||||
{else}
|
||||
<span class="input-group-addon" id="basic-addon1"><i
|
||||
class="glyphicon glyphicon-phone-alt"></i></span>
|
||||
{/if}
|
||||
<input type="text" class="form-control" name="username" required
|
||||
placeholder="08xxxxxxx">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{$_L['Enter_Voucher_Code']}</label>
|
||||
<input type="text" class="form-control" name="voucher" required autocomplete="off"
|
||||
placeholder="{$_L['Code_Voucher']}">
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified mb15">
|
||||
<div class="btn-group">
|
||||
<button type="submit" class="btn btn-primary">{Lang::T('Login / Activate Voucher')}</button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<center>
|
||||
<a href="./pages/Privacy_Policy.html" target="_blank">Privacy</a>
|
||||
•
|
||||
<a href="./pages/Terms_of_Conditions.html" target="_blank">ToC</a>
|
||||
</center>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="ui/ui/scripts/vendors.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -21,10 +21,11 @@
|
||||
<hr>
|
||||
</div>
|
||||
{if isset($notify)}
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-sm-offset-3">
|
||||
{$notify}
|
||||
</div>
|
||||
<div class="alert alert-{if $notify_t == 's'}success{else}danger{/if}">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>{$notify}</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="row">
|
||||
|
37
ui/ui/user-orderBalance.tpl
Normal file
37
ui/ui/user-orderBalance.tpl
Normal file
@ -0,0 +1,37 @@
|
||||
{include file="sections/user-header.tpl"}
|
||||
<!-- user-orderPlan -->
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{if $_c['enable_balance'] == 'yes'}
|
||||
<div class="box box-solid box-success bg-gray-light">
|
||||
<div class="box-header">{Lang::T('Balance Plans')}</div>
|
||||
<div class="box-body row">
|
||||
{foreach $plans_balance as $plan}
|
||||
<div class="col col-md-4">
|
||||
<div class="box box-solid box-default">
|
||||
<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('Price')}</td>
|
||||
<td>{Lang::moneyFormat($plan['price'])}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<a href="{$_url}order/buy/0/{$plan['id']}"
|
||||
onclick="return confirm('{Lang::T('Buy Balance')}?')"
|
||||
class="btn btn-sm btn-block btn-primary">Buy</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="sections/user-footer.tpl"}
|
@ -5,247 +5,369 @@
|
||||
<div class="box box-solid box-default">
|
||||
<div class="box-header">{Lang::T('Order Internet Package')}</div>
|
||||
</div>
|
||||
{if $_c['enable_balance'] == 'yes'}
|
||||
<div class="box box-solid box-success bg-gray-light">
|
||||
<div class="box-header">{Lang::T('Balance Plans')}</div>
|
||||
<div class="box-body row">
|
||||
{foreach $plans_balance as $plan}
|
||||
<div class="col col-md-4">
|
||||
<div class="box box-solid box-default">
|
||||
<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('Price')}</td>
|
||||
<td>{Lang::moneyFormat($plan['price'])}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<a href="{$_url}order/buy/0/{$plan['id']}"
|
||||
onclick="return confirm('{Lang::T('Buy Balance?')}')"
|
||||
class="btn btn-sm btn-block btn-primary">Buy</a>
|
||||
</div>
|
||||
</div>
|
||||
{if $_c['radius_enable']}
|
||||
{if $_user['service_type'] == 'PPPoE'}
|
||||
{if Lang::arrayCount($radius_pppoe)>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">
|
||||
{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/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>
|
||||
{/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>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
{if $_c['radius_enable']}
|
||||
<div class="box box-solid box-info bg-gray-light">
|
||||
<div class="box-header text-black text-bold">{if $_c['radius_plan']==''}Radius
|
||||
Plan{else}{$_c['radius_plan']}
|
||||
{/if}</div>
|
||||
{if Lang::arrayCount($radius_hotspot)>0}
|
||||
<div class="box-header text-black">{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</div>
|
||||
<div class="box-body 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}
|
||||
{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>
|
||||
{/if}
|
||||
{if Lang::arrayCount($radius_pppoe)>0}
|
||||
<div class="box-header text-black">{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</div>
|
||||
<div class="box-body 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>
|
||||
{/foreach}
|
||||
<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>
|
||||
{/if}
|
||||
</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 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}
|
||||
{foreach $routers as $router}
|
||||
{if Validator::isRouterHasPlan($plans_hotspot, $router['name']) || Validator::isRouterHasPlan($plans_pppoe, $router['name'])}
|
||||
<div class="box box-solid box-info bg-gray-light">
|
||||
<div class="box-header text-black text-bold">{$router['name']}</div>
|
||||
{if $router['description'] != ''}
|
||||
<div class="box-body">
|
||||
{$router['description']}
|
||||
</div>
|
||||
{/if}
|
||||
{if Validator::countRouterPlan($plans_hotspot, $router['name'])>0}
|
||||
<div class="box-header text-black">{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-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-black">{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">{$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 Validator::isRouterHasPlan($plans_hotspot, $router['name']) || Validator::isRouterHasPlan($plans_pppoe, $router['name'])}
|
||||
<div class="box box-solid box-primary bg-gray">
|
||||
<div class="box-header text-white text-bold">{$router['name']}</div>
|
||||
{if $router['description'] != ''}
|
||||
<div class="box-body">
|
||||
{$router['description']}
|
||||
</div>
|
||||
{/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}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="sections/user-footer.tpl"}
|
@ -3,7 +3,13 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-hovered mb20 panel-primary">
|
||||
<div class="panel-heading">{$_L['Prepaid_Vouchers']}</div>
|
||||
<div class="panel-heading">
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-danger btn-xs" title="Remove used Voucher" href="{$_url}prepaid/remove-voucher" onclick="return confirm('Delete all used voucher code?')"><span
|
||||
class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete All</a>
|
||||
</div>
|
||||
{$_L['Prepaid_Vouchers']}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
||||
<div class="col-md-8">
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "2023.10.17"
|
||||
"version": "2023.12.19"
|
||||
}
|
Reference in New Issue
Block a user