add tawk to and example walled garden

This commit is contained in:
Ibnu Maksum 2022-09-07 15:07:40 +07:00
parent b7394762b3
commit 40d77bba7b
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
10 changed files with 97 additions and 7 deletions

View File

@ -205,6 +205,7 @@ switch ($action) {
$sms_url = _post('sms_url'); $sms_url = _post('sms_url');
$wa_url = _post('wa_url'); $wa_url = _post('wa_url');
$address = _post('address'); $address = _post('address');
$tawkto = _post('tawkto');
$payment_gateway = _post('payment_gateway'); $payment_gateway = _post('payment_gateway');
if ($company == '') { if ($company == '') {
r2(U . 'settings/app', 'e', $_L['All_field_is_required']); r2(U . 'settings/app', 'e', $_L['All_field_is_required']);
@ -277,6 +278,17 @@ switch ($action) {
$d->save(); $d->save();
} }
$d = ORM::for_table('tbl_appconfig')->where('setting', 'tawkto')->find_one();
if($d){
$d->value = $tawkto;
$d->save();
}else{
$d = ORM::for_table('tbl_appconfig')->create();
$d->setting = 'tawkto';
$d->value = $tawkto;
$d->save();
}
$note = _post('note'); $note = _post('note');
$d = ORM::for_table('tbl_appconfig')->where('setting', 'note')->find_one(); $d = ORM::for_table('tbl_appconfig')->where('setting', 'note')->find_one();
$d->value = $note; $d->value = $note;

View File

@ -55,6 +55,8 @@
<button class="btn btn-primary waves-effect waves-light" type="submit">{$_L['Save']}</button> <button class="btn btn-primary waves-effect waves-light" type="submit">{$_L['Save']}</button>
</div> </div>
</div> </div>
<pre>/ip hotspot walled-garden
add dst-host=:^midtrans.com</pre>
</div> </div>
</div> </div>

View File

@ -72,6 +72,18 @@
</div> </div>
</div> </div>
</div> </div>
<div class="panel-heading">Tawk.to Chat Widget</div>
<div class="panel-body">
<div class="form-group">
<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">
<p class="help-block">From Direct Chat Link.</p>
<pre>/ip hotspot walled-garden
add dst-host=:^tawk.to</pre>
</div>
</div>
</div>
<div class="panel-heading">Invoice</div> <div class="panel-heading">Invoice</div>
<div class="panel-body"> <div class="panel-body">
<div class="form-group"> <div class="form-group">

View File

@ -44,6 +44,8 @@
<a class="btn btn-info waves-effect waves-light" href="https://tripay.co.id/?ref=TP19304" target="_blank">Daftar Tripay</a> <a class="btn btn-info waves-effect waves-light" href="https://tripay.co.id/?ref=TP19304" target="_blank">Daftar Tripay</a>
</div> </div>
</div> </div>
<pre>/ip hotspot walled-garden
add dst-host=:^tripay.co.id</pre>
</div> </div>
</div> </div>

View File

@ -41,6 +41,8 @@
<button class="btn btn-primary waves-effect waves-light" type="submit">{$_L['Save']}</button> <button class="btn btn-primary waves-effect waves-light" type="submit">{$_L['Save']}</button>
</div> </div>
</div> </div>
<pre>/ip hotspot walled-garden
add dst-host=:^xendit.co</pre>
</div> </div>
</div> </div>

View File

@ -101,6 +101,21 @@
</form> </form>
</div> </div>
</div> </div>
{if $_c['tawkto'] != ''}
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/{$_c['tawkto']}';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
<!--End of Tawk.to Script-->
{/if}
<script src="scripts/vendors.js"></script> <script src="scripts/vendors.js"></script>
</body> </body>
</html> </html>

View File

@ -74,6 +74,21 @@
</form> </form>
</div> </div>
</div> </div>
{if $_c['tawkto'] != ''}
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/{$_c['tawkto']}';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
<!--End of Tawk.to Script-->
{/if}
<script src="scripts/vendors.js"></script> <script src="scripts/vendors.js"></script>
</body> </body>
</html> </html>

View File

@ -97,6 +97,21 @@
</form> </form>
</div> </div>
</div> </div>
{if $_c['tawkto'] != ''}
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/{$_c['tawkto']}';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
<!--End of Tawk.to Script-->
{/if}
<script src="scripts/vendors.js"></script> <script src="scripts/vendors.js"></script>
</body> </body>
</html> </html>

View File

@ -11,8 +11,8 @@
<div class="left small">Fixed Header</div> <div class="left small">Fixed Header</div>
<div class="md-switch right"> <div class="md-switch right">
<label> <label>
<input type="checkbox" id="fixedHeader"> <input type="checkbox" id="fixedHeader">
<span>&nbsp;</span> <span>&nbsp;</span>
</label> </label>
</div> </div>
</li> </li>
@ -20,8 +20,8 @@
<div class="left small">Nav Full</div> <div class="left small">Nav Full</div>
<div class="md-switch right"> <div class="md-switch right">
<label> <label>
<input type="checkbox" id="navFull"> <input type="checkbox" id="navFull">
<span>&nbsp;</span> <span>&nbsp;</span>
</label> </label>
</div> </div>
</li> </li>
@ -55,10 +55,26 @@
<script src="{$_theme}/scripts/form-elements.init.js"></script> <script src="{$_theme}/scripts/form-elements.init.js"></script>
<script src="ui/lib/js/bootbox.min.js"></script> <script src="ui/lib/js/bootbox.min.js"></script>
{if isset($xfooter)} {if isset($xfooter)}
{$xfooter} {$xfooter}
{/if} {/if}
{if $_c['tawkto'] != ''}
<!--Start of Tawk.to Script-->
<script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/{$_c['tawkto']}';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script>
<!--End of Tawk.to Script-->
{/if}
</body> </body>
</html> </html>

View File

@ -57,5 +57,4 @@
</div> </div>
</div> </div>
</div> </div>
{include file="sections/user-footer.tpl"} {include file="sections/user-footer.tpl"}