Ir ao conteúdo
  • Cadastre-se

Wagner Leandro

Membro Pleno
  • Posts

    59
  • Cadastrado em

  • Última visita

posts postados por Wagner Leandro

  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()
    Citação

    Como recuperar valores de um locaStorage no react.js?

     

  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>

     

    5 minutos atrás, Wagner Leandro disse:
    
    <!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. 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 :(

  5. @RS Faria As duas deram video. As duas eu entrei no boot. Mas dps de minutos desligaram e nunca mais ligaram, fazem zuada q vai ligar, o processador faz aquela zuadinha e desliga.

    @Lost Byte Config antiga: e3400/8gb ddr3 1600mhz kllisre/

    new config: i5 3470(aliexpress, não sei se ele está legal, porque até agora foi só derrota)/ a primeira placa foi uma b75-a asus - ela deu video, mas ficava reiniciando - e encostou no gabintee e deu curto, segunda placa: h61 da fox, não encostou em nada, só ligou a primeira vez, por 5 min e desligou e ficava ligando e reiniciando. 

     

    Uso estabilizador. 

    @Lost Byte A fonte está configurada porque estava funcionando em minha config antiga

    @Lost Byte E o processador tem pasta térmica. 

  6. @Manga Espero que seja apenas isso.

     

    Eu juntei esse dinheiro desde os meus 14 anos.

     

    E agora com 16 anos, parece que tudo dá errado, já comprei duas placas e tudo dá errado.

     

    Man, eu já chorei tanto, menó. Vcs não tem noção, esses 2 meses foi os piores da minha vida.

     

    Obrigado por a ajuda, mano - de coração mesmo. 

  7. @marcelo-kayo Mas eu tenho poucos componentes. 

    Apenas um i5 3470 

    +8gb ram 

    e só!

    Não tenho placa de video

     

    Eu usava essa config em um intel celeron e3400 + 8gb e nunca deu problema. Não sei! 

    e engraçado q se for ela, ela só deu defeito quando eu coloquei a config nova.

     

    @Manga Minha fonte é bem ruinzinha também. 200w de 2015 por ai...

     

    Mas eu levei no técnico a primeira placa, eu acho q ele deve ter testado a fonte!

  8. @Manga Usado. Fica a tela preta.

    Mas no início funciona, na segunda vez já não dá mais video. 

    Na primeira placa eu levei para um técnico e ele testou com 2 processadores e não deu certo também - aparentemente, ele estava acusando a placa-mãe, mas comprei uma nova e está ocorrendo o mesmo. 

    Mas a primeira encostou no chassi no pc - por isso deu defeito. Mas a segunda não encostou em nada, e está no mesmo jeito - os coolers giram e param.

  9. A primeira placa-mãe encostou no gabinete e foi para o pau. Mas ela deu video durante umas 2 horas, mas depois desligou e o cooler ficava só girando e parando. 

     

    Comprei outra placa, coloquei e deu video durante uns 2 minutos, e dps ficou só desligando e reiniciando e não deu video mais - igual a primeira.

     

    o que vcs acham ?! Eu não sei se é o processador, porque nas duas placas deu video, só dps de alguns minutos que não dava mais.

     

    Sinceramente, eu estou mt estressado por causa desse pc, é algo que necessito para trabalho - não tenho outro.

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...

Ebook grátis: Aprenda a ler resistores e capacitores!

EBOOK GRÁTIS!

CLIQUE AQUI E BAIXE AGORA MESMO!