Merge branch 'hotspotbilling:master' into master
This commit is contained in:
commit
263a1b6722
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**
|
**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
|
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.**
|
**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 [...]
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
46
CHANGELOG.md
46
CHANGELOG.md
@ -2,6 +2,52 @@
|
|||||||
|
|
||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 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
|
||||||
|
- Update user-dashboard.tpl by @Focuslinkstech
|
||||||
|
|
||||||
|
## 2023.12.19
|
||||||
|
|
||||||
|
- Fix Search Customer
|
||||||
|
- Disable Registration, Customer just activate voucher Code, and the voucher will be their password
|
||||||
|
- Remove all used voucher codes
|
||||||
|
|
||||||
|
## 2023.12.18
|
||||||
|
|
||||||
|
- Split sms to 160 characters only for Mikrotik Modem
|
||||||
|
|
||||||
|
## 2023.12.14
|
||||||
|
|
||||||
|
- Can send SMS using Mikrotik with Modem Installed
|
||||||
|
- Add Customer Type, so Customer can only show their PPPOE or Hotspot Package or both
|
||||||
|
|
||||||
|
## 2023.11.17
|
||||||
|
|
||||||
|
- Error details not show in Customer
|
||||||
|
|
||||||
|
## 2023.11.15
|
||||||
|
|
||||||
|
- Customer Multi Router package
|
||||||
|
- Fix edit package, Admin can change Customer to another router
|
||||||
|
|
||||||
|
## 2023.11.9
|
||||||
|
|
||||||
|
- fix bug variable in cron
|
||||||
|
- fix update plan
|
||||||
|
|
||||||
## 2023.10.27
|
## 2023.10.27
|
||||||
|
|
||||||
- Backup and restore database
|
- Backup and restore database
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
|
[](https://s.id/standwithpalestine)
|
||||||
|
|
||||||
# PHPNuxBill - PHP Mikrotik Billing
|
# PHPNuxBill - PHP Mikrotik Billing
|
||||||
|
|
||||||

|

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

|
|
||||||
|
|
||||||
## Feature
|
## Feature
|
||||||
|
|
||||||
- Voucher Generator and Print
|
- Voucher Generator and Print
|
||||||
|
- FreeRadius
|
||||||
- Self registration
|
- Self registration
|
||||||
- User Balance
|
- User Balance
|
||||||
- Auto Renewal Package using Balance
|
- Auto Renewal Package using Balance
|
||||||
@ -35,7 +36,7 @@ Most current web servers with PHP & MySQL installed will be capable of running P
|
|||||||
Minimum Requirements
|
Minimum Requirements
|
||||||
|
|
||||||
- Linux or Windows OS
|
- Linux or Windows OS
|
||||||
- PHP Version 7.4
|
- Minimum PHP Version 7.4
|
||||||
- Both PDO & MySQLi Support
|
- Both PDO & MySQLi Support
|
||||||
- PHP-GD2 Image Library
|
- PHP-GD2 Image Library
|
||||||
- PHP-CURL
|
- PHP-CURL
|
||||||
|
@ -102,6 +102,13 @@ CREATE TABLE `radusergroup` (
|
|||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
) 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`
|
ALTER TABLE `nas`
|
||||||
ADD PRIMARY KEY (`id`),
|
ADD PRIMARY KEY (`id`),
|
||||||
ADD KEY `nasname` (`nasname`);
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -24,11 +24,36 @@ class Message
|
|||||||
global $config;
|
global $config;
|
||||||
run_hook('send_sms'); #HOOK
|
run_hook('send_sms'); #HOOK
|
||||||
if (!empty($config['sms_url'])) {
|
if (!empty($config['sms_url'])) {
|
||||||
|
if (strlen($config['sms_url']) > 4 && substr($config['sms_url'], 0, 4) != "http") {
|
||||||
|
if (strlen($txt) > 160) {
|
||||||
|
$txts = str_split($txt, 160);
|
||||||
|
foreach ($txts as $txt) {
|
||||||
|
try {
|
||||||
|
$mikrotik = Mikrotik::info($config['sms_url']);
|
||||||
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
|
Mikrotik::sendSMS($client, $phone, $txt);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// ignore, add to logs
|
||||||
|
_log("Failed to send SMS using Mikrotik.\n" . $e->getMessage(), 'SMS', 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
try {
|
||||||
|
$mikrotik = Mikrotik::info($config['sms_url']);
|
||||||
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
|
Mikrotik::sendSMS($client, $phone, $txt);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// ignore, add to logs
|
||||||
|
_log("Failed to send SMS using Mikrotik.\n" . $e->getMessage(), 'SMS', 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
$smsurl = str_replace('[number]', urlencode($phone), $config['sms_url']);
|
$smsurl = str_replace('[number]', urlencode($phone), $config['sms_url']);
|
||||||
$smsurl = str_replace('[text]', urlencode($txt), $smsurl);
|
$smsurl = str_replace('[text]', urlencode($txt), $smsurl);
|
||||||
Http::getData($smsurl);
|
Http::getData($smsurl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static function sendWhatsapp($phone, $txt)
|
public static function sendWhatsapp($phone, $txt)
|
||||||
{
|
{
|
||||||
@ -76,7 +101,8 @@ class Message
|
|||||||
return "$via: $msg";
|
return "$via: $msg";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function sendInvoice($cust, $trx){
|
public static function sendInvoice($cust, $trx)
|
||||||
|
{
|
||||||
global $config;
|
global $config;
|
||||||
$textInvoice = Lang::getNotifText('invoice_paid');
|
$textInvoice = Lang::getNotifText('invoice_paid');
|
||||||
$textInvoice = str_replace('[[company_name]]', $config['CompanyName'], $textInvoice);
|
$textInvoice = str_replace('[[company_name]]', $config['CompanyName'], $textInvoice);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||||
* by https://t.me/ibnux
|
* by https://t.me/ibnux
|
||||||
@ -15,20 +16,20 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function getClient($ip, $user, $pass)
|
public static function getClient($ip, $user, $pass)
|
||||||
{
|
{
|
||||||
global $ui;
|
global $_app_stage;
|
||||||
//try {
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$iport = explode(":", $ip);
|
$iport = explode(":", $ip);
|
||||||
return new RouterOS\Client($iport[0], $user, $pass, ($iport[1]) ? $iport[1] : null);
|
return new RouterOS\Client($iport[0], $user, $pass, ($iport[1]) ? $iport[1] : null);
|
||||||
// } catch (Exception $e) {
|
|
||||||
// $ui->assign("error_title", "Mikrotik Connection Error");
|
|
||||||
// $ui->assign("error_message", "Unable to connect to the router : $ip<br>" . $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
|
||||||
// $ui->display('router-error.tpl');
|
|
||||||
// die();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function isUserLogin($client, $username)
|
public static function isUserLogin($client, $username)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request(
|
$printRequest = new RouterOS\Request(
|
||||||
'/ip hotspot active print',
|
'/ip hotspot active print',
|
||||||
RouterOS\Query::where('user', $username)
|
RouterOS\Query::where('user', $username)
|
||||||
@ -38,6 +39,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function logMeIn($client, $user, $pass, $ip, $mac)
|
public static function logMeIn($client, $user, $pass, $ip, $mac)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$addRequest = new RouterOS\Request('/ip/hotspot/active/login');
|
$addRequest = new RouterOS\Request('/ip/hotspot/active/login');
|
||||||
$client->sendSync(
|
$client->sendSync(
|
||||||
$addRequest
|
$addRequest
|
||||||
@ -50,13 +55,17 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function logMeOut($client, $user)
|
public static function logMeOut($client, $user)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request(
|
$printRequest = new RouterOS\Request(
|
||||||
'/ip hotspot active print',
|
'/ip hotspot active print',
|
||||||
RouterOS\Query::where('user', $user)
|
RouterOS\Query::where('user', $user)
|
||||||
);
|
);
|
||||||
$id = $client->sendSync($printRequest)->getProperty('.id');
|
$id = $client->sendSync($printRequest)->getProperty('.id');
|
||||||
$removeRequest = new RouterOS\Request('/ip/hotspot/active/remove');
|
$removeRequest = new RouterOS\Request('/ip/hotspot/active/remove');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$removeRequest
|
$removeRequest
|
||||||
->setArgument('numbers', $id)
|
->setArgument('numbers', $id)
|
||||||
);
|
);
|
||||||
@ -64,6 +73,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function addHotspotPlan($client, $name, $sharedusers, $rate)
|
public static function addHotspotPlan($client, $name, $sharedusers, $rate)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$addRequest = new RouterOS\Request('/ip/hotspot/user/profile/add');
|
$addRequest = new RouterOS\Request('/ip/hotspot/user/profile/add');
|
||||||
$client->sendSync(
|
$client->sendSync(
|
||||||
$addRequest
|
$addRequest
|
||||||
@ -75,6 +88,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function setHotspotPlan($client, $name, $sharedusers, $rate)
|
public static function setHotspotPlan($client, $name, $sharedusers, $rate)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request(
|
$printRequest = new RouterOS\Request(
|
||||||
'/ip hotspot user profile print .proplist=.id',
|
'/ip hotspot user profile print .proplist=.id',
|
||||||
RouterOS\Query::where('name', $name)
|
RouterOS\Query::where('name', $name)
|
||||||
@ -84,7 +101,7 @@ class Mikrotik
|
|||||||
Mikrotik::addHotspotPlan($client, $name, $sharedusers, $rate);
|
Mikrotik::addHotspotPlan($client, $name, $sharedusers, $rate);
|
||||||
} else {
|
} else {
|
||||||
$setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set');
|
$setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$setRequest
|
$setRequest
|
||||||
->setArgument('numbers', $profileID)
|
->setArgument('numbers', $profileID)
|
||||||
->setArgument('shared-users', $sharedusers)
|
->setArgument('shared-users', $sharedusers)
|
||||||
@ -95,6 +112,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function setHotspotExpiredPlan($client, $name, $pool)
|
public static function setHotspotExpiredPlan($client, $name, $pool)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request(
|
$printRequest = new RouterOS\Request(
|
||||||
'/ip hotspot user profile print .proplist=.id',
|
'/ip hotspot user profile print .proplist=.id',
|
||||||
RouterOS\Query::where('name', $name)
|
RouterOS\Query::where('name', $name)
|
||||||
@ -111,7 +132,7 @@ class Mikrotik
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set');
|
$setRequest = new RouterOS\Request('/ip/hotspot/user/profile/set');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$setRequest
|
$setRequest
|
||||||
->setArgument('numbers', $profileID)
|
->setArgument('numbers', $profileID)
|
||||||
->setArgument('shared-users', 3)
|
->setArgument('shared-users', 3)
|
||||||
@ -123,6 +144,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function removeHotspotPlan($client, $name)
|
public static function removeHotspotPlan($client, $name)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request(
|
$printRequest = new RouterOS\Request(
|
||||||
'/ip hotspot user profile print .proplist=.id',
|
'/ip hotspot user profile print .proplist=.id',
|
||||||
RouterOS\Query::where('name', $name)
|
RouterOS\Query::where('name', $name)
|
||||||
@ -130,7 +155,7 @@ class Mikrotik
|
|||||||
$profileID = $client->sendSync($printRequest)->getProperty('.id');
|
$profileID = $client->sendSync($printRequest)->getProperty('.id');
|
||||||
|
|
||||||
$removeRequest = new RouterOS\Request('/ip/hotspot/user/profile/remove');
|
$removeRequest = new RouterOS\Request('/ip/hotspot/user/profile/remove');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$removeRequest
|
$removeRequest
|
||||||
->setArgument('numbers', $profileID)
|
->setArgument('numbers', $profileID)
|
||||||
);
|
);
|
||||||
@ -138,13 +163,17 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function removeHotspotUser($client, $username)
|
public static function removeHotspotUser($client, $username)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request(
|
$printRequest = new RouterOS\Request(
|
||||||
'/ip hotspot user print .proplist=.id',
|
'/ip hotspot user print .proplist=.id',
|
||||||
RouterOS\Query::where('name', $username)
|
RouterOS\Query::where('name', $username)
|
||||||
);
|
);
|
||||||
$userID = $client->sendSync($printRequest)->getProperty('.id');
|
$userID = $client->sendSync($printRequest)->getProperty('.id');
|
||||||
$removeRequest = new RouterOS\Request('/ip/hotspot/user/remove');
|
$removeRequest = new RouterOS\Request('/ip/hotspot/user/remove');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$removeRequest
|
$removeRequest
|
||||||
->setArgument('numbers', $userID)
|
->setArgument('numbers', $userID)
|
||||||
);
|
);
|
||||||
@ -152,6 +181,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function addHotspotUser($client, $plan, $customer)
|
public static function addHotspotUser($client, $plan, $customer)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$addRequest = new RouterOS\Request('/ip/hotspot/user/add');
|
$addRequest = new RouterOS\Request('/ip/hotspot/user/add');
|
||||||
if ($plan['typebp'] == "Limited") {
|
if ($plan['typebp'] == "Limited") {
|
||||||
if ($plan['limit_type'] == "Time_Limit") {
|
if ($plan['limit_type'] == "Time_Limit") {
|
||||||
@ -216,6 +249,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function setHotspotUser($client, $user, $pass)
|
public static function setHotspotUser($client, $user, $pass)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request('/ip/hotspot/user/print');
|
$printRequest = new RouterOS\Request('/ip/hotspot/user/print');
|
||||||
$printRequest->setArgument('.proplist', '.id');
|
$printRequest->setArgument('.proplist', '.id');
|
||||||
$printRequest->setQuery(RouterOS\Query::where('name', $user));
|
$printRequest->setQuery(RouterOS\Query::where('name', $user));
|
||||||
@ -229,6 +266,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function setHotspotUserPackage($client, $user, $plan)
|
public static function setHotspotUserPackage($client, $user, $plan)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request('/ip/hotspot/user/print');
|
$printRequest = new RouterOS\Request('/ip/hotspot/user/print');
|
||||||
$printRequest->setArgument('.proplist', '.id');
|
$printRequest->setArgument('.proplist', '.id');
|
||||||
$printRequest->setQuery(RouterOS\Query::where('name', $user));
|
$printRequest->setQuery(RouterOS\Query::where('name', $user));
|
||||||
@ -242,6 +283,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function removeHotspotActiveUser($client, $username)
|
public static function removeHotspotActiveUser($client, $username)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$onlineRequest = new RouterOS\Request('/ip/hotspot/active/print');
|
$onlineRequest = new RouterOS\Request('/ip/hotspot/active/print');
|
||||||
$onlineRequest->setArgument('.proplist', '.id');
|
$onlineRequest->setArgument('.proplist', '.id');
|
||||||
$onlineRequest->setQuery(RouterOS\Query::where('user', $username));
|
$onlineRequest->setQuery(RouterOS\Query::where('user', $username));
|
||||||
@ -254,7 +299,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function removePpoeUser($client, $username)
|
public static function removePpoeUser($client, $username)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request('/ppp/secret/print');
|
$printRequest = new RouterOS\Request('/ppp/secret/print');
|
||||||
//$printRequest->setArgument('.proplist', '.id');
|
//$printRequest->setArgument('.proplist', '.id');
|
||||||
$printRequest->setQuery(RouterOS\Query::where('name', $username));
|
$printRequest->setQuery(RouterOS\Query::where('name', $username));
|
||||||
@ -266,6 +314,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function addPpoeUser($client, $plan, $customer)
|
public static function addPpoeUser($client, $plan, $customer)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$addRequest = new RouterOS\Request('/ppp/secret/add');
|
$addRequest = new RouterOS\Request('/ppp/secret/add');
|
||||||
if (!empty($customer['pppoe_password'])) {
|
if (!empty($customer['pppoe_password'])) {
|
||||||
$pass = $customer['pppoe_password'];
|
$pass = $customer['pppoe_password'];
|
||||||
@ -284,6 +336,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function setPpoeUser($client, $user, $pass)
|
public static function setPpoeUser($client, $user, $pass)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request('/ppp/secret/print');
|
$printRequest = new RouterOS\Request('/ppp/secret/print');
|
||||||
$printRequest->setArgument('.proplist', '.id');
|
$printRequest->setArgument('.proplist', '.id');
|
||||||
$printRequest->setQuery(RouterOS\Query::where('name', $user));
|
$printRequest->setQuery(RouterOS\Query::where('name', $user));
|
||||||
@ -297,6 +353,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function setPpoeUserPlan($client, $user, $plan)
|
public static function setPpoeUserPlan($client, $user, $plan)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request('/ppp/secret/print');
|
$printRequest = new RouterOS\Request('/ppp/secret/print');
|
||||||
$printRequest->setArgument('.proplist', '.id');
|
$printRequest->setArgument('.proplist', '.id');
|
||||||
$printRequest->setQuery(RouterOS\Query::where('name', $user));
|
$printRequest->setQuery(RouterOS\Query::where('name', $user));
|
||||||
@ -310,6 +370,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function removePpoeActive($client, $username)
|
public static function removePpoeActive($client, $username)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$onlineRequest = new RouterOS\Request('/ppp/active/print');
|
$onlineRequest = new RouterOS\Request('/ppp/active/print');
|
||||||
$onlineRequest->setArgument('.proplist', '.id');
|
$onlineRequest->setArgument('.proplist', '.id');
|
||||||
$onlineRequest->setQuery(RouterOS\Query::where('name', $username));
|
$onlineRequest->setQuery(RouterOS\Query::where('name', $username));
|
||||||
@ -322,6 +386,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function removePool($client, $name)
|
public static function removePool($client, $name)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request(
|
$printRequest = new RouterOS\Request(
|
||||||
'/ip pool print .proplist=.id',
|
'/ip pool print .proplist=.id',
|
||||||
RouterOS\Query::where('name', $name)
|
RouterOS\Query::where('name', $name)
|
||||||
@ -329,7 +397,7 @@ class Mikrotik
|
|||||||
$poolID = $client->sendSync($printRequest)->getProperty('.id');
|
$poolID = $client->sendSync($printRequest)->getProperty('.id');
|
||||||
|
|
||||||
$removeRequest = new RouterOS\Request('/ip/pool/remove');
|
$removeRequest = new RouterOS\Request('/ip/pool/remove');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$removeRequest
|
$removeRequest
|
||||||
->setArgument('numbers', $poolID)
|
->setArgument('numbers', $poolID)
|
||||||
);
|
);
|
||||||
@ -337,6 +405,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function addPool($client, $name, $ip_address)
|
public static function addPool($client, $name, $ip_address)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$addRequest = new RouterOS\Request('/ip/pool/add');
|
$addRequest = new RouterOS\Request('/ip/pool/add');
|
||||||
$client->sendSync(
|
$client->sendSync(
|
||||||
$addRequest
|
$addRequest
|
||||||
@ -347,6 +419,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function setPool($client, $name, $ip_address)
|
public static function setPool($client, $name, $ip_address)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request(
|
$printRequest = new RouterOS\Request(
|
||||||
'/ip pool print .proplist=.id',
|
'/ip pool print .proplist=.id',
|
||||||
RouterOS\Query::where('name', $name)
|
RouterOS\Query::where('name', $name)
|
||||||
@ -357,7 +433,7 @@ class Mikrotik
|
|||||||
self::addPool($client, $name, $ip_address);
|
self::addPool($client, $name, $ip_address);
|
||||||
} else {
|
} else {
|
||||||
$setRequest = new RouterOS\Request('/ip/pool/set');
|
$setRequest = new RouterOS\Request('/ip/pool/set');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$setRequest
|
$setRequest
|
||||||
->setArgument('numbers', $poolID)
|
->setArgument('numbers', $poolID)
|
||||||
->setArgument('ranges', $ip_address)
|
->setArgument('ranges', $ip_address)
|
||||||
@ -368,6 +444,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function addPpoePlan($client, $name, $pool, $rate)
|
public static function addPpoePlan($client, $name, $pool, $rate)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$addRequest = new RouterOS\Request('/ppp/profile/add');
|
$addRequest = new RouterOS\Request('/ppp/profile/add');
|
||||||
$client->sendSync(
|
$client->sendSync(
|
||||||
$addRequest
|
$addRequest
|
||||||
@ -380,6 +460,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function setPpoePlan($client, $name, $pool, $rate)
|
public static function setPpoePlan($client, $name, $pool, $rate)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request(
|
$printRequest = new RouterOS\Request(
|
||||||
'/ppp profile print .proplist=.id',
|
'/ppp profile print .proplist=.id',
|
||||||
RouterOS\Query::where('name', $name)
|
RouterOS\Query::where('name', $name)
|
||||||
@ -389,7 +473,7 @@ class Mikrotik
|
|||||||
self::addPpoePlan($client, $name, $pool, $rate);
|
self::addPpoePlan($client, $name, $pool, $rate);
|
||||||
} else {
|
} else {
|
||||||
$setRequest = new RouterOS\Request('/ppp/profile/set');
|
$setRequest = new RouterOS\Request('/ppp/profile/set');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$setRequest
|
$setRequest
|
||||||
->setArgument('numbers', $profileID)
|
->setArgument('numbers', $profileID)
|
||||||
->setArgument('local-address', $pool)
|
->setArgument('local-address', $pool)
|
||||||
@ -401,6 +485,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function removePpoePlan($client, $name)
|
public static function removePpoePlan($client, $name)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$printRequest = new RouterOS\Request(
|
$printRequest = new RouterOS\Request(
|
||||||
'/ppp profile print .proplist=.id',
|
'/ppp profile print .proplist=.id',
|
||||||
RouterOS\Query::where('name', $name)
|
RouterOS\Query::where('name', $name)
|
||||||
@ -408,9 +496,22 @@ class Mikrotik
|
|||||||
$profileID = $client->sendSync($printRequest)->getProperty('.id');
|
$profileID = $client->sendSync($printRequest)->getProperty('.id');
|
||||||
|
|
||||||
$removeRequest = new RouterOS\Request('/ppp/profile/remove');
|
$removeRequest = new RouterOS\Request('/ppp/profile/remove');
|
||||||
$client(
|
$client->sendSync(
|
||||||
$removeRequest
|
$removeRequest
|
||||||
->setArgument('numbers', $profileID)
|
->setArgument('numbers', $profileID)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function sendSMS($client, $to, $message)
|
||||||
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
$smsRequest = new RouterOS\Request('/tool sms send');
|
||||||
|
$smsRequest
|
||||||
|
->setArgument('phone-number', $to)
|
||||||
|
->setArgument('message', $message);
|
||||||
|
$client->sendSync($smsRequest);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ class Package
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$b = ORM::for_table('tbl_user_recharges')->where('customer_id', $id_customer)->find_one();
|
$b = ORM::for_table('tbl_user_recharges')->where('customer_id', $id_customer)->where('routers', $router_name)->find_one();
|
||||||
|
|
||||||
$mikrotik = Mikrotik::info($router_name);
|
$mikrotik = Mikrotik::info($router_name);
|
||||||
if ($p['validity_unit'] == 'Months') {
|
if ($p['validity_unit'] == 'Months') {
|
||||||
@ -321,23 +321,64 @@ class Package
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function changeTo($username, $plan_id)
|
public static function changeTo($username, $plan_id, $from_id)
|
||||||
{
|
{
|
||||||
global $_c;
|
|
||||||
$c = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
$c = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||||
$p = ORM::for_table('tbl_plans')->where('id', $plan_id)->where('enabled', '1')->find_one();
|
$p = ORM::for_table('tbl_plans')->where('id', $plan_id)->where('enabled', '1')->find_one();
|
||||||
$b = ORM::for_table('tbl_user_recharges')->where('customer_id', $c['id'])->find_one();
|
$b = ORM::for_table('tbl_user_recharges')->find_one($from_id);
|
||||||
|
if($p['routers'] == $b['routers'] && $b['routers'] != 'radius'){
|
||||||
$mikrotik = Mikrotik::info($p['routers']);
|
$mikrotik = Mikrotik::info($p['routers']);
|
||||||
|
}else{
|
||||||
|
$mikrotik = Mikrotik::info($b['routers']);
|
||||||
|
}
|
||||||
|
// delete first
|
||||||
|
if ($p['type'] == 'Hotspot') {
|
||||||
|
if ($b) {
|
||||||
|
if (!$p['is_radius']) {
|
||||||
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
|
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||||
|
Mikrotik::removePpoeUser($client, $c['username']);
|
||||||
|
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||||
|
Mikrotik::removePpoeActive($client, $c['username']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!$p['is_radius']) {
|
||||||
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
|
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||||
|
Mikrotik::removePpoeUser($client, $c['username']);
|
||||||
|
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||||
|
Mikrotik::removePpoeActive($client, $c['username']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($b) {
|
||||||
|
if (!$p['is_radius']) {
|
||||||
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
|
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||||
|
Mikrotik::removePpoeUser($client, $c['username']);
|
||||||
|
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||||
|
Mikrotik::removePpoeActive($client, $c['username']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!$p['is_radius']) {
|
||||||
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
|
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||||
|
Mikrotik::removePpoeUser($client, $c['username']);
|
||||||
|
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
||||||
|
Mikrotik::removePpoeActive($client, $c['username']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// call the next mikrotik
|
||||||
|
if($p['routers'] != $b['routers'] && $p['routers'] != 'radius'){
|
||||||
|
$mikrotik = Mikrotik::info($p['routers']);
|
||||||
|
}
|
||||||
if ($p['type'] == 'Hotspot') {
|
if ($p['type'] == 'Hotspot') {
|
||||||
if ($b) {
|
if ($b) {
|
||||||
if ($p['is_radius']) {
|
if ($p['is_radius']) {
|
||||||
Radius::customerAddPlan($c, $p, $b['expiration'].''.$b['time']);
|
Radius::customerAddPlan($c, $p, $b['expiration'].''.$b['time']);
|
||||||
}else{
|
}else{
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
|
||||||
Mikrotik::removePpoeUser($client, $c['username']);
|
|
||||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
|
||||||
Mikrotik::removePpoeActive($client, $c['username']);
|
|
||||||
Mikrotik::addHotspotUser($client, $p, $c);
|
Mikrotik::addHotspotUser($client, $p, $c);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -345,10 +386,6 @@ class Package
|
|||||||
Radius::customerAddPlan($c, $p, $b['expiration'].''.$b['time']);
|
Radius::customerAddPlan($c, $p, $b['expiration'].''.$b['time']);
|
||||||
}else{
|
}else{
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
|
||||||
Mikrotik::removePpoeUser($client, $c['username']);
|
|
||||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
|
||||||
Mikrotik::removePpoeActive($client, $c['username']);
|
|
||||||
Mikrotik::addHotspotUser($client, $p, $c);
|
Mikrotik::addHotspotUser($client, $p, $c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -358,10 +395,6 @@ class Package
|
|||||||
Radius::customerAddPlan($c, $p);
|
Radius::customerAddPlan($c, $p);
|
||||||
}else{
|
}else{
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
|
||||||
Mikrotik::removePpoeUser($client, $c['username']);
|
|
||||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
|
||||||
Mikrotik::removePpoeActive($client, $c['username']);
|
|
||||||
Mikrotik::addPpoeUser($client, $p, $c);
|
Mikrotik::addPpoeUser($client, $p, $c);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -369,10 +402,6 @@ class Package
|
|||||||
Radius::customerAddPlan($c, $p);
|
Radius::customerAddPlan($c, $p);
|
||||||
}else{
|
}else{
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
|
||||||
Mikrotik::removePpoeUser($client, $c['username']);
|
|
||||||
Mikrotik::removeHotspotActiveUser($client, $c['username']);
|
|
||||||
Mikrotik::removePpoeActive($client, $c['username']);
|
|
||||||
Mikrotik::addPpoeUser($client, $p, $c);
|
Mikrotik::addPpoeUser($client, $p, $c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -297,6 +297,10 @@ class Radius
|
|||||||
|
|
||||||
public static function disconnectCustomer($username)
|
public static function disconnectCustomer($username)
|
||||||
{
|
{
|
||||||
|
global $_app_stage;
|
||||||
|
if ($_app_stage == 'demo') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$nas = Radius::getTableNas()->findMany();
|
$nas = Radius::getTableNas()->findMany();
|
||||||
$count = count($nas) * 15;
|
$count = count($nas) * 15;
|
||||||
set_time_limit($count);
|
set_time_limit($count);
|
||||||
|
@ -22,7 +22,7 @@ class User
|
|||||||
public static function _billing()
|
public static function _billing()
|
||||||
{
|
{
|
||||||
$id = $_SESSION['uid'];
|
$id = $_SESSION['uid'];
|
||||||
$d = ORM::for_table('tbl_user_recharges')->where('customer_id', $id)->find_one();
|
$d = ORM::for_table('tbl_user_recharges')->where('customer_id', $id)->find_many();
|
||||||
return $d;
|
return $d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,11 @@ try {
|
|||||||
$ui->setConfigDir(File::pathFixer('ui/conf/'));
|
$ui->setConfigDir(File::pathFixer('ui/conf/'));
|
||||||
$ui->setCacheDir(File::pathFixer('ui/cache/'));
|
$ui->setCacheDir(File::pathFixer('ui/cache/'));
|
||||||
$ui->assign("error_title", "PHPNuxBill Crash");
|
$ui->assign("error_title", "PHPNuxBill Crash");
|
||||||
|
if (isset($_SESSION['uid'])) {
|
||||||
|
$ui->assign("error_message", $e->getMessage() . '<br>');
|
||||||
|
}else{
|
||||||
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||||
|
}
|
||||||
$ui->display('router-error.tpl');
|
$ui->display('router-error.tpl');
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
@ -219,13 +223,7 @@ function _admin($login = true)
|
|||||||
|
|
||||||
function _log($description, $type = '', $userid = '0')
|
function _log($description, $type = '', $userid = '0')
|
||||||
{
|
{
|
||||||
$d = ORM::for_table('tbl_logs')->create();
|
Log::put($type, $description, $userid);
|
||||||
$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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Lang($key)
|
function Lang($key)
|
||||||
@ -341,8 +339,11 @@ try {
|
|||||||
r2(U . 'dashboard', 'e', 'not found');
|
r2(U . 'dashboard', 'e', 'not found');
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$ui->assign("error_title", "PHPNuxBill Crash");
|
if (!isset($_SESSION['aid']) || empty($_SESSION['aid'])) {
|
||||||
|
r2(U . 'home' , 'e', $e->getMessage());
|
||||||
|
}
|
||||||
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
$ui->assign("error_message", $e->getMessage() . '<br><pre>' . $e->getTraceAsString() . '</pre>');
|
||||||
|
$ui->assign("error_title", "PHPNuxBill Crash");
|
||||||
$ui->display('router-error.tpl');
|
$ui->display('router-error.tpl');
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ switch ($action) {
|
|||||||
if (empty($s)) {
|
if (empty($s)) {
|
||||||
$c = ORM::for_table('tbl_customers')->limit(30)->find_many();
|
$c = ORM::for_table('tbl_customers')->limit(30)->find_many();
|
||||||
} else {
|
} else {
|
||||||
$c = ORM::for_table('tbl_customers')->where_raw("(`username` LIKE '%$s%' OR `fullname` LIKE '%$s%' OR `phonenumber` LIKE '%$s%' OR `email` LIKE '%$s%')", [$s, $s, $s, $s])->limit(30)->find_many();
|
$c = ORM::for_table('tbl_customers')->where_raw("(`username` LIKE '%$s%' OR `fullname` LIKE '%$s%' OR `phonenumber` LIKE '%$s%' OR `email` LIKE '%$s%')")->limit(30)->find_many();
|
||||||
}
|
}
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
foreach ($c as $cust) {
|
foreach ($c as $cust) {
|
||||||
|
@ -12,18 +12,18 @@ _auth();
|
|||||||
|
|
||||||
$action = $routes['1'];
|
$action = $routes['1'];
|
||||||
$user = User::_info();
|
$user = User::_info();
|
||||||
$bill = User::_billing();
|
|
||||||
|
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'isLogin':
|
case 'isLogin':
|
||||||
|
$bill = ORM::for_table('tbl_user_recharges')->where('id', $routes['2'])->where('username', $user['username'])->findOne();
|
||||||
if ($bill['type'] == 'Hotspot' && $bill['status'] == 'on') {
|
if ($bill['type'] == 'Hotspot' && $bill['status'] == 'on') {
|
||||||
$m = Mikrotik::info($bill['routers']);
|
$m = Mikrotik::info($bill['routers']);
|
||||||
$client = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
$client = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
||||||
if (Mikrotik::isUserLogin($client, $user['username'])) {
|
if (Mikrotik::isUserLogin($client, $user['username'])) {
|
||||||
die('<a href="' . U . 'home&mikrotik=logout" onclick="return confirm(\''.Lang::T('Disconnect Internet?').'\')" class="btn btn-success btn-xs btn-block">'.Lang::T('You are Online, Logout?').'</a>');
|
die('<a href="' . U . 'home&mikrotik=logout&id='.$bill['id'].'" onclick="return confirm(\''.Lang::T('Disconnect Internet?').'\')" class="btn btn-success btn-xs btn-block">'.Lang::T('You are Online, Logout?').'</a>');
|
||||||
} else {
|
} else {
|
||||||
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
|
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
|
||||||
die('<a href="' . U . 'home&mikrotik=login" onclick="return confirm(\''.Lang::T('Connect to Internet?').'\')" class="btn btn-danger btn-xs btn-block">'.Lang::T('Not Online, Login now?').'</a>');
|
die('<a href="' . U . 'home&mikrotik=login&id='.$bill['id'].'" onclick="return confirm(\''.Lang::T('Connect to Internet?').'\')" class="btn btn-danger btn-xs btn-block">'.Lang::T('Not Online, Login now?').'</a>');
|
||||||
}else{
|
}else{
|
||||||
die(Lang::T('Your account not connected to internet'));
|
die(Lang::T('Your account not connected to internet'));
|
||||||
}
|
}
|
||||||
|
@ -32,10 +32,11 @@ switch ($action) {
|
|||||||
'service_type' => '%' . $search . '%'
|
'service_type' => '%' . $search . '%'
|
||||||
], $search);
|
], $search);
|
||||||
$d = ORM::for_table('tbl_customers')
|
$d = ORM::for_table('tbl_customers')
|
||||||
->where_raw("(`username` LIKE '%$search%' OR `fullname` LIKE '%$search%' OR `phonenumber` LIKE '%$search%' OR `email` LIKE '%$search%')", [$search, $search, $search, $search])
|
->where_raw("(`username` LIKE '%$search%' OR `fullname` LIKE '%$search%' OR `phonenumber` LIKE '%$search%' OR `email` LIKE '%$search%')")
|
||||||
->offset($paginator['startpoint'])
|
->offset($paginator['startpoint'])
|
||||||
->limit($paginator['limit'])
|
->limit($paginator['limit'])
|
||||||
->order_by_desc('id')->find_many();
|
->order_by_asc('username')
|
||||||
|
->find_many();
|
||||||
} else {
|
} else {
|
||||||
$paginator = Paginator::build(ORM::for_table('tbl_customers'));
|
$paginator = Paginator::build(ORM::for_table('tbl_customers'));
|
||||||
$d = ORM::for_table('tbl_customers')
|
$d = ORM::for_table('tbl_customers')
|
||||||
|
@ -57,7 +57,7 @@ $expire = ORM::for_table('tbl_user_recharges')
|
|||||||
->where_lte('expiration', $mdate)
|
->where_lte('expiration', $mdate)
|
||||||
->offset($paginator['startpoint'])
|
->offset($paginator['startpoint'])
|
||||||
->limit($paginator['limit'])
|
->limit($paginator['limit'])
|
||||||
->order_by_desc('id')
|
->order_by_desc('expiration')
|
||||||
->find_many();
|
->find_many();
|
||||||
|
|
||||||
// Get the total count of expired records for pagination
|
// Get the total count of expired records for pagination
|
||||||
@ -67,7 +67,6 @@ $totalCount = ORM::for_table('tbl_user_recharges')
|
|||||||
|
|
||||||
// Pass the total count and current page to the paginator
|
// Pass the total count and current page to the paginator
|
||||||
$paginator['total_count'] = $totalCount;
|
$paginator['total_count'] = $totalCount;
|
||||||
$paginator['current_page'] = $paginator['current_page'];
|
|
||||||
|
|
||||||
// Assign the pagination HTML to the template variable
|
// Assign the pagination HTML to the template variable
|
||||||
$ui->assign('paginator', $paginator);
|
$ui->assign('paginator', $paginator);
|
||||||
|
@ -84,15 +84,15 @@ if (_post('send') == 'balance') {
|
|||||||
if ($router) {
|
if ($router) {
|
||||||
r2(U . "order/send/$router[id]/$active[plan_id]&u=" . trim(_post('username')), 's', Lang::T('Review package before recharge'));
|
r2(U . "order/send/$router[id]/$active[plan_id]&u=" . trim(_post('username')), 's', Lang::T('Review package before recharge'));
|
||||||
} else {
|
} else {
|
||||||
r2(U . 'package/order', 'w', Lang::T('Your friend do not have active package'));
|
r2(U . 'home', 'w', Lang::T('Your friend do not have active package'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Client Page
|
$ui->assign('_bills', User::_billing());
|
||||||
$bill = User::_billing();
|
|
||||||
$ui->assign('_bill', $bill);
|
|
||||||
|
|
||||||
if(isset($_GET['recharge']) && $_GET['recharge'] == 1){
|
if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
||||||
|
$bill = ORM::for_table('tbl_user_recharges')->where('id', $_GET['recharge'])->where('username', $user['username'])->findOne();
|
||||||
|
if ($bill) {
|
||||||
$router = ORM::for_table('tbl_routers')->where('name', $bill['routers'])->find_one();
|
$router = ORM::for_table('tbl_routers')->where('name', $bill['routers'])->find_one();
|
||||||
if ($config['enable_balance'] == 'yes') {
|
if ($config['enable_balance'] == 'yes') {
|
||||||
$plan = ORM::for_table('tbl_plans')->find_one($bill['plan_id']);
|
$plan = ORM::for_table('tbl_plans')->find_one($bill['plan_id']);
|
||||||
@ -104,7 +104,9 @@ if(isset($_GET['recharge']) && $_GET['recharge'] == 1){
|
|||||||
} else {
|
} else {
|
||||||
r2(U . "order/buy/$router[id]/$bill[plan_id]", 'e', 'Order Plan');
|
r2(U . "order/buy/$router[id]/$bill[plan_id]", 'e', 'Order Plan');
|
||||||
}
|
}
|
||||||
}else if(isset($_GET['deactivate']) && $_GET['deactivate'] == 1){
|
}
|
||||||
|
} else if (isset($_GET['deactivate']) && !empty($_GET['deactivate'])) {
|
||||||
|
$bill = ORM::for_table('tbl_user_recharges')->where('id', $_GET['deactivate'])->where('username', $user['username'])->findOne();
|
||||||
if ($bill) {
|
if ($bill) {
|
||||||
$p = ORM::for_table('tbl_plans')->where('id', $bill['plan_id'])->find_one();
|
$p = ORM::for_table('tbl_plans')->where('id', $bill['plan_id'])->find_one();
|
||||||
if ($p['is_radius']) {
|
if ($p['is_radius']) {
|
||||||
@ -139,6 +141,7 @@ if(isset($_GET['recharge']) && $_GET['recharge'] == 1){
|
|||||||
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
|
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
|
||||||
$ui->assign('nux_mac', $_SESSION['nux-mac']);
|
$ui->assign('nux_mac', $_SESSION['nux-mac']);
|
||||||
$ui->assign('nux_ip', $_SESSION['nux-ip']);
|
$ui->assign('nux_ip', $_SESSION['nux-ip']);
|
||||||
|
$bill = ORM::for_table('tbl_user_recharges')->where('id', $_GET['id'])->where('username', $user['username'])->findOne();
|
||||||
if ($_GET['mikrotik'] == 'login') {
|
if ($_GET['mikrotik'] == 'login') {
|
||||||
$m = Mikrotik::info($bill['routers']);
|
$m = Mikrotik::info($bill['routers']);
|
||||||
$c = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
$c = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
||||||
|
@ -42,8 +42,117 @@ switch ($do) {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'activation':
|
||||||
|
$voucher = _post('voucher');
|
||||||
|
$username = _post('username');
|
||||||
|
$v1 = ORM::for_table('tbl_voucher')->where('code', $voucher)->find_one();
|
||||||
|
if ($v1) {
|
||||||
|
// 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();
|
||||||
|
$d->username = alphanumeric($username, "+_.");
|
||||||
|
$d->password = $voucher;
|
||||||
|
$d->fullname = '';
|
||||||
|
$d->address = '';
|
||||||
|
$d->email = '';
|
||||||
|
$d->phonenumber = (strlen($username) < 21) ? $username : '';
|
||||||
|
if ($d->save()) {
|
||||||
|
$user = ORM::for_table('tbl_customers')->where('username', $username)->find_one($d->id());
|
||||||
|
if (!$user) {
|
||||||
|
r2(U . 'login', 'e', Lang::T('Voucher activation failed'));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
r2(U . 'login', 'e', Lang::T('Voucher activation failed') . '.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($v1['status'] == 0) {
|
||||||
|
$oldPass = $user['password'];
|
||||||
|
// change customer password to voucher code
|
||||||
|
$user->password = $voucher;
|
||||||
|
$user->save();
|
||||||
|
// voucher activation
|
||||||
|
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "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 {
|
||||||
|
$m = Mikrotik::info($v1['routers']);
|
||||||
|
$c = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
||||||
|
Mikrotik::logMeIn($c, $user['username'], $user['password'], $_SESSION['nux-ip'], $_SESSION['nux-mac']);
|
||||||
|
if (!empty($config['voucher_redirect'])) {
|
||||||
|
r2($config['voucher_redirect'], 's', Lang::T("Voucher activation success, you are connected to internet"));
|
||||||
|
} else {
|
||||||
|
r2(U . "login", 's', Lang::T("Voucher activation success, you are connected to internet"));
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
if (!empty($config['voucher_redirect'])) {
|
||||||
|
r2($config['voucher_redirect'], 's', Lang::T("Voucher activation success, now you can login"));
|
||||||
|
} else {
|
||||||
|
r2(U . "login", 's', Lang::T("Voucher activation success, now you can login"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!empty($config['voucher_redirect'])) {
|
||||||
|
r2($config['voucher_redirect'], 's', Lang::T("Voucher activation success, now you can login"));
|
||||||
|
} else {
|
||||||
|
r2(U . "login", 's', Lang::T("Voucher activation success, now you can login"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// if failed to recharge, restore old password
|
||||||
|
$user->password = $oldPass;
|
||||||
|
$user->save();
|
||||||
|
r2(U . 'login', 'e', Lang::T("Failed to activate voucher"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// used voucher
|
||||||
|
// check if voucher used by this username
|
||||||
|
if ($v1['user'] == $user['username']) {
|
||||||
|
$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']);
|
||||||
|
$c = Mikrotik::getClient($m['ip_address'], $m['username'], $m['password']);
|
||||||
|
Mikrotik::logMeIn($c, $user['username'], $user['password'], $_SESSION['nux-ip'], $_SESSION['nux-mac']);
|
||||||
|
if (!empty($config['voucher_redirect'])) {
|
||||||
|
r2($config['voucher_redirect'], 's', Lang::T("Voucher activation success, you are connected to internet"));
|
||||||
|
} else {
|
||||||
|
r2(U . "login", 's', Lang::T("Voucher activation success, now you can login"));
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
if (!empty($config['voucher_redirect'])) {
|
||||||
|
r2($config['voucher_redirect'], 's', Lang::T("Voucher activation success, now you can login"));
|
||||||
|
} else {
|
||||||
|
r2(U . "login", 's', Lang::T("Voucher activation success, now you can login"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!empty($config['voucher_redirect'])) {
|
||||||
|
r2($config['voucher_redirect'], 's', Lang::T("Voucher activation success, you are connected to internet"));
|
||||||
|
} else {
|
||||||
|
r2(U . "login", 's', Lang::T("Voucher activation success, now you can login"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// voucher used by other customer
|
||||||
|
r2(U . 'login', 'e', $_L['Voucher_Not_Valid']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_msglog('e', $_L['Invalid_Username_or_Password']);
|
||||||
|
r2(U . 'login');
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
run_hook('customer_view_login'); #HOOK
|
run_hook('customer_view_login'); #HOOK
|
||||||
|
if ($config['disable_registration'] == 'yes') {
|
||||||
|
$ui->display('user-login-noreg.tpl');
|
||||||
|
} else {
|
||||||
$ui->display('user-login.tpl');
|
$ui->display('user-login.tpl');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ switch ($action) {
|
|||||||
$d = ORM::for_table('tbl_user_recharges')->find_one($id);
|
$d = ORM::for_table('tbl_user_recharges')->find_one($id);
|
||||||
if ($d) {
|
if ($d) {
|
||||||
$ui->assign('d', $d);
|
$ui->assign('d', $d);
|
||||||
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->find_many();
|
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->where_not_equal('type', 'Balance')->find_many();
|
||||||
$ui->assign('p', $p);
|
$ui->assign('p', $p);
|
||||||
run_hook('view_edit_customer_plan'); #HOOK
|
run_hook('view_edit_customer_plan'); #HOOK
|
||||||
$ui->display('prepaid-edit.tpl');
|
$ui->display('prepaid-edit.tpl');
|
||||||
@ -219,7 +219,11 @@ switch ($action) {
|
|||||||
} else {
|
} else {
|
||||||
$msg .= $_L['Data_Not_Found'] . '<br>';
|
$msg .= $_L['Data_Not_Found'] . '<br>';
|
||||||
}
|
}
|
||||||
|
$p = ORM::for_table('tbl_plans')->where('id', $id_plan)->where('enabled', '1')->find_one();
|
||||||
|
if ($d) {
|
||||||
|
} else {
|
||||||
|
$msg .= ' Plan Not Found<br>';
|
||||||
|
}
|
||||||
if ($msg == '') {
|
if ($msg == '') {
|
||||||
run_hook('edit_customer_plan'); #HOOK
|
run_hook('edit_customer_plan'); #HOOK
|
||||||
$d->username = $username;
|
$d->username = $username;
|
||||||
@ -227,8 +231,13 @@ switch ($action) {
|
|||||||
//$d->recharged_on = $recharged_on;
|
//$d->recharged_on = $recharged_on;
|
||||||
$d->expiration = $expiration;
|
$d->expiration = $expiration;
|
||||||
$d->time = $time;
|
$d->time = $time;
|
||||||
|
if($p['is_radius']){
|
||||||
|
$d->routers = 'radius';
|
||||||
|
}else{
|
||||||
|
$d->routers = $p['routers'];
|
||||||
|
}
|
||||||
$d->save();
|
$d->save();
|
||||||
Package::changeTo($username, $id_plan);
|
Package::changeTo($username, $id_plan, $id);
|
||||||
_log('[' . $admin['username'] . ']: ' . 'Edit Plan for Customer ' . $d['username'] . ' to [' . $d['plan_name'] . '][' . Lang::moneyFormat($d['price']) . ']', 'Admin', $admin['id']);
|
_log('[' . $admin['username'] . ']: ' . 'Edit Plan for Customer ' . $d['username'] . ' to [' . $d['plan_name'] . '][' . Lang::moneyFormat($d['price']) . ']', 'Admin', $admin['id']);
|
||||||
r2(U . 'prepaid/list', 's', $_L['Updated_Successfully']);
|
r2(U . 'prepaid/list', 's', $_L['Updated_Successfully']);
|
||||||
} else {
|
} else {
|
||||||
@ -238,7 +247,7 @@ switch ($action) {
|
|||||||
|
|
||||||
case 'voucher':
|
case 'voucher':
|
||||||
$ui->assign('xfooter', '<script type="text/javascript" src="ui/lib/c/voucher.js"></script>');
|
$ui->assign('xfooter', '<script type="text/javascript" src="ui/lib/c/voucher.js"></script>');
|
||||||
|
$ui->assign('_title', $_L['Prepaid_Vouchers']);
|
||||||
$code = _post('code');
|
$code = _post('code');
|
||||||
if ($code != '') {
|
if ($code != '') {
|
||||||
$ui->assign('code', $code);
|
$ui->assign('code', $code);
|
||||||
@ -265,7 +274,7 @@ switch ($action) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'add-voucher':
|
case 'add-voucher':
|
||||||
|
$ui->assign('_title', $_L['Add_Voucher']);
|
||||||
$c = ORM::for_table('tbl_customers')->find_many();
|
$c = ORM::for_table('tbl_customers')->find_many();
|
||||||
$ui->assign('c', $c);
|
$ui->assign('c', $c);
|
||||||
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->find_many();
|
$p = ORM::for_table('tbl_plans')->where('enabled', '1')->find_many();
|
||||||
@ -276,6 +285,18 @@ switch ($action) {
|
|||||||
$ui->display('voucher-add.tpl');
|
$ui->display('voucher-add.tpl');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'remove-voucher':
|
||||||
|
$d = ORM::for_table('tbl_voucher')->where_equal('status', '1')->findMany();
|
||||||
|
if ($d) {
|
||||||
|
$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':
|
case 'print-voucher':
|
||||||
$from_id = _post('from_id');
|
$from_id = _post('from_id');
|
||||||
$planid = _post('planid');
|
$planid = _post('planid');
|
||||||
@ -378,6 +399,8 @@ switch ($action) {
|
|||||||
case 'voucher-post':
|
case 'voucher-post':
|
||||||
$type = _post('type');
|
$type = _post('type');
|
||||||
$plan = _post('plan');
|
$plan = _post('plan');
|
||||||
|
$voucher_format = _post('voucher_format');
|
||||||
|
$prefix = _post('prefix');
|
||||||
$server = _post('server');
|
$server = _post('server');
|
||||||
$numbervoucher = _post('numbervoucher');
|
$numbervoucher = _post('numbervoucher');
|
||||||
$lengthcode = _post('lengthcode');
|
$lengthcode = _post('lengthcode');
|
||||||
@ -393,19 +416,31 @@ switch ($action) {
|
|||||||
$msg .= 'The Length Code must be a number' . '<br>';
|
$msg .= 'The Length Code must be a number' . '<br>';
|
||||||
}
|
}
|
||||||
if ($msg == '') {
|
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
|
run_hook('create_voucher'); #HOOK
|
||||||
for ($i = 0; $i < $numbervoucher; $i++) {
|
for ($i = 0; $i < $numbervoucher; $i++) {
|
||||||
$code = strtoupper(substr(md5(time() . rand(10000, 99999)), 0, $lengthcode));
|
$code = strtoupper(substr(md5(time() . rand(10000, 99999)), 0, $lengthcode));
|
||||||
if ($config['voucher_format'] == 'low') {
|
if ($voucher_format == 'low') {
|
||||||
$code = strtolower($code);
|
$code = strtolower($code);
|
||||||
} else if ($config['voucher_format'] == 'rand') {
|
} else if ($voucher_format == 'rand') {
|
||||||
$code = Lang::randomUpLowCase($code);
|
$code = Lang::randomUpLowCase($code);
|
||||||
}
|
}
|
||||||
$d = ORM::for_table('tbl_voucher')->create();
|
$d = ORM::for_table('tbl_voucher')->create();
|
||||||
$d->type = $type;
|
$d->type = $type;
|
||||||
$d->routers = $server;
|
$d->routers = $server;
|
||||||
$d->id_plan = $plan;
|
$d->id_plan = $plan;
|
||||||
$d->code = $code;
|
$d->code = $prefix.$code;
|
||||||
$d->user = '0';
|
$d->user = '0';
|
||||||
$d->status = '0';
|
$d->status = '0';
|
||||||
$d->save();
|
$d->save();
|
||||||
@ -442,7 +477,7 @@ switch ($action) {
|
|||||||
|
|
||||||
run_hook('refill_customer'); #HOOK
|
run_hook('refill_customer'); #HOOK
|
||||||
if ($v1) {
|
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->status = "1";
|
||||||
$v1->user = $user['username'];
|
$v1->user = $user['username'];
|
||||||
$v1->save();
|
$v1->save();
|
||||||
|
@ -38,10 +38,16 @@ switch ($action) {
|
|||||||
$themes[] = $file;
|
$themes[] = $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$r = ORM::for_table('tbl_routers')->find_many();
|
||||||
|
$ui->assign('r', $r);
|
||||||
|
if (function_exists("shell_exec")) {
|
||||||
$php = trim(shell_exec('which php'));
|
$php = trim(shell_exec('which php'));
|
||||||
if (empty($php)) {
|
if (empty($php)) {
|
||||||
$php = 'php';
|
$php = 'php';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$php = 'php';
|
||||||
|
}
|
||||||
$ui->assign('php', $php);
|
$ui->assign('php', $php);
|
||||||
$ui->assign('dir', str_replace('controllers', '', __DIR__));
|
$ui->assign('dir', str_replace('controllers', '', __DIR__));
|
||||||
$ui->assign('themes', $themes);
|
$ui->assign('themes', $themes);
|
||||||
@ -237,27 +243,7 @@ switch ($action) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'app-post':
|
case 'app-post':
|
||||||
$company = _post('company');
|
$company = _post('CompanyName');
|
||||||
$footer = _post('footer');
|
|
||||||
$enable_balance = _post('enable_balance');
|
|
||||||
$allow_balance_transfer = _post('allow_balance_transfer');
|
|
||||||
$disable_voucher = _post('disable_voucher');
|
|
||||||
$telegram_bot = _post('telegram_bot');
|
|
||||||
$telegram_target_id = _post('telegram_target_id');
|
|
||||||
$sms_url = _post('sms_url');
|
|
||||||
$wa_url = _post('wa_url');
|
|
||||||
$minimum_transfer = _post('minimum_transfer');
|
|
||||||
$user_notification_expired = _post('user_notification_expired');
|
|
||||||
$user_notification_reminder = _post('user_notification_reminder');
|
|
||||||
$user_notification_payment = _post('user_notification_payment');
|
|
||||||
$address = _post('address');
|
|
||||||
$tawkto = _post('tawkto');
|
|
||||||
$http_proxy = _post('http_proxy');
|
|
||||||
$http_proxyauth = _post('http_proxyauth');
|
|
||||||
$radius_enable = _post('radius_enable');
|
|
||||||
$radius_client = _post('radius_client');
|
|
||||||
$theme = _post('theme');
|
|
||||||
$voucher_format = _post('voucher_format');
|
|
||||||
run_hook('save_settings'); #HOOK
|
run_hook('save_settings'); #HOOK
|
||||||
|
|
||||||
|
|
||||||
@ -273,210 +259,9 @@ switch ($action) {
|
|||||||
if ($company == '') {
|
if ($company == '') {
|
||||||
r2(U . 'settings/app', 'e', $_L['All_field_is_required']);
|
r2(U . 'settings/app', 'e', $_L['All_field_is_required']);
|
||||||
} else {
|
} else {
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'CompanyName')->find_one();
|
|
||||||
$d->value = $company;
|
|
||||||
$d->save();
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'address')->find_one();
|
|
||||||
$d->value = $address;
|
|
||||||
$d->save();
|
|
||||||
|
|
||||||
$phone = _post('phone');
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'phone')->find_one();
|
|
||||||
$d->value = $phone;
|
|
||||||
$d->save();
|
|
||||||
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'http_proxy')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $http_proxy;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'http_proxy';
|
|
||||||
$d->value = $http_proxy;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'http_proxyauth')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $http_proxyauth;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'http_proxyauth';
|
|
||||||
$d->value = $http_proxyauth;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'theme')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $theme;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'theme';
|
|
||||||
$d->value = $theme;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'CompanyFooter')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $footer;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'CompanyFooter';
|
|
||||||
$d->value = $footer;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'voucher_format')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $voucher_format;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'voucher_format';
|
|
||||||
$d->value = $voucher_format;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'disable_voucher')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $disable_voucher;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'disable_voucher';
|
|
||||||
$d->value = $disable_voucher;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'enable_balance')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $enable_balance;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'enable_balance';
|
|
||||||
$d->value = $enable_balance;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'allow_balance_transfer')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $allow_balance_transfer;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'allow_balance_transfer';
|
|
||||||
$d->value = $allow_balance_transfer;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'minimum_transfer')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $minimum_transfer;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'minimum_transfer';
|
|
||||||
$d->value = $minimum_transfer;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'telegram_bot')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $telegram_bot;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'telegram_bot';
|
|
||||||
$d->value = $telegram_bot;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'telegram_target_id')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $telegram_target_id;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'telegram_target_id';
|
|
||||||
$d->value = $telegram_target_id;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'sms_url')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $sms_url;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'sms_url';
|
|
||||||
$d->value = $sms_url;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'wa_url')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $wa_url;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'wa_url';
|
|
||||||
$d->value = $wa_url;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'user_notification_expired')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $user_notification_expired;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'user_notification_expired';
|
|
||||||
$d->value = $user_notification_expired;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'user_notification_reminder')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $user_notification_reminder;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'user_notification_reminder';
|
|
||||||
$d->value = $user_notification_reminder;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'user_notification_payment')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $user_notification_payment;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'user_notification_payment';
|
|
||||||
$d->value = $user_notification_payment;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'tawkto')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $tawkto;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'tawkto';
|
|
||||||
$d->value = $tawkto;
|
|
||||||
$d->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($radius_enable) {
|
if ($radius_enable) {
|
||||||
try {
|
try {
|
||||||
Radius::getTableNas()->find_one(1);
|
Radius::getTableNas()->find_many();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$ui->assign("error_title", "RADIUS Error");
|
$ui->assign("error_title", "RADIUS Error");
|
||||||
$ui->assign("error_message", "Radius table not found.<br><br>" .
|
$ui->assign("error_message", "Radius table not found.<br><br>" .
|
||||||
@ -486,34 +271,20 @@ switch ($action) {
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// save all settings
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'radius_enable')->find_one();
|
foreach($_POST as $key => $value) {
|
||||||
|
$d = ORM::for_table('tbl_appconfig')->where('setting', $key)->find_one();
|
||||||
if ($d) {
|
if ($d) {
|
||||||
$d->value = $radius_enable;
|
$d->value = $value;
|
||||||
$d->save();
|
$d->save();
|
||||||
} else {
|
} else {
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
$d = ORM::for_table('tbl_appconfig')->create();
|
||||||
$d->setting = 'radius_enable';
|
$d->setting = $key;
|
||||||
$d->value = $radius_enable;
|
$d->value = $value;
|
||||||
$d->save();
|
$d->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'radius_client')->find_one();
|
|
||||||
if ($d) {
|
|
||||||
$d->value = $radius_client;
|
|
||||||
$d->save();
|
|
||||||
} else {
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->create();
|
|
||||||
$d->setting = 'radius_client';
|
|
||||||
$d->value = $radius_client;
|
|
||||||
$d->save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$note = _post('note');
|
|
||||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'note')->find_one();
|
|
||||||
$d->value = $note;
|
|
||||||
$d->save();
|
|
||||||
|
|
||||||
_log('[' . $admin['username'] . ']: ' . $_L['Settings_Saved_Successfully'], 'Admin', $admin['id']);
|
_log('[' . $admin['username'] . ']: ' . $_L['Settings_Saved_Successfully'], 'Admin', $admin['id']);
|
||||||
|
|
||||||
r2(U . 'settings/app', 's', $_L['Settings_Saved_Successfully']);
|
r2(U . 'settings/app', 's', $_L['Settings_Saved_Successfully']);
|
||||||
|
@ -11,8 +11,6 @@ $action = $routes['1'];
|
|||||||
$user = User::_info();
|
$user = User::_info();
|
||||||
$ui->assign('_user', $user);
|
$ui->assign('_user', $user);
|
||||||
|
|
||||||
use PEAR2\Net\RouterOS;
|
|
||||||
|
|
||||||
require_once 'system/autoload/PEAR2/Autoload.php';
|
require_once 'system/autoload/PEAR2/Autoload.php';
|
||||||
|
|
||||||
switch ($action) {
|
switch ($action) {
|
||||||
@ -27,7 +25,7 @@ switch ($action) {
|
|||||||
$v1 = ORM::for_table('tbl_voucher')->where('code', $code)->where('status', 0)->find_one();
|
$v1 = ORM::for_table('tbl_voucher')->where('code', $code)->where('status', 0)->find_one();
|
||||||
run_hook('customer_activate_voucher'); #HOOK
|
run_hook('customer_activate_voucher'); #HOOK
|
||||||
if ($v1) {
|
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->status = "1";
|
||||||
$v1->user = $user['username'];
|
$v1->user = $user['username'];
|
||||||
$v1->save();
|
$v1->save();
|
||||||
|
@ -118,7 +118,7 @@ foreach ($d as $ds) {
|
|||||||
if (empty($p['pool_expired'])) {
|
if (empty($p['pool_expired'])) {
|
||||||
print_r(Radius::customerDeactivate($c['username']));
|
print_r(Radius::customerDeactivate($c['username']));
|
||||||
} else {
|
} else {
|
||||||
Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $plan['pool_expired'], ':=');
|
Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $p['pool_expired'], ':=');
|
||||||
print_r(Radius::disconnectCustomer($c['username']));
|
print_r(Radius::disconnectCustomer($c['username']));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -172,7 +172,7 @@ foreach ($d as $ds) {
|
|||||||
if (empty($p['pool_expired'])) {
|
if (empty($p['pool_expired'])) {
|
||||||
print_r(Radius::customerDeactivate($c['username']));
|
print_r(Radius::customerDeactivate($c['username']));
|
||||||
} else {
|
} else {
|
||||||
Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $plan['pool_expired'], ':=');
|
Radius::upsertCustomerAttr($c['username'], 'Framed-Pool', $p['pool_expired'], ':=');
|
||||||
print_r(Radius::disconnectCustomer($c['username']));
|
print_r(Radius::disconnectCustomer($c['username']));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -408,3 +408,14 @@ $_L['Change_title_in_user_Plan_order'] = 'Change title in user Plan order';
|
|||||||
$_L['Logs'] = 'Logs';
|
$_L['Logs'] = 'Logs';
|
||||||
$_L['Voucher_Format'] = 'Voucher Format';
|
$_L['Voucher_Format'] = 'Voucher Format';
|
||||||
$_L['Resend_To_Customer'] = 'Resend To Customer';
|
$_L['Resend_To_Customer'] = 'Resend To Customer';
|
||||||
|
$_L['Your_friend_do_not_have_active_package'] = 'Your friend do not have active package';
|
||||||
|
$_L['Service_Type'] = 'Service Type';
|
||||||
|
$_L['Others'] = 'Others';
|
||||||
|
$_L['PPPoE'] = 'PPPoE';
|
||||||
|
$_L['Hotspot'] = 'Hotspot';
|
||||||
|
$_L['Disable_Registration'] = 'Disable Registration';
|
||||||
|
$_L['Customer_just_Login_with_Phone_number_and_Voucher_Code_Voucher_will_be_password'] = 'Customer just Login with Phone number and Voucher Code, Voucher will be password';
|
||||||
|
$_L['Login__Activate_Voucher'] = 'Login / Activate Voucher';
|
||||||
|
$_L['After_Customer_activate_voucher_or_login_customer_will_be_redirected_to_this_url'] = 'After Customer activate voucher or login, customer will be redirected to this url';
|
||||||
|
$_L['Voucher_Prefix'] = 'Voucher Prefix';
|
||||||
|
$_L['Voucher_activation_success_now_you_can_login'] = 'Voucher activation success, now you can login';
|
||||||
|
@ -408,3 +408,7 @@ $_L['Change_title_in_user_Plan_order'] = 'Ubah judul dalam urutan paket pelangga
|
|||||||
$_L['Logs'] = 'Log';
|
$_L['Logs'] = 'Log';
|
||||||
$_L['Voucher_Format'] = 'Format Voucher';
|
$_L['Voucher_Format'] = 'Format Voucher';
|
||||||
$_L['Resend_To_Customer'] = 'Kirim Ulang Ke Pelanggan';
|
$_L['Resend_To_Customer'] = 'Kirim Ulang Ke Pelanggan';
|
||||||
|
$_L['Service_Type'] = 'Service Type';
|
||||||
|
$_L['Others'] = 'Lainnya';
|
||||||
|
$_L['PPPoE'] = 'PPPoE';
|
||||||
|
$_L['Hotspot'] = 'Hotspot';
|
@ -402,3 +402,7 @@ $_L['Sync'] = 'Sync';
|
|||||||
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
||||||
$_L['Location'] = 'Location';
|
$_L['Location'] = 'Location';
|
||||||
$_L['Voucher_Format'] = 'Voucher Format';
|
$_L['Voucher_Format'] = 'Voucher Format';
|
||||||
|
$_L['Service_Type'] = 'Service Type';
|
||||||
|
$_L['Others'] = 'Others';
|
||||||
|
$_L['PPPoE'] = 'PPPoE';
|
||||||
|
$_L['Hotspot'] = 'Hotspot';
|
@ -379,3 +379,7 @@ $_L['Sync'] = 'Sync';
|
|||||||
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
||||||
$_L['Location'] = 'Location';
|
$_L['Location'] = 'Location';
|
||||||
$_L['Voucher_Format'] = 'Voucher Format';
|
$_L['Voucher_Format'] = 'Voucher Format';
|
||||||
|
$_L['Service_Type'] = 'Service Type';
|
||||||
|
$_L['Others'] = 'Others';
|
||||||
|
$_L['PPPoE'] = 'PPPoE';
|
||||||
|
$_L['Hotspot'] = 'Hotspot';
|
@ -7,9 +7,8 @@
|
|||||||
<title>{$_title} - {$_L['Login']}</title>
|
<title>{$_title} - {$_L['Login']}</title>
|
||||||
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
||||||
|
|
||||||
<!-- Css/Less Stylesheets -->
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/styles/adminlte.min.css">
|
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@ -37,9 +36,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="ui/ui/scripts/jquery.min.js"></script>
|
|
||||||
<script src="ui/ui/scripts/bootstrap.min.js"></script>
|
|
||||||
<script src="ui/ui/scripts/adminlte.min.js"></script>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -15,7 +15,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{$_L['App_Name']}</label>
|
<label class="col-md-2 control-label">{$_L['App_Name']}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input type="text" required class="form-control" id="company" name="company"
|
<input type="text" required class="form-control" id="CompanyName" name="CompanyName"
|
||||||
value="{$_c['CompanyName']}">
|
value="{$_c['CompanyName']}">
|
||||||
</div>
|
</div>
|
||||||
<span class="help-block col-md-4">{$_L['App_Name_Help_Text']}</span>
|
<span class="help-block col-md-4">{$_L['App_Name_Help_Text']}</span>
|
||||||
@ -34,7 +34,7 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{Lang::T('Company Footer')}</label>
|
<label class="col-md-2 control-label">{Lang::T('Company Footer')}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input type="text" required class="form-control" id="footer" name="footer"
|
<input type="text" required class="form-control" id="CompanyFooter" name="CompanyFooter"
|
||||||
value="{$_c['CompanyFooter']}">
|
value="{$_c['CompanyFooter']}">
|
||||||
</div>
|
</div>
|
||||||
<span class="help-block col-md-4">{Lang::T('Will show below user pages')}</span>
|
<span class="help-block col-md-4">{Lang::T('Will show below user pages')}</span>
|
||||||
@ -113,6 +113,33 @@
|
|||||||
</div>
|
</div>
|
||||||
<p class="help-block col-md-4">UPPERCASE lowercase RaNdoM</p>
|
<p class="help-block col-md-4">UPPERCASE lowercase RaNdoM</p>
|
||||||
</div>
|
</div>
|
||||||
|
{if $_c['disable_voucher'] != 'yes'}
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">{Lang::T('Disable Registration')}</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select name="disable_registration" id="disable_registration" class="form-control">
|
||||||
|
<option value="no" {if $_c['disable_registration'] == 'no'}selected="selected" {/if}>No
|
||||||
|
</option>
|
||||||
|
<option value="yes" {if $_c['disable_registration'] == 'yes'}selected="selected" {/if}>
|
||||||
|
Yes
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<p class="help-block col-md-4">
|
||||||
|
{Lang::T('Customer just Login with Phone number and Voucher Code, Voucher will be password')}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">Redirect after Activation</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input type="text" class="form-control" id="voucher_redirect" name="voucher_redirect"
|
||||||
|
placeholder="https://192.168.88.1/status" value="{$voucher_redirect}">
|
||||||
|
</div>
|
||||||
|
<p class="help-block col-md-4">
|
||||||
|
{Lang::T('After Customer activate voucher or login, customer will be redirected to this url')}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<div class="btn-group pull-right">
|
<div class="btn-group pull-right">
|
||||||
@ -198,7 +225,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">Telegram Target ID</label>
|
<label class="col-md-2 control-label">Telegram User/Channel/Group ID</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input type="text" class="form-control" id="telegram_target_id" name="telegram_target_id"
|
<input type="text" class="form-control" id="telegram_target_id" name="telegram_target_id"
|
||||||
value="{$_c['telegram_target_id']}" placeholder="12345678">
|
value="{$_c['telegram_target_id']}" placeholder="12345678">
|
||||||
@ -225,6 +252,22 @@
|
|||||||
replaced.
|
replaced.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">Or use Mikrotik SMS</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select class="form-control"
|
||||||
|
onchange="document.getElementById('sms_url').value = this.value">
|
||||||
|
<option value="">Select Router</option>
|
||||||
|
{foreach $r as $rs}
|
||||||
|
<option value="{$rs['name']}" {if $rs['name']==$_c['sms_url']}selected{/if}>
|
||||||
|
{$rs['name']}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<p class="help-block col-md-4">Must include <b>[text]</b> & <b>[number]</b>, it will be
|
||||||
|
replaced.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<small id="emailHelp" class="form-text text-muted">You can use WhatsApp in here too. <a
|
<small id="emailHelp" class="form-text text-muted">You can use WhatsApp in here too. <a
|
||||||
href="https://wa.nux.my.id/login" target="_blank">Free Server</a></small>
|
href="https://wa.nux.my.id/login" target="_blank">Free Server</a></small>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
{include file="sections/header.tpl"}
|
{include file="sections/header.tpl"}
|
||||||
|
|
||||||
|
<center><a href="https://s.id/standwithpalestine" target="_blank"><img src="https://raw.githubusercontent.com/Safouene1/support-palestine-banner/master/banner-support.svg" class="img-responsive"></a></center>
|
||||||
|
<br><br>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<div class="box box-hovered mb20 box-primary">
|
<div class="box box-hovered mb20 box-primary">
|
||||||
|
@ -150,7 +150,9 @@
|
|||||||
$.getJSON("./version.json?" + Math.random(), function(data) {
|
$.getJSON("./version.json?" + Math.random(), function(data) {
|
||||||
var localVersion = data.version;
|
var localVersion = data.version;
|
||||||
$('#version').html('Version: ' + localVersion);
|
$('#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(),
|
.random(),
|
||||||
function(data) {
|
function(data) {
|
||||||
var latestVersion = data.version;
|
var latestVersion = data.version;
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<td>{Lang::dateTimeFormat($ds['date'])}</td>
|
<td>{Lang::dateTimeFormat($ds['date'])}</td>
|
||||||
<td>{$ds['type']}</td>
|
<td>{$ds['type']}</td>
|
||||||
<td>{$ds['ip']}</td>
|
<td>{$ds['ip']}</td>
|
||||||
<td style="overflow-x: scroll;">{$ds['description']}</td>
|
<td style="overflow-x: scroll;">{nl2br($ds['description'])}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<select id="id_plan" name="id_plan" class="form-control select2">
|
<select id="id_plan" name="id_plan" class="form-control select2">
|
||||||
{foreach $p as $ps}
|
{foreach $p as $ps}
|
||||||
<option value="{$ps['id']}" {if $d['plan_id'] eq $ps['id']} selected {/if}>
|
<option value="{$ps['id']}" {if $d['plan_id'] eq $ps['id']} selected {/if}>
|
||||||
{$ps['name_plan']}</option>
|
{if $ps['is_radius']=='1'}Radius{else}{$ps['routers']}{/if} - {$ps['name_plan']}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/styles/adminlte.min.css">
|
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -7,25 +7,13 @@
|
|||||||
<title>{$_title} - {$_L['Register']}</title>
|
<title>{$_title} - {$_L['Register']}</title>
|
||||||
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
||||||
|
|
||||||
<!-- Icons -->
|
|
||||||
<link rel="stylesheet" href="ui/ui/fonts/ionicons/css/ionicons.min.css">
|
|
||||||
<link rel="stylesheet" href="ui/ui/fonts/font-awesome/css/font-awesome.min.css">
|
|
||||||
|
|
||||||
<!-- Plugins -->
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/plugins/waves.css">
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/plugins/perfect-scrollbar.css">
|
|
||||||
|
|
||||||
<!-- Css/Less Stylesheets -->
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/styles/main.min.css">
|
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||||
|
|
||||||
<!-- Match Media polyfill for IE9 -->
|
|
||||||
<!--[if IE 9]> <script src="ui/ui/scripts/ie/matchMedia.js"></script> <![endif]-->
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body id="app" class="app off-canvas body-full">
|
<body id="app" class="app off-canvas body-full">
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="hidden-xs" style="height:150px"></div>
|
<div class="hidden-xs" style="height:150px"></div>
|
||||||
<div class="form-head mb20">
|
<div class="form-head mb20">
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/styles/adminlte.min.css">
|
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<link rel="stylesheet" href="ui/ui/fonts/font-awesome/css/font-awesome.min.css">
|
<link rel="stylesheet" href="ui/ui/fonts/font-awesome/css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/fonts/MaterialDesign/css/materialdesignicons.min.css">
|
<link rel="stylesheet" href="ui/ui/fonts/MaterialDesign/css/materialdesignicons.min.css">
|
||||||
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/adminlte.min.css">
|
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/styles/skin-blue.min.css">
|
|
||||||
<style>
|
<style>
|
||||||
::-moz-selection {
|
::-moz-selection {
|
||||||
/* Code for Firefox */
|
/* Code for Firefox */
|
||||||
|
@ -12,9 +12,7 @@
|
|||||||
<link rel="stylesheet" href="ui/ui/fonts/ionicons/css/ionicons.min.css">
|
<link rel="stylesheet" href="ui/ui/fonts/ionicons/css/ionicons.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/fonts/font-awesome/css/font-awesome.min.css">
|
<link rel="stylesheet" href="ui/ui/fonts/font-awesome/css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/fonts/MaterialDesign/css/materialdesignicons.min.css">
|
<link rel="stylesheet" href="ui/ui/fonts/MaterialDesign/css/materialdesignicons.min.css">
|
||||||
|
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/styles/adminlte.min.css">
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/skin-blue.min.css">
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/select2.min.css" />
|
<link rel="stylesheet" href="ui/ui/styles/select2.min.css" />
|
||||||
<link rel="stylesheet" href="ui/ui/styles/select2-bootstrap.min.css" />
|
<link rel="stylesheet" href="ui/ui/styles/select2-bootstrap.min.css" />
|
||||||
<style>
|
<style>
|
||||||
@ -40,7 +38,7 @@
|
|||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="hold-transition skin-blue sidebar-mini">
|
<body class="hold-transition modern-skin-dark sidebar-mini">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
|
|
||||||
<header class="main-header">
|
<header class="main-header">
|
||||||
|
@ -12,9 +12,8 @@
|
|||||||
<link rel="stylesheet" href="ui/ui/fonts/ionicons/css/ionicons.min.css">
|
<link rel="stylesheet" href="ui/ui/fonts/ionicons/css/ionicons.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/fonts/font-awesome/css/font-awesome.min.css">
|
<link rel="stylesheet" href="ui/ui/fonts/font-awesome/css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/fonts/MaterialDesign/css/materialdesignicons.min.css">
|
<link rel="stylesheet" href="ui/ui/fonts/MaterialDesign/css/materialdesignicons.min.css">
|
||||||
|
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||||
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/adminlte.min.css">
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/skin-blue.min.css">
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
::-moz-selection {
|
::-moz-selection {
|
||||||
@ -45,7 +44,7 @@
|
|||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="hold-transition skin-blue sidebar-mini">
|
<body class="hold-transition modern-skin-dark sidebar-mini">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<header class="main-header" style="position:fixed; width: 100%">
|
<header class="main-header" style="position:fixed; width: 100%">
|
||||||
<a href="{$_url}home" class="logo">
|
<a href="{$_url}home" class="logo">
|
||||||
@ -77,8 +76,8 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
{$_user['fullname']}
|
{$_user['fullname']}
|
||||||
<small>{$_user['phonenumber']}</small><br>
|
<small>{$_user['phonenumber']}<br>
|
||||||
<small>{$_user['email']}</small>
|
{$_user['email']}</small>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li class="user-body">
|
<li class="user-body">
|
||||||
|
BIN
ui/ui/styles/img/user-panel.jpg
Normal file
BIN
ui/ui/styles/img/user-panel.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 286 KiB |
11
ui/ui/styles/modern-AdminLTE.min.css
vendored
Normal file
11
ui/ui/styles/modern-AdminLTE.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
ui/ui/styles/modern-AdminLTE.min.css.map
Normal file
1
ui/ui/styles/modern-AdminLTE.min.css.map
Normal file
File diff suppressed because one or more lines are too long
85
ui/ui/user-login-noreg.tpl
Normal file
85
ui/ui/user-login-noreg.tpl
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
|
<title>{$_title} - {$_L['Login']}</title>
|
||||||
|
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<div class="hidden-xs" style="height:150px"></div>
|
||||||
|
<div class="form-head mb20">
|
||||||
|
<h1 class="site-logo h2 mb5 mt5 text-center text-uppercase text-bold"
|
||||||
|
style="text-shadow: 2px 2px 4px #757575;">{$_c['CompanyName']}</h1>
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
{if isset($notify)}
|
||||||
|
<div class="alert alert-{if $notify_t == 's'}success{else}danger{/if}">
|
||||||
|
<button type="button" class="close" data-dismiss="alert">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<div>{$notify}</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="panel panel-info">
|
||||||
|
<div class="panel-heading">{$_L['Announcement']}</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
{include file="$_path/../pages/Announcement.html"}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<div class="panel panel-primary">
|
||||||
|
<div class="panel-heading">{Lang::T('Login / Activate Voucher')}</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<form action="{$_url}login/activation" method="post">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>{$_L['Phone_Number']}</label>
|
||||||
|
<div class="input-group">
|
||||||
|
{if $_c['country_code_phone']!= ''}
|
||||||
|
<span class="input-group-addon" id="basic-addon1">+</span>
|
||||||
|
{else}
|
||||||
|
<span class="input-group-addon" id="basic-addon1"><i
|
||||||
|
class="glyphicon glyphicon-phone-alt"></i></span>
|
||||||
|
{/if}
|
||||||
|
<input type="text" class="form-control" name="username" required
|
||||||
|
placeholder="08xxxxxxx">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>{$_L['Enter_Voucher_Code']}</label>
|
||||||
|
<input type="text" class="form-control" name="voucher" required autocomplete="off"
|
||||||
|
placeholder="{$_L['Code_Voucher']}">
|
||||||
|
</div>
|
||||||
|
<div class="btn-group btn-group-justified mb15">
|
||||||
|
<div class="btn-group">
|
||||||
|
<button type="submit"
|
||||||
|
class="btn btn-primary">{Lang::T('Login / Activate Voucher')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<center>
|
||||||
|
<a href="./pages/Privacy_Policy.html" target="_blank">Privacy</a>
|
||||||
|
•
|
||||||
|
<a href="./pages/Terms_of_Conditions.html" target="_blank">ToC</a>
|
||||||
|
</center>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="ui/ui/scripts/vendors.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -8,7 +8,8 @@
|
|||||||
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/styles/adminlte.min.css">
|
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -31,21 +31,41 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{$_L['Number_of_Vouchers']}</label>
|
<label class="col-md-2 control-label">{$_L['Number_of_Vouchers']}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input type="text" class="form-control" name="numbervoucher" value="1">
|
<input type="text" class="form-control" name="numbervoucher" value="1">
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{$_L['Length_Code']}</label>
|
<label class="col-md-2 control-label">{$_L['Length_Code']}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input type="text" class="form-control" name="lengthcode" value="12">
|
<input type="text" class="form-control" name="lengthcode" value="12">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-lg-offset-2 col-lg-10">
|
<div class="col-lg-offset-2 col-lg-10">
|
||||||
<button class="btn btn-success waves-effect waves-light"
|
<button class="btn btn-success waves-effect waves-light"
|
||||||
|
@ -3,7 +3,13 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="panel panel-hovered mb20 panel-primary">
|
<div class="panel panel-hovered mb20 panel-primary">
|
||||||
<div class="panel-heading">{$_L['Prepaid_Vouchers']}</div>
|
<div class="panel-heading">
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
<a class="btn btn-danger btn-xs" title="Remove used Voucher" href="{$_url}prepaid/remove-voucher" onclick="return confirm('Delete all used voucher code?')"><span
|
||||||
|
class="glyphicon glyphicon-trash" aria-hidden="true"></span> Delete All</a>
|
||||||
|
</div>
|
||||||
|
{$_L['Prepaid_Vouchers']}
|
||||||
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
@ -184,8 +184,8 @@ function deleteFolder($path)
|
|||||||
<link rel="stylesheet" href="ui/ui/fonts/font-awesome/css/font-awesome.min.css">
|
<link rel="stylesheet" href="ui/ui/fonts/font-awesome/css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/fonts/MaterialDesign/css/materialdesignicons.min.css">
|
<link rel="stylesheet" href="ui/ui/fonts/MaterialDesign/css/materialdesignicons.min.css">
|
||||||
|
|
||||||
<link rel="stylesheet" href="ui/ui/styles/adminlte.min.css">
|
<link rel="stylesheet" href="ui/ui/styles/modern-AdminLTE.min.css">
|
||||||
<link rel="stylesheet" href="ui/ui/styles/skin-blue.min.css">
|
|
||||||
<?php if ($continue) { ?>
|
<?php if ($continue) { ?>
|
||||||
<meta http-equiv="refresh" content="3; ./update.php?step=<?= $step ?>">
|
<meta http-equiv="refresh" content="3; ./update.php?step=<?= $step ?>">
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version": "2023.10.27"
|
"version": "2024.1.9"
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user