Compare commits

...

41 Commits

Author SHA1 Message Date
80c76cd6dc 2023.10.27 2023-10-27 10:40:39 +07:00
a1648a4178 alert about restoring data 2023-10-27 10:39:10 +07:00
c8d19a859f New Backup Restore System 2023-10-27 10:36:10 +07:00
90cfc3e6d9 check radius client if radius_enable 2023-10-27 08:57:57 +07:00
88a3e2d205 update Language 2023-10-26 11:24:47 +07:00
0039f47947 fix reminder.php -> cron_reminder.php 2023-10-25 15:27:26 +07:00
c2f1f07cfc Update Readme for Radiuss 2023-10-25 15:14:52 +07:00
f61ebb642e 2023.10.25 2023-10-25 15:10:31 +07:00
77e7a96f96 fix wrong file check in cron, error only for newly installed 2023-10-25 15:10:22 +07:00
5c57c5df11 fix wrong cheking file 2023-10-25 10:03:25 +07:00
9e09611816 Fix expired notification 2023-10-24 15:12:10 +07:00
09ead77d7b Merge branch 'master' into Development 2023-10-24 14:11:11 +07:00
703f9a7463 2023.10.24 2023-10-24 14:09:50 +07:00
ef25633275 Assign router to NAS 2023-10-24 14:09:50 +07:00
02a68589a1 check file if exists 2023-10-24 14:09:50 +07:00
25cd07e975 pagination Nas List 2023-10-24 14:09:49 +07:00
4e7a60aa6f change pagination class 2023-10-24 14:09:49 +07:00
baca2d706f alert move to tpl 2023-10-24 14:09:49 +07:00
4f975fbf0d fix logic pool_expired radius 2023-10-24 14:09:49 +07:00
cded80a632 2023.10.24 2023-10-24 14:08:18 +07:00
f0d130b6b9 Assign router to NAS 2023-10-24 13:55:34 +07:00
a18c07ba42 check file if exists 2023-10-24 13:38:58 +07:00
36b47a3e8d pagination Nas List 2023-10-24 12:30:15 +07:00
37f72d881e change pagination class 2023-10-24 12:27:30 +07:00
e99108a34a alert move to tpl 2023-10-24 09:27:51 +07:00
ddb3b8a718 fix logic pool_expired radius 2023-10-24 09:19:35 +07:00
3c4920f958 Update issue templates 2023-10-21 11:36:23 +07:00
e2da5b67bf Update issue templates 2023-10-21 11:34:28 +07:00
49c8fe5d55 Update issue templates 2023-10-21 11:33:52 +07:00
9402da311c 2023.10.20 2023-10-20 15:00:54 +07:00
51ab4a35c5 Transaction list 2023-10-20 14:31:56 +07:00
d037b2bef4 move alert 2023-10-20 14:07:49 +07:00
d95e4d1d84 resend invoice 2023-10-20 13:57:12 +07:00
7ebf95f4be paginator dynamic 2023-10-20 10:34:24 +07:00
8cbe32e313 StandWithPalestine 2023-10-20 08:53:42 +07:00
0d27503e8d view INVOICE again 2023-10-18 17:49:54 +07:00
1ae687bda2 Voucher Template 2023-10-18 17:26:02 +07:00
d59f696fde Voucher Template Full Custom 2023-10-18 17:24:00 +07:00
b9537d4a4b Voucher Format 2023-10-18 17:23:47 +07:00
e88d1f02a6 fix url update 2023-10-18 15:35:56 +07:00
eda7967f66 fix info cron 2023-10-18 15:35:45 +07:00
58 changed files with 1413 additions and 957 deletions

27
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View 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.

View 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.

View File

@ -2,6 +2,28 @@
# CHANGELOG
## 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^)/

View File

@ -2,6 +2,8 @@
![PHPNuxBill](install/img/logo.png)
![StandWithPalestine](https://raw.githubusercontent.com/Safouene1/support-palestine-banner/master/StandWithPalestine.svg)
## Feature
- Voucher Generator and Print
@ -56,9 +58,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

View File

@ -280,7 +280,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...');
--

View File

@ -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`;

View File

@ -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);
}

View File

@ -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>

View File

@ -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;
}
}

View File

@ -75,4 +75,30 @@ 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);
}
}
}

View File

@ -317,29 +317,7 @@ 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;
}

View File

@ -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;

View File

@ -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 '';

View File

@ -126,9 +126,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 +170,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']);
}

View File

@ -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();
}

View File

@ -24,14 +24,19 @@ 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 . '%'
], $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])
->offset($paginator['startpoint'])
->limit($paginator['limit'])
->order_by_desc('id')->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 +130,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();

View File

@ -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;

View File

@ -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"));

View File

@ -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

View File

@ -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
}
}

View File

@ -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;
@ -222,7 +242,7 @@ switch ($action) {
$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 +250,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'])
@ -261,10 +281,16 @@ switch ($action) {
$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 +341,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 +354,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 +396,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;

View File

@ -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');

View File

@ -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{

View File

@ -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');
}
}

View File

@ -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();
}

View File

@ -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
}
}
@ -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();
}

View File

@ -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
}
}
@ -38,11 +39,11 @@ switch ($action) {
}
}
$php = trim(shell_exec('which php'));
if(empty($php)){
if (empty($php)) {
$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 +77,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();
}
@ -256,15 +257,16 @@ switch ($action) {
$radius_enable = _post('radius_enable');
$radius_client = _post('radius_client');
$theme = _post('theme');
$voucher_format = _post('voucher_format');
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');
}
}
@ -330,6 +332,16 @@ switch ($action) {
$d->save();
}
$d = ORM::for_table('tbl_appconfig')->where('setting', 'voucher_format')->find_one();
if ($d) {
$d->value = $voucher_format;
$d->save();
} else {
$d = ORM::for_table('tbl_appconfig')->create();
$d->setting = 'voucher_format';
$d->value = $voucher_format;
$d->save();
}
$d = ORM::for_table('tbl_appconfig')->where('setting', 'disable_voucher')->find_one();
if ($d) {
$d->value = $disable_voucher;
@ -663,20 +675,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 +690,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']);

View File

@ -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);

View File

@ -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,7 +115,7 @@ 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'], ':=');
@ -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,7 +169,7 @@ 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'], ':=');
@ -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();

View File

@ -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';

View File

@ -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,8 @@ $_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';

View File

@ -14,387 +14,397 @@ 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';

View File

@ -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,4 @@ $_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';

View File

@ -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,4 @@ $_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';

View File

@ -32,5 +32,8 @@
],
"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`;"
]
}

View File

@ -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,44 @@
<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>
</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,8 +192,8 @@
<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>
@ -316,9 +356,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 +375,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>

View File

@ -124,6 +124,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 +136,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>

View File

@ -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;

View File

@ -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>&nbsp;
<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>

View File

@ -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>

View File

@ -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">&larr;</span> Newer</a></li>
{/if}
<li class="next"><a href="{$_url}logs/radius/{$page+1}">Older <span
aria-hidden="true">&rarr;</span></a></li>
</ul>
</nav>
{$paginator['contents']}
</div>
</div>
</div>

View File

@ -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>

View File

@ -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"}

View File

@ -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 &gt; <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 &gt; <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 -->

View File

@ -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"

View File

@ -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"

View File

@ -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']}"

View File

@ -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">

View File

@ -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">

View File

@ -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">

View 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>&nbsp;
</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"}

View File

@ -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">

View File

@ -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}

View File

@ -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}

View File

@ -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">

View 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"}

View File

@ -5,153 +5,125 @@
<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}
{if $_c['radius_enable']}
{if Lang::arrayCount($radius_hotspot)>0}
<ol class="breadcrumb">
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li>
<li>{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</li>
</ol>
<div class="row">
{foreach $radius_hotspot as $plan}
<div class="col col-md-4">
<div class="box box-primary">
<div class="box-header text-bold">{$plan['name_plan']}</div>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('Type')}</td>
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/buy/radius/{$plan['id']}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">Buy</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/radius/{$plan['id']}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/send/radius/{$plan['id']}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/foreach}
</div>
{/if}
{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-solid box-default">
<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">
<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 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>
</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}
</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>
{/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>
<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 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-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-bold">{$plan['name_plan']}</div>
<div class="box-header text-center text-bold">{$plan['name_plan']}</div>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<tbody>
@ -194,13 +166,13 @@
</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-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">{$plan['name_plan']}</div>
<div class="box-header text-bold text-center">{$plan['name_plan']}</div>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<tbody>

View File

@ -1,3 +1,3 @@
{
"version": "2023.10.17"
"version": "2023.10.27"
}