<?php /* Smarty version 3.1.27, created on 2024-06-01 11:45:40
         compiled from "my:admin_edit" */ ?>
<?php
/*%%SmartyHeaderCode:304102690665b09e49bad62_06415764%%*/
if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '5261199b24a3baee754f553c897558526ee00942' => 
    array (
      0 => 'my:admin_edit',
      1 => 1717242340,
      2 => 'my',
    ),
  ),
  'nocache_hash' => '304102690665b09e49bad62_06415764',
  'variables' => 
  array (
    'frm' => 0,
    'errors' => 0,
    'user' => 0,
    'site_domain' => 0,
  ),
  'has_nocache_code' => false,
  'version' => '3.1.27',
  'unifunc' => 'content_665b09e49d2039_62490675',
),false);
/*/%%SmartyHeaderCode%%*/
if ($_valid && !is_callable('content_665b09e49d2039_62490675')) {
function content_665b09e49d2039_62490675 ($_smarty_tpl) {

$_smarty_tpl->properties['nocache_hash'] = '304102690665b09e49bad62_06415764';
?>
 <?php echo $_smarty_tpl->getSubTemplate ("my:admin_header", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0);
?>
 <h3>Edit Admin Profile</h3> <?php if ($_smarty_tpl->tpl_vars['frm']->value['say'] == "saved") {?> <div class="alert alert-success">Admin data has been updated.</div> <?php }?> <?php if ($_smarty_tpl->tpl_vars['errors']->value['csrf_check']) {?> <div class="alert alert-danger">Please, try again.</div> <?php }?> <?php if ($_smarty_tpl->tpl_vars['errors']->value['email_required']) {?> <div class="alert alert-danger">Valid Admin Email Required</div> <?php }?> <?php if ($_smarty_tpl->tpl_vars['errors']->value['invalid_passphrase']) {?> <div class="alert alert-danger">Invalid Alternative Passphrase</div> <?php }?> <?php if ($_smarty_tpl->tpl_vars['errors']->value['confirm_password']) {?> <div class="alert alert-danger">Please, correctly confirm password</div> <?php }?> <?php echo '<script'; ?>
> var use_alternative_passphrase = <?php if ($_smarty_tpl->tpl_vars['user']->value['use_alternative_passphrase']) {?>1<?php } else { ?>0<?php }?>;  function checkform() { if (document.adminform.password.value != "" && document.adminform.password.value != document.adminform.password2.value) { alert("Password and Confirm Password are not match"); document.adminform.password2.focus(); return false; } if (document.adminform.transaction_code.value != "" && document.adminform.transaction_code.value != document.adminform.transaction_code2.value) { alert("New Alternative Passphrase Confirmation is not match"); document.adminform.transaction_code2.focus(); return false; } if (!document.adminform.email.value.match(/^[^\@]+\@[^\@]+\.\w{2,10}$/)) { alert("Enter valid email address"); document.adminform.email.focus(); return false; } if (use_alternative_passphrase && document.adminform.alternative_passphrase.value == "") { alert("Please enter Alternative Passphrase"); document.adminform.alternative_passphrase.focus(); return false; } return true; } <?php echo '</script'; ?>
>  <form method=post name=adminform onsubmit="return checkform()"> <input type=hidden name=a value=admin> <input type=hidden name=action value=save> <input type=hidden name=say value=""> <table class=form> <tr> <th>Login:</th> <td><input type=text name=username value="<?php echo htmlspecialchars((($tmp = @$_smarty_tpl->tpl_vars['frm']->value['username'])===null||$tmp==='' ? $_smarty_tpl->tpl_vars['user']->value['username'] : $tmp), ENT_QUOTES, 'UTF-8', true);?>
" class="inpts"> <?php if ($_smarty_tpl->tpl_vars['user']->value['username'] == "admin") {?><b style="color:red">CHANGE YOUR ADMIN LOGIN TO UNIQUE NOT GUESSABLE ONE</b\><?php }?> </td> </tr> <tr> <th>Email:</th> <td><input type=text name=email value="<?php echo htmlspecialchars((($tmp = @$_smarty_tpl->tpl_vars['frm']->value['email'])===null||$tmp==='' ? $_smarty_tpl->tpl_vars['user']->value['email'] : $tmp), ENT_QUOTES, 'UTF-8', true);?>
" class="inpts"></td> </tr>  <tr> <th>Show Google Translator:</th> <td> <select name=use_admin_translator class=inpts><option value=0 <?php if ($_smarty_tpl->tpl_vars['user']->value['data']['use_admin_translator'] == 0) {?>selected<?php }?>>No<option value=1 <?php if ($_smarty_tpl->tpl_vars['user']->value['data']['use_admin_translator'] == 1) {?>selected<?php }?>>Yes</select> </td> </tr> </table> <br> <table class=form> <tr> <th class=title colspan=2>Change Admin Password:</th> </tr> <tr> <th>New Password:</th> <td><input type=password name=password value="<?php echo $_smarty_tpl->tpl_vars['frm']->value['password'];?>
" class="inpts"></td> </tr> <tr> <th>New Password Confirm:</th> <td><input type=password name=password2 value="<?php echo $_smarty_tpl->tpl_vars['frm']->value['password2'];?>
" class="inpts"></td> </tr> </table> <br> <table class=form> <tr> <th class=title colspan=2>Change Admin Alternative Passphrase:</th> </tr> <tr> <th><a class="hlp" data-hlp="May be used to update sensitive data like bonus/settings/processings">New Alternative Passphrase:</th> <td><input type=password id="trn_code" name=transaction_code value="" class="inpts"></td> </tr> <tr> <th>New Alternative Passphrase Confirm:</th> <td><input type=password id="trn_code" name=transaction_code2 value="" class="inpts"></td> </tr> </table> <br> <table class=form> <tr> <th class="title" colspan=2>Two Factor Authertification by Email PIN</th> </tr> <tr> <th>Send Email PIN on IP Address Change Sensitivity:</th> <td> <input type=radio name=acsent_ip value=disabled <?php if ($_smarty_tpl->tpl_vars['user']->value['accsent']['detect_ip'] == "disabled") {?>checked<?php }?>>Disabled<br> <input type=radio name=acsent_ip value=medium <?php if ($_smarty_tpl->tpl_vars['user']->value['accsent']['detect_ip'] == "medium") {?>checked<?php }?>>Medium<br> <input type=radio name=acsent_ip value=high <?php if ($_smarty_tpl->tpl_vars['user']->value['accsent']['detect_ip'] == "high") {?>checked<?php }?>>High<br> <input type=radio name=acsent_ip value=always <?php if ($_smarty_tpl->tpl_vars['user']->value['accsent']['detect_ip'] == "always") {?>checked<?php }?>>Paranoic<br> </td> </tr> <tr> <th>Send Email PIN on Browser Change:</th> <td> <input type=radio name=acsent_browser value=disabled <?php if ($_smarty_tpl->tpl_vars['user']->value['accsent']['detect_browser'] == "disabled") {?>checked<?php }?>>Disabled<br> <input type=radio name=acsent_browser value=enabled <?php if ($_smarty_tpl->tpl_vars['user']->value['accsent']['detect_browser'] == "enabled") {?>checked<?php }?>>Enabled<br> </td> </tr> <tr> <th>Send Email PIN to E-mail:</th> <td><input type=text name=acsent_email value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['user']->value['accsent']['email'], ENT_QUOTES, 'UTF-8', true);?>
" class=inpts></td> </tr>  </table> <br> <table class=form> <tr> <th class=title colspan=2>Two Factor Authertification by Google Authentificator:</th> </tr> <tr> <th>2FA Token:</th> <td><input type="text" id="tfa_secret" name="tfa_secret" value="<?php echo $_smarty_tpl->tpl_vars['user']->value['data']['tfa_secret'];?>
" readonly class="inpts nosize"> <input type="button" value="Reset" onclick="tfareset()" class="btn sbmt btn-primary"> <input type="button" value="Clear" onclick="tfaremove()" class="btn sbmt btn-danger"><br> <div id="tfa_qr" style="display:none"> <img id="tfa_qr_img" src="" data-src="https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=<?php echo urlencode("otpauth://totp/".((string)$_smarty_tpl->tpl_vars['site_domain']->value)."?secret=");?>
"><br>
 Install <a href="http://m.google.com/authenticator" target=_blank>Google Authenticator</a> on your mobile device.<br>
 Add a reccord by scanning this QR code. </div>  <?php echo '<script'; ?>
> function tfaremove() { if (confirm("Confirm you want to clear 2FA code and disable 2FA for admin login?")) { document.getElementById("tfa_secret").value = ""; document.getElementById("tfa_qr").style.display = "none"; } } function tfareset() { var cur_code = document.getElementById("tfa_secret").value; var confirm_text = cur_code ? "Once you set new 2FA code old one stop work!" : "Use Google Authentificator App to setup 2FA code.\nWithout correct code you will be unable to login to admin!"; if (confirm(confirm_text)) { var alpabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; var code = ""; for (i=0;i<16;i++) { var k = parseInt(Math.random()*32); code = code + alpabet[k];} document.getElementById("tfa_secret").value = code; var img = document.getElementById("tfa_qr_img"); var url = img.getAttribute("data-src"); img.src = url+code; document.getElementById("tfa_qr").style.display = ""; } } var tfa_code = document.getElementById("tfa_secret").value; if (tfa_code) { var img = document.getElementById("tfa_qr_img"); var url = img.getAttribute("data-src"); img.src = url+tfa_code; document.getElementById("tfa_qr").style.display = ""; } <?php echo '</script'; ?>
>  </td> </tr> </table> <?php if ($_smarty_tpl->tpl_vars['user']->value['use_alternative_passphrase']) {?> <br><br> <table class="form"> <tr> <th>Current Admin Alternative Passphrase:</th> <td><input type=password name="alternative_passphrase" value="" class=inpts></td> </tr> </table> <?php }?> <br><br> <center> <input type=submit value="Update" class="btn btn-success sbmt"> </center> </form> <?php echo $_smarty_tpl->getSubTemplate ("my:admin_footer", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0);
?>
 <?php }
}
?>