Add Setting to disable Voucher
This commit is contained in:
parent
dea73fb2a6
commit
5e474e4bf7
@ -2,6 +2,12 @@
|
||||
|
||||
# CHANGELOG
|
||||
|
||||
## 2023
|
||||
|
||||
- Fix link buy Voucher
|
||||
- Add email field to registration form
|
||||
- Change registration design Form
|
||||
- Add Setting to disable Voucher
|
||||
## 2023.6.20
|
||||
|
||||
- Hide time for Created date.
|
||||
|
@ -206,6 +206,7 @@ switch ($action) {
|
||||
case 'app-post':
|
||||
$company = _post('company');
|
||||
$footer = _post('footer');
|
||||
$disable_voucher = _post('disable_voucher');
|
||||
$telegram_bot = _post('telegram_bot');
|
||||
$telegram_target_id = _post('telegram_target_id');
|
||||
$sms_url = _post('sms_url');
|
||||
@ -245,6 +246,17 @@ switch ($action) {
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'disable_voucher')->find_one();
|
||||
if($d){
|
||||
$d->value = $disable_voucher;
|
||||
$d->save();
|
||||
}else{
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'disable_voucher';
|
||||
$d->value = $disable_voucher;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'telegram_bot')->find_one();
|
||||
if($d){
|
||||
$d->value = $telegram_bot;
|
||||
|
@ -331,3 +331,4 @@ $_L['Your_account_not_connected_to_internet'] = 'Your account not connected to i
|
||||
|
||||
$_L['Failed_to_create_transaction_'] = 'Failed to create transaction. ';
|
||||
$_L['Failed_to_check_status_transaction_'] = 'Failed to check status transaction. ';
|
||||
$_L['Disable_Voucher'] = 'Disable Voucher';
|
||||
|
@ -56,6 +56,16 @@
|
||||
<p class="help-block">edit at config.php</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<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-control">
|
||||
<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>
|
||||
<p class="help-block">Voucher activation menu will be hidden</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-heading">Telegram Notification</div>
|
||||
<div class="panel-body">
|
||||
@ -155,17 +165,19 @@ add dst-host=*.tawk.to</pre>
|
||||
<span class="help-block">{$_L['You_can_use_html_tag']}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-primary waves-effect waves-light"
|
||||
type="submit">{$_L['Save']}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pre>/ip hotspot walled-garden
|
||||
add dst-host={$_domain}
|
||||
add dst-host=*.{$_domain}</pre>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<button class="btn btn-success btn-block waves-effect waves-light"
|
||||
type="submit">{$_L['Save']}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<pre>/ip hotspot walled-garden
|
||||
add dst-host={$_domain}
|
||||
add dst-host=*.{$_domain}</pre>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -129,10 +129,12 @@
|
||||
<ul class="treeview-menu">
|
||||
<li {if $_routes[1] eq 'list'}class="active" {/if}><a
|
||||
href="{$_url}prepaid/list">{$_L['Prepaid_User']}</a></li>
|
||||
<li {if $_routes[1] eq 'voucher'}class="active" {/if}><a
|
||||
href="{$_url}prepaid/voucher">{$_L['Prepaid_Vouchers']}</a></li>
|
||||
<li {if $_routes[1] eq 'refill'}class="active" {/if}><a
|
||||
href="{$_url}prepaid/refill">{$_L['Refill_Account']}</a></li>
|
||||
{if $_c['disable_voucher'] != 'yes'}
|
||||
<li {if $_routes[1] eq 'voucher'}class="active" {/if}><a
|
||||
href="{$_url}prepaid/voucher">{$_L['Prepaid_Vouchers']}</a></li>
|
||||
<li {if $_routes[1] eq 'refill'}class="active" {/if}><a
|
||||
href="{$_url}prepaid/refill">{$_L['Refill_Account']}</a></li>
|
||||
{/if}
|
||||
<li {if $_routes[1] eq 'recharge'}class="active" {/if}><a
|
||||
href="{$_url}prepaid/recharge">{$_L['Recharge_Account']}</a></li>
|
||||
{$_MENU_PREPAID}
|
||||
|
@ -102,12 +102,14 @@
|
||||
</a>
|
||||
</li>
|
||||
{$_MENU_AFTER_DASHBOARD}
|
||||
{if $_c['disable_voucher'] != 'yes'}
|
||||
<li {if $_system_menu eq 'voucher'}class="active" {/if}>
|
||||
<a href="{$_url}voucher/activation">
|
||||
<i class="fa fa-ticket"></i>
|
||||
<span>{Lang::T('Voucher')}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' }
|
||||
<li {if $_system_menu eq 'package'}class="active" {/if}>
|
||||
<a href="{$_url}order/package">
|
||||
|
@ -99,6 +99,16 @@
|
||||
</tr>
|
||||
{/if}
|
||||
</table>
|
||||
{if $_c['disable_voucher'] == 'yes'}
|
||||
<div class="box-footer">
|
||||
{if $_c['payment_gateway'] != 'none' or $_c['payment_gateway'] == '' }
|
||||
<a href="{$_url}order/package" class="btn btn-primary btn-block">
|
||||
<i class="ion ion-ios-cart"></i>
|
||||
{Lang::T('Order Package')}
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on'}
|
||||
<script>
|
||||
@ -114,7 +124,8 @@
|
||||
</script>
|
||||
{/if}
|
||||
<br>
|
||||
<div class="box box-primary box-solid mb30">
|
||||
{if $_c['disable_voucher'] != 'yes'}
|
||||
<div class="box box-primary box-solid mb30">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{$_L['Voucher_Activation']}</h3>
|
||||
</div>
|
||||
@ -147,6 +158,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{include file="sections/user-footer.tpl"}
|
Loading…
x
Reference in New Issue
Block a user