Merge branch 'Development' of https://github.com/gerandonk/phpnuxbill into Development

This commit is contained in:
gerandonk
2024-09-18 19:13:45 +07:00
37 changed files with 2009 additions and 334 deletions

View File

@ -128,6 +128,14 @@
</div>
<span class="help-block col-md-4">{Lang::T('Change title in user Plan order')}</span>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('VPN Package')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="vpn_plan" name="vpn_plan"
value="{if $_c['vpn_plan']==''}VPN Plan{else}{$_c['vpn_plan']}{/if}">
</div>
<span class="help-block col-md-4">{Lang::T('Change title in user Plan order')}</span>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<button class="btn btn-primary"

View File

@ -70,6 +70,7 @@
<option value="Hotspot">Hotspot
</option>
<option value="PPPoE">PPPoE</option>
<option value="VPN">VPN</option>
<option value="Others">{Lang::T('Others')}</option>
</select>
</div>

View File

@ -75,6 +75,7 @@
<option value="Hotspot" {if $d['service_type'] eq 'Hotspot' }selected{/if}>Hotspot
</option>
<option value="PPPoE" {if $d['service_type'] eq 'PPPoE' }selected{/if}>PPPoE</option>
<option value="VPN" {if $d['service_type'] eq 'VPN' }selected{/if}>VPN</option>
<option value="Others" {if $d['service_type'] eq 'Others' }selected{/if}>Others</option>
</select>
</div>

View File

@ -29,7 +29,7 @@
<div class="md-whiteframe-z1 mb20 text-center" style="padding: 15px">
<div class="col-lg-4">
<div class="input-group">
<span class="input-group-addon">Order &nbsp;&nbsp;</span>
<span class="input-group-addon">Order&nbsp;&nbsp;</span>
<div class="row row-no-gutters">
<div class="col-xs-8">
<select class="form-control" id="order" name="order">

View File

@ -54,7 +54,7 @@
<li>{Lang::dateFormat($start_date)}</li>
<li>{Lang::dateFormat($current_date)}</li>
{if $_c['enable_balance'] == 'yes' && in_array($_admin['user_type'],['SuperAdmin','Admin', 'Report'])}
<li>
<li onclick="window.location.href = '{$_url}customers&search=&order=balance&filter=Active&orderby=desc'" style="cursor: pointer;">
{Lang::T('Customer Balance')} <sup>{$_c['currency_code']}</sup>
<b>{number_format($cb,0,$_c['dec_point'],$_c['thousands_sep'])}</b>
</li>
@ -194,6 +194,25 @@
</div>
</div>
{/if}
{if $run_date}
{assign var="current_time" value=$smarty.now}
{assign var="run_time" value=strtotime($run_date)}
{if $current_time - $run_time > 3600}
<div class="panel panel-cron-warning panel-hovered mb20 activities">
<div class="panel-heading"><i class="fa fa-clock-o"></i> &nbsp; {Lang::T('Cron has not run for over 1 hour. Please
check your setup.')}</div>
</div>
{else}
<div class="panel panel-cron-success panel-hovered mb20 activities">
<div class="panel-heading">{Lang::T('Cron Job last ran on')}: {$run_date}</div>
</div>
{/if}
{else}
<div class="panel panel-cron-danger panel-hovered mb20 activities">
<div class="panel-heading"><i class="fa fa-warning"></i> &nbsp; {Lang::T('Cron appear not been setup, please check
your cron setup.')}</div>
</div>
{/if}
{if $_c['hide_pg'] != 'yes'}
<div class="panel panel-success panel-hovered mb20 activities">
<div class="panel-heading">{Lang::T('Payment Gateway')}: {str_replace(',',', ',$_c['payment_gateway'])}

View File

@ -35,8 +35,8 @@
<select class="form-control" id="type2" name="type2">
<option value="">{Lang::T('Type')}</option>
{foreach $type2s as $t}
<option value="{$t}" {if $type2 eq $t }selected{/if}>{Lang::T($t)}
</option>
<option value="{$t}" {if $type2 eq $t }selected{/if}>{Lang::T($t)}
</option>
{/foreach}
</select>
</div>
@ -44,9 +44,9 @@
<select class="form-control" id="bandwidth" name="bandwidth">
<option value="">Bandwidth</option>
{foreach $bws as $b}
<option value="{$b['id']}" {if $bandwidth eq $b['id'] }selected{/if}>
{$b['name_bw']}
</option>
<option value="{$b['id']}" {if $bandwidth eq $b['id'] }selected{/if}>
{$b['name_bw']}
</option>
{/foreach}
</select>
</div>
@ -54,8 +54,8 @@
<select class="form-control" id="type3" name="type3">
<option value="">{Lang::T('Category')}</option>
{foreach $type3s as $t}
<option value="{$t}" {if $type3 eq $t }selected{/if}>{$t}
</option>
<option value="{$t}" {if $type3 eq $t }selected{/if}>{$t}
</option>
{/foreach}
</select>
</div>
@ -63,8 +63,8 @@
<select class="form-control" id="valid" name="valid">
<option value="">{Lang::T('Validity')}</option>
{foreach $valids as $v}
<option value="{$v}" {if $valid eq $v }selected{/if}>{$v}
</option>
<option value="{$v}" {if $valid eq $v }selected{/if}>{$v}
</option>
{/foreach}
</select>
</div>
@ -72,7 +72,7 @@
<select class="form-control" id="router" name="router">
<option value="">{Lang::T('Location')}</option>
{foreach $routers as $r}
<option value="{$r}" {if $router eq $r }selected{/if}>{$r}</option>
<option value="{$r}" {if $router eq $r }selected{/if}>{$r}</option>
{/foreach}
<option value="radius" {if $router eq 'radius' }selected{/if}>Radius</option>
</select>
@ -81,7 +81,7 @@
<select class="form-control" id="device" name="device">
<option value="">{Lang::T('Device')}</option>
{foreach $devices as $r}
<option value="{$r}" {if $device eq $r }selected{/if}>{$r}</option>
<option value="{$r}" {if $device eq $r }selected{/if}>{$r}</option>
{/foreach}
</select>
</div>
@ -104,38 +104,40 @@
</div>
</form>
<div class="table-responsive">
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th></th>
<th colspan="5" class="text-center">{Lang::T('Internet Package')}</th>
<th colspan="2" class="text-center" style="background-color: rgb(246, 244, 244);">{Lang::T('Limit')}</th>
<th colspan="2"></th>
<th colspan="2" class="text-center" style="background-color: rgb(243, 241, 172);">
{Lang::T('Expired')}</th>
<th colspan="3"></th>
</tr>
<tr>
<th>{Lang::T('Name')}</th>
<th>{Lang::T('Type')}</th>
<th><a href="{$_url}bandwidth/list">Bandwidth</a></th>
<th>{Lang::T('Category')}</th>
<th>{Lang::T('Price')}</th>
<th>{Lang::T('Validity')}</th>
<th style="background-color: rgb(246, 244, 244);">{Lang::T('Time')}</th>
<th style="background-color: rgb(246, 244, 244);">{Lang::T('Data')}</th>
<th><a href="{$_url}routers/list">{Lang::T('Location')}</a></th>
<th>{Lang::T('Device')}</th>
<th style="background-color: rgb(243, 241, 172);">{Lang::T('Internet Package')}</th>
<th style="background-color: rgb(243, 241, 172);">{Lang::T('Date')}</th>
<th>{Lang::T('ID')}</th>
<th>{Lang::T('Manage')}</th>
</tr>
</thead>
<tbody>
{foreach $d as $ds}
<div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th></th>
<th colspan="5" class="text-center">{Lang::T('Internet Package')}</th>
<th colspan="2" class="text-center" style="background-color: rgb(246, 244, 244);">
{Lang::T('Limit')}</th>
<th colspan="2"></th>
<th colspan="2" class="text-center" style="background-color: rgb(243, 241, 172);">
{Lang::T('Expired')}</th>
<th colspan="3"></th>
</tr>
<tr>
<th>{Lang::T('Name')}</th>
<th>{Lang::T('Type')}</th>
<th><a href="{$_url}bandwidth/list">Bandwidth</a></th>
<th>{Lang::T('Category')}</th>
<th>{Lang::T('Price')}</th>
<th>{Lang::T('Validity')}</th>
<th style="background-color: rgb(246, 244, 244);">{Lang::T('Time')}</th>
<th style="background-color: rgb(246, 244, 244);">{Lang::T('Data')}</th>
<th><a href="{$_url}routers/list">{Lang::T('Location')}</a></th>
<th>{Lang::T('Device')}</th>
<th style="background-color: rgb(243, 241, 172);">{Lang::T('Internet Package')}</th>
<th style="background-color: rgb(243, 241, 172);">{Lang::T('Date')}</th>
<th>{Lang::T('ID')}</th>
<th>{Lang::T('Manage')}</th>
</tr>
</thead>
<tbody>
{foreach $d as $ds}
<tr {if $ds['enabled'] !=1}class="danger" title="disabled" {elseif $ds['prepaid'] !='yes'
}class="warning" title="Postpaid" {/if}>
}class="warning" title="Postpaid" {/if}>
<td class="headcol">{$ds['name_plan']}</td>
<td>{if $ds['prepaid'] == no}<b>Postpaid</b>{else}Prepaid{/if} {$ds['plan_type']}</td>
<td>{$ds['name_bw']}</td>
@ -146,11 +148,11 @@
<td>{$ds['data_limit']} {$ds['data_unit']}</td>
<td>
{if $ds['is_radius']}
<span class="label label-primary">RADIUS</span>
<span class="label label-primary">RADIUS</span>
{else}
{if $ds['routers']!=''}
<a href="{$_url}routers/edit/0&name={$ds['routers']}">{$ds['routers']}</a>
{/if}
{if $ds['routers']!=''}
<a href="{$_url}routers/edit/0&name={$ds['routers']}">{$ds['routers']}</a>
{/if}
{/if}
</td>
<td>{$ds['device']}</td>
@ -163,13 +165,14 @@
<a href="{$_url}services/edit/{$ds['id']}"
class="btn btn-info btn-xs">{Lang::T('Edit')}</a>
<a href="{$_url}services/delete/{$ds['id']}" id="{$ds['id']}"
onclick="return confirm('{Lang::T('Delete')}?')" class="btn btn-danger btn-xs"><i
class="glyphicon glyphicon-trash"></i></a>
onclick="return confirm('{Lang::T('Delete')}?')"
class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i></a>
</td>
</tr>
{/foreach}
</tbody>
</table>
{/foreach}
</tbody>
</table>
</div>
</div>
<div class="panel-footer">
{include file="pagination.tpl"}
@ -182,4 +185,4 @@
</div>
</div>
{include file="sections/footer.tpl"}
{include file="sections/footer.tpl"}

View File

@ -5,19 +5,19 @@
<div class="panel panel-hovered mb20 panel-primary">
<div class="panel-heading">
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<div class="btn-group pull-right">
<a class="btn btn-primary btn-xs" title="save" href="{$_url}plan/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>
{* <div class="btn-group pull-right">
<a class="btn btn-info btn-xs" title="save" href="{$_url}plan/csv{$append_url}"
onclick="return confirm('This will export to CSV?')"><span class="glyphicon glyphicon-download"
aria-hidden="true"></span> CSV</a>
</div> *}
<div class="btn-group pull-right">
<a class="btn btn-primary btn-xs" title="save" href="{$_url}plan/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>
{* <div class="btn-group pull-right">
<a class="btn btn-info btn-xs" title="save" href="{$_url}plan/csv{$append_url}"
onclick="return confirm('This will export to CSV?')"><span class="glyphicon glyphicon-download"
aria-hidden="true"></span> CSV</a>
</div> *}
{/if}
&nbsp;
{Lang::T('Active Customers')}
{Lang::T('Active Customers')}
</div>
<form id="site-search" method="post" action="{$_url}plan/list/">
<div class="panel-body">
@ -36,8 +36,8 @@
<select class="form-control" id="router" name="router">
<option value="">{Lang::T('Location')}</option>
{foreach $routers as $r}
<option value="{$r}" {if $router eq $r }selected{/if}>{$r}
</option>
<option value="{$r}" {if $router eq $r }selected{/if}>{$r}
</option>
{/foreach}
</select>
</div>
@ -45,8 +45,8 @@
<select class="form-control" id="plan" name="plan">
<option value="">{Lang::T('Plan Name')}</option>
{foreach $plans as $p}
<option value="{$p['id']}" {if $plan eq $p['id'] }selected{/if}>{$p['name_plan']}
</option>
<option value="{$p['id']}" {if $plan eq $p['id'] }selected{/if}>{$p['name_plan']}
</option>
{/foreach}
</select>
</div>
@ -70,34 +70,39 @@
</div>
</form>
<div class="table-responsive">
<table id="datatable" class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{Lang::T('Username')}</th>
<th>{Lang::T('Plan Name')}</th>
<th>{Lang::T('Type')}</th>
<th>{Lang::T('Created On')}</th>
<th>{Lang::T('Expires On')}</th>
<th>{Lang::T('Method')}</th>
<th><a href="{$_url}routers/list">{Lang::T('Location')}</a></th>
<th>{Lang::T('Manage')}</th>
</tr>
</thead>
<tbody>
{foreach $d as $ds}
<tr {if $ds['status']=='off'}class="danger" {/if}>
<div style="margin-left: 5px; margin-right: 5px;">&nbsp;
<table id="datatable" class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{Lang::T('Username')}</th>
<th>{Lang::T('Plan Name')}</th>
<th>{Lang::T('Type')}</th>
<th>{Lang::T('Created On')}</th>
<th>{Lang::T('Expires On')}</th>
<th>{Lang::T('Method')}</th>
<th><a href="{$_url}routers/list">{Lang::T('Location')}</a></th>
<th>{Lang::T('Manage')}</th>
</tr>
</thead>
<tbody>
{foreach $d as $ds}
<tr {if $ds['status']=='off' }class="danger" {/if}>
<td>
{if $ds['customer_id'] == '0'}
<a href="{$_url}plan/voucher/&search={$ds['username']}">{$ds['username']}</a>
<a href="{$_url}plan/voucher/&search={$ds['username']}">{$ds['username']}</a>
{else}
<a href="{$_url}customers/viewu/{$ds['username']}">{$ds['username']}</a>
<a href="{$_url}customers/viewu/{$ds['username']}">{$ds['username']}</a>
{/if}
</td>
{if $ds['type'] == 'Hotspot'}
<td><a href="{$_url}services/edit/{$ds['plan_id']}">{$ds['namebp']}</a></td>
{else}
{/if}
{if $ds['type'] == 'PPPOE'}
<td><a href="{$_url}services/pppoe-edit/{$ds['plan_id']}">{$ds['namebp']}</a></td>
{/if}
{if $ds['type'] == 'VPN'}
<td><a href="{$_url}services/vpn-edit/{$ds['plan_id']}">{$ds['namebp']}</a></td>
{/if}
<td>{$ds['type']}</td>
<td>{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}</td>
<td>{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
@ -107,19 +112,20 @@
<a href="{$_url}plan/edit/{$ds['id']}" class="btn btn-warning btn-xs"
style="color: black;">{Lang::T('Edit')}</a>
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<a href="{$_url}plan/delete/{$ds['id']}" id="{$ds['id']}"
onclick="return confirm('{Lang::T('Delete')}?')" class="btn btn-danger btn-xs"><i
class="glyphicon glyphicon-trash"></i></a>
<a href="{$_url}plan/delete/{$ds['id']}" id="{$ds['id']}"
onclick="return confirm('{Lang::T('Delete')}?')"
class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i></a>
{/if}
{if $ds['status']=='off' && $_c['extend_expired']}
<a href="javascript:extend('{$ds['id']}')"
class="btn btn-info btn-xs">{Lang::T('Extend')}</a>
<a href="javascript:extend('{$ds['id']}')"
class="btn btn-info btn-xs">{Lang::T('Extend')}</a>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
{/foreach}
</tbody>
</table>
</div>
</div>
{include file="pagination.tpl"}
</div>
@ -131,10 +137,10 @@
var res = prompt("Extend for many days?", "3");
if (res) {
if (confirm("Extend for " + res + " days?")) {
window.location.href = "{$_url}plan/extend/"+idP+"/"+res+"&stoken={App::getToken()}";
window.location.href = "{$_url}plan/extend/" + idP + "/" + res + "&stoken={App::getToken()}";
}
}
}
</script>
{include file="sections/footer.tpl"}
{include file="sections/footer.tpl"}

51
ui/ui/port-add.tpl Normal file
View File

@ -0,0 +1,51 @@
{include file="sections/header.tpl"}
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="panel-heading">{Lang::T('Add Port Pool')}</div>
<div class="panel-body">
<form class="form-horizontal" method="post" role="form" action="{$_url}pool/add-port-post" >
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Port Name')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="name" name="name" placeholder="Vpn Tunnel">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Public IP')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="public_ip" name="public_ip" placeholder="12.34.56.78">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Range Port')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="port_range" name="port_range" placeholder=" 3000-8000">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label"><a href="{$_url}routers/add">{Lang::T('Routers')}</a></label>
<div class="col-md-6">
<select id="routers" name="routers" class="form-control select2">
{foreach $r as $rs}
<option value="{$rs['name']}">{$rs['name']}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<button class="btn btn-primary" type="submit">{Lang::T('Save Changes')}</button>
Or <a href="{$_url}pool/port">{Lang::T('Cancel')}</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{include file="sections/footer.tpl"}

49
ui/ui/port-edit.tpl Normal file
View File

@ -0,0 +1,49 @@
{include file="sections/header.tpl"}
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="panel-heading">{Lang::T('Edit Port')}</div>
<div class="panel-body">
<form class="form-horizontal" method="post" role="form" action="{$_url}pool/edit-port-post" >
<input type="hidden" name="id" value="{$d['id']}">
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Port Name')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="name" name="name" value="{$d['port_name']}">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Public IP')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="public_ip" name="public_ip" value="{$d['public_ip']}" placeholder="12.34.56.78">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Range Port')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="range_port" name="range_port" value="{$d['range_port']}">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Routers')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="routers" name="routers" value="{$d['routers']}" readonly>
</div>
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<button class="btn btn-success" type="submit">{Lang::T('Save Changes')}</button>
Or <a href="{$_url}pool/port">{Lang::T('Cancel')}</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{include file="sections/footer.tpl"}

76
ui/ui/port.tpl Normal file
View File

@ -0,0 +1,76 @@
{include file="sections/header.tpl"}
<!-- port -->
<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}pool/sync"
onclick="return confirm('This will sync/send IP port to Mikrotik?')"><span
class="glyphicon glyphicon-refresh" aria-hidden="true"></span> sync</a>
</div>
{Lang::T('Port Pool')} - VPN Tunnels
</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}pool/port/">
<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="{Lang::T('Search by Name')}...">
<div class="input-group-btn">
<button class="btn btn-success" type="submit">{Lang::T('Search')}</button>
</div>
</div>
</form>
</div>
<div class="col-md-4">
<a href="{$_url}pool/add-port" class="btn btn-primary btn-block"><i
class="ion ion-android-add"> </i> {Lang::T('New port')}</a>
</div>&nbsp;
</div>
<div class="table-responsive">
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>{Lang::T('Port Name')}</th>
<th>{Lang::T('Public IP')}</th>
<th>{Lang::T('Range Port')}</th>
<th>{Lang::T('Routers')}</th>
<th>{Lang::T('Manage')}</th>
<th>ID</th>
</tr>
</thead>
<tbody>
{foreach $d as $ds}
<tr>
<td>{$ds['port_name']}</td>
<td>{$ds['public_ip']}</td>
<td>{$ds['range_port']}</td>
<td>{$ds['routers']}</td>
<td align="center">
<a href="{$_url}pool/edit-port/{$ds['id']}" class="btn btn-info btn-xs">{Lang::T('Edit')}</a>
<a href="{$_url}pool/delete-port/{$ds['id']}" id="{$ds['id']}"
onclick="return confirm('{Lang::T('Delete')}?')"
class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i></a>
</td>
<td>{$ds['id']}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{include file="pagination.tpl"}
<div class="bs-callout bs-callout-info" id="callout-navbar-role">
<h4>{Lang::T('Create expired Internet Plan')}</h4>
<p>{Lang::T('When customer expired, you can move it to Expired Internet Plan')}</p>
</div>
</div>
</div>
</div>
</div>
{include file="sections/footer.tpl"}

View File

@ -35,8 +35,8 @@
<select class="form-control" id="type2" name="type2">
<option value="">{Lang::T('Type')}</option>
{foreach $type2s as $t}
<option value="{$t}" {if $type2 eq $t }selected{/if}>{Lang::T($t)}
</option>
<option value="{$t}" {if $type2 eq $t }selected{/if}>{Lang::T($t)}
</option>
{/foreach}
</select>
</div>
@ -44,9 +44,9 @@
<select class="form-control" id="bandwidth" name="bandwidth">
<option value="">Bandwidth</option>
{foreach $bws as $b}
<option value="{$b['id']}" {if $bandwidth eq $b['id'] }selected{/if}>
{$b['name_bw']}
</option>
<option value="{$b['id']}" {if $bandwidth eq $b['id'] }selected{/if}>
{$b['name_bw']}
</option>
{/foreach}
</select>
</div>
@ -54,8 +54,8 @@
<select class="form-control" id="type3" name="type3">
<option value="">{Lang::T('Category')}</option>
{foreach $type3s as $t}
<option value="{$t}" {if $type3 eq $t }selected{/if}>{$t}
</option>
<option value="{$t}" {if $type3 eq $t }selected{/if}>{$t}
</option>
{/foreach}
</select>
</div>
@ -63,8 +63,8 @@
<select class="form-control" id="valid" name="valid">
<option value="">{Lang::T('Validity')}</option>
{foreach $valids as $v}
<option value="{$v}" {if $valid eq $v }selected{/if}>{$v}
</option>
<option value="{$v}" {if $valid eq $v }selected{/if}>{$v}
</option>
{/foreach}
</select>
</div>
@ -72,7 +72,7 @@
<select class="form-control" id="router" name="router">
<option value="">{Lang::T('Location')}</option>
{foreach $routers as $r}
<option value="{$r}" {if $router eq $r }selected{/if}>{$r}</option>
<option value="{$r}" {if $router eq $r }selected{/if}>{$r}</option>
{/foreach}
<option value="radius" {if $router eq 'radius' }selected{/if}>Radius</option>
</select>
@ -81,7 +81,7 @@
<select class="form-control" id="device" name="device">
<option value="">{Lang::T('Device')}</option>
{foreach $devices as $r}
<option value="{$r}" {if $device eq $r }selected{/if}>{$r}</option>
<option value="{$r}" {if $device eq $r }selected{/if}>{$r}</option>
{/foreach}
</select>
</div>
@ -104,36 +104,38 @@
</div>
</form>
<div class="table-responsive">
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th></th>
<th colspan="4" class="text-center">{Lang::T('Internet Plan')}</th>
<th></th>
<th colspan="2" class="text-center" style="background-color: rgb(243, 241, 172);">
{Lang::T('Expired')}</th>
<th colspan="4"></th>
</tr>
<tr>
<th>{Lang::T('Name')}</th>
<th>{Lang::T('Type')}</th>
<th><a href="{$_url}bandwidth/list">{Lang::T('Bandwidth')}</a></th>
<th>{Lang::T('Price')}</th>
<th>{Lang::T('Validity')}</th>
<th><a href="{$_url}pool/list">{Lang::T('IP Pool')}</a></th>
<th style="background-color: rgb(243, 241, 172);">{Lang::T('Internet Plan')}</th>
<th style="background-color: rgb(243, 241, 172);">{Lang::T('Date')}</th>
<th><a href="{$_url}routers/list">{Lang::T('Location')}</a></th>
<th>{Lang::T('Device')}</th>
<th>{Lang::T('Manage')}</th>
<th>ID</th>
</tr>
</thead>
<tbody>
{foreach $d as $ds}
<tr {if $ds['enabled'] != 1}class="danger" title="disabled" {/if}>
<div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th></th>
<th colspan="4" class="text-center">{Lang::T('Internet Plan')}</th>
<th></th>
<th colspan="2" class="text-center" style="background-color: rgb(243, 241, 172);">
{Lang::T('Expired')}</th>
<th colspan="4"></th>
</tr>
<tr>
<th>{Lang::T('Name')}</th>
<th>{Lang::T('Type')}</th>
<th><a href="{$_url}bandwidth/list">{Lang::T('Bandwidth')}</a></th>
<th>{Lang::T('Price')}</th>
<th>{Lang::T('Validity')}</th>
<th><a href="{$_url}pool/list">{Lang::T('IP Pool')}</a></th>
<th style="background-color: rgb(243, 241, 172);">{Lang::T('Internet Plan')}</th>
<th style="background-color: rgb(243, 241, 172);">{Lang::T('Date')}</th>
<th><a href="{$_url}routers/list">{Lang::T('Location')}</a></th>
<th>{Lang::T('Device')}</th>
<th>{Lang::T('Manage')}</th>
<th>ID</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['plan_type']} {if $ds['prepaid'] != 'yes'}<b>{Lang::T('Postpaid')}</b>{else}{Lang::T('Prepaid')}{/if}</td>
<td>{$ds['plan_type']} {if $ds['prepaid'] !=
'yes'}<b>{Lang::T('Postpaid')}</b>{else}{Lang::T('Prepaid')}{/if}</td>
<td>{$ds['name_bw']}</td>
<td>{Lang::moneyFormat($ds['price'])}</td>
<td>{$ds['validity']} {$ds['validity_unit']}</td>
@ -144,11 +146,11 @@
<td>{if $ds['prepaid'] == no}{$ds['expired_date']}{/if}</td>
<td>
{if $ds['is_radius']}
<span class="label label-primary">RADIUS</span>
<span class="label label-primary">RADIUS</span>
{else}
{if $ds['routers']!=''}
<a href="{$_url}routers/edit/0&name={$ds['routers']}">{$ds['routers']}</a>
{/if}
{if $ds['routers']!=''}
<a href="{$_url}routers/edit/0&name={$ds['routers']}">{$ds['routers']}</a>
{/if}
{/if}
</td>
<td>{$ds['device']}</td>
@ -161,9 +163,10 @@
</td>
<td>{$ds['id']}</td>
</tr>
{/foreach}
</tbody>
</table>
{/foreach}
</tbody>
</table>
</div>
</div>
<div class="panel-footer">
{include file="pagination.tpl"}
@ -176,4 +179,4 @@
</div>
</div>
{include file="sections/footer.tpl"}
{include file="sections/footer.tpl"}

View File

@ -22,6 +22,7 @@
<div class="col-md-6">
<label><input type="radio" id="Hot" name="type" value="Hotspot"> {Lang::T('Hotspot Plans')}</label>
<label><input type="radio" id="POE" name="type" value="PPPOE"> {Lang::T('PPPOE Plans')}</label>
<label><input type="radio" id="VPN" name="type" value="VPN"> {Lang::T('VPN Plans')}</label>
</div>
</div>
<div class="form-group">

View File

@ -96,7 +96,7 @@ $(function() {
});
};
}else{
} else if ($('#POE').is(':checked')) {
$.ajax({
type: "POST",
dataType: "html",
@ -117,6 +117,27 @@ $(function() {
}
});
});
} else {
$.ajax({
type: "POST",
dataType: "html",
url: "index.php?_route=autoload/server",
success: function(msg){
$("#server").html(msg);
}
});
$("#server").change(function(){
var server = $("#server").val();
$.ajax({
type: "POST",
dataType: "html",
url: "index.php?_route=autoload/plan",
data: "jenis=VPN&server="+server,
success: function(msg){
$("#plan").html(msg);
}
});
});
}
});
});

View File

@ -148,12 +148,45 @@
color: inherit;
background-color: transparent;
border-color: transparent;
border-bottom-right-radius: 21px;
border-bottom-left-radius: 21px;
}
.panel-primary>.panel-heading {
color: inherit;
background-color: transparent;
border-color: transparent;
.panel-success>.panel-heading {
border-bottom-right-radius: 21px;
border-bottom-left-radius: 21px;
}
.panel-cron-success>.panel-heading {
border-bottom-right-radius: 21px;
border-bottom-left-radius: 21px;
color: #fff;
background-color: #169210;
border-color: #25e01c;
}
.panel-cron-warning>.panel-heading {
border-bottom-right-radius: 21px;
border-bottom-left-radius: 21px;
color: #350808;
background-color: #efeb0a;
border-color: #efeb0a;
}
.panel-cron-danger>.panel-heading {
border-bottom-right-radius: 21px;
border-bottom-left-radius: 21px;
color: #fff;
background-color: #e61212;
border-color: #df1335;
}
.panel-danger>.panel-heading {
color: #a94442;
background-color: #f2dede;
border-color: #ebccd1;
border-bottom-right-radius: 21px;
border-bottom-left-radius: 21px;
}
.panel-heading {
@ -656,9 +689,6 @@
}
.toggle-container {
position: absolute;
top: 17px;
right: 15px;
cursor: pointer;
}
@ -668,19 +698,6 @@
transition: color 0.5s ease;
}
@media (max-width: 600px) {
.toggle-container {
top: 15px;
right: 60px;
}
.toggle-container .toggle-icon {
font-size: 20px;
color: rgb(100 116 139);
transition: color 0.5s ease;
}
}
.dark-mode .toggle-container .toggle-icon {
color: #ffdd57;
}
@ -1157,9 +1174,9 @@
</div>
</div>
<li>
<div class="toggle-container">
<a class="toggle-container" href="#">
<i class="toggle-icon" id="toggleIcon">🌞</i>
</div>
</a>
</li>
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
@ -1269,6 +1286,8 @@
href="{$_url}services/hotspot">Hotspot</a></li>
<li {if $_routes[1] eq 'pppoe' }class="active" {/if}><a
href="{$_url}services/pppoe">PPPOE</a></li>
<li {if $_routes[1] eq 'vpn' }class="active" {/if}><a
href="{$_url}services/vpn">VPN</a></li>
<li {if $_routes[1] eq 'list' }class="active" {/if}><a
href="{$_url}bandwidth/list">Bandwidth</a></li>
{if $_c['enable_balance'] == 'yes'}
@ -1327,6 +1346,8 @@
href="{$_url}routers">Routers</a></li>
<li {if $_routes[0] eq 'pool' and $_routes[1] eq 'list' }class="active" {/if}><a
href="{$_url}pool/list">IP Pool</a></li>
<li {if $_routes[0] eq 'pool' and $_routes[1] eq 'port' }class="active" {/if}><a
href="{$_url}pool/port">Port Pool</a></li>
<li {if $_routes[0] eq 'routers' and $_routes[1] eq 'maps' }class="active" {/if}><a
href="{$_url}routers/maps">{Lang::T('Routers Maps')}</a></li>
{$_MENU_NETWORK}

View File

@ -88,6 +88,8 @@
Hotspot
{elseif $_user.service_type == 'PPPoE'}
PPPoE
{elseif $_user.service_type == 'VPN'}
VPN
{elseif $_user.service_type == 'Others' || $_user.service_type == null}
Others
{/if}
@ -165,8 +167,10 @@
<div class="btn-group pull-right">
{if $_bill['type'] == 'Hotspot'}
{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}
{else}
{else if $_bill['type'] == 'PPPOE'}
{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_plan']}{/if}
{else if $_bill['type'] == 'VPN'}
{if $_c['pppoe_plan']==''}VPN Plan{else}{$_c['vpn_plan']}{/if}
{/if}
</div>
</div>
@ -215,6 +219,25 @@
{$_bill['plan_type']}
</td>
</tr>
{if $_bill['type'] == 'VPN' && $_bill['routers'] == $vpn['routers']}
<tr>
<td class="small text-success text-uppercase text-normal">{Lang::T('Public IP')}</td>
<td class="small mb15">{$vpn['public_ip']} / {$vpn['port_name']}</td>
</tr>
<tr>
<td class="small text-success text-uppercase text-normal">{Lang::T('Private IP')}</td>
<td class="small mb15">{$_user['pppoe_ip']}</td>
</tr>
{foreach $cf as $tcf}
<tr>
{if $tcf['field_name'] == 'Winbox' or $tcf['field_name'] == 'Api' or $tcf['field_name'] == 'Web'}
<td class="small text-info text-uppercase text-normal">{$tcf['field_name']} - Port</td>
<td class="small mb15"><a href="http://{$vpn['public_ip']}:{$tcf['field_value']}" target="_blank">{$tcf['field_value']}</a></td>
</tr>
{/if}
{/foreach}
{/if}
{if $nux_ip neq ''}
<tr>
<td class="small text-primary text-uppercase text-normal">{Lang::T('Current IP')}</td>

View File

@ -333,9 +333,6 @@
.toggle-container {
position: absolute;
top: 17px;
right: 15px;
cursor: pointer;
}
@ -346,10 +343,6 @@
}
@media (max-width: 600px) {
.toggle-container {
top: 15px;
right: 200px;
}
.toggle-container .toggle-icon {
font-size: 20px;
@ -781,13 +774,13 @@
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<li>
<div class="toggle-container">
<a class="toggle-container" href="#">
<i class="toggle-icon" id="toggleIcon">🌞</i>
</div>
</a>
</li>
<li class="dropdown tasks-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
<i class="fa fa-flag-o"></i> <span class="d-none d-sm-inline">{ucwords($user_language)}</span>
<i class="fa fa-flag-o"></i>
</a>
<ul class="dropdown-menu">
<li>

View File

@ -14,7 +14,7 @@
{if Text::is_html($mail['body'])}
{$mail['body']}
{else}
{nl2br($mail['body'])}
{nl2br(htmlspecialchars_decode($mail['body']))}
{/if}
</div>
</div>
@ -29,10 +29,11 @@
{Lang::T("Next")}</a>
{/if}
</div>
<a href="{$_url}mail" class="btn btn-primary"><i class="fa fa-arrow-left"></i> {Lang::T("Back")}</a>
<a href="{$_url}mail/delete/{$mail['id']}" class="btn btn-danger"
onclick="return confirm('{Lang::T("Delete")}?')"><i class="fa fa-trash-o"></i>
{Lang::T("Delete")}</a>
<a href="https://api.whatsapp.com/send?text={if Text::is_html($mail['body'])}{urlencode(strip_tags($mail['body']))}{else}{urlencode($mail['body'])}{/if}" class="btn btn-primary"><i class="fa fa-share"></i> {Lang::T("Share")}</a>
<a href="https://api.whatsapp.com/send?text={if Text::is_html($mail['body'])}{urlencode(strip_tags($mail['body']))}{else}{urlencode($mail['body'])}{/if}" class="btn btn-success"><i class="fa fa-share"></i> {Lang::T("Share")}</a>
</div>
<!-- /.box-footer -->
</div>

View File

@ -226,6 +226,7 @@
{/if}
{foreach $routers as $router}
{if Validator::isRouterHasPlan($plans_hotspot, $router['name']) || Validator::isRouterHasPlan($plans_pppoe,
$router['name']) || Validator::isRouterHasPlan($plans_vpn,
$router['name'])}
<div class="box box-solid box-primary bg-gray">
<div class="box-header text-white text-bold">{$router['name']}</div>
@ -338,9 +339,62 @@
{/if}
{/foreach}
</div>
{/if}
{if $_user['service_type'] == 'VPN' && Validator::countRouterPlan($plans_vpn,$router['name'])>0}
<div class="box-header text-white">{if $_c['vpn_plan']==''}VPN Plan{else}{$_c['vpn_plan']}{/if}</div>
<div class="box-body row">
{foreach $plans_vpn as $plan}
{if $router['name'] eq $plan['routers']}
<div class="col col-md-4">
<div class="box box- box-primary">
<div class="box-header text-bold text-center">{$plan['name_plan']}</div>
<div class="table-responsive">
<div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('Type')}</td>
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/if}
{/foreach}
</div>
{/if}
{if $_user['service_type'] == 'Others' || $_user['service_type'] == '' &&
(Validator::countRouterPlan($plans_hotspot, $router['name'])>0 || Validator::countRouterPlan($plans_pppoe,
$router['name'])>0 || Validator::countRouterPlan($plans_vpn,
$router['name'])>0)}
<div class="box-header text-white">{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}
</div>
@ -443,6 +497,56 @@
{/if}
{/foreach}
</div>
<div class="box-header text-white">{if $_c['vpn_plan']==''}VPN Plan{else}{$_c['vpn_plan']}{/if}</div>
<div class="box-body row">
{foreach $plans_vpn as $plan}
{if $router['name'] eq $plan['routers']}
<div class="col col-md-4">
<div class="box box- box-primary">
<div class="box-header text-bold text-center">{$plan['name_plan']}</div>
<div class="table-responsive">
<div style="margin-left: 5px; margin-right: 5px;">
<table class="table table-bordered table-striped">
<tbody>
<tr>
<td>{Lang::T('Type')}</td>
<td>{$plan['type']}</td>
</tr>
<tr>
<td>{Lang::T('Price')}</td>
<td>{Lang::moneyFormat($plan['price'])}</td>
</tr>
<tr>
<td>{Lang::T('Validity')}</td>
<td>{$plan['validity']} {$plan['validity_unit']}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-body">
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<a href="{$_url}order/gateway/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-warning text-black">{Lang::T('Buy')}</a>
{if $_c['enable_balance'] == 'yes' && $_user['balance']>=$plan['price']}
<a href="{$_url}order/pay/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Pay this with Balance? your active package will be overwrite')}')"
class="btn btn-sm btn-block btn-success">{Lang::T('Pay With Balance')}</a>
{/if}
</div>
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes' &&
$_user['balance']>=$plan['price']}
<a href="{$_url}order/send/{$router['id']}/{$plan['id']}&stoken={App::getToken()}"
onclick="return confirm('{Lang::T('Buy this for friend account?')}')"
class="btn btn-sm btn-block btn-primary">{Lang::T('Buy for friend')}</a>
{/if}
</div>
</div>
</div>
{/if}
{/foreach}
</div>
{/if}
</div>
{/if}

View File

@ -17,11 +17,12 @@
<div class="panel panel-hovered mb20 panel-primary">
<div class="panel-heading">
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<div class="btn-group pull-right">
<a class="btn btn-danger btn-xs" title="Remove used Voucher" href="{$_url}plan/remove-voucher"
onclick="return confirm('Delete all used voucher code more than 3 months?')"><span class="glyphicon glyphicon-trash"
aria-hidden="true"></span> {Lang::T('Delete')} &gt; {Lang::T('3 Months')}</a>
</div>
<div class="btn-group pull-right">
<a class="btn btn-danger btn-xs" title="Remove used Voucher" href="{$_url}plan/remove-voucher"
onclick="return confirm('Delete all used voucher code more than 3 months?')"><span
class="glyphicon glyphicon-trash" aria-hidden="true"></span> {Lang::T('Delete')} &gt; {Lang::T('3
Months')}</a>
</div>
{/if}
&nbsp;
</div>
@ -41,8 +42,8 @@
<select class="form-control" id="router" name="router">
<option value="">{Lang::T('Location')}</option>
{foreach $routers as $r}
<option value="{$r}" {if $router eq $r }selected{/if}>{$r}
</option>
<option value="{$r}" {if $router eq $r }selected{/if}>{$r}
</option>
{/foreach}
</select>
</div>
@ -50,7 +51,7 @@
<select class="form-control" id="plan" name="plan">
<option value="">{Lang::T('Plan Name')}</option>
{foreach $plans as $p}
<option value="{$p['id']}" {if $plan eq $p['id'] }selected{/if}>{$p['name_plan']}</option>
<option value="{$p['id']}" {if $plan eq $p['id'] }selected{/if}>{$p['name_plan']}</option>
{/foreach}
</select>
</div>
@ -65,7 +66,7 @@
<select class="form-control" id="customer" name="customer">
<option value="">{Lang::T('Customer')}</option>
{foreach $customers as $c}
<option value="{$c['user']}" {if $customer eq $c['user'] }selected{/if}>{$c['user']}</option>
<option value="{$c['user']}" {if $customer eq $c['user'] }selected{/if}>{$c['user']}</option>
{/foreach}
</select>
</div>
@ -76,8 +77,8 @@
class="fa fa-search"></span></button>
</div>
<div class="btn-group" role="group">
<a class="btn btn-warning btn-block" title="Clear Search Query" href="{$_url}plan/voucher/"><span
class="glyphicon glyphicon-remove-circle"></span></a>
<a class="btn btn-warning btn-block" title="Clear Search Query"
href="{$_url}plan/voucher/"><span class="glyphicon glyphicon-remove-circle"></span></a>
</div>
</div>
</div>
@ -85,24 +86,25 @@
</form>
</div>
<div class="table-responsive">
<table id="datatable" class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>ID</th>
<th>{Lang::T('Type')}</th>
<th>{Lang::T('Routers')}</th>
<th>{Lang::T('Plan Name')}</th>
<th>{Lang::T('Code Voucher')}</th>
<th>{Lang::T('Status Voucher')}</th>
<th>{Lang::T('Customer')}</th>
<th>{Lang::T('Used Date')}</th>
<th>{Lang::T('Generated By')}</th>
<th>{Lang::T('Manage')}</th>
</tr>
</thead>
<tbody>
{foreach $d as $ds}
<tr {if $ds['status'] eq '1'}class="danger" {/if}>
<div style="margin-left: 5px; margin-right: 5px;">&nbsp;
<table id="datatable" class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>ID</th>
<th>{Lang::T('Type')}</th>
<th>{Lang::T('Routers')}</th>
<th>{Lang::T('Plan Name')}</th>
<th>{Lang::T('Code Voucher')}</th>
<th>{Lang::T('Status Voucher')}</th>
<th>{Lang::T('Customer')}</th>
<th>{Lang::T('Used Date')}</th>
<th>{Lang::T('Generated By')}</th>
<th>{Lang::T('Manage')}</th>
</tr>
</thead>
<tbody>
{foreach $d as $ds}
<tr {if $ds['status'] eq '1' }class="danger" {/if}>
<td>{$ds['id']}</td>
<td>{$ds['type']}</td>
<td>{$ds['routers']}</td>
@ -112,33 +114,35 @@
onmouseenter="this.style.backgroundColor = 'white';">
{$ds['code']}</td>
<td>{if $ds['status'] eq '0'} <label class="btn-tag btn-tag-success"> Not Use
</label> {else} <label class="btn-tag btn-tag-danger">Used</label>
</label> {else} <label class="btn-tag btn-tag-danger">Used</label>
{/if}</td>
<td>{if $ds['user'] eq '0'} -
{else}<a href="{$_url}customers/viewu/{$ds['user']}">{$ds['user']}</a>
{/if}</td>
<td>{if $ds['used_date']}{Lang::dateTimeFormat($ds['used_date'])}{/if}</td>
<td>{if $ds['generated_by']}
<a href="{$_url}settings/users-view/{$ds['generated_by']}">{$admins[$ds['generated_by']]}</a>
<a
href="{$_url}settings/users-view/{$ds['generated_by']}">{$admins[$ds['generated_by']]}</a>
{else} -
{/if}
</td>
<td>
{if $ds['status'] neq '1'}
<a href="{$_url}plan/voucher-view/{$ds['id']}" id="{$ds['id']}" style="margin: 0px;"
class="btn btn-success btn-xs">&nbsp;&nbsp;{Lang::T('View')}&nbsp;&nbsp;</a>
<a href="{$_url}plan/voucher-view/{$ds['id']}" id="{$ds['id']}" style="margin: 0px;"
class="btn btn-success btn-xs">&nbsp;&nbsp;{Lang::T('View')}&nbsp;&nbsp;</a>
{/if}
{if in_array($_admin['user_type'],['SuperAdmin','Admin'])}
<a href="{$_url}plan/voucher-delete/{$ds['id']}" id="{$ds['id']}" class="btn btn-danger btn-xs"
onclick="return confirm('{Lang::T('Delete')}?')"><i
class="glyphicon glyphicon-trash"></i></a>
<a href="{$_url}plan/voucher-delete/{$ds['id']}" id="{$ds['id']}"
class="btn btn-danger btn-xs" onclick="return confirm('{Lang::T('Delete')}?')"><i
class="glyphicon glyphicon-trash"></i></a>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
{/foreach}
</tbody>
</table>
</div>
</div>
{include file="pagination.tpl"}
</div>
{include file="sections/footer.tpl"}
{include file="sections/footer.tpl"}

188
ui/ui/vpn-add.tpl Normal file
View File

@ -0,0 +1,188 @@
{include file="sections/header.tpl"}
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="panel-heading">{Lang::T('Add Service Plan')}</div>
<div class="panel-body">
<form class="form-horizontal" method="post" role="form" action="{$_url}services/vpn-add-post">
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Status')}
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
data-trigger="focus" data-container="body"
data-content="Customer cannot buy disabled Plan, but admin can recharge it, use it if you want only admin recharge it">?</a>
</label>
<div class="col-md-10">
<input type="radio" checked name="enabled" value="1"> {Lang::T('Enable')}
<input type="radio" name="enabled" value="0"> {Lang::T('Disable')}
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Type')}
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
data-trigger="focus" data-container="body"
data-content="Postpaid will have fix expired date">?</a>
</label>
<div class="col-md-10">
<input type="radio" name="prepaid" onclick="prePaid()" value="yes" checked> {Lang::T('Prepaid')}
<input type="radio" name="prepaid" onclick="postPaid()" value="no"> {Lang::T('Postpaid')}
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Plan Type')}
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
data-trigger="focus" data-container="body"
data-content="Personal Plan will only show to personal Customer, Business plan will only show to Business Customer">?</a>
</label>
<div class="col-md-10">
<input type="radio" name="plan_type" value="Personal" checked> {Lang::T('Personal')}
<input type="radio" name="plan_type" value="Business"> {Lang::T('Business')}
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Device')}
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
data-trigger="focus" data-container="body"
data-content="This Device are the logic how PHPNuxBill Communicate with Mikrotik or other Devices">?</a>
</label>
<div class="col-md-6">
<select class="form-control" id="device" name="device">
{foreach $devices as $dev}
<option value="{$dev}" {if $dev == 'MikrotikVpn'}selected{/if}>{$dev}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('Plan Name')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="name_plan" maxlength="40" name="name_plan">
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label"><a
href="{$_url}bandwidth/add">{Lang::T('Bandwidth Name')}</a></label>
<div class="col-md-6">
<select id="id_bw" name="id_bw" class="form-control select2">
<option value="">{Lang::T('Select Bandwidth')}...</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">{Lang::T('Plan Price')}</label>
<div class="col-md-6">
<div class="input-group">
<span class="input-group-addon">{$_c['currency_code']}</span>
<input type="number" class="form-control" name="price" required>
</div>
</div>
{if $_c['enable_tax'] == 'yes'}
{if $_c['tax_rate'] == 'custom'}
<p class="help-block col-md-4">{number_format($_c['custom_tax_rate'], 2)} % {Lang::T('Tax Rates
will be added')}</p>
{else}
<p class="help-block col-md-4">{number_format($_c['tax_rate'] * 100, 2)} % {Lang::T('Tax Rates
will be added')}</p>
{/if}
{/if}
</div>
<div class="form-group">
<label class="col-md-2 control-label">{Lang::T('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">
</select>
</div>
<p class="help-block col-md-4">{Lang::T('1 Period = 1 Month, Expires the 20th of each month')}
</p>
</div>
<div class="form-group hidden" id="expired_date">
<label class="col-md-2 control-label">{Lang::T('Expired Date')}
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
data-trigger="focus" data-container="body"
data-content="Expired will be this date every month">?</a>
</label>
<div class="col-md-6">
<input type="number" class="form-control" name="expired_date" maxlength="2" value="20" min="1" max="28" step="1" >
</div>
</div>
<div class="form-group">
<label class="col-md-2 control-label"><a
href="{$_url}routers/add">{Lang::T('Router Name')}</a></label>
<div class="col-md-6">
<select id="routers" name="routers" required class="form-control select2">
<option value=''>{Lang::T('Select Routers')}</option>
{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">
<label class="col-md-2 control-label"><a href="{$_url}pool/add">{Lang::T('IP Pool')}</a></label>
<div class="col-md-6">
<select id="pool_name" name="pool_name" required class="form-control select2">
<option value=''>{Lang::T('Select Pool')}</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<button class="btn btn-primary" type="submit">{Lang::T('Save Changes')}</button>
Or <a href="{$_url}services/pppoe">{Lang::T('Cancel')}</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<script>
var preOpt = `<option value="Mins">{Lang::T('Mins')}</option>
<option value="Hrs">{Lang::T('Hrs')}</option>
<option value="Days">{Lang::T('Days')}</option>
<option value="Months">{Lang::T('Months')}</option>`;
var postOpt = `<option value="Period">{Lang::T('Period')}</option>`;
function prePaid() {
$("#validity_unit").html(preOpt);
$('#expired_date').addClass('hidden');
}
function postPaid() {
$("#validity_unit").html(postOpt);
$("#expired_date").removeClass('hidden');
}
document.addEventListener("DOMContentLoaded", function(event) {
prePaid()
})
</script>
{if $_c['radius_enable']}
{literal}
<script>
function isRadius(cek) {
if (cek.checked) {
document.getElementById("routers").required = false;
document.getElementById("routers").disabled = true;
$.ajax({
url: "index.php?_route=autoload/pool",
data: "routers=radius",
cache: false,
success: function(msg) {
$("#pool_name").html(msg);
}
});
} else {
document.getElementById("routers").required = true;
document.getElementById("routers").disabled = false;
}
}
</script>
{/literal}
{/if}
{include file="sections/footer.tpl"}

255
ui/ui/vpn-edit.tpl Normal file
View File

@ -0,0 +1,255 @@
{include file="sections/header.tpl"}
<form class="form-horizontal" method="post" role="form" action="{$_url}services/edit-vpn-post">
<div class="row">
<div class="col-md-6">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="panel-heading">{Lang::T('Edit Service Plan')} || {$d['name_plan']}</div>
<div class="panel-body">
<input type="hidden" name="id" value="{$d['id']}">
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Status')}
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
data-trigger="focus" data-container="body"
data-content="Customer cannot buy disabled Plan, but admin can recharge it, use it if you want only admin recharge it">?</a>
</label>
<div class="col-md-9">
<input type="radio" name="enabled" value="1" {if $d['enabled'] == 1}checked{/if}> {Lang::T('Enable')}
<input type="radio" name="enabled" value="0" {if $d['enabled'] == 0}checked{/if}> {Lang::T('Disable')}
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Type')}
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
data-trigger="focus" data-container="body"
data-content="Postpaid will have fix expired date">?</a>
</label>
<div class="col-md-9">
<input type="radio" name="prepaid" onclick="prePaid()" value="yes"
{if $d['prepaid'] == 'yes'}checked{/if}>
{Lang::T('Prepaid')}
<input type="radio" name="prepaid" onclick="postPaid()" value="no"
{if $d['prepaid'] == 'no'}checked{/if}> {Lang::T('Postpaid')}
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Plan Type')}
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
data-trigger="focus" data-container="body"
data-content="Personal Plan will only show to personal Customer, Business plan will only show to Business Customer">?</a>
</label>
<div class="col-md-9">
<input type="radio" name="plan_type" value="Personal"
{if $d['plan_type'] == 'Personal'}checked{/if}>
{Lang::T('Personal')}
<input type="radio" name="plan_type" value="Business"
{if $d['plan_type'] == 'Business'}checked{/if}> {Lang::T('Business')}
</div>
</div>
{if $_c['radius_enable'] and $d['is_radius']}
<div class="form-group">
<label class="col-md-3 control-label">Radius
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
data-trigger="focus" data-container="body"
data-content="If you enable Radius, choose device to radius, except if you have custom device.">?</a>
</label>
<div class="col-md-9">
<label class="label label-primary">RADIUS</label>
</div>
</div>
{/if}
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Device')}
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
data-trigger="focus" data-container="body"
data-content="This Device are the logic how PHPNuxBill Communicate with Mikrotik or other Devices">?</a>
</label>
<div class="col-md-9">
<select class="form-control" id="device" name="device">
{foreach $devices as $dev}
<option value="{$dev}" {if $dev == $d['device']}selected{/if}>{$dev}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Plan Name')}</label>
<div class="col-md-9">
<input type="text" class="form-control" id="name_plan" maxlength="40" name="name_plan"
value="{$d['name_plan']}">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><a
href="{$_url}bandwidth/add">{Lang::T('Bandwidth Name')}</a></label>
<div class="col-md-9">
<select id="id_bw" name="id_bw" class="form-control select2">
{foreach $b as $bs}
<option value="{$bs['id']}" {if $d['id_bw'] eq $bs['id']} selected {/if}>
{$bs['name_bw']}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Plan Price')}</label>
<div class="col-md-9">
<div class="input-group">
<span class="input-group-addon">{$_c['currency_code']}</span>
<input type="number" class="form-control" name="price" required value="{$d['price']}">
</div>
</div>
{if $_c['enable_tax'] == 'yes'}
{if $_c['tax_rate'] == 'custom'}
<p class="help-block col-md-4">{number_format($_c['custom_tax_rate'], 2)} % {Lang::T('Tax Rates
will be added')}</p>
{else}
<p class="help-block col-md-4">{number_format($_c['tax_rate'] * 100, 2)} % {Lang::T('Tax Rates
will be added')}</p>
{/if}
{/if}
</div>
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Plan Validity')}</label>
<div class="col-md-3">
<input type="text" class="form-control" id="validity" name="validity"
value="{$d['validity']}">
</div>
<div class="col-md-6">
<select class="form-control" id="validity_unit" name="validity_unit">
{if $d['prepaid'] == yes}
<option value="Mins" {if $d['validity_unit'] eq 'Mins'} selected {/if}>{Lang::T('Mins')}
</option>
<option value="Hrs" {if $d['validity_unit'] eq 'Hrs'} selected {/if}>{Lang::T('Hrs')}
</option>
<option value="Days" {if $d['validity_unit'] eq 'Days'} selected {/if}>{Lang::T('Days')}
</option>
<option value="Months" {if $d['validity_unit'] eq 'Months'} selected {/if}>
{Lang::T('Months')}</option>
{else}
<option value="Period" {if $d['validity_unit'] eq 'Period'} selected {/if}>
{Lang::T('Period')}</option>
{/if}
</select>
<p class="help-block">{Lang::T('1 Period = 1 Month, Expires the 20th of each month')}</p>
</div>
</div>
<div class="form-group {if $d['prepaid'] == yes}hidden{/if}" id="expired_date">
<label class="col-md-3 control-label">{Lang::T('Expired Date')}
<a tabindex="0" class="btn btn-link btn-xs" role="button" data-toggle="popover"
data-trigger="focus" data-container="body"
data-content="Expired will be this date every month">?</a>
</label>
<div class="col-md-9">
<input type="number" class="form-control" name="expired_date" maxlength="2"
value="{if $d['expired_date']}{$d['expired_date']}{else}20{/if}" min="1" max="28"
step="1">
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><a href="{$_url}pool/add">{Lang::T('IP Pool')}</a></label>
<div class="col-md-9">
<select id="pool_name" name="pool_name" required class="form-control select2">
{foreach $p as $ps}
<option value="{$ps['pool_name']}" {if $d['pool'] eq $ps['pool_name']} selected {/if}>
{$ps['pool_name']}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Router Name')}</label>
<div class="col-md-9">
<input type="text" class="form-control" id="routers" name="routers" value="{$d['routers']}"
readonly>
</div>
</div>
<legend>{Lang::T('Expired Action')} <sub>{Lang::T('Optional')}</sub></legend>
<div class="form-group">
<label class="col-md-3 control-label">{Lang::T('Expired Internet Plan')}</label>
<div class="col-md-9">
<select id="plan_expired" name="plan_expired" class="form-control select2">
<option value='0'>Default - Remove Customer</option>
{foreach $exps as $exp}
<option value="{$exp['id']}" {if $d['plan_expired'] eq $exp['id']} selected {/if}>
{$exp['name_plan']}</option>
{/foreach}
</select>
<p class="help-block">
{Lang::T('When Expired, customer will be move to selected internet plan')}</p>
</div>
</div>
</div>
</div>
</div>
{if !$d['is_radius']}
<div class="col-md-6">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="panel-heading">{Lang::T('on-login / on-up')}</div>
<div class="panel-body">
<textarea class="form-control" id="code" name="on_login"
style="font-family: 'Courier New', Courier, monospace;" rows="15">{$d['on_login']}</textarea>
</div>
</div>
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="panel-heading">{Lang::T('on-logout / on-down')}</div>
<div class="panel-body">
<textarea class="form-control" id="code2" name="on_logout"
style="font-family: 'Courier New', Courier, monospace;" rows="15">{$d['on_logout']}</textarea>
</div>
</div>
</div>
{/if}
</div>
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<button class="btn btn-success" type="submit">{Lang::T('Save Changes')}</button>
Or <a href="{$_url}services/vpn">{Lang::T('Cancel')}</a>
</div>
</div>
</form>
<script>
var preOpt = `<option value="Mins">{Lang::T('Mins')}</option>
<option value="Hrs">{Lang::T('Hrs')}</option>
<option value="Days">{Lang::T('Days')}</option>
<option value="Months">{Lang::T('Months')}</option>`;
var postOpt = `<option value="Period">{Lang::T('Period')}</option>`;
function prePaid() {
$("#validity_unit").html(preOpt);
$('#expired_date').addClass('hidden');
}
function postPaid() {
$("#validity_unit").html(postOpt);
$("#expired_date").removeClass('hidden');
}
</script>
<script language="javascript" type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7/codemirror.min.js"></script>
<script language="javascript" type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7/mode/perl/perl.min.js"></script>
<link rel="stylesheet" type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7/codemirror.min.css">
</link>
<link rel="stylesheet" type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7/theme/abbott.min.css">
</link>
<script>
CodeMirror.fromTextArea(document.getElementById('code'), {
lineNumbers: true,
mode: 'text/x-perl',
});
CodeMirror.fromTextArea(document.getElementById('code2'), {
lineNumbers: true,
mode: 'text/x-perl',
});
</script>
{include file="sections/footer.tpl"}

179
ui/ui/vpn.tpl Normal file
View File

@ -0,0 +1,179 @@
{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">
<div class="btn-group pull-right">
<a class="btn btn-primary btn-xs" title="save" href="{$_url}services/sync/vpn"
onclick="return confirm('This will sync/send vpn plan to Mikrotik?')"><span
class="glyphicon glyphicon-refresh" aria-hidden="true"></span> sync</a>
</div>{Lang::T('VPN Package')}
</div>
<form id="site-search" method="post" action="{$_url}services/vpn">
<div class="panel-body">
<div class="row row-no-gutters" style="padding: 5px">
<div class="col-lg-2">
<div class="input-group">
<div class="input-group-btn">
<a class="btn btn-danger" title="Clear Search Query"
href="{$_url}services/vpn"><span
class="glyphicon glyphicon-remove-circle"></span></a>
</div>
<input type="text" name="name" class="form-control"
placeholder="{Lang::T('Search by Name')}...">
</div>
</div>
<div class="col-lg-1 col-xs-4">
<select class="form-control" id="type1" name="type1">
<option value="">{Lang::T('Prepaid')} &amp; {Lang::T('Postpaid')}</option>
<option value="yes" {if $type1 eq 'yes' }selected{/if}>{Lang::T('Prepaid')}</option>
<option value="no" {if $type1 eq 'no' }selected{/if}>{Lang::T('Postpaid')}</option>
</select>
</div>
<div class="col-lg-1 col-xs-4">
<select class="form-control" id="type2" name="type2">
<option value="">{Lang::T('Type')}</option>
{foreach $type2s as $t}
<option value="{$t}" {if $type2 eq $t }selected{/if}>{Lang::T($t)}
</option>
{/foreach}
</select>
</div>
<div class="col-lg-1 col-xs-4">
<select class="form-control" id="bandwidth" name="bandwidth">
<option value="">Bandwidth</option>
{foreach $bws as $b}
<option value="{$b['id']}" {if $bandwidth eq $b['id'] }selected{/if}>
{$b['name_bw']}
</option>
{/foreach}
</select>
</div>
<div class="col-lg-1 col-xs-4">
<select class="form-control" id="type3" name="type3">
<option value="">{Lang::T('Category')}</option>
{foreach $type3s as $t}
<option value="{$t}" {if $type3 eq $t }selected{/if}>{$t}
</option>
{/foreach}
</select>
</div>
<div class="col-lg-1 col-xs-4">
<select class="form-control" id="valid" name="valid">
<option value="">{Lang::T('Validity')}</option>
{foreach $valids as $v}
<option value="{$v}" {if $valid eq $v }selected{/if}>{$v}
</option>
{/foreach}
</select>
</div>
<div class="col-lg-1 col-xs-4">
<select class="form-control" id="router" name="router">
<option value="">{Lang::T('Location')}</option>
{foreach $routers as $r}
<option value="{$r}" {if $router eq $r }selected{/if}>{$r}</option>
{/foreach}
<option value="radius" {if $router eq 'radius' }selected{/if}>Radius</option>
</select>
</div>
<div class="col-lg-1 col-xs-4">
<select class="form-control" id="device" name="device">
<option value="">{Lang::T('Device')}</option>
{foreach $devices as $r}
<option value="{$r}" {if $device eq $r }selected{/if}>{$r}</option>
{/foreach}
</select>
</div>
<div class="col-lg-1 col-xs-4">
<select class="form-control" id="status" name="status">
<option value="-">{Lang::T('Status')}</option>
<option value="1" {if $status eq '1' }selected{/if}>{Lang::T('Enabled')}</option>
<option value="0" {if $status eq '0' }selected{/if}>{Lang::T('Disable')}</option>
</select>
</div>
<div class="col-lg-1 col-xs-8">
<button class="btn btn-success btn-block" type="submit"><span
class="fa fa-search"></span></button>
</div>
<div class="col-lg-1 col-xs-4">
<a href="{$_url}services/vpn-add" class="btn btn-primary btn-block"
title="{Lang::T('New Service Plan')}"><i class="ion ion-android-add"></i></a>
</div>
</div>
</div>
</form>
<div class="table-responsive">
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th></th>
<th colspan="4" class="text-center">{Lang::T('Internet Plan')}</th>
<th></th>
<th colspan="2" class="text-center" style="background-color: rgb(243, 241, 172);">
{Lang::T('Expired')}</th>
<th colspan="4"></th>
</tr>
<tr>
<th>{Lang::T('Name')}</th>
<th>{Lang::T('Type')}</th>
<th><a href="{$_url}bandwidth/list">{Lang::T('Bandwidth')}</a></th>
<th>{Lang::T('Price')}</th>
<th>{Lang::T('Validity')}</th>
<th><a href="{$_url}pool/list">{Lang::T('IP Pool')}</a></th>
<th style="background-color: rgb(243, 241, 172);">{Lang::T('Internet Plan')}</th>
<th style="background-color: rgb(243, 241, 172);">{Lang::T('Date')}</th>
<th><a href="{$_url}routers/list">{Lang::T('Location')}</a></th>
<th>{Lang::T('Device')}</th>
<th>{Lang::T('Manage')}</th>
<th>ID</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['plan_type']} {if $ds['prepaid'] != 'yes'}<b>{Lang::T('Postpaid')}</b>{else}{Lang::T('Prepaid')}{/if}</td>
<td>{$ds['name_bw']}</td>
<td>{Lang::moneyFormat($ds['price'])}</td>
<td>{$ds['validity']} {$ds['validity_unit']}</td>
<td>{$ds['pool']}</td>
<td>{if $ds['plan_expired']}<a
href="{$_url}services/vpn-edit/{$ds['plan_expired']}">{Lang::T('Yes')}</a>{else}{Lang::T('No')}
{/if}</td>
<td>{if $ds['prepaid'] == no}{$ds['expired_date']}{/if}</td>
<td>
{if $ds['is_radius']}
<span class="label label-primary">RADIUS</span>
{else}
{if $ds['routers']!=''}
<a href="{$_url}routers/edit/0&name={$ds['routers']}">{$ds['routers']}</a>
{/if}
{/if}
</td>
<td>{$ds['device']}</td>
<td>
<a href="{$_url}services/vpn-edit/{$ds['id']}"
class="btn btn-info btn-xs">{Lang::T('Edit')}</a>
<a href="{$_url}services/vpn-delete/{$ds['id']}"
onclick="return confirm('{Lang::T('Delete')}?')" id="{$ds['id']}"
class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i></a>
</td>
<td>{$ds['id']}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
<div class="panel-footer">
{include file="pagination.tpl"}
<div class="bs-callout bs-callout-info" id="callout-navbar-role">
<h4>{Lang::T('Create expired Internet Plan')}</h4>
<p>{Lang::T('When customer expired, you can move it to Expired Internet Plan')}</p>
</div>
</div>
</div>
</div>
</div>
{include file="sections/footer.tpl"}