fix lang.php
This commit is contained in:
parent
bf00b21786
commit
88bbf3ed35
@ -142,12 +142,6 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($tur['status'] != 'on') {
|
if ($tur['status'] != 'on') {
|
||||||
$days = $config['extend_days'];
|
|
||||||
$expiration = date('Y-m-d', strtotime(" +$days day"));
|
|
||||||
$tur->expiration = $expiration;
|
|
||||||
$tur->status = "on";
|
|
||||||
$tur->save();
|
|
||||||
App::setToken(_get('stoken'), $id);
|
|
||||||
if ($tur['routers'] != 'radius') {
|
if ($tur['routers'] != 'radius') {
|
||||||
$mikrotik = Mikrotik::info($tur['routers']);
|
$mikrotik = Mikrotik::info($tur['routers']);
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
@ -159,12 +153,20 @@ if (isset($_GET['recharge']) && !empty($_GET['recharge'])) {
|
|||||||
Radius::customerAddPlan($c, $p, $tur['expiration'] . ' ' . $tur['time']);
|
Radius::customerAddPlan($c, $p, $tur['expiration'] . ' ' . $tur['time']);
|
||||||
} else {
|
} else {
|
||||||
if ($tur['type'] == 'Hotspot') {
|
if ($tur['type'] == 'Hotspot') {
|
||||||
|
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||||
Mikrotik::addHotspotUser($client, $p, $c);
|
Mikrotik::addHotspotUser($client, $p, $c);
|
||||||
} else if ($tur['type'] == 'PPPOE') {
|
} else if ($tur['type'] == 'PPPOE') {
|
||||||
|
Mikrotik::removePpoeUser($client, $c['username']);
|
||||||
Mikrotik::addPpoeUser($client, $p, $c);
|
Mikrotik::addPpoeUser($client, $p, $c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// make customer cannot extend again
|
// make customer cannot extend again
|
||||||
|
$days = $config['extend_days'];
|
||||||
|
$expiration = date('Y-m-d', strtotime(" +$days day"));
|
||||||
|
$tur->expiration = $expiration;
|
||||||
|
$tur->status = "on";
|
||||||
|
$tur->save();
|
||||||
|
App::setToken(_get('stoken'), $id);
|
||||||
file_put_contents($path, $m);
|
file_put_contents($path, $m);
|
||||||
_log("Customer $tur[customer_id] $tur[username] extend for $days days", "Customer", $user['id']);
|
_log("Customer $tur[customer_id] $tur[username] extend for $days days", "Customer", $user['id']);
|
||||||
r2(U . 'home', 's', "Extend until $expiration");
|
r2(U . 'home', 's', "Extend until $expiration");
|
||||||
|
@ -575,5 +575,7 @@
|
|||||||
"Extend_Postpaid_Expiration": "Extend Postpaid Expiration",
|
"Extend_Postpaid_Expiration": "Extend Postpaid Expiration",
|
||||||
"Allow_Extend": "Allow Extend",
|
"Allow_Extend": "Allow Extend",
|
||||||
"Extend_Days": "Extend Days",
|
"Extend_Days": "Extend Days",
|
||||||
"Confirmation_Message": "Confirmation Message"
|
"Confirmation_Message": "Confirmation Message",
|
||||||
|
"You_are_already_logged_in": "You are already logged in",
|
||||||
|
"Extend": "Extend"
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user