Merge branch 'Development'
This commit is contained in:
commit
e88c678f2f
Binary file not shown.
Before Width: | Height: | Size: 178 KiB |
Binary file not shown.
Before Width: | Height: | Size: 48 KiB |
@ -70,6 +70,17 @@ switch ($action) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 'sync':
|
||||
$pools = ORM::for_table('tbl_pool')->find_many();
|
||||
$log = '';
|
||||
foreach($pools as $pool){
|
||||
$mikrotik = Mikrotik::info($pool['routers']);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::addPool($client, $pool['pool_name'], $pool['range_ip']);
|
||||
$log .= 'DONE: '.$pool['pool_name'].': '.$pool['range_ip'].'<br>';
|
||||
}
|
||||
r2(U . 'pool/list', 's', $log);
|
||||
break;
|
||||
case 'add-post':
|
||||
$name = _post('name');
|
||||
$ip_address = _post('ip_address');
|
||||
|
@ -40,6 +40,28 @@ EOT;
|
||||
require_once 'system/autoload/PEAR2/Autoload.php';
|
||||
|
||||
switch ($action) {
|
||||
case 'sync':
|
||||
set_time_limit(-1);
|
||||
$plans = ORM::for_table('tbl_user_recharges')->where('status', 'on')->find_many();
|
||||
echo count($plans);
|
||||
$log = '';
|
||||
$router = '';
|
||||
foreach ($plans as $plan) {
|
||||
if ($router != $plan['routers']) {
|
||||
$mikrotik = Mikrotik::info($plan['routers']);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
$router = $plan['routers'];
|
||||
}
|
||||
$p = ORM::for_table('tbl_plans')->findOne($plan['plan_id']);
|
||||
$c = ORM::for_table('tbl_customers')->findOne($plan['customer_id']);
|
||||
if ($plan['type'] == 'Hotspot') {
|
||||
Mikrotik::addHotspotUser($client, $p, $c);
|
||||
} else if ($plan['type'] == 'PPPOE') {
|
||||
Mikrotik::addPpoeUser($client, $p, $c);
|
||||
}
|
||||
$log .= "DONE : $plan[username], $plan[namebp], $plan[type], $plan[routers]<br>";
|
||||
}
|
||||
r2(U . 'prepaid/list', 's', $log);
|
||||
case 'list':
|
||||
$ui->assign('xfooter', '<script type="text/javascript" src="ui/lib/c/prepaid.js"></script>');
|
||||
$ui->assign('_title', $_L['Customers']);
|
||||
@ -65,7 +87,7 @@ switch ($action) {
|
||||
$ui->assign('p', $p);
|
||||
$r = ORM::for_table('tbl_routers')->where('enabled', '1')->find_many();
|
||||
$ui->assign('r', $r);
|
||||
if(isset($routes['2']) && !empty($routes['2'])){
|
||||
if (isset($routes['2']) && !empty($routes['2'])) {
|
||||
$ui->assign('cust', ORM::for_table('tbl_customers')->find_one($routes['2']));
|
||||
}
|
||||
run_hook('view_recharge'); #HOOK
|
||||
|
@ -21,6 +21,68 @@ use PEAR2\Net\RouterOS;
|
||||
require_once 'system/autoload/PEAR2/Autoload.php';
|
||||
|
||||
switch ($action) {
|
||||
case 'sync':
|
||||
set_time_limit(-1);
|
||||
if ($routes['2'] == 'hotspot') {
|
||||
$plans = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'Hotspot')->where('tbl_plans.enabled', '1')->find_many();
|
||||
$log = '';
|
||||
$router = '';
|
||||
foreach ($plans as $plan) {
|
||||
if ($router != $plan['routers']) {
|
||||
$mikrotik = Mikrotik::info($plan['routers']);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
$router = $plan['routers'];
|
||||
}
|
||||
if ($plan['rate_down_unit'] == 'Kbps') {
|
||||
$unitdown = 'K';
|
||||
} else {
|
||||
$unitdown = 'M';
|
||||
}
|
||||
if ($plan['rate_up_unit'] == 'Kbps') {
|
||||
$unitup = 'K';
|
||||
} else {
|
||||
$unitup = 'M';
|
||||
}
|
||||
$rate = $plan['rate_up'] . $unitup . "/" . $plan['rate_down'] . $unitdown;
|
||||
Mikrotik::addHotspotPlan($client, $plan['name_plan'], $plan['shared_users'], $rate);
|
||||
$log .= "DONE : $plan[name_plan], $plan[shared_users], $rate<br>";
|
||||
if (!empty($plan['pool_expired'])) {
|
||||
Mikrotik::setHotspotExpiredPlan($client, 'EXPIRED NUXBILL ' . $plan['pool_expired'], $plan['pool_expired']);
|
||||
$log .= "DONE Expired : EXPIRED NUXBILL $plan[pool_expired]<br>";
|
||||
}
|
||||
}
|
||||
r2(U . 'services/hotspot', 's', $log);
|
||||
}else if ($routes['2'] == 'pppoe') {
|
||||
$plans = ORM::for_table('tbl_bandwidth')->join('tbl_plans', array('tbl_bandwidth.id', '=', 'tbl_plans.id_bw'))->where('tbl_plans.type', 'PPPOE')->where('tbl_plans.enabled', '1')->find_many();
|
||||
$log = '';
|
||||
$router = '';
|
||||
foreach ($plans as $plan) {
|
||||
if ($router != $plan['routers']) {
|
||||
$mikrotik = Mikrotik::info($plan['routers']);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
$router = $plan['routers'];
|
||||
}
|
||||
if ($plan['rate_down_unit'] == 'Kbps') {
|
||||
$unitdown = 'K';
|
||||
} else {
|
||||
$unitdown = 'M';
|
||||
}
|
||||
if ($plan['rate_up_unit'] == 'Kbps') {
|
||||
$unitup = 'K';
|
||||
} else {
|
||||
$unitup = 'M';
|
||||
}
|
||||
$rate = $plan['rate_up'] . $unitup . "/" . $plan['rate_down'] . $unitdown;
|
||||
Mikrotik::addPpoePlan($client, $plan['name_plan'], $plan['pool'], $rate);
|
||||
$log .= "DONE : $plan[name_plan], $plan[pool], $rate<br>";
|
||||
if (!empty($plan['pool_expired'])) {
|
||||
Mikrotik::setPpoePlan($client, 'EXPIRED NUXBILL ' . $plan['pool_expired'], $plan['pool_expired'], '512K/512K');
|
||||
$log .= "DONE Expired : EXPIRED NUXBILL $plan[pool_expired]<br>";
|
||||
}
|
||||
}
|
||||
r2(U . 'services/pppoe', 's', $log);
|
||||
}
|
||||
r2(U . 'services/hotspot', 'w', 'Unknown command');
|
||||
case 'hotspot':
|
||||
$ui->assign('xfooter', '<script type="text/javascript" src="ui/lib/c/hotspot.js"></script>');
|
||||
|
||||
@ -135,8 +197,8 @@ switch ($action) {
|
||||
$mikrotik = Mikrotik::info($routers);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::addHotspotPlan($client, $name, $sharedusers, $rate);
|
||||
if(!empty($pool_expired)){
|
||||
Mikrotik::setHotspotExpiredPlan($client, 'EXPIRED NUXBILL '.$pool_expired, $pool_expired);
|
||||
if (!empty($pool_expired)) {
|
||||
Mikrotik::setHotspotExpiredPlan($client, 'EXPIRED NUXBILL ' . $pool_expired, $pool_expired);
|
||||
}
|
||||
}
|
||||
|
||||
@ -220,8 +282,8 @@ switch ($action) {
|
||||
$mikrotik = Mikrotik::info($routers);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::setHotspotPlan($client, $name, $sharedusers, $rate);
|
||||
if(!empty($pool_expired)){
|
||||
Mikrotik::setHotspotExpiredPlan($client, 'EXPIRED NUXBILL '.$pool_expired, $pool_expired);
|
||||
if (!empty($pool_expired)) {
|
||||
Mikrotik::setHotspotExpiredPlan($client, 'EXPIRED NUXBILL ' . $pool_expired, $pool_expired);
|
||||
}
|
||||
}
|
||||
|
||||
@ -358,8 +420,8 @@ switch ($action) {
|
||||
$mikrotik = Mikrotik::info($routers);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::addPpoePlan($client, $name, $pool, $rate);
|
||||
if(!empty($pool_expired)){
|
||||
Mikrotik::setPpoePlan($client, 'EXPIRED NUXBILL '.$pool_expired, $pool_expired, '512K/512K');
|
||||
if (!empty($pool_expired)) {
|
||||
Mikrotik::setPpoePlan($client, 'EXPIRED NUXBILL ' . $pool_expired, $pool_expired, '512K/512K');
|
||||
}
|
||||
}
|
||||
|
||||
@ -429,8 +491,8 @@ switch ($action) {
|
||||
$mikrotik = Mikrotik::info($routers);
|
||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||
Mikrotik::setPpoePlan($client, $name, $pool, $rate);
|
||||
if(!empty($pool_expired)){
|
||||
Mikrotik::setPpoePlan($client, 'EXPIRED NUXBILL '.$pool_expired, $pool_expired, '512K/512K');
|
||||
if (!empty($pool_expired)) {
|
||||
Mikrotik::setPpoePlan($client, 'EXPIRED NUXBILL ' . $pool_expired, $pool_expired, '512K/512K');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,70 +1,81 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-hovered mb20 panel-primary">
|
||||
<div class="panel-heading">{$_L['Hotspot_Plans']}</div>
|
||||
<div class="panel-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
||||
<div class="col-md-8">
|
||||
<form id="site-search" method="post" action="{$_url}services/hotspot/">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="name" class="form-control" placeholder="{$_L['Search_by_Name']}...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="{$_url}services/add" class="btn btn-primary btn-block waves-effect"><i class="ion ion-android-add"> </i> {$_L['New_Plan']}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$_L['Plan_Name']}</th>
|
||||
<th>{$_L['Plan_Type']}</th>
|
||||
<th>{$_L['Bandwidth_Plans']}</th>
|
||||
<th>{$_L['Plan_Price']}</th>
|
||||
<th>{$_L['Time_Limit']}</th>
|
||||
<th>{$_L['Data_Limit']}</th>
|
||||
<th>{$_L['Plan_Validity']}</th>
|
||||
<th>{$_L['Routers']}</th>
|
||||
<th>{Lang::T('Expired IP Pool')}</th>
|
||||
<th>{$_L['Manage']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr {if $ds['enabled'] != 1}class="danger" title="disabled"{/if}>
|
||||
<td>{$ds['name_plan']}</td>
|
||||
<td>{$ds['typebp']}</td>
|
||||
<td>{$ds['name_bw']}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||
<td>{$ds['time_limit']} {$ds['time_unit']}</td>
|
||||
<td>{$ds['data_limit']} {$ds['data_unit']}</td>
|
||||
<td>{$ds['validity']} {$ds['validity_unit']}</td>
|
||||
<td>{$ds['routers']}</td>
|
||||
<td>{$ds['pool_expired']}</td>
|
||||
<td>
|
||||
<a href="{$_url}services/edit/{$ds['id']}" class="btn btn-info btn-xs">{$_L['Edit']}</a>
|
||||
<a href="{$_url}services/delete/{$ds['id']}" id="{$ds['id']}" onclick="return confirm('{$_L['Delete']}?')" class="btn btn-danger btn-xs">{$_L['Delete']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$paginator['contents']}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-hovered mb20 panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-xs" title="save" href="{$_url}services/sync/hotspot"
|
||||
onclick="return confirm('This will sync/send hotspot plan to Mikrotik?')"><span
|
||||
class="glyphicon glyphicon-refresh" aria-hidden="true"></span> sync</a>
|
||||
</div>{$_L['Hotspot_Plans']}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
||||
<div class="col-md-8">
|
||||
<form id="site-search" method="post" action="{$_url}services/hotspot/">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="name" class="form-control"
|
||||
placeholder="{$_L['Search_by_Name']}...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="{$_url}services/add" class="btn btn-primary btn-block waves-effect"><i
|
||||
class="ion ion-android-add"> </i> {$_L['New_Plan']}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$_L['Plan_Name']}</th>
|
||||
<th>{$_L['Plan_Type']}</th>
|
||||
<th>{$_L['Bandwidth_Plans']}</th>
|
||||
<th>{$_L['Plan_Price']}</th>
|
||||
<th>{$_L['Time_Limit']}</th>
|
||||
<th>{$_L['Data_Limit']}</th>
|
||||
<th>{$_L['Plan_Validity']}</th>
|
||||
<th>{$_L['Routers']}</th>
|
||||
<th>{Lang::T('Expired IP Pool')}</th>
|
||||
<th>{$_L['Manage']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr {if $ds['enabled'] != 1}class="danger" title="disabled" {/if}>
|
||||
<td>{$ds['name_plan']}</td>
|
||||
<td>{$ds['typebp']}</td>
|
||||
<td>{$ds['name_bw']}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||
<td>{$ds['time_limit']} {$ds['time_unit']}</td>
|
||||
<td>{$ds['data_limit']} {$ds['data_unit']}</td>
|
||||
<td>{$ds['validity']} {$ds['validity_unit']}</td>
|
||||
<td>{$ds['routers']}</td>
|
||||
<td>{$ds['pool_expired']}</td>
|
||||
<td>
|
||||
<a href="{$_url}services/edit/{$ds['id']}"
|
||||
class="btn btn-info btn-xs">{$_L['Edit']}</a>
|
||||
<a href="{$_url}services/delete/{$ds['id']}" id="{$ds['id']}"
|
||||
onclick="return confirm('{$_L['Delete']}?')"
|
||||
class="btn btn-danger btn-xs">{$_L['Delete']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$paginator['contents']}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="sections/footer.tpl"}
|
@ -3,7 +3,14 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-hovered mb20 panel-primary">
|
||||
<div class="panel-heading">{$_L['Pool']}</div>
|
||||
<div class="panel-heading">
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-xs" title="save" href="{$_url}pool/sync"
|
||||
onclick="return confirm('This will sync/send IP Pool to Mikrotik?')"><span
|
||||
class="glyphicon glyphicon-refresh" aria-hidden="true"></span> sync</a>
|
||||
</div>
|
||||
{$_L['Pool']}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
||||
<div class="col-md-8">
|
||||
@ -45,9 +52,9 @@
|
||||
<td>{$ds['range_ip']}</td>
|
||||
<td>{$ds['routers']}</td>
|
||||
<td align="center">
|
||||
<a href="{$_url}pool/edit/{$ds['id']}"
|
||||
class="btn btn-info btn-xs">{$_L['Edit']}</a>
|
||||
<a href="{$_url}pool/delete/{$ds['id']}" id="{$ds['id']}" onclick="return confirm('{$_L['Delete']}?')"
|
||||
<a href="{$_url}pool/edit/{$ds['id']}" class="btn btn-info btn-xs">{$_L['Edit']}</a>
|
||||
<a href="{$_url}pool/delete/{$ds['id']}" id="{$ds['id']}"
|
||||
onclick="return confirm('{$_L['Delete']}?')"
|
||||
class="btn btn-danger btn-xs">{$_L['Delete']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
133
ui/ui/pppoe.tpl
133
ui/ui/pppoe.tpl
@ -1,65 +1,76 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-hovered mb20 panel-primary">
|
||||
<div class="panel-heading">{$_L['PPPOE_Plans']}</div>
|
||||
<div class="panel-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
||||
<div class="col-md-8">
|
||||
<form id="site-search" method="post" action="{$_url}services/pppoe/">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="name" class="form-control" placeholder="{$_L['Search_by_Name']}...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="{$_url}services/pppoe-add" class="btn btn-primary btn-block waves-effect"><i class="ion ion-android-add"> </i> {$_L['New_Plan']}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$_L['Plan_Name']}</th>
|
||||
<th>{$_L['Bandwidth_Plans']}</th>
|
||||
<th>{$_L['Plan_Price']}</th>
|
||||
<th>{$_L['Plan_Validity']}</th>
|
||||
<th>{$_L['Pool']}</th>
|
||||
<th>{Lang::T('Expired IP Pool')}</th>
|
||||
<th>{$_L['Routers']}</th>
|
||||
<th>{$_L['Manage']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr {if $ds['enabled'] != 1}class="danger" title="disabled"{/if}>
|
||||
<td>{$ds['name_plan']}</td>
|
||||
<td>{$ds['name_bw']}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||
<td>{$ds['validity']} {$ds['validity_unit']}</td>
|
||||
<td>{$ds['pool']}</td>
|
||||
<td>{$ds['pool_expired']}</td>
|
||||
<td>{$ds['routers']}</td>
|
||||
<td>
|
||||
<a href="{$_url}services/pppoe-edit/{$ds['id']}" class="btn btn-info btn-xs">{$_L['Edit']}</a>
|
||||
<a href="{$_url}services/pppoe-delete/{$ds['id']}" onclick="return confirm('{$_L['Delete']}?')" id="{$ds['id']}" class="btn btn-danger btn-xs">{$_L['Delete']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$paginator['contents']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-hovered mb20 panel-primary">
|
||||
<div class="panel-heading">
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-xs" title="save" href="{$_url}services/sync/pppoe"
|
||||
onclick="return confirm('This will sync/send PPPOE plan to Mikrotik?')"><span
|
||||
class="glyphicon glyphicon-refresh" aria-hidden="true"></span> sync</a>
|
||||
</div>{$_L['PPPOE_Plans']}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
||||
<div class="col-md-8">
|
||||
<form id="site-search" method="post" action="{$_url}services/pppoe/">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
</div>
|
||||
<input type="text" name="name" class="form-control"
|
||||
placeholder="{$_L['Search_by_Name']}...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="{$_url}services/pppoe-add" class="btn btn-primary btn-block waves-effect"><i
|
||||
class="ion ion-android-add"> </i> {$_L['New_Plan']}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{$_L['Plan_Name']}</th>
|
||||
<th>{$_L['Bandwidth_Plans']}</th>
|
||||
<th>{$_L['Plan_Price']}</th>
|
||||
<th>{$_L['Plan_Validity']}</th>
|
||||
<th>{$_L['Pool']}</th>
|
||||
<th>{Lang::T('Expired IP Pool')}</th>
|
||||
<th>{$_L['Routers']}</th>
|
||||
<th>{$_L['Manage']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr {if $ds['enabled'] != 1}class="danger" title="disabled" {/if}>
|
||||
<td>{$ds['name_plan']}</td>
|
||||
<td>{$ds['name_bw']}</td>
|
||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||
<td>{$ds['validity']} {$ds['validity_unit']}</td>
|
||||
<td>{$ds['pool']}</td>
|
||||
<td>{$ds['pool_expired']}</td>
|
||||
<td>{$ds['routers']}</td>
|
||||
<td>
|
||||
<a href="{$_url}services/pppoe-edit/{$ds['id']}"
|
||||
class="btn btn-info btn-xs">{$_L['Edit']}</a>
|
||||
<a href="{$_url}services/pppoe-delete/{$ds['id']}"
|
||||
onclick="return confirm('{$_L['Delete']}?')" id="{$ds['id']}"
|
||||
class="btn btn-danger btn-xs">{$_L['Delete']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$paginator['contents']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="sections/footer.tpl"}
|
@ -3,7 +3,13 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-hovered mb20 panel-primary">
|
||||
<div class="panel-heading">{$_L['Prepaid_User']}</div>
|
||||
<div class="panel-heading">
|
||||
<div class="btn-group pull-right">
|
||||
<a class="btn btn-primary btn-xs" title="save" href="{$_url}prepaid/sync"
|
||||
onclick="return confirm('This will sync/send Caustomer active plan to Mikrotik?')"><span
|
||||
class="glyphicon glyphicon-refresh" aria-hidden="true"></span> sync</a>
|
||||
</div>{$_L['Prepaid_User']}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
|
||||
<div class="col-md-8">
|
||||
@ -41,7 +47,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr {if $ds['status']=='off'}class="danger"{/if}>
|
||||
<tr {if $ds['status']=='off'}class="danger" {/if}>
|
||||
<td><a href="{$_url}customers/viewu/{$ds['username']}">{$ds['username']}</a></td>
|
||||
<td>{$ds['namebp']}</td>
|
||||
<td>{$ds['type']}</td>
|
||||
@ -53,7 +59,7 @@
|
||||
<a href="{$_url}prepaid/edit/{$ds['id']}"
|
||||
class="btn btn-warning btn-xs">{$_L['Edit']}</a>
|
||||
<a href="{$_url}prepaid/delete/{$ds['id']}" id="{$ds['id']}"
|
||||
onclick="return confirm('{$_L['Delete']}?')"
|
||||
onclick="return confirm('{$_L['Delete']}?')"
|
||||
class="btn btn-danger btn-xs">{$_L['Delete']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -42,7 +42,8 @@
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Router_Secret']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="password" name="password">
|
||||
<input type="text" class="form-control" id="password" name="password"
|
||||
onmouseleave="this.type = 'password'" onmouseenter="this.type = 'text'">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
Loading…
x
Reference in New Issue
Block a user