Compare commits
22 Commits
2023.12.21
...
2024.1.11
Author | SHA1 | Date | |
---|---|---|---|
db240131e2 | |||
2fdc3c9567 | |||
a953157b68 | |||
4ba38485a0 | |||
dfef6807a5 | |||
5ef0520c74 | |||
263a1b6722 | |||
f4c5b6a8bb | |||
05ed37d3d8 | |||
055b855bc1 | |||
b862a759d0 | |||
41cc04cffb | |||
1d29f8111e | |||
081dd1b1b9 | |||
9804bcb9e8 | |||
19e39dbefc | |||
b5c29f6c3d | |||
fe94ae3011 | |||
a25112a37f | |||
9d1d287e9a | |||
4bddaf0260 | |||
43ed5e452e |
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -7,6 +7,9 @@ assignees: ibnux
|
||||
|
||||
---
|
||||
|
||||
Please Remember, this project is free and open source, and @ibnux don't get any money from this project, and if you post something not a bug, just you dont understand how to install it, you will get blocked from this Repository.
|
||||
Post it in Discussion if you don't understand. Except you pay for $50 for support
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is. Error connecting to router is not a bug, is your router port is not accessable, ask community for help, go to discussion or telegram group
|
||||
|
||||
|
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -7,6 +7,8 @@ assignees: ''
|
||||
|
||||
---
|
||||
|
||||
Please Remember, this project is free and open source, and @ibnux don't get any money from this project, any Feature Request will cost you $50-$5000
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
|
17
CHANGELOG.md
17
CHANGELOG.md
@ -2,6 +2,23 @@
|
||||
|
||||
# CHANGELOG
|
||||
|
||||
## 2024.1.11
|
||||
|
||||
- Add Plan only for admin by @Focuslinkstech
|
||||
- Fix Plugin Manager
|
||||
|
||||
## 2024.1.9
|
||||
|
||||
- Add Prefix when generate Voucher
|
||||
|
||||
## 2024.1.8
|
||||
|
||||
- User Expired Order by Expired Date
|
||||
|
||||
## 2024.1.2
|
||||
|
||||
- Pagination User Expired by @Focuslinkstech
|
||||
|
||||
## 2023.12.21
|
||||
|
||||
- Modern AdminLTE by @sabtech254
|
||||
|
@ -102,6 +102,13 @@ CREATE TABLE `radusergroup` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `nasreload`;
|
||||
CREATE TABLE `nasreload` (
|
||||
nasipaddress varchar(15) NOT NULL,
|
||||
reloadtime datetime NOT NULL,
|
||||
PRIMARY KEY (nasipaddress)
|
||||
) ENGINE = INNODB;
|
||||
|
||||
ALTER TABLE `nas`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `nasname` (`nasname`);
|
||||
|
32
system/autoload/Log.php
Normal file
32
system/autoload/Log.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||
* by https://t.me/ibnux
|
||||
**/
|
||||
|
||||
|
||||
class Log{
|
||||
public static function put($type, $description, $userid = '', $username = '')
|
||||
{
|
||||
$d = ORM::for_table('tbl_logs')->create();
|
||||
$d->date = date('Y-m-d H:i:s');
|
||||
$d->type = $type;
|
||||
$d->description = $description;
|
||||
$d->userid = $userid;
|
||||
$d->ip = (empty($username)) ? $_SERVER["REMOTE_ADDR"] : $username;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
public static function arrayToText($array, $start = '', $result = '')
|
||||
{
|
||||
foreach ($array as $k => $v) {
|
||||
if (is_array($v)) {
|
||||
$result = Log::arrayToText($v, "$start$k.", $result);
|
||||
} else {
|
||||
$result .= $start.$k ." : ". strval($v) ."\n";
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
@ -223,13 +223,7 @@ function _admin($login = true)
|
||||
|
||||
function _log($description, $type = '', $userid = '0')
|
||||
{
|
||||
$d = ORM::for_table('tbl_logs')->create();
|
||||
$d->date = date('Y-m-d H:i:s');
|
||||
$d->type = $type;
|
||||
$d->description = $description;
|
||||
$d->userid = $userid;
|
||||
$d->ip = $_SERVER["REMOTE_ADDR"];
|
||||
$d->save();
|
||||
Log::put($type, $description, $userid);
|
||||
}
|
||||
|
||||
function Lang($key)
|
||||
|
@ -52,7 +52,24 @@ if (empty($c_all)) {
|
||||
$ui->assign('c_all', $c_all);
|
||||
|
||||
//user expire
|
||||
$expire = ORM::for_table('tbl_user_recharges')->whereLte('expiration', $mdate)->order_by_desc('id')->limit(30)->find_many();
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_user_recharges'));
|
||||
$expire = ORM::for_table('tbl_user_recharges')
|
||||
->where_lte('expiration', $mdate)
|
||||
->offset($paginator['startpoint'])
|
||||
->limit($paginator['limit'])
|
||||
->order_by_desc('expiration')
|
||||
->find_many();
|
||||
|
||||
// Get the total count of expired records for pagination
|
||||
$totalCount = ORM::for_table('tbl_user_recharges')
|
||||
->where_lte('expiration', $mdate)
|
||||
->count();
|
||||
|
||||
// Pass the total count and current page to the paginator
|
||||
$paginator['total_count'] = $totalCount;
|
||||
|
||||
// Assign the pagination HTML to the template variable
|
||||
$ui->assign('paginator', $paginator);
|
||||
$ui->assign('expire', $expire);
|
||||
|
||||
//activity log
|
||||
|
@ -47,7 +47,7 @@ switch ($do) {
|
||||
$username = _post('username');
|
||||
$v1 = ORM::for_table('tbl_voucher')->where('code', $voucher)->find_one();
|
||||
if ($v1) {
|
||||
// coucher exists, check customer exists or not
|
||||
// voucher exists, check customer exists or not
|
||||
$user = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||
if (!$user) {
|
||||
$d = ORM::for_table('tbl_customers')->create();
|
||||
@ -72,10 +72,12 @@ switch ($do) {
|
||||
$user->password = $voucher;
|
||||
$user->save();
|
||||
// voucher activation
|
||||
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Activation", "Voucher")) {
|
||||
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Voucher", $voucher)) {
|
||||
$v1->status = "1";
|
||||
$v1->user = $user['username'];
|
||||
$v1->save();
|
||||
$user->last_login = date('Y-m-d H:i:s');
|
||||
$user->save();
|
||||
// add customer to mikrotik
|
||||
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
|
||||
try {
|
||||
@ -110,6 +112,8 @@ switch ($do) {
|
||||
// used voucher
|
||||
// check if voucher used by this username
|
||||
if ($v1['user'] == $user['username']) {
|
||||
$user->last_login = date('Y-m-d H:i:s');
|
||||
$user->save();
|
||||
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
|
||||
try {
|
||||
$m = Mikrotik::info($v1['routers']);
|
||||
@ -140,8 +144,8 @@ switch ($do) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// voucher not found
|
||||
r2(U . 'login', 'e', $_L['Voucher_Not_Valid']);
|
||||
_msglog('e', $_L['Invalid_Username_or_Password']);
|
||||
r2(U . 'login');
|
||||
}
|
||||
default:
|
||||
run_hook('customer_view_login'); #HOOK
|
||||
|
@ -37,7 +37,7 @@ switch ($action) {
|
||||
}
|
||||
$ui->assign('_title', 'Top Up');
|
||||
$ui->assign('_system_menu', 'balance');
|
||||
$plans_balance = ORM::for_table('tbl_plans')->where('enabled', '1')->where('type', 'Balance')->find_many();
|
||||
$plans_balance = ORM::for_table('tbl_plans')->where('enabled', '1')->where('type', 'Balance')->where('allow_purchase', 'yes')->find_many();
|
||||
$ui->assign('plans_balance', $plans_balance);
|
||||
$ui->display('user-orderBalance.tpl');
|
||||
break;
|
||||
@ -49,24 +49,24 @@ switch ($action) {
|
||||
$ui->assign('_system_menu', 'package');
|
||||
if (!empty($_SESSION['nux-router'])) {
|
||||
if ($_SESSION['nux-router'] == 'radius') {
|
||||
$radius_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'PPPOE')->find_many();
|
||||
$radius_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'Hotspot')->find_many();
|
||||
$radius_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'PPPOE')->where('allow_purchase', 'yes')->find_many();
|
||||
$radius_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'Hotspot')->where('allow_purchase', 'yes')->find_many();
|
||||
} else {
|
||||
$routers = ORM::for_table('tbl_routers')->where('id', $_SESSION['nux-router'])->find_many();
|
||||
$rs = [];
|
||||
foreach ($routers as $r) {
|
||||
$rs[] = $r['name'];
|
||||
}
|
||||
$plans_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where_in('routers', $rs)->where('is_radius', 0)->where('type', 'PPPOE')->find_many();
|
||||
$plans_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where_in('routers', $rs)->where('is_radius', 0)->where('type', 'Hotspot')->find_many();
|
||||
$plans_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where_in('routers', $rs)->where('is_radius', 0)->where('type', 'PPPOE')->where('allow_purchase', 'yes')->find_many();
|
||||
$plans_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where_in('routers', $rs)->where('is_radius', 0)->where('type', 'Hotspot')->where('allow_purchase', 'yes')->find_many();
|
||||
}
|
||||
} else {
|
||||
$radius_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'PPPOE')->find_many();
|
||||
$radius_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'Hotspot')->find_many();
|
||||
$radius_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'PPPOE')->where('allow_purchase', 'yes')->find_many();
|
||||
$radius_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 1)->where('type', 'Hotspot')->where('allow_purchase', 'yes')->find_many();
|
||||
|
||||
$routers = ORM::for_table('tbl_routers')->find_many();
|
||||
$plans_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 0)->where('type', 'PPPOE')->find_many();
|
||||
$plans_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 0)->where('type', 'Hotspot')->find_many();
|
||||
$plans_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 0)->where('type', 'PPPOE')->where('allow_purchase', 'yes')->find_many();
|
||||
$plans_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 0)->where('type', 'Hotspot')->where('allow_purchase', 'yes')->find_many();
|
||||
}
|
||||
$ui->assign('routers', $routers);
|
||||
$ui->assign('radius_pppoe', $radius_pppoe);
|
||||
@ -277,7 +277,7 @@ switch ($action) {
|
||||
$router['id'] = 0;
|
||||
$router['name'] = 'balance';
|
||||
}
|
||||
$plan = ORM::for_table('tbl_plans')->where('enabled', '1')->find_one($routes['3']);
|
||||
$plan = ORM::for_table('tbl_plans')->where('enabled', '1')->where('allow_purchase', 'yes')->find_one($routes['3']);
|
||||
if (empty($router) || empty($plan)) {
|
||||
r2(U . "order/package", 'e', Lang::T("Plan Not found"));
|
||||
}
|
||||
|
@ -288,8 +288,14 @@ switch ($action) {
|
||||
case 'remove-voucher':
|
||||
$d = ORM::for_table('tbl_voucher')->where_equal('status', '1')->findMany();
|
||||
if ($d) {
|
||||
$d->delete();
|
||||
r2(U . 'prepaid/voucher', 's', $_L['Delete_Successfully']);
|
||||
$jml = 0;
|
||||
foreach ($d as $v) {
|
||||
if(!ORM::for_table('tbl_user_recharges')->where_equal("method",'Voucher - '.$v['code'])->findOne()){
|
||||
$v->delete();
|
||||
$jml++;
|
||||
}
|
||||
}
|
||||
r2(U . 'prepaid/voucher', 's', "$jml ".$_L['Delete_Successfully']);
|
||||
}
|
||||
case 'print-voucher':
|
||||
$from_id = _post('from_id');
|
||||
@ -393,6 +399,8 @@ switch ($action) {
|
||||
case 'voucher-post':
|
||||
$type = _post('type');
|
||||
$plan = _post('plan');
|
||||
$voucher_format = _post('voucher_format');
|
||||
$prefix = _post('prefix');
|
||||
$server = _post('server');
|
||||
$numbervoucher = _post('numbervoucher');
|
||||
$lengthcode = _post('lengthcode');
|
||||
@ -408,19 +416,31 @@ switch ($action) {
|
||||
$msg .= 'The Length Code must be a number' . '<br>';
|
||||
}
|
||||
if ($msg == '') {
|
||||
if(!empty($prefix)){
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'voucher_prefix')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $prefix;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'voucher_prefix';
|
||||
$d->value = $prefix;
|
||||
$d->save();
|
||||
}
|
||||
}
|
||||
run_hook('create_voucher'); #HOOK
|
||||
for ($i = 0; $i < $numbervoucher; $i++) {
|
||||
$code = strtoupper(substr(md5(time() . rand(10000, 99999)), 0, $lengthcode));
|
||||
if ($config['voucher_format'] == 'low') {
|
||||
if ($voucher_format == 'low') {
|
||||
$code = strtolower($code);
|
||||
} else if ($config['voucher_format'] == 'rand') {
|
||||
} else if ($voucher_format == 'rand') {
|
||||
$code = Lang::randomUpLowCase($code);
|
||||
}
|
||||
$d = ORM::for_table('tbl_voucher')->create();
|
||||
$d->type = $type;
|
||||
$d->routers = $server;
|
||||
$d->id_plan = $plan;
|
||||
$d->code = $code;
|
||||
$d->code = $prefix.$code;
|
||||
$d->user = '0';
|
||||
$d->status = '0';
|
||||
$d->save();
|
||||
@ -457,7 +477,7 @@ switch ($action) {
|
||||
|
||||
run_hook('refill_customer'); #HOOK
|
||||
if ($v1) {
|
||||
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Refill", "Voucher")) {
|
||||
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Voucher", $code)) {
|
||||
$v1->status = "1";
|
||||
$v1->user = $user['username'];
|
||||
$v1->save();
|
||||
|
@ -199,6 +199,7 @@ switch ($action) {
|
||||
$routers = _post('routers');
|
||||
$pool_expired = _post('pool_expired');
|
||||
$enabled = _post('enabled');
|
||||
$allow_purchase = _post('allow_purchase');
|
||||
|
||||
$msg = '';
|
||||
if (Validator::UnsignedNumber($validity) == false) {
|
||||
@ -264,6 +265,7 @@ switch ($action) {
|
||||
$d->pool_expired = $pool_expired;
|
||||
}
|
||||
$d->enabled = $enabled;
|
||||
$d->allow_purchase = $allow_purchase;
|
||||
$d->save();
|
||||
$plan_id = $d->id();
|
||||
|
||||
@ -302,6 +304,7 @@ switch ($action) {
|
||||
$validity_unit = _post('validity_unit');
|
||||
$pool_expired = _post('pool_expired');
|
||||
$enabled = _post('enabled');
|
||||
$allow_purchase = _post('allow_purchase');
|
||||
$routers = _post('routers');
|
||||
$msg = '';
|
||||
if (Validator::UnsignedNumber($validity) == false) {
|
||||
@ -363,6 +366,7 @@ switch ($action) {
|
||||
$d->shared_users = $sharedusers;
|
||||
$d->pool_expired = $pool_expired;
|
||||
$d->enabled = $enabled;
|
||||
$d->allow_purchase = $allow_purchase;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'services/hotspot', 's', $_L['Updated_Successfully']);
|
||||
@ -456,6 +460,8 @@ switch ($action) {
|
||||
$pool = _post('pool_name');
|
||||
$pool_expired = _post('pool_expired');
|
||||
$enabled = _post('enabled');
|
||||
$allow_purchase = _post('allow_purchase');
|
||||
|
||||
|
||||
$msg = '';
|
||||
if (Validator::UnsignedNumber($validity) == false) {
|
||||
@ -514,6 +520,7 @@ switch ($action) {
|
||||
$d->pool_expired = $pool_expired;
|
||||
}
|
||||
$d->enabled = $enabled;
|
||||
$d->allow_purchase = $allow_purchase;
|
||||
$d->save();
|
||||
$plan_id = $d->id();
|
||||
|
||||
@ -545,6 +552,7 @@ switch ($action) {
|
||||
$pool = _post('pool_name');
|
||||
$pool_expired = _post('pool_expired');
|
||||
$enabled = _post('enabled');
|
||||
$allow_purchase = _post('allow_purchase');
|
||||
|
||||
$msg = '';
|
||||
if (Validator::UnsignedNumber($validity) == false) {
|
||||
@ -602,6 +610,7 @@ switch ($action) {
|
||||
$d->pool = $pool;
|
||||
$d->pool_expired = $pool_expired;
|
||||
$d->enabled = $enabled;
|
||||
$d->allow_purchase = $allow_purchase;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'services/pppoe', 's', $_L['Updated_Successfully']);
|
||||
@ -653,6 +662,7 @@ switch ($action) {
|
||||
$name = _post('name');
|
||||
$price = _post('price');
|
||||
$enabled = _post('enabled');
|
||||
$allow_purchase = _post('allow_purchase');
|
||||
|
||||
$msg = '';
|
||||
if (Validator::UnsignedNumber($price) == false) {
|
||||
@ -672,6 +682,7 @@ switch ($action) {
|
||||
$d->name_plan = $name;
|
||||
$d->price = $price;
|
||||
$d->enabled = $enabled;
|
||||
$d->allow_purchase = $allow_purchase;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'services/balance', 's', $_L['Updated_Successfully']);
|
||||
@ -683,6 +694,7 @@ switch ($action) {
|
||||
$name = _post('name');
|
||||
$price = _post('price');
|
||||
$enabled = _post('enabled');
|
||||
$allow_purchase = _post('allow_purchase');
|
||||
|
||||
$msg = '';
|
||||
if (Validator::UnsignedNumber($price) == false) {
|
||||
@ -708,6 +720,7 @@ switch ($action) {
|
||||
$d->routers = '';
|
||||
$d->pool = '';
|
||||
$d->enabled = $enabled;
|
||||
$d->allow_purchase = $allow_purchase;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'services/balance', 's', $_L['Created_Successfully']);
|
||||
|
@ -11,8 +11,6 @@ $action = $routes['1'];
|
||||
$user = User::_info();
|
||||
$ui->assign('_user', $user);
|
||||
|
||||
use PEAR2\Net\RouterOS;
|
||||
|
||||
require_once 'system/autoload/PEAR2/Autoload.php';
|
||||
|
||||
switch ($action) {
|
||||
@ -27,7 +25,7 @@ switch ($action) {
|
||||
$v1 = ORM::for_table('tbl_voucher')->where('code', $code)->where('status', 0)->find_one();
|
||||
run_hook('customer_activate_voucher'); #HOOK
|
||||
if ($v1) {
|
||||
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Activation", "Voucher")) {
|
||||
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Voucher", $code)) {
|
||||
$v1->status = "1";
|
||||
$v1->user = $user['username'];
|
||||
$v1->save();
|
||||
|
@ -417,3 +417,6 @@ $_L['Disable_Registration'] = 'Disable Registration';
|
||||
$_L['Customer_just_Login_with_Phone_number_and_Voucher_Code_Voucher_will_be_password'] = 'Customer just Login with Phone number and Voucher Code, Voucher will be password';
|
||||
$_L['Login__Activate_Voucher'] = 'Login / Activate Voucher';
|
||||
$_L['After_Customer_activate_voucher_or_login_customer_will_be_redirected_to_this_url'] = 'After Customer activate voucher or login, customer will be redirected to this url';
|
||||
$_L['Voucher_Prefix'] = 'Voucher Prefix';
|
||||
$_L['Voucher_activation_success_now_you_can_login'] = 'Voucher activation success, now you can login';
|
||||
$_L['Client_Can_Purchase'] = 'Client Can Purchase';
|
||||
|
@ -38,5 +38,8 @@
|
||||
],
|
||||
"2023.12.15": [
|
||||
"ALTER TABLE `tbl_customers` ADD `service_type` ENUM('Hotspot','PPPoE','Others') DEFAULT 'Others' COMMENT 'For selecting user type' AFTER `balance`;"
|
||||
],
|
||||
"2024.1.11": [
|
||||
"ALTER TABLE `tbl_plans` ADD `allow_purchase` ENUM('yes','no') DEFAULT 'yes' COMMENT 'allow to show package in buy package page' AFTER `enabled`;"
|
||||
]
|
||||
}
|
@ -17,6 +17,17 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Client Can Purchase')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" checked name="allow_purchase" value="yes"> Yes
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="allow_purchase" value="no"> No
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Plan_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
|
@ -17,6 +17,18 @@
|
||||
<input type="radio" name="enabled" value="0"> Disable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Client Can Purchase')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" {if $d['allow_purchase'] == yes}checked{/if} name="allow_purchase" value="yes"> Yes
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" {if $d['allow_purchase'] == no}checked{/if} name="allow_purchase" value="no">
|
||||
No
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Plan_Name']}</label>
|
||||
|
@ -119,6 +119,7 @@
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
{$paginator['contents']}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -149,7 +150,9 @@
|
||||
$.getJSON("./version.json?" + Math.random(), function(data) {
|
||||
var localVersion = data.version;
|
||||
$('#version').html('Version: ' + localVersion);
|
||||
$.getJSON("https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/version.json?" + Math
|
||||
$.getJSON(
|
||||
"https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/version.json?" +
|
||||
Math
|
||||
.random(),
|
||||
function(data) {
|
||||
var latestVersion = data.version;
|
||||
|
@ -9,12 +9,15 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" checked name="enabled" value="1"> Enable
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="enabled" value="1" checked> Enable
|
||||
<input type="radio" name="enabled" value="0"> Disable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Client Can Purchase')}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="radio" name="allow_purchase" value="yes" checked> Yes
|
||||
<input type="radio" name="allow_purchase" value="no"> No
|
||||
</div>
|
||||
</div>
|
||||
{if $_c['radius_enable']}
|
||||
|
@ -10,13 +10,15 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" {if $d['enabled'] == 1}checked{/if} name="enabled" value="1"> Enable
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" {if $d['enabled'] == 0}checked{/if} name="enabled" value="0">
|
||||
Disable
|
||||
</label>
|
||||
<input type="radio" name="enabled" value="1" {if $d['enabled'] == 1}checked{/if}> Enable
|
||||
<input type="radio" name="enabled" value="0" {if $d['enabled'] == 0}checked{/if}> Disable
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Client Can Purchase')}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="radio" name="allow_purchase" value="yes" {if $d['allow_purchase'] == yes}checked{/if}> Yes
|
||||
<input type="radio" name="allow_purchase" value="no" {if $d['allow_purchase'] == no}checked{/if}> No
|
||||
</div>
|
||||
</div>
|
||||
{if $_c['radius_enable'] and $d['is_radius']}
|
||||
|
@ -44,7 +44,7 @@
|
||||
<td>{Lang::dateTimeFormat($ds['date'])}</td>
|
||||
<td>{$ds['type']}</td>
|
||||
<td>{$ds['ip']}</td>
|
||||
<td style="overflow-x: scroll;">{$ds['description']}</td>
|
||||
<td style="overflow-x: scroll;">{nl2br($ds['description'])}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
|
@ -39,7 +39,7 @@
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{$pg['name']}</h3>
|
||||
</div>
|
||||
<div class="box-body">{$pg['description']}<br><small><i>@{$plugin['author']} Last update: {$plugin['last_update']}</i></small></div>
|
||||
<div class="box-body">{$pg['description']}<br><small><i>@{$pg['author']} Last update: {$pg['last_update']}</i></small></div>
|
||||
<div class="box-footer ">
|
||||
<div class="btn-group btn-group-justified" role="group" aria-label="...">
|
||||
<a href="{$pg['url']}" target="_blank"
|
||||
|
@ -9,21 +9,22 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" checked name="enabled" value="1"> Enable
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="enabled" value="0"> Disable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Client Can Purchase')}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="radio" checked name="allow_purchase" value="yes"> Yes
|
||||
<input type="radio" name="allow_purchase" value="no"> No
|
||||
</div>
|
||||
</div>
|
||||
{if $_c['radius_enable']}
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Radius</label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="checkbox" name="radius" onclick="isRadius(this)" value="1"> Radius Plan
|
||||
</label>
|
||||
</div>
|
||||
<p class="help-block col-md-4">{Lang::T('Cannot be change after saved')}</p>
|
||||
</div>
|
||||
|
@ -10,13 +10,15 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" {if $d['enabled'] == 1}checked{/if} name="enabled" value="1"> Enable
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" {if $d['enabled'] == 0}checked{/if} name="enabled" value="0">
|
||||
Disable
|
||||
</label>
|
||||
<input type="radio" name="enabled" value="1" {if $d['enabled'] == 1}checked{/if}> Enable
|
||||
<input type="radio" name="enabled" value="0" {if $d['enabled'] == 0}checked{/if}> Disable
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Client Can Purchase')}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="radio" name="allow_purchase" value="yes" {if $d['allow_purchase'] == yes}checked{/if}> Yes
|
||||
<input type="radio" name="allow_purchase" value="no" {if $d['allow_purchase'] == no}checked{/if}> No
|
||||
</div>
|
||||
</div>
|
||||
{if $_c['radius_enable'] and $d['is_radius']}
|
||||
|
@ -81,7 +81,7 @@
|
||||
Hotspot
|
||||
{elseif $_user.service_type == 'PPPoE'}
|
||||
PPPoE
|
||||
{elseif $_user.service_type == 'Other' || $_user.service_type == null}
|
||||
{elseif $_user.service_type == 'Others' || $_user.service_type == null}
|
||||
Others
|
||||
{/if}
|
||||
</td>
|
||||
|
@ -31,21 +31,41 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Number_of_Vouchers']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="numbervoucher" value="1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<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="up" {if $_c['voucher_format'] == 'up'}selected="selected" {/if}>UPPERCASE
|
||||
</option>
|
||||
<option value="low" {if $_c['voucher_format'] == 'low'}selected="selected" {/if}>
|
||||
lowercase
|
||||
</option>
|
||||
<option value="rand" {if $_c['voucher_format'] == 'rand'}selected="selected" {/if}>
|
||||
RaNdoM
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4">UPPERCASE lowercase RaNdoM</p>
|
||||
</div>
|
||||
<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']}">
|
||||
</div>
|
||||
<p class="help-block col-md-4">NUX-VoUCHeRCOdE</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Length_Code']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="lengthcode" value="12">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-success waves-effect waves-light"
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "2023.12.21"
|
||||
"version": "2024.1.11"
|
||||
}
|
Reference in New Issue
Block a user