forked from kevinowino869/mitrobill
Merge branch 'Development' of https://github.com/Focuslinkstech/phpnuxbill into Development
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
<form class="form-horizontal" method="post" role="form" action="{$_url}customers/edit-post">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
||||
<div class="panel panel-{if $d['status']=='Active'}primary{else}danger{/if} panel-hovered panel-stacked mb30">
|
||||
<div class="panel-heading">{Lang::T('Edit Contact')}</div>
|
||||
<div class="panel-body">
|
||||
<input type="hidden" name="id" value="{$d['id']}">
|
||||
@ -20,7 +20,7 @@
|
||||
{/if}
|
||||
<input type="text" class="form-control" name="username" value="{$d['username']}"
|
||||
required
|
||||
placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
|
||||
placeholder="{if $_c['country_code_phone']!= ''}{$_c['country_code_phone']} {Lang::T('Phone Number')}{else}{Lang::T('Username')}{/if}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -108,6 +108,26 @@
|
||||
<div id="map" style="width: '100%'; height: 200px; min-height: 150px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label">{Lang::T('Status')}</label>
|
||||
<div class="col-md-9">
|
||||
<select class="form-control" id="status" name="status">
|
||||
<option value="Active" {if $d['status'] eq 'Active' }selected{/if}>{Lang::T('Active')}
|
||||
</option>
|
||||
<option value="Disabled" {if $d['status'] eq 'Disabled' }selected{/if}>
|
||||
{Lang::T('Disabled')}
|
||||
</option>
|
||||
<option value="Banned" {if $d['status'] eq 'Banned' }selected{/if}>
|
||||
{Lang::T('Banned')}
|
||||
</option>
|
||||
</select>
|
||||
<span class="help-block">
|
||||
{Lang::T('Banned')}: {Lang::T('Customer cannot login again')}.<br>
|
||||
{Lang::T('Disabled')}: {Lang::T('Customer can login but cannot buy internet plan, Admin cannot recharge customer')}.<br>
|
||||
{Lang::T('Don\'t forget to deactivate all active plan too')}.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -219,13 +239,15 @@
|
||||
});
|
||||
}
|
||||
window.onload = function() {
|
||||
{/literal}{if $d['coordinates']}
|
||||
setupMap({$d['coordinates']});
|
||||
{else}
|
||||
getLocation();
|
||||
{/if}{literal}
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
{/literal}
|
||||
{if $d['coordinates']}
|
||||
setupMap({$d['coordinates']});
|
||||
{else}
|
||||
getLocation();
|
||||
{/if}
|
||||
{literal}
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
{include file="sections/footer.tpl"}
|
||||
{include file="sections/footer.tpl"}
|
@ -2,15 +2,17 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-md-4">
|
||||
<div class="box box-primary">
|
||||
<div class="box box-{if $d['status']=='Active'}primary{else}danger{/if}">
|
||||
<div class="box-body box-profile">
|
||||
<img class="profile-user-img img-responsive img-circle"
|
||||
src="https://robohash.org/{$d['id']}?set=set3&size=100x100&bgset=bg1"
|
||||
onerror="this.src='{$UPLOAD_PATH}/user.default.jpg'" alt="avatar">
|
||||
|
||||
<h3 class="profile-username text-center">{$d['fullname']}</h3>
|
||||
|
||||
<ul class="list-group list-group-unbordered">
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Status')}</b> <span
|
||||
class="pull-right {if $d['status'] !='Active'}bg-red{/if}"> {Lang::T($d['status'])} </span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>{Lang::T('Username')}</b> <span class="pull-right">{$d['username']}</span>
|
||||
</li>
|
||||
@ -233,23 +235,23 @@
|
||||
</div>
|
||||
|
||||
{if $d['coordinates']}
|
||||
{literal}
|
||||
<script src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"></script>
|
||||
<script>
|
||||
function setupMap(lat, lon) {
|
||||
var map = L.map('map').setView([lat, lon], 17);
|
||||
L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/light_all/{z}/{x}/{y}.png', {
|
||||
attribution:
|
||||
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',
|
||||
subdomains: 'abcd',
|
||||
maxZoom: 20
|
||||
}).addTo(map);
|
||||
var marker = L.marker([lat, lon]).addTo(map);
|
||||
}
|
||||
window.onload = function() {
|
||||
{/literal}setupMap({$d['coordinates']});{literal}
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
{literal}
|
||||
<script src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"></script>
|
||||
<script>
|
||||
function setupMap(lat, lon) {
|
||||
var map = L.map('map').setView([lat, lon], 17);
|
||||
L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/light_all/{z}/{x}/{y}.png', {
|
||||
attribution:
|
||||
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',
|
||||
subdomains: 'abcd',
|
||||
maxZoom: 20
|
||||
}).addTo(map);
|
||||
var marker = L.marker([lat, lon]).addTo(map);
|
||||
}
|
||||
window.onload = function() {
|
||||
{/literal}setupMap({$d['coordinates']});{literal}
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
{include file="sections/footer.tpl"}
|
@ -16,18 +16,38 @@
|
||||
<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}customers/csv"
|
||||
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}customers/csv"
|
||||
onclick="return confirm('This will export to CSV?')"><span class="glyphicon glyphicon-download"
|
||||
aria-hidden="true"></span> CSV</a>
|
||||
</div>
|
||||
{/if}
|
||||
{Lang::T('Manage Contact')}
|
||||
</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}customers">
|
||||
<form id="site-search" method="post" action="{$_url}customers">
|
||||
<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 </span>
|
||||
<div class="row row-no-gutters">
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" id="order" name="order">
|
||||
<option value="username" {if $order eq 'username' }selected{/if}>{Lang::T('Username')}</option>
|
||||
<option value="created_at" {if $order eq 'created_at' }selected{/if}>{Lang::T('Created Date')}</option>
|
||||
<option value="balance" {if $order eq 'balance' }selected{/if}>{Lang::T('Balance')}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<select class="form-control" id="orderby" name="orderby">
|
||||
<option value="asc" {if $orderby eq 'asc' }selected{/if}>{Lang::T('Ascending')}</option>
|
||||
<option value="desc" {if $orderby eq 'desc' }selected{/if}>{Lang::T('Descending')}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-search"></span>
|
||||
@ -38,13 +58,15 @@
|
||||
<button class="btn btn-success" type="submit">{Lang::T('Search')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<a href="{$_url}customers/add" class="btn btn-primary btn-block"><i
|
||||
class="ion ion-android-add">
|
||||
</i> {Lang::T('Add New Contact')}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<a href="{$_url}customers/add" class="btn btn-primary btn-block"><i class="ion ion-android-add">
|
||||
</i> {Lang::T('Add New Contact')}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br>
|
||||
<div class="table-responsive table_mobile">
|
||||
<table id="customerTable" class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
@ -56,50 +78,52 @@
|
||||
<th>{Lang::T('Contact')}</th>
|
||||
<th>{Lang::T('Package')}</th>
|
||||
<th>{Lang::T('Service Type')}</th>
|
||||
<th>{Lang::T('Status')}</th>
|
||||
<th>{Lang::T('Created On')}</th>
|
||||
<th>{Lang::T('Manage')}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $d as $ds}
|
||||
<tr>
|
||||
<td onclick="window.location.href = '{$_url}customers/view/{$ds['id']}'"
|
||||
style="cursor:pointer;">{$ds['username']}</td>
|
||||
<td>{$ds['account_type']}</td>
|
||||
<td onclick="window.location.href = '{$_url}customers/view/{$ds['id']}'"
|
||||
style="cursor: pointer;">{$ds['fullname']}</td>
|
||||
<td>{Lang::moneyFormat($ds['balance'])}</td>
|
||||
<td align="center">
|
||||
{if $ds['phonenumber']}
|
||||
<a href="tel:{$ds['phonenumber']}" class="btn btn-default btn-xs"
|
||||
title="{$ds['phonenumber']}"><i class="glyphicon glyphicon-earphone"></i></a>
|
||||
{/if}
|
||||
{if $ds['email']}
|
||||
<a href="mailto:{$ds['email']}" class="btn btn-default btn-xs"
|
||||
title="{$ds['email']}"><i class="glyphicon glyphicon-envelope"></i></a>
|
||||
{/if}
|
||||
{if $ds['coordinates']}
|
||||
<a href="https://www.google.com/maps/dir//{$ds['coordinates']}/" target="_blank"
|
||||
class="btn btn-default btn-xs" title="{$ds['coordinates']}"><i
|
||||
class="glyphicon glyphicon-map-marker"></i></a>
|
||||
{/if}
|
||||
</td>
|
||||
<td align="center" api-get-text="{$_url}autoload/customer_is_active/{$ds['id']}">
|
||||
<span class="label label-default">•</span>
|
||||
</td>
|
||||
<td>{$ds['service_type']}</td>
|
||||
<td>{Lang::dateTimeFormat($ds['created_at'])}</td>
|
||||
<td align="center">
|
||||
<a href="{$_url}customers/view/{$ds['id']}" id="{$ds['id']}"
|
||||
style="margin: 0px; color:black"
|
||||
class="btn btn-success btn-xs"> {Lang::T('View')} </a>
|
||||
<a href="{$_url}customers/edit/{$ds['id']}" id="{$ds['id']}"
|
||||
style="margin: 0px; color:black"
|
||||
class="btn btn-info btn-xs"> {Lang::T('Edit')} </a>
|
||||
<a href="{$_url}plan/recharge/{$ds['id']}" id="{$ds['id']}" style="margin: 0px;"
|
||||
class="btn btn-primary btn-xs">{Lang::T('Recharge')}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td onclick="window.location.href = '{$_url}customers/view/{$ds['id']}'"
|
||||
style="cursor:pointer;">{$ds['username']}</td>
|
||||
<td>{$ds['account_type']}</td>
|
||||
<td onclick="window.location.href = '{$_url}customers/view/{$ds['id']}'"
|
||||
style="cursor: pointer;">{$ds['fullname']}</td>
|
||||
<td>{Lang::moneyFormat($ds['balance'])}</td>
|
||||
<td align="center">
|
||||
{if $ds['phonenumber']}
|
||||
<a href="tel:{$ds['phonenumber']}" class="btn btn-default btn-xs"
|
||||
title="{$ds['phonenumber']}"><i class="glyphicon glyphicon-earphone"></i></a>
|
||||
{/if}
|
||||
{if $ds['email']}
|
||||
<a href="mailto:{$ds['email']}" class="btn btn-default btn-xs"
|
||||
title="{$ds['email']}"><i class="glyphicon glyphicon-envelope"></i></a>
|
||||
{/if}
|
||||
{if $ds['coordinates']}
|
||||
<a href="https://www.google.com/maps/dir//{$ds['coordinates']}/" target="_blank"
|
||||
class="btn btn-default btn-xs" title="{$ds['coordinates']}"><i
|
||||
class="glyphicon glyphicon-map-marker"></i></a>
|
||||
{/if}
|
||||
</td>
|
||||
<td align="center" api-get-text="{$_url}autoload/customer_is_active/{$ds['id']}">
|
||||
<span class="label label-default">•</span>
|
||||
</td>
|
||||
<td>{$ds['service_type']}</td>
|
||||
<td>{Lang::T($ds['status'])}</td>
|
||||
<td>{Lang::dateTimeFormat($ds['created_at'])}</td>
|
||||
<td align="center">
|
||||
<a href="{$_url}customers/view/{$ds['id']}" id="{$ds['id']}"
|
||||
style="margin: 0px; color:black"
|
||||
class="btn btn-success btn-xs"> {Lang::T('View')} </a>
|
||||
<a href="{$_url}customers/edit/{$ds['id']}" id="{$ds['id']}"
|
||||
style="margin: 0px; color:black"
|
||||
class="btn btn-info btn-xs"> {Lang::T('Edit')} </a>
|
||||
<a href="{$_url}plan/recharge/{$ds['id']}" id="{$ds['id']}" style="margin: 0px;"
|
||||
class="btn btn-primary btn-xs">{Lang::T('Recharge')}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
@ -115,11 +139,15 @@
|
||||
<script>
|
||||
var $j = jQuery.noConflict();
|
||||
|
||||
$j(document).ready(function () {
|
||||
$j(document).ready(function() {
|
||||
$j('#customerTable').DataTable({
|
||||
order: [[{$order_pos}, '{$orderby}']],
|
||||
"pagingType": "full_numbers",
|
||||
"lengthMenu": [ [5, 10, 25, 50, 100, -1], [5, 10, 25, 50, 100, "All"] ],
|
||||
"pageLength": 5
|
||||
"lengthMenu": [
|
||||
[5, 10, 25, 50, 100, -1],
|
||||
[5, 10, 25, 50, 100, "All"]
|
||||
],
|
||||
"pageLength": 25
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user