Compare commits
143 Commits
Author | SHA1 | Date | |
---|---|---|---|
26d9e8bd03 | |||
7f3096ce85 | |||
94e6f7fe6c | |||
fc74589a2a | |||
e582816982 | |||
ab7725b0fb | |||
35a327001b | |||
6d8e64a1da | |||
e178acc8e9 | |||
848c36106a | |||
20fdb688ad | |||
533d46bbf5 | |||
0bad687f7a | |||
4170ab6505 | |||
bd0f7e0ad6 | |||
8fb930cddf | |||
066f333a85 | |||
12726bdaa0 | |||
1ab19bfe64 | |||
951d729fcc | |||
a5a6957581 | |||
1f27a98471 | |||
11cafb9b84 | |||
836cc4cddf | |||
459e153ed7 | |||
7710696886 | |||
f29e692e81 | |||
d2c839a11e | |||
49ea49ec4a | |||
a4569901a9 | |||
5af514244c | |||
8284b360a0 | |||
41161ebc7c | |||
1bada918b9 | |||
37a245c94a | |||
749ec8509f | |||
ea51fa24d0 | |||
55d344febe | |||
51c4909308 | |||
f7a912a9af | |||
d00d04994d | |||
fded62b39d | |||
3769a75769 | |||
b5a9190ae7 | |||
6b8501313d | |||
22c027aaba | |||
5c95da3a45 | |||
67a4d7f534 | |||
d94c62d6fc | |||
2198536123 | |||
8594fc3876 | |||
4e1820dea2 | |||
f81feee9c0 | |||
9521e96495 | |||
d84cf96d01 | |||
04fda479b7 | |||
a9761dda28 | |||
0511459424 | |||
aeb4d2e1ed | |||
41c0190d19 | |||
fa50539faa | |||
ae3db05649 | |||
fa45d5f4b5 | |||
895bb26b02 | |||
a5affdb674 | |||
238fc03d03 | |||
cf8e23ae88 | |||
b9132082e5 | |||
ee63abb618 | |||
060718dfda | |||
cd34a68cf3 | |||
651969924c | |||
a40b2cbea3 | |||
fc73a83732 | |||
6763fe09d8 | |||
0ea9de70fc | |||
c7ec8e2d27 | |||
822acef6d8 | |||
892c6bf7f5 | |||
c0c857e735 | |||
49794b99de | |||
126212f4c2 | |||
e3de07d435 | |||
2f551b1755 | |||
f766393e52 | |||
0bd587522a | |||
47c6e90624 | |||
fc0ef5b41a | |||
dff3970ff4 | |||
4c4fe4e99f | |||
2ed3dc991a | |||
be43a5b385 | |||
61bd042b15 | |||
b6fde35eb6 | |||
980af58eb1 | |||
f7deb828ac | |||
4c1e5da601 | |||
9712d411f5 | |||
8dc7707b3a | |||
18bdf185d6 | |||
2a70236576 | |||
7b40fc850e | |||
ad411e2223 | |||
45a6085205 | |||
91fe5a4b46 | |||
c0cd197df2 | |||
3e89efcf46 | |||
31b710e03c | |||
4d6041f614 | |||
fbaf9dbe3f | |||
a4f5c1d422 | |||
d08137e0c3 | |||
961f4770c0 | |||
2d6fe9526c | |||
bebc20e39f | |||
964c141668 | |||
88bbf3ed35 | |||
bf00b21786 | |||
0e81db5ada | |||
c0382c569a | |||
c32542afda | |||
8d17cd3f90 | |||
6dafd549d9 | |||
20c4be9121 | |||
2f757f1006 | |||
0ce112dc70 | |||
ea3f5caf59 | |||
5a5032bbcc | |||
0d44fec338 | |||
7396c2f1d4 | |||
73cf67b4cb | |||
9e0f74926c | |||
09af3474a9 | |||
9b8f1fedf8 | |||
05c77df315 | |||
e88f662d8c | |||
2956cc2315 | |||
3c8b2c906d | |||
acded8eb29 | |||
b63aeb5298 | |||
115a5c81a7 | |||
ad565c15ca | |||
a0c5cec31e |
58
CHANGELOG.md
58
CHANGELOG.md
@ -2,6 +2,64 @@
|
||||
|
||||
# CHANGELOG
|
||||
|
||||
## 2024.5.21
|
||||
|
||||
- Add Maintenance Mode by @freeispradius
|
||||
- Add Tax System by @freeispradius
|
||||
- Add Export Customer List to CSV with Filter
|
||||
- Fix some Radius Variable by @freeispradius
|
||||
- Add Rollback update
|
||||
|
||||
## 2024.5.17
|
||||
|
||||
- Status Customer: Active/Banned/Disabled
|
||||
- Add search with order in Customer list
|
||||
|
||||
## 2024.5.16
|
||||
|
||||
- Confirm can change Using
|
||||
|
||||
## 2024.5.14
|
||||
|
||||
- Show Plan and Location on expired list
|
||||
- Customizeable payment for recharge
|
||||
|
||||
## 2024.5.8
|
||||
|
||||
- Fix bugs burst by @Gerandonk
|
||||
- Fix sync for burst by @Gerandonk
|
||||
|
||||
## 2024.5.7
|
||||
|
||||
- Fix time for period Days
|
||||
- Fix Free radius attributes by @agstrxyz
|
||||
- Add Numeric Voucher Code by @pro-cms
|
||||
|
||||
## 2024.4.30
|
||||
|
||||
- CRITICAL UPDATE: last update Logic recharge not check is status on or off, it make expired customer stay in expired pool
|
||||
- Prevent double submit for recharge balance
|
||||
|
||||
## 2024.4.29
|
||||
|
||||
- Maps Pagination
|
||||
- Maps Search
|
||||
- Fix extend logic
|
||||
- Fix logic customer recharge to not delete when customer not change the plan
|
||||
|
||||
## 2024.4.23
|
||||
|
||||
- Fix Pagination Voucher
|
||||
- Fix Languange Translation
|
||||
- Fix Alert Confirmation for requesting Extend
|
||||
- Send Telegram Notification when Customer request to extend expiration
|
||||
- prepaid users export list by @freeispradius
|
||||
- fix show voucher by @agstrxyz
|
||||
|
||||
## 2024.4.21
|
||||
|
||||
- Restore old cron
|
||||
|
||||
## 2024.4.15
|
||||
|
||||
- Postpaid Customer can request extends expiration day if it enabled
|
||||
|
22
README.md
22
README.md
@ -7,7 +7,7 @@
|
||||
## Feature
|
||||
|
||||
- Voucher Generator and Print
|
||||
- FreeRadius
|
||||
- [Freeradius](https://github.com/hotspotbilling/phpnuxbill/wiki/FreeRadius)
|
||||
- Self registration
|
||||
- User Balance
|
||||
- Auto Renewal Package using Balance
|
||||
@ -51,14 +51,11 @@ The problem with windows is hard to set cronjob, better Linux
|
||||
## Changelog
|
||||
|
||||
[CHANGELOG.md](CHANGELOG.md)
|
||||
|
||||
## Installation
|
||||
|
||||
[Installation instructions](https://github.com/hotspotbilling/phpnuxbill/wiki)
|
||||
|
||||
## Docker Version
|
||||
|
||||
[Docker Repository](https://github.com/animegasan/phpnuxbill)
|
||||
|
||||
## Freeradius
|
||||
|
||||
Support [Freeradius with Database](https://github.com/hotspotbilling/phpnuxbill/wiki/FreeRadius)
|
||||
@ -70,21 +67,24 @@ Support [Freeradius with Database](https://github.com/hotspotbilling/phpnuxbill/
|
||||
|
||||
## Technical Support
|
||||
|
||||
Start from Rp 500.000 or $50
|
||||
This Software is Free and Open Source, Without any Warranty.
|
||||
|
||||
If you chat me for any technical support, you need to pay, except for Donors, ask anything for free in the [discussion](/hotspotbilling/phpnuxbill/discussions) page
|
||||
Even if the software is free, but Technical Support is not,
|
||||
Technical Support Start from Rp 500.000 or $50
|
||||
|
||||
[Telegram](https://t.me/ibnux)
|
||||
If you chat me for any technical support,
|
||||
you need to pay,
|
||||
|
||||
[Website](https://ibnux.net/layanan)
|
||||
ask anything for free in the [discussion](/hotspotbilling/phpnuxbill/discussions) page or [Telegram Group](https://t.me/phpnuxbill)
|
||||
|
||||
Contact me at [Telegram](https://t.me/ibnux)
|
||||
|
||||
## License
|
||||
|
||||
GNU General Public License version 2 or later
|
||||
|
||||
see LICENSE file
|
||||
see [LICENSE](LICENSE) file
|
||||
|
||||
## [CHANGELOG](CHANGELOG.md)
|
||||
|
||||
## Donate to ibnux
|
||||
|
||||
|
52
init.php
52
init.php
@ -11,7 +11,7 @@ if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
|
||||
die();
|
||||
}
|
||||
$root_path = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR;
|
||||
if(!isset($isApi)){
|
||||
if (!isset($isApi)) {
|
||||
$isApi = false;
|
||||
}
|
||||
// on some server, it getting error because of slash is backwards
|
||||
@ -73,9 +73,9 @@ ORM::configure('return_result_sets', true);
|
||||
if ($_app_stage != 'Live') {
|
||||
ORM::configure('logging', true);
|
||||
}
|
||||
if($isApi){
|
||||
if ($isApi) {
|
||||
define('U', APP_URL . '/system/api.php?r=');
|
||||
}else{
|
||||
} else {
|
||||
define('U', APP_URL . '/index.php?_route=');
|
||||
}
|
||||
|
||||
@ -110,6 +110,9 @@ if (empty($http_proxy) && !empty($config['http_proxy'])) {
|
||||
date_default_timezone_set($config['timezone']);
|
||||
|
||||
if ((!empty($radius_user) && $config['radius_enable']) || _post('radius_enable')) {
|
||||
if(!empty($radius_password)){
|
||||
$radius_pass = $radius_password;
|
||||
}
|
||||
ORM::configure("mysql:host=$radius_host;dbname=$radius_name", null, 'radius');
|
||||
ORM::configure('username', $radius_user, 'radius');
|
||||
ORM::configure('password', $radius_pass, 'radius');
|
||||
@ -222,7 +225,7 @@ function Lang($key)
|
||||
|
||||
function alphanumeric($str, $tambahan = "")
|
||||
{
|
||||
return preg_replace("/[^a-zA-Z0-9" . $tambahan . "]+/", "", $str);
|
||||
return Text::alphanumeric($str, $tambahan);
|
||||
}
|
||||
|
||||
function showResult($success, $message = '', $result = [], $meta = [])
|
||||
@ -233,6 +236,32 @@ function showResult($success, $message = '', $result = [], $meta = [])
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
function generateUniqueNumericVouchers($totalVouchers, $length = 8)
|
||||
{
|
||||
// Define characters allowed in the voucher code
|
||||
$characters = '0123456789';
|
||||
$charactersLength = strlen($characters);
|
||||
$vouchers = array();
|
||||
|
||||
// Attempt to generate unique voucher codes
|
||||
for ($j = 0; $j < $totalVouchers; $j++) {
|
||||
do {
|
||||
$voucherCode = '';
|
||||
// Generate the voucher code
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$voucherCode .= $characters[rand(0, $charactersLength - 1)];
|
||||
}
|
||||
// Check if the generated voucher code already exists in the array
|
||||
$isUnique = !in_array($voucherCode, $vouchers);
|
||||
} while (!$isUnique);
|
||||
|
||||
$vouchers[] = $voucherCode;
|
||||
}
|
||||
|
||||
return $vouchers;
|
||||
}
|
||||
|
||||
function sendTelegram($txt)
|
||||
{
|
||||
Message::sendTelegram($txt);
|
||||
@ -253,7 +282,7 @@ function r2($to, $ntype = 'e', $msg = '')
|
||||
global $isApi;
|
||||
if ($isApi) {
|
||||
showResult(
|
||||
($ntype=='s')? true : false,
|
||||
($ntype == 's') ? true : false,
|
||||
$msg
|
||||
);
|
||||
}
|
||||
@ -296,3 +325,16 @@ function _alert($text, $type = 'success', $url = "home", $time = 3)
|
||||
if (!isset($api_secret)) {
|
||||
$api_secret = $db_password;
|
||||
}
|
||||
|
||||
function displayMaintenanceMessage(): void
|
||||
{
|
||||
global $config, $ui;
|
||||
$date = $config['maintenance_date'];
|
||||
if ($date){
|
||||
$ui->assign('date', $date);
|
||||
}
|
||||
http_response_code(503);
|
||||
$ui->assign('companyName', $config['CompanyName']);
|
||||
$ui->display('maintenance.tpl');
|
||||
die();
|
||||
}
|
||||
|
@ -24,6 +24,10 @@ CREATE TABLE `tbl_customers` (
|
||||
`pppoe_password` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'For PPPOE Login',
|
||||
`fullname` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`address` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
|
||||
`city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
|
||||
`district` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
|
||||
`state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
|
||||
`zip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
|
||||
`phonenumber` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
|
||||
`email` varchar(128) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1',
|
||||
`coordinates` VARCHAR(50) NOT NULL DEFAULT '' COMMENT 'Latitude and Longitude coordinates',
|
||||
@ -321,4 +325,6 @@ ALTER TABLE `tbl_transactions` ADD `admin_id` INT NOT NULL DEFAULT '1' AFTER `ty
|
||||
ALTER TABLE `tbl_user_recharges` ADD `admin_id` INT NOT NULL DEFAULT '1' AFTER `type`;
|
||||
ALTER TABLE `tbl_plans` CHANGE `allow_purchase` `prepaid` ENUM('yes','no') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'yes' COMMENT 'is prepaid';
|
||||
ALTER TABLE `tbl_transactions` ADD `note` VARCHAR(256) NOT NULL DEFAULT '' COMMENT 'for note' AFTER `type`;
|
||||
ALTER TABLE `tbl_payment_gateway` ADD `trx_invoice` VARCHAR(25) NOT NULL DEFAULT '' COMMENT 'from tbl_transactions' AFTER `paid_date`;
|
||||
ALTER TABLE `tbl_payment_gateway` ADD `trx_invoice` VARCHAR(25) NOT NULL DEFAULT '' COMMENT 'from tbl_transactions' AFTER `paid_date`;
|
||||
ALTER TABLE `tbl_customers` ADD `status` ENUM('Active','Banned','Disabled') NOT NULL DEFAULT 'Active' AFTER `auto_renewal`;
|
||||
ALTER TABLE `tbl_customers` CHANGE `status` `status` ENUM('Active','Banned','Disabled','Inactive','Limited','Suspended') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'Active';
|
@ -11,7 +11,9 @@ class Lang
|
||||
public static function T($key)
|
||||
{
|
||||
global $_L, $lan_file, $config;
|
||||
$_L = $_SESSION['Lang'];
|
||||
if(is_array($_SESSION['Lang'])){
|
||||
$_L = array_merge($_L, $_SESSION['Lang']);
|
||||
}
|
||||
$key = preg_replace('/\s+/', ' ', $key);
|
||||
if (!empty($_L[$key])) {
|
||||
return $_L[$key];
|
||||
@ -125,7 +127,7 @@ class Lang
|
||||
|
||||
if (!$full)
|
||||
$string = array_slice($string, 0, 1);
|
||||
return $string ? implode(', ', $string) . ' ago' : 'just now';
|
||||
return $string ? implode(', ', $string) .' '. Lang::T('ago') : Lang::T('just now');
|
||||
}
|
||||
|
||||
public static function nl2br($text)
|
||||
|
@ -115,13 +115,12 @@ class Message
|
||||
$mail->Subject = $subject;
|
||||
$mail->Body = $body;
|
||||
$mail->send();
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
public static function sendPackageNotification($customer, $package, $price, $message, $via)
|
||||
{
|
||||
global $u;
|
||||
global $ds;
|
||||
if(empty($message)){
|
||||
return "";
|
||||
}
|
||||
@ -141,8 +140,10 @@ class Message
|
||||
}else{
|
||||
$msg = str_replace('[[bills]]', '', $msg);
|
||||
}
|
||||
if ($u) {
|
||||
$msg = str_replace('[[expired_date]]', Lang::dateAndTimeFormat($u['expiration'], $u['time']), $msg);
|
||||
if ($ds) {
|
||||
$msg = str_replace('[[expired_date]]', Lang::dateAndTimeFormat($ds['expiration'], $ds['time']), $msg);
|
||||
}else{
|
||||
$msg = str_replace('[[expired_date]]', "", $msg);
|
||||
}
|
||||
if (
|
||||
!empty($customer['phonenumber']) && strlen($customer['phonenumber']) > 5
|
||||
|
@ -34,6 +34,10 @@ class Package
|
||||
$c = ORM::for_table('tbl_customers')->where('id', $id_customer)->find_one();
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $plan_id)->find_one();
|
||||
|
||||
if ($c['status'] != 'Active') {
|
||||
_alert(Lang::T('This account status') . ' : ' . Lang::T($c['status']), 'danger', "");
|
||||
}
|
||||
|
||||
$add_cost = 0;
|
||||
$bills = [];
|
||||
// Zero cost recharge
|
||||
@ -153,7 +157,7 @@ class Package
|
||||
# PPPOE or Hotspot only can have 1 per customer prepaid or postpaid
|
||||
# because 1 customer can have 1 PPPOE and 1 Hotspot Plan in mikrotik
|
||||
//->where('prepaid', $p['prepaid'])
|
||||
->join('tbl_plans', array('tbl_plans.id', '=', 'tbl_user_recharges.plan_id'))
|
||||
->left_outer_join('tbl_plans', array('tbl_plans.id', '=', 'tbl_user_recharges.plan_id'))
|
||||
->find_one();
|
||||
|
||||
run_hook("recharge_user");
|
||||
@ -175,7 +179,9 @@ class Package
|
||||
};
|
||||
$time = date("23:59:00");
|
||||
} else if ($p['validity_unit'] == 'Days') {
|
||||
$date_exp = date("Y-m-d", strtotime('+' . $p['validity'] . ' day'));
|
||||
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime('+' . $p['validity'] . ' day')));
|
||||
$date_exp = $datetime[0];
|
||||
$time = $datetime[1];
|
||||
} else if ($p['validity_unit'] == 'Hrs') {
|
||||
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime('+' . $p['validity'] . ' hour')));
|
||||
$date_exp = $datetime[0];
|
||||
@ -185,38 +191,44 @@ class Package
|
||||
$date_exp = $datetime[0];
|
||||
$time = $datetime[1];
|
||||
}
|
||||
|
||||
$isChangePlan = false;
|
||||
if ($p['type'] == 'Hotspot') {
|
||||
if ($b) {
|
||||
if ($b['namebp'] == $p['name_plan'] && $b['status'] == 'on') {
|
||||
// if it same internet plan, expired will extend
|
||||
if ($p['validity_unit'] == 'Months') {
|
||||
$date_exp = date("Y-m-d", strtotime($b['expiration'] . ' +' . $p['validity'] . ' months'));
|
||||
$time = $b['time'];
|
||||
} else if ($p['validity_unit'] == 'Period') {
|
||||
$date_exp = date("Y-m-$day_exp", strtotime($b['expiration'] . ' +' . $p['validity'] . ' months'));
|
||||
$time = date("23:59:00");
|
||||
} else if ($p['validity_unit'] == 'Days') {
|
||||
$date_exp = date("Y-m-d", strtotime($b['expiration'] . ' +' . $p['validity'] . ' days'));
|
||||
$time = $b['time'];
|
||||
} else if ($p['validity_unit'] == 'Hrs') {
|
||||
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime($b['expiration'] . ' ' . $b['time'] . ' +' . $p['validity'] . ' hours')));
|
||||
$date_exp = $datetime[0];
|
||||
$time = $datetime[1];
|
||||
} else if ($p['validity_unit'] == 'Mins') {
|
||||
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime($b['expiration'] . ' ' . $b['time'] . ' +' . $p['validity'] . ' minutes')));
|
||||
$date_exp = $datetime[0];
|
||||
$time = $datetime[1];
|
||||
if ($plan_id != $b['plan_id']) {
|
||||
$isChangePlan = true;
|
||||
}
|
||||
if ($config['extend_expiry'] === 'yes') {
|
||||
if ($b['namebp'] == $p['name_plan'] && $b['status'] == 'on') {
|
||||
// if it same internet plan, expired will extend
|
||||
if ($p['validity_unit'] == 'Months') {
|
||||
$date_exp = date("Y-m-d", strtotime($b['expiration'] . ' +' . $p['validity'] . ' months'));
|
||||
$time = $b['time'];
|
||||
} else if ($p['validity_unit'] == 'Period') {
|
||||
$date_exp = date("Y-m-$day_exp", strtotime($b['expiration'] . ' +' . $p['validity'] . ' months'));
|
||||
$time = date("23:59:00");
|
||||
} else if ($p['validity_unit'] == 'Days') {
|
||||
$date_exp = date("Y-m-d", strtotime($b['expiration'] . ' +' . $p['validity'] . ' days'));
|
||||
$time = $b['time'];
|
||||
} else if ($p['validity_unit'] == 'Hrs') {
|
||||
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime($b['expiration'] . ' ' . $b['time'] . ' +' . $p['validity'] . ' hours')));
|
||||
$date_exp = $datetime[0];
|
||||
$time = $datetime[1];
|
||||
} else if ($p['validity_unit'] == 'Mins') {
|
||||
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime($b['expiration'] . ' ' . $b['time'] . ' +' . $p['validity'] . ' minutes')));
|
||||
$date_exp = $datetime[0];
|
||||
$time = $datetime[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($p['is_radius']) {
|
||||
Radius::customerAddPlan($c, $p, "$date_exp $time");
|
||||
} else {
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
Mikrotik::addHotspotUser($client, $p, $c);
|
||||
if ($isChangePlan || $b['status'] == 'off') {
|
||||
if ($p['is_radius']) {
|
||||
Radius::customerAddPlan($c, $p, "$date_exp $time");
|
||||
} else {
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
Mikrotik::addHotspotUser($client, $p, $c);
|
||||
}
|
||||
}
|
||||
|
||||
$b->customer_id = $id_customer;
|
||||
@ -384,35 +396,42 @@ class Package
|
||||
} else {
|
||||
|
||||
if ($b) {
|
||||
if ($b['namebp'] == $p['name_plan'] && $b['status'] == 'on') {
|
||||
// if it same internet plan, expired will extend
|
||||
if ($p['validity_unit'] == 'Months') {
|
||||
$date_exp = date("Y-m-d", strtotime($b['expiration'] . ' +' . $p['validity'] . ' months'));
|
||||
$time = $b['time'];
|
||||
} else if ($p['validity_unit'] == 'Period') {
|
||||
$date_exp = date("Y-m-$day_exp", strtotime($b['expiration'] . ' +' . $p['validity'] . ' months'));
|
||||
$time = date("23:59:00");
|
||||
} else if ($p['validity_unit'] == 'Days') {
|
||||
$date_exp = date("Y-m-d", strtotime($b['expiration'] . ' +' . $p['validity'] . ' days'));
|
||||
$time = $b['time'];
|
||||
} else if ($p['validity_unit'] == 'Hrs') {
|
||||
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime($b['expiration'] . ' ' . $b['time'] . ' +' . $p['validity'] . ' hours')));
|
||||
$date_exp = $datetime[0];
|
||||
$time = $datetime[1];
|
||||
} else if ($p['validity_unit'] == 'Mins') {
|
||||
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime($b['expiration'] . ' ' . $b['time'] . ' +' . $p['validity'] . ' minutes')));
|
||||
$date_exp = $datetime[0];
|
||||
$time = $datetime[1];
|
||||
if ($plan_id != $b['plan_id']) {
|
||||
$isChangePlan = true;
|
||||
}
|
||||
if ($config['extend_expiry'] === 'yes') {
|
||||
if ($b['namebp'] == $p['name_plan'] && $b['status'] == 'on') {
|
||||
// if it same internet plan, expired will extend
|
||||
if ($p['validity_unit'] == 'Months') {
|
||||
$date_exp = date("Y-m-d", strtotime($b['expiration'] . ' +' . $p['validity'] . ' months'));
|
||||
$time = $b['time'];
|
||||
} else if ($p['validity_unit'] == 'Period') {
|
||||
$date_exp = date("Y-m-$day_exp", strtotime($b['expiration'] . ' +' . $p['validity'] . ' months'));
|
||||
$time = date("23:59:00");
|
||||
} else if ($p['validity_unit'] == 'Days') {
|
||||
$date_exp = date("Y-m-d", strtotime($b['expiration'] . ' +' . $p['validity'] . ' days'));
|
||||
$time = $b['time'];
|
||||
} else if ($p['validity_unit'] == 'Hrs') {
|
||||
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime($b['expiration'] . ' ' . $b['time'] . ' +' . $p['validity'] . ' hours')));
|
||||
$date_exp = $datetime[0];
|
||||
$time = $datetime[1];
|
||||
} else if ($p['validity_unit'] == 'Mins') {
|
||||
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime($b['expiration'] . ' ' . $b['time'] . ' +' . $p['validity'] . ' minutes')));
|
||||
$date_exp = $datetime[0];
|
||||
$time = $datetime[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($p['is_radius']) {
|
||||
Radius::customerAddPlan($c, $p, "$date_exp $time");
|
||||
} else {
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
Mikrotik::addPpoeUser($client, $p, $c);
|
||||
if ($isChangePlan || $b['status'] == 'off') {
|
||||
if ($p['is_radius']) {
|
||||
Radius::customerAddPlan($c, $p, "$date_exp $time");
|
||||
} else {
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
Mikrotik::addPpoeUser($client, $p, $c);
|
||||
}
|
||||
}
|
||||
|
||||
$b->customer_id = $id_customer;
|
||||
@ -584,7 +603,7 @@ class Package
|
||||
}
|
||||
run_hook("recharge_user_finish");
|
||||
Message::sendInvoice($c, $t);
|
||||
if($trx){
|
||||
if ($trx) {
|
||||
$trx->trx_invoice = $inv;
|
||||
}
|
||||
return $inv;
|
||||
@ -730,7 +749,7 @@ class Package
|
||||
$invoice .= Lang::pad($note, ' ', 2) . "\n";
|
||||
}
|
||||
$invoice .= Lang::pad("", '=') . "\n";
|
||||
if($cust){
|
||||
if ($cust) {
|
||||
$invoice .= Lang::pads(Lang::T('Full Name'), $cust['fullname'], ' ') . "\n";
|
||||
}
|
||||
$invoice .= Lang::pads(Lang::T('Username'), $in['username'], ' ') . "\n";
|
||||
@ -774,7 +793,7 @@ class Package
|
||||
$invoice .= Lang::pad($note, ' ', 2) . "\n";
|
||||
}
|
||||
$invoice .= Lang::pad("", '=') . "\n";
|
||||
if($cust){
|
||||
if ($cust) {
|
||||
$invoice .= Lang::pads(Lang::T('Full Name'), $cust['fullname'], ' ') . "\n";
|
||||
}
|
||||
$invoice .= Lang::pads(Lang::T('Username'), $in['username'], ' ') . "\n";
|
||||
@ -788,4 +807,11 @@ class Package
|
||||
$ui->assign('whatsapp', urlencode("```$invoice```"));
|
||||
$ui->assign('in', $in);
|
||||
}
|
||||
public static function tax($price, $tax_rate = 1)
|
||||
{
|
||||
// Convert tax rate to decimal
|
||||
$tax_rate_decimal = $tax_rate / 100;
|
||||
$tax = $price * $tax_rate_decimal;
|
||||
return $tax;
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,6 @@ class Paginator
|
||||
}
|
||||
$url .= '&p=';
|
||||
$totalReq = $query->count();
|
||||
$next = $page + 1;
|
||||
$lastpage = ceil($totalReq / $per_page);
|
||||
$lpm1 = $lastpage - 1;
|
||||
$limit = $per_page;
|
||||
|
@ -30,7 +30,10 @@ class Radius
|
||||
{
|
||||
return ORM::for_table('nas', 'radius');
|
||||
}
|
||||
|
||||
public static function getTableAcct()
|
||||
{
|
||||
return ORM::for_table('radacct', 'radius');
|
||||
}
|
||||
public static function getTableCustomer()
|
||||
{
|
||||
return ORM::for_table('radcheck', 'radius');
|
||||
@ -88,9 +91,16 @@ class Radius
|
||||
public static function planUpSert($plan_id, $rate, $pool = null)
|
||||
{
|
||||
$rates = explode('/', $rate);
|
||||
##burst fixed
|
||||
if (strpos($rate, ' ')) {
|
||||
$ratos = $rates[0].'/'.$rates[1].' '.$rates[2].'/'.$rates[3].'/'.$rates[4].'/'.$rates[5].'/'.$rates[6];
|
||||
} else {
|
||||
$ratos = $rates[0].'/'.$rates[1];
|
||||
}
|
||||
|
||||
Radius::upsertPackage($plan_id, 'Ascend-Data-Rate', $rates[1], ':=');
|
||||
Radius::upsertPackage($plan_id, 'Ascend-Xmit-Rate', $rates[0], ':=');
|
||||
Radius::upsertPackage($plan_id, 'Mikrotik-Rate-Limit', $rate, ':=');
|
||||
Radius::upsertPackage($plan_id, 'Mikrotik-Rate-Limit', $ratos, ':=');
|
||||
// if ($pool != null) {
|
||||
// Radius::upsertPackage($plan_id, 'Framed-Pool', $pool, ':=');
|
||||
// }
|
||||
@ -161,6 +171,8 @@ class Radius
|
||||
$p = Radius::getTableUserPackage()->where_equal('username', $customer['username'])->findOne();
|
||||
if ($p) {
|
||||
// if exists
|
||||
Radius::delAtribute(Radius::getTableCustomer(), 'Max-All-Session', 'username', $customer['username']);
|
||||
Radius::delAtribute(Radius::getTableCustomer(), 'Max-Volume', 'username', $customer['username']);
|
||||
$p->groupname = "plan_" . $plan['id'];
|
||||
$p->save();
|
||||
} else {
|
||||
@ -176,38 +188,49 @@ class Radius
|
||||
$timelimit = $plan['time_limit'] * 60 * 60;
|
||||
else
|
||||
$timelimit = $plan['time_limit'] * 60;
|
||||
Radius::upsertCustomer($customer['username'], 'Expire-After', $timelimit);
|
||||
Radius::upsertCustomer($customer['username'], 'Max-All-Session', $timelimit);
|
||||
} else if ($plan['limit_type'] == "Data_Limit") {
|
||||
if ($plan['data_unit'] == 'GB')
|
||||
$datalimit = $plan['data_limit'] . "000000000";
|
||||
else
|
||||
$datalimit = $plan['data_limit'] . "000000";
|
||||
//Radius::upsertCustomer($customer['username'], 'Max-Volume', $datalimit);
|
||||
Radius::upsertCustomer($customer['username'], 'Max-Volume', $datalimit);
|
||||
// Mikrotik Spesific
|
||||
Radius::upsertCustomer($customer['username'], 'Mikrotik-Total-Limit', $datalimit);
|
||||
//Radius::upsertCustomer($customer['username'], 'Max-Data', $datalimit);
|
||||
} else if ($plan['limit_type'] == "Both_Limit") {
|
||||
if ($plan['time_unit'] == 'Hrs')
|
||||
$timelimit = $plan['time_limit'] * 60 * 60;
|
||||
else
|
||||
$timelimit = $plan['time_limit'] . ":00";
|
||||
$timelimit = $plan['time_limit'] * 60;
|
||||
if ($plan['data_unit'] == 'GB')
|
||||
$datalimit = $plan['data_limit'] . "000000000";
|
||||
else
|
||||
$datalimit = $plan['data_limit'] . "000000";
|
||||
//Radius::upsertCustomer($customer['username'], 'Max-Volume', $datalimit);
|
||||
Radius::upsertCustomer($customer['username'], 'Expire-After', $timelimit);
|
||||
Radius::upsertCustomer($customer['username'], 'Max-Volume', $datalimit);
|
||||
Radius::upsertCustomer($customer['username'], 'Max-All-Session', $timelimit);
|
||||
// Mikrotik Spesific
|
||||
Radius::upsertCustomer($customer['username'], 'Mikrotik-Total-Limit', $datalimit);
|
||||
//Radius::upsertCustomer($customer['username'], 'Max-Data', $datalimit);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
//Radius::delAtribute(Radius::getTableCustomer(), 'Max-Volume', 'username', $customer['username']);
|
||||
Radius::delAtribute(Radius::getTableCustomer(), 'Expire-After', 'username', $customer['username']);
|
||||
Radius::delAtribute(Radius::getTableCustomer(), 'Mikrotik-Total-Limit', 'username', $customer['username']);
|
||||
Radius::delAtribute(Radius::getTableCustomer(), 'Max-Volume', 'username', $customer['username']);
|
||||
Radius::delAtribute(Radius::getTableCustomer(), 'Max-All-Session', 'username', $customer['username']);
|
||||
//Radius::delAtribute(Radius::getTableCustomer(), 'Max-Data', 'username', $customer['username']);
|
||||
}
|
||||
|
||||
Radius::disconnectCustomer($customer['username']);
|
||||
Radius::getTableAcct()->where_equal('username', $customer['username'])->delete_many();
|
||||
|
||||
|
||||
// expired user
|
||||
if ($expired != null) {
|
||||
//Radius::upsertCustomer($customer['username'], 'access-period', strtotime($expired) - time());
|
||||
Radius::upsertCustomer($customer['username'], 'expiration', date('d M Y H:i:s', strtotime($expired)));
|
||||
Radius::upsertCustomer($customer['username'], 'Max-All-Session', strtotime($expired) - time());
|
||||
//Radius::upsertCustomer($customer['username'], 'expiration', date('d M Y H:i:s', strtotime($expired)));
|
||||
// Mikrotik Spesific
|
||||
Radius::upsertCustomer(
|
||||
$customer['username'],
|
||||
@ -215,13 +238,15 @@ class Radius
|
||||
date('Y-m-d', strtotime($expired)) . 'T' . date('H:i:s', strtotime($expired)) . Timezone::getTimeOffset($config['timezone'])
|
||||
);
|
||||
} else {
|
||||
//Radius::delAtribute(Radius::getTableCustomer(), 'access-period', 'username', $customer['username']);
|
||||
Radius::delAtribute(Radius::getTableCustomer(), 'expiration', 'username', $customer['username']);
|
||||
Radius::delAtribute(Radius::getTableCustomer(), 'Max-All-Session', 'username', $customer['username']);
|
||||
//Radius::delAtribute(Radius::getTableCustomer(), 'expiration', 'username', $customer['username']);
|
||||
}
|
||||
|
||||
if ($plan['type'] == 'PPPOE') {
|
||||
Radius::upsertCustomerAttr($customer['username'], 'Framed-Pool', $plan['pool'], ':=');
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -267,7 +292,7 @@ class Radius
|
||||
/**
|
||||
* To insert or update existing customer
|
||||
*/
|
||||
private static function upsertCustomer($username, $attr, $value, $op = ':=')
|
||||
public static function upsertCustomer($username, $attr, $value, $op = ':=')
|
||||
{
|
||||
$r = Radius::getTableCustomer()->where_equal('username', $username)->whereEqual('attribute', $attr)->find_one();
|
||||
if (!$r) {
|
||||
|
64
system/autoload/Text.php
Normal file
64
system/autoload/Text.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||
* by https://t.me/ibnux
|
||||
*
|
||||
* This file is for Text Transformation
|
||||
**/
|
||||
|
||||
class Text
|
||||
{
|
||||
|
||||
public static function toHex($string)
|
||||
{
|
||||
return "\x" . implode("\x", str_split(array_shift(unpack('H*', $string)), 2));
|
||||
}
|
||||
|
||||
public static function alphanumeric($str, $tambahan = "")
|
||||
{
|
||||
return preg_replace("/[^a-zA-Z0-9" . $tambahan . "]+/", "", $str);
|
||||
}
|
||||
|
||||
public static function numeric($str)
|
||||
{
|
||||
return preg_replace("/[^0-9]+/", "", $str);
|
||||
}
|
||||
|
||||
public static function ucWords($text)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
public static function maskText($text){
|
||||
$len = strlen($text);
|
||||
if($len < 3){
|
||||
return "***";
|
||||
}else if($len<5){
|
||||
return substr($text,0,1)."***".substr($text,-1,1);
|
||||
}else if($len<8){
|
||||
return substr($text,0,2)."***".substr($text,-2,2);
|
||||
}else{
|
||||
return substr($text,0,4)."******".substr($text,-3,3);
|
||||
}
|
||||
}
|
||||
|
||||
public static function sanitize($str)
|
||||
{
|
||||
return preg_replace("/[^A-Za-z0-9]/", '_', $str);;
|
||||
}
|
||||
}
|
@ -74,7 +74,7 @@ class User
|
||||
list($cost, $rem) = explode(":", $v);
|
||||
// :0 installment is done
|
||||
if ($rem != 0) {
|
||||
User::setAttribute($k, "$cost:".($rem - 1), $id);
|
||||
User::setAttribute($k, "$cost:" . ($rem - 1), $id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -163,7 +163,9 @@ class User
|
||||
$id = User::getID();
|
||||
}
|
||||
$d = ORM::for_table('tbl_customers')->find_one($id);
|
||||
|
||||
if ($d['status'] == 'Banned') {
|
||||
_alert(Lang::T('This account status') . ' : ' . Lang::T($d['status']), 'danger', "logout");
|
||||
}
|
||||
if (empty($d['username'])) {
|
||||
r2(U . 'logout', 'd', '');
|
||||
}
|
||||
@ -177,23 +179,15 @@ class User
|
||||
}
|
||||
$d = ORM::for_table('tbl_user_recharges')
|
||||
->select('tbl_user_recharges.id', 'id')
|
||||
->select('customer_id')
|
||||
->select('username')
|
||||
->select('plan_id')
|
||||
->select('namebp')
|
||||
->select('recharged_on')
|
||||
->select('recharged_time')
|
||||
->select('expiration')
|
||||
->select('time')
|
||||
->select('status')
|
||||
->select('method')
|
||||
->select('plan_type')
|
||||
->select('tbl_user_recharges.routers', 'routers')
|
||||
->select('tbl_user_recharges.type', 'type')
|
||||
->select('admin_id')
|
||||
->select('prepaid')
|
||||
->selects([
|
||||
'customer_id', 'username', 'plan_id', 'namebp', 'recharged_on', 'recharged_time', 'expiration', 'time',
|
||||
'status', 'method', 'plan_type',
|
||||
['tbl_user_recharges.routers', 'routers'],
|
||||
['tbl_user_recharges.type', 'type'],
|
||||
'admin_id', 'prepaid'
|
||||
])
|
||||
->where('customer_id', $id)
|
||||
->join('tbl_plans', array('tbl_plans.id', '=', 'tbl_user_recharges.plan_id'))
|
||||
->left_outer_join('tbl_plans', array('tbl_plans.id', '=', 'tbl_user_recharges.plan_id'))
|
||||
->find_many();
|
||||
return $d;
|
||||
}
|
||||
|
@ -84,7 +84,6 @@ switch ($action) {
|
||||
}
|
||||
echo json_encode(['results' => $json]);
|
||||
die();
|
||||
break;
|
||||
default:
|
||||
$ui->display('a404.tpl');
|
||||
}
|
||||
|
@ -11,4 +11,16 @@ $ui->assign('_system_menu', 'community');
|
||||
$action = $routes['1'];
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
$ui->display('community.tpl');
|
||||
switch ($action) {
|
||||
case 'rollback':
|
||||
$ui->assign('_title', 'Rollback Update');
|
||||
$masters = json_decode(Http::getData("https://api.github.com/repos/hotspotbilling/phpnuxbill/commits?per_page=100",['User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0']), true);
|
||||
$devs = json_decode(Http::getData("https://api.github.com/repos/hotspotbilling/phpnuxbill/commits?sha=Development&per_page=100",['User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0']), true);
|
||||
|
||||
$ui->assign('masters', $masters);
|
||||
$ui->assign('devs', $devs);
|
||||
$ui->display('community-rollback.tpl');
|
||||
break;
|
||||
default:
|
||||
$ui->display('community.tpl');
|
||||
}
|
@ -25,19 +25,19 @@ switch ($action) {
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
_alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard");
|
||||
}
|
||||
|
||||
$cs = ORM::for_table('tbl_customers')
|
||||
->select('tbl_customers.id', 'id')
|
||||
->select('tbl_customers.username', 'username')
|
||||
->select('fullname')
|
||||
->select('address')
|
||||
->select('phonenumber')
|
||||
->select('email')
|
||||
->select('balance')
|
||||
->select('namebp')
|
||||
->select('routers')
|
||||
->select('status')
|
||||
->select('method', 'Payment')
|
||||
->join('tbl_user_recharges', array('tbl_customers.id', '=', 'tbl_user_recharges.customer_id'))
|
||||
->order_by_asc('tbl_customers.id')->find_array();
|
||||
->select('service_type')
|
||||
->order_by_asc('tbl_customers.id')
|
||||
->find_array();
|
||||
|
||||
$h = false;
|
||||
set_time_limit(-1);
|
||||
header('Pragma: public');
|
||||
@ -46,18 +46,105 @@ switch ($action) {
|
||||
header("Content-type: text/csv");
|
||||
header('Content-Disposition: attachment;filename="phpnuxbill_customers_' . date('Y-m-d_H_i') . '.csv"');
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
|
||||
$headers = [
|
||||
'id',
|
||||
'username',
|
||||
'fullname',
|
||||
'address',
|
||||
'phonenumber',
|
||||
'email',
|
||||
'balance',
|
||||
'service_type',
|
||||
];
|
||||
|
||||
if (!$h) {
|
||||
echo '"' . implode('","', $headers) . "\"\n";
|
||||
$h = true;
|
||||
}
|
||||
|
||||
foreach ($cs as $c) {
|
||||
$ks = [];
|
||||
$vs = [];
|
||||
foreach ($c as $k => $v) {
|
||||
$ks[] = $k;
|
||||
$vs[] = $v;
|
||||
}
|
||||
if (!$h) {
|
||||
echo '"' . implode('";"', $ks) . "\"\n";
|
||||
$h = true;
|
||||
}
|
||||
echo '"' . implode('";"', $vs) . "\"\n";
|
||||
$row = [
|
||||
$c['id'],
|
||||
$c['username'],
|
||||
$c['fullname'],
|
||||
$c['address'],
|
||||
$c['phonenumber'],
|
||||
$c['email'],
|
||||
$c['balance'],
|
||||
$c['service_type'],
|
||||
];
|
||||
echo '"' . implode('","', $row) . "\"\n";
|
||||
}
|
||||
break;
|
||||
//case csv-prepaid can be moved later to (plan.php) php file dealing with prepaid users
|
||||
case 'csv-prepaid':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
_alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard");
|
||||
}
|
||||
|
||||
$cs = ORM::for_table('tbl_customers')
|
||||
->select('tbl_customers.id', 'id')
|
||||
->select('tbl_customers.username', 'username')
|
||||
->select('fullname')
|
||||
->select('address')
|
||||
->select('phonenumber')
|
||||
->select('email')
|
||||
->select('balance')
|
||||
->select('service_type')
|
||||
->select('namebp')
|
||||
->select('routers')
|
||||
->select('status')
|
||||
->select('method', 'Payment')
|
||||
->left_outer_join('tbl_user_recharges', array('tbl_customers.id', '=', 'tbl_user_recharges.customer_id'))
|
||||
->order_by_asc('tbl_customers.id')
|
||||
->find_array();
|
||||
|
||||
$h = false;
|
||||
set_time_limit(-1);
|
||||
header('Pragma: public');
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header("Content-type: text/csv");
|
||||
header('Content-Disposition: attachment;filename="phpnuxbill_prepaid_users' . date('Y-m-d_H_i') . '.csv"');
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
|
||||
$headers = [
|
||||
'id',
|
||||
'username',
|
||||
'fullname',
|
||||
'address',
|
||||
'phonenumber',
|
||||
'email',
|
||||
'balance',
|
||||
'service_type',
|
||||
'namebp',
|
||||
'routers',
|
||||
'status',
|
||||
'Payment'
|
||||
];
|
||||
|
||||
if (!$h) {
|
||||
echo '"' . implode('","', $headers) . "\"\n";
|
||||
$h = true;
|
||||
}
|
||||
|
||||
foreach ($cs as $c) {
|
||||
$row = [
|
||||
$c['id'],
|
||||
$c['username'],
|
||||
$c['fullname'],
|
||||
$c['address'],
|
||||
$c['phonenumber'],
|
||||
$c['email'],
|
||||
$c['balance'],
|
||||
$c['service_type'],
|
||||
$c['namebp'],
|
||||
$c['routers'],
|
||||
$c['status'],
|
||||
$c['Payment']
|
||||
];
|
||||
echo '"' . implode('","', $row) . "\"\n";
|
||||
}
|
||||
break;
|
||||
case 'add':
|
||||
@ -97,13 +184,18 @@ switch ($action) {
|
||||
$zero = 1;
|
||||
$gateway = 'Recharge Zero';
|
||||
}
|
||||
$usings = explode(',', $config['payment_usings']);
|
||||
$usings = array_filter(array_unique($usings));
|
||||
if (count($usings) == 0) {
|
||||
$usings[] = Lang::T('Cash');
|
||||
}
|
||||
$ui->assign('usings', $usings);
|
||||
$ui->assign('bills', $bills);
|
||||
$ui->assign('add_cost', $add_cost);
|
||||
$ui->assign('cust', $cust);
|
||||
$ui->assign('gateway', $gateway);
|
||||
$ui->assign('channel', $channel);
|
||||
$ui->assign('server', $b['routers']);
|
||||
$ui->assign('using', 'cash');
|
||||
$ui->assign('plan', $plan);
|
||||
$ui->display('recharge-confirm.tpl');
|
||||
} else {
|
||||
@ -223,6 +315,7 @@ switch ($action) {
|
||||
->find_many();
|
||||
if ($d) {
|
||||
$ui->assign('d', $d);
|
||||
$ui->assign('statuses', ORM::for_table('tbl_customers')->getEnum("status"));
|
||||
$ui->assign('customFields', $customFields);
|
||||
$ui->assign('xheader', $leafletpickerHeader);
|
||||
$ui->display('customers-edit.tpl');
|
||||
@ -299,6 +392,11 @@ switch ($action) {
|
||||
//post Customers Attributes
|
||||
$custom_field_names = (array) $_POST['custom_field_name'];
|
||||
$custom_field_values = (array) $_POST['custom_field_value'];
|
||||
//additional information
|
||||
$city = _post('city');
|
||||
$district = _post('district');
|
||||
$state = _post('state');
|
||||
$zip = _post('zip');
|
||||
|
||||
run_hook('add_customer'); #HOOK
|
||||
$msg = '';
|
||||
@ -330,6 +428,10 @@ switch ($action) {
|
||||
$d->phonenumber = Lang::phoneFormat($phonenumber);
|
||||
$d->service_type = $service_type;
|
||||
$d->coordinates = $coordinates;
|
||||
$d->city = $city;
|
||||
$d->district = $district;
|
||||
$d->state = $state;
|
||||
$d->zip = $zip;
|
||||
$d->save();
|
||||
|
||||
// Retrieve the customer ID of the newly created customer
|
||||
@ -367,6 +469,12 @@ switch ($action) {
|
||||
$phonenumber = Lang::phoneFormat(_post('phonenumber'));
|
||||
$service_type = _post('service_type');
|
||||
$coordinates = _post('coordinates');
|
||||
$status = _post('status');
|
||||
//additional information
|
||||
$city = _post('city');
|
||||
$district = _post('district');
|
||||
$state = _post('state');
|
||||
$zip = _post('zip');
|
||||
run_hook('edit_customer'); #HOOK
|
||||
$msg = '';
|
||||
if (Validator::Length($username, 35, 2) == false) {
|
||||
@ -425,9 +533,14 @@ switch ($action) {
|
||||
$d->email = $email;
|
||||
$d->account_type = $account_type;
|
||||
$d->address = $address;
|
||||
$d->status = $status;
|
||||
$d->phonenumber = $phonenumber;
|
||||
$d->service_type = $service_type;
|
||||
$d->coordinates = $coordinates;
|
||||
$d->city = $city;
|
||||
$d->district = $district;
|
||||
$d->state = $state;
|
||||
$d->zip = $zip;
|
||||
$d->save();
|
||||
|
||||
|
||||
@ -513,11 +626,80 @@ switch ($action) {
|
||||
|
||||
default:
|
||||
run_hook('list_customers'); #HOOK
|
||||
$search = _post('search');
|
||||
$order = _post('order', 'username');
|
||||
$filter = _post('filter', 'Active');
|
||||
$orderby = _post('orderby', 'asc');
|
||||
$order_pos = [
|
||||
'username' => 0,
|
||||
'created_at' => 8,
|
||||
'balance' => 3,
|
||||
'status' => 7
|
||||
];
|
||||
|
||||
$query = ORM::for_table('tbl_customers')->order_by_asc('username');
|
||||
if ($search != '') {
|
||||
$query = ORM::for_table('tbl_customers')
|
||||
->whereRaw("username LIKE '%$search%' OR fullname LIKE '%$search%' OR address LIKE '%$search%' " .
|
||||
"OR phonenumber LIKE '%$search%' OR email LIKE '%$search%' AND status='$filter'");
|
||||
} else {
|
||||
$query = ORM::for_table('tbl_customers');
|
||||
$query->where("status", $filter);
|
||||
}
|
||||
if ($orderby == 'asc') {
|
||||
$query->order_by_asc($order);
|
||||
} else {
|
||||
$query->order_by_desc($order);
|
||||
}
|
||||
$d = $query->findMany();
|
||||
if (_post('export', '') == 'csv') {
|
||||
$h = false;
|
||||
set_time_limit(-1);
|
||||
header('Pragma: public');
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header("Content-type: text/csv");
|
||||
header('Content-Disposition: attachment;filename="phpnuxbill_customers_' . $filter . '_' . date('Y-m-d_H_i') . '.csv"');
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
|
||||
$headers = [
|
||||
'id',
|
||||
'username',
|
||||
'fullname',
|
||||
'address',
|
||||
'phonenumber',
|
||||
'email',
|
||||
'balance',
|
||||
'service_type',
|
||||
];
|
||||
$fp = fopen('php://output', 'wb');
|
||||
if (!$h) {
|
||||
fputcsv($fp, $headers, ";");
|
||||
$h = true;
|
||||
}
|
||||
foreach ($d as $c) {
|
||||
$row = [
|
||||
$c['id'],
|
||||
$c['username'],
|
||||
$c['fullname'],
|
||||
str_replace("\n", " ", $c['address']),
|
||||
$c['phonenumber'],
|
||||
$c['email'],
|
||||
$c['balance'],
|
||||
$c['service_type'],
|
||||
];
|
||||
fputcsv($fp, $row, ";");
|
||||
}
|
||||
fclose($fp);
|
||||
die();
|
||||
}
|
||||
$ui->assign('xheader', '<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">');
|
||||
$ui->assign('d', $d);
|
||||
$ui->assign('statuses', ORM::for_table('tbl_customers')->getEnum("status"));
|
||||
$ui->assign('filter', $filter);
|
||||
$ui->assign('search', $search);
|
||||
$ui->assign('order', $order);
|
||||
$ui->assign('order_pos', $order_pos[$order]);
|
||||
$ui->assign('orderby', $orderby);
|
||||
$ui->display('customers.tpl');
|
||||
break;
|
||||
}
|
||||
|
@ -9,6 +9,17 @@ _admin();
|
||||
$ui->assign('_title', Lang::T('Dashboard'));
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
if(isset($_GET['refresh'])){
|
||||
$files = scandir($CACHE_PATH);
|
||||
foreach ($files as $file) {
|
||||
$ext = pathinfo($file, PATHINFO_EXTENSION);
|
||||
if (is_file($CACHE_PATH . DIRECTORY_SEPARATOR . $file) && $ext == 'temp') {
|
||||
unlink($CACHE_PATH . DIRECTORY_SEPARATOR . $file);
|
||||
}
|
||||
}
|
||||
r2(U . 'dashboard', 's', 'Data Refreshed');
|
||||
}
|
||||
|
||||
$fdate = date('Y-m-01');
|
||||
$tdate = date('Y-m-t');
|
||||
//first day of month
|
||||
|
@ -18,6 +18,9 @@ if (isset($_GET['renewal'])) {
|
||||
|
||||
if (_post('send') == 'balance') {
|
||||
if ($config['enable_balance'] == 'yes' && $config['allow_balance_transfer'] == 'yes') {
|
||||
if ($user['status'] == 'Active') {
|
||||
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
|
||||
}
|
||||
$target = ORM::for_table('tbl_customers')->where('username', _post('username'))->find_one();
|
||||
if (!$target) {
|
||||
r2(U . 'home', 'd', Lang::T('Username not found'));
|
||||
@ -77,6 +80,9 @@ if (_post('send') == 'balance') {
|
||||
r2(U . 'home', 'd', Lang::T('Failed, balance is not available'));
|
||||
}
|
||||
} else if (_post('send') == 'plan') {
|
||||
if ($user['status'] == 'Active') {
|
||||
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
|
||||
}
|
||||
$actives = ORM::for_table('tbl_user_recharges')
|
||||
->where('username', _post('username'))
|
||||
->find_many();
|
||||
@ -92,6 +98,9 @@ if (_post('send') == 'balance') {
|
||||
$ui->assign('_bills', User::_billing());
|
||||
|
||||
if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
||||
if ($user['status'] == 'Active') {
|
||||
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
|
||||
}
|
||||
if (!empty(App::getTokenValue(_get('stoken')))) {
|
||||
r2(U . "voucher/invoice/");
|
||||
die();
|
||||
@ -119,7 +128,10 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
||||
}
|
||||
}
|
||||
} else if (!empty(_get('extend'))) {
|
||||
if(!$config['extend_expired']){
|
||||
if ($user['status'] == 'Active') {
|
||||
_alert(Lang::T('This account status') . ' : ' . Lang::T($user['status']), 'danger', "");
|
||||
}
|
||||
if (!$config['extend_expired']) {
|
||||
r2(U . 'home', 'e', "cannot extend");
|
||||
}
|
||||
if (!empty(App::getTokenValue(_get('stoken')))) {
|
||||
@ -130,7 +142,7 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
||||
if ($tur) {
|
||||
$m = date("m");
|
||||
$path = $CACHE_PATH . DIRECTORY_SEPARATOR . "extends" . DIRECTORY_SEPARATOR;
|
||||
if(!file_exists($path)){
|
||||
if (!file_exists($path)) {
|
||||
mkdir($path);
|
||||
}
|
||||
$path .= $user['id'] . ".txt";
|
||||
@ -142,33 +154,41 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
||||
}
|
||||
}
|
||||
if ($tur['status'] != 'on') {
|
||||
$days = $config['extend_days'];
|
||||
$expiration = date('Y-m-d', strtotime(" +$days day"));
|
||||
$tur->expiration = $expiration;
|
||||
$tur->status = "on";
|
||||
$tur->save();
|
||||
App::setToken(_get('stoken'), $id);
|
||||
if ($tur['routers'] != 'radius') {
|
||||
$mikrotik = Mikrotik::info($tur['routers']);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
$router = $tur['routers'];
|
||||
}
|
||||
$p = ORM::for_table('tbl_plans')->findOne($tur['plan_id']);
|
||||
$c = ORM::for_table('tbl_customers')->findOne($tur['customer_id']);
|
||||
if (!$p) {
|
||||
r2(U . 'home', '3', "Plan Not Found");
|
||||
}
|
||||
if ($tur['routers'] == 'radius') {
|
||||
Radius::customerAddPlan($c, $p, $tur['expiration'] . ' ' . $tur['time']);
|
||||
Radius::customerAddPlan($user, $p, $tur['expiration'] . ' ' . $tur['time']);
|
||||
} else {
|
||||
if ($tur['type'] == 'Hotspot') {
|
||||
Mikrotik::addHotspotUser($client, $p, $c);
|
||||
Mikrotik::removeHotspotUser($client, $user['username']);
|
||||
Mikrotik::addHotspotUser($client, $p, $user);
|
||||
} else if ($tur['type'] == 'PPPOE') {
|
||||
Mikrotik::addPpoeUser($client, $p, $c);
|
||||
Mikrotik::removePpoeUser($client, $user['username']);
|
||||
Mikrotik::addPpoeUser($client, $p, $user);
|
||||
}
|
||||
}
|
||||
// make customer cannot extend again
|
||||
$days = $config['extend_days'];
|
||||
$expiration = date('Y-m-d', strtotime(" +$days day"));
|
||||
$tur->expiration = $expiration;
|
||||
$tur->status = "on";
|
||||
$tur->save();
|
||||
App::setToken(_get('stoken'), $id);
|
||||
file_put_contents($path, $m);
|
||||
_log("Customer $tur[customer_id] $tur[username] extend for $days days", "Customer", $user['id']);
|
||||
Message::sendTelegram("#u$user[username] #extend #" . $p['type'] . " \n" . $p['name_plan'] .
|
||||
"\nLocation: " . $p['routers'] .
|
||||
"\nCustomer: " . $user['fullname'] .
|
||||
"\nNew Expired: " . Lang::dateAndTimeFormat($expiration, $tur['time']));
|
||||
r2(U . 'home', 's', "Extend until $expiration");
|
||||
}else{
|
||||
} else {
|
||||
r2(U . 'home', 'e', "Plan is not expired");
|
||||
}
|
||||
} else {
|
||||
|
@ -5,8 +5,13 @@
|
||||
* by https://t.me/ibnux
|
||||
**/
|
||||
|
||||
if(User::getID()){
|
||||
r2(U.'home');
|
||||
$maintenance_mode = $config['maintenance_mode'];
|
||||
if ($maintenance_mode == true){
|
||||
displayMaintenanceMessage();
|
||||
}
|
||||
|
||||
if (User::getID()) {
|
||||
r2(U . 'home');
|
||||
}
|
||||
|
||||
if (isset($routes['1'])) {
|
||||
@ -24,13 +29,16 @@ switch ($do) {
|
||||
$d = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||
if ($d) {
|
||||
$d_pass = $d['password'];
|
||||
if ($d['status'] == 'Banned') {
|
||||
_alert(Lang::T('This account status') . ' : ' . Lang::T($d['status']), 'danger', "");
|
||||
}
|
||||
if (Password::_uverify($password, $d_pass) == true) {
|
||||
$_SESSION['uid'] = $d['id'];
|
||||
User::setCookie($d['id']);
|
||||
$d->last_login = date('Y-m-d H:i:s');
|
||||
$d->save();
|
||||
_log($username . ' ' . Lang::T('Login Successful'), 'User', $d['id']);
|
||||
_alert(Lang::T('Login Successful'),'success', "home");
|
||||
_alert(Lang::T('Login Successful'), 'success', "home");
|
||||
} else {
|
||||
_msglog('e', Lang::T('Invalid Username or Password'));
|
||||
_log($username . ' ' . Lang::T('Failed Login'), 'User');
|
||||
@ -68,7 +76,7 @@ switch ($do) {
|
||||
r2(U . 'login', 'e', Lang::T('Voucher activation failed'));
|
||||
}
|
||||
} else {
|
||||
_alert(Lang::T('Login Successful'),'success', "dashboard");
|
||||
_alert(Lang::T('Login Successful'), 'success', "dashboard");
|
||||
r2(U . 'login', 'e', Lang::T('Voucher activation failed') . '.');
|
||||
}
|
||||
}
|
||||
|
@ -17,8 +17,14 @@ if (empty($action)) {
|
||||
|
||||
switch ($action) {
|
||||
case 'customer':
|
||||
|
||||
$c = ORM::for_table('tbl_customers')->find_many();
|
||||
if(!empty(_req('search'))){
|
||||
$search = _req('search');
|
||||
$query = ORM::for_table('tbl_customers')->whereRaw("coordinates != '' AND fullname LIKE '%$search%' OR username LIKE '%$search%' OR email LIKE '%$search%' OR phonenumber LIKE '%$search%'")->order_by_desc('fullname');
|
||||
$c = Paginator::findMany($query, ['search' => $search], 50);
|
||||
}else{
|
||||
$query = ORM::for_table('tbl_customers')->where_not_equal('coordinates','');
|
||||
$c = Paginator::findMany($query, ['search'=>''], 50);
|
||||
}
|
||||
$customerData = [];
|
||||
|
||||
foreach ($c as $customer) {
|
||||
@ -34,7 +40,7 @@ switch ($action) {
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$ui->assign('search', $search);
|
||||
$ui->assign('customers', $customerData);
|
||||
$ui->assign('xheader', '<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.3/dist/leaflet.css">');
|
||||
$ui->assign('_title', Lang::T('Customer Geo Location Information'));
|
||||
|
@ -131,7 +131,7 @@ switch ($action) {
|
||||
$router = Mikrotik::info($trx['routers']);
|
||||
$plan = ORM::for_table('tbl_plans')->find_one($trx['plan_id']);
|
||||
$bandw = ORM::for_table('tbl_bandwidth')->find_one($plan['id_bw']);
|
||||
$invoice = ORM::for_table('tbl_transactions')->where("invoice",$trx['trx_invoice'])->find_one();
|
||||
$invoice = ORM::for_table('tbl_transactions')->where("invoice", $trx['trx_invoice'])->find_one();
|
||||
$ui->assign('invoice', $invoice);
|
||||
$ui->assign('trx', $trx);
|
||||
$ui->assign('router', $router);
|
||||
@ -160,23 +160,44 @@ switch ($action) {
|
||||
} else {
|
||||
$router_name = $plan['routers'];
|
||||
}
|
||||
|
||||
list($bills, $add_cost) = User::getBills($id_customer);
|
||||
if ($plan && $plan['enabled'] && $user['balance'] >= $plan['price']) {
|
||||
|
||||
// Tax calculation start
|
||||
$tax_enable = isset($config['enable_tax']) ? $config['enable_tax'] : 'no';
|
||||
$tax_rate_setting = isset($config['tax_rate']) ? $config['tax_rate'] : null;
|
||||
$custom_tax_rate = isset($config['custom_tax_rate']) ? (float)$config['custom_tax_rate'] : null;
|
||||
|
||||
if ($tax_rate_setting === 'custom') {
|
||||
$tax_rate = $custom_tax_rate;
|
||||
} else {
|
||||
$tax_rate = $tax_rate_setting;
|
||||
}
|
||||
|
||||
if ($tax_enable === 'yes') {
|
||||
$tax = Package::tax($plan['price'], $tax_rate);
|
||||
} else {
|
||||
$tax = 0;
|
||||
}
|
||||
// Tax calculation stop
|
||||
|
||||
if ($plan && $plan['enabled'] && $user['balance'] >= $plan['price'] + $tax) {
|
||||
if (Package::rechargeUser($user['id'], $router_name, $plan['id'], 'Customer', 'Balance')) {
|
||||
// if success, then get the balance
|
||||
Balance::min($user['id'], $plan['price'] + $add_cost);
|
||||
Balance::min($user['id'], $plan['price'] + $add_cost + $tax);
|
||||
App::setToken($_GET['stoken'], "success");
|
||||
r2(U . "voucher/invoice/", 's', Lang::T("Success to buy package"));
|
||||
} else {
|
||||
r2(U . "order/package", 'e', Lang::T("Failed to buy package"));
|
||||
Message::sendTelegram("Buy Package with Balance Failed\n\n#u$c[username] #buy \n" . $plan['name_plan'] .
|
||||
"\nRouter: " . $router_name .
|
||||
"\nPrice: " . $p['price']);
|
||||
"\nPrice: " . $plan['price'] + $tax);
|
||||
}
|
||||
} else {
|
||||
r2(U . "home", 'e', 'Plan is not exists');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'send':
|
||||
if ($config['enable_balance'] != 'yes') {
|
||||
r2(U . "order/package", 'e', Lang::T("Balance not enabled"));
|
||||
@ -195,6 +216,27 @@ switch ($action) {
|
||||
} else {
|
||||
$router_name = $plan['routers'];
|
||||
}
|
||||
$tax_rate_setting = isset($config['tax_rate']) ? $config['tax_rate'] : null;
|
||||
$custom_tax_rate = isset($config['custom_tax_rate']) ? (float)$config['custom_tax_rate'] : null;
|
||||
|
||||
if ($tax_rate_setting === 'custom') {
|
||||
$tax_rate = $custom_tax_rate;
|
||||
} else {
|
||||
$tax_rate = $tax_rate_setting;
|
||||
}
|
||||
|
||||
$tax_enable = isset($config['enable_tax']) ? $config['enable_tax'] : 'no';
|
||||
|
||||
if ($tax_enable === 'yes') {
|
||||
$tax = Package::tax($plan['price'], $tax_rate);
|
||||
$ui->assign('tax', $tax);
|
||||
} else {
|
||||
$tax = 0;
|
||||
}
|
||||
|
||||
// Add tax to plan price
|
||||
$plan['price'] += $tax;
|
||||
|
||||
if (isset($_POST['send']) && $_POST['send'] == 'plan') {
|
||||
$target = ORM::for_table('tbl_customers')->where('username', _post('username'))->find_one();
|
||||
list($bills, $add_cost) = User::getBills($target['id']);
|
||||
@ -203,6 +245,7 @@ switch ($action) {
|
||||
$ui->assign('add_cost', $add_cost);
|
||||
$plan['price'] += $add_cost;
|
||||
}
|
||||
|
||||
if (!$target) {
|
||||
r2(U . 'home', 'd', Lang::T('Username not found'));
|
||||
}
|
||||
@ -263,15 +306,22 @@ switch ($action) {
|
||||
$d->save();
|
||||
r2(U . "order/view/$trx_id", 's', Lang::T("Success to send package"));
|
||||
} else {
|
||||
r2(U . "order/package", 'e', Lang::T("Failed to Send package"));
|
||||
Message::sendTelegram("Send Package with Balance Failed\n\n#u$user[username] #send \n" . $plan['name_plan'] .
|
||||
$errorMessage = "Send Package with Balance Failed\n\n#u$user[username] #send \n" . $plan['name_plan'] .
|
||||
"\nRouter: " . $router_name .
|
||||
"\nPrice: " . $plan['price']);
|
||||
"\nPrice: " . $plan['price'];
|
||||
|
||||
if ($tax_enable === 'yes') {
|
||||
$errorMessage .= "\nTax: " . $tax;
|
||||
}
|
||||
|
||||
r2(U . "order/package", 'e', Lang::T("Failed to Send package"));
|
||||
Message::sendTelegram($errorMessage);
|
||||
}
|
||||
}
|
||||
$ui->assign('username', $_GET['u']);
|
||||
$ui->assign('router', $router_name);
|
||||
$ui->assign('plan', $plan);
|
||||
$ui->assign('tax', $tax);
|
||||
$ui->display('user-sendPlan.tpl');
|
||||
break;
|
||||
case 'gateway':
|
||||
@ -280,6 +330,16 @@ switch ($action) {
|
||||
if (strpos($user['email'], '@') === false) {
|
||||
r2(U . 'accounts/profile', 'e', Lang::T("Please enter your email address"));
|
||||
}
|
||||
$tax_enable = isset($config['enable_tax']) ? $config['enable_tax'] : 'no';
|
||||
$tax_rate_setting = isset($config['tax_rate']) ? $config['tax_rate'] : null;
|
||||
$custom_tax_rate = isset($config['custom_tax_rate']) ? (float)$config['custom_tax_rate'] : null;
|
||||
if ($tax_rate_setting === 'custom') {
|
||||
$tax_rate = $custom_tax_rate;
|
||||
} else {
|
||||
$tax_rate = $tax_rate_setting;
|
||||
}
|
||||
$plan = ORM::for_table('tbl_plans')->find_one($routes['3']);
|
||||
$tax = Package::tax($plan['price'], $tax_rate);
|
||||
$pgs = array_values(explode(',', $config['payment_gateway']));
|
||||
if (count($pgs) == 0) {
|
||||
sendTelegram("Payment Gateway not set, please set it in Settings");
|
||||
@ -288,11 +348,12 @@ switch ($action) {
|
||||
}
|
||||
if (count($pgs) > 1) {
|
||||
$ui->assign('pgs', $pgs);
|
||||
//$ui->assign('pgs', $pgs);
|
||||
if ($tax_enable === 'yes') {
|
||||
$ui->assign('tax', $tax);
|
||||
}
|
||||
$ui->assign('route2', $routes[2]);
|
||||
$ui->assign('route3', $routes[3]);
|
||||
|
||||
//$ui->assign('plan', $plan);
|
||||
$ui->assign('plan', $plan);
|
||||
$ui->display('user-selectGateway.tpl');
|
||||
break;
|
||||
} else {
|
||||
@ -348,9 +409,23 @@ switch ($action) {
|
||||
}
|
||||
}
|
||||
$add_cost = 0;
|
||||
$tax = 0;
|
||||
if ($router['name'] != 'balance') {
|
||||
list($bills, $add_cost) = User::getBills($id_customer);
|
||||
}
|
||||
// Tax calculation start
|
||||
$tax_enable = isset($config['enable_tax']) ? $config['enable_tax'] : 'no';
|
||||
$tax_rate_setting = isset($config['tax_rate']) ? $config['tax_rate'] : null;
|
||||
$custom_tax_rate = isset($config['custom_tax_rate']) ? (float)$config['custom_tax_rate'] : null;
|
||||
if ($tax_rate_setting === 'custom') {
|
||||
$tax_rate = $custom_tax_rate;
|
||||
} else {
|
||||
$tax_rate = $tax_rate_setting;
|
||||
}
|
||||
if ($tax_enable === 'yes') {
|
||||
$tax = Package::tax($plan['price'], $tax_rate);
|
||||
}
|
||||
// Tax calculation stop
|
||||
if (empty($id)) {
|
||||
$d = ORM::for_table('tbl_payment_gateway')->create();
|
||||
$d->username = $user['username'];
|
||||
@ -363,12 +438,12 @@ switch ($action) {
|
||||
// Postpaid price from field
|
||||
$add_inv = User::getAttribute("Invoice", $id_customer);
|
||||
if (empty($add_inv) or $add_inv == 0) {
|
||||
$d->price = ($plan['price'] + $add_cost);
|
||||
$d->price = ($plan['price'] + $add_cost + $tax);
|
||||
} else {
|
||||
$d->price = ($add_inv + $add_cost);
|
||||
$d->price = ($add_inv + $add_cost + $tax);
|
||||
}
|
||||
} else {
|
||||
$d->price = ($plan['price'] + $add_cost);
|
||||
$d->price = ($plan['price'] + $add_cost + $tax);
|
||||
}
|
||||
//$d->price = ($plan['price'] + $add_cost);
|
||||
$d->created_date = date('Y-m-d H:i:s');
|
||||
@ -386,12 +461,12 @@ switch ($action) {
|
||||
// Postpaid price from field
|
||||
$add_inv = User::getAttribute("Invoice", $id_customer);
|
||||
if (empty($add_inv) or $add_inv == 0) {
|
||||
$d->price = ($plan['price'] + $add_cost);
|
||||
$d->price = ($plan['price'] + $add_cost + $tax);
|
||||
} else {
|
||||
$d->price = ($add_inv + $add_cost);
|
||||
$d->price = ($add_inv + $add_cost + $tax);
|
||||
}
|
||||
} else {
|
||||
$d->price = ($plan['price'] + $add_cost);
|
||||
$d->price = ($plan['price'] + $add_cost + $tax);
|
||||
}
|
||||
//$d->price = ($plan['price'] + $add_cost);
|
||||
$d->created_date = date('Y-m-d H:i:s');
|
||||
|
@ -68,6 +68,12 @@ switch ($action) {
|
||||
if (isset($routes['2']) && !empty($routes['2'])) {
|
||||
$ui->assign('cust', ORM::for_table('tbl_customers')->find_one($routes['2']));
|
||||
}
|
||||
$usings = explode(',', $config['payment_usings']);
|
||||
$usings = array_filter(array_unique($usings));
|
||||
if(count($usings)==0){
|
||||
$usings[] = Lang::T('Cash');
|
||||
}
|
||||
$ui->assign('usings', $usings);
|
||||
run_hook('view_recharge'); #HOOK
|
||||
$ui->display('recharge.tpl');
|
||||
break;
|
||||
@ -108,6 +114,12 @@ switch ($action) {
|
||||
$zero = 1;
|
||||
$gateway = 'Recharge Zero';
|
||||
}
|
||||
$usings = explode(',', $config['payment_usings']);
|
||||
$usings = array_filter(array_unique($usings));
|
||||
if(count($usings)==0){
|
||||
$usings[] = Lang::T('Cash');
|
||||
}
|
||||
$ui->assign('usings', $usings);
|
||||
$ui->assign('bills', $bills);
|
||||
$ui->assign('add_cost', $add_cost);
|
||||
$ui->assign('cust', $cust);
|
||||
@ -132,7 +144,7 @@ switch ($action) {
|
||||
$using = _post('using');
|
||||
$stoken = _post('stoken');
|
||||
|
||||
if(!empty(App::getTokenValue($stoken))){
|
||||
if (!empty(App::getTokenValue($stoken))) {
|
||||
$username = App::getTokenValue($stoken);
|
||||
$in = ORM::for_table('tbl_transactions')->where('username', $username)->order_by_desc('id')->find_one();
|
||||
Package::createInvoice($in);
|
||||
@ -146,7 +158,7 @@ switch ($action) {
|
||||
}
|
||||
|
||||
if ($msg == '') {
|
||||
$gateway = 'Recharge';
|
||||
$gateway = ucwords($using);
|
||||
$channel = $admin['fullname'];
|
||||
$cust = User::_info($id_customer);
|
||||
list($bills, $add_cost) = User::getBills($id_customer);
|
||||
@ -325,18 +337,13 @@ switch ($action) {
|
||||
|
||||
case 'voucher':
|
||||
$ui->assign('_title', Lang::T('Vouchers'));
|
||||
$limit = 10;
|
||||
$page = _get('p', 0);
|
||||
$pageNow = $page * $limit;
|
||||
$search = _req('search');
|
||||
if ($search != '') {
|
||||
if (in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
$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', '%' . $search . '%')
|
||||
->offset($pageNow)
|
||||
->limit($limit)
|
||||
->findArray();
|
||||
$query = ORM::for_table('tbl_plans')->where('enabled', '1')
|
||||
->left_outer_join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where_like('tbl_voucher.code', '%' . $search . '%');
|
||||
$d = Paginator::findMany($query, ["search" => $search]);
|
||||
} else if ($admin['user_type'] == 'Agent') {
|
||||
$sales = [];
|
||||
$sls = ORM::for_table('tbl_users')->select('id')->where('root', $admin['id'])->findArray();
|
||||
@ -344,21 +351,17 @@ switch ($action) {
|
||||
$sales[] = $s['id'];
|
||||
}
|
||||
$sales[] = $admin['id'];
|
||||
$d = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
$query = ORM::for_table('tbl_plans')
|
||||
->left_outer_join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where_in('generated_by', $sales)
|
||||
->where_like('tbl_voucher.code', '%' . $search . '%')
|
||||
->offset($pageNow)
|
||||
->limit($limit)
|
||||
->findArray();
|
||||
->where_like('tbl_voucher.code', '%' . $search . '%');
|
||||
$d = Paginator::findMany($query, ["search" => $search]);
|
||||
}
|
||||
} else {
|
||||
if (in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
$d = ORM::for_table('tbl_plans')->where('enabled', '1')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->offset($pageNow)
|
||||
->limit($limit)
|
||||
->findArray();
|
||||
$query = ORM::for_table('tbl_plans')->where('enabled', '1')
|
||||
->left_outer_join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'));
|
||||
$d = Paginator::findMany($query);
|
||||
} else if ($admin['user_type'] == 'Agent') {
|
||||
$sales = [];
|
||||
$sls = ORM::for_table('tbl_users')->select('id')->where('root', $admin['id'])->findArray();
|
||||
@ -366,12 +369,10 @@ switch ($action) {
|
||||
$sales[] = $s['id'];
|
||||
}
|
||||
$sales[] = $admin['id'];
|
||||
$d = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where_in('generated_by', $sales)
|
||||
->offset($pageNow)
|
||||
->limit($limit)
|
||||
->findArray();
|
||||
$query = ORM::for_table('tbl_plans')
|
||||
->left_outer_join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where_in('generated_by', $sales);
|
||||
$d = Paginator::findMany($query);
|
||||
}
|
||||
}
|
||||
// extract admin
|
||||
@ -452,43 +453,43 @@ switch ($action) {
|
||||
|
||||
if ($from_id > 0 && $planid > 0) {
|
||||
$v = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->left_outer_join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status', '0')
|
||||
->where('tbl_plans.id', $planid)
|
||||
->where_gt('tbl_voucher.id', $from_id)
|
||||
->limit($limit);
|
||||
$vc = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->left_outer_join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status', '0')
|
||||
->where('tbl_plans.id', $planid)
|
||||
->where_gt('tbl_voucher.id', $from_id);
|
||||
} else if ($from_id == 0 && $planid > 0) {
|
||||
$v = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->left_outer_join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status', '0')
|
||||
->where('tbl_plans.id', $planid)
|
||||
->limit($limit);
|
||||
$vc = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->left_outer_join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status', '0')
|
||||
->where('tbl_plans.id', $planid);
|
||||
} else if ($from_id > 0 && $planid == 0) {
|
||||
$v = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->left_outer_join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status', '0')
|
||||
->where_gt('tbl_voucher.id', $from_id)
|
||||
->limit($limit);
|
||||
$vc = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->left_outer_join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status', '0')
|
||||
->where_gt('tbl_voucher.id', $from_id);
|
||||
} else {
|
||||
$v = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->left_outer_join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status', '0')
|
||||
->limit($limit);
|
||||
$vc = ORM::for_table('tbl_plans')
|
||||
->join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->left_outer_join('tbl_voucher', array('tbl_plans.id', '=', 'tbl_voucher.id_plan'))
|
||||
->where('tbl_voucher.status', '0');
|
||||
}
|
||||
if (in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
@ -574,13 +575,27 @@ switch ($action) {
|
||||
}
|
||||
}
|
||||
run_hook('create_voucher'); #HOOK
|
||||
for ($i = 0; $i < $numbervoucher; $i++) {
|
||||
$code = strtoupper(substr(md5(time() . rand(10000, 99999)), 0, $lengthcode));
|
||||
if ($voucher_format == 'low') {
|
||||
$code = strtolower($code);
|
||||
} else if ($voucher_format == 'rand') {
|
||||
$code = Lang::randomUpLowCase($code);
|
||||
$vouchers = [];
|
||||
if($voucher_format == 'numbers'){
|
||||
if (strlen($lengthcode)<6) {
|
||||
$msg .= 'The Length Code must be a more than 6 for numbers' . '<br>';
|
||||
}
|
||||
$vouchers = generateUniqueNumericVouchers($numbervoucher, $lengthcode);
|
||||
}
|
||||
else {
|
||||
for ($i = 0; $i < $numbervoucher; $i++) {
|
||||
$code = strtoupper(substr(md5(time() . rand(10000, 99999)), 0, $lengthcode));
|
||||
if ($voucher_format == 'low') {
|
||||
$code = strtolower($code);
|
||||
} else if ($voucher_format == 'rand') {
|
||||
$code = Lang::randomUpLowCase($code);
|
||||
}
|
||||
$vouchers[] = $code;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
foreach($vouchers as $code){
|
||||
$d = ORM::for_table('tbl_voucher')->create();
|
||||
$d->type = $type;
|
||||
$d->routers = $server;
|
||||
@ -621,7 +636,7 @@ switch ($action) {
|
||||
if (!$voucher) {
|
||||
r2(U . 'plan/voucher/', 'e', Lang::T('Voucher Not Found'));
|
||||
}
|
||||
$plan = ORM::for_table('tbl_plans')->find_one($d['id_plan']);
|
||||
$plan = ORM::for_table('tbl_plans')->find_one($voucher['id_plan']);
|
||||
if ($voucher && $plan) {
|
||||
$content = Lang::pad($config['CompanyName'], ' ', 2) . "\n";
|
||||
$content .= Lang::pad($config['address'], ' ', 2) . "\n";
|
||||
@ -724,6 +739,14 @@ switch ($action) {
|
||||
}
|
||||
$user = _post('id_customer');
|
||||
$plan = _post('id_plan');
|
||||
$stoken = _req('stoken');
|
||||
if (App::getTokenValue($stoken)) {
|
||||
$c = ORM::for_table('tbl_customers')->where('id', $user)->find_one();
|
||||
$in = ORM::for_table('tbl_transactions')->where('username', $c['username'])->order_by_desc('id')->find_one();
|
||||
Package::createInvoice($in);
|
||||
$ui->display('invoice.tpl');
|
||||
die();
|
||||
}
|
||||
|
||||
run_hook('deposit_customer'); #HOOK
|
||||
if (!empty($user) && !empty($plan)) {
|
||||
@ -731,6 +754,9 @@ switch ($action) {
|
||||
$c = ORM::for_table('tbl_customers')->where('id', $user)->find_one();
|
||||
$in = ORM::for_table('tbl_transactions')->where('username', $c['username'])->order_by_desc('id')->find_one();
|
||||
Package::createInvoice($in);
|
||||
if(!empty($stoken)){
|
||||
App::setToken($stoken, $in['id']);
|
||||
}
|
||||
$ui->display('invoice.tpl');
|
||||
} else {
|
||||
r2(U . 'plan/refill', 'e', "Failed to refill account");
|
||||
@ -743,23 +769,23 @@ switch ($action) {
|
||||
$id = $routes[2];
|
||||
$days = $routes[3];
|
||||
$stoken = $_GET['stoken'];
|
||||
if(App::getTokenValue($stoken)){
|
||||
if (App::getTokenValue($stoken)) {
|
||||
r2(U . 'plan', 's', "Extend already done");
|
||||
}
|
||||
$tur = ORM::for_table('tbl_user_recharges')->find_one($id);
|
||||
$status = $tur['status'];
|
||||
if(strtotime($tur['expiration'].' '.$tur['time']) > time()){
|
||||
// not expired
|
||||
$expiration = date('Y-m-d', strtotime($tur['expiration']." +$days day"));
|
||||
}else{
|
||||
//expired
|
||||
$expiration = date('Y-m-d', strtotime(" +$days day"));
|
||||
}
|
||||
$tur->expiration = $expiration;
|
||||
$tur->status = "on";
|
||||
$tur->save();
|
||||
App::setToken($stoken, $id);
|
||||
if($status=='off'){
|
||||
if ($status == 'off') {
|
||||
if (strtotime($tur['expiration'] . ' ' . $tur['time']) > time()) {
|
||||
// not expired
|
||||
$expiration = date('Y-m-d', strtotime($tur['expiration'] . " +$days day"));
|
||||
} else {
|
||||
//expired
|
||||
$expiration = date('Y-m-d', strtotime(" +$days day"));
|
||||
}
|
||||
$tur->expiration = $expiration;
|
||||
$tur->status = "on";
|
||||
$tur->save();
|
||||
App::setToken($stoken, $id);
|
||||
if ($tur['routers'] != 'radius') {
|
||||
$mikrotik = Mikrotik::info($tur['routers']);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
@ -771,21 +797,29 @@ switch ($action) {
|
||||
Radius::customerAddPlan($c, $p, $tur['expiration'] . ' ' . $tur['time']);
|
||||
} else {
|
||||
if ($tur['type'] == 'Hotspot') {
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
Mikrotik::addHotspotUser($client, $p, $c);
|
||||
} else if ($tur['type'] == 'PPPOE') {
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
Mikrotik::addPpoeUser($client, $p, $c);
|
||||
}
|
||||
}
|
||||
_log("$admin[fullname] extend Customer $tur[customer_id] $tur[username] for $days days", $admin['user_type'], $admin['id']);
|
||||
r2(U . 'plan', 's', "Extend until $expiration");
|
||||
}else{
|
||||
r2(U . 'plan', 's', "Customer is not expired yet");
|
||||
}
|
||||
_log("$admin[fullname] extend Customer $tur[customer_id] $tur[username] for $days days", $admin['user_type'], $admin['id']);
|
||||
r2(U . 'plan', 's', "Extend until $expiration");
|
||||
break;
|
||||
default:
|
||||
$ui->assign('xfooter', '<script type="text/javascript" src="ui/lib/c/plan.js"></script>');
|
||||
$ui->assign('_title', Lang::T('Customer'));
|
||||
$search = _post('search');
|
||||
if ($search != '') {
|
||||
$query = ORM::for_table('tbl_user_recharges')->where_like('username', '%' . $search . '%')->order_by_desc('id');
|
||||
$query = ORM::for_table('tbl_user_recharges')
|
||||
->whereRaw("username LIKE '%$search%' OR namebp LIKE '%$search%' OR method LIKE '%$search%' OR routers LIKE '%$search%' OR type LIKE '%$search%'")
|
||||
->order_by_desc('id');
|
||||
$d = Paginator::findMany($query, ['search' => $search]);
|
||||
} else {
|
||||
$query = ORM::for_table('tbl_user_recharges')->order_by_desc('id');
|
||||
|
@ -23,7 +23,7 @@ switch ($action) {
|
||||
case 'sync':
|
||||
set_time_limit(-1);
|
||||
if ($routes['2'] == 'hotspot') {
|
||||
$plans = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'Hotspot')->where('tbl_plans.enabled', '1')->find_many();
|
||||
$plans = ORM::for_table('tbl_bandwidth')->left_outer_join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'Hotspot')->where('tbl_plans.enabled', '1')->find_many();
|
||||
$log = '';
|
||||
$router = '';
|
||||
foreach ($plans as $plan) {
|
||||
@ -38,7 +38,7 @@ switch ($action) {
|
||||
} else {
|
||||
$radup = '000000';
|
||||
}
|
||||
$radiusRate = $plan['rate_up'] . $radup . '/' . $plan['rate_down'] . $raddown;
|
||||
$radiusRate = $plan['rate_up'] . $radup . '/' . $plan['rate_down'] . $raddown . '/' . $plan['burst'];
|
||||
Radius::planUpSert($plan['id'], $radiusRate);
|
||||
$log .= "DONE : Radius $plan[name_plan], $plan[shared_users], $radiusRate<br>";
|
||||
} else {
|
||||
@ -68,7 +68,7 @@ switch ($action) {
|
||||
}
|
||||
r2(U . 'services/hotspot', 's', $log);
|
||||
} else if ($routes['2'] == 'pppoe') {
|
||||
$plans = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'PPPOE')->where('tbl_plans.enabled', '1')->find_many();
|
||||
$plans = ORM::for_table('tbl_bandwidth')->left_outer_join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'PPPOE')->where('tbl_plans.enabled', '1')->find_many();
|
||||
$log = '';
|
||||
$router = '';
|
||||
foreach ($plans as $plan) {
|
||||
@ -83,7 +83,7 @@ switch ($action) {
|
||||
} else {
|
||||
$radup = '000000';
|
||||
}
|
||||
$radiusRate = $plan['rate_up'] . $radup . '/' . $plan['rate_down'] . $raddown;
|
||||
$radiusRate = $plan['rate_up'] . $radup . '/' . $plan['rate_down'] . $raddown . '/' . $plan['burst'];
|
||||
Radius::planUpSert($plan['id'], $radiusRate, $plan['pool']);
|
||||
$log .= "DONE : RADIUS $plan[name_plan], $plan[pool], $rate<br>";
|
||||
} else {
|
||||
@ -119,10 +119,10 @@ switch ($action) {
|
||||
|
||||
$name = _post('name');
|
||||
if ($name != '') {
|
||||
$query = 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 . '%');
|
||||
$query = ORM::for_table('tbl_bandwidth')->left_outer_join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'Hotspot')->where_like('tbl_plans.name_plan', '%' . $name . '%');
|
||||
$d = Paginator::findMany($query, ['name' => $name]);
|
||||
} else {
|
||||
$query = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'Hotspot');
|
||||
$query = ORM::for_table('tbl_bandwidth')->left_outer_join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'Hotspot');
|
||||
$d = Paginator::findMany($query);
|
||||
}
|
||||
|
||||
@ -242,44 +242,13 @@ switch ($action) {
|
||||
$radup = '000000';
|
||||
}
|
||||
$rate = $b['rate_up'] . $unitup . "/" . $b['rate_down'] . $unitdown;
|
||||
$radiusRate = $b['rate_up'] . $radup . '/' . $b['rate_down'] . $raddown;
|
||||
$radiusRate = $b['rate_up'] . $radup . '/' . $b['rate_down'] . $raddown . '/' . $b['burst'];
|
||||
$rate = trim($rate . " " . $b['burst']);
|
||||
|
||||
// Check if tax is enabled in config
|
||||
$tax_enable = isset($config['enable_tax']) ? $config['enable_tax'] : 'no';
|
||||
|
||||
// Default tax rate
|
||||
$default_tax_rate = 0.01; // Default tax rate 1%
|
||||
|
||||
// Check if tax rate is set to custom in config
|
||||
$tax_rate_setting = isset($config['tax_rate']) ? $config['tax_rate'] : $default_tax_rate;
|
||||
|
||||
// Check if tax rate is custom
|
||||
if ($tax_rate_setting === 'custom') {
|
||||
// Check if custom tax rate is set in config
|
||||
$custom_tax_rate = isset($config['custom_tax_rate']) ? (float)$config['custom_tax_rate'] : $default_tax_rate;
|
||||
// Convert custom tax rate to decimal
|
||||
$custom_tax_rate_decimal = $custom_tax_rate / 100;
|
||||
$tax_rate = $custom_tax_rate_decimal;
|
||||
} else {
|
||||
// Use tax rate
|
||||
$tax_rate = $tax_rate_setting;
|
||||
}
|
||||
|
||||
|
||||
// Calculate the new price with tax if tax is enabled
|
||||
if ($tax_enable === 'yes') {
|
||||
$price_with_tax = $price + ($price * $tax_rate);
|
||||
} else {
|
||||
// If tax is not enabled, use the original price
|
||||
$price_with_tax = $price;
|
||||
}
|
||||
|
||||
// Create new plan
|
||||
$d = ORM::for_table('tbl_plans')->create();
|
||||
$d->name_plan = $name;
|
||||
$d->id_bw = $id_bw;
|
||||
$d->price = $price_with_tax; // Set price with or without tax based on configuration
|
||||
$d->price = $price; // Set price with or without tax based on configuration
|
||||
$d->type = 'Hotspot';
|
||||
$d->typebp = $typebp;
|
||||
$d->plan_type = $plan_type;
|
||||
@ -377,7 +346,7 @@ switch ($action) {
|
||||
$radup = '000000';
|
||||
}
|
||||
$rate = $b['rate_up'] . $unitup . "/" . $b['rate_down'] . $unitdown;
|
||||
$radiusRate = $b['rate_up'] . $radup . '/' . $b['rate_down'] . $raddown;
|
||||
$radiusRate = $b['rate_up'] . $radup . '/' . $b['rate_down'] . $raddown . '/' . $b['burst'];
|
||||
|
||||
$rate = trim($rate . " " . $b['burst']);
|
||||
|
||||
@ -391,40 +360,9 @@ switch ($action) {
|
||||
Mikrotik::setHotspotExpiredPlan($client, 'EXPIRED NUXBILL ' . $pool_expired, $pool_expired);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if tax is enabled in config
|
||||
$tax_enable = isset($config['enable_tax']) ? $config['enable_tax'] : 'no';
|
||||
|
||||
// Default tax rate
|
||||
$default_tax_rate = 0.01; // Default tax rate 1%
|
||||
|
||||
// Check if tax rate is set to custom in config
|
||||
$tax_rate_setting = isset($config['tax_rate']) ? $config['tax_rate'] : $default_tax_rate;
|
||||
|
||||
// Check if tax rate is custom
|
||||
if ($tax_rate_setting === 'custom') {
|
||||
// Check if custom tax rate is set in config
|
||||
$custom_tax_rate = isset($config['custom_tax_rate']) ? (float)$config['custom_tax_rate'] : $default_tax_rate;
|
||||
// Convert custom tax rate to decimal
|
||||
$custom_tax_rate_decimal = $custom_tax_rate / 100;
|
||||
$tax_rate = $custom_tax_rate_decimal;
|
||||
} else {
|
||||
// Use tax rate
|
||||
$tax_rate = $tax_rate_setting;
|
||||
}
|
||||
|
||||
|
||||
// Calculate the new price with tax if tax is enabled
|
||||
if ($tax_enable === 'yes') {
|
||||
$price_with_tax = $price + ($price * $tax_rate);
|
||||
} else {
|
||||
// If tax is not enabled, use the original price
|
||||
$price_with_tax = $price;
|
||||
}
|
||||
|
||||
$d->name_plan = $name;
|
||||
$d->id_bw = $id_bw;
|
||||
$d->price = $price_with_tax; // Set price with or without tax based on configuration
|
||||
$d->price = $price; // Set price with or without tax based on configuration
|
||||
$d->typebp = $typebp;
|
||||
$d->limit_type = $limit_type;
|
||||
$d->time_limit = $time_limit;
|
||||
@ -453,10 +391,10 @@ switch ($action) {
|
||||
|
||||
$name = _post('name');
|
||||
if ($name != '') {
|
||||
$query = 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 . '%');
|
||||
$query = ORM::for_table('tbl_bandwidth')->left_outer_join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'PPPOE')->where_like('tbl_plans.name_plan', '%' . $name . '%');
|
||||
$d = Paginator::findMany($query, ['name' => $name]);
|
||||
} else {
|
||||
$query = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'PPPOE');
|
||||
$query = ORM::for_table('tbl_bandwidth')->left_outer_join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'PPPOE');
|
||||
$d = Paginator::findMany($query);
|
||||
}
|
||||
|
||||
@ -576,45 +514,13 @@ switch ($action) {
|
||||
$radup = '000000';
|
||||
}
|
||||
$rate = $b['rate_up'] . $unitup . "/" . $b['rate_down'] . $unitdown;
|
||||
$radiusRate = $b['rate_up'] . $radup . '/' . $b['rate_down'] . $raddown;
|
||||
$radiusRate = $b['rate_up'] . $radup . '/' . $b['rate_down'] . $raddown . '/' . $b['burst'];
|
||||
$rate = trim($rate . " " . $b['burst']);
|
||||
|
||||
// Check if tax is enabled in config
|
||||
$tax_enable = isset($config['enable_tax']) ? $config['enable_tax'] : 'no';
|
||||
|
||||
// Default tax rate
|
||||
$default_tax_rate = 0.01; // Default tax rate 1%
|
||||
|
||||
// Check if tax rate is set to custom in config
|
||||
$tax_rate_setting = isset($config['tax_rate']) ? $config['tax_rate'] : $default_tax_rate;
|
||||
|
||||
// Check if tax rate is custom
|
||||
if ($tax_rate_setting === 'custom') {
|
||||
// Check if custom tax rate is set in config
|
||||
$custom_tax_rate = isset($config['custom_tax_rate']) ? (float)$config['custom_tax_rate'] : $default_tax_rate;
|
||||
// Convert custom tax rate to decimal
|
||||
$custom_tax_rate_decimal = $custom_tax_rate / 100;
|
||||
$tax_rate = $custom_tax_rate_decimal;
|
||||
} else {
|
||||
// Use tax rate
|
||||
$tax_rate = $tax_rate_setting;
|
||||
}
|
||||
|
||||
|
||||
// Calculate the new price with tax if tax is enabled
|
||||
if ($tax_enable === 'yes') {
|
||||
$price_with_tax = $price + ($price * $tax_rate);
|
||||
} else {
|
||||
// If tax is not enabled, use the original price
|
||||
$price_with_tax = $price;
|
||||
}
|
||||
|
||||
|
||||
$d = ORM::for_table('tbl_plans')->create();
|
||||
$d->type = 'PPPOE';
|
||||
$d->name_plan = $name;
|
||||
$d->id_bw = $id_bw;
|
||||
$d->price = $price_with_tax;
|
||||
$d->price = $price;
|
||||
$d->plan_type = $plan_type;
|
||||
$d->validity = $validity;
|
||||
$d->validity_unit = $validity_unit;
|
||||
@ -699,7 +605,7 @@ switch ($action) {
|
||||
$radup = '000000';
|
||||
}
|
||||
$rate = $b['rate_up'] . $unitup . "/" . $b['rate_down'] . $unitdown;
|
||||
$radiusRate = $b['rate_up'] . $radup . '/' . $b['rate_down'] . $raddown;
|
||||
$radiusRate = $b['rate_up'] . $radup . '/' . $b['rate_down'] . $raddown . '/' . $b['burst'];
|
||||
$rate = trim($rate . " " . $b['burst']);
|
||||
|
||||
if ($d['is_radius']) {
|
||||
@ -712,40 +618,9 @@ switch ($action) {
|
||||
Mikrotik::setPpoePlan($client, 'EXPIRED NUXBILL ' . $pool_expired, $pool_expired, '512K/512K');
|
||||
}
|
||||
}
|
||||
|
||||
// Check if tax is enabled in config
|
||||
$tax_enable = isset($config['enable_tax']) ? $config['enable_tax'] : 'no';
|
||||
|
||||
// Default tax rate
|
||||
$default_tax_rate = 0.01; // Default tax rate 1%
|
||||
|
||||
// Check if tax rate is set to custom in config
|
||||
$tax_rate_setting = isset($config['tax_rate']) ? $config['tax_rate'] : $default_tax_rate;
|
||||
|
||||
// Check if tax rate is custom
|
||||
if ($tax_rate_setting === 'custom') {
|
||||
// Check if custom tax rate is set in config
|
||||
$custom_tax_rate = isset($config['custom_tax_rate']) ? (float)$config['custom_tax_rate'] : $default_tax_rate;
|
||||
// Convert custom tax rate to decimal
|
||||
$custom_tax_rate_decimal = $custom_tax_rate / 100;
|
||||
$tax_rate = $custom_tax_rate_decimal;
|
||||
} else {
|
||||
// Use tax rate
|
||||
$tax_rate = $tax_rate_setting;
|
||||
}
|
||||
|
||||
|
||||
// Calculate the new price with tax if tax is enabled
|
||||
if ($tax_enable === 'yes') {
|
||||
$price_with_tax = $price + ($price * $tax_rate);
|
||||
} else {
|
||||
// If tax is not enabled, use the original price
|
||||
$price_with_tax = $price;
|
||||
}
|
||||
|
||||
$d->name_plan = $name;
|
||||
$d->id_bw = $id_bw;
|
||||
$d->price = $price_with_tax;
|
||||
$d->price = $price;
|
||||
$d->plan_type = $plan_type;
|
||||
$d->validity = $validity;
|
||||
$d->validity_unit = $validity_unit;
|
||||
@ -822,37 +697,8 @@ switch ($action) {
|
||||
}
|
||||
run_hook('edit_ppoe'); #HOOK
|
||||
if ($msg == '') {
|
||||
// Check if tax is enabled in config
|
||||
$tax_enable = isset($config['enable_tax']) ? $config['enable_tax'] : 'no';
|
||||
|
||||
// Default tax rate
|
||||
$default_tax_rate = 0.01; // Default tax rate 1%
|
||||
|
||||
// Check if tax rate is set to custom in config
|
||||
$tax_rate_setting = isset($config['tax_rate']) ? $config['tax_rate'] : $default_tax_rate;
|
||||
|
||||
// Check if tax rate is custom
|
||||
if ($tax_rate_setting === 'custom') {
|
||||
// Check if custom tax rate is set in config
|
||||
$custom_tax_rate = isset($config['custom_tax_rate']) ? (float)$config['custom_tax_rate'] : $default_tax_rate;
|
||||
// Convert custom tax rate to decimal
|
||||
$custom_tax_rate_decimal = $custom_tax_rate / 100;
|
||||
$tax_rate = $custom_tax_rate_decimal;
|
||||
} else {
|
||||
// Use tax rate
|
||||
$tax_rate = $tax_rate_setting;
|
||||
}
|
||||
|
||||
|
||||
// Calculate the new price with tax if tax is enabled
|
||||
if ($tax_enable === 'yes') {
|
||||
$price_with_tax = $price + ($price * $tax_rate);
|
||||
} else {
|
||||
// If tax is not enabled, use the original price
|
||||
$price_with_tax = $price;
|
||||
}
|
||||
$d->name_plan = $name;
|
||||
$d->price = $price_with_tax;
|
||||
$d->price = $price;
|
||||
$d->enabled = $enabled;
|
||||
$d->prepaid = 'yes';
|
||||
$d->save();
|
||||
@ -881,43 +727,11 @@ switch ($action) {
|
||||
}
|
||||
run_hook('add_ppoe'); #HOOK
|
||||
if ($msg == '') {
|
||||
|
||||
// Check if tax is enabled in config
|
||||
$tax_enable = isset($config['enable_tax']) ? $config['enable_tax'] : 'no';
|
||||
|
||||
// Default tax rate
|
||||
$default_tax_rate = 0.01; // Default tax rate 1%
|
||||
|
||||
// Check if tax rate is set to custom in config
|
||||
$tax_rate_setting = isset($config['tax_rate']) ? $config['tax_rate'] : $default_tax_rate;
|
||||
|
||||
// Check if tax rate is custom
|
||||
if ($tax_rate_setting === 'custom') {
|
||||
// Check if custom tax rate is set in config
|
||||
$custom_tax_rate = isset($config['custom_tax_rate']) ? (float)$config['custom_tax_rate'] : $default_tax_rate;
|
||||
// Convert custom tax rate to decimal
|
||||
$custom_tax_rate_decimal = $custom_tax_rate / 100;
|
||||
$tax_rate = $custom_tax_rate_decimal;
|
||||
} else {
|
||||
// Use tax rate
|
||||
$tax_rate = $tax_rate_setting;
|
||||
}
|
||||
|
||||
|
||||
// Calculate the new price with tax if tax is enabled
|
||||
if ($tax_enable === 'yes') {
|
||||
$price_with_tax = $price + ($price * $tax_rate);
|
||||
} else {
|
||||
// If tax is not enabled, use the original price
|
||||
$price_with_tax = $price;
|
||||
}
|
||||
|
||||
|
||||
$d = ORM::for_table('tbl_plans')->create();
|
||||
$d->type = 'Balance';
|
||||
$d->name_plan = $name;
|
||||
$d->id_bw = 0;
|
||||
$d->price = $price_with_tax;
|
||||
$d->price = $price;
|
||||
$d->validity = 0;
|
||||
$d->validity_unit = 'Months';
|
||||
$d->routers = '';
|
||||
|
@ -132,34 +132,6 @@ switch ($action) {
|
||||
$d->save();
|
||||
}
|
||||
}
|
||||
|
||||
// Handle tax system separately
|
||||
$enable_tax = isset($_POST['enable_tax']) ? $_POST['enable_tax'] : 'no';
|
||||
$tax_rate = isset($_POST['tax_rate']) ? $_POST['tax_rate'] : '0.01'; // Default tax rate 1%
|
||||
|
||||
// Save or update tax system settings
|
||||
$d_tax_enable = ORM::for_table('tbl_appconfig')->where('setting', 'enable_tax')->find_one();
|
||||
if ($d_tax_enable) {
|
||||
$d_tax_enable->value = $enable_tax;
|
||||
$d_tax_enable->save();
|
||||
} else {
|
||||
$d_tax_enable = ORM::for_table('tbl_appconfig')->create();
|
||||
$d_tax_enable->setting = 'enable_tax';
|
||||
$d_tax_enable->value = $enable_tax;
|
||||
$d_tax_enable->save();
|
||||
}
|
||||
|
||||
$d_tax_rate = ORM::for_table('tbl_appconfig')->where('setting', 'tax_rate')->find_one();
|
||||
if ($d_tax_rate) {
|
||||
$d_tax_rate->value = $tax_rate;
|
||||
$d_tax_rate->save();
|
||||
} else {
|
||||
$d_tax_rate = ORM::for_table('tbl_appconfig')->create();
|
||||
$d_tax_rate->setting = 'tax_rate';
|
||||
$d_tax_rate->value = $tax_rate;
|
||||
$d_tax_rate->save();
|
||||
}
|
||||
|
||||
//checkbox
|
||||
$checks = ['hide_mrc', 'hide_tms', 'hide_aui', 'hide_al', 'hide_uet', 'hide_vs', 'hide_pg'];
|
||||
foreach ($checks as $check) {
|
||||
@ -732,22 +704,46 @@ switch ($action) {
|
||||
$suc = 0;
|
||||
$fal = 0;
|
||||
$json = json_decode(file_get_contents($_FILES['json']['tmp_name']), true);
|
||||
try {
|
||||
ORM::raw_execute("SET FOREIGN_KEY_CHECKS=0;");
|
||||
} catch (Throwable $e) {
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
try {
|
||||
ORM::raw_execute("SET GLOBAL FOREIGN_KEY_CHECKS=0;");
|
||||
} catch (Throwable $e) {
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
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') {
|
||||
try {
|
||||
$t = ORM::for_table($table)->create();
|
||||
foreach ($rec as $k => $v) {
|
||||
$t->set($k, $v);
|
||||
}
|
||||
}
|
||||
if ($t->save()) {
|
||||
$suc++;
|
||||
} else {
|
||||
if ($t->save()) {
|
||||
$suc++;
|
||||
} else {
|
||||
$fal++;
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
$fal++;
|
||||
} catch (Exception $e) {
|
||||
$fal++;
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
ORM::raw_execute("SET FOREIGN_KEY_CHECKS=1;");
|
||||
} catch (Throwable $e) {
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
try {
|
||||
ORM::raw_execute("SET GLOBAL FOREIGN_KEY_CHECKS=1;");
|
||||
} catch (Throwable $e) {
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
if (file_exists($_FILES['json']['tmp_name'])) unlink($_FILES['json']['tmp_name']);
|
||||
r2(U . "settings/dbstatus", 's', "Restored $suc success $fal failed");
|
||||
} else {
|
||||
@ -772,6 +768,40 @@ switch ($action) {
|
||||
r2(U . 'settings/language', 's', Lang::T('Translation saved Successfully'));
|
||||
break;
|
||||
|
||||
case 'maintenance':
|
||||
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
|
||||
_alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard");
|
||||
exit;
|
||||
}
|
||||
if (_post('save') == 'save') {
|
||||
$status = isset($_POST['maintenance_mode']) ? 1 : 0; // Checkbox returns 1 if checked, otherwise 0
|
||||
$date = isset($_POST['maintenance_date']) ? $_POST['maintenance_date'] : null;
|
||||
|
||||
$settings = [
|
||||
'maintenance_mode' => $status,
|
||||
'maintenance_date' => $date
|
||||
];
|
||||
|
||||
foreach ($settings as $key => $value) {
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', $key)->find_one();
|
||||
if ($d) {
|
||||
$d->value = $value;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = $key;
|
||||
$d->value = $value;
|
||||
$d->save();
|
||||
}
|
||||
}
|
||||
|
||||
r2(U . "settings/maintenance", 's', Lang::T('Settings Saved Successfully'));
|
||||
}
|
||||
$ui->assign('_c', $config);
|
||||
$ui->assign('_title', Lang::T('Maintenance Mode Settings'));
|
||||
$ui->display('maintenance-mode.tpl');
|
||||
break;
|
||||
|
||||
default:
|
||||
$ui->display('a404.tpl');
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ switch ($action) {
|
||||
|
||||
case 'list-activated':
|
||||
$ui->assign('_system_menu', 'list-activated');
|
||||
$query = ORM::for_table('tbl_transactions')->where('username', $user['username'])->order_by_asc('id');
|
||||
$query = ORM::for_table('tbl_transactions')->where('username', $user['username'])->order_by_desc('id');
|
||||
$d = Paginator::findMany($query);
|
||||
|
||||
$ui->assign('d', $d);
|
||||
|
192
system/cron.php
192
system/cron.php
@ -1,99 +1,147 @@
|
||||
<?php
|
||||
|
||||
include "../init.php";
|
||||
|
||||
$isCli = (php_sapi_name() !== 'cli') ? false : true;
|
||||
if (!$isCli) {
|
||||
$isCli = true;
|
||||
if (php_sapi_name() !== 'cli') {
|
||||
$isCli = false;
|
||||
echo "<pre>";
|
||||
}
|
||||
|
||||
echo "PHP Time\t" . date('Y-m-d H:i:s') . "\n";
|
||||
$res = ORM::raw_execute('SELECT NOW() AS WAKTU;');
|
||||
$statement = ORM::get_last_statement();
|
||||
$rows = [];
|
||||
$rows = array();
|
||||
while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {
|
||||
echo "MYSQL Time\t" . $row['WAKTU'] . "\n";
|
||||
}
|
||||
|
||||
$_c = $config;
|
||||
|
||||
|
||||
$textExpired = Lang::getNotifText('expired');
|
||||
|
||||
$recharges = ORM::for_table('tbl_user_recharges')
|
||||
->where('status', 'on')
|
||||
->where_lte('expiration', date("Y-m-d"))
|
||||
->find_many();
|
||||
$d = ORM::for_table('tbl_user_recharges')->where('status', 'on')->where_lte('expiration', date("Y-m-d"))->find_many();
|
||||
echo "Found " . count($d) . " user(s)\n";
|
||||
run_hook('cronjob'); #HOOK
|
||||
|
||||
echo "Found " . count($recharges) . " user(s)\n";
|
||||
run_hook('cronjob'); // HOOK
|
||||
|
||||
foreach ($recharges as $recharge) {
|
||||
$dateNow = strtotime(date("Y-m-d H:i:s"));
|
||||
$expiration = strtotime($recharge['expiration'] . ' ' . $recharge['time']);
|
||||
|
||||
echo $recharge['expiration'] . " : " . (($isCli) ? $recharge['username'] : Lang::maskText($recharge['username']));
|
||||
|
||||
if ($dateNow >= $expiration) {
|
||||
echo " : EXPIRED \r\n";
|
||||
$userRecharge = ORM::for_table('tbl_user_recharges')->where('id', $recharge['id'])->find_one();
|
||||
$customer = ORM::for_table('tbl_customers')->where('id', $recharge['customer_id'])->find_one();
|
||||
$plan = ORM::for_table('tbl_plans')->where('id', $userRecharge['plan_id'])->find_one();
|
||||
$router = ($recharge['type'] == 'Hotspot') ? Mikrotik::info($recharge['routers']) : ORM::for_table('tbl_routers')->where('name', $recharge['routers'])->find_one();
|
||||
|
||||
if ($plan['is_radius']) {
|
||||
if (empty($plan['pool_expired'])) {
|
||||
print_r(Radius::customerDeactivate($customer['username']));
|
||||
} else {
|
||||
Radius::upsertCustomerAttr($customer['username'], 'Framed-Pool', $plan['pool_expired'], ':=');
|
||||
print_r(Radius::disconnectCustomer($customer['username']));
|
||||
}
|
||||
} else {
|
||||
$client = Mikrotik::getClient($router['ip_address'], $router['username'], $router['password']);
|
||||
|
||||
if (!empty($plan['pool_expired'])) {
|
||||
if ($recharge['type'] == 'Hotspot') {
|
||||
Mikrotik::setHotspotUserPackage($client, $customer['username'], 'EXPIRED NUXBILL ' . $plan['pool_expired']);
|
||||
foreach ($d as $ds) {
|
||||
if ($ds['type'] == 'Hotspot') { # HOTSPOT
|
||||
$date_now = strtotime(date("Y-m-d H:i:s"));
|
||||
$expiration = strtotime($ds['expiration'] . ' ' . $ds['time']);
|
||||
echo $ds['expiration'] . " : " . (($isCli) ? $ds['username'] : Lang::maskText($ds['username']));
|
||||
if ($date_now >= $expiration) {
|
||||
echo " : EXPIRED \r\n";
|
||||
$u = ORM::for_table('tbl_user_recharges')->where('id', $ds['id'])->find_one();
|
||||
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
||||
$m = Mikrotik::info($ds['routers']);
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||
if ($p['is_radius']) {
|
||||
if (empty($p['pool_expired'])) {
|
||||
print_r(Radius::customerDeactivate($c['username']));
|
||||
} else {
|
||||
Mikrotik::setPpoeUserPlan($client, $customer['username'], 'EXPIRED NUXBILL ' . $plan['pool_expired']);
|
||||
Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $p['pool_expired'], ':=');
|
||||
print_r(Radius::disconnectCustomer($c['username']));
|
||||
}
|
||||
} else {
|
||||
if ($recharge['type'] == 'Hotspot') {
|
||||
Mikrotik::removeHotspotUser($client, $customer['username']);
|
||||
Mikrotik::removeHotspotActiveUser($client, $customer['username']);
|
||||
$client = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
||||
if (!empty($p['pool_expired'])) {
|
||||
Mikrotik::setHotspotUserPackage($client, $c['username'], 'EXPIRED NUXBILL ' . $p['pool_expired']);
|
||||
// }if (!empty($p['list_expired'])) {
|
||||
// $ip = Mikrotik::getIpHotspotUser($client, $ds['username']);
|
||||
// Mikrotik::addIpToAddressList($client, $ip, $p['list_expired'], $c['username']);
|
||||
} else {
|
||||
Mikrotik::removePpoeUser($client, $customer['username']);
|
||||
Mikrotik::removePpoeActive($client, $customer['username']);
|
||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||
}
|
||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||
}
|
||||
}
|
||||
echo Message::sendPackageNotification($c, $u['namebp'], $p['price'], $textExpired, $config['user_notification_expired']) . "\n";
|
||||
//update database user dengan status off
|
||||
$u->status = 'off';
|
||||
$u->save();
|
||||
|
||||
echo Message::sendPackageNotification($customer, $userRecharge['namebp'], $plan['price'], $textExpired, $config['user_notification_expired']) . "\n";
|
||||
|
||||
$userRecharge->status = 'off';
|
||||
$userRecharge->save();
|
||||
|
||||
if ($config['enable_balance'] == 'yes' && $customer['auto_renewal']) {
|
||||
list($bills, $add_cost) = User::getBills($recharge['customer_id']);
|
||||
if ($add_cost > 0) {
|
||||
$plan['price'] += $add_cost;
|
||||
}
|
||||
if ($plan && $plan['enabled'] && $customer['balance'] >= $plan['price']) {
|
||||
if (Package::rechargeUser($recharge['customer_id'], $plan['routers'], $plan['id'], 'Customer', 'Balance')) {
|
||||
Balance::min($recharge['customer_id'], $plan['price']);
|
||||
echo "Plan enabled: $plan[enabled] | User balance: $customer[balance] | Price: $plan[price]\n";
|
||||
echo "Autorenewal Success\n";
|
||||
// autorenewal from deposit
|
||||
if ($config['enable_balance'] == 'yes' && $c['auto_renewal']) {
|
||||
list($bills, $add_cost) = User::getBills($ds['customer_id']);
|
||||
if ($add_cost > 0) {
|
||||
if (!empty($add_cost)) {
|
||||
$p['price'] += $add_cost;
|
||||
}
|
||||
}
|
||||
if ($p && $p['enabled'] && $c['balance'] >= $p['price']) {
|
||||
if (Package::rechargeUser($ds['customer_id'], $ds['routers'], $p['id'], 'Customer', 'Balance')) {
|
||||
// if success, then get the balance
|
||||
Balance::min($ds['customer_id'], $p['price']);
|
||||
echo "plan enabled: $p[enabled] | User balance: $c[balance] | price $p[price]\n";
|
||||
echo "auto renewall Success\n";
|
||||
} else {
|
||||
echo "plan enabled: $p[enabled] | User balance: $c[balance] | price $p[price]\n";
|
||||
echo "auto renewall Failed\n";
|
||||
Message::sendTelegram("FAILED RENEWAL #cron\n\n#u$c[username] #buy #Hotspot \n" . $p['name_plan'] .
|
||||
"\nRouter: " . $p['routers'] .
|
||||
"\nPrice: " . $p['price']);
|
||||
}
|
||||
} else {
|
||||
echo "Plan enabled: $plan[enabled] | User balance: $customer[balance] | Price: $plan[price]\n";
|
||||
echo "Autorenewal Failed\n";
|
||||
Message::sendTelegram("FAILED RENEWAL #cron\n\n#u$customer[username] #buy #" . (($recharge['type'] == 'Hotspot') ? 'Hotspot' : 'PPPOE') . " \n" . $plan['name_plan'] .
|
||||
"\nRouter: " . $plan['routers'] .
|
||||
"\nPrice: " . $plan['price']);
|
||||
echo "no renewall | plan enabled: $p[enabled] | User balance: $c[balance] | price $p[price]\n";
|
||||
}
|
||||
} else {
|
||||
echo "No renewal | Plan enabled: $plan[enabled] | User balance: $customer[balance] | Price: $plan[price]\n";
|
||||
echo "no renewall | balance $config[enable_balance] auto_renewal $c[auto_renewal]\n";
|
||||
}
|
||||
} else {
|
||||
echo "No renewal | Balance: $config[enable_balance] Auto-renewal: $customer[auto_renewal]\n";
|
||||
}
|
||||
} else {
|
||||
echo " : ACTIVE \r\n";
|
||||
} else
|
||||
echo " : ACTIVE \r\n";
|
||||
} else { # PPPOE
|
||||
$date_now = strtotime(date("Y-m-d H:i:s"));
|
||||
$expiration = strtotime($ds['expiration'] . ' ' . $ds['time']);
|
||||
echo $ds['expiration'] . " : " . (($isCli) ? $ds['username'] : Lang::maskText($ds['username']));
|
||||
if ($date_now >= $expiration) {
|
||||
echo " : EXPIRED \r\n";
|
||||
$u = ORM::for_table('tbl_user_recharges')->where('id', $ds['id'])->find_one();
|
||||
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
||||
$m = ORM::for_table('tbl_routers')->where('name', $ds['routers'])->find_one();
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||
if ($p['is_radius']) {
|
||||
if (empty($p['pool_expired'])) {
|
||||
print_r(Radius::customerDeactivate($c['username']));
|
||||
} else {
|
||||
Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $p['pool_expired'], ':=');
|
||||
print_r(Radius::disconnectCustomer($c['username']));
|
||||
}
|
||||
} else {
|
||||
$client = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
||||
if (!empty($p['pool_expired'])) {
|
||||
Mikrotik::setPpoeUserPlan($client, $c['username'], 'EXPIRED NUXBILL ' . $p['pool_expired']);
|
||||
} else {
|
||||
Mikrotik::removePpoeUser($client, $c['username']);
|
||||
}
|
||||
Mikrotik::removePpoeActive($client, $c['username']);
|
||||
}
|
||||
echo Message::sendPackageNotification($c, $u['namebp'], $p['price'], $textExpired, $config['user_notification_expired']) . "\n";
|
||||
|
||||
$u->status = 'off';
|
||||
$u->save();
|
||||
|
||||
// autorenewal from deposit
|
||||
if ($config['enable_balance'] == 'yes' && $c['auto_renewal']) {
|
||||
list($bills, $add_cost) = User::getBills($ds['customer_id']);
|
||||
if ($add_cost > 0) {
|
||||
if (!empty($add_cost)) {
|
||||
$p['price'] += $add_cost;
|
||||
}
|
||||
}
|
||||
if ($p && $p['enabled'] && $c['balance'] >= $p['price']) {
|
||||
if (Package::rechargeUser($ds['customer_id'], $ds['routers'], $p['id'], 'Customer', 'Balance')) {
|
||||
// if success, then get the balance
|
||||
Balance::min($ds['customer_id'], $p['price']);
|
||||
echo "plan enabled: $p[enabled] | User balance: $c[balance] | price $p[price]\n";
|
||||
echo "auto renewall Success\n";
|
||||
} else {
|
||||
echo "plan enabled: $p[enabled] | User balance: $c[balance] | price $p[price]\n";
|
||||
echo "auto renewall Failed\n";
|
||||
Message::sendTelegram("FAILED RENEWAL #cron\n\n#u$c[username] #buy #PPPOE \n" . $p['name_plan'] .
|
||||
"\nRouter: " . $p['routers'] .
|
||||
"\nPrice: " . $p['price']);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
echo " : ACTIVE \r\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||
* This file is for reminding users about expiration
|
||||
* Example to run every day at 7:00 in the morning:
|
||||
* This file for reminding user about expiration
|
||||
* Example to run every at 7:00 in the morning
|
||||
* 0 7 * * * /usr/bin/php /var/www/system/cron_reminder.php
|
||||
**/
|
||||
|
||||
@ -15,9 +15,10 @@ if (php_sapi_name() !== 'cli') {
|
||||
echo "<pre>";
|
||||
}
|
||||
|
||||
$recharges = ORM::for_table('tbl_user_recharges')->where('status', 'on')->find_many();
|
||||
$d = ORM::for_table('tbl_user_recharges')->where('status', 'on')->find_many();
|
||||
|
||||
run_hook('cronjob_reminder'); #HOOK
|
||||
|
||||
run_hook('cronjob_reminder'); // HOOK
|
||||
|
||||
echo "PHP Time\t" . date('Y-m-d H:i:s') . "\n";
|
||||
$res = ORM::raw_execute('SELECT NOW() AS WAKTU;');
|
||||
@ -27,35 +28,33 @@ while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {
|
||||
echo "MYSQL Time\t" . $row['WAKTU'] . "\n";
|
||||
}
|
||||
|
||||
|
||||
$day7 = date('Y-m-d', strtotime("+7 day"));
|
||||
$day3 = date('Y-m-d', strtotime("+3 day"));
|
||||
$day1 = date('Y-m-d', strtotime("+1 day"));
|
||||
print_r([$day1, $day3, $day7]);
|
||||
|
||||
foreach ($recharges as $recharge) {
|
||||
if (in_array($recharge['expiration'], [$day1, $day3, $day7])) {
|
||||
$user_recharge = ORM::for_table('tbl_user_recharges')->where('id', $recharge['id'])->find_one();
|
||||
$plan = ORM::for_table('tbl_plans')->where('id', $user_recharge['plan_id'])->find_one();
|
||||
$customer = ORM::for_table('tbl_customers')->where('id', $recharge['customer_id'])->find_one();
|
||||
|
||||
if ($plan['validity_unit'] == 'Period') {
|
||||
// Postpaid price from field
|
||||
$additional_invoice = User::getAttribute("Invoice", $recharge['customer_id']);
|
||||
if (empty($additional_invoice) || $additional_invoice == 0) {
|
||||
$price = $plan['price'];
|
||||
} else {
|
||||
$price = $additional_invoice;
|
||||
}
|
||||
foreach ($d as $ds) {
|
||||
if (in_array($ds['expiration'], [$day1, $day3, $day7])) {
|
||||
$u = ORM::for_table('tbl_user_recharges')->where('id', $ds['id'])->find_one();
|
||||
$p = ORM::for_table('tbl_plans')->where('id', $u['plan_id'])->find_one();
|
||||
$c = ORM::for_table('tbl_customers')->where('id', $ds['customer_id'])->find_one();
|
||||
if ($p['validity_unit'] == 'Period') {
|
||||
// Postpaid price from field
|
||||
$add_inv = User::getAttribute("Invoice", $ds['customer_id']);
|
||||
if (empty ($add_inv) or $add_inv == 0) {
|
||||
$price = $p['price'];
|
||||
} else {
|
||||
$price = $add_inv;
|
||||
}
|
||||
} else {
|
||||
$price = $plan['price'];
|
||||
$price = $p['price'];
|
||||
}
|
||||
|
||||
if ($recharge['expiration'] == $day7) {
|
||||
echo Message::sendPackageNotification($customer, $plan['name_plan'], $price, Lang::getNotifText('reminder_7_day'), $config['user_notification_reminder']) . "\n";
|
||||
} elseif ($recharge['expiration'] == $day3) {
|
||||
echo Message::sendPackageNotification($customer, $plan['name_plan'], $price, Lang::getNotifText('reminder_3_day'), $config['user_notification_reminder']) . "\n";
|
||||
} elseif ($recharge['expiration'] == $day1) {
|
||||
echo Message::sendPackageNotification($customer, $plan['name_plan'], $price, Lang::getNotifText('reminder_1_day'), $config['user_notification_reminder']) . "\n";
|
||||
if ($ds['expiration'] == $day7) {
|
||||
echo Message::sendPackageNotification($c, $p['name_plan'], $price, Lang::getNotifText('reminder_7_day'), $config['user_notification_reminder']) . "\n";
|
||||
} else if ($ds['expiration'] == $day3) {
|
||||
echo Message::sendPackageNotification($c, $p['name_plan'], $price, Lang::getNotifText('reminder_3_day'), $config['user_notification_reminder']) . "\n";
|
||||
} else if ($ds['expiration'] == $day1) {
|
||||
echo Message::sendPackageNotification($c, $p['name_plan'], $price, Lang::getNotifText('reminder_1_day'), $config['user_notification_reminder']) . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -542,5 +542,86 @@
|
||||
"ID": "ID",
|
||||
"Internet_Plan": "Internet Plan",
|
||||
"Privacy_Policy": "Privacy Policy",
|
||||
"Terms_and_Conditions": "Terms and Conditions"
|
||||
"Terms_and_Conditions": "Terms and Conditions",
|
||||
"Contact": "Contact",
|
||||
"will_be_replaced_with_Customer_Name": "will be replaced with Customer Name",
|
||||
"will_be_replaced_with_Customer_username": "will be replaced with Customer username",
|
||||
"will_be_replaced_with_Package_name": "will be replaced with Package name",
|
||||
"will_be_replaced_with_Package_price": "will be replaced with Package price",
|
||||
"additional_bills_for_customers": "additional bills for customers",
|
||||
"will_be_replaced_with_Expiration_date": "will be replaced with Expiration date",
|
||||
"Your_Company_Name_at_Settings": "Your Company Name at Settings",
|
||||
"Your_Company_Address_at_Settings": "Your Company Address at Settings",
|
||||
"Your_Company_Phone_at_Settings": "Your Company Phone at Settings",
|
||||
"Invoice_number": "Invoice number",
|
||||
"Date_invoice_created": "Date invoice created",
|
||||
"Payment_gateway_user_paid_from": "Payment gateway user paid from",
|
||||
"Payment_channel_user_paid_from": "Payment channel user paid from",
|
||||
"is_Hotspot_or_PPPOE": "is Hotspot or PPPOE",
|
||||
"Internet_Package": "Internet Package",
|
||||
"Internet_Package_Prices": "Internet Package Prices",
|
||||
"Receiver_name": "Receiver name",
|
||||
"Username_internet": "Username internet",
|
||||
"User_password": "User password",
|
||||
"Expired_datetime": "Expired datetime",
|
||||
"For_Notes_by_admin": "For Notes by admin",
|
||||
"Transaction_datetime": "Transaction datetime",
|
||||
"Balance_Before": "Balance Before",
|
||||
"Balance_After": "Balance After",
|
||||
"how_much_balance_have_been_send": "how much balance have been send",
|
||||
"Current_Balance": "Current Balance",
|
||||
"Sender_name": "Sender name",
|
||||
"how_much_balance_have_been_received": "how much balance have been received",
|
||||
"Extend_Postpaid_Expiration": "Extend Postpaid Expiration",
|
||||
"Allow_Extend": "Allow Extend",
|
||||
"Extend_Days": "Extend Days",
|
||||
"Confirmation_Message": "Confirmation Message",
|
||||
"You_are_already_logged_in": "You are already logged in",
|
||||
"Extend": "Extend",
|
||||
"Created___Expired": "Created \/ Expired",
|
||||
"Bank_Transfer": "Bank Transfer",
|
||||
"Recharge_Using": "Recharge Using",
|
||||
"ago": "ago",
|
||||
"Disabled": "Disabled",
|
||||
"Banned": "Banned",
|
||||
"Customer_cannot_login_again": "Customer cannot login again",
|
||||
"Customer_can_login_but_cannot_buy_internet_plan__Admin_cannot_recharge_customer": "Customer can login but cannot buy internet plan, Admin cannot recharge customer",
|
||||
"Don_t_forget_to_deactivate_all_active_plan_too": "Don't forget to deactivate all active plan too",
|
||||
"Ascending": "Ascending",
|
||||
"Descending": "Descending",
|
||||
"Created_Date": "Created Date",
|
||||
"Inactive": "Inactive",
|
||||
"Suspended": "Suspended",
|
||||
"Query": "Query",
|
||||
"Notes": "Notes",
|
||||
"This_account_status": "This account status",
|
||||
"Maintenance_Mode": "Maintenance Mode",
|
||||
"Maintenance_Mode_Settings": "Maintenance Mode Settings",
|
||||
"Status_": "Status:",
|
||||
"End_Date_": "End Date:",
|
||||
"Save": "Save",
|
||||
"Site_is_temporarily_unavailable_": "Site is temporarily unavailable.",
|
||||
"Scheduled_maintenance_is_currently_in_progress__Please_check_back_soon_": "Scheduled maintenance is currently in progress. Please check back soon.",
|
||||
"We_apologize_for_any_inconvenience_": "We apologize for any inconvenience.",
|
||||
"The": "The",
|
||||
"Team": "Team",
|
||||
"Extend_Package_Expiry": "Extend Package Expiry",
|
||||
"No": "No",
|
||||
"Yes": "Yes",
|
||||
"If_user_buy_same_internet_plan__expiry_date_will_extend": "If user buy same internet plan, expiry date will extend",
|
||||
"Tax_System": "Tax System",
|
||||
"Enable_Tax_System": "Enable Tax System",
|
||||
"Tax_will_be_calculated_in_Internet_Plan_Price": "Tax will be calculated in Internet Plan Price",
|
||||
"Tax_Rate": "Tax Rate",
|
||||
"0_5_": "0.5%",
|
||||
"1_": "1%",
|
||||
"1_5_": "1.5%",
|
||||
"2_": "2%",
|
||||
"5_": "5%",
|
||||
"10_": "10%",
|
||||
"Custom": "Custom",
|
||||
"Tax_Rates_in_percentage": "Tax Rates in percentage",
|
||||
"Custom_Tax_Rate": "Custom Tax Rate",
|
||||
"Enter_Custom_Tax_Rate": "Enter Custom Tax Rate",
|
||||
"Enter_the_custom_tax_rate__e_g___3_75_for_3_75__": "Enter the custom tax rate (e.g., 3.75 for 3.75%)"
|
||||
}
|
@ -1,3 +1,480 @@
|
||||
{
|
||||
"Settings_Saved_Successfully": "Pengaturan Berhasil Disimpan"
|
||||
}
|
||||
"Log_in": "Masuk",
|
||||
"Register": "Daftar",
|
||||
"Announcement": "Pemberitahuan",
|
||||
"Registration_Info": "Info Pendaftaran",
|
||||
"Voucher_not_found__please_buy_voucher_befor_register": "Voucher tidak ditemukan, silakan beli voucher sebelum mendaftar",
|
||||
"Register_Success__You_can_login_now": "Daftar Sukses! Anda dapat masuk sekarang",
|
||||
"Log_in_to_Member_Panel": "Masuk ke Panel Anggota",
|
||||
"Register_as_Member": "Daftar sebagai Anggota",
|
||||
"Enter_Admin_Area": "Masuk ke Admin Panel",
|
||||
"PHPNuxBill": "PHPNuxBill",
|
||||
"Username": "Nama Pengguna",
|
||||
"Password": "Kata Sandi",
|
||||
"Passwords_does_not_match": "Kata sandi tidak cocok",
|
||||
"Account_already_axist": "Akun telah ada",
|
||||
"Manage": "Mengelola",
|
||||
"Submit": "Kirim",
|
||||
"Save_Changes": "Simpan Perubahan",
|
||||
"Cancel": "Batal",
|
||||
"Edit": "Sunting",
|
||||
"Delete": "Hapus",
|
||||
"Welcome": "Selamat Datang",
|
||||
"Data_Created_Successfully": "Data Berhasil Dibuat",
|
||||
"Data_Updated_Successfully": "Data Berhasil Diperbarui",
|
||||
"Data_Deleted_Successfully": "Data Berhasil Dihapus",
|
||||
"Static_Pages": "Halaman Statis",
|
||||
"Failed_to_save_page__make_sure_i_can_write_to_folder_pages___i_chmod_664_pages___html_i_": "Gagal menyimpan halaman, pastikan diperbolehkan menulis file di folder pages, <i>chmod 664 pages\/*.html<i>",
|
||||
"Saving_page_success": "Menyimpan halaman berhasil",
|
||||
"Sometimes_you_need_to_refresh_3_times_until_content_change": "Terkadang Anda perlu menyegarkan 3 kali hingga konten berubah",
|
||||
"Dashboard": "Dasbor",
|
||||
"Search_Customers___": "Cari Member...",
|
||||
"My_Account": "Akun Saya",
|
||||
"My_Profile": "Profil Saya",
|
||||
"Settings": "Pengaturan",
|
||||
"Edit_Profile": "Sunting Profil",
|
||||
"Change_Password": "Ganti kata sandi",
|
||||
"Logout": "Keluar",
|
||||
"Services": "Layanan",
|
||||
"Bandwidth_Plans": "Paket Bandwidth",
|
||||
"Bandwidth_Name": "Nama Bandwidth",
|
||||
"New_Bandwidth": "Bandwidth Baru",
|
||||
"Edit_Bandwidth": "Sunting Bandwidth",
|
||||
"Add_New_Bandwidth": "Tambahkan Bandwidth Baru",
|
||||
"Rate_Download": "Nilai Unduhan",
|
||||
"Rate_Upload": "Nilai Unggahan",
|
||||
"Name_Bandwidth_Already_Exist": "Nama Bandwidth sudah ada",
|
||||
"Hotspot_Plans": "Paket Hotspot",
|
||||
"PPPOE_Plans": "Paket PPPoE",
|
||||
"Plan_Name": "Nama Paket",
|
||||
"New_Service_Plan": "Paket Layanan Baru",
|
||||
"Add_Service_Plan": "Tambah Paket Layanan",
|
||||
"Edit_Service_Plan": "Sunting Paket Layanan",
|
||||
"Name_Plan_Already_Exist": "Nama Paket sudah ada",
|
||||
"Plan_Type": "Jenis Paket",
|
||||
"Plan_Price": "Harga Paket",
|
||||
"Limit_Type": "Tipe Batas",
|
||||
"Unlimited": "Tak Terbatas",
|
||||
"Limited": "Terbatas",
|
||||
"Time_Limit": "Batas waktu",
|
||||
"Data_Limit": "Batas Data",
|
||||
"Both_Limit": "Membatasi keduanya",
|
||||
"Plan_Validity": "Waktu Paket",
|
||||
"Select_Bandwidth": "Pilih Bandwidth",
|
||||
"Shared_Users": "Berbagi Pelanggan",
|
||||
"Choose_User_Type_Sales_to_disable_access_to_Settings": "Pilih Sales untuk menonaktifkan akses ke Pengaturan",
|
||||
"Current_Password": "Kata sandi saat ini",
|
||||
"New_Password": "Kata sandi baru",
|
||||
"Administrator": "Administrator",
|
||||
"Sales": "Sales",
|
||||
"Member": "Anggota",
|
||||
"Confirm_New_Password": "Konfirmasi sandi baru",
|
||||
"Confirm_Password": "Konfirmasi sandi",
|
||||
"Full_Name": "Nama Lengkap",
|
||||
"User_Type": "Tipe Pelanggan",
|
||||
"Address": "Alamat",
|
||||
"Created_On": "Dibuat pada",
|
||||
"Expires_On": "Kedaluwarsa pada",
|
||||
"Phone_Number": "Nomor telepon",
|
||||
"User_deleted_Successfully": "Pelanggan berhasil dihapus",
|
||||
"Full_Administrator": "Administrator Penuh",
|
||||
"Keep_Blank_to_do_not_change_Password": "Biarkan kosong apabila tidak ingin mengubah kata sandi",
|
||||
"Keep_it_blank_if_you_do_not_want_to_show_currency_code": "Kosongkan jika Anda tidak ingin menampilkan kode mata uang",
|
||||
"Theme_Style": "Gaya Tema",
|
||||
"Theme_Color": "Warna Tema",
|
||||
"Default_Language": "Bahasa Bawaan",
|
||||
"Network": "Jaringan",
|
||||
"Routers": "Router",
|
||||
"IP_Pool": "IP Pool",
|
||||
"New_Router": "Router baru",
|
||||
"Add_Router": "Tambahkan Router",
|
||||
"Edit_Router": "Sunting Router",
|
||||
"Router_Name": "Nama Router",
|
||||
"IP_Address": "Alamat IP",
|
||||
"Router_Secret": "Password Router",
|
||||
"Description": "Deskrispi",
|
||||
"IP_Router_Already_Exist": "IP Router sudah ada",
|
||||
"Name_Pool": "Nama Pool",
|
||||
"Range_IP": "Rentang IP",
|
||||
"New_Pool": "Pool baru",
|
||||
"Add_Pool": "Tambahkan Pool",
|
||||
"Edit_Pool": "Sunting Pool",
|
||||
"Pool_Name_Already_Exist": "Nama Pool sudah ada",
|
||||
"Refill_Account": "Isi Ulang Akun",
|
||||
"Recharge_Account": "Isi Ulang Akun",
|
||||
"Select_Account": "Pilih Akun",
|
||||
"Service_Plan": "Paket Layanan",
|
||||
"Recharge": "Isi Ulang",
|
||||
"Method": "Metode",
|
||||
"Account_Created_Successfully": "Akun berhasil dibuat",
|
||||
"Database_Status": "Status Database",
|
||||
"Total_Database_Size": "Ukuran total database",
|
||||
"Download_Database_Backup": "Unduh cadangan database",
|
||||
"Table_Name": "Nama Tabel",
|
||||
"Rows": "Baris",
|
||||
"Size": "Ukuran",
|
||||
"Customer": "Pelanggan",
|
||||
"Add_New_Contact": "Tambahkan Kontak Baru",
|
||||
"Edit_Contact": "Sunting Kontak",
|
||||
"List_Contact": "Daftar Kontak",
|
||||
"Manage_Contact": "Kelola Kontak",
|
||||
"Reports": "Laporan",
|
||||
"Daily_Reports": "Laporan Harian",
|
||||
"Period_Reports": "Laporan Periode",
|
||||
"All_Transactions": "Semua Transaksi",
|
||||
"Total_Income": "Jumlah Pemasukan",
|
||||
"All_Transactions_at_Date": "Semua transaksi pada ganggal",
|
||||
"Export_for_Print": "Ekspor untuk cetak",
|
||||
"Print": "Cetak",
|
||||
"Export_to_PDF": "Ekspor ke PDF",
|
||||
"Click_Here_to_Print": "Klik Disini untuk mencetak",
|
||||
"You_can_use_html_tag": "Anda dapat menggunakan tag HTML",
|
||||
"Date_Format": "Format tanggal",
|
||||
"Income_Today": "Pendapatan hari ini",
|
||||
"Income_This_Month": "Penghasilan bulan ini",
|
||||
"Users_Active": "Pelanggan Aktif",
|
||||
"Total_Users": "Total Pelanggan",
|
||||
"Users": "Pelanggan",
|
||||
"Edit_User": "Sunting Pelanggan",
|
||||
"Last_Login": "Terakhir Masuk",
|
||||
"Administrator_Users": "Pengguna Administrator",
|
||||
"Manage_Administrator": "Kelola Administrator",
|
||||
"Add_New_Administrator": "Tambahkan Administrator Baru",
|
||||
"Localisation": "Lokalisasi",
|
||||
"Backup_Restore": "Cadangkan\/Pulihkan",
|
||||
"General_Settings": "Pengaturan Umum",
|
||||
"Date": "Tanggal",
|
||||
"Login_Successful": "Berhasil Masuk",
|
||||
"Failed_Login": "Gagal Masuk",
|
||||
"Settings_Saved_Successfully": "Pengaturan Berhasil Disimpan",
|
||||
"User_Updated_Successfully": "Pengguna Berhasil Diperbarui",
|
||||
"User_Expired__Today": "Pengguna Kedaluwarsa, Hari Ini",
|
||||
"Activity_Log": "Log Aktivitas",
|
||||
"View_Reports": "Lihat Laporan",
|
||||
"View_All": "Lihat semua",
|
||||
"Number_of_Vouchers": "Jumlah Voucher",
|
||||
"Length_Code": "Panjang Kode",
|
||||
"Code_Voucher": "Kode Voucher",
|
||||
"Voucher": "Voucher",
|
||||
"Hotspot_Voucher": "Voucher Hotspot",
|
||||
"Status_Voucher": "Voucher Status",
|
||||
"Add_Vouchers": "Tambah Voucher",
|
||||
"Create_Vouchers_Successfully": "Buat Voucher Berhasil",
|
||||
"Generate": "Menghasilkan",
|
||||
"Print_side_by_side__it_will_easy_to_cut": "Info Cetak",
|
||||
"From_Date": "Dari tanggal",
|
||||
"To_Date": "Hingga saat ini",
|
||||
"New_Service": "Layanan Baru",
|
||||
"Type": "Jenis",
|
||||
"Finish": "Menyelesaikan",
|
||||
"Application_Name__Company_Name": "Nama Aplikasi\/ Nama Perusahaan",
|
||||
"This_Name_will_be_shown_on_the_Title": "Nama ini akan ditampilkan pada Judul",
|
||||
"Next": "Berikutnya",
|
||||
"Last": "Terakhir",
|
||||
"Timezone": "Zona waktu",
|
||||
"Decimal_Point": "Titik Desimal",
|
||||
"Thousands_Separator": "Pemisah Ribuan",
|
||||
"Currency_Code": "Kode Mata Uang",
|
||||
"Order_Voucher": "Pesan Voucher",
|
||||
"Voucher_Activation": "Aktivasi Voucher",
|
||||
"List_Activated_Voucher": "Daftar Voucher yang diaktifkan",
|
||||
"Enter_voucher_code_here": "Masukkan kode voucher di sini",
|
||||
"Private_Message": "Pesan Pribadi",
|
||||
"Inbox": "Kotak Masuk",
|
||||
"Outbox": "Kotak Keluar",
|
||||
"Compose": "Menyusun",
|
||||
"Send_to": "Kirim ke",
|
||||
"Title": "Judul",
|
||||
"Message": "Pesan",
|
||||
"Your_Account_Information": "Informasi Akun Anda",
|
||||
"Welcome_to_the_Panel_Members_page__on_this_page_you_can_": "Selamat datang di halaman Anggota Panel, di halaman ini Anda dapat:",
|
||||
"Invalid_Username_or_Password": "Nama pengguna atau kata sandi salah",
|
||||
"You_do_not_have_permission_to_access_this_page": "Anda tidak memiliki izin untuk mengakses halaman ini",
|
||||
"Incorrect_Current_Password": "Kata sandi saat ini salah",
|
||||
"Password_changed_successfully__Please_login_again": "Kata sandi berhasil diubah, silakan login kembali",
|
||||
"All_field_is_required": "Semua bidang wajib diisi",
|
||||
"Voucher_Not_Valid": "Voucher tidak berlaku",
|
||||
"Activation_Vouchers_Successfully": "Aktivasi Voucher Berhasil",
|
||||
"Data_Not_Found": "Data tidak ditemukan",
|
||||
"Search_by_Username": "Cari berdasarkan nama pengguna",
|
||||
"Search_by_Name": "Cari berdasarkan nama",
|
||||
"Search_by_Code_Voucher": "Cari berdasarkan kode voucher",
|
||||
"Search": "Mencari",
|
||||
"Select_a_customer": "Pilih pelanggan",
|
||||
"Select_Routers": "Pilih Router",
|
||||
"Select_Plans": "Pilih Paket",
|
||||
"Select_Pool": "Pilih Pool",
|
||||
"Hrs": "Jam",
|
||||
"Mins": "Menit",
|
||||
"Days": "Hari",
|
||||
"Months": "Bulan",
|
||||
"Add_Language": "Tambahkan Bahasa",
|
||||
"Language_Name": "Nama Bahasa",
|
||||
"Folder_Name": "Nama Folder",
|
||||
"Translator": "Penerjemah",
|
||||
"Language_Name_Already_Exist": "Nama Bahasa sudah ada",
|
||||
"Payment_Gateway": "Gerbang Pembayaran",
|
||||
"Community": "Komunitas",
|
||||
"1_user_can_be_used_for_many_devices_": "1 pengguna bisa digunakan untuk banyak perangkat?",
|
||||
"Cannot_be_change_after_saved": "Tidak dapat diubah setelah disimpan",
|
||||
"Explain_Coverage_of_router": "Jelaskan cakupan router",
|
||||
"Name_of_Area_that_router_operated": "Nama area tempat router dioperasikan",
|
||||
"Payment_Notification_URL__Recurring_Notification_URL__Pay_Account_Notification_URL": "URL notifikasi pembayaran, URL notifikasi berulang, URL notifikasi akun bayar",
|
||||
"Finish_Redirect_URL__Unfinish_Redirect_URL__Error_Redirect_URL": "Selesaikan URL pengalihan, selesaikan URL pengalihan, URL pengalihan kesalahan",
|
||||
"Status": "Status",
|
||||
"Plan_Not_found": "Paket tidak ditemukan",
|
||||
"Failed_to_create_transaction_": "Gagal membuat transaksi.",
|
||||
"Seller_has_not_yet_setup_Xendit_payment_gateway": "Penjual belum menyiapkan gateway pembayaran Xendit",
|
||||
"Admin_has_not_yet_setup_Xendit_payment_gateway__please_tell_admin": "Admin belum menyiapkan gerbang pembayaran Xendit, mohon beritahu Admin",
|
||||
"Buy_this__your_active_package_will_be_overwrite": "Beli ini? Paket aktif Anda akan ditimpa",
|
||||
"You_already_have_unpaid_transaction__cancel_it_or_pay_it_": "Anda sudah memiliki transaksi yang belum dibayar, batalkan atau bayar.",
|
||||
"Transaction_Not_found": "Transaksi tidak ditemukan",
|
||||
"Cancel_it_": "Batalkan itu?",
|
||||
"expired": "Kedaluwarsa",
|
||||
"Check_for_Payment": "Periksa Pembayaran",
|
||||
"Transaction_still_unpaid_": "Transaksi masih belum dibayar.",
|
||||
"Paid_Date": "Tanggal Pembayaran",
|
||||
"Transaction_has_been_paid_": "Transaksi telah dibayar.",
|
||||
"PAID": "DIBAYAR",
|
||||
"CANCELED": "DIBATALKAN",
|
||||
"UNPAID": "BELUM DIBAYAR",
|
||||
"PAY_NOW": "BAYAR SEKARANG",
|
||||
"Buy_Hotspot_Plan": "Beli Paket Hotspot",
|
||||
"Buy_PPOE_Plan": "Beli Paket PPPoE",
|
||||
"Package": "Paket",
|
||||
"Order_Internet_Package": "Pesan Paket Internet",
|
||||
"Unknown_Command_": "Perintah tidak diketahui.",
|
||||
"Checking_payment": "Memeriksa pembayaran",
|
||||
"Create_Transaction_Success": "Transaksi berhasil dibuat",
|
||||
"You_have_unpaid_transaction": "Anda memiliki transaksi yang belum dibayar",
|
||||
"TripayPayment_Channel": "Saluran Pembayaran Tripay",
|
||||
"Payment_Channel": "Saluran Pembayaran",
|
||||
"Payment_check_failed_": "Pemeriksaan pembayaran gagal.",
|
||||
"Order_Package": "Pesan Paket",
|
||||
"Transactions": "Transaksi",
|
||||
"Payments": "Pembayaran",
|
||||
"History": "Riwayat",
|
||||
"Order_History": "Riwayat Pesanan",
|
||||
"Gateway": "Gerbang",
|
||||
"Date_Done": "Tanggal Selesai",
|
||||
"Unpaid_Order": "Pesanan Belum Dibayar",
|
||||
"Payment_Gateway_Not_Found": "Gerbang Pembayaran tidak ditemukan",
|
||||
"Payment_Gateway_saved_successfully": "Gerbang Pembayaran berhasil disimpan",
|
||||
"ORDER": "MEMESAN",
|
||||
"Package_History": "Riwayat Paket",
|
||||
"Buy_History": "Riwayat Beli",
|
||||
"Activation_History": "Riwayat Aktivasi",
|
||||
"Buy_Package": "Beli Paket",
|
||||
"Email": "Email",
|
||||
"Company_Footer": "Catatan Kaki Perusahaan",
|
||||
"Will_show_below_user_pages": "Akan ditampilkan dibawah halaman pengguna",
|
||||
"Request_OTP": "Minta OTP",
|
||||
"Verification_Code": "Kode Verifikasi",
|
||||
"SMS_Verification_Code": "Kode Verifikasi SMS",
|
||||
"Please_enter_your_email_address": "Silakan masukkan alamat email Anda",
|
||||
"Failed_to_create_Paypal_transaction_": "Gagal membuat transaksi Paypal.",
|
||||
"Plugin": "Plugin",
|
||||
"Plugin_Manager": "Manajer Plugin",
|
||||
"User_Notification": "Pemberitahuan Pelanggan",
|
||||
"Expired_Notification": "Pemberitahuan Kedaluwarsa",
|
||||
"User_will_get_notification_when_package_expired": "Pengguna akan mendapat notifikasi ketika paket sudah habis masa berlakunya",
|
||||
"Expired_Notification_Message": "Pesan Pemberitahuan Kedaluwarsa",
|
||||
"Payment_Notification": "Notifikasi Pembayaran",
|
||||
"User_will_get_invoice_notification_when_buy_package_or_package_refilled": "Pengguna akan mendapatkan notifikasi invoice saat membeli paket atau isi ulang paket",
|
||||
"Current_IP": "IP saat ini",
|
||||
"Current_MAC": "MAC saat ini",
|
||||
"Login_Status": "Status Masuk",
|
||||
"Login_Request_successfully": "Permintaan masuk berhasil",
|
||||
"Logout_Request_successfully": "Permintaan keluar berhasil",
|
||||
"Disconnect_Internet_": "Putuskan sambungan internet?",
|
||||
"Not_Online__Login_now_": "Tidak, masuk sekarang?",
|
||||
"You_are_Online__Logout_": "Kamu sedang aktif, ingin keluar?",
|
||||
"Connect_to_Internet_": "Hubungkan ke Internet?",
|
||||
"Your_account_not_connected_to_internet": "Akun Anda tidak terhubung ke internet",
|
||||
"Failed_to_create_transaction__": "Gagal membuat transaksi. ",
|
||||
"Failed_to_check_status_transaction__": "Gagal memeriksa status transaksi.",
|
||||
"Disable_Voucher": "Nonaktifkan Voucher",
|
||||
"Balance": "Saldo",
|
||||
"Balance_System": "Saldo Sistem",
|
||||
"Enable_System": "Aktifkan Sistem",
|
||||
"Allow_Transfer": "Izinkan Transfer",
|
||||
"Telegram_Notification": "Pemberitahuan Telegram",
|
||||
"SMS_OTP_Registration": "Pendaftaran SMS OTP",
|
||||
"Whatsapp_Notification": "Pemberitahuan WhatsApp",
|
||||
"Tawk_to_Chat_Widget": "Widget Obrolan Tawk.to",
|
||||
"Invoice": "Faktur",
|
||||
"Country_Code_Phone": "Kode Negara Telepon",
|
||||
"Voucher_activation_menu_will_be_hidden": "Menu aktivasi voucher akan disembunyikan",
|
||||
"Customer_can_deposit_money_to_buy_voucher": "Pelanggan dapat menyetor uang untuk membeli voucher",
|
||||
"Allow_balance_transfer_between_customers": "Izinkan transfer saldo antar pelanggan",
|
||||
"Reminder_Notification": "Pemberitahuan Pengingat",
|
||||
"Reminder_Notification_Message": "Pesan Pemberitahuan Pengingat",
|
||||
"Reminder_7_days": "Pengingat 7 hari",
|
||||
"Reminder_3_days": "Pengingat 3 hari",
|
||||
"Reminder_1_day": "Pengingat 1 hari",
|
||||
"PPPOE_Password": "Kata sandi PPPoE",
|
||||
"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",
|
||||
"Invoice_Balance_Message": "Faktur Pesan Saldo",
|
||||
"Invoice_Notification_Payment": "Faktur Pemberitahuan Pembayaran",
|
||||
"Balance_Notification_Payment": "Saldo Pemberitahuan Pembayaran",
|
||||
"Balance_Plans": "Paket Saldo",
|
||||
"Buy_Balance": "Beli Saldo",
|
||||
"Price": "Harga",
|
||||
"Validity": "Waktu",
|
||||
"Disable_auto_renewal_": "Nonaktifkan perpanjangan otomatis?",
|
||||
"Auto_Renewal_On": "Perpanjangan otomatis aktif",
|
||||
"Enable_auto_renewal_": "Aktifkan perpanjangan otomatis?",
|
||||
"Auto_Renewal_Off": "Perpanjangan otomatis mati",
|
||||
"Refill_Balance": "Isi Ulang Saldo",
|
||||
"Invoice_Footer": "Catatan Kaki Faktur",
|
||||
"Pay_With_Balance": "Bayar dengan Saldo",
|
||||
"Pay_this_with_Balance__your_active_package_will_be_overwrite": "Bayar ini dengan Saldo? Paket aktif Anda akan ditimpa",
|
||||
"Success_to_buy_package": "Berhasil membeli paket",
|
||||
"Auto_Renewal": "Perpanjangan otomatis",
|
||||
"View": "Melihat",
|
||||
"Back": "Kembali",
|
||||
"Active": "Aktif",
|
||||
"Transfer_Balance": "Kirim saldo",
|
||||
"Send_your_balance_": "Kirim saldo Anda?",
|
||||
"Send": "Kirim",
|
||||
"Cannot_send_to_yourself": "Tidak dapat mengirim ke diri Anda sendiri",
|
||||
"Sending_balance_success": "Berhasil mengirim saldo",
|
||||
"From": "Dari",
|
||||
"To": "Ke",
|
||||
"insufficient_balance": "Saldo tidak mencukupi",
|
||||
"Send_Balance": "Kirim saldo",
|
||||
"Received_Balance": "Saldo yang diterima",
|
||||
"Minimum_Balance_Transfer": "Minimal transfer saldo",
|
||||
"Minimum_Transfer": "Minimal Transfer",
|
||||
"Company_Logo": "Logo Perusahaan",
|
||||
"Expired_IP_Pool": "IP Pool Kedaluwarsa",
|
||||
"Proxy": "Proksi",
|
||||
"Proxy_Server": "Server Proksi",
|
||||
"Proxy_Server_Login": "Masuk Server Proksi",
|
||||
"Hotspot_Plan": "Paket Hotspot",
|
||||
"PPPOE_Plan": "Paket PPPoE",
|
||||
"UNKNOWN": "TIDAK DIKENAL",
|
||||
"Are_You_Sure_": "Apa kamu yakin?",
|
||||
"Success_to_send_package": "Berhasil mengirim paket",
|
||||
"Target_has_active_plan__different_with_current_plant_": "Target mempunyai paket aktif, berbeda dengan paket saat ini.",
|
||||
"Recharge_a_friend": "Isi ulang teman",
|
||||
"Buy_for_friend": "Beli untuk teman",
|
||||
"Buy_this_for_friend_account_": "Beli ini untuk akun teman?",
|
||||
"Review_package_before_recharge": "Tinjau paket sebelum mengisi ulang",
|
||||
"Activate": "Mengaktifkan paket",
|
||||
"Deactivate": "Menonaktifkan paket",
|
||||
"Sync": "Sinkronisasi",
|
||||
"Failed_to_create_PaymeTrust_transaction_": "Gagal membuat transaksi PaymeTrust.",
|
||||
"Location": "Lokasi",
|
||||
"Radius_Plans": "Paket Radius",
|
||||
"Change_title_in_user_Plan_order": "Ubah Judul dalam urutan paket pelanggan",
|
||||
"Logs": "Log",
|
||||
"Voucher_Format": "Format Voucher",
|
||||
"Resend_To_Customer": "Kirim Ulang Ke Pelanggan",
|
||||
"Service_Type": "Jenis Layanan",
|
||||
"Others": "Lainnya",
|
||||
"PPPoE": "PPPoE",
|
||||
"Hotspot": "Hotspot",
|
||||
"Monthly_Registered_Customers": "Pendaftaran Pelanggan perbulan",
|
||||
"Total_Monthly_Sales": "Total penjualan perbulan",
|
||||
"Active_Users": "Pelanggan Aktif",
|
||||
"SuperAdmin": "Super Admin",
|
||||
"Lists": "Daftar",
|
||||
"Vouchers": "Voucher",
|
||||
"Refill_Customer": "Isi Ulang Pelanggan",
|
||||
"Recharge_Customer": "Isi Ulang Pelanggan",
|
||||
"Plans": "Paket",
|
||||
"PPPOE": "PPPOE",
|
||||
"Bandwidth": "Bandwidth",
|
||||
"Send_Message": "Mengirim pesan",
|
||||
"Single_Customer": "Pelanggan Tunggal",
|
||||
"Bulk_Customers": "Pelanggan Massal",
|
||||
"Radius": "Radius",
|
||||
"Radius_NAS": "Radius NAS",
|
||||
"Customer_Announcement": "Pengumuman Pelanggan",
|
||||
"Language_Editor": "Editor Bahasa",
|
||||
"Plan_Category": "Kategori Paket",
|
||||
"ID": "ID",
|
||||
"Prev": "Sebelumnya",
|
||||
"Internet_Plan": "Paket Internet",
|
||||
"Generated_By": "Dihasilkan oleh",
|
||||
"All_Users_Insights": "Semua Wawasan Pengguna",
|
||||
"year": "Tahun",
|
||||
"month": "Bulan",
|
||||
"week": "Pekan",
|
||||
"day": "Hari",
|
||||
"hour": "Jam",
|
||||
"minute": "Menit",
|
||||
"second": "Kedua",
|
||||
"Account_Type": "Jenis akun",
|
||||
"Contact": "Kontak",
|
||||
"Paid": "Dibayar",
|
||||
"Personal": "Pribadi",
|
||||
"Coordinates": "Koordinat",
|
||||
"Confirm": "Mengonfirmasi",
|
||||
"Name": "Nama",
|
||||
"Plan": "Paket",
|
||||
"Using": "Menggunakan",
|
||||
"Total": "Total",
|
||||
"Additional_Cost": "Biaya tambahan",
|
||||
"Resend": "Kirim ulang",
|
||||
"Login": "Masuk",
|
||||
"success": "Sukses",
|
||||
"Click_Here": "Klik disini",
|
||||
"Your_friend_do_not_have_active_package": "Teman Anda tidak memiliki paket aktif",
|
||||
"If_your_friend_have_Additional_Cost__you_will_pay_for_that_too": "Jika teman Anda memiliki biaya tambahan, Anda juga akan membayarnya",
|
||||
"Select_Payment_Gateway": "Pilih Gerbang Pembayaran",
|
||||
"Available_Payment_Gateway": "Gerbang Pembayaran yang tersedia",
|
||||
"Pay_Now": "Bayar sekarang",
|
||||
"Notes": "Catatan",
|
||||
"will_be_replaced_with_Customer_Name": "akan diganti dengan nama Pelanggan",
|
||||
"will_be_replaced_with_Customer_username": "akan diganti dengan nama pengguna Pelanggan",
|
||||
"will_be_replaced_with_Package_name": "akan diganti dengan nama paket",
|
||||
"will_be_replaced_with_Package_price": "akan diganti dengan harga Paket",
|
||||
"will_be_replaced_with_Expiration_date": "akan diganti dengan tanggal kedaluwarsa",
|
||||
"additional_bills_for_customers": "tagihan tambahan untuk pelanggan",
|
||||
"Your_Company_Name_at_Settings": "Nama Perusahaan Anda di pengaturan",
|
||||
"Your_Company_Address_at_Settings": "Alamat Perusahaan Anda di pengaturan",
|
||||
"Your_Company_Phone_at_Settings": "Telepon Perusahaan Anda di pengaturan",
|
||||
"Invoice_number": "Nomor faktur",
|
||||
"Date_invoice_created": "Tanggal faktur dibuat",
|
||||
"Payment_gateway_user_paid_from": "Pengguna gateway pembayaran membayar dari",
|
||||
"Payment_channel_user_paid_from": "Pengguna saluran pembayaran membayar dari",
|
||||
"is_Hotspot_or_PPPOE": "adalah Hotspot atau PPPOE",
|
||||
"Internet_Package": "Paket internet",
|
||||
"Internet_Package_Prices": "Harga paket internet",
|
||||
"Receiver_name": "Nama penerima",
|
||||
"Username_internet": "Nama pengguna internet",
|
||||
"User_password": "Kata sandi pengguna",
|
||||
"Transaction_datetime": "Tanggal waktu transaksi",
|
||||
"Balance_Before": "Saldo sebelumnya",
|
||||
"Balance_After": "Saldo setelahnya",
|
||||
"For_Notes_by_admin": "Untuk catatan oleh Admin",
|
||||
"how_much_balance_have_been_send": "berapa banyak saldo yang telah dikirim",
|
||||
"Current_Balance": "Saldo saat ini",
|
||||
"Sender_name": "Nama pengirim",
|
||||
"Customer_Balance": "Saldo Pelanggan",
|
||||
"Privacy_Policy": "Kebijakan Privasi",
|
||||
"Terms_and_Conditions": "Syarat dan Ketentuan",
|
||||
"Disable_Registration": "Nonaktifkan Pendaftaran",
|
||||
"Customer_just_Login_with_Phone_number_and_Voucher_Code__Voucher_will_be_password": "Pelanggan cukup masuk dengan nomor telepon dan kode voucher, Voucher akan menjadi kata sandi",
|
||||
"After_Customer_activate_voucher_or_login__customer_will_be_redirected_to_this_url": "Setelah Pelanggan mengaktifkan voucher atau masuk, Pelanggan akan diarahkan ke URL ini",
|
||||
"Extend_Postpaid_Expiration": "Perpanjang masa kedaluwarsa pascabayar",
|
||||
"Allow_Extend": "Izinkan Perpanjang",
|
||||
"Extend_Days": "Perpanjang Hari",
|
||||
"Confirmation_Message": "Pesan konfirmasi",
|
||||
"Email_Notification": "Pemberitahuan Email",
|
||||
"This_Token_will_act_as_SuperAdmin_Admin": "Token ini akan bertindak sebagai SuperAdmin\/Admin",
|
||||
"Miscellaneous": "Aneka ragam",
|
||||
"OTP_Required": "Diperlukan OTP",
|
||||
"OTP_is_required_when_user_want_to_change_phone_number": "OTP diperlukan ketika pengguna ingin mengganti nomor telepon",
|
||||
"OTP_Method": "Metode OTP",
|
||||
"SMS": "SMS",
|
||||
"WhatsApp": "WhatsApp",
|
||||
"SMS_and_WhatsApp": "SMS dan WhatsApp",
|
||||
"The_method_which_OTP_will_be_sent_to_user": "Metode OTP yang akan dikirimkan ke pengguna",
|
||||
"Disabled": "Dinonaktifkan",
|
||||
"Banned": "Dicekal",
|
||||
"Inactive": "Tidak Aktif",
|
||||
"Suspended": "Disuspend"
|
||||
}
|
||||
|
5214
system/orm.php
5214
system/orm.php
File diff suppressed because it is too large
Load Diff
@ -93,5 +93,14 @@
|
||||
],
|
||||
"2024.4.5" : [
|
||||
"ALTER TABLE `tbl_payment_gateway` ADD `trx_invoice` VARCHAR(25) NOT NULL DEFAULT '' COMMENT 'from tbl_transactions' AFTER `paid_date`;"
|
||||
],
|
||||
"2024.5.17" : [
|
||||
"ALTER TABLE `tbl_customers` ADD `status` ENUM('Active','Banned','Disabled') NOT NULL DEFAULT 'Active' AFTER `auto_renewal`;"
|
||||
],
|
||||
"2024.5.18" : [
|
||||
"ALTER TABLE `tbl_customers` CHANGE `status` `status` ENUM('Active','Banned','Disabled','Inactive','Limited','Suspended') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'Active';"
|
||||
],
|
||||
"2024.5.20" : [
|
||||
"ALTER TABLE `tbl_customers` ADD `city` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci AFTER `address`, ADD `district` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci AFTER `city`, ADD `state` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci AFTER `district`, ADD `zip` VARCHAR(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci AFTER `state`;"
|
||||
]
|
||||
}
|
@ -17,14 +17,14 @@
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" id="expired" name="expired"
|
||||
placeholder="Hello [[name]], your internet package [[package]] has been expired"
|
||||
rows="3">{if $_json['expired']!=''}{Lang::htmlspecialchars($_json['expired'])}{else}Hello [[name]], your internet package [[package]] has been expired.{/if}</textarea>
|
||||
rows="4">{if $_json['expired']!=''}{Lang::htmlspecialchars($_json['expired'])}{else}Hello [[name]], your internet package [[package]] has been expired.{/if}</textarea>
|
||||
</div>
|
||||
<p class="help-block col-md-4">
|
||||
<b>[[name]]</b> - {Lang::T('will be replaced with Customer Name)}.<br>
|
||||
<b>[[username]]</b> - {Lang::T('will be replaced with Customer username)}.<br>
|
||||
<b>[[package]]</b> - {Lang::T('will be replaced with Package name)}.<br>
|
||||
<b>[[price]]</b> - {Lang::T('will be replaced with Package price)}.<br>
|
||||
<b>[[bills]]</b> - {Lang::T('additional bills for customers)}.
|
||||
<b>[[name]]</b> - {Lang::T('will be replaced with Customer Name')}.<br>
|
||||
<b>[[username]]</b> - {Lang::T('will be replaced with Customer username')}.<br>
|
||||
<b>[[package]]</b> - {Lang::T('will be replaced with Package name')}.<br>
|
||||
<b>[[price]]</b> - {Lang::T('will be replaced with Package price')}.<br>
|
||||
<b>[[bills]]</b> - {Lang::T('additional bills for customers')}.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -33,15 +33,15 @@
|
||||
<label class="col-md-2 control-label">{Lang::T('Reminder 7 days')}</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" id="reminder_7_day" name="reminder_7_day"
|
||||
rows="3">{Lang::htmlspecialchars($_json['reminder_7_day'])}</textarea>
|
||||
rows="4">{Lang::htmlspecialchars($_json['reminder_7_day'])}</textarea>
|
||||
</div>
|
||||
<p class="help-block col-md-4">
|
||||
<b>[[name]]</b> - {Lang::T('will be replaced with Customer Name)}.<br>
|
||||
<b>[[username]]</b> - {Lang::T('will be replaced with Customer username)}.<br>
|
||||
<b>[[package]]</b> - {Lang::T('will be replaced with Package name)}.<br>
|
||||
<b>[[price]]</b> - {Lang::T('will be replaced with Package price)}.<br>
|
||||
<b>[[expired_date]]</b> - {Lang::T('will be replaced with Expiration date)}.<br>
|
||||
<b>[[bills]]</b> - {Lang::T('additional bills for customers)}.
|
||||
<b>[[name]]</b> - {Lang::T('will be replaced with Customer Name')}.<br>
|
||||
<b>[[username]]</b> - {Lang::T('will be replaced with Customer username')}.<br>
|
||||
<b>[[package]]</b> - {Lang::T('will be replaced with Package name')}.<br>
|
||||
<b>[[price]]</b> - {Lang::T('will be replaced with Package price')}.<br>
|
||||
<b>[[expired_date]]</b> - {Lang::T('will be replaced with Expiration date')}.<br>
|
||||
<b>[[bills]]</b> - {Lang::T('additional bills for customers')}.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -50,15 +50,15 @@
|
||||
<label class="col-md-2 control-label">{Lang::T('Reminder 3 days')}</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" id="reminder_3_day" name="reminder_3_day"
|
||||
rows="3">{Lang::htmlspecialchars($_json['reminder_3_day'])}</textarea>
|
||||
rows="4">{Lang::htmlspecialchars($_json['reminder_3_day'])}</textarea>
|
||||
</div>
|
||||
<p class="help-block col-md-4">
|
||||
<b>[[name]]</b> - {Lang::T('will be replaced with Customer Name)}.<br>
|
||||
<b>[[username]]</b> - {Lang::T('will be replaced with Customer username)}.<br>
|
||||
<b>[[package]]</b> - {Lang::T('will be replaced with Package name)}.<br>
|
||||
<b>[[price]]</b> - {Lang::T('will be replaced with Package price)}.<br>
|
||||
<b>[[expired_date]]</b> - {Lang::T('will be replaced with Expiration date)}.<br>
|
||||
<b>[[bills]]</b> - {Lang::T('additional bills for customers)}.
|
||||
<b>[[name]]</b> - {Lang::T('will be replaced with Customer Name')}.<br>
|
||||
<b>[[username]]</b> - {Lang::T('will be replaced with Customer username')}.<br>
|
||||
<b>[[package]]</b> - {Lang::T('will be replaced with Package name')}.<br>
|
||||
<b>[[price]]</b> - {Lang::T('will be replaced with Package price')}.<br>
|
||||
<b>[[expired_date]]</b> - {Lang::T('will be replaced with Expiration date')}.<br>
|
||||
<b>[[bills]]</b> - {Lang::T('additional bills for customers')}.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -67,15 +67,15 @@
|
||||
<label class="col-md-2 control-label">{Lang::T('Reminder 1 day')}</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" id="reminder_1_day" name="reminder_1_day"
|
||||
rows="3">{Lang::htmlspecialchars($_json['reminder_1_day'])}</textarea>
|
||||
rows="4">{Lang::htmlspecialchars($_json['reminder_1_day'])}</textarea>
|
||||
</div>
|
||||
<p class="help-block col-md-4">
|
||||
<b>[[name]]</b> - {Lang::T('will be replaced with Customer Name)}.<br>
|
||||
<b>[[username]]</b> - {Lang::T('will be replaced with Customer username)}.<br>
|
||||
<b>[[package]]</b> - {Lang::T('will be replaced with Package name)}.<br>
|
||||
<b>[[price]]</b> - {Lang::T('will be replaced with Package price)}.<br>
|
||||
<b>[[expired_date]]</b> - {Lang::T('will be replaced with Expiration date)}.<br>
|
||||
<b>[[bills]]</b> - {Lang::T('additional bills for customers)}.
|
||||
<b>[[name]]</b> - {Lang::T('will be replaced with Customer Name')}.<br>
|
||||
<b>[[username]]</b> - {Lang::T('will be replaced with Customer username')}.<br>
|
||||
<b>[[package]]</b> - {Lang::T('will be replaced with Package name')}.<br>
|
||||
<b>[[price]]</b> - {Lang::T('will be replaced with Package price')}.<br>
|
||||
<b>[[expired_date]]</b> - {Lang::T('will be replaced with Expiration date')}.<br>
|
||||
<b>[[bills]]</b> - {Lang::T('additional bills for customers')}.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -88,22 +88,22 @@
|
||||
rows="20">{Lang::htmlspecialchars($_json['invoice_paid'])}</textarea>
|
||||
</div>
|
||||
<p class="col-md-4 help-block">
|
||||
<b>[[company_name]]</b> {Lang::T('Your Company Name at Settings)}.<br>
|
||||
<b>[[address]]</b> {Lang::T('Your Company Address at Settings)}.<br>
|
||||
<b>[[phone]]</b> - {Lang::T('Your Company Phone at Settings)}.<br>
|
||||
<b>[[invoice]]</b> - {Lang::T('Invoice number)}.<br>
|
||||
<b>[[date]]</b> - {Lang::T('Date invoice created)}.<br>
|
||||
<b>[[payment_gateway]]</b> - {Lang::T('Payment gateway user paid from)}.<br>
|
||||
<b>[[payment_channel]]</b> - {Lang::T('Payment channel user paid from)}.<br>
|
||||
<b>[[type]]</b> - {Lang::T('is Hotspot or PPPOE)}.<br>
|
||||
<b>[[plan_name]]</b> - {Lang::T('Internet Package)}.<br>
|
||||
<b>[[plan_price]]</b> - {Lang::T('Internet Package Prices)}.<br>
|
||||
<b>[[name]]</b> - {Lang::T('Receiver name)}.<br>
|
||||
<b>[[user_name]]</b> - {Lang::T('Username internet)}.<br>
|
||||
<b>[[user_password]]</b> - {Lang::T('User password)}.<br>
|
||||
<b>[[expired_date]]</b> - {Lang::T('Expired datetime)}.<br>
|
||||
<b>[[footer]]</b> - {Lang::T('Invoice Footer)}.<br>
|
||||
<b>[[note]]</b> - {Lang::T('For Notes by admin)}.<br>
|
||||
<b>[[company_name]]</b> {Lang::T('Your Company Name at Settings')}.<br>
|
||||
<b>[[address]]</b> {Lang::T('Your Company Address at Settings')}.<br>
|
||||
<b>[[phone]]</b> - {Lang::T('Your Company Phone at Settings')}.<br>
|
||||
<b>[[invoice]]</b> - {Lang::T('Invoice number')}.<br>
|
||||
<b>[[date]]</b> - {Lang::T('Date invoice created')}.<br>
|
||||
<b>[[payment_gateway]]</b> - {Lang::T('Payment gateway user paid from')}.<br>
|
||||
<b>[[payment_channel]]</b> - {Lang::T('Payment channel user paid from')}.<br>
|
||||
<b>[[type]]</b> - {Lang::T('is Hotspot or PPPOE')}.<br>
|
||||
<b>[[plan_name]]</b> - {Lang::T('Internet Package')}.<br>
|
||||
<b>[[plan_price]]</b> - {Lang::T('Internet Package Prices')}.<br>
|
||||
<b>[[name]]</b> - {Lang::T('Receiver name')}.<br>
|
||||
<b>[[user_name]]</b> - {Lang::T('Username internet')}.<br>
|
||||
<b>[[user_password]]</b> - {Lang::T('User password')}.<br>
|
||||
<b>[[expired_date]]</b> - {Lang::T('Expired datetime')}.<br>
|
||||
<b>[[footer]]</b> - {Lang::T('Invoice Footer')}.<br>
|
||||
<b>[[note]]</b> - {Lang::T('For Notes by admin')}.<br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -116,23 +116,23 @@
|
||||
rows="20">{Lang::htmlspecialchars($_json['invoice_balance'])}</textarea>
|
||||
</div>
|
||||
<p class="col-md-4 help-block">
|
||||
<b>[[company_name]]</b> - {Lang::T('Your Company Name at Settings)}.<br>
|
||||
<b>[[address]]</b> - {Lang::T('Your Company Address at Settings)}.<br>
|
||||
<b>[[phone]]</b> - {Lang::T('Your Company Phone at Settings)}.<br>
|
||||
<b>[[invoice]]</b> - {Lang::T('Invoice number)}.<br>
|
||||
<b>[[date]]</b> - {Lang::T('Date invoice created)}.<br>
|
||||
<b>[[payment_gateway]]</b> - {Lang::T('Payment gateway user paid from)}.<br>
|
||||
<b>[[payment_channel]]</b> - {Lang::T('Payment channel user paid from)}.<br>
|
||||
<b>[[type]]</b> - {Lang::T('is Hotspot or PPPOE)}.<br>
|
||||
<b>[[plan_name]]</b> - {Lang::T('Internet Package)}.<br>
|
||||
<b>[[plan_price]]</b> - {Lang::T('Internet Package Prices)}.<br>
|
||||
<b>[[name]]</b> - {Lang::T('Receiver name)}.<br>
|
||||
<b>[[user_name]]</b> - {Lang::T('Username internet)}.<br>
|
||||
<b>[[user_password]]</b> - {Lang::T('User password)}.<br>
|
||||
<b>[[trx_date]]</b> - {Lang::T('Transaction datetime)}.<br>
|
||||
<b>[[balance_before]]</b> - {Lang::T('Balance Before)}.<br>
|
||||
<b>[[balance]]</b> - {Lang::T('Balance After)}.<br>
|
||||
<b>[[footer]]</b> - {Lang::T('Invoice Footer)}.
|
||||
<b>[[company_name]]</b> - {Lang::T('Your Company Name at Settings')}.<br>
|
||||
<b>[[address]]</b> - {Lang::T('Your Company Address at Settings')}.<br>
|
||||
<b>[[phone]]</b> - {Lang::T('Your Company Phone at Settings')}.<br>
|
||||
<b>[[invoice]]</b> - {Lang::T('Invoice number')}.<br>
|
||||
<b>[[date]]</b> - {Lang::T('Date invoice created')}.<br>
|
||||
<b>[[payment_gateway]]</b> - {Lang::T('Payment gateway user paid from')}.<br>
|
||||
<b>[[payment_channel]]</b> - {Lang::T('Payment channel user paid from')}.<br>
|
||||
<b>[[type]]</b> - {Lang::T('is Hotspot or PPPOE')}.<br>
|
||||
<b>[[plan_name]]</b> - {Lang::T('Internet Package')}.<br>
|
||||
<b>[[plan_price]]</b> - {Lang::T('Internet Package Prices')}.<br>
|
||||
<b>[[name]]</b> - {Lang::T('Receiver name')}.<br>
|
||||
<b>[[user_name]]</b> - {Lang::T('Username internet')}.<br>
|
||||
<b>[[user_password]]</b> - {Lang::T('User password')}.<br>
|
||||
<b>[[trx_date]]</b> - {Lang::T('Transaction datetime')}.<br>
|
||||
<b>[[balance_before]]</b> - {Lang::T('Balance Before')}.<br>
|
||||
<b>[[balance]]</b> - {Lang::T('Balance After')}.<br>
|
||||
<b>[[footer]]</b> - {Lang::T('Invoice Footer')}.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -142,12 +142,12 @@
|
||||
<label class="col-md-2 control-label">{Lang::T('Send Balance')}</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" id="balance_send" name="balance_send"
|
||||
rows="3">{if $_json['balance_send']}{Lang::htmlspecialchars($_json['balance_send'])}{else}{Lang::htmlspecialchars($_default['balance_send'])}{/if}</textarea>
|
||||
rows="4">{if $_json['balance_send']}{Lang::htmlspecialchars($_json['balance_send'])}{else}{Lang::htmlspecialchars($_default['balance_send'])}{/if}</textarea>
|
||||
</div>
|
||||
<p class="col-md-4 help-block">
|
||||
<b>[[name]]</b> - {Lang::T('Receiver name)}.<br>
|
||||
<b>[[balance]]</b> - {Lang::T('how much balance have been send)}.<br>
|
||||
<b>[[current_balance]]</b> - {Lang::T('Current Balance)}.
|
||||
<b>[[name]]</b> - {Lang::T('Receiver name')}.<br>
|
||||
<b>[[balance]]</b> - {Lang::T('how much balance have been send')}.<br>
|
||||
<b>[[current_balance]]</b> - {Lang::T('Current Balance')}.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -156,12 +156,12 @@
|
||||
<label class="col-md-2 control-label">{Lang::T('Received Balance')}</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" id="balance_received" name="balance_received"
|
||||
rows="3">{if $_json['balance_received']}{Lang::htmlspecialchars($_json['balance_received'])}{else}{Lang::htmlspecialchars($_default['balance_received'])}{/if}</textarea>
|
||||
rows="4">{if $_json['balance_received']}{Lang::htmlspecialchars($_json['balance_received'])}{else}{Lang::htmlspecialchars($_default['balance_received'])}{/if}</textarea>
|
||||
</div>
|
||||
<p class="col-md-4 help-block">
|
||||
<b>[[name]]</b> - {Lang::T('Sender name)}.<br>
|
||||
<b>[[balance]]</b> - {Lang::T('how much balance have been received)}.<br>
|
||||
<b>[[current_balance]]</b> - {Lang::T('Current Balance)}.
|
||||
<b>[[name]]</b> - {Lang::T('Sender name')}.<br>
|
||||
<b>[[balance]]</b> - {Lang::T('how much balance have been received')}.<br>
|
||||
<b>[[current_balance]]</b> - {Lang::T('Current Balance')}.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -86,6 +86,13 @@
|
||||
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">{Lang::T('Recharge Using')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="payment_usings" class="form-control" value="{$_c['payment_usings']}" placeholder="{Lang::T('Cash')}, {Lang::T('Bank Transfer')}">
|
||||
</div>
|
||||
<p class="help-block col-md-4">This used for admin to select payment in recharge, using comma for every new options</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">APP URL</label>
|
||||
<div class="col-md-6">
|
||||
@ -152,6 +159,10 @@
|
||||
<option value="rand" {if $_c['voucher_format']=='rand' }selected="selected" {/if}>
|
||||
RaNdoM
|
||||
</option>
|
||||
<option value="numbers" {if $_c['voucher_format'] == 'numbers'}selected="selected"
|
||||
{/if}>
|
||||
Numbers
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4">UPPERCASE lowercase RaNdoM</p>
|
||||
@ -234,13 +245,15 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Extend Days')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="extend_days" placeholder="3" value="{$_c['extend_days']}">
|
||||
<input type="text" class="form-control" name="extend_days" placeholder="3"
|
||||
value="{$_c['extend_days']}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Confirmation Message')}</label>
|
||||
<div class="col-md-6">
|
||||
<textarea type="text" rows="4" class="form-control" name="extend_confirmation" placeholder="i agree to extends and will paid full after this">{$_c['extend_confirmation']}</textarea>
|
||||
<textarea type="text" rows="4" class="form-control" name="extend_confirmation"
|
||||
placeholder="i agree to extends and will paid full after this">{$_c['extend_confirmation']}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -589,9 +602,21 @@
|
||||
</div>
|
||||
<p class="help-block col-md-4">{Lang::T('The method which OTP will be sent to user')}</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Extend Package Expiry')}</label>
|
||||
<div class="col-md-6">
|
||||
<select name="extend_expiry" id="extend_expiry" class="form-control">
|
||||
<option value="no" {if $_c['extend_expiry']=='no' }selected="selected" {/if}>
|
||||
{Lang::T('No')}
|
||||
<option value="yes" {if $_c['extend_expiry']=='yes' }selected="selected"
|
||||
{/if}> {Lang::T('Yes')}
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4">{Lang::T('If user buy same internet plan, expiry date will extend')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* <div class="panel-heading">
|
||||
<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>
|
||||
@ -618,22 +643,22 @@
|
||||
<label class="col-md-2 control-label">{Lang::T('Tax Rate')}</label>
|
||||
<div class="col-md-6">
|
||||
<select name="tax_rate" id="tax_rate" class="form-control">
|
||||
<option value="0.005" {if $_c['tax_rate']=='0.005' }selected="selected" {/if}>
|
||||
<option value="0.5" {if $_c['tax_rate']=='0.5' }selected="selected" {/if}>
|
||||
{Lang::T('0.5%')}
|
||||
</option>
|
||||
<option value="0.01" {if $_c['tax_rate']=='0.01' }selected="selected" {/if}>
|
||||
<option value="1" {if $_c['tax_rate']=='1' }selected="selected" {/if}>
|
||||
{Lang::T('1%')}
|
||||
</option>
|
||||
<option value="0.015" {if $_c['tax_rate']=='0.015' }selected="selected" {/if}>
|
||||
<option value="1.5" {if $_c['tax_rate']=='1.5' }selected="selected" {/if}>
|
||||
{Lang::T('1.5%')}
|
||||
</option>
|
||||
<option value="0.02" {if $_c['tax_rate']=='0.02' }selected="selected" {/if}>
|
||||
<option value="2" {if $_c['tax_rate']=='2' }selected="selected" {/if}>
|
||||
{Lang::T('2%')}
|
||||
</option>
|
||||
<option value="0.05" {if $_c['tax_rate']=='0.05' }selected="selected" {/if}>
|
||||
<option value="5" {if $_c['tax_rate']=='5' }selected="selected" {/if}>
|
||||
{Lang::T('5%')}
|
||||
</option>
|
||||
<option value="0.1" {if $_c['tax_rate']=='0.1' }selected="selected" {/if}>
|
||||
<option value="10" {if $_c['tax_rate']=='10' }selected="selected" {/if}>
|
||||
{Lang::T('10%')}
|
||||
</option>
|
||||
<!-- Custom tax rate option -->
|
||||
@ -653,7 +678,7 @@
|
||||
</div>
|
||||
<p class="help-block col-md-4">{Lang::T('Enter the custom tax rate (e.g., 3.75 for 3.75%)')}</p>
|
||||
</div>
|
||||
</div> *}
|
||||
</div>
|
||||
|
||||
{* <div class="panel-heading" id="envato">
|
||||
<div class="btn-group pull-right">
|
||||
|
@ -1,58 +1,65 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-hovered mb20 panel-primary">
|
||||
<div class="panel-heading">{Lang::T('Bandwidth Plans')}</div>
|
||||
<div class="panel-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
||||
<div class="col-md-8">
|
||||
<form id="site-search" method="post" action="{$_url}bandwidth/list/">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="name" class="form-control" placeholder="{Lang::T('Search by Name')}...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{Lang::T('Search')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="{$_url}bandwidth/add" class="btn btn-primary btn-block"><i class="ion ion-android-add"> </i> {Lang::T('New Bandwidth')}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-condensed table-striped table_mobile">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{Lang::T('Bandwidth Name')}</th>
|
||||
<th>{Lang::T('Rate')}</th>
|
||||
<th>{Lang::T('Burst')}</th>
|
||||
<th>{Lang::T('Manage')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr>
|
||||
<td>{$ds['name_bw']}</td>
|
||||
<td>{$ds['rate_down']} {$ds['rate_down_unit']} / {$ds['rate_up']} {$ds['rate_up_unit']}</td>
|
||||
<td>{$ds['burst']}</td>
|
||||
<td>
|
||||
<a href="{$_url}bandwidth/edit/{$ds['id']}" class="btn btn-sm btn-warning">{Lang::T('Edit')}</a>
|
||||
<a href="{$_url}bandwidth/delete/{$ds['id']}" id="{$ds['id']}" class="btn btn-danger btn-sm" onclick="return confirm('{Lang::T('Delete')}?')" ><i class="glyphicon glyphicon-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="pagination.tpl"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-hovered mb20 panel-primary">
|
||||
<div class="panel-heading">{Lang::T('Bandwidth Plans')}</div>
|
||||
<div class="panel-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
||||
<div class="col-md-8">
|
||||
<form id="site-search" method="post" action="{$_url}bandwidth/list/">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="name" class="form-control"
|
||||
placeholder="{Lang::T('Search by Name')}...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{Lang::T('Search')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="{$_url}bandwidth/add" class="btn btn-primary btn-block"><i class="ion ion-android-add">
|
||||
</i> {Lang::T('New Bandwidth')}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-condensed table-striped table_mobile">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{Lang::T('Bandwidth Name')}</th>
|
||||
<th>{Lang::T('Rate')}</th>
|
||||
<th>{Lang::T('Burst')}</th>
|
||||
<th>{Lang::T('Manage')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr>
|
||||
<td>{$ds['name_bw']}</td>
|
||||
<td>{$ds['rate_down']} {$ds['rate_down_unit']} / {$ds['rate_up']} {$ds['rate_up_unit']}
|
||||
</td>
|
||||
<td>{$ds['burst']}</td>
|
||||
<td>
|
||||
<a href="{$_url}bandwidth/edit/{$ds['id']}"
|
||||
class="btn btn-sm btn-warning">{Lang::T('Edit')}</a>
|
||||
<a href="{$_url}bandwidth/delete/{$ds['id']}" id="{$ds['id']}"
|
||||
class="btn btn-danger btn-sm"
|
||||
onclick="return confirm('{Lang::T('Delete')}?')"><i
|
||||
class="glyphicon glyphicon-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="pagination.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="sections/footer.tpl"}
|
59
ui/ui/community-rollback.tpl
Normal file
59
ui/ui/community-rollback.tpl
Normal file
@ -0,0 +1,59 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
<center><a href="https://s.id/standwithpalestine" target="_blank"><img
|
||||
src="https://raw.githubusercontent.com/Safouene1/support-palestine-banner/master/banner-support.svg"
|
||||
class="img-responsive"></a></center>
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="box box-hovered mb20 box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Master</h3>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
{foreach $masters as $data}
|
||||
<tr>
|
||||
<td>{nl2br($data['commit']['message'])}</td>
|
||||
<td>{Lang::dateTimeFormat(str_replace(['Z','T'],'',$data['commit']['author']['date']))}</td>
|
||||
<td>
|
||||
<a href="/update.php?update_url=https://github.com/hotspotbilling/phpnuxbill/archive/{$data['sha']}.zip"
|
||||
class="btn btn-sm btn-primary">
|
||||
update
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="box box-hovered mb20 box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Development</h3>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
{foreach $devs as $data}
|
||||
<tr>
|
||||
<td>{nl2br($data['commit']['message'])}</td>
|
||||
<td>{Lang::dateTimeFormat(str_replace(['Z','T'],'',$data['commit']['author']['date']))}</td>
|
||||
<td>
|
||||
<a href="/update.php?update_url=https://github.com/hotspotbilling/phpnuxbill/archive/{$data['sha']}.zip"
|
||||
class="btn btn-sm btn-primary">
|
||||
update
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="sections/footer.tpl"}
|
@ -152,8 +152,9 @@
|
||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||
<a href="./update.php" class="btn btn-success btn-sm btn-block">Install Latest Version</a>
|
||||
<a href="https://github.com/hotspotbilling/phpnuxbill/archive/refs/heads/master.zip" target="_blank"
|
||||
class="btn btn-warning btn-sm btn-block">Download Latest Version</a>
|
||||
class="btn btn-warning btn-sm btn-block text-black">Download Latest Version</a>
|
||||
</div>
|
||||
<center><a href="{$_url}community/rollback" class="btn btn-link btn-sm btn-block">Select Old Version</a></center>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||
|
@ -121,6 +121,51 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="box box-primary box-solid collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{Lang::T('Additional Information')}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{Lang::T('City')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" id="city" name="city"
|
||||
value="{$d['city']}">
|
||||
<small class="form-text text-muted">{Lang::T('City of Resident')}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{Lang::T('District')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" id="district" name="district"
|
||||
value="{$d['district']}">
|
||||
<small class="form-text text-muted">{Lang::T('District')}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{Lang::T('State')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" id="state" name="state"
|
||||
value="{$d['state']}">
|
||||
<small class="form-text text-muted">{Lang::T('State of Resident')}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{Lang::T('Zip')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" id="zip" name="zip"
|
||||
value="{$d['zip']}">
|
||||
<small class="form-text text-muted">{Lang::T('Zip Code')}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<center>
|
||||
<button class="btn btn-primary" type="submit">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}customers/edit-post">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
||||
<div class="panel panel-{if $d['status']=='Active'}primary{else}danger{/if} panel-hovered panel-stacked mb30">
|
||||
<div class="panel-heading">{Lang::T('Edit Contact')}</div>
|
||||
<div class="panel-body">
|
||||
<input type="hidden" name="id" value="{$d['id']}">
|
||||
@ -20,7 +20,7 @@
|
||||
{/if}
|
||||
<input type="text" class="form-control" name="username" value="{$d['username']}"
|
||||
required
|
||||
placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
|
||||
placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -108,6 +108,22 @@
|
||||
<div id="map" style="width: '100%'; height: 200px; min-height: 150px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control" id="status" name="status">
|
||||
{foreach $statuses as $status}
|
||||
<option value="{$status}" {if $d['status'] eq $status }selected{/if}>{Lang::T($status)}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<span class="help-block">
|
||||
{Lang::T('Banned')}: {Lang::T('Customer cannot login again')}.<br>
|
||||
{Lang::T('Disabled')}: {Lang::T('Customer can login but cannot buy internet plan, Admin cannot recharge customer')}.<br>
|
||||
{Lang::T('Don\'t forget to deactivate all active plan too')}.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -144,6 +160,51 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="box box-primary box-solid collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{Lang::T('Additional Information')}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{Lang::T('City')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" id="city" name="city"
|
||||
value="{$d['city']}">
|
||||
<small class="form-text text-muted">{Lang::T('City of Resident')}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{Lang::T('District')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" id="district" name="district"
|
||||
value="{$d['district']}">
|
||||
<small class="form-text text-muted">{Lang::T('District')}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{Lang::T('State')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" id="state" name="state"
|
||||
value="{$d['state']}">
|
||||
<small class="form-text text-muted">{Lang::T('State of Resident')}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{Lang::T('Zip')}</label>
|
||||
<div class="col-md-9">
|
||||
<input type="text" class="form-control" id="zip" name="zip"
|
||||
value="{$d['zip']}">
|
||||
<small class="form-text text-muted">{Lang::T('Zip Code')}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<center>
|
||||
<button class="btn btn-primary" type="submit">
|
||||
@ -219,13 +280,15 @@
|
||||
});
|
||||
}
|
||||
window.onload = function() {
|
||||
{/literal}{if $d['coordinates']}
|
||||
setupMap({$d['coordinates']});
|
||||
{else}
|
||||
getLocation();
|
||||
{/if}{literal}
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
{/literal}
|
||||
{if $d['coordinates']}
|
||||
setupMap({$d['coordinates']});
|
||||
{else}
|
||||
getLocation();
|
||||
{/if}
|
||||
{literal}
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
{include file="sections/footer.tpl"}
|
||||
{include file="sections/footer.tpl"}
|
@ -1,8 +1,24 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
<!-- Map container div -->
|
||||
|
||||
<div id="map" class="well" style="width: '100%'; height: 78vh; margin: 20px auto"></div>
|
||||
<form id="site-search" method="post" action="{$_url}map/customer/">
|
||||
<input type="hidden" name="_route" value="map/customer">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="search" class="form-control" value="{$search}"
|
||||
placeholder="{Lang::T('Search')}...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{Lang::T('Search')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Map container div -->
|
||||
<div id="map" class="well" style="width: '100%'; height: 70vh; margin: 20px auto"></div>
|
||||
|
||||
{include file="pagination.tpl"}
|
||||
|
||||
{literal}
|
||||
<script>
|
||||
@ -29,31 +45,31 @@
|
||||
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',
|
||||
subdomains: 'abcd',
|
||||
maxZoom: 20
|
||||
}).addTo(map);
|
||||
}).addTo(map);
|
||||
|
||||
customers.forEach(function(customer) {
|
||||
var name = customer.id;
|
||||
var name = customer.name;
|
||||
var info = customer.info;
|
||||
var direction = customer.direction;
|
||||
var coordinates = customer.coordinates;
|
||||
var balance = customer.balance;
|
||||
var address = customer.address;
|
||||
customers.forEach(function(customer) {
|
||||
var name = customer.id;
|
||||
var name = customer.name;
|
||||
var info = customer.info;
|
||||
var direction = customer.direction;
|
||||
var coordinates = customer.coordinates;
|
||||
var balance = customer.balance;
|
||||
var address = customer.address;
|
||||
|
||||
// Create a popup for the marker
|
||||
var popupContent = "<strong>Name</strong>: " + name + "<br>" +
|
||||
"<strong>Info</strong>: " + info + "<br>" +
|
||||
"<strong>Balance</strong>: " + balance + "<br>" +
|
||||
"<strong>Address</strong>: " + address + "<br>" +
|
||||
"<a href='{/literal}{$_url}{literal}customers/view/"+ customer.id +"'>More Info</a> • " +
|
||||
"<a href='https://www.google.com/maps/dir//" + direction + "' target='maps'>Get Direction</a><br>";
|
||||
// Create a popup for the marker
|
||||
var popupContent = "<strong>Name</strong>: " + name + "<br>" +
|
||||
"<strong>Info</strong>: " + info + "<br>" +
|
||||
"<strong>Balance</strong>: " + balance + "<br>" +
|
||||
"<strong>Address</strong>: " + address + "<br>" +
|
||||
"<a href='{/literal}{$_url}{literal}customers/view/"+ customer.id +"'>More Info</a> • " +
|
||||
"<a href='https://www.google.com/maps/dir//" + direction + "' target='maps'>Get Direction</a><br>";
|
||||
|
||||
// Add marker to map
|
||||
var marker = L.marker(JSON.parse(coordinates)).addTo(group);
|
||||
marker.bindTooltip(name, { permanent: true }).bindPopup(popupContent);
|
||||
});
|
||||
// Add marker to map
|
||||
var marker = L.marker(JSON.parse(coordinates)).addTo(group);
|
||||
marker.bindTooltip(name, { permanent: true }).bindPopup(popupContent);
|
||||
});
|
||||
|
||||
map.fitBounds(group.getBounds());
|
||||
map.fitBounds(group.getBounds());
|
||||
}
|
||||
window.onload = function() {
|
||||
getLocation();
|
||||
|
@ -2,15 +2,17 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-md-4">
|
||||
<div class="box box-primary">
|
||||
<div class="box box-{if $d['status']=='Active'}primary{else}danger{/if}">
|
||||
<div class="box-body box-profile">
|
||||
<img class="profile-user-img img-responsive img-circle"
|
||||
src="https://robohash.org/{$d['id']}?set=set3&size=100x100&bgset=bg1"
|
||||
onerror="this.src='{$UPLOAD_PATH}/user.default.jpg'" alt="avatar">
|
||||
|
||||
<h3 class="profile-username text-center">{$d['fullname']}</h3>
|
||||
|
||||
<ul class="list-group list-group-unbordered">
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Status')}</b> <span
|
||||
class="pull-right {if $d['status'] !='Active'}bg-red{/if}"> {Lang::T($d['status'])} </span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Username')}</b> <span class="pull-right">{$d['username']}</span>
|
||||
</li>
|
||||
@ -20,9 +22,19 @@
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Email')}</b> <span class="pull-right">{$d['email']}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="text-muted">{Lang::nl2br($d['address'])}</p>
|
||||
<ul class="list-group list-group-unbordered">
|
||||
<li class="list-group-item">{Lang::nl2br($d['address'])}</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('City')}</b> <span class="pull-right">{Lang::T($d['city'])}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('District')}</b> <span class="pull-right">{Lang::T($d['district'])}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('State')}</b> <span class="pull-right">{Lang::T($d['state'])}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Zip')}</b> <span class="pull-right">{Lang::T($d['zip'])}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Password')}</b> <input type="password" value="{$d['password']}"
|
||||
style=" border: 0px; text-align: right;" class="pull-right"
|
||||
@ -233,23 +245,23 @@
|
||||
</div>
|
||||
|
||||
{if $d['coordinates']}
|
||||
{literal}
|
||||
<script src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"></script>
|
||||
<script>
|
||||
function setupMap(lat, lon) {
|
||||
var map = L.map('map').setView([lat, lon], 17);
|
||||
L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/light_all/{z}/{x}/{y}.png', {
|
||||
attribution:
|
||||
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',
|
||||
subdomains: 'abcd',
|
||||
maxZoom: 20
|
||||
}).addTo(map);
|
||||
var marker = L.marker([lat, lon]).addTo(map);
|
||||
}
|
||||
window.onload = function() {
|
||||
{/literal}setupMap({$d['coordinates']});{literal}
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
{literal}
|
||||
<script src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"></script>
|
||||
<script>
|
||||
function setupMap(lat, lon) {
|
||||
var map = L.map('map').setView([lat, lon], 17);
|
||||
L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/light_all/{z}/{x}/{y}.png', {
|
||||
attribution:
|
||||
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',
|
||||
subdomains: 'abcd',
|
||||
maxZoom: 20
|
||||
}).addTo(map);
|
||||
var marker = L.marker([lat, lon]).addTo(map);
|
||||
}
|
||||
window.onload = function() {
|
||||
{/literal}setupMap({$d['coordinates']});{literal}
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
{include file="sections/footer.tpl"}
|
@ -16,24 +16,72 @@
|
||||
<div class="panel panel-hovered mb20 panel-primary">
|
||||
<div class="panel-heading">
|
||||
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-xs" title="save" href="{$_url}customers/csv"
|
||||
onclick="return confirm('This will export to CSV?')"><span class="glyphicon glyphicon-download"
|
||||
aria-hidden="true"></span> CSV</a>
|
||||
</div>
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-xs" title="save" href="{$_url}customers/csv"
|
||||
onclick="return confirm('This will export to CSV?')"><span class="glyphicon glyphicon-download"
|
||||
aria-hidden="true"></span> CSV</a>
|
||||
</div>
|
||||
{/if}
|
||||
{Lang::T('Manage Contact')}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
||||
<div class="col-md-8">
|
||||
|
||||
<form id="site-search" method="post" action="{$_url}customers">
|
||||
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
||||
<div class="col-lg-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Order </span>
|
||||
<div class="row row-no-gutters">
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" id="order" name="order">
|
||||
<option value="username" {if $order eq 'username' }selected{/if}>{Lang::T('Username')}</option>
|
||||
<option value="created_at" {if $order eq 'created_at' }selected{/if}>{Lang::T('Created Date')}</option>
|
||||
<option value="balance" {if $order eq 'balance' }selected{/if}>{Lang::T('Balance')}</option>
|
||||
<option value="status" {if $order eq 'status' }selected{/if}>{Lang::T('Status')}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control" id="orderby" name="orderby">
|
||||
<option value="asc" {if $orderby eq 'asc' }selected{/if}>{Lang::T('Ascending')}</option>
|
||||
<option value="desc" {if $orderby eq 'desc' }selected{/if}>{Lang::T('Descending')}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">Status</span>
|
||||
<select class="form-control" id="filter" name="filter">
|
||||
{foreach $statuses as $status}
|
||||
<option value="{$status}" {if $filter eq $status }selected{/if}>{Lang::T($status)}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="search" class="form-control"
|
||||
placeholder="{Lang::T('Search')}..." value="{$search}">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-primary" type="submit">{Lang::T('Query')}</button>
|
||||
<button class="btn btn-primary" type="submit" name="export" value="csv">
|
||||
<span class="glyphicon glyphicon-download"
|
||||
aria-hidden="true"></span> CSV
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-1">
|
||||
<a href="{$_url}customers/add" class="btn btn-success text-black btn-block"><i
|
||||
class="ion ion-android-add">
|
||||
</i> {Lang::T('Add')}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="{$_url}customers/add" class="btn btn-primary btn-block"><i class="ion ion-android-add">
|
||||
</i> {Lang::T('Add New Contact')}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br>
|
||||
<div class="table-responsive table_mobile">
|
||||
<table id="customerTable" class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
@ -45,50 +93,52 @@
|
||||
<th>{Lang::T('Contact')}</th>
|
||||
<th>{Lang::T('Package')}</th>
|
||||
<th>{Lang::T('Service Type')}</th>
|
||||
<th>{Lang::T('Status')}</th>
|
||||
<th>{Lang::T('Created On')}</th>
|
||||
<th>{Lang::T('Manage')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr>
|
||||
<td onclick="window.location.href = '{$_url}customers/view/{$ds['id']}'"
|
||||
style="cursor:pointer;">{$ds['username']}</td>
|
||||
<td>{$ds['account_type']}</td>
|
||||
<td onclick="window.location.href = '{$_url}customers/view/{$ds['id']}'"
|
||||
style="cursor: pointer;">{$ds['fullname']}</td>
|
||||
<td>{Lang::moneyFormat($ds['balance'])}</td>
|
||||
<td align="center">
|
||||
{if $ds['phonenumber']}
|
||||
<a href="tel:{$ds['phonenumber']}" class="btn btn-default btn-xs"
|
||||
title="{$ds['phonenumber']}"><i class="glyphicon glyphicon-earphone"></i></a>
|
||||
{/if}
|
||||
{if $ds['email']}
|
||||
<a href="mailto:{$ds['email']}" class="btn btn-default btn-xs"
|
||||
title="{$ds['email']}"><i class="glyphicon glyphicon-envelope"></i></a>
|
||||
{/if}
|
||||
{if $ds['coordinates']}
|
||||
<a href="https://www.google.com/maps/dir//{$ds['coordinates']}/" target="_blank"
|
||||
class="btn btn-default btn-xs" title="{$ds['coordinates']}"><i
|
||||
class="glyphicon glyphicon-map-marker"></i></a>
|
||||
{/if}
|
||||
</td>
|
||||
<td align="center" api-get-text="{$_url}autoload/customer_is_active/{$ds['id']}">
|
||||
<span class="label label-default">•</span>
|
||||
</td>
|
||||
<td>{$ds['service_type']}</td>
|
||||
<td>{Lang::dateTimeFormat($ds['created_at'])}</td>
|
||||
<td align="center">
|
||||
<a href="{$_url}customers/view/{$ds['id']}" id="{$ds['id']}"
|
||||
style="margin: 0px; color:black"
|
||||
class="btn btn-success btn-xs"> {Lang::T('View')} </a>
|
||||
<a href="{$_url}customers/edit/{$ds['id']}" id="{$ds['id']}"
|
||||
style="margin: 0px; color:black"
|
||||
class="btn btn-info btn-xs"> {Lang::T('Edit')} </a>
|
||||
<a href="{$_url}plan/recharge/{$ds['id']}" id="{$ds['id']}" style="margin: 0px;"
|
||||
class="btn btn-primary btn-xs">{Lang::T('Recharge')}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr {if $ds['status'] != 'Active'}class="danger"{/if}>
|
||||
<td onclick="window.location.href = '{$_url}customers/view/{$ds['id']}'"
|
||||
style="cursor:pointer;">{$ds['username']}</td>
|
||||
<td>{$ds['account_type']}</td>
|
||||
<td onclick="window.location.href = '{$_url}customers/view/{$ds['id']}'"
|
||||
style="cursor: pointer;">{$ds['fullname']}</td>
|
||||
<td>{Lang::moneyFormat($ds['balance'])}</td>
|
||||
<td align="center">
|
||||
{if $ds['phonenumber']}
|
||||
<a href="tel:{$ds['phonenumber']}" class="btn btn-default btn-xs"
|
||||
title="{$ds['phonenumber']}"><i class="glyphicon glyphicon-earphone"></i></a>
|
||||
{/if}
|
||||
{if $ds['email']}
|
||||
<a href="mailto:{$ds['email']}" class="btn btn-default btn-xs"
|
||||
title="{$ds['email']}"><i class="glyphicon glyphicon-envelope"></i></a>
|
||||
{/if}
|
||||
{if $ds['coordinates']}
|
||||
<a href="https://www.google.com/maps/dir//{$ds['coordinates']}/" target="_blank"
|
||||
class="btn btn-default btn-xs" title="{$ds['coordinates']}"><i
|
||||
class="glyphicon glyphicon-map-marker"></i></a>
|
||||
{/if}
|
||||
</td>
|
||||
<td align="center" api-get-text="{$_url}autoload/customer_is_active/{$ds['id']}">
|
||||
<span class="label label-default">•</span>
|
||||
</td>
|
||||
<td>{$ds['service_type']}</td>
|
||||
<td>{Lang::T($ds['status'])}</td>
|
||||
<td>{Lang::dateTimeFormat($ds['created_at'])}</td>
|
||||
<td align="center">
|
||||
<a href="{$_url}customers/view/{$ds['id']}" id="{$ds['id']}"
|
||||
style="margin: 0px; color:black"
|
||||
class="btn btn-success btn-xs"> {Lang::T('View')} </a>
|
||||
<a href="{$_url}customers/edit/{$ds['id']}" id="{$ds['id']}"
|
||||
style="margin: 0px; color:black"
|
||||
class="btn btn-info btn-xs"> {Lang::T('Edit')} </a>
|
||||
<a href="{$_url}plan/recharge/{$ds['id']}" id="{$ds['id']}" style="margin: 0px;"
|
||||
class="btn btn-primary btn-xs">{Lang::T('Recharge')}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
@ -104,11 +154,15 @@
|
||||
<script>
|
||||
var $j = jQuery.noConflict();
|
||||
|
||||
$j(document).ready(function () {
|
||||
$j(document).ready(function() {
|
||||
$j('#customerTable').DataTable({
|
||||
order: [[{$order_pos}, '{$orderby}']],
|
||||
"pagingType": "full_numbers",
|
||||
"lengthMenu": [ [5, 10, 25, 50, 100, -1], [5, 10, 25, 50, 100, "All"] ],
|
||||
"pageLength": 5
|
||||
"lengthMenu": [
|
||||
[5, 10, 25, 50, 100, -1],
|
||||
[5, 10, 25, 50, 100, "All"]
|
||||
],
|
||||
"pageLength": 25
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -74,8 +74,7 @@
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<a href="{$_url}settings/app#hide_dashboard_content" class="btn bg-teal btn-sm"><i
|
||||
class="fa fa-times"></i>
|
||||
<a href="{$_url}dashboard&refresh" class="btn bg-teal btn-sm"><i class="fa fa-refresh"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -96,8 +95,7 @@
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn bg-teal btn-sm" data-widget="collapse"><i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<a href="{$_url}settings/app#hide_dashboard_content" class="btn bg-teal btn-sm"><i
|
||||
class="fa fa-times"></i>
|
||||
<a href="{$_url}dashboard&refresh" class="btn bg-teal btn-sm"><i class="fa fa-refresh"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -146,21 +144,27 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{Lang::T('Username')}</th>
|
||||
<th>{Lang::T('Created On')}</th>
|
||||
<th>{Lang::T('Expires On')}</th>
|
||||
<th>{Lang::T('Created / Expired')}</th>
|
||||
<th>{Lang::T('Internet Plan')}</th>
|
||||
<th>{Lang::T('Location')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $expire as $expired}
|
||||
{assign var="rem_exp" value="{$expired['expiration']} {$expired['time']}"}
|
||||
{assign var="rem_started" value="{$expired['recharged_on']} {$expired['recharged_time']}"}
|
||||
<tr>
|
||||
<td><a href="{$_url}customers/viewu/{$expired['username']}">{$expired['username']}</a></td>
|
||||
<td>{Lang::dateAndTimeFormat($expired['recharged_on'],$expired['recharged_time'])}
|
||||
</td>
|
||||
<td>{Lang::dateAndTimeFormat($expired['expiration'],$expired['time'])}
|
||||
<td><small data-toggle="tooltip" data-placement="top"
|
||||
title="{Lang::dateAndTimeFormat($expired['recharged_on'],$expired['recharged_time'])}">{Lang::timeElapsed($rem_started)}</small> /
|
||||
<span data-toggle="tooltip" data-placement="top"
|
||||
title="{Lang::dateAndTimeFormat($expired['expiration'],$expired['time'])}">{Lang::timeElapsed($rem_exp)}</span>
|
||||
</td>
|
||||
<td>{$expired['namebp']}</td>
|
||||
<td>{$expired['routers']}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="pagination.tpl"}
|
||||
@ -381,6 +385,21 @@
|
||||
var latestVersion = data.version;
|
||||
if (localVersion !== latestVersion) {
|
||||
$('#version').html('Latest Version: ' + latestVersion);
|
||||
Swal.fire({
|
||||
icon: 'info',
|
||||
title: "New Version Available\nVersion: "+latestVersion,
|
||||
toast: true,
|
||||
position: 'bottom-right',
|
||||
showConfirmButton: true,
|
||||
showCloseButton: true,
|
||||
timer: 30000,
|
||||
confirmButtonText: '<a href="{$_url}community#latestVersion" style="color: white;">Update Now</a>',
|
||||
timerProgressBar: true,
|
||||
didOpen: (toast) => {
|
||||
toast.addEventListener('mouseenter', Swal.stopTimer)
|
||||
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -6,6 +6,7 @@
|
||||
<div class="panel-heading">{Lang::T('Refill Balance')}</div>
|
||||
<div class="panel-body">
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}plan/deposit-post">
|
||||
<input type="hidden" name="stoken" value="{App::getToken()}">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Select Account')}</label>
|
||||
<div class="col-md-6">
|
||||
|
@ -59,7 +59,7 @@
|
||||
<div class="col-md-10">
|
||||
<input type="radio" id="Unlimited" name="typebp" value="Unlimited"
|
||||
{if $d['typebp'] eq 'Unlimited'} checked {/if}> {Lang::T('Unlimited')}
|
||||
<input type="radio" id="Limited" {if $_c['radius_enable'] and $d['is_radius']}disabled{/if}
|
||||
<input type="radio" id="Limited"
|
||||
name="typebp" value="Limited" {if $d['typebp'] eq 'Limited'} checked {/if}>
|
||||
{Lang::T('Limited')}
|
||||
</div>
|
||||
|
96
ui/ui/maintenance-mode.tpl
Normal file
96
ui/ui/maintenance-mode.tpl
Normal file
@ -0,0 +1,96 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
<style>
|
||||
/* Checkbox container */
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
/* Hidden checkbox */
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* Slider */
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
left: 3px;
|
||||
bottom: 3px;
|
||||
background-color: white;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
input:checked+.slider {
|
||||
background-color: #2196F3;
|
||||
}
|
||||
|
||||
input:focus+.slider {
|
||||
box-shadow: 0 0 1px #2196F3;
|
||||
}
|
||||
|
||||
input:checked+.slider:before {
|
||||
-webkit-transform: translateX(26px);
|
||||
-ms-transform: translateX(26px);
|
||||
transform: translateX(26px);
|
||||
}
|
||||
</style>
|
||||
|
||||
<form class="form-horizontal" method="post" autocomplete="off" role="form" action="">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
||||
<div class="panel-heading">{Lang::T('Maintenance Mode')}</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Status:')}</label>
|
||||
<div class="col-md-6">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="maintenance_mode" value="1" name="maintenance_mode" {if
|
||||
$_c['maintenance_mode']==1}checked{/if}>
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('End Date:')}</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" value="{$_c['maintenance_date']}" type="date" id="start_date"
|
||||
name="maintenance_date">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-primary waves-effect waves-light" name="save" value="save"
|
||||
type="submit">{Lang::T('Save')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{include file="sections/footer.tpl"}
|
212
ui/ui/maintenance.tpl
Normal file
212
ui/ui/maintenance.tpl
Normal file
@ -0,0 +1,212 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Site is down for maintenance</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Noto Sans', sans-serif;
|
||||
color: #616161
|
||||
/*#757575*/
|
||||
;
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.container {
|
||||
margin: auto;
|
||||
max-width: 1024px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: auto;
|
||||
height: 500px;
|
||||
background: #fff;
|
||||
margin-top: 50px;
|
||||
margin-left: 100px;
|
||||
margin-right: 100px;
|
||||
border-radius: 5px;
|
||||
box-shadow: 6px 18px 18px rgba(0, 0, 0, 0.08), -6px 18px 18px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.animation {
|
||||
margin-top: 20%;
|
||||
display: inline-block;
|
||||
margin-bottom: 5%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 32px;
|
||||
font-weight: 400;
|
||||
text-transform: uppercase;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #f6921e;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.one,
|
||||
.two,
|
||||
.three {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.one {
|
||||
background: url('data:image/svg+xml,%3Csvg%20version%3D%221.1%22%0A%09%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xmlns%3Aa%3D%22http%3A%2F%2Fns.adobe.com%2FAdobeSVGViewerExtensions%2F3.0%2F%22%0A%09%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2281px%22%20height%3D%2280.5px%22%20viewBox%3D%220%200%2081%2080.5%22%20style%3D%22overflow%3Ascroll%3Benable-background%3Anew%200%200%2081%2080.5%3B%22%0A%09%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%09.st0%7Bfill%3A%23383838%3B%7D%0A%3C%2Fstyle%3E%0A%3Cdefs%3E%0A%3C%2Fdefs%3E%0A%3Cpath%20class%3D%22st0%22%20d%3D%22M30.3%2C68.2c1.2%2C0.2%2C2.3%2C0.9%2C3.8%2C1.2c1.6%2C0.3%2C2.7%2C0.6%2C4%2C0.4l4.9%2C9.6c0.6%2C0.9%2C1.4%2C1.1%2C2.3%2C0.9l15.3-4.9%0A%09c0.5-0.3%2C1-1%2C0.9-2.3l-1.8-10.6c2-1.6%2C3.6-3.7%2C5.3-5.8l10.5%2C0.6c1.1%2C0.6%2C2.1-0.4%2C2.3-1.1L81%2C40.7c0.2-0.8-0.4-2.1-1.1-2.3l-10.2-3.8%0A%09c-0.3-2.5-1.4-4.8-2.5-7.5l5.9-8.5c0.6-1.1%2C0.4-1.9-0.2-2.9l-12-10.7c-0.3-0.5-1.6-0.3-2.5%2C0.3l-8%2C6.9c-1.2-0.2-2.3-0.9-3.8-1.2%0A%09c-1.6-0.3-2.7-0.6-4-0.4L37.7%2C1c-0.6-0.9-1.4-1.1-2.3-0.9L20.1%2C5c-0.5%2C0.3-1%2C1-0.9%2C2.3l1.8%2C10.6c-2%2C1.6-3.6%2C3.7-5.3%2C5.8L5.3%2C23%0A%09c-0.8-0.2-1.7%2C0.4-2%2C1.6L0%2C40.2c-0.2%2C0.8%2C0.4%2C2.1%2C1.1%2C2.3l9.8%2C3.7c0.7%2C2.6%2C1.4%2C5.2%2C2.5%2C7.5l-6%2C8.9c-0.6%2C0.7-0.4%2C2%2C0.3%2C2.5l12%2C10.7%0A%09c0.7%2C0.5%2C1.9%2C0.8%2C2.4%2C0.1L30.3%2C68.2z%20M26.7%2C37.3c1.6-7.4%2C9.1-12.3%2C16.5-10.8S55.6%2C35.7%2C54%2C43.1c-1.6%2C7.4-9.1%2C12.3-16.5%2C10.7%0A%09C30.1%2C52.3%2C25.1%2C44.7%2C26.7%2C37.3L26.7%2C37.3z%22%2F%3E%0A%3C%2Fsvg%3E');
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
margin-top: -10px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.two {
|
||||
background: url('data:image/svg+xml,%3Csvg%20version%3D%221.1%22%0A%09%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xmlns%3Aa%3D%22http%3A%2F%2Fns.adobe.com%2FAdobeSVGViewerExtensions%2F3.0%2F%22%0A%09%20x%3D%220px%22%20y%3D%220px%22%20width%3D%22103px%22%20height%3D%22103.7px%22%20viewBox%3D%220%200%20103%20103.7%22%0A%09%20style%3D%22overflow%3Ascroll%3Benable-background%3Anew%200%200%20103%20103.7%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%09.st0%7Bfill%3A%23F6921E%3B%7D%0A%3C%2Fstyle%3E%0A%3Cdefs%3E%0A%3C%2Fdefs%3E%0A%3Cpath%20class%3D%22st0%22%20d%3D%22M87.3%2C64.8c0.3-1.5%2C1.1-2.9%2C1.6-4.9c0.4-2%2C0.7-3.5%2C0.5-5.1l12.3-6.3c1.2-0.8%2C1.4-1.8%2C1.1-2.9l-6.3-19.6%0A%09c-0.4-0.6-1.3-1.3-2.9-1.1l-13.5%2C2.3c-2.1-2.5-4.7-4.7-7.4-6.8l0.8-13.4C74.3%2C5.8%2C73%2C4.5%2C72%2C4.3L52.1%2C0c-1-0.2-2.7%2C0.5-2.9%2C1.5%0A%09l-4.8%2C13c-3.2%2C0.4-6.1%2C1.8-9.5%2C3.2l-10.9-7.5c-1.4-0.8-2.5-0.5-3.7%2C0.3L6.5%2C25.8c-0.6%2C0.4-0.4%2C2%2C0.4%2C3.2l8.8%2C10.2%0A%09c-0.3%2C1.5-1.1%2C2.9-1.5%2C4.9c-0.4%2C2-0.7%2C3.5-0.6%2C5.1L1.2%2C55.4c-1.2%2C0.8-1.4%2C1.8-1.1%2C2.9l6.3%2C19.6c0.4%2C0.6%2C1.3%2C1.3%2C2.9%2C1.1l13.5-2.3%0A%09c2.1%2C2.5%2C4.7%2C4.7%2C7.4%2C6.8l-0.8%2C13.4c-0.2%2C1%2C0.6%2C2.2%2C2.1%2C2.5l20%2C4.2c1%2C0.2%2C2.7-0.5%2C2.9-1.5l4.7-12.6c3.3-0.9%2C6.6-1.7%2C9.5-3.2L80.1%2C94%0A%09c0.9%2C0.7%2C2.5%2C0.5%2C3.2-0.4L97%2C78.3c0.7-0.9%2C1-2.4%2C0.1-3.1L87.3%2C64.8z%20M47.8%2C69.5C38.3%2C67.5%2C32%2C57.8%2C34%2C48.3%0A%09c2-9.5%2C11.7-15.8%2C21.2-13.8c9.5%2C2%2C15.7%2C11.7%2C13.7%2C21.2C66.9%2C65.2%2C57.3%2C71.5%2C47.8%2C69.5L47.8%2C69.5z%22%2F%3E%0A%3C%2Fsvg%3E');
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.three {
|
||||
background: url('data:image/svg+xml,%3Csvg%20version%3D%221.1%22%0A%09%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xmlns%3Aa%3D%22http%3A%2F%2Fns.adobe.com%2FAdobeSVGViewerExtensions%2F3.0%2F%22%0A%09%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2281px%22%20height%3D%2280.5px%22%20viewBox%3D%220%200%2081%2080.5%22%20style%3D%22overflow%3Ascroll%3Benable-background%3Anew%200%200%2081%2080.5%3B%22%0A%09%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%09.st0%7Bfill%3A%23383838%3B%7D%0A%3C%2Fstyle%3E%0A%3Cdefs%3E%0A%3C%2Fdefs%3E%0A%3Cpath%20class%3D%22st0%22%20d%3D%22M30.3%2C68.2c1.2%2C0.2%2C2.3%2C0.9%2C3.8%2C1.2c1.6%2C0.3%2C2.7%2C0.6%2C4%2C0.4l4.9%2C9.6c0.6%2C0.9%2C1.4%2C1.1%2C2.3%2C0.9l15.3-4.9%0A%09c0.5-0.3%2C1-1%2C0.9-2.3l-1.8-10.6c2-1.6%2C3.6-3.7%2C5.3-5.8l10.5%2C0.6c1.1%2C0.6%2C2.1-0.4%2C2.3-1.1L81%2C40.7c0.2-0.8-0.4-2.1-1.1-2.3l-10.2-3.8%0A%09c-0.3-2.5-1.4-4.8-2.5-7.5l5.9-8.5c0.6-1.1%2C0.4-1.9-0.2-2.9l-12-10.7c-0.3-0.5-1.6-0.3-2.5%2C0.3l-8%2C6.9c-1.2-0.2-2.3-0.9-3.8-1.2%0A%09c-1.6-0.3-2.7-0.6-4-0.4L37.7%2C1c-0.6-0.9-1.4-1.1-2.3-0.9L20.1%2C5c-0.5%2C0.3-1%2C1-0.9%2C2.3l1.8%2C10.6c-2%2C1.6-3.6%2C3.7-5.3%2C5.8L5.3%2C23%0A%09c-0.8-0.2-1.7%2C0.4-2%2C1.6L0%2C40.2c-0.2%2C0.8%2C0.4%2C2.1%2C1.1%2C2.3l9.8%2C3.7c0.7%2C2.6%2C1.4%2C5.2%2C2.5%2C7.5l-6%2C8.9c-0.6%2C0.7-0.4%2C2%2C0.3%2C2.5l12%2C10.7%0A%09c0.7%2C0.5%2C1.9%2C0.8%2C2.4%2C0.1L30.3%2C68.2z%20M26.7%2C37.3c1.6-7.4%2C9.1-12.3%2C16.5-10.8S55.6%2C35.7%2C54%2C43.1c-1.6%2C7.4-9.1%2C12.3-16.5%2C10.7%0A%09C30.1%2C52.3%2C25.1%2C44.7%2C26.7%2C37.3L26.7%2C37.3z%22%2F%3E%0A%3C%2Fsvg%3E');
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
margin-top: -50px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
@keyframes spin-one {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: rotate(-359deg);
|
||||
transform: rotate(-359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spin-one {
|
||||
-webkit-animation: spin-one 1.5s infinite linear;
|
||||
animation: spin-one 1.5s infinite linear;
|
||||
}
|
||||
|
||||
@keyframes spin-two {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-transform: rotate(-359deg);
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spin-two {
|
||||
-webkit-animation: spin-two 2s infinite linear;
|
||||
animation: spin-two 2s infinite linear;
|
||||
}
|
||||
|
||||
.day,
|
||||
.hour,
|
||||
.minute,
|
||||
.second {
|
||||
font-size: 18px;
|
||||
background: #333;
|
||||
color: #fff;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.day {
|
||||
background-color: #1abc9c;
|
||||
}
|
||||
|
||||
.hour {
|
||||
background-color: #3498db;
|
||||
}
|
||||
|
||||
.minute {
|
||||
background-color: #f1c40f;
|
||||
}
|
||||
|
||||
.second {
|
||||
background-color: #e74c3c;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- partial:index.partial.html -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Noto+Sans:400,700" rel="stylesheet">
|
||||
|
||||
<div class="container">
|
||||
<div class="box">
|
||||
<div class="animation">
|
||||
<div class="one spin-one"></div>
|
||||
<div class="two spin-two"></div>
|
||||
<div class="three spin-one"></div>
|
||||
</div>
|
||||
<h1>{Lang::T('Site is temporarily unavailable.')}</h1>
|
||||
<p>{Lang::T('Scheduled maintenance is currently in progress. Please check back soon.')}</p>
|
||||
<p>{Lang::T('We apologize for any inconvenience.')} <br>
|
||||
— {Lang::T('The')} {$companyName} {Lang::T('Team')}.
|
||||
</p>
|
||||
<br>
|
||||
{if $date} <div style="display: flex; flex-direction: row; justify-content: space-between;">
|
||||
<p class="day"></p>
|
||||
<p class="hour"></p>
|
||||
<p class="minute"></p>
|
||||
<p class="second"></p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{if $date}
|
||||
<script>
|
||||
const countDown = () => {
|
||||
const countDay = new Date('{$date}');
|
||||
const now = new Date();
|
||||
const counter = countDay - now;
|
||||
const second = 1000;
|
||||
const minute = second * 60;
|
||||
const hour = minute * 60;
|
||||
const day = hour * 24;
|
||||
const textDay = Math.floor(counter / day);
|
||||
const textHour = Math.floor((counter % day) / hour);
|
||||
const textMinute = Math.floor((counter % hour) / minute);
|
||||
const textSecond = Math.floor((counter % minute) / second)
|
||||
document.querySelector(".day").innerText = textDay + ' Days';
|
||||
document.querySelector(".hour").innerText = textHour + ' Hours';
|
||||
document.querySelector(".minute").innerText = textMinute + ' Minutes';
|
||||
document.querySelector(".second").innerText = textSecond + ' Seconds';
|
||||
}
|
||||
setInterval(countDown, 1000);
|
||||
</script>
|
||||
{/if}
|
||||
</body>
|
||||
|
||||
</html>
|
@ -11,7 +11,7 @@
|
||||
class="glyphicon glyphicon-refresh" aria-hidden="true"></span> sync</a>
|
||||
</div>
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-info btn-xs" title="save" href="{$_url}customers/csv"
|
||||
<a class="btn btn-info btn-xs" title="save" href="{$_url}customers/csv-prepaid"
|
||||
onclick="return confirm('This will export to CSV?')"><span class="glyphicon glyphicon-download"
|
||||
aria-hidden="true"></span> CSV</a>
|
||||
</div>
|
||||
@ -45,7 +45,6 @@
|
||||
<tr>
|
||||
<th>{Lang::T('Username')}</th>
|
||||
<th>{Lang::T('Plan Name')}</th>
|
||||
<th>{Lang::T('Plan Type')}</th>
|
||||
<th>{Lang::T('Type')}</th>
|
||||
<th>{Lang::T('Created On')}</th>
|
||||
<th>{Lang::T('Expires On')}</th>
|
||||
@ -60,7 +59,6 @@
|
||||
<td><a href="{$_url}customers/viewu/{$ds['username']}">{$ds['username']}</a></td>
|
||||
<td>{$ds['namebp']}</td>
|
||||
<td>{$ds['type']}</td>
|
||||
<td>{$ds['plan_type']}</td>
|
||||
<td>{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}</td>
|
||||
<td>{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
|
||||
<td>{$ds['method']}</td>
|
||||
@ -75,7 +73,7 @@
|
||||
{/if}
|
||||
{if $ds['status']=='off' && $_c['extend_expired']}
|
||||
<a href="javascript:extend('{$ds['id']}')"
|
||||
class="btn btn-info btn-xs">{Lang::T('extend')}</a>
|
||||
class="btn btn-info btn-xs">{Lang::T('Extend')}</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
@ -100,4 +98,4 @@ function extend(idP){
|
||||
}
|
||||
</script>
|
||||
|
||||
{include file="sections/footer.tpl"}
|
||||
{include file="sections/footer.tpl"}
|
||||
|
@ -5,82 +5,91 @@
|
||||
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
||||
<div class="panel-heading">{Lang::T('Confirm')}</div>
|
||||
<div class="panel-body">
|
||||
<center><b>{Lang::T('Customer')}</b></center>
|
||||
<ul class="list-group list-group-unbordered">
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Username')}</b> <span class="pull-right">{$cust['username']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Name')}</b> <span class="pull-right">{$cust['fullname']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Phone Number')}</b> <span class="pull-right">{$cust['phonenumber']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Email')}</b> <span class="pull-right">{$cust['email']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Address')}</b> <span class="pull-right">{$cust['address']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Balance')}</b> <span
|
||||
class="pull-right">{Lang::moneyFormat($cust['balance'])}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<center><b>{Lang::T('Plan')}</b></center>
|
||||
<ul class="list-group list-group-unbordered">
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Plan Name')}</b> <span class="pull-right">{$plan['name_plan']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Location')}</b> <span
|
||||
class="pull-right">{if $plan['is_radius']}Radius{else}{$plan['routers']}{/if}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Type')}</b> <span
|
||||
class="pull-right">{if $plan['prepaid'] eq 'yes'}Prepaid{else}Postpaid{/if}
|
||||
{$plan['type']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Plan Price')}</b> <span
|
||||
class="pull-right">{if $using eq 'zero'}{Lang::moneyFormat(0)}{else}{Lang::moneyFormat($plan['price'])}{/if}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Plan Validity')}</b> <span class="pull-right">{$plan['validity']}
|
||||
{$plan['validity_unit']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Using')}</b> <span class="pull-right">{ucwords($using)}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<center><b>{Lang::T('Total')}</b></center>
|
||||
<ul class="list-group list-group-unbordered">
|
||||
{if $using neq 'zero' and $add_cost>0}
|
||||
{foreach $bills as $k => $v}
|
||||
<li class="list-group-item">
|
||||
<b>{$k}</b> <span class="pull-right">{Lang::moneyFormat($v)}</span>
|
||||
</li>
|
||||
{/foreach}
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Additional Cost')}</b> <span
|
||||
class="pull-right">{Lang::moneyFormat($add_cost)}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Total')}</b> <small>({Lang::T('Plan Price')} +{Lang::T('Additional Cost')})</small><span class="pull-right"
|
||||
style="font-size: large; font-weight:bolder; font-family: 'Courier New', Courier, monospace; ">{Lang::moneyFormat($plan['price']+$add_cost)}</span>
|
||||
</li>
|
||||
{else}
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Total')}</b> <span class="pull-right"
|
||||
style="font-size: large; font-weight:bolder; font-family: 'Courier New', Courier, monospace; ">{if $using eq 'zero'}{Lang::moneyFormat(0)}{else}{Lang::moneyFormat($plan['price'])}{/if}</span>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}plan/recharge-post">
|
||||
<center><b>{Lang::T('Customer')}</b></center>
|
||||
<ul class="list-group list-group-unbordered">
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Username')}</b> <span class="pull-right">{$cust['username']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Name')}</b> <span class="pull-right">{$cust['fullname']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Phone Number')}</b> <span class="pull-right">{$cust['phonenumber']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Email')}</b> <span class="pull-right">{$cust['email']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Address')}</b> <span class="pull-right">{$cust['address']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Balance')}</b> <span
|
||||
class="pull-right">{Lang::moneyFormat($cust['balance'])}</span>
|
||||
</li>
|
||||
</ul>
|
||||
<center><b>{Lang::T('Plan')}</b></center>
|
||||
<ul class="list-group list-group-unbordered">
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Plan Name')}</b> <span class="pull-right">{$plan['name_plan']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Location')}</b> <span
|
||||
class="pull-right">{if $plan['is_radius']}Radius{else}{$plan['routers']}{/if}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Type')}</b> <span
|
||||
class="pull-right">{if $plan['prepaid'] eq 'yes'}Prepaid{else}Postpaid{/if}
|
||||
{$plan['type']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Plan Price')}</b> <span
|
||||
class="pull-right">{if $using eq 'zero'}{Lang::moneyFormat(0)}{else}{Lang::moneyFormat($plan['price'])}{/if}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Plan Validity')}</b> <span class="pull-right">{$plan['validity']}
|
||||
{$plan['validity_unit']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Using')}</b> <span class="pull-right">
|
||||
<select name="using" style="background-color: white;outline: 1px;border: 1px solid #b7b7b7;">
|
||||
{foreach $usings as $us}
|
||||
<option value="{trim($us)}" {if $using eq trim($us)}selected{/if}>{trim(ucWords($us))}</option>
|
||||
{/foreach}
|
||||
{if $_c['enable_balance'] eq 'yes'}
|
||||
<option value="balance" {if $using eq 'balance'}selected{/if}>{Lang::T('Customer Balance')}</option>
|
||||
{/if}
|
||||
<option value="zero" {if $using eq 'zero'}selected{/if}>{$_c['currency_code']} 0</option>
|
||||
</select>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<center><b>{Lang::T('Total')}</b></center>
|
||||
<ul class="list-group list-group-unbordered">
|
||||
{if $using neq 'zero' and $add_cost>0}
|
||||
{foreach $bills as $k => $v}
|
||||
<li class="list-group-item">
|
||||
<b>{$k}</b> <span class="pull-right">{Lang::moneyFormat($v)}</span>
|
||||
</li>
|
||||
{/foreach}
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Additional Cost')}</b> <span
|
||||
class="pull-right">{Lang::moneyFormat($add_cost)}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Total')}</b> <small>({Lang::T('Plan Price')} +{Lang::T('Additional Cost')})</small><span class="pull-right"
|
||||
style="font-size: large; font-weight:bolder; font-family: 'Courier New', Courier, monospace; ">{Lang::moneyFormat($plan['price']+$add_cost)}</span>
|
||||
</li>
|
||||
{else}
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Total')}</b> <span class="pull-right"
|
||||
style="font-size: large; font-weight:bolder; font-family: 'Courier New', Courier, monospace; ">{if $using eq 'zero'}{Lang::moneyFormat(0)}{else}{Lang::moneyFormat($plan['price'])}{/if}</span>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
<input type="hidden" name="id_customer" value="{$cust['id']}">
|
||||
<input type="hidden" name="plan" value="{$plan['id']}">
|
||||
<input type="hidden" name="server" value="{$server}">
|
||||
<input type="hidden" name="using" value="{$using}">
|
||||
<input type="hidden" name="stoken" value="{App::getToken()}">
|
||||
<center>
|
||||
<button class="btn btn-success" type="submit">{Lang::T('Recharge')}</button><br>
|
||||
|
@ -45,7 +45,9 @@
|
||||
<label class="col-md-2 control-label">{Lang::T('Using')}</label>
|
||||
<div class="col-md-6">
|
||||
<select name="using" class="form-control">
|
||||
<option value="cash">{Lang::T('Cash')}</option>
|
||||
{foreach $usings as $using}
|
||||
<option value="{trim($using)}">{trim(ucWords($using))}</option>
|
||||
{/foreach}
|
||||
{if $_c['enable_balance'] eq 'yes'}
|
||||
<option value="balance">{Lang::T('Customer Balance')}</option>
|
||||
{/if}
|
||||
|
@ -86,6 +86,10 @@
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
|
@ -88,7 +88,7 @@
|
||||
}
|
||||
</style>
|
||||
{if isset($xheader)}
|
||||
{$xheader}
|
||||
{$xheader}
|
||||
{/if}
|
||||
|
||||
</head>
|
||||
@ -158,71 +158,71 @@
|
||||
</li>
|
||||
{$_MENU_AFTER_DASHBOARD}
|
||||
{if !in_array($_admin['user_type'],['Report'])}
|
||||
<li class="{if in_array($_system_menu, ['customers', 'map'])}active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-users"></i> <span>{Lang::T('Customer')}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_system_menu eq 'customers' }class="active" {/if}><a
|
||||
href="{$_url}customers">{Lang::T('Lists')}</a></li>
|
||||
<li {if $_system_menu eq 'map' }class="active" {/if}><a
|
||||
href="{$_url}map/customer">{Lang::T('Location')}</a></li>
|
||||
{$_MENU_CUSTOMERS}
|
||||
</ul>
|
||||
</li>
|
||||
{$_MENU_AFTER_CUSTOMERS}
|
||||
<li class="{if $_system_menu eq 'plan'}active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-ticket"></i> <span>{Lang::T('Services')}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[1] eq 'list' }class="active" {/if}><a
|
||||
href="{$_url}plan/list">{Lang::T('Active Users')}</a></li>
|
||||
{if $_c['disable_voucher'] != 'yes'}
|
||||
<li {if $_routes[1] eq 'voucher' }class="active" {/if}><a
|
||||
href="{$_url}plan/voucher">{Lang::T('Vouchers')}</a></li>
|
||||
<li {if $_routes[1] eq 'refill' }class="active" {/if}><a
|
||||
href="{$_url}plan/refill">{Lang::T('Refill Customer')}</a></li>
|
||||
{/if}
|
||||
<li {if $_routes[1] eq 'recharge' }class="active" {/if}><a
|
||||
href="{$_url}plan/recharge">{Lang::T('Recharge Customer')}</a></li>
|
||||
{if $_c['enable_balance'] == 'yes'}
|
||||
<li {if $_routes[1] eq 'deposit' }class="active" {/if}><a
|
||||
href="{$_url}plan/deposit">{Lang::T('Refill Balance')}</a></li>
|
||||
{/if}
|
||||
{$_MENU_SERVICES}
|
||||
</ul>
|
||||
</li>
|
||||
<li class="{if in_array($_system_menu, ['customers', 'map'])}active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-users"></i> <span>{Lang::T('Customer')}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_system_menu eq 'customers' }class="active" {/if}><a
|
||||
href="{$_url}customers">{Lang::T('Lists')}</a></li>
|
||||
<li {if $_system_menu eq 'map' }class="active" {/if}><a
|
||||
href="{$_url}map/customer">{Lang::T('Location')}</a></li>
|
||||
{$_MENU_CUSTOMERS}
|
||||
</ul>
|
||||
</li>
|
||||
{$_MENU_AFTER_CUSTOMERS}
|
||||
<li class="{if $_system_menu eq 'plan'}active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-ticket"></i> <span>{Lang::T('Services')}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[1] eq 'list' }class="active" {/if}><a
|
||||
href="{$_url}plan/list">{Lang::T('Active Users')}</a></li>
|
||||
{if $_c['disable_voucher'] != 'yes'}
|
||||
<li {if $_routes[1] eq 'voucher' }class="active" {/if}><a
|
||||
href="{$_url}plan/voucher">{Lang::T('Vouchers')}</a></li>
|
||||
<li {if $_routes[1] eq 'refill' }class="active" {/if}><a
|
||||
href="{$_url}plan/refill">{Lang::T('Refill Customer')}</a></li>
|
||||
{/if}
|
||||
<li {if $_routes[1] eq 'recharge' }class="active" {/if}><a
|
||||
href="{$_url}plan/recharge">{Lang::T('Recharge Customer')}</a></li>
|
||||
{if $_c['enable_balance'] == 'yes'}
|
||||
<li {if $_routes[1] eq 'deposit' }class="active" {/if}><a
|
||||
href="{$_url}plan/deposit">{Lang::T('Refill Balance')}</a></li>
|
||||
{/if}
|
||||
{$_MENU_SERVICES}
|
||||
</ul>
|
||||
</li>
|
||||
{/if}
|
||||
{$_MENU_AFTER_SERVICES}
|
||||
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
|
||||
<li class="{if $_system_menu eq 'services'}active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="ion ion-cube"></i> <span>{Lang::T('Internet Plan')}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[1] eq 'hotspot' }class="active" {/if}><a
|
||||
href="{$_url}services/hotspot">Hotspot</a></li>
|
||||
<li {if $_routes[1] eq 'pppoe' }class="active" {/if}><a
|
||||
href="{$_url}services/pppoe">PPPOE</a></li>
|
||||
<li {if $_routes[1] eq 'list' }class="active" {/if}><a
|
||||
href="{$_url}bandwidth/list">{Lang::T('Bandwidth')}</a></li>
|
||||
{if $_c['enable_balance'] == 'yes'}
|
||||
<li {if $_routes[1] eq 'balance' }class="active" {/if}><a
|
||||
href="{$_url}services/balance">{Lang::T('Customer Balance')}</a></li>
|
||||
{/if}
|
||||
{$_MENU_PLANS}
|
||||
</ul>
|
||||
</li>
|
||||
<li class="{if $_system_menu eq 'services'}active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="ion ion-cube"></i> <span>{Lang::T('Internet Plan')}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[1] eq 'hotspot' }class="active" {/if}><a
|
||||
href="{$_url}services/hotspot">Hotspot</a></li>
|
||||
<li {if $_routes[1] eq 'pppoe' }class="active" {/if}><a
|
||||
href="{$_url}services/pppoe">PPPOE</a></li>
|
||||
<li {if $_routes[1] eq 'list' }class="active" {/if}><a
|
||||
href="{$_url}bandwidth/list">{Lang::T('Bandwidth')}</a></li>
|
||||
{if $_c['enable_balance'] == 'yes'}
|
||||
<li {if $_routes[1] eq 'balance' }class="active" {/if}><a
|
||||
href="{$_url}services/balance">{Lang::T('Customer Balance')}</a></li>
|
||||
{/if}
|
||||
{$_MENU_PLANS}
|
||||
</ul>
|
||||
</li>
|
||||
{/if}
|
||||
{$_MENU_AFTER_PLANS}
|
||||
<li class="{if $_system_menu eq 'reports'}active{/if} treeview">
|
||||
@ -260,64 +260,64 @@
|
||||
</li>
|
||||
{$_MENU_AFTER_MESSAGE}
|
||||
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
|
||||
<li class="{if $_system_menu eq 'network'}active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="ion ion-network"></i> <span>{Lang::T('Network')}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[0] eq 'routers' and $_routes[1] eq 'list' }class="active" {/if}><a
|
||||
href="{$_url}routers/list">{Lang::T('Routers')}</a></li>
|
||||
<li {if $_routes[0] eq 'pool' and $_routes[1] eq 'list' }class="active" {/if}><a
|
||||
href="{$_url}pool/list">{Lang::T('IP Pool')}</a></li>
|
||||
{$_MENU_NETWORK}
|
||||
</ul>
|
||||
</li>
|
||||
{$_MENU_AFTER_NETWORKS}
|
||||
{if $_c['radius_enable']}
|
||||
<li class="{if $_system_menu eq 'radius'}active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-database"></i> <span>{Lang::T('Radius')}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[0] eq 'radius' and $_routes[1] eq 'nas-list' }class="active" {/if}><a
|
||||
href="{$_url}radius/nas-list">{Lang::T('Radius NAS')}</a></li>
|
||||
{$_MENU_RADIUS}
|
||||
</ul>
|
||||
<li class="{if $_system_menu eq 'network'}active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="ion ion-network"></i> <span>{Lang::T('Network')}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[0] eq 'routers' and $_routes[1] eq 'list' }class="active" {/if}><a
|
||||
href="{$_url}routers/list">{Lang::T('Routers')}</a></li>
|
||||
<li {if $_routes[0] eq 'pool' and $_routes[1] eq 'list' }class="active" {/if}><a
|
||||
href="{$_url}pool/list">{Lang::T('IP Pool')}</a></li>
|
||||
{$_MENU_NETWORK}
|
||||
</ul>
|
||||
</li>
|
||||
{$_MENU_AFTER_NETWORKS}
|
||||
{if $_c['radius_enable']}
|
||||
<li class="{if $_system_menu eq 'radius'}active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-database"></i> <span>{Lang::T('Radius')}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[0] eq 'radius' and $_routes[1] eq 'nas-list' }class="active" {/if}><a
|
||||
href="{$_url}radius/nas-list">{Lang::T('Radius NAS')}</a></li>
|
||||
{$_MENU_RADIUS}
|
||||
</ul>
|
||||
</li>
|
||||
{/if}
|
||||
{$_MENU_AFTER_RADIUS}
|
||||
<li class="{if $_system_menu eq 'pages'}active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="ion ion-document"></i> <span>{Lang::T("Static Pages")}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[1] eq 'Order_Voucher' }class="active" {/if}><a
|
||||
href="{$_url}pages/Order_Voucher">{Lang::T('Order Voucher')}</a></li>
|
||||
<li {if $_routes[1] eq 'Voucher' }class="active" {/if}><a
|
||||
href="{$_url}pages/Voucher">{Lang::T('Voucher')} Template</a></li>
|
||||
<li {if $_routes[1] eq 'Announcement' }class="active" {/if}><a
|
||||
href="{$_url}pages/Announcement">{Lang::T('Announcement')}</a></li>
|
||||
<li {if $_routes[1] eq 'Announcement_Customer' }class="active" {/if}><a
|
||||
href="{$_url}pages/Announcement_Customer">{Lang::T('Customer Announcement')}</a>
|
||||
</li>
|
||||
{/if}
|
||||
{$_MENU_AFTER_RADIUS}
|
||||
<li class="{if $_system_menu eq 'pages'}active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="ion ion-document"></i> <span>{Lang::T("Static Pages")}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[1] eq 'Order_Voucher' }class="active" {/if}><a
|
||||
href="{$_url}pages/Order_Voucher">{Lang::T('Order Voucher')}</a></li>
|
||||
<li {if $_routes[1] eq 'Voucher' }class="active" {/if}><a
|
||||
href="{$_url}pages/Voucher">{Lang::T('Voucher')} Template</a></li>
|
||||
<li {if $_routes[1] eq 'Announcement' }class="active" {/if}><a
|
||||
href="{$_url}pages/Announcement">{Lang::T('Announcement')}</a></li>
|
||||
<li {if $_routes[1] eq 'Announcement_Customer' }class="active" {/if}><a
|
||||
href="{$_url}pages/Announcement_Customer">{Lang::T('Customer Announcement')}</a>
|
||||
</li>
|
||||
<li {if $_routes[1] eq 'Registration_Info' }class="active" {/if}><a
|
||||
href="{$_url}pages/Registration_Info">{Lang::T('Registration Info')}</a></li>
|
||||
<li {if $_routes[1] eq 'Privacy_Policy' }class="active" {/if}><a
|
||||
href="{$_url}pages/Privacy_Policy">{Lang::T('Privacy Policy')}</a></li>
|
||||
<li {if $_routes[1] eq 'Terms_and_Conditions' }class="active" {/if}><a
|
||||
href="{$_url}pages/Terms_and_Conditions">{Lang::T('Terms and Conditions')}</a></li>
|
||||
{$_MENU_PAGES}
|
||||
</ul>
|
||||
</li>
|
||||
<li {if $_routes[1] eq 'Registration_Info' }class="active" {/if}><a
|
||||
href="{$_url}pages/Registration_Info">{Lang::T('Registration Info')}</a></li>
|
||||
<li {if $_routes[1] eq 'Privacy_Policy' }class="active" {/if}><a
|
||||
href="{$_url}pages/Privacy_Policy">{Lang::T('Privacy Policy')}</a></li>
|
||||
<li {if $_routes[1] eq 'Terms_and_Conditions' }class="active" {/if}><a
|
||||
href="{$_url}pages/Terms_and_Conditions">{Lang::T('Terms and Conditions')}</a></li>
|
||||
{$_MENU_PAGES}
|
||||
</ul>
|
||||
</li>
|
||||
{/if}
|
||||
{$_MENU_AFTER_PAGES}
|
||||
<li
|
||||
@ -330,31 +330,33 @@
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
|
||||
<li {if $_routes[1] eq 'app' }class="active" {/if}><a
|
||||
href="{$_url}settings/app">{Lang::T('General Settings')}</a></li>
|
||||
<li {if $_routes[1] eq 'localisation' }class="active" {/if}><a
|
||||
href="{$_url}settings/localisation">{Lang::T('Localisation')}</a></li>
|
||||
<li {if $_routes[1] eq 'notifications' }class="active" {/if}><a
|
||||
href="{$_url}settings/notifications">{Lang::T('User Notification')}</a></li>
|
||||
<li {if $_routes[1] eq 'app' }class="active" {/if}><a
|
||||
href="{$_url}settings/app">{Lang::T('General Settings')}</a></li>
|
||||
<li {if $_routes[1] eq 'localisation' }class="active" {/if}><a
|
||||
href="{$_url}settings/localisation">{Lang::T('Localisation')}</a></li>
|
||||
<li {if $_routes[1] eq 'maintenance' }class="active" {/if}><a
|
||||
href="{$_url}settings/maintenance">{Lang::T('Maintenance Mode')}</a></li>
|
||||
<li {if $_routes[1] eq 'notifications' }class="active" {/if}><a
|
||||
href="{$_url}settings/notifications">{Lang::T('User Notification')}</a></li>
|
||||
{/if}
|
||||
{if in_array($_admin['user_type'],['SuperAdmin','Admin','Agent'])}
|
||||
<li {if $_routes[1] eq 'users' }class="active" {/if}><a
|
||||
href="{$_url}settings/users">{Lang::T('Administrator Users')}</a></li>
|
||||
<li {if $_routes[1] eq 'users' }class="active" {/if}><a
|
||||
href="{$_url}settings/users">{Lang::T('Administrator Users')}</a></li>
|
||||
{/if}
|
||||
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
|
||||
<li {if $_routes[1] eq 'dbstatus' }class="active" {/if}><a
|
||||
href="{$_url}settings/dbstatus">{Lang::T('Backup/Restore')}</a></li>
|
||||
<li {if $_system_menu eq 'paymentgateway' }class="active" {/if}>
|
||||
<a href="{$_url}paymentgateway">
|
||||
<span class="text">{Lang::T('Payment Gateway')}</span>
|
||||
</a>
|
||||
</li>
|
||||
{$_MENU_SETTINGS}
|
||||
<li {if $_routes[0] eq 'pluginmanager' }class="active" {/if}>
|
||||
<a href="{$_url}pluginmanager"><i class="glyphicon glyphicon-tasks"></i>
|
||||
{Lang::T('Plugin Manager')} <small class="label pull-right">Free</small></a>
|
||||
</li>
|
||||
{* <li {if $_routes[0] eq 'codecanyon' }class="active" {/if}>
|
||||
<li {if $_routes[1] eq 'dbstatus' }class="active" {/if}><a
|
||||
href="{$_url}settings/dbstatus">{Lang::T('Backup/Restore')}</a></li>
|
||||
<li {if $_system_menu eq 'paymentgateway' }class="active" {/if}>
|
||||
<a href="{$_url}paymentgateway">
|
||||
<span class="text">{Lang::T('Payment Gateway')}</span>
|
||||
</a>
|
||||
</li>
|
||||
{$_MENU_SETTINGS}
|
||||
<li {if $_routes[0] eq 'pluginmanager' }class="active" {/if}>
|
||||
<a href="{$_url}pluginmanager"><i class="glyphicon glyphicon-tasks"></i>
|
||||
{Lang::T('Plugin Manager')} <small class="label pull-right">Free</small></a>
|
||||
</li>
|
||||
{* <li {if $_routes[0] eq 'codecanyon' }class="active" {/if}>
|
||||
<a href="{$_url}codecanyon"><i class="glyphicon glyphicon-shopping-cart"></i>
|
||||
Codecanyon.net <small class="label pull-right">Paid</small></a>
|
||||
</li> *}
|
||||
@ -363,24 +365,24 @@
|
||||
</li>
|
||||
{$_MENU_AFTER_SETTINGS}
|
||||
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
|
||||
<li class="{if $_system_menu eq 'logs' }active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="ion ion-clock"></i> <span>{Lang::T('Logs')}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[1] eq 'list' }class="active" {/if}><a
|
||||
href="{$_url}logs/phpnuxbill">PhpNuxBill</a></li>
|
||||
{if $_c['radius_enable']}
|
||||
<li {if $_routes[1] eq 'radius' }class="active" {/if}><a
|
||||
href="{$_url}logs/radius">Radius</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
{$_MENU_LOGS}
|
||||
</li>
|
||||
<li class="{if $_system_menu eq 'logs' }active{/if} treeview">
|
||||
<a href="#">
|
||||
<i class="ion ion-clock"></i> <span>{Lang::T('Logs')}</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[1] eq 'list' }class="active" {/if}><a
|
||||
href="{$_url}logs/phpnuxbill">PhpNuxBill</a></li>
|
||||
{if $_c['radius_enable']}
|
||||
<li {if $_routes[1] eq 'radius' }class="active" {/if}><a
|
||||
href="{$_url}logs/radius">Radius</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
{$_MENU_LOGS}
|
||||
</li>
|
||||
{/if}
|
||||
{$_MENU_AFTER_LOGS}
|
||||
<li {if $_system_menu eq 'community' }class="active" {/if}>
|
||||
@ -403,20 +405,20 @@
|
||||
|
||||
<section class="content">
|
||||
{if isset($notify)}
|
||||
<script>
|
||||
// Display SweetAlert toast notification
|
||||
Swal.fire({
|
||||
icon: '{if $notify_t == "s"}success{else}error{/if}',
|
||||
title: '{$notify}',
|
||||
toast: true,
|
||||
position: 'top-end',
|
||||
showConfirmButton: false,
|
||||
timer: 5000,
|
||||
timerProgressBar: true,
|
||||
didOpen: (toast) => {
|
||||
toast.addEventListener('mouseenter', Swal.stopTimer)
|
||||
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
<script>
|
||||
// Display SweetAlert toast notification
|
||||
Swal.fire({
|
||||
icon: '{if $notify_t == "s"}success{else}error{/if}',
|
||||
title: '{$notify}',
|
||||
toast: true,
|
||||
position: 'top-end',
|
||||
showConfirmButton: false,
|
||||
timer: 5000,
|
||||
timerProgressBar: true,
|
||||
didOpen: (toast) => {
|
||||
toast.addEventListener('mouseenter', Swal.stopTimer)
|
||||
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/if}
|
@ -187,7 +187,7 @@
|
||||
{if $_bill['status'] != 'on' && $_bill['prepaid'] != 'yes' && $_c['extend_expired']}
|
||||
<a class="btn btn-warning text-black btn-sm"
|
||||
href="{$_url}home&extend={$_bill['id']}&stoken={App::getToken()}"
|
||||
onclick="return confirm('{str_replace("\n","\\n",str_replace("\r","",$_c['extend_confirmation']))}?')">{Lang::T('Extend')}</a>
|
||||
onclick="return confirm('{Text::toHex($_c['extend_confirmation'])}')">{Lang::T('Extend')}</a>
|
||||
{/if}
|
||||
<a class="btn btn-primary pull-right btn-sm"
|
||||
href="{$_url}home&recharge={$_bill['id']}&stoken={App::getToken()}"
|
||||
|
@ -11,15 +11,64 @@
|
||||
<div class="col-md-8">
|
||||
<select name="gateway" id="gateway" class="form-control">
|
||||
{foreach $pgs as $pg}
|
||||
<option value="{$pg}">
|
||||
{ucwords($pg)}</option>
|
||||
<option value="{$pg}">
|
||||
{ucwords($pg)}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-block btn-primary">{Lang::T('Pay Now')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<center><b>{Lang::T('Package Details')}</b></center>
|
||||
<ul class="list-group list-group-unbordered">
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Plan Name')}</b> <span class="pull-right">{$plan['name_plan']}</span>
|
||||
</li>
|
||||
{if $plan['is_radius'] or $plan['routers']}
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Location')}</b> <span class="pull-right">{if
|
||||
$plan['is_radius']}Radius{else}{$plan['routers']}{/if}</span>
|
||||
</li>
|
||||
{/if}
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Type')}</b> <span class="pull-right">{if $plan['prepaid'] eq
|
||||
'yes'}Prepaid{else}Postpaid{/if}
|
||||
{$plan['type']}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Plan Price')}</b> <span class="pull-right">{if $using eq
|
||||
'zero'}{Lang::moneyFormat(0)}{else}{Lang::moneyFormat($plan['price'])}{/if}</span>
|
||||
</li>
|
||||
{if $plan['validity']}
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Plan Validity')}</b> <span class="pull-right">{$plan['validity']}
|
||||
{$plan['validity_unit']}</span>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
<center><b>{Lang::T('Summary')}</b></center>
|
||||
<ul class="list-group list-group-unbordered">
|
||||
{if $tax}
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Tax')}</b> <span
|
||||
class="pull-right">{Lang::moneyFormat($tax)}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Total')}</b> <small>({Lang::T('Plan Price')} + {Lang::T('Tax')})</small><span class="pull-right"
|
||||
style="font-size: large; font-weight:bolder; font-family: 'Courier New', Courier, monospace; ">{Lang::moneyFormat($plan['price']+$tax)}</span>
|
||||
</li>
|
||||
{else}
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Total')}</b> <span class="pull-right"
|
||||
style="font-size: large; font-weight:bolder; font-family: 'Courier New', Courier, monospace; ">
|
||||
{Lang::moneyFormat($plan['price'])}</span>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
<center>
|
||||
<button type="submit" class="btn btn-primary">{Lang::T('Pay Now')}</button><br>
|
||||
<a class="btn btn-link" href="{$_url}home">{Lang::T('Cancel')}</a>
|
||||
</center>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -13,20 +13,29 @@
|
||||
<td>{$plan['type']}</td>
|
||||
</tr>
|
||||
{if $add_cost>0}
|
||||
{foreach $bills as $k => $v}
|
||||
<tr>
|
||||
<td>{$k}</td>
|
||||
<td>{Lang::moneyFormat($v)}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tr>
|
||||
<td>{Lang::T('Additional Cost')}</td>
|
||||
<td>{Lang::moneyFormat($add_cost)}</td>
|
||||
</tr>
|
||||
{foreach $bills as $k => $v}
|
||||
<tr>
|
||||
<td>{$k}</td>
|
||||
<td>{Lang::moneyFormat($v)}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
<tr>
|
||||
<td>{Lang::T('Additional Cost')}</td>
|
||||
<td>{Lang::moneyFormat($add_cost)}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $tax > 0}
|
||||
<tr>
|
||||
<td>{Lang::T('Tax')}</td>
|
||||
<td>{Lang::moneyFormat($tax)}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
<tr>
|
||||
<td>{Lang::T('Price')}{if $add_cost>0}<small> + {Lang::T('Additional Cost')}{/if}</td>
|
||||
<td style="font-size: large; font-weight:bolder; font-family: 'Courier New', Courier, monospace; ">{Lang::moneyFormat($plan['price'])}</td>
|
||||
<td>{Lang::T('Price')}{if $add_cost>0}<small> + {Lang::T('Additional Cost')}{/if}{if
|
||||
$tax>0}<small> + {Lang::T('Tax')}{/if}</td>
|
||||
<td
|
||||
style="font-size: large; font-weight:bolder; font-family: 'Courier New', Courier, monospace; ">
|
||||
{Lang::moneyFormat($plan['price'])}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{Lang::T('Validity')}</td>
|
||||
@ -39,15 +48,17 @@
|
||||
<form method="post" onsubmit="return askConfirm()" role="form">
|
||||
<div class="form-group">
|
||||
<div class="col-sm-9">
|
||||
<input type="text" id="username" name="username" class="form-control" required value="{$username}"
|
||||
placeholder="{Lang::T('Username')}">
|
||||
<input type="text" id="username" name="username" class="form-control" required
|
||||
value="{$username}" placeholder="{Lang::T('Username')}">
|
||||
</div>
|
||||
<div class="form-group col-sm-3" align="center">
|
||||
<button class="btn btn-success btn-block" id="sendBtn" type="submit" name="send" onclick="return confirm('{Lang::T("Are You Sure?")}')"
|
||||
value="plan"><i class="glyphicon glyphicon-send"></i></button>
|
||||
<button class="btn btn-success btn-block" id="sendBtn" type="submit" name="send"
|
||||
onclick="return confirm('{Lang::T(" Are You Sure?")}')" value="plan"><i
|
||||
class="glyphicon glyphicon-send"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<p class="help-block text-center">{Lang::T('If your friend have Additional Cost, you will pay for that too')}</p>
|
||||
<p class="help-block text-center">{Lang::T('If your friend have Additional Cost, you will pay for
|
||||
that too')}</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -41,6 +41,10 @@
|
||||
<label class="col-md-2 control-label">{Lang::T('Voucher Format')}</label>
|
||||
<div class="col-md-6">
|
||||
<select name="voucher_format" id="voucher_format" class="form-control">
|
||||
<option value="numbers" {if $_c['voucher_format'] == 'numbers'}selected="selected"
|
||||
{/if}>
|
||||
Numbers
|
||||
</option>
|
||||
<option value="up" {if $_c['voucher_format'] == 'up'}selected="selected" {/if}>UPPERCASE
|
||||
</option>
|
||||
<option value="low" {if $_c['voucher_format'] == 'low'}selected="selected" {/if}>
|
||||
@ -56,7 +60,8 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Voucher Prefix')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="prefix" placeholder="NUX-" value="{$_c['voucher_prefix']}">
|
||||
<input type="text" class="form-control" name="prefix" placeholder="NUX-"
|
||||
value="{$_c['voucher_prefix']}">
|
||||
</div>
|
||||
<p class="help-block col-md-4">NUX-VoUCHeRCOdE</p>
|
||||
</div>
|
||||
@ -68,8 +73,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-success"
|
||||
type="submit">{Lang::T('Generate')}</button>
|
||||
<button class="btn btn-success" type="submit">{Lang::T('Generate')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -79,4 +83,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="sections/footer.tpl"}
|
||||
{include file="sections/footer.tpl"}
|
||||
|
@ -16,31 +16,34 @@
|
||||
<div class="panel-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
||||
<div class="col-md-8">
|
||||
<form id="site-search" method="post" action="{$_url}plan/voucher/">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="search" class="form-control" placeholder="{Lang::T('Search by Code Voucher')}..." value="{$search}">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{Lang::T('Search')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<form id="site-search" method="post" action="{$_url}plan/voucher/">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="search" class="form-control"
|
||||
placeholder="{Lang::T('Search by Code Voucher')}..." value="{$search}">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{Lang::T('Search')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="btn-group btn-group-justified" role="group">
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{$_url}plan/add-voucher" class="btn btn-primary btn-block"><i class="ion ion-android-add"></i> {Lang::T('Add Vouchers')}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified" role="group">
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{$_url}plan/print-voucher" target="print_voucher" class="btn btn-info btn-block"><i class="ion ion-android-print"></i> Print</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="btn-group btn-group-justified" role="group">
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{$_url}plan/add-voucher" class="btn btn-primary btn-block"><i
|
||||
class="ion ion-android-add"></i> {Lang::T('Add Vouchers')}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified" role="group">
|
||||
<div class="btn-group" role="group">
|
||||
<a href="{$_url}plan/print-voucher" target="print_voucher"
|
||||
class="btn btn-info btn-block"><i class="ion ion-android-print"></i> Print</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="datatable" class="table table-bordered table-striped table-condensed">
|
||||
@ -82,8 +85,7 @@
|
||||
</td>
|
||||
<td>
|
||||
{if $ds['status'] neq '1'}
|
||||
<a href="{$_url}plan/voucher-view/{$ds['id']}" id="{$ds['id']}"
|
||||
style="margin: 0px;"
|
||||
<a href="{$_url}plan/voucher-view/{$ds['id']}" id="{$ds['id']}" style="margin: 0px;"
|
||||
class="btn btn-success btn-xs"> {Lang::T('View')} </a>
|
||||
{/if}
|
||||
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
|
||||
@ -98,19 +100,11 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<ul class="pagination pagination-sm">
|
||||
{if $page>0}
|
||||
<li><a href="{$_url}plan/voucher&p={$page-1}&code={$_code}">{Lang::T('Prev')}</a></li>
|
||||
{/if}
|
||||
{if $d}
|
||||
<li><a href="{$_url}plan/voucher&p={$page+1}&code={$_code}">{Lang::T('Next')}</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
{include file="pagination.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{include file="sections/footer.tpl"}
|
||||
{include file="sections/footer.tpl"}
|
12
update.php
12
update.php
@ -12,6 +12,14 @@ if (empty($update_url)) {
|
||||
$update_url = 'https://github.com/hotspotbilling/phpnuxbill/archive/refs/heads/master.zip';
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['update_url']) && !empty($_REQUEST['update_url'])){
|
||||
$update_url = $_REQUEST['update_url'];
|
||||
$_SESSION['update_url'] = $update_url;
|
||||
}
|
||||
|
||||
if(isset($_SESSION['update_url']) && !empty($_SESSION['update_url']) && $_SESSION['update_url'] != $update_url){
|
||||
$update_url = $_SESSION['update_url'];
|
||||
}
|
||||
|
||||
if (!isset($_SESSION['aid']) || empty($_SESSION['aid'])) {
|
||||
r2("./?_route=login&You_are_not_admin", 'e', 'You are not admin');
|
||||
@ -141,12 +149,12 @@ function r2($to, $ntype = 'e', $msg = '')
|
||||
{
|
||||
if ($msg == '') {
|
||||
header("location: $to");
|
||||
exit;
|
||||
die();
|
||||
}
|
||||
$_SESSION['ntype'] = $ntype;
|
||||
$_SESSION['notify'] = $msg;
|
||||
header("location: $to");
|
||||
exit;
|
||||
die();
|
||||
}
|
||||
|
||||
function copyFolder($from, $to, $exclude = [])
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "2024.4.15"
|
||||
"version": "2024.5.21"
|
||||
}
|
Reference in New Issue
Block a user