limit uptime dan kuota masuk Mikrotik, setting pilih Tema dihapus
This commit is contained in:
parent
8c5ef4faff
commit
cdc9e5f9d8
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/system/config.php
|
/system/config.php
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.vscode/
|
.vscode/
|
||||||
|
ui/compiled/*.tpl.php
|
@ -7,8 +7,8 @@
|
|||||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
* @donate PayPal: iesien22@yahoo.com / Bank Mandiri: 130.00.1024957.4
|
* @donate PayPal: iesien22@yahoo.com / Bank Mandiri: 130.00.1024957.4
|
||||||
**/
|
**/
|
||||||
ini_set('display_errors', 1);
|
//ini_set('display_errors', 1);
|
||||||
ini_set('display_startup_errors', 1);
|
//ini_set('display_startup_errors', 1);
|
||||||
error_reporting(E_ALL);
|
//error_reporting(E_ALL);
|
||||||
require ('system/boot.php');
|
require ('system/boot.php');
|
||||||
App::_run();
|
App::_run();
|
||||||
|
@ -105,13 +105,59 @@ switch ($action) {
|
|||||||
$client($removeRequest
|
$client($removeRequest
|
||||||
->setArgument('numbers', $userName)
|
->setArgument('numbers', $userName)
|
||||||
);
|
);
|
||||||
|
/* iBNuX Added:
|
||||||
|
* Time limit to Mikrotik
|
||||||
|
* 'Time_Limit', 'Data_Limit', 'Both_Limit'
|
||||||
|
*/
|
||||||
$addRequest = new RouterOS\Request('/ip/hotspot/user/add');
|
$addRequest = new RouterOS\Request('/ip/hotspot/user/add');
|
||||||
$client->sendSync($addRequest
|
if($p['typebp']=="Limited"){
|
||||||
->setArgument('name', $c['username'])
|
if($p['limit_type']=="Time_Limit"){
|
||||||
->setArgument('profile', $p['name_plan'])
|
if($p['time_unit']=='Hrs')
|
||||||
->setArgument('password', $c['password'])
|
$timelimit = $p['time_limit'].":00:00";
|
||||||
);
|
else
|
||||||
|
$timelimit = "00:".$p['time_limit'].":00";
|
||||||
|
$client->sendSync($addRequest
|
||||||
|
->setArgument('name', $c['username'])
|
||||||
|
->setArgument('profile', $p['name_plan'])
|
||||||
|
->setArgument('password', $c['password'])
|
||||||
|
->setArgument('limit-uptime', $timelimit)
|
||||||
|
);
|
||||||
|
}else if($p['limit_type']=="Data_Limit"){
|
||||||
|
if($p['data_unit']=='GB')
|
||||||
|
$datalimit = $p['data_limit']."000000000";
|
||||||
|
else
|
||||||
|
$datalimit = $p['data_limit']."000000";
|
||||||
|
$client->sendSync($addRequest
|
||||||
|
->setArgument('name', $c['username'])
|
||||||
|
->setArgument('profile', $p['name_plan'])
|
||||||
|
->setArgument('password', $c['password'])
|
||||||
|
->setArgument('limit-bytes-total', $datalimit)
|
||||||
|
);
|
||||||
|
}else if($p['limit_type']=="Both_Limit"){
|
||||||
|
if($p['time_unit']=='Hrs')
|
||||||
|
$timelimit = $p['time_limit'].":00:00";
|
||||||
|
else
|
||||||
|
$timelimit = "00:".$p['time_limit'].":00";
|
||||||
|
if($p['data_unit']=='GB')
|
||||||
|
$datalimit = $p['data_limit']."000000000";
|
||||||
|
else
|
||||||
|
$datalimit = $p['data_limit']."000000";
|
||||||
|
$client->sendSync($addRequest
|
||||||
|
->setArgument('name', $c['username'])
|
||||||
|
->setArgument('profile', $p['name_plan'])
|
||||||
|
->setArgument('password', $c['password'])
|
||||||
|
->setArgument('limit-uptime', $timelimit)
|
||||||
|
->setArgument('limit-bytes-total', $datalimit)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$client->sendSync($addRequest
|
||||||
|
->setArgument('name', $c['username'])
|
||||||
|
->setArgument('profile', $p['name_plan'])
|
||||||
|
->setArgument('password', $c['password'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$b->customer_id = $id_customer;
|
$b->customer_id = $id_customer;
|
||||||
$b->username = $c['username'];
|
$b->username = $c['username'];
|
||||||
$b->plan_id = $plan;
|
$b->plan_id = $plan;
|
||||||
@ -145,12 +191,59 @@ switch ($action) {
|
|||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
die('Unable to connect to the router.');
|
die('Unable to connect to the router.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* iBNuX Added:
|
||||||
|
* Time limit to Mikrotik
|
||||||
|
* 'Time_Limit', 'Data_Limit', 'Both_Limit'
|
||||||
|
*/
|
||||||
$addRequest = new RouterOS\Request('/ip/hotspot/user/add');
|
$addRequest = new RouterOS\Request('/ip/hotspot/user/add');
|
||||||
$client->sendSync($addRequest
|
if($p['typebp']=="Limited"){
|
||||||
->setArgument('name', $c['username'])
|
if($p['limit_type']=="Time_Limit"){
|
||||||
->setArgument('profile', $p['name_plan'])
|
if($p['time_unit']=='Hrs')
|
||||||
->setArgument('password', $c['password'])
|
$timelimit = $p['time_limit'].":00:00";
|
||||||
);
|
else
|
||||||
|
$timelimit = "00:".$p['time_limit'].":00";
|
||||||
|
$client->sendSync($addRequest
|
||||||
|
->setArgument('name', $c['username'])
|
||||||
|
->setArgument('profile', $p['name_plan'])
|
||||||
|
->setArgument('password', $c['password'])
|
||||||
|
->setArgument('limit-uptime', $timelimit)
|
||||||
|
);
|
||||||
|
}else if($p['limit_type']=="Data_Limit"){
|
||||||
|
if($p['data_unit']=='GB')
|
||||||
|
$datalimit = $p['data_limit']."000000000";
|
||||||
|
else
|
||||||
|
$datalimit = $p['data_limit']."000000";
|
||||||
|
$client->sendSync($addRequest
|
||||||
|
->setArgument('name', $c['username'])
|
||||||
|
->setArgument('profile', $p['name_plan'])
|
||||||
|
->setArgument('password', $c['password'])
|
||||||
|
->setArgument('limit-bytes-total', $datalimit)
|
||||||
|
);
|
||||||
|
}else if($p['limit_type']=="Both_Limit"){
|
||||||
|
if($p['time_unit']=='Hrs')
|
||||||
|
$timelimit = $p['time_limit'].":00:00";
|
||||||
|
else
|
||||||
|
$timelimit = "00:".$p['time_limit'].":00";
|
||||||
|
if($p['data_unit']=='GB')
|
||||||
|
$datalimit = $p['data_limit']."000000000";
|
||||||
|
else
|
||||||
|
$datalimit = $p['data_limit']."000000";
|
||||||
|
$client->sendSync($addRequest
|
||||||
|
->setArgument('name', $c['username'])
|
||||||
|
->setArgument('profile', $p['name_plan'])
|
||||||
|
->setArgument('password', $c['password'])
|
||||||
|
->setArgument('limit-uptime', $timelimit)
|
||||||
|
->setArgument('limit-bytes-total', $datalimit)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$client->sendSync($addRequest
|
||||||
|
->setArgument('name', $c['username'])
|
||||||
|
->setArgument('profile', $p['name_plan'])
|
||||||
|
->setArgument('password', $c['password'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_user_recharges')->create();
|
$d = ORM::for_table('tbl_user_recharges')->create();
|
||||||
$d->customer_id = $id_customer;
|
$d->customer_id = $id_customer;
|
||||||
|
@ -126,6 +126,7 @@ $_L['Select_Account'] = 'Select Account';
|
|||||||
$_L['Service_Plan'] = 'Service Plan';
|
$_L['Service_Plan'] = 'Service Plan';
|
||||||
$_L['Recharge'] = 'Recharge';
|
$_L['Recharge'] = 'Recharge';
|
||||||
$_L['Method'] = 'Method';
|
$_L['Method'] = 'Method';
|
||||||
|
$_L['account_created_successfully'] = 'Account Created Successfully';
|
||||||
|
|
||||||
$_L['Database_Status'] = 'Database Status';
|
$_L['Database_Status'] = 'Database Status';
|
||||||
$_L['Total_Database_Size'] = 'Total Database Size';
|
$_L['Total_Database_Size'] = 'Total Database Size';
|
||||||
|
@ -126,6 +126,7 @@ $_L['Select_Account'] = 'Pilih Akun';
|
|||||||
$_L['Service_Plan'] = 'Paket';
|
$_L['Service_Plan'] = 'Paket';
|
||||||
$_L['Recharge'] = 'Isi Ulang Akun';
|
$_L['Recharge'] = 'Isi Ulang Akun';
|
||||||
$_L['Method'] = 'Metode';
|
$_L['Method'] = 'Metode';
|
||||||
|
$_L['account_created_successfully'] = 'Account Created Successfully';
|
||||||
|
|
||||||
$_L['Database_Status'] = 'Status Database';
|
$_L['Database_Status'] = 'Status Database';
|
||||||
$_L['Total_Database_Size'] = 'Ukuran Database';
|
$_L['Total_Database_Size'] = 'Ukuran Database';
|
||||||
|
@ -27,12 +27,11 @@
|
|||||||
<input type="text" class="form-control" id="phone" name="phone" value="{$_c['phone']}">
|
<input type="text" class="form-control" id="phone" name="phone" value="{$_c['phone']}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group hidden">
|
||||||
<label class="col-md-2 control-label">Theme</label>
|
<label class="col-md-2 control-label">Theme</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select name="theme" id="theme" class="form-control">
|
<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>
|
||||||
<option value="blue" {if $_c['theme'] eq 'blue'}selected="selected" {/if}>Blue</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user