Merge pull request #199 from Focuslinkstech/master

Update:
This commit is contained in:
iBNu Maksum 2024-05-21 09:02:17 +07:00 committed by GitHub
commit 951d729fcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 682 additions and 195 deletions

View File

@ -322,3 +322,16 @@ function _alert($text, $type = 'success', $url = "home", $time = 3)
if (!isset($api_secret)) { if (!isset($api_secret)) {
$api_secret = $db_password; $api_secret = $db_password;
} }
function displayMaintenanceMessage(): void
{
global $config, $ui;
$date = $config['maintenance_date'];
if ($date){
$ui->assign('date', $date);
}
http_response_code(503);
$ui->assign('companyName', $config['CompanyName']);
$ui->display('maintenance.tpl');
die();
}

View File

@ -24,6 +24,10 @@ CREATE TABLE `tbl_customers` (
`pppoe_password` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'For PPPOE Login', `pppoe_password` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'For PPPOE Login',
`fullname` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `fullname` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`address` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci, `address` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
`city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
`district` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
`state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
`zip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
`phonenumber` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0', `phonenumber` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
`email` varchar(128) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1', `email` varchar(128) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1',
`coordinates` VARCHAR(50) NOT NULL DEFAULT '' COMMENT 'Latitude and Longitude coordinates', `coordinates` VARCHAR(50) NOT NULL DEFAULT '' COMMENT 'Latitude and Longitude coordinates',

View File

@ -172,7 +172,7 @@ class Radius
if ($p) { if ($p) {
// if exists // if exists
Radius::delAtribute(Radius::getTableCustomer(), 'Max-All-Session', 'username', $customer['username']); Radius::delAtribute(Radius::getTableCustomer(), 'Max-All-Session', 'username', $customer['username']);
Radius::delAtribute(Radius::getTableCustomer(), 'Max-Data', 'username', $customer['username']); Radius::delAtribute(Radius::getTableCustomer(), 'Max-Volume', 'username', $customer['username']);
$p->groupname = "plan_" . $plan['id']; $p->groupname = "plan_" . $plan['id'];
$p->save(); $p->save();
} else { } else {
@ -194,9 +194,9 @@ class Radius
$datalimit = $plan['data_limit'] . "000000000"; $datalimit = $plan['data_limit'] . "000000000";
else else
$datalimit = $plan['data_limit'] . "000000"; $datalimit = $plan['data_limit'] . "000000";
//Radius::upsertCustomer($customer['username'], 'Max-Volume', $datalimit); Radius::upsertCustomer($customer['username'], 'Max-Volume', $datalimit);
// Mikrotik Spesific // Mikrotik Spesific
Radius::upsertCustomer($customer['username'], 'Max-Data', $datalimit); //Radius::upsertCustomer($customer['username'], 'Max-Data', $datalimit);
} else if ($plan['limit_type'] == "Both_Limit") { } else if ($plan['limit_type'] == "Both_Limit") {
if ($plan['time_unit'] == 'Hrs') if ($plan['time_unit'] == 'Hrs')
$timelimit = $plan['time_limit'] * 60 * 60; $timelimit = $plan['time_limit'] * 60 * 60;
@ -206,10 +206,10 @@ class Radius
$datalimit = $plan['data_limit'] . "000000000"; $datalimit = $plan['data_limit'] . "000000000";
else else
$datalimit = $plan['data_limit'] . "000000"; $datalimit = $plan['data_limit'] . "000000";
//Radius::upsertCustomer($customer['username'], 'Max-Volume', $datalimit); Radius::upsertCustomer($customer['username'], 'Max-Volume', $datalimit);
Radius::upsertCustomer($customer['username'], 'Max-All-Session', $timelimit); Radius::upsertCustomer($customer['username'], 'Max-All-Session', $timelimit);
// Mikrotik Spesific // Mikrotik Spesific
Radius::upsertCustomer($customer['username'], 'Max-Data', $datalimit); //Radius::upsertCustomer($customer['username'], 'Max-Data', $datalimit);
@ -218,9 +218,9 @@ class Radius
} else { } else {
//Radius::delAtribute(Radius::getTableCustomer(), 'Max-Volume', 'username', $customer['username']); Radius::delAtribute(Radius::getTableCustomer(), 'Max-Volume', 'username', $customer['username']);
Radius::delAtribute(Radius::getTableCustomer(), 'Max-All-Session', 'username', $customer['username']); Radius::delAtribute(Radius::getTableCustomer(), 'Max-All-Session', 'username', $customer['username']);
Radius::delAtribute(Radius::getTableCustomer(), 'Max-Data', 'username', $customer['username']); //Radius::delAtribute(Radius::getTableCustomer(), 'Max-Data', 'username', $customer['username']);
} }
Radius::disconnectCustomer($customer['username']); Radius::disconnectCustomer($customer['username']);
@ -229,8 +229,8 @@ class Radius
// expired user // expired user
if ($expired != null) { if ($expired != null) {
//Radius::upsertCustomer($customer['username'], 'Max-All-Session', strtotime($expired) - time()); Radius::upsertCustomer($customer['username'], 'Max-All-Session', strtotime($expired) - time());
Radius::upsertCustomer($customer['username'], 'expiration', date('d M Y H:i:s', strtotime($expired))); //Radius::upsertCustomer($customer['username'], 'expiration', date('d M Y H:i:s', strtotime($expired)));
// Mikrotik Spesific // Mikrotik Spesific
Radius::upsertCustomer( Radius::upsertCustomer(
$customer['username'], $customer['username'],
@ -238,8 +238,8 @@ class Radius
date('Y-m-d', strtotime($expired)) . 'T' . date('H:i:s', strtotime($expired)) . Timezone::getTimeOffset($config['timezone']) date('Y-m-d', strtotime($expired)) . 'T' . date('H:i:s', strtotime($expired)) . Timezone::getTimeOffset($config['timezone'])
); );
} else { } else {
//Radius::delAtribute(Radius::getTableCustomer(), 'Max-All-Session', 'username', $customer['username']); Radius::delAtribute(Radius::getTableCustomer(), 'Max-All-Session', 'username', $customer['username']);
Radius::delAtribute(Radius::getTableCustomer(), 'expiration', 'username', $customer['username']); //Radius::delAtribute(Radius::getTableCustomer(), 'expiration', 'username', $customer['username']);
} }
if ($plan['type'] == 'PPPOE') { if ($plan['type'] == 'PPPOE') {

View File

@ -392,6 +392,11 @@ switch ($action) {
//post Customers Attributes //post Customers Attributes
$custom_field_names = (array) $_POST['custom_field_name']; $custom_field_names = (array) $_POST['custom_field_name'];
$custom_field_values = (array) $_POST['custom_field_value']; $custom_field_values = (array) $_POST['custom_field_value'];
//additional information
$city = _post('city');
$district = _post('district');
$state = _post('state');
$zip = _post('zip');
run_hook('add_customer'); #HOOK run_hook('add_customer'); #HOOK
$msg = ''; $msg = '';
@ -423,6 +428,10 @@ switch ($action) {
$d->phonenumber = Lang::phoneFormat($phonenumber); $d->phonenumber = Lang::phoneFormat($phonenumber);
$d->service_type = $service_type; $d->service_type = $service_type;
$d->coordinates = $coordinates; $d->coordinates = $coordinates;
$d->city = $city;
$d->district = $district;
$d->state = $state;
$d->zip = $zip;
$d->save(); $d->save();
// Retrieve the customer ID of the newly created customer // Retrieve the customer ID of the newly created customer
@ -461,6 +470,11 @@ switch ($action) {
$service_type = _post('service_type'); $service_type = _post('service_type');
$coordinates = _post('coordinates'); $coordinates = _post('coordinates');
$status = _post('status'); $status = _post('status');
//additional information
$city = _post('city');
$district = _post('district');
$state = _post('state');
$zip = _post('zip');
run_hook('edit_customer'); #HOOK run_hook('edit_customer'); #HOOK
$msg = ''; $msg = '';
if (Validator::Length($username, 35, 2) == false) { if (Validator::Length($username, 35, 2) == false) {
@ -523,6 +537,10 @@ switch ($action) {
$d->phonenumber = $phonenumber; $d->phonenumber = $phonenumber;
$d->service_type = $service_type; $d->service_type = $service_type;
$d->coordinates = $coordinates; $d->coordinates = $coordinates;
$d->city = $city;
$d->district = $district;
$d->state = $state;
$d->zip = $zip;
$d->save(); $d->save();

View File

@ -5,6 +5,11 @@
* by https://t.me/ibnux * by https://t.me/ibnux
**/ **/
$maintenance_mode = $config['maintenance_mode'];
if ($maintenance_mode == true){
displayMaintenanceMessage();
}
if (User::getID()) { if (User::getID()) {
r2(U . 'home'); r2(U . 'home');
} }

View File

@ -732,12 +732,12 @@ switch ($action) {
$suc = 0; $suc = 0;
$fal = 0; $fal = 0;
$json = json_decode(file_get_contents($_FILES['json']['tmp_name']), true); $json = json_decode(file_get_contents($_FILES['json']['tmp_name']), true);
try{ try {
ORM::raw_execute("SET FOREIGN_KEY_CHECKS=0;"); ORM::raw_execute("SET FOREIGN_KEY_CHECKS=0;");
} catch (Throwable $e) { } catch (Throwable $e) {
} catch (Exception $e) { } catch (Exception $e) {
} }
try{ try {
ORM::raw_execute("SET GLOBAL FOREIGN_KEY_CHECKS=0;"); ORM::raw_execute("SET GLOBAL FOREIGN_KEY_CHECKS=0;");
} catch (Throwable $e) { } catch (Throwable $e) {
} catch (Exception $e) { } catch (Exception $e) {
@ -745,7 +745,7 @@ switch ($action) {
foreach ($json as $table => $records) { foreach ($json as $table => $records) {
ORM::raw_execute("TRUNCATE $table;"); ORM::raw_execute("TRUNCATE $table;");
foreach ($records as $rec) { foreach ($records as $rec) {
try{ try {
$t = ORM::for_table($table)->create(); $t = ORM::for_table($table)->create();
foreach ($rec as $k => $v) { foreach ($rec as $k => $v) {
if ($k != 'id') { if ($k != 'id') {
@ -764,12 +764,12 @@ switch ($action) {
} }
} }
} }
try{ try {
ORM::raw_execute("SET FOREIGN_KEY_CHECKS=1;"); ORM::raw_execute("SET FOREIGN_KEY_CHECKS=1;");
} catch (Throwable $e) { } catch (Throwable $e) {
} catch (Exception $e) { } catch (Exception $e) {
} }
try{ try {
ORM::raw_execute("SET GLOBAL FOREIGN_KEY_CHECKS=1;"); ORM::raw_execute("SET GLOBAL FOREIGN_KEY_CHECKS=1;");
} catch (Throwable $e) { } catch (Throwable $e) {
} catch (Exception $e) { } catch (Exception $e) {
@ -798,6 +798,40 @@ switch ($action) {
r2(U . 'settings/language', 's', Lang::T('Translation saved Successfully')); r2(U . 'settings/language', 's', Lang::T('Translation saved Successfully'));
break; break;
case 'maintenance':
if (!in_array($admin['user_type'], ['SuperAdmin', 'Admin'])) {
_alert(Lang::T('You do not have permission to access this page'), 'danger', "dashboard");
exit;
}
if (_post('save') == 'save') {
$status = isset($_POST['maintenance_mode']) ? 1 : 0; // Checkbox returns 1 if checked, otherwise 0
$date = isset($_POST['maintenance_date']) ? $_POST['maintenance_date'] : null;
$settings = [
'maintenance_mode' => $status,
'maintenance_date' => $date
];
foreach ($settings as $key => $value) {
$d = ORM::for_table('tbl_appconfig')->where('setting', $key)->find_one();
if ($d) {
$d->value = $value;
$d->save();
} else {
$d = ORM::for_table('tbl_appconfig')->create();
$d->setting = $key;
$d->value = $value;
$d->save();
}
}
r2(U . "settings/maintenance", 's', Lang::T('Settings Saved Successfully'));
}
$ui->assign('_c', $config);
$ui->assign('_title', Lang::T('Maintenance Mode Settings'));
$ui->display('maintenance-mode.tpl');
break;
default: default:
$ui->display('a404.tpl'); $ui->display('a404.tpl');
} }

View File

@ -99,5 +99,8 @@
], ],
"2024.5.18" : [ "2024.5.18" : [
"ALTER TABLE `tbl_customers` CHANGE `status` `status` ENUM('Active','Banned','Disabled','Inactive','Limited','Suspended') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'Active';" "ALTER TABLE `tbl_customers` CHANGE `status` `status` ENUM('Active','Banned','Disabled','Inactive','Limited','Suspended') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'Active';"
],
"2024.5.20" : [
"ALTER TABLE `tbl_customers` ADD `city` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci AFTER `address`, ADD `district` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci AFTER `city`, ADD `state` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci AFTER `district`, ADD `zip` VARCHAR(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci AFTER `state`;"
] ]
} }

View File

@ -121,6 +121,51 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-6">
<div class="box box-primary box-solid collapsed-box">
<div class="box-header with-border">
<h3 class="box-title">{Lang::T('Additional Information')}</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>
</button>
</div>
</div>
<div class="box-body" style="display: none;">
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('City')}</label>
<div class="col-md-9">
<input type="text" class="form-control" id="city" name="city"
value="{$d['city']}">
<small class="form-text text-muted">{Lang::T('City of Resident')}</small>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('District')}</label>
<div class="col-md-9">
<input type="text" class="form-control" id="district" name="district"
value="{$d['district']}">
<small class="form-text text-muted">{Lang::T('District')}</small>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('State')}</label>
<div class="col-md-9">
<input type="text" class="form-control" id="state" name="state"
value="{$d['state']}">
<small class="form-text text-muted">{Lang::T('State of Resident')}</small>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Zip')}</label>
<div class="col-md-9">
<input type="text" class="form-control" id="zip" name="zip"
value="{$d['zip']}">
<small class="form-text text-muted">{Lang::T('Zip Code')}</small>
</div>
</div>
</div>
</div>
</div>
</div> </div>
<center> <center>
<button class="btn btn-primary" type="submit"> <button class="btn btn-primary" type="submit">

View File

@ -160,6 +160,51 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-6">
<div class="box box-primary box-solid collapsed-box">
<div class="box-header with-border">
<h3 class="box-title">{Lang::T('Additional Information')}</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i>
</button>
</div>
</div>
<div class="box-body" style="display: none;">
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('City')}</label>
<div class="col-md-9">
<input type="text" class="form-control" id="city" name="city"
value="{$d['city']}">
<small class="form-text text-muted">{Lang::T('City of Resident')}</small>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('District')}</label>
<div class="col-md-9">
<input type="text" class="form-control" id="district" name="district"
value="{$d['district']}">
<small class="form-text text-muted">{Lang::T('District')}</small>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('State')}</label>
<div class="col-md-9">
<input type="text" class="form-control" id="state" name="state"
value="{$d['state']}">
<small class="form-text text-muted">{Lang::T('State of Resident')}</small>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Zip')}</label>
<div class="col-md-9">
<input type="text" class="form-control" id="zip" name="zip"
value="{$d['zip']}">
<small class="form-text text-muted">{Lang::T('Zip Code')}</small>
</div>
</div>
</div>
</div>
</div>
</div> </div>
<center> <center>
<button class="btn btn-primary" type="submit"> <button class="btn btn-primary" type="submit">

View File

@ -22,9 +22,19 @@
<li class="list-group-item"> <li class="list-group-item">
<b>{Lang::T('Email')}</b> <span class="pull-right">{$d['email']}</span> <b>{Lang::T('Email')}</b> <span class="pull-right">{$d['email']}</span>
</li> </li>
</ul> <li class="list-group-item">{Lang::nl2br($d['address'])}</li>
<p class="text-muted">{Lang::nl2br($d['address'])}</p> <li class="list-group-item">
<ul class="list-group list-group-unbordered"> <b>{Lang::T('City')}</b> <span class="pull-right">{Lang::T($d['city'])}</span>
</li>
<li class="list-group-item">
<b>{Lang::T('District')}</b> <span class="pull-right">{Lang::T($d['district'])}</span>
</li>
<li class="list-group-item">
<b>{Lang::T('State')}</b> <span class="pull-right">{Lang::T($d['state'])}</span>
</li>
<li class="list-group-item">
<b>{Lang::T('Zip')}</b> <span class="pull-right">{Lang::T($d['zip'])}</span>
</li>
<li class="list-group-item"> <li class="list-group-item">
<b>{Lang::T('Password')}</b> <input type="password" value="{$d['password']}" <b>{Lang::T('Password')}</b> <input type="password" value="{$d['password']}"
style=" border: 0px; text-align: right;" class="pull-right" style=" border: 0px; text-align: right;" class="pull-right"

View File

@ -0,0 +1,96 @@
{include file="sections/header.tpl"}
<style>
/* Checkbox container */
.switch {
position: relative;
display: inline-block;
width: 50px;
height: 24px;
}
/* Hidden checkbox */
.switch input {
opacity: 0;
width: 0;
height: 0;
}
/* Slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
border-radius: 24px;
}
.slider:before {
position: absolute;
content: "";
height: 18px;
width: 18px;
left: 3px;
bottom: 3px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
border-radius: 50%;
}
input:checked+.slider {
background-color: #2196F3;
}
input:focus+.slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked+.slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
</style>
<form class="form-horizontal" method="post" autocomplete="off" role="form" action="">
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="panel-heading">{Lang::T('Maintenance Mode')}</div>
<div class="panel-body">
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Status:')}</label>
<div class="col-md-6">
<label class="switch">
<input type="checkbox" id="maintenance_mode" value="1" name="maintenance_mode" {if
$_c['maintenance_mode']==1}checked{/if}>
<span class="slider"></span>
</label>
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('End Date:')}</label>
<div class="col-md-6">
<input class="form-control" value="{$_c['maintenance_date']}" type="date" id="start_date"
name="maintenance_date">
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<button class="btn btn-primary waves-effect waves-light" name="save" value="save"
type="submit">{Lang::T('Save')}</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
{include file="sections/footer.tpl"}

212
ui/ui/maintenance.tpl Normal file
View File

@ -0,0 +1,212 @@
<!DOCTYPE html>
<html>
<head>
<title>Site is down for maintenance</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
body {
font-family: 'Noto Sans', sans-serif;
color: #616161
/*#757575*/
;
background-color: #eeeeee;
}
.container {
margin: auto;
max-width: 1024px;
width: 100%;
height: 100%;
text-align: center;
position: relative;
}
.box {
width: auto;
height: 500px;
background: #fff;
margin-top: 50px;
margin-left: 100px;
margin-right: 100px;
border-radius: 5px;
box-shadow: 6px 18px 18px rgba(0, 0, 0, 0.08), -6px 18px 18px rgba(0, 0, 0, 0.08);
}
.animation {
margin-top: 20%;
display: inline-block;
margin-bottom: 5%;
}
h1 {
font-size: 32px;
font-weight: 400;
text-transform: uppercase;
margin: 0;
}
p {
font-size: 16px;
font-weight: 700;
margin: 0;
}
a {
color: #f6921e;
font-weight: bold;
text-decoration: none;
margin-left: 5px;
}
.one,
.two,
.three {
display: block;
float: left;
}
.one {
background: url('data:image/svg+xml,%3Csvg%20version%3D%221.1%22%0A%09%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xmlns%3Aa%3D%22http%3A%2F%2Fns.adobe.com%2FAdobeSVGViewerExtensions%2F3.0%2F%22%0A%09%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2281px%22%20height%3D%2280.5px%22%20viewBox%3D%220%200%2081%2080.5%22%20style%3D%22overflow%3Ascroll%3Benable-background%3Anew%200%200%2081%2080.5%3B%22%0A%09%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%09.st0%7Bfill%3A%23383838%3B%7D%0A%3C%2Fstyle%3E%0A%3Cdefs%3E%0A%3C%2Fdefs%3E%0A%3Cpath%20class%3D%22st0%22%20d%3D%22M30.3%2C68.2c1.2%2C0.2%2C2.3%2C0.9%2C3.8%2C1.2c1.6%2C0.3%2C2.7%2C0.6%2C4%2C0.4l4.9%2C9.6c0.6%2C0.9%2C1.4%2C1.1%2C2.3%2C0.9l15.3-4.9%0A%09c0.5-0.3%2C1-1%2C0.9-2.3l-1.8-10.6c2-1.6%2C3.6-3.7%2C5.3-5.8l10.5%2C0.6c1.1%2C0.6%2C2.1-0.4%2C2.3-1.1L81%2C40.7c0.2-0.8-0.4-2.1-1.1-2.3l-10.2-3.8%0A%09c-0.3-2.5-1.4-4.8-2.5-7.5l5.9-8.5c0.6-1.1%2C0.4-1.9-0.2-2.9l-12-10.7c-0.3-0.5-1.6-0.3-2.5%2C0.3l-8%2C6.9c-1.2-0.2-2.3-0.9-3.8-1.2%0A%09c-1.6-0.3-2.7-0.6-4-0.4L37.7%2C1c-0.6-0.9-1.4-1.1-2.3-0.9L20.1%2C5c-0.5%2C0.3-1%2C1-0.9%2C2.3l1.8%2C10.6c-2%2C1.6-3.6%2C3.7-5.3%2C5.8L5.3%2C23%0A%09c-0.8-0.2-1.7%2C0.4-2%2C1.6L0%2C40.2c-0.2%2C0.8%2C0.4%2C2.1%2C1.1%2C2.3l9.8%2C3.7c0.7%2C2.6%2C1.4%2C5.2%2C2.5%2C7.5l-6%2C8.9c-0.6%2C0.7-0.4%2C2%2C0.3%2C2.5l12%2C10.7%0A%09c0.7%2C0.5%2C1.9%2C0.8%2C2.4%2C0.1L30.3%2C68.2z%20M26.7%2C37.3c1.6-7.4%2C9.1-12.3%2C16.5-10.8S55.6%2C35.7%2C54%2C43.1c-1.6%2C7.4-9.1%2C12.3-16.5%2C10.7%0A%09C30.1%2C52.3%2C25.1%2C44.7%2C26.7%2C37.3L26.7%2C37.3z%22%2F%3E%0A%3C%2Fsvg%3E');
width: 80px;
height: 80px;
background-size: 100% 100%;
background-repeat: no-repeat;
margin-top: -10px;
margin-right: 8px;
}
.two {
background: url('data:image/svg+xml,%3Csvg%20version%3D%221.1%22%0A%09%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xmlns%3Aa%3D%22http%3A%2F%2Fns.adobe.com%2FAdobeSVGViewerExtensions%2F3.0%2F%22%0A%09%20x%3D%220px%22%20y%3D%220px%22%20width%3D%22103px%22%20height%3D%22103.7px%22%20viewBox%3D%220%200%20103%20103.7%22%0A%09%20style%3D%22overflow%3Ascroll%3Benable-background%3Anew%200%200%20103%20103.7%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%09.st0%7Bfill%3A%23F6921E%3B%7D%0A%3C%2Fstyle%3E%0A%3Cdefs%3E%0A%3C%2Fdefs%3E%0A%3Cpath%20class%3D%22st0%22%20d%3D%22M87.3%2C64.8c0.3-1.5%2C1.1-2.9%2C1.6-4.9c0.4-2%2C0.7-3.5%2C0.5-5.1l12.3-6.3c1.2-0.8%2C1.4-1.8%2C1.1-2.9l-6.3-19.6%0A%09c-0.4-0.6-1.3-1.3-2.9-1.1l-13.5%2C2.3c-2.1-2.5-4.7-4.7-7.4-6.8l0.8-13.4C74.3%2C5.8%2C73%2C4.5%2C72%2C4.3L52.1%2C0c-1-0.2-2.7%2C0.5-2.9%2C1.5%0A%09l-4.8%2C13c-3.2%2C0.4-6.1%2C1.8-9.5%2C3.2l-10.9-7.5c-1.4-0.8-2.5-0.5-3.7%2C0.3L6.5%2C25.8c-0.6%2C0.4-0.4%2C2%2C0.4%2C3.2l8.8%2C10.2%0A%09c-0.3%2C1.5-1.1%2C2.9-1.5%2C4.9c-0.4%2C2-0.7%2C3.5-0.6%2C5.1L1.2%2C55.4c-1.2%2C0.8-1.4%2C1.8-1.1%2C2.9l6.3%2C19.6c0.4%2C0.6%2C1.3%2C1.3%2C2.9%2C1.1l13.5-2.3%0A%09c2.1%2C2.5%2C4.7%2C4.7%2C7.4%2C6.8l-0.8%2C13.4c-0.2%2C1%2C0.6%2C2.2%2C2.1%2C2.5l20%2C4.2c1%2C0.2%2C2.7-0.5%2C2.9-1.5l4.7-12.6c3.3-0.9%2C6.6-1.7%2C9.5-3.2L80.1%2C94%0A%09c0.9%2C0.7%2C2.5%2C0.5%2C3.2-0.4L97%2C78.3c0.7-0.9%2C1-2.4%2C0.1-3.1L87.3%2C64.8z%20M47.8%2C69.5C38.3%2C67.5%2C32%2C57.8%2C34%2C48.3%0A%09c2-9.5%2C11.7-15.8%2C21.2-13.8c9.5%2C2%2C15.7%2C11.7%2C13.7%2C21.2C66.9%2C65.2%2C57.3%2C71.5%2C47.8%2C69.5L47.8%2C69.5z%22%2F%3E%0A%3C%2Fsvg%3E');
width: 100px;
height: 100px;
background-size: 100% 100%;
background-repeat: no-repeat;
}
.three {
background: url('data:image/svg+xml,%3Csvg%20version%3D%221.1%22%0A%09%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xmlns%3Aa%3D%22http%3A%2F%2Fns.adobe.com%2FAdobeSVGViewerExtensions%2F3.0%2F%22%0A%09%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2281px%22%20height%3D%2280.5px%22%20viewBox%3D%220%200%2081%2080.5%22%20style%3D%22overflow%3Ascroll%3Benable-background%3Anew%200%200%2081%2080.5%3B%22%0A%09%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%09.st0%7Bfill%3A%23383838%3B%7D%0A%3C%2Fstyle%3E%0A%3Cdefs%3E%0A%3C%2Fdefs%3E%0A%3Cpath%20class%3D%22st0%22%20d%3D%22M30.3%2C68.2c1.2%2C0.2%2C2.3%2C0.9%2C3.8%2C1.2c1.6%2C0.3%2C2.7%2C0.6%2C4%2C0.4l4.9%2C9.6c0.6%2C0.9%2C1.4%2C1.1%2C2.3%2C0.9l15.3-4.9%0A%09c0.5-0.3%2C1-1%2C0.9-2.3l-1.8-10.6c2-1.6%2C3.6-3.7%2C5.3-5.8l10.5%2C0.6c1.1%2C0.6%2C2.1-0.4%2C2.3-1.1L81%2C40.7c0.2-0.8-0.4-2.1-1.1-2.3l-10.2-3.8%0A%09c-0.3-2.5-1.4-4.8-2.5-7.5l5.9-8.5c0.6-1.1%2C0.4-1.9-0.2-2.9l-12-10.7c-0.3-0.5-1.6-0.3-2.5%2C0.3l-8%2C6.9c-1.2-0.2-2.3-0.9-3.8-1.2%0A%09c-1.6-0.3-2.7-0.6-4-0.4L37.7%2C1c-0.6-0.9-1.4-1.1-2.3-0.9L20.1%2C5c-0.5%2C0.3-1%2C1-0.9%2C2.3l1.8%2C10.6c-2%2C1.6-3.6%2C3.7-5.3%2C5.8L5.3%2C23%0A%09c-0.8-0.2-1.7%2C0.4-2%2C1.6L0%2C40.2c-0.2%2C0.8%2C0.4%2C2.1%2C1.1%2C2.3l9.8%2C3.7c0.7%2C2.6%2C1.4%2C5.2%2C2.5%2C7.5l-6%2C8.9c-0.6%2C0.7-0.4%2C2%2C0.3%2C2.5l12%2C10.7%0A%09c0.7%2C0.5%2C1.9%2C0.8%2C2.4%2C0.1L30.3%2C68.2z%20M26.7%2C37.3c1.6-7.4%2C9.1-12.3%2C16.5-10.8S55.6%2C35.7%2C54%2C43.1c-1.6%2C7.4-9.1%2C12.3-16.5%2C10.7%0A%09C30.1%2C52.3%2C25.1%2C44.7%2C26.7%2C37.3L26.7%2C37.3z%22%2F%3E%0A%3C%2Fsvg%3E');
width: 80px;
height: 80px;
background-size: 100% 100%;
background-repeat: no-repeat;
margin-top: -50px;
margin-left: -10px;
}
@keyframes spin-one {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(-359deg);
transform: rotate(-359deg);
}
}
.spin-one {
-webkit-animation: spin-one 1.5s infinite linear;
animation: spin-one 1.5s infinite linear;
}
@keyframes spin-two {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(-359deg);
transform: rotate(359deg);
}
}
.spin-two {
-webkit-animation: spin-two 2s infinite linear;
animation: spin-two 2s infinite linear;
}
.day,
.hour,
.minute,
.second {
font-size: 18px;
background: #333;
color: #fff;
padding: 10px;
border-radius: 5px;
margin: 5px;
}
.day {
background-color: #1abc9c;
}
.hour {
background-color: #3498db;
}
.minute {
background-color: #f1c40f;
}
.second {
background-color: #e74c3c;
}
</style>
</head>
<body>
<!-- partial:index.partial.html -->
<link href="https://fonts.googleapis.com/css?family=Noto+Sans:400,700" rel="stylesheet">
<div class="container">
<div class="box">
<div class="animation">
<div class="one spin-one"></div>
<div class="two spin-two"></div>
<div class="three spin-one"></div>
</div>
<h1>{Lang::T('Site is temporarily unavailable.')}</h1>
<p>{Lang::T('Scheduled maintenance is currently in progress. Please check back soon.')}</p>
<p>{Lang::T('We apologize for any inconvenience.')} <br> &mdash; {Lang::T('The ')} {$companyName} {Lang::T('
Team.')}</p>
<br>
{if $date} <div style="display: flex; flex-direction: row; justify-content: space-between;">
<p class="day"></p>
<p class="hour"></p>
<p class="minute"></p>
<p class="second"></p>
</div>
{/if}
</div>
</div>
{if $date}
<script>
const countDown = () => {
const countDay = new Date('{$date}');
const now = new Date();
const counter = countDay - now;
const second = 1000;
const minute = second * 60;
const hour = minute * 60;
const day = hour * 24;
const textDay = Math.floor(counter / day);
const textHour = Math.floor((counter % day) / hour);
const textMinute = Math.floor((counter % hour) / minute);
const textSecond = Math.floor((counter % minute) / second)
document.querySelector(".day").innerText = textDay + ' Days';
document.querySelector(".hour").innerText = textHour + ' Hours';
document.querySelector(".minute").innerText = textMinute + ' Minutes';
document.querySelector(".second").innerText = textSecond + ' Seconds';
}
setInterval(countDown, 1000);
</script>
{/if}
</body>
</html>

View File

@ -88,7 +88,7 @@
} }
</style> </style>
{if isset($xheader)} {if isset($xheader)}
{$xheader} {$xheader}
{/if} {/if}
</head> </head>
@ -158,71 +158,71 @@
</li> </li>
{$_MENU_AFTER_DASHBOARD} {$_MENU_AFTER_DASHBOARD}
{if !in_array($_admin['user_type'],['Report'])} {if !in_array($_admin['user_type'],['Report'])}
<li class="{if in_array($_system_menu, ['customers', 'map'])}active{/if} treeview"> <li class="{if in_array($_system_menu, ['customers', 'map'])}active{/if} treeview">
<a href="#"> <a href="#">
<i class="fa fa-users"></i> <span>{Lang::T('Customer')}</span> <i class="fa fa-users"></i> <span>{Lang::T('Customer')}</span>
<span class="pull-right-container"> <span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</span> </span>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<li {if $_system_menu eq 'customers' }class="active" {/if}><a <li {if $_system_menu eq 'customers' }class="active" {/if}><a
href="{$_url}customers">{Lang::T('Lists')}</a></li> href="{$_url}customers">{Lang::T('Lists')}</a></li>
<li {if $_system_menu eq 'map' }class="active" {/if}><a <li {if $_system_menu eq 'map' }class="active" {/if}><a
href="{$_url}map/customer">{Lang::T('Location')}</a></li> href="{$_url}map/customer">{Lang::T('Location')}</a></li>
{$_MENU_CUSTOMERS} {$_MENU_CUSTOMERS}
</ul> </ul>
</li> </li>
{$_MENU_AFTER_CUSTOMERS} {$_MENU_AFTER_CUSTOMERS}
<li class="{if $_system_menu eq 'plan'}active{/if} treeview"> <li class="{if $_system_menu eq 'plan'}active{/if} treeview">
<a href="#"> <a href="#">
<i class="fa fa-ticket"></i> <span>{Lang::T('Services')}</span> <i class="fa fa-ticket"></i> <span>{Lang::T('Services')}</span>
<span class="pull-right-container"> <span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</span> </span>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<li {if $_routes[1] eq 'list' }class="active" {/if}><a <li {if $_routes[1] eq 'list' }class="active" {/if}><a
href="{$_url}plan/list">{Lang::T('Active Users')}</a></li> href="{$_url}plan/list">{Lang::T('Active Users')}</a></li>
{if $_c['disable_voucher'] != 'yes'} {if $_c['disable_voucher'] != 'yes'}
<li {if $_routes[1] eq 'voucher' }class="active" {/if}><a <li {if $_routes[1] eq 'voucher' }class="active" {/if}><a
href="{$_url}plan/voucher">{Lang::T('Vouchers')}</a></li> href="{$_url}plan/voucher">{Lang::T('Vouchers')}</a></li>
<li {if $_routes[1] eq 'refill' }class="active" {/if}><a <li {if $_routes[1] eq 'refill' }class="active" {/if}><a
href="{$_url}plan/refill">{Lang::T('Refill Customer')}</a></li> href="{$_url}plan/refill">{Lang::T('Refill Customer')}</a></li>
{/if} {/if}
<li {if $_routes[1] eq 'recharge' }class="active" {/if}><a <li {if $_routes[1] eq 'recharge' }class="active" {/if}><a
href="{$_url}plan/recharge">{Lang::T('Recharge Customer')}</a></li> href="{$_url}plan/recharge">{Lang::T('Recharge Customer')}</a></li>
{if $_c['enable_balance'] == 'yes'} {if $_c['enable_balance'] == 'yes'}
<li {if $_routes[1] eq 'deposit' }class="active" {/if}><a <li {if $_routes[1] eq 'deposit' }class="active" {/if}><a
href="{$_url}plan/deposit">{Lang::T('Refill Balance')}</a></li> href="{$_url}plan/deposit">{Lang::T('Refill Balance')}</a></li>
{/if} {/if}
{$_MENU_SERVICES} {$_MENU_SERVICES}
</ul> </ul>
</li> </li>
{/if} {/if}
{$_MENU_AFTER_SERVICES} {$_MENU_AFTER_SERVICES}
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<li class="{if $_system_menu eq 'services'}active{/if} treeview"> <li class="{if $_system_menu eq 'services'}active{/if} treeview">
<a href="#"> <a href="#">
<i class="ion ion-cube"></i> <span>{Lang::T('Internet Plan')}</span> <i class="ion ion-cube"></i> <span>{Lang::T('Internet Plan')}</span>
<span class="pull-right-container"> <span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</span> </span>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<li {if $_routes[1] eq 'hotspot' }class="active" {/if}><a <li {if $_routes[1] eq 'hotspot' }class="active" {/if}><a
href="{$_url}services/hotspot">Hotspot</a></li> href="{$_url}services/hotspot">Hotspot</a></li>
<li {if $_routes[1] eq 'pppoe' }class="active" {/if}><a <li {if $_routes[1] eq 'pppoe' }class="active" {/if}><a
href="{$_url}services/pppoe">PPPOE</a></li> href="{$_url}services/pppoe">PPPOE</a></li>
<li {if $_routes[1] eq 'list' }class="active" {/if}><a <li {if $_routes[1] eq 'list' }class="active" {/if}><a
href="{$_url}bandwidth/list">{Lang::T('Bandwidth')}</a></li> href="{$_url}bandwidth/list">{Lang::T('Bandwidth')}</a></li>
{if $_c['enable_balance'] == 'yes'} {if $_c['enable_balance'] == 'yes'}
<li {if $_routes[1] eq 'balance' }class="active" {/if}><a <li {if $_routes[1] eq 'balance' }class="active" {/if}><a
href="{$_url}services/balance">{Lang::T('Customer Balance')}</a></li> href="{$_url}services/balance">{Lang::T('Customer Balance')}</a></li>
{/if} {/if}
{$_MENU_PLANS} {$_MENU_PLANS}
</ul> </ul>
</li> </li>
{/if} {/if}
{$_MENU_AFTER_PLANS} {$_MENU_AFTER_PLANS}
<li class="{if $_system_menu eq 'reports'}active{/if} treeview"> <li class="{if $_system_menu eq 'reports'}active{/if} treeview">
@ -260,64 +260,64 @@
</li> </li>
{$_MENU_AFTER_MESSAGE} {$_MENU_AFTER_MESSAGE}
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<li class="{if $_system_menu eq 'network'}active{/if} treeview"> <li class="{if $_system_menu eq 'network'}active{/if} treeview">
<a href="#"> <a href="#">
<i class="ion ion-network"></i> <span>{Lang::T('Network')}</span> <i class="ion ion-network"></i> <span>{Lang::T('Network')}</span>
<span class="pull-right-container"> <span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</span> </span>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<li {if $_routes[0] eq 'routers' and $_routes[1] eq 'list' }class="active" {/if}><a <li {if $_routes[0] eq 'routers' and $_routes[1] eq 'list' }class="active" {/if}><a
href="{$_url}routers/list">{Lang::T('Routers')}</a></li> href="{$_url}routers/list">{Lang::T('Routers')}</a></li>
<li {if $_routes[0] eq 'pool' and $_routes[1] eq 'list' }class="active" {/if}><a <li {if $_routes[0] eq 'pool' and $_routes[1] eq 'list' }class="active" {/if}><a
href="{$_url}pool/list">{Lang::T('IP Pool')}</a></li> href="{$_url}pool/list">{Lang::T('IP Pool')}</a></li>
{$_MENU_NETWORK} {$_MENU_NETWORK}
</ul> </ul>
</li> </li>
{$_MENU_AFTER_NETWORKS} {$_MENU_AFTER_NETWORKS}
{if $_c['radius_enable']} {if $_c['radius_enable']}
<li class="{if $_system_menu eq 'radius'}active{/if} treeview"> <li class="{if $_system_menu eq 'radius'}active{/if} treeview">
<a href="#"> <a href="#">
<i class="fa fa-database"></i> <span>{Lang::T('Radius')}</span> <i class="fa fa-database"></i> <span>{Lang::T('Radius')}</span>
<span class="pull-right-container"> <span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</span> </span>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<li {if $_routes[0] eq 'radius' and $_routes[1] eq 'nas-list' }class="active" {/if}><a <li {if $_routes[0] eq 'radius' and $_routes[1] eq 'nas-list' }class="active" {/if}><a
href="{$_url}radius/nas-list">{Lang::T('Radius NAS')}</a></li> href="{$_url}radius/nas-list">{Lang::T('Radius NAS')}</a></li>
{$_MENU_RADIUS} {$_MENU_RADIUS}
</ul> </ul>
</li>
{/if}
{$_MENU_AFTER_RADIUS}
<li class="{if $_system_menu eq 'pages'}active{/if} treeview">
<a href="#">
<i class="ion ion-document"></i> <span>{Lang::T("Static Pages")}</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li {if $_routes[1] eq 'Order_Voucher' }class="active" {/if}><a
href="{$_url}pages/Order_Voucher">{Lang::T('Order Voucher')}</a></li>
<li {if $_routes[1] eq 'Voucher' }class="active" {/if}><a
href="{$_url}pages/Voucher">{Lang::T('Voucher')} Template</a></li>
<li {if $_routes[1] eq 'Announcement' }class="active" {/if}><a
href="{$_url}pages/Announcement">{Lang::T('Announcement')}</a></li>
<li {if $_routes[1] eq 'Announcement_Customer' }class="active" {/if}><a
href="{$_url}pages/Announcement_Customer">{Lang::T('Customer Announcement')}</a>
</li> </li>
{/if} <li {if $_routes[1] eq 'Registration_Info' }class="active" {/if}><a
{$_MENU_AFTER_RADIUS} href="{$_url}pages/Registration_Info">{Lang::T('Registration Info')}</a></li>
<li class="{if $_system_menu eq 'pages'}active{/if} treeview"> <li {if $_routes[1] eq 'Privacy_Policy' }class="active" {/if}><a
<a href="#"> href="{$_url}pages/Privacy_Policy">{Lang::T('Privacy Policy')}</a></li>
<i class="ion ion-document"></i> <span>{Lang::T("Static Pages")}</span> <li {if $_routes[1] eq 'Terms_and_Conditions' }class="active" {/if}><a
<span class="pull-right-container"> href="{$_url}pages/Terms_and_Conditions">{Lang::T('Terms and Conditions')}</a></li>
<i class="fa fa-angle-left pull-right"></i> {$_MENU_PAGES}
</span> </ul>
</a> </li>
<ul class="treeview-menu">
<li {if $_routes[1] eq 'Order_Voucher' }class="active" {/if}><a
href="{$_url}pages/Order_Voucher">{Lang::T('Order Voucher')}</a></li>
<li {if $_routes[1] eq 'Voucher' }class="active" {/if}><a
href="{$_url}pages/Voucher">{Lang::T('Voucher')} Template</a></li>
<li {if $_routes[1] eq 'Announcement' }class="active" {/if}><a
href="{$_url}pages/Announcement">{Lang::T('Announcement')}</a></li>
<li {if $_routes[1] eq 'Announcement_Customer' }class="active" {/if}><a
href="{$_url}pages/Announcement_Customer">{Lang::T('Customer Announcement')}</a>
</li>
<li {if $_routes[1] eq 'Registration_Info' }class="active" {/if}><a
href="{$_url}pages/Registration_Info">{Lang::T('Registration Info')}</a></li>
<li {if $_routes[1] eq 'Privacy_Policy' }class="active" {/if}><a
href="{$_url}pages/Privacy_Policy">{Lang::T('Privacy Policy')}</a></li>
<li {if $_routes[1] eq 'Terms_and_Conditions' }class="active" {/if}><a
href="{$_url}pages/Terms_and_Conditions">{Lang::T('Terms and Conditions')}</a></li>
{$_MENU_PAGES}
</ul>
</li>
{/if} {/if}
{$_MENU_AFTER_PAGES} {$_MENU_AFTER_PAGES}
<li <li
@ -330,31 +330,33 @@
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<li {if $_routes[1] eq 'app' }class="active" {/if}><a <li {if $_routes[1] eq 'app' }class="active" {/if}><a
href="{$_url}settings/app">{Lang::T('General Settings')}</a></li> href="{$_url}settings/app">{Lang::T('General Settings')}</a></li>
<li {if $_routes[1] eq 'localisation' }class="active" {/if}><a <li {if $_routes[1] eq 'localisation' }class="active" {/if}><a
href="{$_url}settings/localisation">{Lang::T('Localisation')}</a></li> href="{$_url}settings/localisation">{Lang::T('Localisation')}</a></li>
<li {if $_routes[1] eq 'notifications' }class="active" {/if}><a <li {if $_routes[1] eq 'maintenance' }class="active" {/if}><a
href="{$_url}settings/notifications">{Lang::T('User Notification')}</a></li> href="{$_url}settings/maintenance">{Lang::T('Maintenance Mode')}</a></li>
<li {if $_routes[1] eq 'notifications' }class="active" {/if}><a
href="{$_url}settings/notifications">{Lang::T('User Notification')}</a></li>
{/if} {/if}
{if in_array($_admin['user_type'],['SuperAdmin','Admin','Agent'])} {if in_array($_admin['user_type'],['SuperAdmin','Admin','Agent'])}
<li {if $_routes[1] eq 'users' }class="active" {/if}><a <li {if $_routes[1] eq 'users' }class="active" {/if}><a
href="{$_url}settings/users">{Lang::T('Administrator Users')}</a></li> href="{$_url}settings/users">{Lang::T('Administrator Users')}</a></li>
{/if} {/if}
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<li {if $_routes[1] eq 'dbstatus' }class="active" {/if}><a <li {if $_routes[1] eq 'dbstatus' }class="active" {/if}><a
href="{$_url}settings/dbstatus">{Lang::T('Backup/Restore')}</a></li> href="{$_url}settings/dbstatus">{Lang::T('Backup/Restore')}</a></li>
<li {if $_system_menu eq 'paymentgateway' }class="active" {/if}> <li {if $_system_menu eq 'paymentgateway' }class="active" {/if}>
<a href="{$_url}paymentgateway"> <a href="{$_url}paymentgateway">
<span class="text">{Lang::T('Payment Gateway')}</span> <span class="text">{Lang::T('Payment Gateway')}</span>
</a> </a>
</li> </li>
{$_MENU_SETTINGS} {$_MENU_SETTINGS}
<li {if $_routes[0] eq 'pluginmanager' }class="active" {/if}> <li {if $_routes[0] eq 'pluginmanager' }class="active" {/if}>
<a href="{$_url}pluginmanager"><i class="glyphicon glyphicon-tasks"></i> <a href="{$_url}pluginmanager"><i class="glyphicon glyphicon-tasks"></i>
{Lang::T('Plugin Manager')} <small class="label pull-right">Free</small></a> {Lang::T('Plugin Manager')} <small class="label pull-right">Free</small></a>
</li> </li>
{* <li {if $_routes[0] eq 'codecanyon' }class="active" {/if}> {* <li {if $_routes[0] eq 'codecanyon' }class="active" {/if}>
<a href="{$_url}codecanyon"><i class="glyphicon glyphicon-shopping-cart"></i> <a href="{$_url}codecanyon"><i class="glyphicon glyphicon-shopping-cart"></i>
Codecanyon.net <small class="label pull-right">Paid</small></a> Codecanyon.net <small class="label pull-right">Paid</small></a>
</li> *} </li> *}
@ -363,24 +365,24 @@
</li> </li>
{$_MENU_AFTER_SETTINGS} {$_MENU_AFTER_SETTINGS}
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])} {if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<li class="{if $_system_menu eq 'logs' }active{/if} treeview"> <li class="{if $_system_menu eq 'logs' }active{/if} treeview">
<a href="#"> <a href="#">
<i class="ion ion-clock"></i> <span>{Lang::T('Logs')}</span> <i class="ion ion-clock"></i> <span>{Lang::T('Logs')}</span>
<span class="pull-right-container"> <span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</span> </span>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
<li {if $_routes[1] eq 'list' }class="active" {/if}><a <li {if $_routes[1] eq 'list' }class="active" {/if}><a
href="{$_url}logs/phpnuxbill">PhpNuxBill</a></li> href="{$_url}logs/phpnuxbill">PhpNuxBill</a></li>
{if $_c['radius_enable']} {if $_c['radius_enable']}
<li {if $_routes[1] eq 'radius' }class="active" {/if}><a <li {if $_routes[1] eq 'radius' }class="active" {/if}><a
href="{$_url}logs/radius">Radius</a> href="{$_url}logs/radius">Radius</a>
</li> </li>
{/if} {/if}
</ul> </ul>
{$_MENU_LOGS} {$_MENU_LOGS}
</li> </li>
{/if} {/if}
{$_MENU_AFTER_LOGS} {$_MENU_AFTER_LOGS}
<li {if $_system_menu eq 'community' }class="active" {/if}> <li {if $_system_menu eq 'community' }class="active" {/if}>
@ -403,20 +405,20 @@
<section class="content"> <section class="content">
{if isset($notify)} {if isset($notify)}
<script> <script>
// Display SweetAlert toast notification // Display SweetAlert toast notification
Swal.fire({ Swal.fire({
icon: '{if $notify_t == "s"}success{else}error{/if}', icon: '{if $notify_t == "s"}success{else}error{/if}',
title: '{$notify}', title: '{$notify}',
toast: true, toast: true,
position: 'top-end', position: 'top-end',
showConfirmButton: false, showConfirmButton: false,
timer: 5000, timer: 5000,
timerProgressBar: true, timerProgressBar: true,
didOpen: (toast) => { didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer) toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer) toast.addEventListener('mouseleave', Swal.resumeTimer)
} }
}); });
</script> </script>
{/if} {/if}