Compare commits
12 Commits
2023.10.17
...
2023.10.20
Author | SHA1 | Date | |
---|---|---|---|
9402da311c | |||
51ab4a35c5 | |||
d037b2bef4 | |||
d95e4d1d84 | |||
7ebf95f4be | |||
8cbe32e313 | |||
0d27503e8d | |||
1ae687bda2 | |||
d59f696fde | |||
b9537d4a4b | |||
e88d1f02a6 | |||
eda7967f66 |
@ -2,6 +2,12 @@
|
||||
|
||||
# CHANGELOG
|
||||
|
||||
## 2023.10.20
|
||||
|
||||
- View Invoice
|
||||
- Resend Invoice
|
||||
- Custom Voucher
|
||||
|
||||
## 2023.10.17
|
||||
|
||||
- Happy Birthday To Me 🎂 \(^o^)/
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Feature
|
||||
|
||||
- Voucher Generator and Print
|
||||
|
@ -1,31 +1,27 @@
|
||||
|
||||
<center><strong style="font-size:38px">{$_c['CompanyName']}</strong></center>
|
||||
<table width="100%" border="1" cellspacing="0" cellpadding="4" bordercolor="#757575">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" align="left">Pendaftaran dan Informasi Billing buka <b>billing.ibnux.net</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" align="left">Wireless Hotspot:
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2">
|
||||
<table border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td>iBNuXnet</td>
|
||||
<td>iBNuXnet-P</td>
|
||||
<td>iBNuXnet-Q</td>
|
||||
<td valign="middle">
|
||||
<center><strong style="font-size:38px">[[company_name]]</strong></center>
|
||||
<table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolor="#757575">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="4" width="1">[[qrcode]]
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CitraGadingBlokP 3/4</td>
|
||||
<td>CitraGadingBlokQ 2/3/4/5/6</td>
|
||||
<td>iBNuXnet 5Ghz</td>
|
||||
<td valign="middle" align="center" style="font-size:25px">
|
||||
[[price]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:20px">
|
||||
[[voucher_code]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:15px">
|
||||
[[plan]]</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" align="left">Voucher yang sudah dibeli tidak dapat dikembalikan</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" align="center"><b>hotspot.ibnux.net</b></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</tr>
|
||||
</table>
|
@ -86,4 +86,17 @@ class Lang
|
||||
{
|
||||
return ucwords(str_replace('_', ' ', $text));
|
||||
}
|
||||
|
||||
public static function randomUpLowCase($text){
|
||||
$jml = strlen($text);
|
||||
$result = '';
|
||||
for($i = 0; $i < $jml;$i++){
|
||||
if(rand(0,99)%2){
|
||||
$result .= strtolower(substr($text,$i,1));
|
||||
}else{
|
||||
$result .= substr($text,$i,1);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
@ -75,4 +75,30 @@ class Message
|
||||
}
|
||||
return "$via: $msg";
|
||||
}
|
||||
|
||||
public static function sendInvoice($cust, $trx){
|
||||
global $config;
|
||||
$textInvoice = Lang::getNotifText('invoice_paid');
|
||||
$textInvoice = str_replace('[[company_name]]', $config['CompanyName'], $textInvoice);
|
||||
$textInvoice = str_replace('[[address]]', $config['address'], $textInvoice);
|
||||
$textInvoice = str_replace('[[phone]]', $config['phone'], $textInvoice);
|
||||
$textInvoice = str_replace('[[invoice]]', $trx['invoice'], $textInvoice);
|
||||
$textInvoice = str_replace('[[date]]', Lang::dateAndTimeFormat($trx['recharged_on'], $trx['recharged_time']), $textInvoice);
|
||||
$textInvoice = str_replace('[[payment_gateway]]', $config['gateway'], $textInvoice);
|
||||
$textInvoice = str_replace('[[payment_channel]]', $config['channel'], $textInvoice);
|
||||
$textInvoice = str_replace('[[type]]', $trx['type'], $textInvoice);
|
||||
$textInvoice = str_replace('[[plan_name]]', $trx['plan_name'], $textInvoice);
|
||||
$textInvoice = str_replace('[[plan_price]]', Lang::moneyFormat($trx['price']), $textInvoice);
|
||||
$textInvoice = str_replace('[[name]]', $cust['fullname'], $textInvoice);
|
||||
$textInvoice = str_replace('[[user_name]]', $trx['username'], $textInvoice);
|
||||
$textInvoice = str_replace('[[user_password]]', $cust['password'], $textInvoice);
|
||||
$textInvoice = str_replace('[[expired_date]]', Lang::dateAndTimeFormat($trx['expiration'], $trx['time']), $textInvoice);
|
||||
$textInvoice = str_replace('[[footer]]', $config['note'], $textInvoice);
|
||||
|
||||
if ($config['user_notification_payment'] == 'sms') {
|
||||
Message::sendSMS($cust['phonenumber'], $textInvoice);
|
||||
} else if ($config['user_notification_payment'] == 'wa') {
|
||||
Message::sendWhatsapp($cust['phonenumber'], $textInvoice);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -317,29 +317,7 @@ class Package
|
||||
}
|
||||
|
||||
$in = ORM::for_table('tbl_transactions')->where('username', $c['username'])->order_by_desc('id')->find_one();
|
||||
|
||||
$textInvoice = Lang::getNotifText('invoice_paid');
|
||||
$textInvoice = str_replace('[[company_name]]', $_c['CompanyName'], $textInvoice);
|
||||
$textInvoice = str_replace('[[address]]', $_c['address'], $textInvoice);
|
||||
$textInvoice = str_replace('[[phone]]', $_c['phone'], $textInvoice);
|
||||
$textInvoice = str_replace('[[invoice]]', $in['invoice'], $textInvoice);
|
||||
$textInvoice = str_replace('[[date]]', Lang::dateTimeFormat($date_now), $textInvoice);
|
||||
$textInvoice = str_replace('[[payment_gateway]]', $_c['gateway'], $textInvoice);
|
||||
$textInvoice = str_replace('[[payment_channel]]', $_c['channel'], $textInvoice);
|
||||
$textInvoice = str_replace('[[type]]', $in['type'], $textInvoice);
|
||||
$textInvoice = str_replace('[[plan_name]]', $in['plan_name'], $textInvoice);
|
||||
$textInvoice = str_replace('[[plan_price]]', Lang::moneyFormat($in['price']), $textInvoice);
|
||||
$textInvoice = str_replace('[[name]]', $c['fullname'], $textInvoice);
|
||||
$textInvoice = str_replace('[[user_name]]', $in['username'], $textInvoice);
|
||||
$textInvoice = str_replace('[[user_password]]', $c['password'], $textInvoice);
|
||||
$textInvoice = str_replace('[[expired_date]]', Lang::dateAndTimeFormat($in['expiration'], $in['time']), $textInvoice);
|
||||
$textInvoice = str_replace('[[footer]]', $_c['note'], $textInvoice);
|
||||
|
||||
if ($_c['user_notification_payment'] == 'sms') {
|
||||
Message::sendSMS($c['phonenumber'], $textInvoice);
|
||||
} else if ($_c['user_notification_payment'] == 'wa') {
|
||||
Message::sendWhatsapp($c['phonenumber'], $textInvoice);
|
||||
}
|
||||
Message::sendInvoice($c, $in);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,88 @@
|
||||
|
||||
class Paginator
|
||||
{
|
||||
public static function build($table, $colVal = [], $query='', $per_page = '10')
|
||||
{
|
||||
global $routes;
|
||||
global $_L;
|
||||
$url = U . implode('/', $routes);
|
||||
$query = urlencode($query);
|
||||
$adjacents = "2";
|
||||
$page = (int)(empty(_get('p')) ? 1 : _get('p'));
|
||||
$pagination = "";
|
||||
foreach($colVal as $k=>$v) {
|
||||
if(!empty($query)){
|
||||
$table = $table->where_like($k, $v);
|
||||
}else{
|
||||
$table = $table->where($k, $v);
|
||||
}
|
||||
}
|
||||
$totalReq = $table->count();
|
||||
$page = ($page == 0 ? 1 : $page);
|
||||
$next = $page + 1;
|
||||
$lastpage = ceil($totalReq / $per_page);
|
||||
$lpm1 = $lastpage - 1;
|
||||
$limit = $per_page;
|
||||
$startpoint = ($page * $limit) - $limit;
|
||||
if ($lastpage >= 1) {
|
||||
$pagination .= '<ul class="pagination pagination-sm">';
|
||||
if ($lastpage < 7 + ($adjacents * 2)) {
|
||||
for ($counter = 1; $counter <= $lastpage; $counter++) {
|
||||
if ($counter == $page)
|
||||
$pagination .= "<li class='active'><a href='javascript:void(0);'>$counter</a></li>";
|
||||
else
|
||||
$pagination .= "<li><a href='{$url}&p=$counter&q=$query'>$counter</a></li>";
|
||||
}
|
||||
} elseif ($lastpage > 5 + ($adjacents * 2)) {
|
||||
if ($page < 1 + ($adjacents * 2)) {
|
||||
for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++) {
|
||||
if ($counter == $page)
|
||||
$pagination .= "<li class='active'><a href='javascript:void(0);'>$counter</a></li>";
|
||||
else
|
||||
$pagination .= "<li><a href='{$url}&p=$counter&q=$query'>$counter</a></li>";
|
||||
}
|
||||
$pagination .= "<li class='disabled'><a href='#'>...</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=$lpm1&q=$query'>$lpm1</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=$lastpage&q=$query'>$lastpage</a></li>";
|
||||
} elseif ($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2)) {
|
||||
$pagination .= "<li><a href='{$url}&p=1&q=$query'>1</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=2&q=$query'>2</a></li>";
|
||||
$pagination .= "<li class='disabled'><a href='#'>...</a></li>";
|
||||
for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) {
|
||||
if ($counter == $page)
|
||||
$pagination .= "<li class='active'><a href='javascript:void(0);'>$counter</a></li>";
|
||||
else
|
||||
$pagination .= "<li><a href='{$url}&p=$counter&q=$query'>$counter</a></li>";
|
||||
}
|
||||
$pagination .= "<li class='disabled'><a href='#'>...</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=$lpm1&q=$query'>$lpm1</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=$lastpage&q=$query'>$lastpage</a></li>";
|
||||
} else {
|
||||
$pagination .= "<li><a href='{$url}&p=1&q=$query'>1</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=2&q=$query'>2</a></li>";
|
||||
$pagination .= "<li><a href='#'>...</a></li>";
|
||||
for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) {
|
||||
if ($counter == $page)
|
||||
$pagination .= "<li class='active'><a class='disabled'>$counter</a></li>";
|
||||
else
|
||||
$pagination .= "<li><a href='{$url}&p=$counter&q=$query'>$counter</a></li>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($page < $counter - 1) {
|
||||
$pagination .= "<li><a href='{$url}&p=$next&q=$query'>" . $_L['Next'] . "</a></li>";
|
||||
$pagination .= "<li><a href='{$url}&p=$lastpage&q=$query'>" . $_L['Last'] . "</a></li>";
|
||||
} else {
|
||||
$pagination .= "<li class='disabled'><a class='disabled'>" . $_L['Next'] . "</a></li>";
|
||||
$pagination .= "<li class='disabled'><a class='disabled'>" . $_L['Last'] . "</a></li>";
|
||||
}
|
||||
$pagination .= "</ul>";
|
||||
|
||||
return array("startpoint" => $startpoint, "limit" => $limit, "found" => $totalReq, "page" => $page, "lastpage" => $lastpage, "contents" => $pagination);
|
||||
}
|
||||
}
|
||||
|
||||
public static function bootstrap($table, $w1 = '', $c1 = '', $w2 = '', $c2 = '', $w3 = '', $c3 = '', $w4 = '', $c4 = '', $per_page = '10')
|
||||
{
|
||||
global $routes;
|
||||
@ -17,6 +99,19 @@ class Paginator
|
||||
$page = (int)(!isset($routes['2']) ? 1 : $routes['2']);
|
||||
$pagination = "";
|
||||
|
||||
if(is_object($table)){
|
||||
if ($w1 != '') {
|
||||
$totalReq = $table->where($w1, $c1)->count();
|
||||
} elseif ($w2 != '') {
|
||||
$totalReq = $table->where($w1, $c1)->where($w2, $c2)->count();
|
||||
} elseif ($w3 != '') {
|
||||
$totalReq = $table->where($w1, $c1)->where($w2, $c2)->where($w3, $c3)->count();
|
||||
} elseif ($w4 != '') {
|
||||
$totalReq = $table->where($w1, $c1)->where($w2, $c2)->where($w3, $c3)->where($w4, $c4)->count();
|
||||
} else {
|
||||
$totalReq = $table->count();
|
||||
}
|
||||
}else{
|
||||
if ($w1 != '') {
|
||||
$totalReq = ORM::for_table($table)->where($w1, $c1)->count();
|
||||
} elseif ($w2 != '') {
|
||||
@ -28,6 +123,7 @@ class Paginator
|
||||
} else {
|
||||
$totalReq = ORM::for_table($table)->count();
|
||||
}
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
$page = ($page == 0 ? 1 : $page);
|
||||
@ -109,12 +205,19 @@ class Paginator
|
||||
$adjacents = "2";
|
||||
$page = (int)(!isset($routes['2']) ? 1 : $routes['2']);
|
||||
$pagination = "";
|
||||
|
||||
if(is_object($table)){
|
||||
if ($w1 != '') {
|
||||
$totalReq = $table->where_raw($w1, $c1)->count();
|
||||
} else {
|
||||
$totalReq = $table->count();
|
||||
}
|
||||
}else{
|
||||
if ($w1 != '') {
|
||||
$totalReq = ORM::for_table($table)->where_raw($w1, $c1)->count();
|
||||
} else {
|
||||
$totalReq = ORM::for_table($table)->count();
|
||||
}
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
$page = ($page == 0 ? 1 : $page);
|
||||
|
@ -164,19 +164,8 @@ function _msglog($type, $msg)
|
||||
if (isset($_SESSION['notify'])) {
|
||||
$notify = $_SESSION['notify'];
|
||||
$ntype = $_SESSION['ntype'];
|
||||
if ($ntype == 's') {
|
||||
$ui->assign('notify', '<div class="alert alert-info">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>' . $notify . '</div></div>');
|
||||
} else {
|
||||
$ui->assign('notify', '<div class="alert alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>' . $notify . '</div></div>');
|
||||
}
|
||||
$ui->assign('notify', $notify);
|
||||
$ui->assign('notify_t', $ntype);
|
||||
unset($_SESSION['notify']);
|
||||
unset($_SESSION['ntype']);
|
||||
}
|
||||
|
@ -20,43 +20,42 @@ if ($admin['user_type'] != 'Admin') {
|
||||
|
||||
switch ($action) {
|
||||
case 'list':
|
||||
$name = _post('name');
|
||||
$q = (_post('q') ? _post('q') : _get('q'));
|
||||
$keep = _post('keep');
|
||||
if (!empty($keep)) {
|
||||
ORM::raw_execute("DELETE FROM tbl_logs WHERE date < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL $keep DAY))");
|
||||
r2(U . "logs/list/", 's', "Delete logs older than $keep days");
|
||||
}
|
||||
if ($name != '') {
|
||||
$paginator = Paginator::bootstrap('tbl_logs', 'description', '%' . $name . '%');
|
||||
$d = ORM::for_table('tbl_logs')->where_like('description', '%' . $name . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
if ($q != '') {
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_logs'), ['description' => '%' . $q . '%'], $q);
|
||||
$d = ORM::for_table('tbl_logs')->where_like('description', '%' . $q . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::bootstrap('tbl_logs');
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_logs'));
|
||||
$d = ORM::for_table('tbl_logs')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}
|
||||
|
||||
$ui->assign('name', $name);
|
||||
$ui->assign('d', $d);
|
||||
$ui->assign('q', $q);
|
||||
$ui->assign('paginator', $paginator);
|
||||
$ui->display('logs.tpl');
|
||||
break;
|
||||
case 'radius':
|
||||
$name = _post('name');
|
||||
$q = (_post('q') ? _post('q') : _get('q'));
|
||||
$keep = _post('keep');
|
||||
$page = (isset($routes['2']) ? intval($routes['2']) : 0);
|
||||
$pageNow = $page * 20;
|
||||
if (!empty($keep)) {
|
||||
ORM::raw_execute("DELETE FROM radpostauth WHERE UNIX_TIMESTAMP(authdate) < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL $keep DAY))", [], 'radius');
|
||||
r2(U . "logs/radius/", 's', "Delete logs older than $keep days");
|
||||
}
|
||||
if ($name != '') {
|
||||
$d = ORM::for_table('radpostauth', 'radius')->where_like('username', '%' . $name . '%')->offset($pageNow)->limit(10)->order_by_desc('id')->find_many();
|
||||
if ($q != '') {
|
||||
$paginator = Paginator::build(ORM::for_table('radpostauth', 'radius'), ['username' => '%' . $q . '%'], $q);
|
||||
$d = ORM::for_table('radpostauth', 'radius')->where_like('username', '%' . $q . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
} else {
|
||||
$d = ORM::for_table('radpostauth', 'radius')->offset($pageNow)->limit(10)->order_by_desc('id')->find_many();
|
||||
$paginator = Paginator::build(ORM::for_table('radpostauth', 'radius'));
|
||||
$d = ORM::for_table('radpostauth', 'radius')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}
|
||||
|
||||
$ui->assign('page', $page);
|
||||
$ui->assign('name', $name);
|
||||
$ui->assign('d', $d);
|
||||
$ui->assign('q', $q);
|
||||
$ui->assign('paginator', $paginator);
|
||||
$ui->display('logs-radius.tpl');
|
||||
break;
|
||||
|
@ -31,6 +31,16 @@ switch ($action) {
|
||||
run_hook('customer_view_order_history'); #HOOK
|
||||
$ui->display('user-orderHistory.tpl');
|
||||
break;
|
||||
case 'balance':
|
||||
if (strpos($user['email'], '@') === false) {
|
||||
r2(U . 'accounts/profile', 'e', Lang::T("Please enter your email address"));
|
||||
}
|
||||
$ui->assign('_title', 'Top Up');
|
||||
$ui->assign('_system_menu', 'balance');
|
||||
$plans_balance = ORM::for_table('tbl_plans')->where('enabled', '1')->where('type', 'Balance')->find_many();
|
||||
$ui->assign('plans_balance', $plans_balance);
|
||||
$ui->display('user-orderBalance.tpl');
|
||||
break;
|
||||
case 'package':
|
||||
if (strpos($user['email'], '@') === false) {
|
||||
r2(U . 'accounts/profile', 'e', Lang::T("Please enter your email address"));
|
||||
@ -58,13 +68,11 @@ switch ($action) {
|
||||
$plans_pppoe = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 0)->where('type', 'PPPOE')->find_many();
|
||||
$plans_hotspot = ORM::for_table('tbl_plans')->where('enabled', '1')->where('is_radius', 0)->where('type', 'Hotspot')->find_many();
|
||||
}
|
||||
$plans_balance = ORM::for_table('tbl_plans')->where('enabled', '1')->where('type', 'Balance')->find_many();
|
||||
$ui->assign('routers', $routers);
|
||||
$ui->assign('radius_pppoe', $radius_pppoe);
|
||||
$ui->assign('radius_hotspot', $radius_hotspot);
|
||||
$ui->assign('plans_pppoe', $plans_pppoe);
|
||||
$ui->assign('plans_hotspot', $plans_hotspot);
|
||||
$ui->assign('plans_balance', $plans_balance);
|
||||
run_hook('customer_view_order_plan'); #HOOK
|
||||
$ui->display('user-orderPlan.tpl');
|
||||
break;
|
||||
@ -73,7 +81,8 @@ switch ($action) {
|
||||
->where('username', $user['username'])
|
||||
->where('status', 1)
|
||||
->find_one();
|
||||
run_hook('customer_find_unpaid'); #HOOK
|
||||
run_hook('custome
|
||||
r_find_unpaid'); #HOOK
|
||||
if ($d) {
|
||||
if (empty($d['pg_url_payment'])) {
|
||||
r2(U . "order/buy/" . $trx['routers_id'] . '/' . $trx['plan_id'], 'w', Lang::T("Checking payment"));
|
||||
|
@ -12,7 +12,19 @@ $action = $routes['1'];
|
||||
$admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
if(strpos($action,"-post")===false){
|
||||
if(strpos($action,"-reset")!==false){
|
||||
$action = str_replace("-reset","",$action);
|
||||
$path = "pages/".str_replace(".","",$action).".html";
|
||||
$temp = "pages_template/".str_replace(".","",$action).".html";
|
||||
if(file_exists($temp)){
|
||||
if(!copy($temp, $path)){
|
||||
file_put_contents($path, Http::getData('https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/pages_template/'.$action.'.html'));
|
||||
}
|
||||
}else{
|
||||
file_put_contents($path, Http::getData('https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/pages_template/'.$action.'.html'));
|
||||
}
|
||||
r2(U . 'pages/'.$action);
|
||||
}else if(strpos($action,"-post")===false){
|
||||
$path = "pages/".str_replace(".","",$action).".html";
|
||||
//echo $path;
|
||||
run_hook('view_edit_pages'); #HOOK
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||
* by https://t.me/ibnux
|
||||
@ -49,9 +50,9 @@ switch ($action) {
|
||||
}
|
||||
$p = ORM::for_table('tbl_plans')->findOne($plan['plan_id']);
|
||||
$c = ORM::for_table('tbl_customers')->findOne($plan['customer_id']);
|
||||
if($plan['routers'] == 'radius'){
|
||||
Radius::customerAddPlan($c, $p, $plan['expiration'].' '.$plan['time']);
|
||||
}else{
|
||||
if ($plan['routers'] == 'radius') {
|
||||
Radius::customerAddPlan($c, $p, $plan['expiration'] . ' ' . $plan['time']);
|
||||
} else {
|
||||
if ($plan['type'] == 'Hotspot') {
|
||||
Mikrotik::addHotspotUser($client, $p, $c);
|
||||
} else if ($plan['type'] == 'PPPOE') {
|
||||
@ -136,12 +137,31 @@ switch ($action) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 'view':
|
||||
$id = $routes['2'];
|
||||
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
||||
$ui->assign('in', $d);
|
||||
|
||||
if(!empty($routes['3']) && $routes['3']=='send'){
|
||||
$c = ORM::for_table('tbl_customers')->where('username', $d['username'])->find_one();
|
||||
if($c){
|
||||
Message::sendInvoice($c, $d);
|
||||
r2(U . 'prepaid/view/'.$id, 's', "Success send to customer");
|
||||
}
|
||||
r2(U . 'prepaid/view/'.$id, 'd', "Customer not found");
|
||||
}
|
||||
$ui->assign('_title', 'View Invoice');
|
||||
$ui->assign('date', Lang::dateAndTimeFormat($d['recharged_on'],$d['recharged_time']));
|
||||
$ui->display('invoice.tpl');
|
||||
break;
|
||||
|
||||
|
||||
case 'print':
|
||||
$id = _post('id');
|
||||
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
||||
$ui->assign('d', $d);
|
||||
|
||||
$ui->assign('date', date("Y-m-d H:i:s"));
|
||||
$ui->assign('date', Lang::dateAndTimeFormat($d['recharged_on'],$d['recharged_time']));
|
||||
run_hook('print_invoice'); #HOOK
|
||||
$ui->display('invoice-print.tpl');
|
||||
break;
|
||||
@ -261,10 +281,16 @@ switch ($action) {
|
||||
$planid = _post('planid');
|
||||
$pagebreak = _post('pagebreak');
|
||||
$limit = _post('limit');
|
||||
|
||||
if ($pagebreak < 1) $pagebreak = 6;
|
||||
$vpl = _post('vpl');
|
||||
if(empty($vpl)){
|
||||
$vpl = 3;
|
||||
}
|
||||
if ($pagebreak < 1) $pagebreak = 12;
|
||||
|
||||
if ($limit < 1) $limit = $pagebreak * 2;
|
||||
if(empty($from_id)){
|
||||
$from_id = 0;
|
||||
}
|
||||
|
||||
if ($from_id > 0 && $planid > 0) {
|
||||
$v = ORM::for_table('tbl_plans')
|
||||
@ -315,9 +341,12 @@ switch ($action) {
|
||||
->where('tbl_voucher.status', '0')
|
||||
->count();
|
||||
}
|
||||
$template = file_get_contents("pages/Voucher.html");
|
||||
$template = str_replace('[[company_name]]', $config['CompanyName'], $template);
|
||||
|
||||
$ui->assign('_title', $_L['Voucher_Hotspot']);
|
||||
$ui->assign('from_id', $from_id);
|
||||
$ui->assign('vpl', $vpl);
|
||||
$ui->assign('pagebreak', $pagebreak);
|
||||
|
||||
$plans = ORM::for_table('tbl_plans')->find_many();
|
||||
@ -325,7 +354,20 @@ switch ($action) {
|
||||
$ui->assign('limit', $limit);
|
||||
$ui->assign('planid', $planid);
|
||||
|
||||
$ui->assign('v', $v);
|
||||
$voucher = [];
|
||||
$n = 1;
|
||||
foreach ($v as $vs) {
|
||||
$temp = $template;
|
||||
$temp = str_replace('[[qrcode]]', '<img src="qrcode/?data=' . $vs['code'] . '">', $temp);
|
||||
$temp = str_replace('[[price]]', Lang::moneyFormat($vs['price']), $temp);
|
||||
$temp = str_replace('[[voucher_code]]', $vs['code'], $temp);
|
||||
$temp = str_replace('[[plan]]', $vs['name_plan'], $temp);
|
||||
$temp = str_replace('[[counter]]', $n, $temp);
|
||||
$voucher[] = $temp;
|
||||
$n++;
|
||||
}
|
||||
|
||||
$ui->assign('voucher',$voucher);
|
||||
$ui->assign('vc', $vc);
|
||||
|
||||
//for counting pagebreak
|
||||
@ -354,7 +396,11 @@ switch ($action) {
|
||||
run_hook('create_voucher'); #HOOK
|
||||
for ($i = 0; $i < $numbervoucher; $i++) {
|
||||
$code = strtoupper(substr(md5(time() . rand(10000, 99999)), 0, $lengthcode));
|
||||
//TODO: IMPLEMENT Voucher Generator
|
||||
if ($config['voucher_format'] == 'low') {
|
||||
$code = strtolower($code);
|
||||
} else if ($config['voucher_format'] == 'rand') {
|
||||
$code = Lang::randomUpLowCase($code);
|
||||
}
|
||||
$d = ORM::for_table('tbl_voucher')->create();
|
||||
$d->type = $type;
|
||||
$d->routers = $server;
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://github.com/hotspotbilling/phpnuxbill/)
|
||||
* by https://t.me/ibnux
|
||||
@ -12,8 +13,8 @@ $action = $routes['1'];
|
||||
$admin = Admin::_info();
|
||||
$ui->assign('_admin', $admin);
|
||||
|
||||
if($admin['user_type'] != 'Admin' AND $admin['user_type'] != 'Sales'){
|
||||
r2(U."dashboard",'e',$_L['Do_Not_Access']);
|
||||
if ($admin['user_type'] != 'Admin' and $admin['user_type'] != 'Sales') {
|
||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||
}
|
||||
|
||||
$mdate = date('Y-m-d');
|
||||
@ -26,23 +27,43 @@ $month_n = date('n');
|
||||
|
||||
switch ($action) {
|
||||
case 'by-date':
|
||||
case 'daily-report':
|
||||
$paginator = Paginator::bootstrap('tbl_transactions','recharged_on',$mdate);
|
||||
$d = ORM::for_table('tbl_transactions')->where('recharged_on',$mdate)->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
$dr = ORM::for_table('tbl_transactions')->where('recharged_on',$mdate)->sum('price');
|
||||
case 'activation':
|
||||
$q = (_post('q') ? _post('q') : _get('q'));
|
||||
$keep = _post('keep');
|
||||
if (!empty($keep)) {
|
||||
ORM::raw_execute("DELETE FROM tbl_transactions WHERE date < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL $keep DAY))");
|
||||
r2(U . "logs/list/", 's', "Delete logs older than $keep days");
|
||||
}
|
||||
if ($q != '') {
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_transactions'), ['invoice' => '%' . $q . '%'], $q);
|
||||
$d = ORM::for_table('tbl_transactions')->where_like('invoice', '%' . $q . '%')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
} else {
|
||||
$paginator = Paginator::build(ORM::for_table('tbl_transactions'));
|
||||
$d = ORM::for_table('tbl_transactions')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}
|
||||
|
||||
$ui->assign('d',$d);
|
||||
$ui->assign('dr',$dr);
|
||||
$ui->assign('mdate',$mdate);
|
||||
$ui->assign('mtime',$mtime);
|
||||
$ui->assign('paginator',$paginator);
|
||||
$ui->assign('activation', $d);
|
||||
$ui->assign('q', $q);
|
||||
$ui->assign('paginator', $paginator);
|
||||
$ui->display('reports-activation.tpl');
|
||||
break;
|
||||
case 'daily-report':
|
||||
$paginator = Paginator::bootstrap('tbl_transactions', 'recharged_on', $mdate);
|
||||
$d = ORM::for_table('tbl_transactions')->where('recharged_on', $mdate)->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
$dr = ORM::for_table('tbl_transactions')->where('recharged_on', $mdate)->sum('price');
|
||||
|
||||
$ui->assign('d', $d);
|
||||
$ui->assign('dr', $dr);
|
||||
$ui->assign('mdate', $mdate);
|
||||
$ui->assign('mtime', $mtime);
|
||||
$ui->assign('paginator', $paginator);
|
||||
run_hook('view_daily_reports'); #HOOK
|
||||
$ui->display('reports-daily.tpl');
|
||||
break;
|
||||
|
||||
case 'by-period':
|
||||
$ui->assign('mdate',$mdate);
|
||||
$ui->assign('mtime',$mtime);
|
||||
$ui->assign('mdate', $mdate);
|
||||
$ui->assign('mtime', $mtime);
|
||||
$ui->assign('tdate', $tdate);
|
||||
run_hook('view_reports_by_period'); #HOOK
|
||||
$ui->display('reports-period.tpl');
|
||||
@ -54,7 +75,7 @@ switch ($action) {
|
||||
$stype = _post('stype');
|
||||
|
||||
$d = ORM::for_table('tbl_transactions');
|
||||
if ($stype != ''){
|
||||
if ($stype != '') {
|
||||
$d->where('type', $stype);
|
||||
}
|
||||
|
||||
@ -64,7 +85,7 @@ switch ($action) {
|
||||
$x = $d->find_many();
|
||||
|
||||
$dr = ORM::for_table('tbl_transactions');
|
||||
if ($stype != ''){
|
||||
if ($stype != '') {
|
||||
$dr->where('type', $stype);
|
||||
}
|
||||
|
||||
@ -72,11 +93,11 @@ switch ($action) {
|
||||
$dr->where_lte('recharged_on', $tdate);
|
||||
$xy = $dr->sum('price');
|
||||
|
||||
$ui->assign('d',$x);
|
||||
$ui->assign('dr',$xy);
|
||||
$ui->assign('fdate',$fdate);
|
||||
$ui->assign('tdate',$tdate);
|
||||
$ui->assign('stype',$stype);
|
||||
$ui->assign('d', $x);
|
||||
$ui->assign('dr', $xy);
|
||||
$ui->assign('fdate', $fdate);
|
||||
$ui->assign('tdate', $tdate);
|
||||
$ui->assign('stype', $stype);
|
||||
run_hook('view_reports_period'); #HOOK
|
||||
$ui->display('reports-period-view.tpl');
|
||||
break;
|
||||
|
@ -256,6 +256,7 @@ switch ($action) {
|
||||
$radius_enable = _post('radius_enable');
|
||||
$radius_client = _post('radius_client');
|
||||
$theme = _post('theme');
|
||||
$voucher_format = _post('voucher_format');
|
||||
run_hook('save_settings'); #HOOK
|
||||
|
||||
|
||||
@ -330,6 +331,16 @@ switch ($action) {
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'voucher_format')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $voucher_format;
|
||||
$d->save();
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'voucher_format';
|
||||
$d->value = $voucher_format;
|
||||
$d->save();
|
||||
}
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'disable_voucher')->find_one();
|
||||
if ($d) {
|
||||
$d->value = $disable_voucher;
|
||||
|
@ -355,7 +355,7 @@ $_L['Invoice_Balance_Message'] = 'Invoice Balance Message';
|
||||
$_L['Invoice_Notification_Payment'] = 'Invoice Notification Payment';
|
||||
$_L['Balance_Notification_Payment'] = 'Balance Notification Payment';
|
||||
$_L['Balance_Plans'] = 'Balance Plans';
|
||||
$_L['Buy_Balance'] = 'Buy Balance?';
|
||||
$_L['Buy_Balance'] = 'Buy Balance';
|
||||
$_L['Price'] = 'Price';
|
||||
$_L['Validity'] = 'Validity';
|
||||
$_L['Disable_auto_renewal'] = 'Disable auto renewal?';
|
||||
@ -406,3 +406,5 @@ $_L['Location'] = 'Location';
|
||||
$_L['Radius_Plans'] = 'Radius Plans';
|
||||
$_L['Change_title_in_user_Plan_order'] = 'Change title in user Plan order';
|
||||
$_L['Logs'] = 'Logs';
|
||||
$_L['Voucher_Format'] = 'Voucher Format';
|
||||
$_L['Resend_To_Customer'] = 'Resend To Customer';
|
||||
|
@ -355,7 +355,7 @@ $_L['User_Cannot_change_this_only_admin_if_it_Empty_it_will_use_user_password']
|
||||
$_L['Invoice_Balance_Message'] = 'Invoice Balance Message';
|
||||
$_L['Invoice_Notification_Payment'] = 'Invoice Notification Payment';
|
||||
$_L['Balance_Notification_Payment'] = 'Balance Notification Payment';
|
||||
$_L['Buy_Balance'] = 'Buy Balance?';
|
||||
$_L['Buy_Balance'] = 'Buy Balance';
|
||||
$_L['Price'] = 'Price';
|
||||
$_L['Validity'] = 'Validity';
|
||||
$_L['Disable_auto_renewal'] = 'Disable auto renewal?';
|
||||
@ -398,3 +398,4 @@ $_L['Deactivate'] = 'Deactivate';
|
||||
$_L['Sync'] = 'Sync';
|
||||
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
||||
$_L['Location'] = 'Location';
|
||||
$_L['Voucher_Format'] = 'Voucher Format';
|
@ -354,7 +354,7 @@ $_L['User_Cannot_change_this_only_admin_if_it_Empty_it_will_use_user_password']
|
||||
$_L['Invoice_Balance_Message'] = 'Invoice Balance Message';
|
||||
$_L['Invoice_Notification_Payment'] = 'Invoice Notification Payment';
|
||||
$_L['Balance_Notification_Payment'] = 'Balance Notification Payment';
|
||||
$_L['Buy_Balance'] = 'Buy Balance?';
|
||||
$_L['Buy_Balance'] = 'Buy Balance';
|
||||
$_L['Price'] = 'Price';
|
||||
$_L['Validity'] = 'Validity';
|
||||
$_L['Disable_auto_renewal'] = 'Disable auto renewal?';
|
||||
@ -401,3 +401,4 @@ $_L['Deactivate'] = 'Deactivate';
|
||||
$_L['Sync'] = 'Sync';
|
||||
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
||||
$_L['Location'] = 'Location';
|
||||
$_L['Voucher_Format'] = 'Voucher Format';
|
@ -330,7 +330,7 @@ $_L['Invoice_Balance_Message'] = 'Invoice Balance Message';
|
||||
$_L['Invoice_Notification_Payment'] = 'Invoice Notification Payment';
|
||||
$_L['Balance_Notification_Payment'] = 'Balance Notification Payment';
|
||||
$_L['Balance_Plans'] = 'Balance Plans';
|
||||
$_L['Buy_Balance'] = 'Buy Balance?';
|
||||
$_L['Buy_Balance'] = 'Buy Balance';
|
||||
$_L['Price'] = 'Price';
|
||||
$_L['Validity'] = 'Validity';
|
||||
$_L['Disable_auto_renewal'] = 'Disable auto renewal?';
|
||||
@ -378,3 +378,4 @@ $_L['Deactivate'] = 'Deactivate';
|
||||
$_L['Sync'] = 'Sync';
|
||||
$_L['Failed_to_create_PaymeTrust_transaction'] = 'Failed to create PaymeTrust transaction.';
|
||||
$_L['Location'] = 'Location';
|
||||
$_L['Voucher_Format'] = 'Voucher Format';
|
@ -57,14 +57,34 @@
|
||||
<label class="col-md-2 control-label">Theme</label>
|
||||
<div class="col-md-6">
|
||||
<select name="theme" id="theme" class="form-control">
|
||||
<option value="default" {if $_c['theme'] eq 'default'}selected="selected" {/if}>Default</option>
|
||||
<option value="default" {if $_c['theme'] eq 'default'}selected="selected" {/if}>Default
|
||||
</option>
|
||||
{foreach $themes as $theme}
|
||||
<option value="{$theme}" {if $_c['theme'] eq $theme}selected="selected" {/if}>{Lang::ucWords($theme)}</option>
|
||||
<option value="{$theme}" {if $_c['theme'] eq $theme}selected="selected" {/if}>
|
||||
{Lang::ucWords($theme)}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4"><a href="https://github.com/hotspotbilling/phpnuxbill/wiki/Themes" target="_blank">Theme info</a></p>
|
||||
<p class="help-block col-md-4"><a
|
||||
href="https://github.com/hotspotbilling/phpnuxbill/wiki/Themes" target="_blank">Theme
|
||||
info</a></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">APP URL</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" readonly class="form-control" value="{$app_url}">
|
||||
</div>
|
||||
<p class="help-block col-md-4">edit at config.php</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-primary btn-xs" title="save" type="submit"><span
|
||||
class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span></button>
|
||||
</div>
|
||||
Voucher
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Disable Voucher')}</label>
|
||||
<div class="col-md-6">
|
||||
@ -78,24 +98,44 @@
|
||||
<p class="help-block col-md-4">{Lang::T('Voucher activation menu will be hidden')}</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">APP URL</label>
|
||||
<label class="col-md-2 control-label">{Lang::T('Voucher Format')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" readonly class="form-control" value="{$app_url}">
|
||||
<select name="voucher_format" id="voucher_format" class="form-control">
|
||||
<option value="up" {if $_c['voucher_format'] == 'up'}selected="selected" {/if}>UPPERCASE
|
||||
</option>
|
||||
<option value="low" {if $_c['voucher_format'] == 'low'}selected="selected" {/if}>
|
||||
lowercase
|
||||
</option>
|
||||
<option value="rand" {if $_c['voucher_format'] == 'rand'}selected="selected" {/if}>
|
||||
RaNdoM
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4">edit at config.php</p>
|
||||
<p class="help-block col-md-4">UPPERCASE lowercase RaNdoM</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-primary btn-xs" title="save" type="submit"><span
|
||||
class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span></button>
|
||||
</div>
|
||||
FreeRadius
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label text-muted">Enable Radius</label>
|
||||
<label class="col-md-2 control-label">Enable Radius</label>
|
||||
<div class="col-md-6">
|
||||
<select name="radius_enable" id="radius_enable" class="form-control text-muted">
|
||||
<option value="0">No</option>
|
||||
<option value="1" {if $_c['radius_enable']}selected="selected" {/if}>Yes</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="help-block col-md-4"><a href="https://github.com/hotspotbilling/phpnuxbill/wiki/FreeRadius" target="_blank">Radius Instructions</a></p>
|
||||
<p class="help-block col-md-4"><a
|
||||
href="https://github.com/hotspotbilling/phpnuxbill/wiki/FreeRadius"
|
||||
target="_blank">Radius Instructions</a></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label text-muted">Radius Client</label>
|
||||
<label class="col-md-2 control-label">Radius Client</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" name="radius_client" value="{$_c['radius_client']}">
|
||||
</div>
|
||||
@ -152,8 +192,8 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Telegram Bot Token</label>
|
||||
<div class="col-md-6">
|
||||
<input type="password" class="form-control" id="telegram_bot" name="telegram_bot" onmouseleave="this.type = 'password'"
|
||||
onmouseenter="this.type = 'text'"
|
||||
<input type="password" class="form-control" id="telegram_bot" name="telegram_bot"
|
||||
onmouseleave="this.type = 'password'" onmouseenter="this.type = 'text'"
|
||||
value="{$_c['telegram_bot']}" placeholder="123456:asdasgdkuasghddlashdashldhalskdklasd">
|
||||
</div>
|
||||
</div>
|
||||
@ -316,9 +356,9 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Proxy Server Login')}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="password" class="form-control" id="http_proxyauth" name="http_proxyauth" autocomplete="off"
|
||||
value="{$_c['http_proxyauth']}" placeholder="username:password" onmouseleave="this.type = 'password'"
|
||||
onmouseenter="this.type = 'text'">
|
||||
<input type="password" class="form-control" id="http_proxyauth" name="http_proxyauth"
|
||||
autocomplete="off" value="{$_c['http_proxyauth']}" placeholder="username:password"
|
||||
onmouseleave="this.type = 'password'" onmouseenter="this.type = 'text'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -335,14 +375,14 @@
|
||||
add dst-host={$_domain}
|
||||
add dst-host=*.{$_domain}</pre>
|
||||
|
||||
<pre>
|
||||
<pre>
|
||||
# Expired Cronjob Every 5 Minutes
|
||||
*/5 * * * * cd {$dir} && {$php} cron.php
|
||||
|
||||
# Expired Cronjob Every 5 Minutes
|
||||
# Expired Cronjob Every 1 Hour
|
||||
0 * * * * cd {$dir} && {$php} cron.php
|
||||
</pre>
|
||||
<pre>
|
||||
<pre>
|
||||
# Reminder Cronjob Every 7 AM
|
||||
0 7 * * * cd {$dir} && {$php} reminder.php
|
||||
</pre>
|
||||
|
@ -124,6 +124,7 @@
|
||||
{if Lang::arrayCount($activation)}
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$_L['Invoice']}</th>
|
||||
<th>{$_L['Username']}</th>
|
||||
<th>{$_L['Plan_Name']}</th>
|
||||
<th>{$_L['Plan_Price']}</th>
|
||||
@ -135,7 +136,8 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $activation as $ds}
|
||||
<tr>
|
||||
<tr onclick="window.location.href = '{$_url}prepaid/view/{$ds['id']}'" style="cursor:pointer;">
|
||||
<td>{$ds['invoice']}</td>
|
||||
<td>{$ds['username']}</td>
|
||||
<td>{$ds['plan_name']}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||
|
@ -149,7 +149,7 @@
|
||||
$.getJSON("./version.json?" + Math.random(), function(data) {
|
||||
var localVersion = data.version;
|
||||
$('#version').html('Version: ' + localVersion);
|
||||
$.getJSON("https://raw.githubusercontent.com/ibnux/phpnuxbill/master/version.json?" + Math
|
||||
$.getJSON("https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/version.json?" + Math
|
||||
.random(),
|
||||
function(data) {
|
||||
var latestVersion = data.version;
|
||||
|
@ -1,9 +1,9 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<div class="col-md-6 col-sm-12 col-md-offset-3">
|
||||
<div class="panel panel-hovered panel-primary panel-stacked mb30">
|
||||
<div class="panel-heading">PRINT INVOICE</div>
|
||||
<div class="panel-heading">{$in['invoice']}</div>
|
||||
<div class="panel-body">
|
||||
<div class="well">
|
||||
<fieldset>
|
||||
@ -19,6 +19,7 @@
|
||||
{$_L['Type']} : <b>{$in['type']}</b><br>
|
||||
{$_L['Plan_Name']} : <b>{$in['plan_name']}</b><br>
|
||||
{$_L['Plan_Price']} : <b>{Lang::moneyFormat($in['price'])}</b><br>
|
||||
{$in['method']}<br>
|
||||
<br>
|
||||
{$_L['Username']} : <b>{$in['username']}</b><br>
|
||||
{$_L['Password']} : **********<br>
|
||||
@ -33,10 +34,12 @@
|
||||
</div>
|
||||
<form class="form-horizontal" method="post" action="{$_url}prepaid/print" target="_blank">
|
||||
<input type="hidden" name="id" value="{$in['id']}">
|
||||
<a href="{$_url}prepaid/list" class="btn btn-primary btn-sm"><i
|
||||
class="ion-reply-all"></i>{$_L['Finish']}</a>
|
||||
<a href="{$_url}prepaid/view/{$in['id']}/send" class="btn btn-info text-black btn-sm"><i
|
||||
class="glyphicon glyphicon-envelope"></i> {Lang::T("Resend To Customer")}</a>
|
||||
<button type="submit" class="btn btn-default btn-sm"><i class="fa fa-print"></i>
|
||||
{$_L['Click_Here_to_Print']}</button>
|
||||
<a href="{$_url}prepaid/list" class="btn btn-primary"><i
|
||||
class="ion-reply-all"></i>{$_L['Finish']}</a>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="name" class="form-control" value="{$name}"
|
||||
<input type="text" name="q" class="form-control" value="{$q}"
|
||||
placeholder="{$_L['Search_by_Name']}...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
|
||||
@ -53,16 +53,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<nav aria-label="...">
|
||||
<ul class="pager">
|
||||
{if $page > 0}
|
||||
<li class="previous "><a href="{$_url}logs/radius/{$page-1}"><span
|
||||
aria-hidden="true">←</span> Newer</a></li>
|
||||
{/if}
|
||||
<li class="next"><a href="{$_url}logs/radius/{$page+1}">Older <span
|
||||
aria-hidden="true">→</span></a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
{$paginator['contents']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="name" class="form-control" value="{$name}"
|
||||
<input type="text" name="q" class="form-control" value="{$q}"
|
||||
placeholder="{$_L['Search_by_Name']}...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
|
||||
|
@ -2,7 +2,13 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel mb20 panel-primary panel-hovered">
|
||||
<div class="panel-heading">{$pageHeader}</div>
|
||||
<div class="panel-heading">
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-danger btn-xs" title="Reset File" href="{$_url}pages/{$PageFile}-reset" onclick="return confirm('Reset File?')"><span
|
||||
class="glyphicon glyphicon-refresh" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
{$pageHeader}
|
||||
</div>
|
||||
<div id="myNicPanel" style="width: 100%;"></div>
|
||||
<div id="panel-edit" class="panel-body">{$htmls}</div>
|
||||
{if $writeable}
|
||||
@ -10,32 +16,47 @@
|
||||
<a href="javascript:saveIt()" class="btn btn-primary btn-block">SAVE</a>
|
||||
<br>
|
||||
<p class="help-block">{$_L['Info_Page']}</p>
|
||||
<input type="text" class="form-control" onclick="this.select()" readonly value="{$app_url}/pages/{$PageFile}.html">
|
||||
<input type="text" class="form-control" onclick="this.select()" readonly
|
||||
value="{$app_url}/pages/{$PageFile}.html">
|
||||
</div>
|
||||
{else}
|
||||
<div class="panel-footer">
|
||||
{$_L['Failed_Save_Page']}
|
||||
</div>
|
||||
{/if}
|
||||
{if $PageFile=='Voucher'}
|
||||
<div class="panel-footer">
|
||||
<p class="help-block">
|
||||
<b>[[company_name]]</b> Your Company Name at Settings.<br>
|
||||
<b>[[price]]</b> Plan Price.<br>
|
||||
<b>[[voucher_code]]</b> Voucher Code.<br>
|
||||
<b>[[plan]]</b> Voucher Plan.<br>
|
||||
<b>[[counter]]</b> Counter.<br>
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form id="formpages" class="hidden" method="post" role="form" action="{$_url}pages/{$PageFile}-post" >
|
||||
<form id="formpages" class="hidden" method="post" role="form" action="{$_url}pages/{$PageFile}-post">
|
||||
<textarea name="html" id="html"></textarea>
|
||||
</form>
|
||||
<script src="ui/ui/scripts/nicEdit.js"></script>
|
||||
<script type="text/javascript">
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
var myNicEditor
|
||||
bkLib.onDomLoaded(function() {
|
||||
myNicEditor = new nicEditor();
|
||||
myNicEditor = new nicEditor({fullPanel : true});
|
||||
myNicEditor.setPanel('myNicPanel');
|
||||
myNicEditor.addInstance('panel-edit');
|
||||
});
|
||||
function saveIt(){
|
||||
|
||||
function saveIt() {
|
||||
//alert(document.getElementById('panel-edit').innerHTML);
|
||||
document.getElementById('html').value = nicEditors.findEditor('panel-edit').getContent()
|
||||
document.getElementById('formpages').submit();
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
{include file="sections/footer.tpl"}
|
@ -63,11 +63,13 @@
|
||||
<form method="post" action="{$_url}prepaid/print-voucher/" class="no-print">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="1" class="btn btn-default btn-sm">
|
||||
<tr>
|
||||
<td>ID > <input type="text" name="from_id" style="width:40px" value="{$from_id}"> limit <input
|
||||
type="text" name="limit" style="width:40px" value="{$limit}"></td>
|
||||
<td>From ID > <input type="text" name="from_id" style="width:40px" value="{$from_id}"> limit
|
||||
<input type="text" name="limit" style="width:40px" value="{$limit}"></td>
|
||||
<td>Voucher PerLine <input type="text" style="width:40px" name="vpl" value="{$vpl}">
|
||||
vouchers</td>
|
||||
<td>PageBreak after <input type="text" style="width:40px" name="pagebreak" value="{$pagebreak}">
|
||||
vouchers</td>
|
||||
<td>Plans <select id="plan_id" name="planid" style="width:150px">
|
||||
<td>Plans <select id="plan_id" name="planid" style="width:50px">
|
||||
<option value="0">--all--</option>
|
||||
{foreach $plans as $plan}
|
||||
<option value="{$plan['id']}" {if $plan['id']==$planid}selected{/if}>{$plan['name_plan']}
|
||||
@ -78,65 +80,31 @@
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<center><button type="button" id="actprint"
|
||||
<center><button type="button" onclick="window.print()"
|
||||
class="btn btn-default btn-sm no-print">{$_L['Click_Here_to_Print']}</button><br>
|
||||
{$_L['Print_Info']}<br>
|
||||
show {$v|@count} vouchers from {$vc} vouchers<br>
|
||||
from ID {$v[0]['id']} limit {$limit} vouchers
|
||||
</center>
|
||||
</form>
|
||||
<div id="printable">
|
||||
<div id="printable" align="center">
|
||||
<hr>
|
||||
{foreach $v as $vs}
|
||||
{$n = 1}
|
||||
{foreach $voucher as $vs}
|
||||
{$jml = $jml + 1}
|
||||
<table width="100%" height="200" border="0" cellspacing="0" cellpadding="1" style="margin-bottom:5px">
|
||||
<tbody>
|
||||
{if $n == 1}
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center" valign="middle"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td width="50%" valign="middle" style="padding-right:10px">
|
||||
<center><strong style="font-size:38px">{$_L['Voucher_Hotspot']}</strong><span
|
||||
class="no-print"> ID {$vs['id']}</span></center>
|
||||
<table width="100%" border="1" cellspacing="0" cellpadding="1"
|
||||
bordercolor="#757575">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="5" width="1"><img src="qrcode/?data={$vs['code']}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:25px">
|
||||
{Lang::moneyFormat($vs['price'])}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:20px">
|
||||
{$_L['Code_Voucher']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:25px">
|
||||
{$vs['code']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle" align="center" style="font-size:15px">
|
||||
{$vs['name_plan']}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{/if}
|
||||
<td>{$vs}</td>
|
||||
{if $n == $vpl}
|
||||
</table>
|
||||
</td>
|
||||
<td valign="top" style="padding-left:10px">
|
||||
{include file="$_path/../pages/Voucher.html"}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
{$n = 1}
|
||||
{else}
|
||||
{$n = $n + 1}
|
||||
{/if}
|
||||
|
||||
|
||||
{if $jml == $pagebreak}
|
||||
{$jml = 0}
|
||||
<!-- pageBreak -->
|
||||
|
70
ui/ui/reports-activation.tpl
Normal file
70
ui/ui/reports-activation.tpl
Normal file
@ -0,0 +1,70 @@
|
||||
{include file="sections/header.tpl"}
|
||||
<!-- pool -->
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-hovered mb20 panel-primary">
|
||||
<div class="panel-heading">
|
||||
Activity Log
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="text-center" style="padding: 15px">
|
||||
<div class="col-md-4">
|
||||
<form id="site-search" method="post" action="{$_url}reports/activation">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="q" class="form-control" value="{$q}"
|
||||
placeholder="{$_L['Invoice']}...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="table-responsive">
|
||||
<table id="datatable" class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$_L['Invoice']}</th>
|
||||
<th>{$_L['Username']}</th>
|
||||
<th>{$_L['Plan_Name']}</th>
|
||||
<th>{$_L['Plan_Price']}</th>
|
||||
<th>{$_L['Type']}</th>
|
||||
<th>{$_L['Created_On']}</th>
|
||||
<th>{$_L['Expires_On']}</th>
|
||||
<th>{$_L['Method']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $activation as $ds}
|
||||
<tr>
|
||||
<td onclick="window.location.href = '{$_url}prepaid/view/{$ds['id']}'"
|
||||
style="cursor:pointer;">{$ds['invoice']}</td>
|
||||
<td onclick="window.location.href = '{$_url}customers/viewu/{$ds['username']}'"
|
||||
style="cursor:pointer;">{$ds['username']}</td>
|
||||
<td>{$ds['plan_name']}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||
<td>{$ds['type']}</td>
|
||||
<td class="text-success">
|
||||
{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}
|
||||
</td>
|
||||
<td class="text-danger">{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
|
||||
<td>{$ds['method']}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$paginator['contents']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="sections/footer.tpl"}
|
@ -183,6 +183,8 @@
|
||||
href="{$_url}reports/daily-report">{$_L['Daily_Report']}</a></li>
|
||||
<li {if $_routes[1] eq 'by-period'}class="active" {/if}><a
|
||||
href="{$_url}reports/by-period">{$_L['Period_Reports']}</a></li>
|
||||
<li {if $_routes[1] eq 'activation'}class="active" {/if}><a
|
||||
href="{$_url}reports/activation">{Lang::T('Activation History')}</a></li>
|
||||
{$_MENU_REPORTS}
|
||||
</ul>
|
||||
</li>
|
||||
@ -301,4 +303,11 @@
|
||||
</section>
|
||||
|
||||
<section class="content">
|
||||
{if isset($notify)}{$notify}{/if}
|
||||
{if isset($notify)}
|
||||
<div class="alert alert-{if $notify_t == 's'}success{else}danger{/if}">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>{$notify}</div>
|
||||
</div>
|
||||
{/if}
|
@ -125,6 +125,14 @@
|
||||
</li>
|
||||
{/if}
|
||||
{if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' }
|
||||
{if $_c['enable_balance'] == 'yes'}
|
||||
<li {if $_system_menu eq 'balance'}class="active" {/if}>
|
||||
<a href="{$_url}order/balance">
|
||||
<i class="ion ion-ios-cart"></i>
|
||||
<span>{Lang::T('Buy Balance')}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
<li {if $_system_menu eq 'package'}class="active" {/if}>
|
||||
<a href="{$_url}order/package">
|
||||
<i class="ion ion-ios-cart"></i>
|
||||
@ -157,4 +165,12 @@
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
{if isset($notify)}{$notify}{/if}
|
||||
|
||||
{if isset($notify)}
|
||||
<div class="alert alert-{if $notify_t == 's'}success{else}danger{/if}">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>{$notify}</div>
|
||||
</div>
|
||||
{/if}
|
37
ui/ui/user-orderBalance.tpl
Normal file
37
ui/ui/user-orderBalance.tpl
Normal file
@ -0,0 +1,37 @@
|
||||
{include file="sections/user-header.tpl"}
|
||||
<!-- user-orderPlan -->
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{if $_c['enable_balance'] == 'yes'}
|
||||
<div class="box box-solid box-success bg-gray-light">
|
||||
<div class="box-header">{Lang::T('Balance Plans')}</div>
|
||||
<div class="box-body row">
|
||||
{foreach $plans_balance as $plan}
|
||||
<div class="col col-md-4">
|
||||
<div class="box box-solid box-default">
|
||||
<div class="box-header text-bold">{$plan['name_plan']}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{Lang::T('Price')}</td>
|
||||
<td>{Lang::moneyFormat($plan['price'])}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<a href="{$_url}order/buy/0/{$plan['id']}"
|
||||
onclick="return confirm('{Lang::T('Buy Balance')}?')"
|
||||
class="btn btn-sm btn-block btn-primary">Buy</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="sections/user-footer.tpl"}
|
@ -5,43 +5,13 @@
|
||||
<div class="box box-solid box-default">
|
||||
<div class="box-header">{Lang::T('Order Internet Package')}</div>
|
||||
</div>
|
||||
{if $_c['enable_balance'] == 'yes'}
|
||||
<div class="box box-solid box-success bg-gray-light">
|
||||
<div class="box-header">{Lang::T('Balance Plans')}</div>
|
||||
<div class="box-body row">
|
||||
{foreach $plans_balance as $plan}
|
||||
<div class="col col-md-4">
|
||||
<div class="box box-solid box-default">
|
||||
<div class="box-header text-bold">{$plan['name_plan']}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{Lang::T('Price')}</td>
|
||||
<td>{Lang::moneyFormat($plan['price'])}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<a href="{$_url}order/buy/0/{$plan['id']}"
|
||||
onclick="return confirm('{Lang::T('Buy Balance?')}')"
|
||||
class="btn btn-sm btn-block btn-primary">Buy</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $_c['radius_enable']}
|
||||
<div class="box box-solid box-info bg-gray-light">
|
||||
<div class="box-header text-black text-bold">{if $_c['radius_plan']==''}Radius
|
||||
Plan{else}{$_c['radius_plan']}
|
||||
{/if}</div>
|
||||
{if Lang::arrayCount($radius_hotspot)>0}
|
||||
<div class="box-header text-black">{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</div>
|
||||
<div class="box-body row">
|
||||
<ol class="breadcrumb">
|
||||
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li>
|
||||
<li>{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</li>
|
||||
</ol>
|
||||
<div class="row">
|
||||
{foreach $radius_hotspot as $plan}
|
||||
<div class="col col-md-4">
|
||||
<div class="box box-primary">
|
||||
@ -87,8 +57,11 @@
|
||||
</div>
|
||||
{/if}
|
||||
{if Lang::arrayCount($radius_pppoe)>0}
|
||||
<div class="box-header text-black">{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</div>
|
||||
<div class="box-body row">
|
||||
<ol class="breadcrumb">
|
||||
<li>{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}</li>
|
||||
<li>{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</li>
|
||||
</ol>
|
||||
<div class="row">
|
||||
{foreach $radius_pppoe as $plan}
|
||||
<div class="col col-md-4">
|
||||
<div class="box box- box-primary">
|
||||
@ -133,25 +106,24 @@
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{foreach $routers as $router}
|
||||
{if Validator::isRouterHasPlan($plans_hotspot, $router['name']) || Validator::isRouterHasPlan($plans_pppoe, $router['name'])}
|
||||
<div class="box box-solid box-info bg-gray-light">
|
||||
<div class="box-header text-black text-bold">{$router['name']}</div>
|
||||
<div class="box box-solid box-primary bg-gray">
|
||||
<div class="box-header text-white text-bold">{$router['name']}</div>
|
||||
{if $router['description'] != ''}
|
||||
<div class="box-body">
|
||||
{$router['description']}
|
||||
</div>
|
||||
{/if}
|
||||
{if Validator::countRouterPlan($plans_hotspot, $router['name'])>0}
|
||||
<div class="box-header text-black">{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</div>
|
||||
<div class="box-header text-white">{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}</div>
|
||||
<div class="box-body row">
|
||||
{foreach $plans_hotspot as $plan}
|
||||
{if $router['name'] eq $plan['routers']}
|
||||
<div class="col col-md-4">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header text-bold">{$plan['name_plan']}</div>
|
||||
<div class="box-header text-center text-bold">{$plan['name_plan']}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
@ -194,13 +166,13 @@
|
||||
</div>
|
||||
{/if}
|
||||
{if Validator::countRouterPlan($plans_pppoe,$router['name'])>0}
|
||||
<div class="box-header text-black">{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</div>
|
||||
<div class="box-header text-white">{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}</div>
|
||||
<div class="box-body row">
|
||||
{foreach $plans_pppoe as $plan}
|
||||
{if $router['name'] eq $plan['routers']}
|
||||
<div class="col col-md-4">
|
||||
<div class="box box- box-primary">
|
||||
<div class="box-header text-bold">{$plan['name_plan']}</div>
|
||||
<div class="box-header text-bold text-center">{$plan['name_plan']}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "2023.10.17"
|
||||
"version": "2023.10.20"
|
||||
}
|
Reference in New Issue
Block a user