Ir ao conteúdo
  • Cadastre-se

Wagner Leandro

Membro Pleno
  • Posts

    59
  • Cadastrado em

  • Última visita

Reputação

8
  1. function App() { // localstore const [infoCard, setInfoCard] = useState([{ 'entrada': 0, 'saidas': 0, 'total': 0 }]) function verificaLocalstore() { if(localStorage.infor){ // let json = JSON.parse(localStorage.infor) if(JSON.parse(localStorage.infor).historico.length){ setHistorico(JSON.parse(localStorage.infor).historico) } } } verificaLocalstore()
  2. o que estou errando? o "&&" ou "and" não está funcionando $email = $_POST["email"]; $senha = $_POST['senha']; // contas com acesso $users = [ [ "email" =>"[email protected]", "senha" => "teste123" ], [ "email" =>"[email protected]", "senha" => "teste456" ], [ "email" =>"[email protected]", "senha" => "teste789" ], [ "email" =>"[email protected]", "senha" => "teste101" ], ]; if(!empty($users)){ for($i=0; $i < count($users); $i++){ if ($email == $users[$i]["email"] and $senha == $users[$i]["senha"]) { echo "Área restrita"; } else{ Header('Location: /01/index.html'); } }; } ?>
  3. <!DOCTYPE html> <html lang="pt-br"> <head> <title>Site</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <div class="containerFather"> <div class="containerSon"> <div class="loginImg"> <img src="svg/undraw_secure_login_pdn4.svg"> </div> <form method="POST" action="k.php" class="login"> <div class="nameLogin"> <h1>LOGIN</h1> </div> <div class="msgError"> <p>Email e/ou senha inválidos</p> </div> <div class="input email"> <p>Email</p> <input type="email"> </div> <div class="input senha"> <p>Senha</p> <input type="password"> </div> <div class="help"> <a rel="noopener" rel="noreferrer" target="_blank" href="https://instagram.com/wagner_leandro0">Criar conta.</a> <a href="_blank">Esqueci a senha.</a> </div> <div class="submitBtn"> <input type="submit" value="Entrar"> </div> </form> </div> </div> <style type="text/css"> *{ margin: 0px; padding: 0px; } body{ margin: 0px; padding: 0px; font-family: sans-serif; } .containerFather{ width: 100%; height: 100vh; display: flex; background: #e3e3e3; justify-content: center; align-items: center; } .containerSon{ width: 70%; height: auto; display: flex; justify-content: center; flex-direction: row; align-items: center; background: #fff; /*padding: 2em 1em;*/ border-radius: 10px; box-shadow: #cccccc 5px 9px 11px 0px; } .containerSon .loginImg{ width: 60%; height: 100%; /*background: #848484;*/ border-radius: 10px 0 0 10px; padding: 2em 1em; border-right: 2px solid black; } .containerSon .loginImg img{ width: 100%; } .containerSon .login{ width: 40%; display: flex; justify-content: center; flex-direction: column; align-items: center; margin: 0.2rem 0rem; padding: 2em 1em; } .login .input{ width: 70%; margin: 0.3em 0em; border: 2px solid; border-radius: 10px; display: flex; justify-content: center; align-items: center; padding: .7em; } .input p{ font-size: 1em; font-weight: 500; color: #929292; margin: 0em 0em 0em 0em; } .input p.atived{ margin: -3.2em 0em 0em 0em; color: black; padding: 0em 0.3em; background: white; transition: .1s; position: absolute; font-size: .9em; } .input input{ width: 100%; text-align: center; font-size: 1em; border: none; outline: none; display: none; } .nameLogin{ margin: 0em 0em 1.5em 0em; font-family: sans-serif; letter-spacing: 0px; font-weight: bold; } .nameLogin h1{ font-size: 2.1em; } .help{ width: 70%; display: flex; justify-content: space-between; } .help a{ font-size: 0.875em; text-decoration: underline; color: #989898; } .submitBtn{ width: 50%; display: flex; justify-content: center; margin: 1.5em 0em 0em 0em; } .submitBtn input{ width: 100%; padding: 1.3em .8em; font-size: 1em; border: none; border-radius: 4px; color: white; background: linear-gradient(181deg, #00BFA6, #00e6ca); } .submitBtn input:hover{ transition: .3s; cursor: pointer; } .msgError{ width: 70%; padding: 0.7em 0.7em; /*display: flex;*/ justify-content: center; border-radius: 5px; color: white; font-weight: 500; background: #00a791; margin: 0.3em 0em; animation: animationError .4s linear; transition: .1s linear; display: none; } .msgError.atived{ display: flex; } @keyframes animationError{ from{ opacity: 0.1; } to{ opacity: 1; } } @media only screen and (max-width: 1020px){ .containerSon .loginImg{ width: 50%; } .containerSon .login{ width: 50%; } @media only screen and (max-width: 720px){ .containerSon .loginImg{ display: none; } .containerSon .login{ width: 100%; } } @media only screen and (max-width: 480px){ .containerSon .loginImg{ } .containerSon .login{ } } @media only screen and (max-width: 360px){ } </style> <script type="text/javascript"> onload = () => { const containerCampos = document.querySelectorAll('.input') // mensagem de erro const msgError = document.querySelector('.msgError') containerCampos.forEach((e) => { e.addEventListener('click', (ev) => { function ativedCampo() { e.children[1].style.display = 'block' e.children[1].focus() e.style.justifyContent = 'flex-start' e.children[0].classList.add('atived') } ativedCampo() }) e.children[1].addEventListener('blur', () => { if(!e.children[1].value){ function disableCampo() { e.children[1].style.display = 'none' e.style.justifyContent = 'center' e.children[0].classList.remove('atived') } if (e.classList[1] == 'email') { if (!e.children[1].value) { disableCampo() } } else if (e.classList[1] == 'senha') { if (!e.children[1].value || e.children.value.lenght<8) { disableCampo() } } } console.log(e.children[1].validity) let quantErr = 0 for(err in e.children[1].validity){ if (err != "valid") { if (e.children[1].validity[err]===true) { quantErr++ } } // console.log(err, e.children[1].validity[err]) } if (quantErr>=1) { if (msgError.classList[1] === undefined) { msgError.classList.add('atived') } e.parentNode.addEventListener('submit', (p) => { p.preventDefault() }) let quantErr = 0 } else if (quantErr==0) { if (msgError.classList[1] == 'atived') { console.log('ee') msgError.classList.remove('atived') } ativedCampo() let quantErr = 0 } }) }) } </script> </body> </html> apertem em algum input e apertem fora(blur), assim vai rodar a função
  4. @Elder Nauvirth O pc está no técnico. Mas ele falou que tinha trocado a fonte, mas não deu video.
  5. @Elder Nauvirth A fonte estava em 115v e aqui em fortal é 220v.
  6. Liguei meu pc direto na tomada, de 110 para 220, enfim, queimou a fonte. Levei ao um técnico e ele falou q iria trocar a fonte, trocou e nd, não deu video. o que vcs acham q queimou ? placa-mãe ? Processador ? Memória ?
  7. @K3RBUS04 Me fala a porcentagem de ter sido só ela que queimou, pfv. A chance é mt alta de ter queimado outro componente !?
  8. @K3RBUS04 Se fosse só a fonte, a placa era para ligar luz? Ou passar um pouco de energia para ela ? porque não tem nd ligado. Obs: fonte de 2008
  9. @WOZ Dods O engraçado é que o tecnico me entregou assim. Sera se ele usa alguma coisa para proteger ?
  10. @Frib 2K4 Tem possibilidade de ter queimado placa-mãe ? O pc não dá sinal de nada. Luz não liga, nem nd. Mas sem a fonte não liga, mesmo.
  11. @Pepse Deu um pipoco na fonte. Tomara que não tenha dado nd. Eu acho que tem uma onda de energia ruim em mim, *****. Fui trocar de placa-mãe, a placa queimou Comprei outra, a fonte pipoca. 4 meses sem pc. Vou tomar um banho de sal grosso kk *****
  12. @djfulano É ao contrario, man. A tensão de fortal é 220v E a fonte está em 115v Mas eu sempre usei assim. Nunca tive problema.
  13. Levei em um técnico para trocar a placa-mãe. O técnico falou que tinha arrumado e eu trouxe. Quando eu fui testar, deu um estalo na fonte e não liga mais. Obs: minha fonte é muito ruim. Li vários posts falando que não seria legal usar estabilizador, então eu liguei direto na tomada - sem estabilizador. A energia daqui é 220v Na fonte está 115v e liguei sem estabilizador Ela não liga leds nem nd. Eu liguei ela e coloquei meu celular para carregar através do usb, mas não carrega - ou seja, não tem energia. Será se a placa queimou ?! Minha fonte é mt antiga. Papo de 2008 Não troquei ela porque não trabalho, sou de menor
  14. @Manga Ok. Eu uso essa fonte+estabilizador há uns 5 juntos. também tem isso.

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...