forked from kevinowino869/mitrobill
Fix edit customer plan
This commit is contained in:
@ -35,15 +35,6 @@ class MikrotikHotspot
|
||||
$this->removeHotspotActiveUser($client, $customer['username']);
|
||||
}
|
||||
|
||||
function change_customer($customer, $plan)
|
||||
{
|
||||
$mikrotik = $this->info($plan['routers']);
|
||||
$client = $this->getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
$this->removeHotspotUser($client, $customer['username']);
|
||||
$this->removeHotspotActiveUser($client, $customer['username']);
|
||||
$this->addHotspotUser($client, $plan, $customer);
|
||||
}
|
||||
|
||||
function add_plan($plan)
|
||||
{
|
||||
$mikrotik = $this->info($plan['routers']);
|
||||
|
@ -35,16 +35,6 @@ class MikrotikPppoe
|
||||
$this->removePpoeActive($client, $customer['username']);
|
||||
}
|
||||
|
||||
function change_customer($customer, $plan)
|
||||
{
|
||||
$mikrotik = $this->info($plan['routers']);
|
||||
$client = $this->getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
$this->removePpoeUser($client, $customer['username']);
|
||||
$this->removePpoeActive($client, $customer['username']);
|
||||
$this->addPpoeUser($client, $plan, $customer);
|
||||
}
|
||||
|
||||
|
||||
function add_plan($plan)
|
||||
{
|
||||
$mikrotik = $this->info($plan['routers']);
|
||||
|
@ -20,19 +20,13 @@ class Radius {
|
||||
{
|
||||
if (empty($plan['plan_expired'])) {
|
||||
$p = ORM::for_table("tbl_plans")->find_one($plan['plan_expired']);
|
||||
$this->customerDeactivate($customer['username']);
|
||||
$this->customerAddPlan($customer, $p);
|
||||
$this->customerAddPlan($customer, $plan);
|
||||
} else {
|
||||
$this->upsertCustomerAttr($customer['username'], 'Framed-Pool', $plan['pool_expired'], ':=');
|
||||
$this->disconnectCustomer($customer['username']);
|
||||
}
|
||||
}
|
||||
|
||||
function change_customer($customer, $plan)
|
||||
{
|
||||
$this->customerUpsert($customer, $plan);
|
||||
}
|
||||
|
||||
function add_plan($plan)
|
||||
{
|
||||
$bw = ORM::for_table("tbl_bandwidth")->find_one($plan['id_bw']);
|
||||
@ -92,6 +86,7 @@ class Radius {
|
||||
|
||||
function disconnect_customer($customer, $router_name)
|
||||
{
|
||||
$this->disconnectCustomer($customer['username']);
|
||||
}
|
||||
|
||||
public function getTableNas()
|
||||
|
@ -7,38 +7,42 @@ just follow the template
|
||||
|
||||
class FileName {
|
||||
|
||||
// Add Customer to Mikrotik/Device
|
||||
function add_customer($customer, $plan)
|
||||
{
|
||||
}
|
||||
|
||||
// Remove Customer to Mikrotik/Device
|
||||
function remove_customer($customer, $plan)
|
||||
{
|
||||
}
|
||||
|
||||
function change_customer($customer, $plan)
|
||||
{
|
||||
}
|
||||
|
||||
// Add Plan to Mikrotik/Device
|
||||
function add_plan($plan)
|
||||
{
|
||||
}
|
||||
|
||||
// Update Plan to Mikrotik/Device
|
||||
function update_plan($old_name, $plan)
|
||||
{
|
||||
}
|
||||
|
||||
// Remove Plan from Mikrotik/Device
|
||||
function remove_plan($plan)
|
||||
{
|
||||
}
|
||||
|
||||
// check if customer is online
|
||||
function online_customer($customer, $router_name)
|
||||
{
|
||||
}
|
||||
|
||||
// make customer online
|
||||
function connect_customer($customer, $ip, $mac_address, $router_name)
|
||||
{
|
||||
}
|
||||
|
||||
// make customer disconnect
|
||||
function disconnect_customer($customer, $router_name)
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user