<?php /* Smarty version 3.1.27, created on 2025-07-16 15:24:17
         compiled from "/home/aurexdex/public_html/tmpl/security.tpl" */ ?>
<?php
/*%%SmartyHeaderCode:14773834536877c421ac9b26_77058370%%*/
if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'd0921a76c48f86247e7e0555182c8d1433b9f1b2' => 
    array (
      0 => '/home/aurexdex/public_html/tmpl/security.tpl',
      1 => 1751822332,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '14773834536877c421ac9b26_77058370',
  'variables' => 
  array (
    'security' => 0,
    'settings' => 0,
    'errors' => 0,
    'tfa_enabled' => 0,
    'tfa_settings' => 0,
    'tfa_secret' => 0,
    'tfa_secret_url' => 0,
  ),
  'has_nocache_code' => false,
  'version' => '3.1.27',
  'unifunc' => 'content_6877c421aea720_17237955',
),false);
/*/%%SmartyHeaderCode%%*/
if ($_valid && !is_callable('content_6877c421aea720_17237955')) {
function content_6877c421aea720_17237955 ($_smarty_tpl) {
if (!is_callable('smarty_modifier_myescape')) require_once '/home/aurexdex/public_html/inc/libs/smarty3/plugins/modifier.myescape.php';

$_smarty_tpl->properties['nocache_hash'] = '14773834536877c421ac9b26_77058370';
echo $_smarty_tpl->getSubTemplate ("header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0);
?>


<div class="main-content">
  <div class="page-content">
    <div class="row">
      <div class="col-xl-12">
        <div class="card">
          <div class="card-body">
            <h4 class="card-title">Advanced login security settings</h4>

            <form method="post">
              <input type="hidden" name="a" value="security">
              <input type="hidden" name="action" value="save">

              Detect IP Address Change Sensitivity<br>
              <input type="radio" name="ip" value="disabled" <?php if ($_smarty_tpl->tpl_vars['security']->value['detect_ip'] == 'disabled') {?>checked<?php }?>> Disabled<br>
              <input type="radio" name="ip" value="medium" <?php if ($_smarty_tpl->tpl_vars['security']->value['detect_ip'] == 'medium') {?>checked<?php }?>> Medium<br>
              <input type="radio" name="ip" value="high" <?php if ($_smarty_tpl->tpl_vars['security']->value['detect_ip'] == 'high') {?>checked<?php }?>> High<br>
              <input type="radio" name="ip" value="always" <?php if ($_smarty_tpl->tpl_vars['security']->value['detect_ip'] == 'always') {?>checked<?php }?>> Paranoic<br><br>

              Detect Browser Change<br>
              <input type="radio" name="browser" value="disabled" <?php if ($_smarty_tpl->tpl_vars['security']->value['detect_browser'] == 'disabled') {?>checked<?php }?>> Disabled<br>
              <input type="radio" name="browser" value="enabled" <?php if ($_smarty_tpl->tpl_vars['security']->value['detect_browser'] == 'enabled') {?>checked<?php }?>> Enabled<br><br>

              <input type="submit" value="Set" class="btn btn-sm btn-primary">
            </form>

            <?php if ($_smarty_tpl->tpl_vars['settings']->value['use_tfa']) {?>
            <h4 class="card-title mt-4">Two Factor Authentication</h4>
            <form method="post" name="mainform">
              <input type="hidden" name="a" value="security">
              <input type="hidden" name="action" value="tfa_save">
              <input type="hidden" name="time">

              <?php if ($_smarty_tpl->tpl_vars['errors']->value['invalid_tfa_code']) {?>
              <b style="color:red">Invalid code.</b><br>
              <?php }?>
              <?php if ($_smarty_tpl->tpl_vars['errors']->value['invalid_tfa_secret']) {?>
              <b style="color:red">Invalid Secret.</b><br>
              <?php }?>

              <?php if ($_smarty_tpl->tpl_vars['tfa_enabled']->value) {?>
              <input type="checkbox" name="tfa_on_login" value="1" <?php if ($_smarty_tpl->tpl_vars['tfa_settings']->value['login']) {?>checked<?php }?>> on Login<br>
              <input type="checkbox" name="tfa_on_edit_account" value="1" <?php if ($_smarty_tpl->tpl_vars['tfa_settings']->value['edit_account']) {?>checked<?php }?>> on Edit Account<br>
              <input type="checkbox" name="tfa_on_withdraw" value="1" <?php if ($_smarty_tpl->tpl_vars['tfa_settings']->value['withdraw']) {?>checked<?php }?>> on Withdraw<br>
              <input type="checkbox" name="tfa_disable" value="1"> <b style="color:red">Disable Two Factor Authentication (not recommended)</b><br><br>

              Confirm by typing code:
              <input type="text" name="code" class="form-control form-control-sm">
              <input type="submit" value="Update" class="btn btn-sm btn-primary">
              <?php } else { ?>
              1. Install <a href="http://m.google.com/authenticator" target="_blank">Google Authenticator</a> on your mobile device.<br>
              2. Your Secret Code is: <b><?php echo smarty_modifier_myescape($_smarty_tpl->tpl_vars['tfa_secret']->value);?>
</b>
              <input type="hidden" name="tfa_secret" value="<?php echo smarty_modifier_myescape($_smarty_tpl->tpl_vars['tfa_secret']->value);?>
"><br>
              <img src="<?php echo smarty_modifier_myescape($_smarty_tpl->tpl_vars['tfa_secret_url']->value);?>
"><br>
              3. Please enter two factor token from Google Authenticator to verify correct setup:<br>
              <input type="text" name="code" class="form-control form-control-sm">
              <input type="submit" value="Enable" class="btn btn-sm btn-primary">
              <?php }?>
            </form>
            <?php }?>

          </div>
        </div>
      </div>
    </div>
  </div>
</div>


<?php echo '<script'; ?>
 language="javascript">
  document.mainform.time.value = (new Date()).getTime();

  function checkform() {
    if (!document.mainform.code.value.match(/^[0-9]{6}$/)) {
      alert("Please type code!");
      document.mainform.code.focus();
      return false;
    }
    return true;
  }
<?php echo '</script'; ?>
>


<?php echo $_smarty_tpl->getSubTemplate ("footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0);
?>

<?php }
}
?>