Ir ao conteúdo
  • Cadastre-se

muh4m3d

Membro Pleno
  • Posts

    37
  • Cadastrado em

  • Última visita

  1. Resolvi obrigado... Com base na sua ideia exclui o include("logica-usuario.php"); da pagina de login... e voltou a funcionar normalmente
  2. Bom dia, estou estudando um pouco de PHP por aqui e estou fazendo um exercicio que envolve essas alteração nestas 2 paginas. logica-usuario.php <?phpfunction usuarioEstaLogado() { return isset($_COOKIE["usuario_logado"]);}function verificaUsuario() { if(!usuarioEstaLogado()) { header("Location: index.php?falhaDeSeguranca=true"); die(); }}function usuarioLogado() { return $_COOKIE["usuario_logado"];}function logaUsuario($email) { setcookie("usuario_logado", $email, time() + 60);} login.php <?php include("conecta.php");include ("banco-usuario.php");include("logica-usuario.php");$usuario = buscaUsuario($conexao, $_POST["email"], $_POST["senha"]);if($usuario == null) { header("Location: index.php?login=0");} else { logaUsuario($email); header("Location: index.php?login=1");}die(); Após as alterações ocorre o seguinte erro. ( ! ) Fatal error: Cannot redeclare usuarioEstaLogado() (previously declared in C:\wamp\www\loja\logica-usuario.php:3) in C:\wamp\www\loja\logica-usuario.php on line 5 Call Stack # Time Memory Function Location 1 0.0000 242824 {main}( ) ..\login.php:0 Alguma ideia? Obrigado
  3. Dif projeto terminado !!! Muito obrigado pela ajuda !!! Vou começar outro !!! hehe Me aguarde em breve kkkk
  4. Estou terminando meu trabalho de conclusão neste tema depois que eu apresentar eu te mando.Mas já te adianto tem livros na área.
  5. Concordo. Mas temos que começar de algum lugar ... Estou com outro projeto em mãos já!!! Esse terá login e senha para acessar... você me recomenda ler algo antes de iniciar a programaçao em PHP?
  6. Não consegui integrar o PHP com o HTML que já possuo :-(
  7. Está quase pronto GIF está faltando apenas a formataçao dos valores monetários... mas não consigo fazer em php... ou consigo? Teria que ser algo em html/javascript certo? Segue código recente... <!-- saved from url=(0022)http://internet.e-mail --><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Quitação 2015 </title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> $("button").click(function () { var str=""; $('tr').each(function() { $(this).find('td').each(function() { str=str+$(this).html()+"\t"; }); str=str+"\n"; }); alert(str); window.open('data:application/vnd.ms-excel,' + encodeURIComponent(str)); }); function aparece(emp){ var div = document.getElementById('div'+ emp.id); if (emp.checked === true) div.style.display = 'block'; else div.style.display = 'none'; } function somarValores(){ if( isNaN(document.getElementById("comdesconto1").value) ){ id('comdesconto1').value = 0; } if( isNaN(document.getElementById("comdesconto2").value) ){ id('comdesconto2').value = 0; } if( isNaN(document.getElementById("comdesconto3").value) ){ id('comdesconto3').value = 0; } if( isNaN(document.getElementById("comdesconto4").value) ){ id('comdesconto4').value = 0; } var s1 = parseFloat(document.getElementById("comdesconto1").value); var s2 = parseFloat(document.getElementById("comdesconto2").value); var s3 = parseFloat(document.getElementById("comdesconto3").value); var s4 = parseFloat(document.getElementById("comdesconto4").value); var s5 = s1+s2+s3+s4; // calculos do desconto por numero de filhos if( (document.getElementById("contaaluno").value) == 1){ id('descontoirmao').value = 0; id('exibedesconto').value = "0%"; } if( (document.getElementById("contaaluno").value) == 2){ var d2 = s5*0.05; id('exibedesconto').value = "5%"; id('descontoirmao').value = d2.toFixed(2); } if( (document.getElementById("contaaluno").value) == 3){ var d3 = s5*0.10; id('exibedesconto').value = "10%"; id('descontoirmao').value = d3.toFixed(2); } if( (document.getElementById("contaaluno").value) == 4){ var d4 = s5*0.15; id('exibedesconto').value = "15%"; id('descontoirmao').value = d4.toFixed(2); } // calculos do subtotal 2 if( (document.getElementById("contaaluno").value) == 1){ id('subtotal2').value = s5; } if( (document.getElementById("contaaluno").value) == 2){ var st2 = s5*0.95; id('subtotal2').value = st2.toFixed(2); } if(( (document.getElementById("contaaluno").value) == 3) || ( (document.getElementById("contaaluno").value) == 4)){ var st3 = s5*0.85; id('subtotal2').value = st3.toFixed(2); } if ((document.getElementById("digita").value) != "") { var repetido = digita; } // calculo de eletivas por turma if((document.getElementById("exibeeletivas").value) == "0"){ var valoreletiva1 = 0; } if(((document.getElementById("exibeturma").value) == "Escolha a turma")){ var valoreletiva1 = 0; } if(( (document.getElementById("exibeturma").value) == "Maternal")){ var valoreletiva1 = 0; } if(( (document.getElementById("exibeturma").value) == "Nível I")){ var valoreletiva1 = 0; } if(( (document.getElementById("exibeturma").value) == "Nível II")){ var valoreletiva1 = 0; } if(( (document.getElementById("exibeturma").value) == "1º ano") && ( (document.getElementById("exibeeletivas").value) == "1")){ var valoreletiva1 = 288; } if(( (document.getElementById("exibeturma").value) == "2º ano") && ( (document.getElementById("exibeeletivas").value) == "1")){ var valoreletiva1 = 288; } if(( (document.getElementById("exibeturma").value) == "3º ano") && ( (document.getElementById("exibeeletivas").value) == "1")){ var valoreletiva1 = 288; } if(( (document.getElementById("exibeturma").value) == "4º ano") && ( (document.getElementById("exibeeletivas").value) == "1")){ var valoreletiva1 = 360; } if(( (document.getElementById("exibeturma").value) == "5º ano") && ( (document.getElementById("exibeeletivas").value) == "1")){ var valoreletiva1 = 360; } if(( (document.getElementById("exibeturma").value) == "6º ano") && ( (document.getElementById("exibeeletivas").value) == "1")){ var valoreletiva1 = 408; } if(( (document.getElementById("exibeturma").value) == "7º ano") && ( (document.getElementById("exibeeletivas").value) == "1")){ var valoreletiva1 = 408; } if(( (document.getElementById("exibeturma").value) == "8º ano") && ( (document.getElementById("exibeeletivas").value) == "1")){ var valoreletiva1 = 408; } if(( (document.getElementById("exibeturma").value) == "9º ano") && ( (document.getElementById("exibeeletivas").value) == "1")){ var valoreletiva1 = 408; } if((document.getElementById("exibeeletivas2").value) == "0"){ var valoreletiva2 = 0; } if(((document.getElementById("exibeturma2").value) == "Escolha a turma")){ var valoreletiva2 = 0; } if(( (document.getElementById("exibeturma2").value) == "Maternal")){ var valoreletiva2 = 0; } if(( (document.getElementById("exibeturma2").value) == "Nível I")){ var valoreletiva2 = 0; } if(( (document.getElementById("exibeturma2").value) == "Nível II")){ var valoreletiva2 = 0; } if(( (document.getElementById("exibeturma2").value) == "1º ano") && ( (document.getElementById("exibeeletivas2").value) == "1")){ var valoreletiva2 = 288; } if(( (document.getElementById("exibeturma2").value) == "2º ano") && ( (document.getElementById("exibeeletivas2").value) == "1")){ var valoreletiva2 = 288; } if(( (document.getElementById("exibeturma2").value) == "3º ano") && ( (document.getElementById("exibeeletivas2").value) == "1")){ var valoreletiva2 = 288; } if(( (document.getElementById("exibeturma2").value) == "4º ano") && ( (document.getElementById("exibeeletivas2").value) == "1")){ var valoreletiva2 = 360; } if(( (document.getElementById("exibeturma2").value) == "5º ano") && ( (document.getElementById("exibeeletivas2").value) == "1")){ var valoreletiva2 = 360; } if(( (document.getElementById("exibeturma2").value) == "6º ano") && ( (document.getElementById("exibeeletivas2").value) == "1")){ var valoreletiva2 = 408; } if(( (document.getElementById("exibeturma2").value) == "7º ano") && ( (document.getElementById("exibeeletivas2").value) == "1")){ var valoreletiva2 = 408; } if(( (document.getElementById("exibeturma2").value) == "8º ano") && ( (document.getElementById("exibeeletivas2").value) == "1")){ var valoreletiva2 = 408; } if(( (document.getElementById("exibeturma2").value) == "9º ano") && ( (document.getElementById("exibeeletivas2").value) == "1")){ var valoreletiva2 = 408; } if((document.getElementById("exibeeletivas3").value) == 0){ var valoreletiva3 = 0; } if(((document.getElementById("exibeturma3").value) == "Escolha a turma")){ var valoreletiva3 = 0; } if(((document.getElementById("exibeturma3").value) == "Maternal")){ var valoreletiva3 = 0; } if(( (document.getElementById("exibeturma3").value) == "Nível I")){ var valoreletiva3 = 0; } if(( (document.getElementById("exibeturma3").value) == "Nível II")){ var valoreletiva3 = 0; } if(( (document.getElementById("exibeturma3").value) == "1º ano") && ( (document.getElementById("exibeeletivas3").value) == "1")){ var valoreletiva3 = 288; } if(( (document.getElementById("exibeturma3").value) == "2º ano") && ( (document.getElementById("exibeeletivas3").value) == "1")){ var valoreletiva3 = 288; } if(( (document.getElementById("exibeturma3").value) == "3º ano") && ( (document.getElementById("exibeeletivas3").value) == "1")){ var valoreletiva3 = 288; } if(( (document.getElementById("exibeturma3").value) == "4º ano") && ( (document.getElementById("exibeeletivas3").value) == "1")){ var valoreletiva3 = 360; } if(( (document.getElementById("exibeturma3").value) == "5º ano") && ( (document.getElementById("exibeeletivas3").value) == "1")){ var valoreletiva3 = 360; } if(( (document.getElementById("exibeturma3").value) == "6º ano") && ( (document.getElementById("exibeeletivas3").value) == "1")){ var valoreletiva3 = 408; } if(( (document.getElementById("exibeturma3").value) == "7º ano") && ( (document.getElementById("exibeeletivas3").value) == "1")){ var valoreletiva3 = 408; } if(( (document.getElementById("exibeturma3").value) == "8º ano") && ( (document.getElementById("exibeeletivas3").value) == "1")){ var valoreletiva3 = 408; } if(( (document.getElementById("exibeturma3").value) == "9º ano") && ( (document.getElementById("exibeeletivas3").value) == "1")){ var valoreletiva3 = 408; } if((document.getElementById("exibeeletivas4").value) == "0"){ var valoreletiva4 = 0; } if(((document.getElementById("exibeturma4").value) == "Escolha a turma")){ var valoreletiva4 = 0; } if(( (document.getElementById("exibeturma4").value) == "Maternal")){ var valoreletiva4 = 0; } if(( (document.getElementById("exibeturma4").value) == "Nível I")){ var valoreletiva4 = 0; } if(( (document.getElementById("exibeturma4").value) == "Nível II")){ var valoreletiva4 = 0; } if(( (document.getElementById("exibeturma4").value) == "1º ano") && ( (document.getElementById("exibeeletivas4").value) == "1")){ var valoreletiva4 = 288; } if(( (document.getElementById("exibeturma4").value) == "2º ano") && ( (document.getElementById("exibeeletivas4").value) == "1")){ var valoreletiva4 = 288; } if(( (document.getElementById("exibeturma4").value) == "3º ano") && ( (document.getElementById("exibeeletivas4").value) == "1")){ var valoreletiva4 = 288; } if(( (document.getElementById("exibeturma4").value) == "4º ano") && ( (document.getElementById("exibeeletivas4").value) == "1")){ var valoreletiva4 = 360; } if(( (document.getElementById("exibeturma4").value) == "5º ano") && ( (document.getElementById("exibeeletivas4").value) == "1")){ var valoreletiva4 = 360; } if(( (document.getElementById("exibeturma4").value) == "6º ano") && ( (document.getElementById("exibeeletivas4").value) == "1")){ var valoreletiva4 = 488; } if(( (document.getElementById("exibeturma4").value) == "7º ano") && ( (document.getElementById("exibeeletivas4").value) == "1")){ var valoreletiva4 = 488; } if(( (document.getElementById("exibeturma4").value) == "8º ano") && ( (document.getElementById("exibeeletivas4").value) == "1")){ var valoreletiva4 = 488; } if(( (document.getElementById("exibeturma4").value) == "9º ano") && ( (document.getElementById("exibeeletivas4").value) == "1")){ var valoreletiva4 = 488; } if( isNaN(valoreletiva1) ){ valoreletiva1 = 0; } if( isNaN(valoreletiva2) ){ valoreletiva2 = 0; } if( isNaN(valoreletiva3) ){ valoreletiva3 = 0; } if( isNaN(valoreletiva4) ){ valoreletiva4 = 0; } var totaleletivas = (((valoreletiva1 + valoreletiva2 + valoreletiva3 + valoreletiva4)*getMoney('data')).toFixed(2)); id('eletivas').value = totaleletivas; //Subtotal Final var fim1 = parseFloat(document.getElementById("eletivas").value); var fim2 = parseFloat(document.getElementById("subtotal2").value); var fim3 = parseFloat(document.getElementById('seguro').value); var fim4 = (fim1+fim2+fim3); id('subtotalf').value = fim4.toFixed(2); //["288", "262.05", "262.80", "263.55", "264.33", "265.08", "265.82", "266.57", "267.35","268.10"]; //["360", "327.56", "328.50", "329.44", "330.41", "331.34", "332.28", "333.21", "334.19", "335.12"]; //["408", "371.24", "372.30", "373.36", "374.46", "375.52", "376.58", "377.64", "378.74", "379.81"]; id('subtotal1').value = parseFloat(s5.toFixed(2)); } // verifica se optou por seguro function seguro1sim(){ var seg1 = 1; id('exibeseguro').value = seg1; } function seguro1nao(){ var seg1 = 0; id('exibeseguro').value = seg1; } function seguro2sim(){ var seg2 = 1; id('exibeseguro2').value = seg2; } function seguro2nao(){ var seg2 = 0; id('exibeseguro2').value = seg2; } function seguro3sim(){ var seg3 = 1; id('exibeseguro3').value = seg3; } function seguro3nao(){ var seg3 = 0; id('exibeseguro3').value = seg3; } function seguro4sim(){ var seg4 = 1; id('exibeseguro4').value = seg4; } function seguro4nao(){ var seg4 = 0; id('exibeseguro4').value = seg4; } // verifica se optou por eletivas function eletivas1sim(){ var eletiv1 = 1; id('exibeeletivas').value = eletiv1; } function eletivas1nao(){ var eletiv1 = 0; id('exibeeletivas').value = eletiv1; } function eletivas2sim(){ var eletiv2 = 1; id('exibeeletivas2').value = eletiv2; } function eletivas2nao(){ var eletiv2 = 0; id('exibeeletivas2').value = eletiv2; } function eletivas3sim(){ var eletiv3 = 1; id('exibeeletivas3').value = eletiv3; } function eletivas3nao(){ var eletiv3 = 0; id('exibeeletivas3').value = eletiv3; } function eletivas4sim(){ var eletiv4 = 1; id('exibeeletivas4').value = eletiv4; } function eletivas4nao(){ var eletiv4 = 0; id('exibeeletivas4').value = eletiv4; } function repeat(valor){ document.cima.repetido.value = valor; identificador.innerHTML=valor } function repeat2(valor2){ document.cima2.repetido2.value = valor2; identificador2.innerHTML=valor2 } function repeat3(valor3){ document.cima3.repetido3.value = valor3; identificador3.innerHTML=valor3 } function repeat4(valor4){ document.cima4.repetido4.value = valor4; identificador4.innerHTML=valor4 } //Cancela Enter function stopRKey(evt) { var evt = (evt) ? evt : ((event) ? event : null); var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if ((evt.keyCode == 13) && (node.type=="text")) {return false;} } document.onkeypress = stopRKey; //Aparece function showSelected(){ var selObj = document.getElementById('turma1'); var txtValueObj = document.getElementById('exibevalor'); var txtTextObj = document.getElementById('exibeturma'); var selIndex = selObj.selectedIndex; txtValueObj.value = selObj.options[selIndex].value; txtTextObj.value = selObj.options[selIndex].text; } function showSelected2(){ var selObj2 = document.getElementById('turma2'); var txtValueObj2 = document.getElementById('exibevalor2'); var txtTextObj2 = document.getElementById('exibeturma2'); var selIndex2 = selObj2.selectedIndex; txtValueObj2.value = selObj2.options[selIndex2].value; txtTextObj2.value = selObj2.options[selIndex2].text; } function showSelected3(){ var selObj3 = document.getElementById('turma3'); var txtValueObj3 = document.getElementById('exibevalor3'); var txtTextObj3 = document.getElementById('exibeturma3'); var selIndex3 = selObj3.selectedIndex; txtValueObj3.value = selObj3.options[selIndex3].value; txtTextObj3.value = selObj3.options[selIndex3].text; } function showSelected4(){ var selObj4 = document.getElementById('turma4'); var txtValueObj4 = document.getElementById('exibevalor4'); var txtTextObj4 = document.getElementById('exibeturma4'); var selIndex4 = selObj4.selectedIndex; txtValueObj4.value = selObj4.options[selIndex4].value; txtTextObj4.value = selObj4.options[selIndex4].text; } function id( el1 ){ return document.getElementById( el1 ); } function getMoney( el1 ){ var money = id( el1 ).value.replace( ',', '.' ); return parseFloat( money ); } function multiplica(){ var total = getMoney('turma1')*getMoney('data') var n = total.toFixed(2); var n_float = parseFloat(n).toFixed(2); id('comdesconto1').value = n_float; } function id( el2 ){ return document.getElementById( el2 ); } function getMoney( el2 ){ var money2 = id( el2 ).value.replace( ',', '.' ); return parseFloat( money2 ); } function multiplica2(){ var total2 = getMoney('turma2')*getMoney('data') var m = total2.toFixed(2); id('comdesconto2').value = String(m); } function id( el3 ){ return document.getElementById( el3 ); } function getMoney( el3 ){ var money3 = id( el3 ).value.replace( ',', '.' ); return parseFloat( money3 ); } function multiplica3(){ var total3 = getMoney('turma3')*getMoney('data') var o = total3.toFixed(2); id('comdesconto3').value = String(o); } function id( el4 ){ return document.getElementById( el4 ); } function getMoney( el4 ){ var money4 = id( el4 ).value.replace( ',', '.' ); return parseFloat( money4 ); } function multiplica4() { var total4 = getMoney('turma4')*getMoney('data') var p = total4.toFixed(2); id('comdesconto4').value = String(p); } function qtdChecados(){ var inputs,i,checados=1; inputs = document.getElementsByTagName('input');//pegando os inputs e jogando num array for(i=1;i<inputs.length;i++){//varrendo o array que tem os inputs if(inputs[i].type=='checkbox'){ //se os inputs forem checkbox if(inputs[i].checked===true){ checados++; } } } id('contaaluno').value = String(checados); return checados; } function verificaRadio(){ var conts = 0; //inicia a variável //verifica quantos seguros foram marcados sim if(document.getElementById('seguro1s').checked) conts++; if(document.getElementById('seguro2s').checked) conts++; if(document.getElementById('seguro3s').checked) conts++; if(document.getElementById('seguro4s').checked) conts++; //Calcula e Exibe total seguro var cont = conts*199.40*getMoney('data'); var seg = cont.toFixed(2); document.getElementById('seguro').value = String(seg); } function copia (){ document.getElementById('repetido').value = document.getElementById('digita').value } function copia2 (){ document.getElementById('repetido2').value = document.getElementById('digita2').value } function copia3 (){ document.getElementById('repetido3').value = document.getElementById('digita3').value } function copia4 (){ document.getElementById('repetido4').value = document.getElementById('digita4').value } </script><style> .cl_est{ margin-top: 0px; margin-left: 0px; display: none; } table.bordasimples {border-collapse: collapse;} table.bordasimples tr td {border:1px solid;} h1 { text-align: center; } table.fixo { table-layout:fixed; } #dupla { border-left:0px solid black; border-right:0px solid black; border-bottom:1px solid black; border-top:2px solid black; } .sem{ border: none; } #simples { border-left:0px solid black; border-right:0px solid black; border-bottom:1px solid black; border-top:1px solid black; } #simples2 { border-left:0px solid black; border-right:0px solid black; border-bottom:1px solid black; border-top:0px solid black; } </style></head> <body> <form method="post" action="validaform.php"> <fieldset><div style= "font-size:40px;"> <img src="logo_sjc.png" style="float:left;"> <center>Quitação de Anuidade - 2015</center></div></br> </br> <div> <table style="width:100%;" border="1" class="bordasimples";"fixo"> <tr> <td align="center" width="15%"> <h3>Nome do Aluno</h3> </td> <td align="center" width="15%"> <h3>Turma em 2015</h3> </td> <td align="center" width="15%"> <h3>Seguro Educacional</h3> </td> <td align="center" width="15%"> <h3>Disciplinas Eletivas</h3> </td> <td align="center" width="25%"> <h3>Acrescentar irmão na Quitação?</h3> </td> </tr> <tr> <td> <input type="text" id="digita" name="digita" size="50" onkeyup="copia()" required/> </td> <td> <select id="turma1" onclick="showSelected();" onchange="showSelected();"required><option value="0" selected="selected" disabled>Escolha a turma</option> <option value=" 11601.48"> Maternal</option> <option value="11996.95"> Nível I</option> <option value="11996.95">Nível II</option> <option value="13216.97">1º ano</option> <option value="13216.97">2º ano</option> <option value="13216.97">3º ano</option> <option value="14296.47">4º ano</option> <option value="14296.47">5º ano</option> <option value="15854.40">6º ano</option> <option value="15854.40">7º ano</option> <option value="16890.72">8º ano</option> <option value="16890.72">9º ano</option> </select></td> <td> <input type="radio" id="seguro1s" name="seguro1" value="1" onchange="seguro1sim();" required/> Sim <input type="radio" id="seguro1s" name="seguro1" value="0" onchange="seguro1nao();" required/> Não </td> <td> <input type="radio" id="eletiva1s" name="eletivas1" value="1" onchange="eletivas1sim();"required/> Sim <input type="radio" id="eletiva1s" name="eletivas1" value="0" onchange="eletivas1nao();"required/> Não </td> <td> <input type="checkbox" id="ea" name="nm_ea" onClick="aparece(this);" /> Sim</tr></table> <div> </div> <div class="cl_est" id="divea"> <table style="width:100%;" border="1" class="bordasimples";"fixo""> <tr> <td width="15%"><input type="text" name="digita2" id="digita2" size="50" onkeyup="copia2()"> </td> <td width="15%"> <select id="turma2" onclick="showSelected2();" onchange="showSelected2();"><option value="0" selected="selected" disabled>Escolha a turma</option> <option value="11601.48"> Maternal</option> <option value="11996.95"> Nível I</option> <option value="11996.95">Nível II</option> <option value="13216.97">1º ano</option> <option value="13216.97">2º ano</option> <option value="13216.97">3º ano</option> <option value="14296.47">4º ano</option> <option value="14296.47">5º ano</option> <option value="15854.40">6º ano</option> <option value="15854.40">7º ano</option> <option value="16890.72">8º ano</option> <option value="16890.72">9º ano</option> </select> </td> <td width="15%"> <input type="radio" id="seguro2s" name="seguro2" value="sim" onchange="seguro2sim();"/> Sim <input type="radio" id="seguro2n" name="seguro2" value="nao" onchange="seguro2nao();"/> Não </td> <td width="15%"> <input type="radio" id="eletiva2s" name="eletivas2" value="1" onchange="eletivas2sim();"/> Sim <input type="radio" id="eletiva2n" name="eletivas2" value="0" onchange="eletivas2nao();"/> Não </td> <td width="25%"> <input type="checkbox" id="eb" name="nm_eb" onClick="aparece(this);" /> Sim </td> </tr> </table> </div> <div class="cl_est" id="diveb"> <table style="width:100%;" border="1" class="bordasimples";"fixo"> <tr> <td width="15%"><input type="text" name="digita3" id="digita3" size="50" onkeyup="copia3()"> </td> <td width="15%"> <select id="turma3" onclick="showSelected3();" onchange="showSelected3();"><option value="0" selected="selected" disabled>Escolha a turma</option> <option value="11601.48"> Maternal</option> <option value="11996.95"> Nível I</option> <option value="11996.95">Nível II</option> <option value="13216.97">1º ano</option> <option value="13216.97">2º ano</option> <option value="13216.97">3º ano</option> <option value="14296.47">4º ano</option> <option value="14296.47">5º ano</option> <option value="15854.40">6º ano</option> <option value="15854.40">7º ano</option> <option value="16890.72">8º ano</option> <option value="16890.72">9º ano</option> </select> </td > <td width="15%"> <input type="radio" id="seguro3s" name="seguro3" value="sim" onchange="seguro3sim();"/> Sim <input type="radio" id="seguro3n" name="seguro3" value="nao" onchange="seguro3nao();"/> Não </td> <td width="15%"> <input type="radio" id="eletiva3s" name="eletivas3" value="1" onchange="eletivas3sim();"/> Sim <input type="radio" id="eletiva3n" name="eletivas3" value="0" onchange="eletivas3nao();"/> Não </td> <td width="25%"> <input type="checkbox" id="ec" name="nm_ec" onClick="aparece(this);" /> Sim </td> </tr> </table> </div> <div class="cl_est" id="divec"> <table style="width:100%;" border="1" class="bordasimples"> <tr> <td width="15%"><input type="text" name="digita4" id="digita4" size="50" onkeyup="copia4()"> </td> <td width="15%"> <select id="turma4" onclick="showSelected4();" onchange="showSelected4();"><option value="0" selected="selected" disabled>Escolha a turma</option> <option value="11601.48"> Maternal</option> <option value="11996.95"> Nível I</option> <option value="11996.95">Nível II</option> <option value="13216.97">1º ano</option> <option value="13216.97">2º ano</option> <option value="13216.97">3º ano</option> <option value="14296.47">4º ano</option> <option value="14296.47">5º ano</option> <option value="15854.40">6º ano</option> <option value="15854.40">7º ano</option> <option value="16890.72">8º ano</option> <option value="16890.72">9º ano</option> </select> </td> <td width="15%"> <input type="radio" id="seguro4s" name="seguro4" value="sim" onchange="seguro4sim();"/> Sim <input type="radio" id="seguro4n" name="seguro4" value="nao" onchange="seguro4nao();"/> Não </td> <td width="15%"> <input type="radio" id="eletiva4s" name="eletivas4" value="1" onchange="eletivas4sim();"/> Sim <input type="radio" id="eletiva4n" name="eletivas4" value="0" onchange="eletivas4nao();"/> Não </td> <td width="25%"> <input type="checkbox" name="escola" disabled /> Sim </td> </tr> </table> </div><hr> <div> <p style= "font-size:17px;font-weight: bold;">Escolha a data do pagamento <select id="data" name="data" onclick="multiplica();multiplica2();multiplica3();multiplica4();verificaRadio();somarValores();qtdChecados();" onchange="multiplica();multiplica2();multiplica3();multiplica4();verificaRadio();somarValores();qtdChecados();"required><option value="0" selected="selected" disabled>Escolha a data</option> <option value="0.9151">15/10/2014</option> <option value="0.9178">22/10/2014</option><option value="0.9204">31/10/2014</option> <option value="0.9230">07/11/2014</option> <option value="0.9256">14/11/2014</option> <option value="0.9283">21/11/2014</option> <option value="0.9309">28/11/2014</option> </select> </p></div><hr> <div> <table style="width:100%;"> <tr> <td align="left">Aluno</td> <td align="left">Turma</td> <td align="left">Seguro</td> <td align="left">Eletivas</td> <td align="right">Anuidade (12 parcelas)</td> <td align="right">Anuidade com desconto</td> </tr> <tr> <td id="simples"><input type="text" bgcolor="#d0d0d0" id="repetido" name="repetido" style="border-width: 0;" readonly></td> <td id="simples"><input type="text" name="exibeturma" id="exibeturma" style="border-width: 0" readonly /></td> <td id="simples"><input type="text" name="exibeseguro" id="exibeseguro" style="border-width: 0" readonly /></td> <td id="simples"><input type="text" name="exibeeletivas" id="exibeeletivas" style="border-width: 0" readonly /></td> <td id="simples" align="right"><input type="text" name="exibevalor" id="exibevalor" style="border-width:0;text-align:right" readonly /></td> <td id="simples" align="right"><input name="campo4" style="border:0;text-align:right" readonly="readonly" id="comdesconto1" /></td> </tr> <tr> <td id="simples2"><input type="text" id="repetido2" name="repetido2" style="border-width: 0" readonly></td> <td id="simples2"><input type="text" name="exibeturma2" id="exibeturma2" style="border-width: 0" readonly /></td> <td id="simples2"><input type="text" name="exibeseguro2" id="exibeseguro2" style="border-width: 0" readonly /></td> <td id="simples2"><input type="text" name="exibeeletivas2" id="exibeeletivas2" style="border-width: 0" readonly /></td> <td id="simples2" align="right"><input type="text" name="exibevalor2" id="exibevalor2" style="border-width:0;text-align:right" readonly /></td> <td id="simples2" align="right"><input name="campo5" style="border:0;text-align:right" readonly="readonly" id="comdesconto2" /></td> </tr> <tr> <td id="simples2"><input type="text" id="repetido3" name="repetido3" style="border-width: 0" readonly></td> <td id="simples2"><input type="text" name="exibeturma3" id="exibeturma3" style="border-width: 0" readonly /></td> <td id="simples2"><input type="text" name="exibeseguro3" id="exibeseguro3" style="border-width: 0" readonly /></td> <td id="simples2"><input type="text" name="exibeeletivas3" id="exibeeletivas3" style="border-width: 0" readonly /></td> <td id="simples2" align="right"><input type="text" name="exibevalor3" id="exibevalor3" style="border-width:0;text-align:right" readonly /></td> <td id="simples2" align="right"><input name="campo4" style="border:0;text-align:right" readonly="readonly" id="comdesconto3" /></td> </tr> <tr> <td id="simples2"><input type="text" id="repetido4" name="repetido4" style="border-width: 0" readonly></td> <td id="simples2"><input type="text" name="exibeturma4" id="exibeturma4" style="border-width: 0" readonly /></td> <td id="simples2"><input type="text" name="exibeseguro4" id="exibeseguro4" style="border-width: 0" readonly /></td> <td id="simples2"><input type="text" name="exibeeletivas4" id="exibeeletivas4" style="border-width: 0" readonly /></td> <td id="simples2" align="right"><input type="text" name="exibevalor4" id="exibevalor4" style="border-width:0;text-align:right" readonly /></td> <td align="right"><input name="campo4" style="border:0;text-align:right" readonly="readonly" id="comdesconto4" /></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td align="right">Subtotal 1:</td> <td id="dupla" align="right"><input name="subtotal1" style="border:0;text-align:right" readonly="readonly" id="subtotal1" /></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td align="right">Desconto Irmãos:</td> <td align="right"><input style="border:0;text-align:left" readonly="readonly" id="exibedesconto" size="7" " /><input name="descontoirmao" style="border:0;text-align:right" readonly="readonly" id="descontoirmao" /></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td align="right">Subtotal 2:</td> <td id="dupla" align="right"><input name="subtotal2" style="border:0;text-align:right" readonly="readonly" id="subtotal2" /></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td align="right">Eletivas:</td> <td id="simples2" align="right"><input name="eletivas" style="border:0;text-align:right" readonly="readonly" id="eletivas" /></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td align="right">Seguro:</td> <td align="right"><input name="seguro" style="border:0;text-align:right" readonly="readonly" id="seguro" /></td> <td></td> </tr> <tr> <td><input name="contaaluno" style="border:0;text-align:right" readonly="readonly" id="contaaluno" hidden/></td> <td></td> <td></td> <td></td> <td align="right">Total Final</td> <td id="dupla" align="right"><input name="subtotalf" style="border:0;text-align:right;font-weight:bold;" readonly="readonly" id="subtotalf" /></td> <td></td> </tr> </table> <table> <tr> <td>Responsável:</td> <td><input type="text" size="50" id="nomeresp" name="nomeresp" required/></td> </tr> <tr> <td>Email do Responsável:</td> <td><input type="email" size="50" name="email" id="email" required/> </td> </tr> <tr> <td>Forma de Pagamento</td> <td> <INPUT TYPE="radio" id="pagamento" NAME="pagamento" VALUE="Boleto"required> Boleto <INPUT TYPE="radio" id="pagamento" NAME="pagamento" VALUE="Cheque"required> Cheque <INPUT TYPE="radio" id="pagamento" NAME="pagamento" VALUE="Dinheiro"required> Dinheiro</td> <td><input type="submit" value="Enviar Proposta" ></td> </tr> </table> </div> </form> </fieldset> </form> </body></html>
  8. Descobri o erro dif. Não estava exibindo alguns valores pois so tinha ID ou NAME foi eu complementar a informação que passou a exibir todos... Acho que finalizei ... falta só layout :-) Ahh como configuro valor para R$ 9999.99,99 ? Tem que ser no fim certo? Senão não consigo efetuar as contas...
  9. HTML - parou de funcionar a parte que repetia o nome de cima em baixo mas isso depois vejo. Completo mais abaixo PHP - validar email <?php/* TESTE FORM *///print_r($_POST);//die();/* FIM TESTE */$data = $_POST["data"]; $resp = $_POST["nomeresp"];$pag = $_POST["pagamento"];$email = $_POST["email"];$aluno1 = $_POST["repetido"]; $turma1 = $_POST["exibeturma"]; $seguro1= $_POST["exibeseguro"]; $eletivas1= $_POST["exibeeletivas"];$aluno2 = $_POST["repetido2"]; $turma2 = $_POST["exibeturma2"]; $seguro2= $_POST["exibeseguro2"]; $eletivas2= $_POST["exibeeletivas2"];$aluno3 = $_POST["repetido3"]; $turma3 = $_POST["exibeturma3"]; $seguro3= $_POST["exibeseguro3"]; $eletivas3= $_POST["exibeeletivas3"];$aluno4 = $_POST["repetido4"]; $turma4 = $_POST["exibeturma4"]; $seguro4= $_POST["exibeseguro4"]; $eletivas4= $_POST["exibeeletivas4"]; /** * Corpo do email */$htmlMSG = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>EMPRESA</title> </head> <body> <table width="100%" style="font: 13px/1.231 arial,helvetica,clean,sans-serif; color: #8e8e8e;" > <tr> <td align="center"> <table width="580" style="margin: 0px auto;"> <tr> <td> <img src="http://..."> </td> </tr> <tr> <td> <div style="background-color:#ccc;height:3px" /></div> '.$data.' </br> '.$resp.' </br> '.$pag.' </br> '.$email.'</br> '.$aluno1.' </br> '.$turma1.' </br> '.$seguro1.' </br> '.$eletivas1.' </br> '.$aluno2.' </br> '.$turma2.' </br> '.$seguro2.' </br> '.$eletivas2.' </br> '.$aluno3.' </br> '.$turma3.' </br> '.$seguro3.' </br> '.$eletivas3.' </br> '.$aluno4.' </br> '.$turma4.' </br> '.$seguro4.' </br> '.$eletivas4.' </br> </td> </tr> <tr> <td style="font-size: 9px; color: #999;text-transform: uppercase;text-align: center"> <div style="background-color:#ccc;height:3px;width: 100%;" /></div> NOME EMPRESA </td> </tr> </table> </td> </tr> </table> </body> </html>';require("phpmailer/class.phpmailer.php");//Inicia a classe PHPMailer$mail = new PHPMailer();//Define os dados do servidor e tipo de conexão$mail->IsSMTP(); // Define que a mensagem será SMTP$mail->Host = "smtp..."; // Endereço do servidor SMTP$mail->SMTPAuth = true; // Autenticação$mail->Username = 'EMAIL'; // Usuário do servidor SMTP$mail->Password = 'SENHA'; // Senha da caixa postal utilizada//Define o remetente$mail->From = "'EMAIL'"; $mail->FromName = "Pedro Vasconcelos ";//Define os destinatário(s)$mail->AddAddress('EMAIL', 'Pedro');//$mail->AddAddress('outroemail.com.br');//$mail->AddCC('[email protected]', 'Copia'); //$mail->AddBCC('[email protected]', 'Copia Oculta');//Define os dados técnicos da Mensagem$mail->IsHTML(true); // Define que o e-mail será enviado como HTML$mail->CharSet = 'utf-8'; // Charset da mensagem (opcional)//Texto e Assunto//$mail->Subject = "Quitação 2015".$nomeresp; // Assunto da mensagem//$mail->Subject = utf8_decode( "Quitação 2015".$nomeresp ); // Teste $mail->Subject = utf8_encode( "Quitação 2015".$nomeresp ); // Assunto da mensagem$mail->Body = $htmlMSG;//$mail->Body = 'Este é o corpo da mensagem de teste, em HTML! // <IMG src=http://... alt=5" class="wp-smiley"> ';// $mail->AltBody = 'Este é o corpo da mensagem de teste, em Texto Plano! \r\n // <IMG src="http://..." alt=5":)" class="wp-smiley"> ';//Anexos (opcional)//$mail->AddAttachment("e:\home\login\web\documento.pdf", "novo_nome.pdf");//Envio da Mensagem$enviado = $mail->Send();//Limpa os destinatários e os anexos$mail->ClearAllRecipients();$mail->ClearAttachments();//Exibe uma mensagem de resultadoif ($enviado) {echo "E-mail enviado com sucesso!";} else {echo "Não foi possível enviar o e-mail.";echo "Informações do erro: " . $mail->ErrorInfo ; }?>
  10. Removi os forms do arquivo deixando apenas 2 e mesmo assim o mesmo erro ocorre!!! DIF quando você clica no checkbox do irmão ele desoculta a linha e não cria.(Nao cheguei nesse nivel de criar linhas heh ate tentei mas a linha nova nao recebi os ids certos) Se exibo como array aparecem todos os dados se coloco 1 a 1 apenas aparece a opcao do button debaixo(boleto,dinheiro,cheque)
  11. O problema do email consegui resolver !!! Agora veja se consegue me ajudar !!! Usando o contato.html E usando o validaform.php Se eu comentar a parte do php /* TESTE FORM *///print_r($_POST);//die();/* FIM TESTE */ Eu recebo o email mas só aparece a opção do $pag que seria opt1 opt2 op3 E quando tiro o comentário /* TESTE FORM */print_r($_POST);die();/* FIM TESTE */ Aparece a string com os dados preenchidos ... acho que tem ate dados demais O que pode ser isto ?
  12. Sim sim eu achei já comecei a alterar só fiquei em duvida como faço para pegar os dados do HTML ... consegue me iluminar? Deu o erro Warning: require_once(lib/class.phpmailer.php) [function.require-once]: failed to open stream: Fatal error: require_once() [function.require]: Failed opening required 'lib/class.phpmailer.php' (include_path='.:/usr/share/pear') Estou tentando descobrir o porque...
  13. Estou rodando de um servidor . O que achei estranho é que ele chega a aparecer a mensagem do php Formulário enviado com sucesso. Mas devo ter errado em algo na configuração do email. vou tentar enviar pelo gmail... valeu
  14. Fiz esse código php pra usar com o html acima mais ele conclui sem enviar o email. O que está errado no código? Codigo Abaixo

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