✏️ 正在编辑: layout_login.phtml
路径:
/srv/systems_dir/yuppiecred/application/layouts/scripts/layout_login.phtml
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php echo $this->doctype() ?> <?php $timeCssFile = filemtime(APPLICATION_PATH . "/../public/styles/global.min.css"); ?> <html> <head> <meta charset="UTF-8" /> <title>Yuppie tech - Mais agilidade para o seu negócio!</title> <link rel="icon" href="<?php echo $this->baseUrl("assets/favicon-32x32.png"); ?>" sizes="32x32" /> <link rel="icon" href="<?php echo $this->baseUrl("assets/favicon-192x192.png"); ?>" sizes="192x192" /> <link rel="apple-touch-icon" href="<?php echo $this->baseUrl("assets/favicon-180x180.png"); ?>" /> <meta name="msapplication-TileImage" content="<?php echo $this->baseUrl("assets/favicon-270x270.png"); ?>" /> <?php $this->headLink() ->appendStylesheet($this->baseUrl('styles/global.min.css?' . $timeCssFile)) ->appendStylesheet($this->baseUrl("specific/client.css")) ->prependStylesheet($this->baseUrl('styles/print.css'), 'print') ->prependStylesheet($this->baseUrl() . '/styles/swal.min.css'); echo $this->headLink(); ?> <script> localStorage.clear(); </script> <script> var baseUrl = '<?php echo $this->baseUrl(); ?>'; </script> <?php if(!service('config')->get()->yuppie->disabled_captcha): ?> <script src='https://www.google.com/recaptcha/api.js' async defer></script> <?php endif; ?> </head> <body class="bg_login"> <?php echo $this->tagLogin(); ?> <div id="container"> <div id="logo_login"></div> <h1>Acesso ao Sistema</h1> <div id="content_login"> <div id="messages"><?php echo $this->flashMessenger(); ?></div> <?php echo $this->layout()->content; ?> <p class="clear"></p> </div> </div> <?php $this->jQuery()->enable() ->setLocalPath($this->baseUrl() . '/scripts/jquery/jquery.min.js') ->uiDisable(); echo $this->jQuery(); $this->jQuery()->enable() ->setLocalPath($this->baseUrl() . '/scripts/swal.min.js') ->uiDisable(); echo $this->jQuery(); $this->jQuery()->enable() ->setLocalPath($this->baseUrl() . '/scripts/reset-password.min.js') ->uiDisable(); echo $this->jQuery(); ?> <script type="text/javascript"> function executeLogin(captcha) { $.ajax({ url : baseUrl + '/auth/login', type : 'POST', data : { 'g-recaptcha-response' : captcha, 'tipo_acesso' : $('#tipo_acesso').val(), 'usuario' : $('#usuario').val(), 'senha' : $('#senha').val() }, beforeSend: function () { $('#messages').html("<p class='info'>Validando acesso, aguarde!</p>"); }, success: function(response) { console.log(response); if( response.alert != null ){ $('#messages').html("<p class='alert'>" + response.alert + "</p>"); if (response.reset != null) { $('.reset_password').prop('class', 'reset_password') } } if (response.qrcode_gauth != null) { $('#messages').html("<p class='info'>Baixe o aplicativo Google Authenticator na sua loja de aplicativos e leia o QR-Code abaixo:</p>"); $('#login').html("<div style='text-align: center'>" + response.qrcode_gauth + "<br/><input type='button' value='Continuar' onclick='showCodeGauth();'/></div>"); return; } if (response.show_code_gauth) { showCodeGauth(); return; } if( response.info != null ){ $('#messages').html("<p class='info'>" + response.info + "</p>"); } if( response.url != null ){ $('#messages').html("<p class='info'>Abrindo sistema...</p>"); window.location.replace(response.url); } if( response.error != null ){ $('#messages').html("<p class='error'>" + response.error + "</p>"); } }, error: function(request, error) { $('#messages').html("<p class='error'>Erro no processamento!</p>"); console.log(request); console.log(error); return; } }); } function onSubmit(token) { if (grecaptcha === undefined) { alert('Recaptcha não definido'); return; } var response = grecaptcha.getResponse(); if (!response) { alert('Recaptcha não respondeu'); return; } executeLogin(response); grecaptcha.reset(); } function validate(event) { event.preventDefault(); if (!$('#usuario').val() || !$('#senha').val()) { alert("Preencha os campos corretamente!"); } else { <?php if(service('config')->get()->yuppie->disabled_captcha): ?> executeLogin(null); <?php else: ?> $('#messages').html("<p class='info'>Validando captcha</p>"); grecaptcha.execute(); <?php endif; ?> } } function onload() { var element = document.getElementById('submit'); element.onclick = validate; } function validCodeGauth(event) { event.preventDefault(); if (!$('#token').val()) { alert("O Token deve ser informado!"); } } function showCodeGauth() { $('#messages').html("<p class='info'>Informe o token gerado no aplicativo Google Authenticator.</p>"); $('#code_gauth').show(); $('#login').html(''); $('#login').html($('#code_gauth')); } onload(); </script> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-71070992-1', 'auto'); ga('require', 'displayfeatures'); ga('send', 'pageview'); </script> </body> <div id="loadingDiv" class="lds-ring"> <div></div><div></div><div></div><div></div> </div> </html>
💾 保存文件
← 返回文件管理器