Upload files to "ui/ui"

Signed-off-by: nestict <icttechnest@gmail.com>
This commit is contained in:
nestict 2025-05-24 12:08:53 +02:00
parent 4e9a4d12d4
commit e79b6ffc00
5 changed files with 1195 additions and 0 deletions

159
ui/ui/app-localisation.tpl Normal file
View File

@ -0,0 +1,159 @@
{include file="sections/header.tpl"}
<div class="container-fluid">
<div class="row">
<div class="col-xxl-6 col-xxl-12">
<div class="col-md-12">
<div class="card">
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<h5 class="card-title">{Lang::T('Localisation')}</h5>
</div>
<div class="card-body">
<form class="form-horizontal" method="post" role="form"
action="{$_url}settings/localisation-post">
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Timezone')}</label>
<div class="col-md-6">
<select name="tzone" id="tzone" class="form-control">
{foreach $tlist as $value => $label}
<option value="{$value}" {if $_c['timezone'] eq
$value}selected="selected" {/if}>
{$label}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Date Format')}</label>
<div class="col-md-6">
<select class="form-control" name="date_format" id="date_format">
<option value="d/m/Y" {if $_c['date_format'] eq 'd/m/Y' }
selected="selected" {/if}>
{date('d/m/Y')}</option>
<option value="d.m.Y" {if $_c['date_format'] eq 'd.m.Y' }
selected="selected" {/if}>
{date('d.m.Y')}</option>
<option value="d-m-Y" {if $_c['date_format'] eq 'd-m-Y' }
selected="selected" {/if}>
{date('d-m-Y')}</option>
<option value="m/d/Y" {if $_c['date_format'] eq 'm/d/Y' }
selected="selected" {/if}>
{date('m/d/Y')}</option>
<option value="Y/m/d" {if $_c['date_format'] eq 'Y/m/d' }
selected="selected" {/if}>
{date('Y/m/d')}</option>
<option value="Y-m-d" {if $_c['date_format'] eq 'Y-m-d' }
selected="selected" {/if}>
{date('Y-m-d')}</option>
<option value="M d Y" {if $_c['date_format'] eq 'M d Y' }
selected="selected" {/if}>
{date('M d Y')}</option>
<option value="d M Y" {if $_c['date_format'] eq 'd M Y' }
selected="selected" {/if}>
{date('d M Y')}</option>
<option value="jS M y" {if $_c['date_format'] eq 'jS M y' }
selected="selected" {/if}>
{date('jS M y')}</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Default Language')}</label>
<div class="col-md-6">
<select class="form-control" name="lan" id="lan">
{foreach $lani as $lanis}
<option value="{$lanis@key}" {if $_c['language'] eq $lanis@key}
selected="selected" {/if}>
{$lanis@key}
</option>
{/foreach}
<option disabled>_________</option>
{foreach $lan as $lans}
<option value="{$lans@key}" {if $_c['language'] eq $lans@key}
selected="selected" {/if}>
{$lans@key}
</option>
{/foreach}
</select>
</div>
<div class="col-md-4 help-block">
<a href="{$_url}settings/language">{Lang::T('Language Editor')}</a>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Decimal Point')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="dec_point" name="dec_point"
value="{$_c['dec_point']}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Thousands Separator')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="thousands_sep"
name="thousands_sep" value="{$_c['thousands_sep']}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Currency Code')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="currency_code"
name="currency_code" value="{$_c['currency_code']}">
</div>
<span class="help-block col-md-4">{Lang::T('Keep it blank if you do not want to
show currency code')}</span>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Country Code Phone')}</label>
<div class="col-md-6">
<div class="input-group">
<span class="input-group-text" id="basic-addon1">+</span>
<input type="text" class="form-control" id="country_code_phone"
placeholder="62" name="country_code_phone"
value="{$_c['country_code_phone']}">
</div>
</div>
</div>
<hr>
<div class="form-group row">
<label class="col-md-2 control-label">Radius Plan</label>
<div class="col-md-6">
<input type="text" class="form-control" id="radius_plan" name="radius_plan"
value="{if $_c['radius_plan']==''}Radius Plan{else}{$_c['radius_plan']}{/if}">
</div>
<span class="help-block col-md-4">{Lang::T('Change title in user Plan
order')}</span>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">Hotspot Plan</label>
<div class="col-md-6">
<input type="text" class="form-control" id="hotspot_plan"
name="hotspot_plan"
value="{if $_c['hotspot_plan']==''}Hotspot Plan{else}{$_c['hotspot_plan']}{/if}">
</div>
<span class="help-block col-md-4">{Lang::T('Change title in user Plan
order')}</span>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">PPPOE Plan</label>
<div class="col-md-6">
<input type="text" class="form-control" id="pppoe_plan" name="pppoe_plan"
value="{if $_c['pppoe_plan']==''}PPPOE Plan{else}{$_c['pppoe_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" type="submit">{Lang::T('Save
Changes')}</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
{include file="sections/footer.tpl"}

192
ui/ui/app-notifications.tpl Normal file
View File

@ -0,0 +1,192 @@
{include file="sections/header.tpl"}
<div class="container-fluid">
<form class="form-horizontal" method="post" role="form" action="{$_url}settings/notifications-post">
<div class="row">
<div class="col-xxl-6 col-xxl-12">
<div class="col-md-12">
<div class="card">
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">{Lang::T('User Notification')}</h5>
<div class="btn-group pull-right">
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group">
<label class="control-label">{Lang::T('Expired Notification
Message')}</label>
<div class="">
<textarea style="overflow: hidden;" class="form-control"
id="expired" oninput="autoExpand(this)" name="expired"
placeholder="Hello [[name]], your internet package [[package]] has been expired"
rows="6">{if $_json['expired']!=''}{Lang::htmlspecialchars($_json['expired'])}{else}Hello [[name]], your internet package [[package]] has been expired.{/if}</textarea>
</div>
<script>
function autoExpand(element) {
element.style.height = 'auto';
element.style.height = (element.scrollHeight) + 'px';
}
</script>
<p class="help-block">
<b>[[name]]</b> will be replaced with Customer Name.
<b>[[username]]</b> will be replaced with Customer username.
<b>[[package]]</b> will be replaced with Package name.
<b>[[price]]</b> will be replaced with Package price.
<b>[[bills]]</b> aditional bills for customers
</p>
</div>
<div class="form-group row">
<label class="control-label">{Lang::T('Reminder 7 days')}</label>
<div class="">
<textarea class="form-control" id="reminder_7_day"
name="reminder_7_day"
rows="4">{Lang::htmlspecialchars($_json['reminder_7_day'])}</textarea>
</div>
<p class="help-block">
<b>[[name]]</b> will be replaced with Customer Name.
<b>[[username]]</b> will be replaced with Customer username.
<b>[[package]]</b> will be replaced with Package name.
<b>[[price]]</b> will be replaced with Package price.
<b>[[expired_date]]</b> will be replaced with Expiration date.
<b>[[bills]]</b> aditional bills for customers
</p>
</div>
<div class="form-group">
<label class="control-label">{Lang::T('Reminder 3 days')}</label>
<div class="">
<textarea class="form-control" id="reminder_3_day"
name="reminder_3_day"
rows="3">{Lang::htmlspecialchars($_json['reminder_3_day'])}</textarea>
</div>
<p class="help-block">
<b>[[name]]</b> will be replaced with Customer Name.
<b>[[username]]</b> will be replaced with Customer username.
<b>[[package]]</b> will be replaced with Package name.
<b>[[price]]</b> will be replaced with Package price.
<b>[[expired_date]]</b> will be replaced with Expiration date.
<b>[[bills]]</b> aditional bills for customers
</p>
</div>
<div class="form-group">
<label class="control-label">{Lang::T('Reminder 1 day')}</label>
<div class="">
<textarea class="form-control" id="reminder_1_day"
name="reminder_1_day"
rows="3">{Lang::htmlspecialchars($_json['reminder_1_day'])}</textarea>
</div>
<p class="help-block">
<b>[[name]]</b> will be replaced with Customer Name.
<b>[[username]]</b> will be replaced with Customer username.
<b>[[package]]</b> will be replaced with Package name.
<b>[[price]]</b> will be replaced with Package price.
<b>[[expired_date]]</b> will be replaced with Expiration date.
<b>[[bills]]</b> aditional bills for customers
</p>
</div>
<div class="form-group">
<label class="control-label">{Lang::T('Invoice Notification
Payment')}</label>
<div class="">
<textarea class="form-control" id="invoice_paid" name="invoice_paid"
placeholder="Hello [[name]], your internet package [[package]] has been expired"
rows="20">{Lang::htmlspecialchars($_json['invoice_paid'])}</textarea>
</div>
<p class="help-block">
<b>[[company_name]]</b> Your Company Name at Settings.
<b>[[address]]</b> Your Company Address at Settings.
<b>[[phone]]</b> Your Company Phone at Settings.
<b>[[invoice]]</b> invoice number.
<b>[[date]]</b> Date invoice created.
<b>[[payment_gateway]]</b> Payment gateway user paid from.
<b>[[payment_channel]]</b> Payment channel user paid from.
<b>[[type]]</b> is Hotspot/PPPOE.
<b>[[plan_name]]</b> Internet Package.
<b>[[plan_price]]</b> Internet Package Prices.
<b>[[name]]</b> Receiver name.
<b>[[user_name]]</b> Username internet.
<b>[[user_password]]</b> User password.
<b>[[expired_date]]</b> Expired datetime.
<b>[[footer]]</b> Invoice Footer.
<b>[[note]]</b> For Notes by admin.
</p>
</div>
<div class="form-group">
<label class="control-label">{Lang::T('Balance Notification
Payment')}</label>
<div class="">
<textarea class="form-control" id="invoice_balance"
name="invoice_balance"
placeholder="Hello [[name]], your internet package [[package]] has been expired"
rows="20">{Lang::htmlspecialchars($_json['invoice_balance'])}</textarea>
</div>
<p class="help-block">
<b>[[company_name]]</b> Your Company Name at Settings.
<b>[[address]]</b> Your Company Address at Settings.
<b>[[phone]]</b> Your Company Phone at Settings.
<b>[[invoice]]</b> invoice number.
<b>[[date]]</b> Date invoice created.
<b>[[payment_gateway]]</b> Payment gateway user paid from.
<b>[[payment_channel]]</b> Payment channel user paid from.
<b>[[type]]</b> is Hotspot/PPPOE.
<b>[[plan_name]]</b> Internet Package.
<b>[[plan_price]]</b> Internet Package Prices.
<b>[[name]]</b> Receiver name.
<b>[[user_name]]</b> Username internet.
<b>[[user_password]]</b> User password.
<b>[[trx_date]]</b> Transaction datetime.
<b>[[balance_before]]</b> Balance Before.
<b>[[balance]]</b> Balance After.
<b>[[footer]]</b> Invoice Footer.
</p>
</div>
{if $_c['enable_balance'] == 'yes'}
<div class="panel-body">
<div class="form-group">
<label class="control-label">{Lang::T('Send Balance')}</label>
<div class="">
<textarea class="form-control" id="balance_send"
name="balance_send"
rows="3">{if $_json['balance_send']}{Lang::htmlspecialchars($_json['balance_send'])}{else}{Lang::htmlspecialchars($_default['balance_send'])}{/if}</textarea>
</div>
<p class="help-block">
<b>[[name]]</b> Receiver name.
<b>[[balance]]</b> how much balance have been send.
<b>[[current_balance]]</b> Current Balance.
</p>
</div>
</div>
<div class="panel-body">
<div class="form-group">
<label class="control-label">{Lang::T('Received Balance')}</label>
<div class="">
<textarea class="form-control" id="balance_received"
name="balance_received"
rows="3">{if $_json['balance_received']}{Lang::htmlspecialchars($_json['balance_received'])}{else}{Lang::htmlspecialchars($_default['balance_received'])}{/if}</textarea>
</div>
<p class="help-block">
<b>[[name]]</b> Sender name.
<b>[[balance]]</b> how much balance have been received.
<b>[[current_balance]]</b> Current Balance.
</p>
</div>
</div>
{/if}
<hr>
<div class="form-group">
<button class="btn btn-success btn-block" type="submit">{Lang::T('Save
Changes')}</button>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
{include file="sections/footer.tpl"}

831
ui/ui/app-settings.tpl Normal file
View File

@ -0,0 +1,831 @@
{include file="sections/header.tpl"}
<div class="container-fluid">
<form class="form-horizontal" method="post" role="form" action="{$_url}settings/app-post"
enctype="multipart/form-data">
<div class="row">
<div class="col-xxl-12">
<div class="col-md-12">
<div class="card">
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">{Lang::T('General Settings')}</h5>
<div class="btn-group pull-right">
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Application Name/
Company Name')}</label>
<div class="col-md-6">
<input type="text" required class="form-control" id="CompanyName"
name="CompanyName" value="{$_c['CompanyName']}">
</div>
<span class="help-block col-md-4">{Lang::T('This Name will be shown on
the Title')}</span>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Company Logo')}</label>
<div class="col-md-6">
<input type="file" class="form-control" id="logo" name="logo"
accept="image/*">
<span class="help-block">For PDF Reports | Best size 1078 x 200 |
uploaded image will be
autosize</span>
</div>
<span class="help-block col-md-4">
<a href="./{$logo}" target="_blank"><img src="./{$logo}" height="48"
alt="logo for PDF"></a>
</span>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Company
Footer')}</label>
<div class="col-md-6">
<input type="text" required class="form-control" id="CompanyFooter"
name="CompanyFooter" value="{$_c['CompanyFooter']}">
</div>
<span class="help-block col-md-4">{Lang::T('Will show below user
pages')}</span>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Address')}</label>
<div class="col-md-6">
<textarea class="form-control" id="address" name="address"
rows="3">{Lang::htmlspecialchars($_c['address'])}</textarea>
</div>
<span class="help-block col-md-4">{Lang::T('You can use html
tag')}</span>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Phone Number')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="phone" name="phone"
value="{$_c['phone']}">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Invoice
Footer')}</label>
<div class="col-md-6">
<textarea class="form-control" id="note" name="note"
rows="3">{Lang::htmlspecialchars($_c['note'])}</textarea>
<span class="help-block">{Lang::T('You can use html tag')}</span>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label"><i
class="glyphicon glyphicon-print"></i> Print Max
Char</label>
<div class="col-md-6">
<input type="number" required class="form-control" id="printer_cols"
placeholder="37" name="printer_cols"
value="{$_c['printer_cols']}">
</div>
<span class="help-block col-md-4">For invoice print using Thermal
Printer</span>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">Theme</label>
<div class="col-md-6">
<select name="theme" id="theme" class="form-select" style="height: 52px; background-color: white;">
<option value="default" {if $_c['theme'] eq 'default'
}selected="selected" {/if}>Default
</option>
{foreach $themes as $theme}
<option value="{$theme}" {if $_c['theme'] eq
$theme}selected="selected" {/if}>
{Lang::ucWords($theme)}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">APP URL</label>
<div class="col-md-6">
<input type="text" readonly class="form-control" value="{$app_url}">
</div>
<p class="help-block col-md-4">edit at config.php</p>
</div>
</div>
</div>
<hr>
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">Hide Dashboard Content</h5>
<div class="btn-group pull-right">
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-3 control-label"><input type="checkbox"
name="hide_mrc" value="yes" {if $_c['hide_mrc'] eq 'yes'
}checked{/if}>
{Lang::T('Monthly Registered Customers')}</label>
<label class="col-md-2 control-label"><input type="checkbox"
name="hide_tms" value="yes" {if $_c['hide_tms'] eq 'yes'
}checked{/if}> {Lang::T('Total Monthly Sales')}</label>
<label class="col-md-2 control-label"><input type="checkbox"
name="hide_aui" value="yes" {if $_c['hide_aui'] eq 'yes'
}checked{/if}> {Lang::T('All Users Insights')}</label>
<label class="col-md-2 control-label"><input type="checkbox"
name="hide_al" value="yes" {if $_c['hide_al'] eq 'yes'
}checked{/if}> {Lang::T('Activity Log')}</label>
<label class="col-md-2 control-label"><input type="checkbox"
name="hide_uet" value="yes" {if $_c['hide_uet'] eq 'yes'
}checked{/if}> {Lang::T('User Expired, Today')}</label>
<label class="col-md-2 control-label"><input type="checkbox"
name="hide_vs" value="yes" {if $_c['hide_vs'] eq 'yes'
}checked{/if}> Vouchers Stock</label>
<label class="col-md-2 control-label"><input type="checkbox"
name="hide_pg" value="yes" {if $_c['hide_pg'] eq 'yes'
}checked{/if}> Payment Gateway</label>
</div>
</div>
</div>
<hr>
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">Voucher</h5>
<div class="btn-group pull-right">
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Disable
Voucher')}</label>
<div class="col-md-6">
<select name="disable_voucher" id="disable_voucher"
class="form-select" style="height: 52px; background-color: white;">
<option value="no" {if $_c['disable_voucher']=='no'
}selected="selected" {/if}>No
</option>
<option value="yes" {if $_c['disable_voucher']=='yes'
}selected="selected" {/if}>Yes
</option>
</select>
</div>
<p class="help-block col-md-4">{Lang::T('Voucher activation menu will be
hidden')}</p>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Voucher
Format')}</label>
<div class="col-md-6">
<select name="voucher_format" id="voucher_format"
class="form-select" style="height: 52px; background-color: white;">
<option value="up" {if $_c['voucher_format']=='up'
}selected="selected" {/if}>UPPERCASE
</option>
<option value="low" {if $_c['voucher_format']=='low'
}selected="selected" {/if}>
lowercase
</option>
<option value="rand" {if $_c['voucher_format']=='rand'
}selected="selected" {/if}>
RaNdoM
</option>
</select>
</div>
<p class="help-block col-md-4">UPPERCASE lowercase RaNdoM</p>
</div>
{if $_c['disable_voucher'] != 'yes'}
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Disable
Registration')}</label>
<div class="col-md-6">
<select name="disable_registration" id="disable_registration"
class="form-select" style="height: 52px; background-color: white;">
<option value="no" {if $_c['disable_registration']=='no'
}selected="selected" {/if}>No
</option>
<option value="yes" {if $_c['disable_registration']=='yes'
}selected="selected" {/if}>
Yes
</option>
</select>
</div>
<p class="help-block col-md-4">
{Lang::T('Customer just Login with Phone number and Voucher Code,
Voucher will be
password')}
</p>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">Redirect after Activation</label>
<div class="col-md-6">
<input type="text" class="form-control" id="voucher_redirect"
name="voucher_redirect"
placeholder="https://192.168.88.1/status"
value="{$voucher_redirect}">
</div>
<p class="help-block col-md-4">
{Lang::T('After Customer activate voucher or login, customer will be
redirected to this
url')}
</p>
</div>
{/if}
</div>
</div>
<hr>
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">FreeRadius</h5>
<div class="btn-group pull-right">
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-2 control-label">Enable Radius</label>
<div class="col-md-6">
<select name="radius_enable" id="radius_enable"
class="form-select" style="height: 52px; background-color: white;" text-muted">
<option value="0">No</option>
<option value="1" {if $_c['radius_enable']}selected="selected"
{/if}>Yes</option>
</select>
</div>
<p class="help-block col-md-4"><a
href="https://github.com/hotspotbilling/phpnuxbill/wiki/FreeRadius"
target="_blank">You can find Free Radius Setup & Configuration
Instructions here.</a></p>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">Radius Client</label>
<div class="col-md-6">
<input type="text" class="form-control" name="radius_client"
value="{$_c['radius_client']}">
</div>
</div>
</div>
</div>
<hr>
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">{Lang::T('Balance System')}</h5>
<div class="btn-group pull-right">
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Enable System')}</label>
<div class="col-md-6">
<select name="enable_balance" id="enable_balance"
class="form-select" style="height: 52px; background-color: white;">
<option value="no" {if $_c['enable_balance']=='no'
}selected="selected" {/if}>No
</option>
<option value="yes" {if $_c['enable_balance']=='yes'
}selected="selected" {/if}>Yes
</option>
</select>
</div>
<p class="help-block col-md-4">{Lang::T('Customer can deposit money to
buy voucher')}</p>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Allow
Transfer')}</label>
<div class="col-md-6">
<select name="allow_balance_transfer" id="allow_balance_transfer"
class="form-select" style="height: 52px; background-color: white;">
<option value="no" {if $_c['allow_balance_transfer']=='no'
}selected="selected" {/if}>
No</option>
<option value="yes" {if $_c['allow_balance_transfer']=='yes'
}selected="selected" {/if}>
Yes</option>
</select>
</div>
<p class="help-block col-md-4">{Lang::T('Allow balance transfer between
customers')}</p>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Minimum Balance
Transfer')}</label>
<div class="col-md-6">
<input type="number" class="form-control" id="minimum_transfer"
name="minimum_transfer" value="{$_c['minimum_transfer']}">
</div>
</div>
</div>
</div>
<hr>
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">{Lang::T('Telegram Notification')}</h5>
<div class="btn-group pull-right">
<a class="btn btn-success btn-xs" href="javascript:testTg()">Test
TG</a>
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-2 control-label">Telegram Bot Token</label>
<div class="col-md-6">
<input type="password" class="form-control" id="telegram_bot"
name="telegram_bot" onmouseleave="this.type = 'password'"
onmouseenter="this.type = 'text'" value="{$_c['telegram_bot']}"
placeholder="123456:asdasgdkuasghddlashdashldhalskdklasd">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">Telegram User/Channel/Group
ID</label>
<div class="col-md-6">
<input type="text" class="form-control" id="telegram_target_id"
name="telegram_target_id" value="{$_c['telegram_target_id']}"
placeholder="12345678">
</div>
<small id="emailHelp"
class="form-text text-muted help-block col-md-4">You will get
Payment and
Error
notification on you telegram</small>
</div>
</div>
</div>
<hr>
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">{Lang::T('SMS OTP Registration')}</h5>
<div class="btn-group pull-right">
<a class="btn btn-success" href="javascript:testSms()">Test SMS</a>
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-2 control-label">SMS Server URL</label>
<div class="col-md-6">
<input type="text" class="form-control" id="sms_url" name="sms_url"
value="{$_c['sms_url']}"
placeholder="https://domain/?param_number=[number]&param_text=[text]&secret=">
</div>
<p class="help-block col-md-4">Must include <b>[text]</b> &amp;
<b>[number]</b>, it will be
replaced.
</p>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">Or use Mikrotik SMS</label>
<div class="col-md-6">
<select class="form-control"
onchange="document.getElementById('sms_url').value = this.value">
<option value="">Select Router</option>
{foreach $r as $rs}
<option value="{$rs['name']}" {if
$rs['name']==$_c['sms_url']}selected{/if}>
{$rs['name']}</option>
{/foreach}
</select>
</div>
<p class="help-block col-md-4">Must include <b>[text]</b> &amp;
<b>[number]</b>, it will be
replaced.
</p>
</div>
</div>
</div>
<hr>
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">{Lang::T('Whatsapp Notification')}</h5>
<div class="btn-group pull-right">
<a class="btn btn-success" href="javascript:testWa()">Test WA</a>
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-2 control-label">Whatsapp Server URL</label>
<div class="col-md-6">
<input type="text" class="form-control" id="wa_url" name="wa_url"
value="{$_c['wa_url']}"
placeholder="https://domain/?param_number=[number]&param_text=[text]&secret=">
</div>
<p class="help-block col-md-4">Must include <b>[text]</b> &amp;
<b>[number]</b>, it will be
replaced.
</p>
</div>
</div>
</div>
<hr>
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">{Lang::T('Email Notification')}</h5>
<div class="btn-group pull-right">
<a class="btn btn-success" href="javascript:testEmail()">Test
Email</a>
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save" aria-hidden="true"></span>
</button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-2 control-label">SMTP Host : port</label>
<div class="col-md-4">
<input type="text" class="form-control" id="smtp_host"
name="smtp_host" value="{$_c['smtp_host']}"
placeholder="smtp.host.tld">
</div>
<div class="col-md-2">
<input type="number" class="form-control" id="smtp_port"
name="smtp_port" value="{$_c['smtp_port']}"
placeholder="465 587 port">
</div>
<p class="help-block col-md-4">Empty this to use internal mail() PHP</p>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">SMTP username</label>
<div class="col-md-6">
<input type="text" class="form-control" id="smtp_user"
name="smtp_user" value="{$_c['smtp_user']}"
placeholder="user@host.tld">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">SMTP Password</label>
<div class="col-md-6">
<input type="password" class="form-control" id="smtp_pass"
name="smtp_pass" value="{$_c['smtp_pass']}"
onmouseleave="this.type = 'password'"
onmouseenter="this.type = 'text'">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">SMTP Security</label>
<div class="col-md-6">
<select name="smtp_ssltls" id="smtp_ssltls" class="form-select" style="height: 52px; background-color: white;">
<option value="" {if $_c['smtp_ssltls']=='' }selected="selected"
{/if}>Not Secure</option>
<option value="ssl" {if $_c['smtp_ssltls']=='ssl'
}selected="selected" {/if}>SSL</option>
<option value="tls" {if $_c['smtp_ssltls']=='tls'
}selected="selected" {/if}>TLS</option>
</select>
</div>
<p class="help-block col-md-4">UPPERCASE lowercase RaNdoM</p>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">Mail From</label>
<div class="col-md-6">
<input type="text" class="form-control" id="mail_from"
name="mail_from" value="{$_c['mail_from']}"
placeholder="noreply@host.tld">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">Mail Reply To</label>
<div class="col-md-6">
<input type="text" class="form-control" id="mail_reply_to"
name="mail_reply_to" value="{$_c['mail_reply_to']}"
placeholder="support@host.tld">
</div>
<p class="help-block col-md-4">Customer will reply email to this
address, empty if you want to use From Address</p>
</div>
</div>
</div>
<hr>
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">{Lang::T('User Notification')}</h5>
<div class="btn-group pull-right">
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Expired
Notification')}</label>
<div class="col-md-6">
<select name="user_notification_expired"
id="user_notification_expired" class="form-select" style="height: 52px; background-color: white;">
<option value="none">None</option>
<option value="wa" {if $_c['user_notification_expired']=='wa'
}selected="selected" {/if}>Whatsapp</option>
<option value="sms" {if $_c['user_notification_expired']=='sms'
}selected="selected" {/if}>SMS</option>
</select>
</div>
<p class="help-block col-md-4">{Lang::T('User will get notification when
package expired')}</p>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Payment
Notification')}</label>
<div class="col-md-6">
<select name="user_notification_payment"
id="user_notification_payment" class="form-select" style="height: 52px; background-color: white;">
<option value="none">None</option>
<option value="wa" {if $_c['user_notification_payment']=='wa'
}selected="selected" {/if}>Whatsapp</option>
<option value="sms" {if $_c['user_notification_payment']=='sms'
}selected="selected" {/if}>SMS</option>
</select>
</div>
<p class="help-block col-md-4">
{Lang::T('User will get invoice notification when buy package or
package refilled')}</p>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Reminder
Notification')}</label>
<div class="col-md-6">
<select name="user_notification_reminder"
id="user_notification_reminder" class="form-select" style="height: 52px; background-color: white;">
<option value="none">None</option>
<option value="wa" {if $_c['user_notification_reminder']=='wa'
}selected="selected" {/if}>Whatsapp</option>
<option value="sms" {if $_c['user_notification_reminder']=='sms'
}selected="selected" {/if}>SMS</option>
</select>
</div>
</div>
</div>
</div>
<hr>
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">{Lang::T('Tawk.to Chat Widget')}</h5>
<div class="btn-group pull-right">
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-2 control-label">https://tawk.to/chat/</label>
<div class="col-md-6">
<input type="text" class="form-control" id="tawkto" name="tawkto"
value="{$_c['tawkto']}"
placeholder="62f1ca7037898912e961f5/1ga07df">
</div>
<p class="help-block col-md-4">For Direct Chat Link with client from
their Dashboard</p>
</div>
<div class="col-md-12">
<div class="card kanbanPreview-bx">
<div class="card-body">
<div class="sub-card">
<span class="text-warning sub-title fs-14">Copy and paste in
Terminal</span>
<p class="font-w500">
<code>/ip hotspot walled-garden add dst-host=tawk.to add dst-host=*.tawk.to</code>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<hr>
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">Generate Your API Key</h5>
<div class="btn-group pull-right">
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-2 control-label">Access Token</label>
<div class="col-md-6">
<input type="password" class="form-control" id="api_key"
name="api_key" value="{$_c['api_key']}"
placeholder="Empty this to randomly created API key"
onmouseleave="this.type = 'password'"
onmouseenter="this.type = 'text'">
</div>
<p class="col-md-4 help-block">{Lang::T('This Token will act as
SuperAdmin/Admin.')}</p>
<p class="col-md-12 help-block">Empty this to randomly created API key
that you can use to link this application to other services</p>
</div>
</div>
</div>
<hr>
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">{Lang::T('Proxy')}</h5>
<div class="btn-group pull-right">
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Proxy
Server')}</label>
<div class="col-md-6">
<input type="text" class="form-control" id="http_proxy"
name="http_proxy" value="{$_c['http_proxy']}"
placeholder="127.0.0.1:3128">
</div>
<p class="col-md-4 help-block">Enter Your Proxy Server IP Address or DNS IP or URl</p>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('Proxy Server
Login')}</label>
<div class="col-md-6">
<input type="password" class="form-control" id="http_proxyauth"
name="http_proxyauth" autocomplete="off"
value="{$_c['http_proxyauth']}" placeholder="username:password"
onmouseleave="this.type = 'password'"
onmouseenter="this.type = 'text'">
</div>
<p class="col-md-4 help-block">Enter Your Proxy Server Login Password</p>
</div>
</div>
</div>
<hr>
<div class="card-header"
style="display: grid; align-content: center; justify-content: center;">
<div class="panel panel-primary panel-hovered panel-stacked mb30">
<div class="card-header">
<h5 class="card-title">{Lang::T('Miscellaneous')}</h5>
<div class="btn-group pull-right">
<button class="btn btn-primary" title="save" type="submit"><span
class="flaticon-381-save"
aria-hidden="true"></span></button>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('OTP
Required')}</label>
<div class="col-md-6">
<select name="allow_phone_otp" id="allow_phone_otp"
class="form-select" style="height: 52px; background-color: white;">
<option value="no" {if $_c['allow_phone_otp']=='no'
}selected="selected" {/if}>
No</option>
<option value="yes" {if $_c['allow_phone_otp']=='yes'
}selected="selected" {/if}>Yes
</option>
</select>
</div>
<p class="help-block col-md-4">{Lang::T('OTP is required
when user want
to change phone
number')}</p>
</div>
<div class="form-group row">
<label class="col-md-2 control-label">{Lang::T('OTP Method')}</label>
<div class="col-md-6">
<select name="phone_otp_type" id="phone_otp_type"
class="form-select" style="height: 52px; background-color: white;">
<option value="sms" {if $_c['phone_otp_type']=='sms'
}selected="selected" {/if}>
{Lang::T('SMS')}
<option value="whatsapp" {if $_c['phone_otp_type']=='whatsapp'
}selected="selected" {/if}>
{Lang::T('WhatsApp')}
<option value="both" {if $_c['phone_otp_type']=='both'
}selected="selected" {/if}>
{Lang::T('SMS and WhatsApp')}
</option>
</select>
</div>
<p class="help-block col-md-4">{Lang::T('The method which
OTP will be
sent to user')}</p>
</div>
</div>
</div>
<hr>
<div class="card-body">
<div class="form-group">
<button class="btn btn-success btn-block" type="submit">{Lang::T('Save
Changes')}</button>
</div>
</div>
<div class="card-body">
<div class="card kanbanPreview-bx">
<div class="card-body">
<div class="sub-card">
<span class="text-warning sub-title fs-14">Copy and paste in
Terminal</span>
<code>/ip hotspot walled-garden add dst-host={$_domain} add dst-host=*.{$_domain}</code>
</div>
</div>
</div>
<div class="card kanbanPreview-bx">
<div class="card-body">
<div class="sub-card">
<span class="text-warning sub-title fs-14">Cron Jobs</span>
<p># Expired Cronjob Every 5 Minutes</p>
<pre>*/5 * * * * cd {$dir} && {$php} cron.php</pre>
<p># Expired Cronjob Every 1 Hour</p>
<pre>0 * * * * cd {$dir} && {$php} cron.php</pre>
<p># Reminder Cronjob Every 7 AM</p>
<pre>0 7 * * * cd {$dir} && {$php} cron_reminder.php</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<script>
function testWa() {
var target = prompt("Phone number\nSave First before Test", "");
if (target != null) {
window.location.href = '{$_url}settings/app&testWa=' + target;
}
}
function testSms() {
var target = prompt("Phone number\nSave First before Test", "");
if (target != null) {
window.location.href = '{$_url}settings/app&testSms=' + target;
}
}
function testEmail() {
var target = prompt("Email\nSave First before Test", "");
if (target != null) {
window.location.href = '{$_url}settings/app&testEmail=' + target;
}
}
function testTg() {
window.location.href = '{$_url}settings/app&testTg=test';
}
</script>
</div>
{include file="sections/footer.tpl"}

4
ui/ui/autoload-pool.tpl Normal file
View File

@ -0,0 +1,4 @@
<option value=''>{Lang::T('Select Pool')}</option>
{foreach $d as $ds}
<option value="{$ds['pool_name']}">{$ds['pool_name']}{if $routers==''} - {$ds['routers']}{/if}</option>
{/foreach}

9
ui/ui/autoload.tpl Normal file
View File

@ -0,0 +1,9 @@
<option value="">Select Plans</option>
{foreach $d as $ds}
<option value="{$ds['id']}">
{if $ds['enabled'] neq 1}DISABLED PLAN &bull; {/if}
{$ds['name_plan']} &bull;
{Lang::moneyFormat($ds['price'])}
{if $ds['prepaid'] neq 'yes'} &bull; POSTPAID {/if}
</option>
{/foreach}