Enable disable router and plan
This commit is contained in:
parent
464f41ef16
commit
4fa341d854
@ -69,6 +69,7 @@ switch ($action) {
|
||||
$username = _post('username');
|
||||
$password = _post('password');
|
||||
$description = _post('description');
|
||||
$enabled = _post('enabled')*1;
|
||||
|
||||
$msg = '';
|
||||
if(Validator::Length($name,30,4) == false){
|
||||
@ -99,6 +100,7 @@ switch ($action) {
|
||||
$d->username = $username;
|
||||
$d->password = $password;
|
||||
$d->description = $description;
|
||||
$d->enabled = $enabled;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'routers/list', 's', $_L['Created_Successfully']);
|
||||
@ -114,7 +116,7 @@ switch ($action) {
|
||||
$username = _post('username');
|
||||
$password = _post('password');
|
||||
$description = _post('description');
|
||||
|
||||
$enabled = $_POST['enabled']*1;
|
||||
$msg = '';
|
||||
if(Validator::Length($name,30,4) == false){
|
||||
$msg .= 'Name should be between 5 to 30 characters'. '<br>';
|
||||
@ -163,25 +165,28 @@ switch ($action) {
|
||||
$d->username = $username;
|
||||
$d->password = $password;
|
||||
$d->description = $description;
|
||||
$d->enabled = $enabled;
|
||||
$d->save();
|
||||
$p = ORM::for_table('tbl_plans')->where('routers',$oldname)->find_result_set();
|
||||
$p->set('routers',$name);
|
||||
$p->save();
|
||||
$p = ORM::for_table('tbl_payment_gateway')->where('routers',$oldname)->find_result_set();
|
||||
$p->set('routers',$name);
|
||||
$p->save();
|
||||
$p = ORM::for_table('tbl_pool')->where('routers',$oldname)->find_result_set();
|
||||
$p->set('routers',$name);
|
||||
$p->save();
|
||||
$p = ORM::for_table('tbl_transactions')->where('routers',$oldname)->find_result_set();
|
||||
$p->set('routers',$name);
|
||||
$p->save();
|
||||
$p = ORM::for_table('tbl_user_recharges')->where('routers',$oldname)->find_result_set();
|
||||
$p->set('routers',$name);
|
||||
$p->save();
|
||||
$p = ORM::for_table('tbl_voucher')->where('routers',$oldname)->find_result_set();
|
||||
$p->set('routers',$name);
|
||||
$p->save();
|
||||
if($name!=$oldname){
|
||||
$p = ORM::for_table('tbl_plans')->where('routers',$oldname)->find_result_set();
|
||||
$p->set('routers',$name);
|
||||
$p->save();
|
||||
$p = ORM::for_table('tbl_payment_gateway')->where('routers',$oldname)->find_result_set();
|
||||
$p->set('routers',$name);
|
||||
$p->save();
|
||||
$p = ORM::for_table('tbl_pool')->where('routers',$oldname)->find_result_set();
|
||||
$p->set('routers',$name);
|
||||
$p->save();
|
||||
$p = ORM::for_table('tbl_transactions')->where('routers',$oldname)->find_result_set();
|
||||
$p->set('routers',$name);
|
||||
$p->save();
|
||||
$p = ORM::for_table('tbl_user_recharges')->where('routers',$oldname)->find_result_set();
|
||||
$p->set('routers',$name);
|
||||
$p->save();
|
||||
$p = ORM::for_table('tbl_voucher')->where('routers',$oldname)->find_result_set();
|
||||
$p->set('routers',$name);
|
||||
$p->save();
|
||||
}
|
||||
r2(U . 'routers/list', 's', $_L['Updated_Successfully']);
|
||||
}else{
|
||||
r2(U . 'routers/edit/'.$id, 'e', $msg);
|
||||
|
@ -109,6 +109,7 @@ switch ($action) {
|
||||
$validity = _post('validity');
|
||||
$validity_unit = _post('validity_unit');
|
||||
$routers = _post('routers');
|
||||
$enabled = _post('enabled')*1;
|
||||
|
||||
$msg = '';
|
||||
if (Validator::UnsignedNumber($validity) == false) {
|
||||
@ -172,6 +173,7 @@ switch ($action) {
|
||||
$d->validity_unit = $validity_unit;
|
||||
$d->shared_users = $sharedusers;
|
||||
$d->routers = $routers;
|
||||
$d->enabled = $enabled;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'services/hotspot', 's', $_L['Created_Successfully']);
|
||||
@ -196,6 +198,7 @@ switch ($action) {
|
||||
$validity = _post('validity');
|
||||
$validity_unit = _post('validity_unit');
|
||||
$routers = _post('routers');
|
||||
$enabled = _post('enabled')*1;
|
||||
|
||||
$msg = '';
|
||||
if (Validator::UnsignedNumber($validity) == false) {
|
||||
@ -264,6 +267,7 @@ switch ($action) {
|
||||
$d->validity_unit = $validity_unit;
|
||||
$d->shared_users = $sharedusers;
|
||||
$d->routers = $routers;
|
||||
$d->enabled = $enabled;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'services/hotspot', 's', $_L['Updated_Successfully']);
|
||||
@ -357,6 +361,7 @@ switch ($action) {
|
||||
$validity_unit = _post('validity_unit');
|
||||
$routers = _post('routers');
|
||||
$pool = _post('pool_name');
|
||||
$enabled = _post('enabled')*1;
|
||||
|
||||
$msg = '';
|
||||
if (Validator::UnsignedNumber($validity) == false) {
|
||||
@ -415,6 +420,7 @@ switch ($action) {
|
||||
$d->validity_unit = $validity_unit;
|
||||
$d->routers = $routers;
|
||||
$d->pool = $pool;
|
||||
$d->enabled = $enabled;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'services/pppoe', 's', $_L['Created_Successfully']);
|
||||
@ -432,6 +438,7 @@ switch ($action) {
|
||||
$validity_unit = _post('validity_unit');
|
||||
$routers = _post('routers');
|
||||
$pool = _post('pool_name');
|
||||
$enabled = _post('enabled')*1;
|
||||
|
||||
$msg = '';
|
||||
if (Validator::UnsignedNumber($validity) == false) {
|
||||
@ -495,6 +502,7 @@ switch ($action) {
|
||||
$d->validity_unit = $validity_unit;
|
||||
$d->routers = $routers;
|
||||
$d->pool = $pool;
|
||||
$d->enabled = $enabled;
|
||||
$d->save();
|
||||
|
||||
r2(U . 'services/pppoe', 's', $_L['Updated_Successfully']);
|
||||
|
@ -254,3 +254,5 @@ $_L['Explain_Coverage_of_router'] = 'Jelaskan Cakupan wilayah hotspot';
|
||||
$_L['Name_of_Area_that_router_operated'] = 'Nama Lokasi/Wilayah Router beroperasi';
|
||||
$_L['Payment_Notification_URL_Recurring_Notification_URL_Pay_Account_Notification_URL'] = 'Payment Notification URL, Recurring Notification URL, Pay Account Notification URL';
|
||||
$_L['Finish_Redirect_URL_Unfinish_Redirect_URL_Error_Redirect_URL'] = 'Finish Redirect URL, Unfinish Redirect URL, Error Redirect URL';
|
||||
$_L['Status'] = 'Status';
|
||||
$_L['Status'] = 'Status';
|
||||
|
26
system/radius.php
Normal file
26
system/radius.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
||||
**/
|
||||
|
||||
if(php_sapi_name() !== 'cli'){
|
||||
die("RUN ON COMMAND LINE ONLY BY RADIUS ENGINE");
|
||||
}
|
||||
|
||||
require('config.php');
|
||||
require('orm.php');
|
||||
|
||||
use PEAR2\Net\RouterOS;
|
||||
require_once 'autoload/PEAR2/Autoload.php';
|
||||
|
||||
ORM::configure("mysql:host=$db_host;dbname=$db_name");
|
||||
ORM::configure('username', $db_user);
|
||||
ORM::configure('password', $db_password);
|
||||
ORM::configure('return_result_sets', true);
|
||||
ORM::configure('logging', true);
|
||||
|
||||
$result = ORM::for_table('tbl_appconfig')->find_many();
|
||||
foreach($result as $value){
|
||||
$config[$value['setting']]=$value['value'];
|
||||
}
|
||||
date_default_timezone_set($config['timezone']);
|
@ -5,118 +5,127 @@
|
||||
<div class="panel panel-default panel-hovered panel-stacked mb30">
|
||||
<div class="panel-heading">{$_L['Add_Plan']}</div>
|
||||
<div class="panel-body">
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}services/add-post" >
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" checked name="enabled" value="1"> Enable
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="enabled" value="0"> Disable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Plan_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="name" name="name">
|
||||
<p class="help-block">{Lang::T('Cannot be change after saved')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Plan_Type']}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="radio" id="Unlimited" name="typebp" value="Unlimited" checked> {$_L['Unlimited']}
|
||||
<input type="radio" id="Limited" name="typebp" value="Limited"> {$_L['Limited']}
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:none;" id="Type">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Limit_Type']}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="radio" id="Time_Limit" name="limit_type" value="Time_Limit" checked> {$_L['Time_Limit']}
|
||||
<input type="radio" id="Data_Limit" name="limit_type" value="Data_Limit"> {$_L['Data_Limit']}
|
||||
<input type="radio" id="Both_Limit" name="limit_type" value="Both_Limit"> {$_L['Both_Limit']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:none;" id="TimeLimit">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Time_Limit']}</label>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" id="time_limit" name="time_limit" value="0">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select class="form-control" id="time_unit" name="time_unit">
|
||||
<option value="Hrs">{$_L['Hrs']}</option>
|
||||
<option value="Mins">{$_L['Mins']}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:none;" id="DataLimit">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Data_Limit']}</label>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" id="data_limit" name="data_limit" value="0">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select class="form-control" id="data_unit" name="data_unit">
|
||||
<option value="MB">MBs</option>
|
||||
<option value="GB">GBs</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['BW_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
<select id="id_bw" name="id_bw" class="form-control">
|
||||
<option value="">{$_L['Select_BW']}...</option>
|
||||
{foreach $d as $ds}
|
||||
<option value="{$ds['id']}">{$ds['name_bw']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Plan_Price']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="pricebp" name="pricebp">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Shared_Users']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="sharedusers" name="sharedusers" value="1">
|
||||
<p class="help-block">{Lang::T('1 user can be used for many devices?')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Plan_Validity']}</label>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" id="validity" name="validity">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select class="form-control" id="validity_unit" name="validity_unit">
|
||||
<option value="Mins" {if $d['validity_unit'] eq 'Mins'} selected {/if}>{$_L['Mins']}</option>
|
||||
<option value="Hrs" {if $d['validity_unit'] eq 'Hrs'} selected {/if}>{$_L['Hrs']}</option>
|
||||
<option value="Days" {if $d['validity_unit'] eq 'Days'} selected {/if}>{$_L['Days']}</option>
|
||||
<option value="Months" {if $d['validity_unit'] eq 'Months'} selected {/if}>{$_L['Months']}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Router_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
<select id="routers" name="routers" class="form-control">
|
||||
{foreach $r as $rs}
|
||||
<option value="{$rs['name']}">{$rs['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<p class="help-block">{Lang::T('Cannot be change after saved')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}services/add-post" >
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Plan_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="name" name="name">
|
||||
<p class="help-block">{Lang::T('Cannot be change after saved')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Plan_Type']}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="radio" id="Unlimited" name="typebp" value="Unlimited" checked> {$_L['Unlimited']}
|
||||
<input type="radio" id="Limited" name="typebp" value="Limited"> {$_L['Limited']}
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:none;" id="Type">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Limit_Type']}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="radio" id="Time_Limit" name="limit_type" value="Time_Limit" checked> {$_L['Time_Limit']}
|
||||
<input type="radio" id="Data_Limit" name="limit_type" value="Data_Limit"> {$_L['Data_Limit']}
|
||||
<input type="radio" id="Both_Limit" name="limit_type" value="Both_Limit"> {$_L['Both_Limit']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:none;" id="TimeLimit">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Time_Limit']}</label>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" id="time_limit" name="time_limit" value="0">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select class="form-control" id="time_unit" name="time_unit">
|
||||
<option value="Hrs">{$_L['Hrs']}</option>
|
||||
<option value="Mins">{$_L['Mins']}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:none;" id="DataLimit">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Data_Limit']}</label>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" id="data_limit" name="data_limit" value="0">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select class="form-control" id="data_unit" name="data_unit">
|
||||
<option value="MB">MBs</option>
|
||||
<option value="GB">GBs</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['BW_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
<select id="id_bw" name="id_bw" class="form-control">
|
||||
<option value="">{$_L['Select_BW']}...</option>
|
||||
{foreach $d as $ds}
|
||||
<option value="{$ds['id']}">{$ds['name_bw']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Plan_Price']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="pricebp" name="pricebp">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Shared_Users']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="sharedusers" name="sharedusers" value="1">
|
||||
<p class="help-block">{Lang::T('1 user can be used for many devices?')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Plan_Validity']}</label>
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" id="validity" name="validity">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select class="form-control" id="validity_unit" name="validity_unit">
|
||||
<option value="Mins" {if $d['validity_unit'] eq 'Mins'} selected {/if}>{$_L['Mins']}</option>
|
||||
<option value="Hrs" {if $d['validity_unit'] eq 'Hrs'} selected {/if}>{$_L['Hrs']}</option>
|
||||
<option value="Days" {if $d['validity_unit'] eq 'Days'} selected {/if}>{$_L['Days']}</option>
|
||||
<option value="Months" {if $d['validity_unit'] eq 'Months'} selected {/if}>{$_L['Months']}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Router_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
<select id="routers" name="routers" class="form-control">
|
||||
{foreach $r as $rs}
|
||||
<option value="{$rs['name']}">{$rs['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<p class="help-block">{Lang::T('Cannot be change after saved')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-success waves-effect waves-light" type="submit">{$_L['Save']}</button>
|
||||
Or <a href="{$_url}services/hotspot">{$_L['Cancel']}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-success waves-effect waves-light" type="submit">{$_L['Save']}</button>
|
||||
Or <a href="{$_url}services/hotspot">{$_L['Cancel']}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -5,9 +5,19 @@
|
||||
<div class="panel panel-default panel-hovered panel-stacked mb30">
|
||||
<div class="panel-heading">{$_L['Edit_Plan']}</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}services/edit-post">
|
||||
<input type="hidden" name="id" value="{$d['id']}">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" {if $d['enabled'] == 1}checked{/if} name="enabled" value="1"> Enable
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" {if $d['enabled'] == 0}checked{/if} name="enabled" value="0"> Disable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Plan_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
|
@ -23,42 +23,42 @@
|
||||
<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-striped table-bordered">
|
||||
<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>{$_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>{$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>
|
||||
<a href="{$_url}services/edit/{$ds['id']}" class="btn btn-info btn-sm btn-block">{$_L['Edit']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$paginator['contents']}
|
||||
|
||||
<table class="table table-striped table-bordered">
|
||||
<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>{$_L['Manage']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr>
|
||||
<td>{$ds['name_plan']}</td>
|
||||
<td>{$ds['typebp']}</td>
|
||||
<td>{$ds['name_bw']}</td>
|
||||
<td>{$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>
|
||||
<a href="{$_url}services/edit/{$ds['id']}" class="btn btn-warning btn-sm">{$_L['Edit']}</a>
|
||||
<a href="{$_url}services/delete/{$ds['id']}" id="{$ds['id']}" class="btn btn-danger btn-sm cdelete">{$_L['Delete']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{$paginator['contents']}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,6 +6,17 @@
|
||||
<div class="panel-heading">{$_L['Add_Plan']}</div>
|
||||
<div class="panel-body">
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}services/pppoe-add-post" >
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" checked name="enabled" value="1"> Enable
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="enabled" value="0"> Disable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Plan_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
|
@ -7,6 +7,17 @@
|
||||
<div class="panel-body">
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}services/edit-pppoe-post">
|
||||
<input type="hidden" name="id" value="{$d['id']}">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" {if $d['enabled'] == 1}checked{/if} name="enabled" value="1"> Enable
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" {if $d['enabled'] == 0}checked{/if} name="enabled" value="0"> Disable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Plan_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
|
@ -23,37 +23,37 @@
|
||||
<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>
|
||||
|
||||
<table class="table table-striped table-bordered">
|
||||
<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>{$_L['Routers']}</th>
|
||||
<th>{$_L['Manage']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr>
|
||||
<td>{$ds['name_plan']}</td>
|
||||
<td>{$ds['name_bw']}</td>
|
||||
<td>{$ds['price']}</td>
|
||||
<td>{$ds['validity']} {$ds['validity_unit']}</td>
|
||||
<td>{$ds['pool']}</td>
|
||||
<td>{$ds['routers']}</td>
|
||||
<td>
|
||||
<a href="{$_url}services/pppoe-edit/{$ds['id']}" class="btn btn-warning btn-sm">{$_L['Edit']}</a>
|
||||
<a href="{$_url}services/pppoe-delete/{$ds['id']}" id="{$ds['id']}" class="btn btn-danger btn-sm cdelete">{$_L['Delete']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{$paginator['contents']}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<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>{$_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>{$ds['price']}</td>
|
||||
<td>{$ds['validity']} {$ds['validity_unit']}</td>
|
||||
<td>{$ds['pool']}</td>
|
||||
<td>{$ds['routers']}</td>
|
||||
<td>
|
||||
<a href="{$_url}services/pppoe-edit/{$ds['id']}" class="btn btn-info btn-sm btn-block">{$_L['Edit']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$paginator['contents']}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -7,6 +7,17 @@
|
||||
<div class="panel-body">
|
||||
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}routers/add-post" >
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" checked name="enabled" value="1"> Enable
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="enabled" value="0"> Disable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Router_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
|
@ -7,6 +7,17 @@
|
||||
<div class="panel-body">
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}routers/edit-post" >
|
||||
<input type="hidden" name="id" value="{$d['id']}">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio-inline warning">
|
||||
<input type="radio" {if $d['enabled'] == 1}checked{/if} name="enabled" value="1"> Enable
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" {if $d['enabled'] == 0}checked{/if} name="enabled" value="0"> Disable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Router_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
@ -39,7 +50,6 @@
|
||||
<p class="help-block">{Lang::T('Explain Coverage of router')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-primary waves-effect waves-light" type="submit">{$_L['Save']}</button>
|
||||
|
@ -32,19 +32,20 @@
|
||||
<th>{$_L['IP_Address']}</th>
|
||||
<th>{$_L['Username']}</th>
|
||||
<th>{$_L['Description']}</th>
|
||||
<th>{Lang::T('Status')}</th>
|
||||
<th>{$_L['Manage']}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr>
|
||||
<tr {if $ds['enabled'] != 1}class="danger" title="disabled"{/if}>
|
||||
<td>{$ds['name']}</td>
|
||||
<td>{$ds['ip_address']}</td>
|
||||
<td>{$ds['username']}</td>
|
||||
<td>{$ds['description']}</td>
|
||||
<td>{if $ds['enabled'] == 1}Enabled{else}Disabled{/if}</td>
|
||||
<td>
|
||||
<a href="{$_url}routers/edit/{$ds['id']}" class="btn btn-warning btn-sm">{$_L['Edit']}</a>
|
||||
<a href="{$_url}routers/delete/{$ds['id']}" id="{$ds['id']}" class="btn btn-danger btn-sm cdelete">{$_L['Delete']}</a>
|
||||
<a href="{$_url}routers/edit/{$ds['id']}" class="btn btn-info btn-sm btn-block">{$_L['Edit']}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
|
@ -12,34 +12,35 @@
|
||||
{$router['description']}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="row">
|
||||
{foreach $plans as $plan}
|
||||
{if $router['name'] eq $plan['routers']}
|
||||
<div class="col-sm-3">
|
||||
<div class="panel mb10 panel-default panel-hovered">
|
||||
<div class="panel-heading"> {$plan['name_plan']}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Price</td>
|
||||
<td>{$plan['price']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Validity</td>
|
||||
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="{$_url}order/hotspot-buy/{$router['id']}/{$plan['id']}" class="btn btn-sm btn-block btn-primary">Buy</a>
|
||||
|
||||
<div class="panel-body row">
|
||||
{foreach $plans as $plan}
|
||||
{if $router['name'] eq $plan['routers']}
|
||||
<div class="col-sm-3">
|
||||
<div class="panel mb10 panel-default panel-hovered">
|
||||
<div class="panel-heading"> {$plan['name_plan']}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Price</td>
|
||||
<td>{$plan['price']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Validity</td>
|
||||
<td>{$plan['validity']} {$plan['validity_unit']}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href="{$_url}order/hotspot-buy/{$router['id']}/{$plan['id']}" class="btn btn-sm btn-block btn-primary">Buy</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user