Ir para conteúdo
Fórum Script Brasil

carol

Membros
  • Total de itens

    294
  • Registro em

  • Última visita

Tudo que carol postou

  1. Como posso chamar duas funcões distintas no onlick tenho que chamar a funcao confirmadados() e a envia() como ficaria o onclick= ???? Não pode ser no onsubmit preciso que seja no onclick obrigada!
  2. carol

    Problema Com Session

    oi gente, Peguei esse tópico sobre sessão na net ... mais eu não sei que acontece que quando digito os dados que ele pede a sessão não é criada ... gostaria da ajuda de vocês p me ajudar a solucionar esse problema .... index.php <? //VERIFICA SE O FORMULÁRIO FOI ENVIADO if($_POST["postok"]) { //RECEBE OS DADOS ENVIADOS PELO FORMULÁRIO $nome = $_POST["txtNome"]; $idade = $_POST["txtIdade"]; //GRAVA NA SESSÃO SE OS CAMPOS NÃO ESTIVEREM EM BRANCO if ( (!empty($nome)) AND (!empty($idade)) ) { //INICAILIZA A SESSÃO session_start(); //REGISTRA AS VARIÁVEIS NA SESSÃO $_SESSION["sess_nome"] = $nome; $_SESSION["sess_idade"] = $idade; }//FECHA IF (empty) else { $erro++; //SOMA 1 A VARIÁVEL ERRO $html_error .= "<br>Os campos não podem ser deixados em branco."; }//FECHA ELSE }//FECHA IF($_post) ?> <html> <head> <title>Sessão</title> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><font size="5" face="Arial"><strong>Autentica&ccedil;&atilde;o de usu&aacute;rios usando sess&otilde;es - SESSION </strong></font></td> </tr> </table> <hr noshade> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#EBEBEB"> <td height="31"><div align="center"><font size="2" face="Arial">[ Gravando os dados na sess&atilde;o ]</font></div></td> <td height="31"><div align="center"><font size="2" face="Arial">[ <a href="verifica.php">Verificando a sess&atilde;o</a> ]</font></div></td> <td height="31"><div align="center"><font size="2" face="Arial">[ <a href="encerra.php">Encerrando a sess&atilde;o</a> ]</font></div></td> </tr> </table> <br> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><font size="2" face="Arial">Os dados digitados abaixo, ser&atilde;o guardados na sess&atilde;o que ser&aacute; criada.</font></td> </tr> </table> <br> <? //VERIFICA SE O FORMULÁRIO FOI ENVIADO if($_POST["postok"]) { //VERIFICA SE ACONTECEU ALGUM ERRO if($erro) { echo "<div align='center'><b>$html_error</b></div>"; }//FECHA if (erro) // CASO NÃO TENHA OCOORIDO NEHUM ERRO ... else { echo "<br><br><table border='0' cellpading='0' cellspacing='0' width='90%'>"; echo "<tr>"; echo "<td><div align='center'><font face='Arial' size='2'><b>Sessão criada !!</b></font></div></td>"; echo "</tr>"; echo "</table>"; }//FECHA ELSE(erro) } //FECHA IF(postok) //EXIBE O FORMULÁRIO else { ?> <form action="" method="post" name="frm_sessao"> <table width="60%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="16%" height="25"><strong><font size="2" face="Arial">Nome:</font></strong></td> <td width="84%" height="25"><font size="2" face="Arial"> <input name="txtNome" type="text" size="30" maxlength="30"></font></td> </tr> <tr> <td height="25"><strong><font size="2" face="Arial">Idade:</font></strong></td> <td height="25"><font size="2" face="Arial"> <input name="txtIdade" type="text" size="3" maxlength="3"></font></td> </tr> <tr> <td colspan="2"><div align="center"> <input name="btnEnviar" type="submit" value="[ Gravar dados na sess&atilde;o ]"></div></td> <input type="hidden" name="postok" value="1"> </tr> </table> </form> <? } //FECHA ELSE?> </body> </html> verifica.php <? //INICIALIZA A SESSÃO session_start(); ?> <html> <head> <title>Sessão</title> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><font size="5" face="Arial"><strong>Autentica&ccedil;&atilde;o de usu&aacute;rios usando sess&otilde;es - SESSION </strong></font></td> </tr> </table> <hr noshade> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#EBEBEB"> <td height="31"><div align="center"><font size="2" face="Arial">[ <a href="index.php">Gravando os dados na sess&atilde;o</a> ]</font></div></td> <td height="31"><div align="center"><font size="2" face="Arial">[ Verificando a sess&atilde;o ]</font></div></td> <td height="31"><div align="center"><font size="2" face="Arial">[ <a href="encerra.php">Encerrando a sess&atilde;o</a> ]</font></div></td> </tr> </table> <br> <br> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><font color="#FF0000" size="3" face="Arial"><strong>Resultado da verifica&ccedil;&atilde;o:</strong></font></td> </tr> </table> <br> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><font size="2" face="Arial"> <? //VERIFICA SE AS VARIÁVES ESTÃO INICIALIZADAS NA SESSÃO if(!empty($_SESSION["sess_nome"]) AND (!empty($_SESSION["sess_idade"])) ) { echo "<b>A sessão está ativa.</b><br><br>"; echo "Nome ...........: ".$_SESSION["sess_nome"]; echo "<br>Idade ............: ".$_SESSION["sess_idade"]; }//FECHA IF //SE NÃO TIVER NADA REGISTRADO, EMITE A MENSAGEM. else { echo "<b>A sessão NÃO FOI CRIADA AINDA.</b>"; } //FECHA ELSE?></font></td> </tr> </table> </body> </html> encerra.php <? //INICIALIZA A SESSÃO session_start(); //VERIFICA SE AS VARIÁVEIS ESTÃO REGISTRADAS if( (!empty($_SESSION["sess_nome"])) AND (!empty($_SESSION["sess_idade"])) ) { //DESTRÓI A SESSÃO $destroi = session_destroy(); } //FECHA IF ?> <html> <head> <title>Sessão</title> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><font size="5" face="Arial"><strong>Autentica&ccedil;&atilde;o de usu&aacute;rios usando sess&otilde;es - SESSION </strong></font></td> </tr> </table> <hr noshade> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="#EBEBEB"> <td height="31"><div align="center"><font size="2" face="Arial">[ <a href="index.php">Gravando os dados na sess&atilde;o</a> ]</font></div></td> <td height="31"><div align="center"><font size="2" face="Arial">[ <a href="verifica.php">Verificando a sess&atilde;o</a> ]</font></div></td> <td height="31" bgcolor="#EBEBEB"><div align="center"><font size="2" face="Arial">[ Encerrando a sess&atilde;o ]</font></div></td> </tr> </table> <br><br> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><div align="center"><font size="2" face="Arial"> <? //ANALISA O RESULTADO DA DESTRUIÇÃO if($destroi) { echo "<b>Sessão eliminada com SUCESSO !!</b>"; } else { echo "<b>Aconteceu algum erro. Por favor, tente novamente.</b><br><br>"; echo "<b>Exemplo: Verifique se a sessão já foi criada."; } ?></font></div></td> </tr> </table> </body> </html> obrigada a todos mais uma vez.. beijokas tchau!
  3. carol

    R$ Site?

    cadê o cara?!!! Bem como já foi dito, o preço é bem relativo, vai do trabalho que tivemos. Concordo em algumas partes com o Firesoul. No caso do amigo "Digão", o mais certo é avaliarmos o site e sugestinarmos um preço. beijokas..
  4. não, não é isso. preciso de uma função que permita apenas um click. mas, obrigada pela atenção. continuo no aguardo... tchau..
  5. carol

    Alguém Me Ajuda?

    bem esqueçam... B)
  6. Oi gente, Tenho um formulário de inclusão e se o usuário clicar duas vezes no botão submit ele duplica o registro no banco de dados. Gostaria de saber como desabilitar o botão ao ser clicado. O botão que envia o formulario e do tipo image e já possuo um onclick nele que e para retornar uma funcão em js, existe a possibilidade de desabilitar este botão. Desde já agradeço.
  7. mais uma vez agradeço rapazes... obrigada a todos! tchau...
  8. Obrigada rapazes pela atenção!
  9. carol

    Autenticação

    já arrumei, obrigada! :D
  10. tem como você me passa o código da janela1? obrigada! fico no aguardo... obrigada!
  11. ok! kd a function? :blink: obrigada pela atenção!
  12. carol

    Alguém Me Ajuda?

    Ah! sei lá... alguma coisa mais bonitinha e organizada que aquele... tem alguma idéia?! obrigada!
  13. Oi gente! quero uma dica de como desabilitar 3 ou mais campos em um formulário. no caso um campo TXT, TEXTAREA, SELECT E RADIO Eu usei onmouseover="java script:self.NOMEDOCAMPO.disabled = true;" Mas só funcionou com apenas um campo e sem estar dentro das tags form e o evento eu queria que já aparecesse desabilitado neste exemplo ele só desabilita se eu passar o mouse em cima... Será que alguém pode me ajudar???????? obrigada!
  14. carol

    Preloader

    1. nesse você especifica os arquivos a serem pré-caregados <script language="JavaScript1.1">var locationAfterPreload = "file:///C|/Documents and Settings/All Users/Desktop/pics/proxnew/layout.htm" // URL of the page after preload finishes var lengthOfPreloadBar = 238 // Length of preload bar (in pixels) var heightOfPreloadBar = 10 // Height of preload bar (in pixels) // Put the URLs of images that you want to preload below (as many as you want) var yourImages = new Array("","","file:///C|/Documents and Settings/All Users/Desktop/pics/proxnew/about2.gif") // Do not modify anything beyond this point! if (document.images) { var dots = new Array() dots[0] = new Image(1,1) dots[0].src = "pixel1.gif" // default preloadbar color (note: You can substitute it with your image, but it has to be 1x1 size) dots[1] = new Image(1,1) dots[1].src = "pixel2.gif" // color of bar as preloading progresses (same note as above) var preImages = new Array(),coverage = Math.floor(lengthOfPreloadBar/yourImages.length),currCount = 0 var loaded = new Array(),i,covered,timerID var leftOverWidth = lengthOfPreloadBar%coverage } function loadImages() { for (i = 0; i < yourImages.length; i++) { preImages[i] = new Image() preImages[i].src = yourImages[i] } for (i = 0; i < preImages.length; i++) { loaded[i] = false } checkLoad() } function checkLoad() { if (currCount == preImages.length) { location.replace(locationAfterPreload) return } for (i = 0; i <= preImages.length; i++) { if (loaded[i] == false && preImages[i].complete) { loaded[i] = true eval("document.img" + currCount + ".src=dots[1].src") currCount++ } } timerID = setTimeout("checkLoad()",10) } // end hiding --> </script> <script language="JavaScript1.1">var locationAfterPreload = "new/layout.htm" // URL of the page after preload finishes var lengthOfPreloadBar = 238 // Length of preload bar (in pixels) var heightOfPreloadBar = 5 // Height of preload bar (in pixels) // Put the URLs of images that you want to preload below (as many as you want) var yourImages = new Array("new/about2.gif","new/aboutb.gif","new/arrow.gif","new/arrowback.gif","new/art2.gif", "new/artb.gif","new/back.gif","new/bottom01.gif","new/bottom02.gif","new/bottom03.gif", "new/bottom04.gif","new/bottom05.gif","new/contact2.gif","new/contactb.gif","new/gbook2.gif", "new/gbookb.gif","new/imagethingdown.gif","new/imagethingempty.gif","new/imagethingup.gif", "new/left01.gif","new/left02.gif","new/left03.gif","new/left04.gif","new/left05.gif","new/link2.gif"," new/linkb.gif","new/loaderbottom.gif","new/loaderleft.gif","new/loaderright.gif","new/loadertop.gif" ,"new/loading.gif","new/navback.gif","new/newarrow.gif","new/news2.gif","new/newsb.gif", "new/partnersb.gif","new/partnersover.gif","new/pixel1.gif","new/proxnew.gif","new/right01.gif", "new/right02.gif","new/right03.gif","new/right04.gif","new/right05.gif","new/title.gif","new/top02.gif", "new/top03.gif","new/top04.gif","new/top05.gif","new/top.gif","new/upcoming2.gif", "new/upcomingb.gif","new/web2.gif","new/webb.gif") // Do not modify anything beyond this point! if (document.images) { var dots = new Array() dots[0] = new Image(1,1) dots[0].src = "pixel1.gif" // default preloadbar color (note: You can substitute it with your image, but it has to be 1x1 size) dots[1] = new Image(1,1) dots[1].src = "pixel2.gif" // color of bar as preloading progresses (same note as above) var preImages = new Array(),coverage = Math.floor(lengthOfPreloadBar/yourImages.length),currCount = 0 var loaded = new Array(),i,covered,timerID var leftOverWidth = lengthOfPreloadBar%coverage } function loadImages() { for (i = 0; i < yourImages.length; i++) { preImages[i] = new Image() preImages[i].src = yourImages[i] } for (i = 0; i < preImages.length; i++) { loaded[i] = false } checkLoad() } function checkLoad() { if (currCount == preImages.length) { location.replace(locationAfterPreload) return } for (i = 0; i <= preImages.length; i++) { if (loaded[i] == false && preImages[i].complete) { loaded[i] = true eval("document.img" + currCount + ".src=dots[1].src") currCount++ } } timerID = setTimeout("checkLoad()",10) } // end hiding --> </script> 2. Pré-loading do site <style type="text/css"> #divLoadCont{position:absolute; width:100%; height:98%; top:0; left:0; background-color:white; layer-background-color:white; font-family:arial,helvetica; z-index:100} </style> <script type="text/javascript" language="JavaScript"> function checkBrowser(){ this.ver=navigator.appVersion this.dom=document.getElementById?1:0 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0; this.ie4=(document.all && !this.dom)?1:0; this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) return this } bw=new checkBrowser() //Hides the div function hideIt(div){ if(bw.bw){ div="divLoadCont" obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?document[div]:0; obj.visibility='hidden' } } onload=hideIt; </script> </HEAD> <BODY bgcolor="White"> <script> //We write the table and the div to hide the content out, so older browsers won't see it if(bw.bw) document.write('<div id="divLoadCont"><table width="100%" height="95%" align="center" valign="middle"><tr><td width="100%" height="100%" align="center" valign="middle"><h3>Loading Page....</h3></td></tr></table></div>') </script> SEU SITE VEM AQUI.... </BODY> </HTML> era isso que você queria? espero ter ajudado.
  15. podes me explicar melhor? :D obrigada!
  16. carol

    Autenticação

    <? include "Conect.php"; $sql = "select Nome from usuario where User='$Nome'"; if(mysql_num_rows($sql)== 0) { echo("Usuário ou Senha ERRADA!!"); } else { echo("login efetuado com sucesso!"); } ?> Warning: Supplied argument is not a valid MySQL result resource in c:\arquivos de programas\easyphp\www\projet1\in.php on line 6 Usuário ou Senha ERRADA!! linha 6 if(mysql_num_rows($sql)== 0) O que está errado? obrigada!
  17. carol

    Alguém Me Ajuda?

    Se você tiver uma outra sugestão de um sistema que crie classes em php, é bem-vinda. :D obrigada Gladisson pela atenção. fico no aguardo...
  18. vê se ajuda! <? /* image font counter icount.php3 / by Hunje Cho (vishnu76@dreamwiz.com) $bgColor : Background Color , Hexadecimal $fgColor : Foreground Color , Hexadecimal Hexadecimal order : RGB (each 2byte) */ define("COUNT_FILE\", \"count.txt\"); define(\"COUNT_FONT\", \"2\"); function ConvertColor($hexVal) { $ColorVal = array(3); for($i = 0; $i < 3; $i++) $ColorVal[$i] = HexDec(substr($hexVal, $i * 2, 2)); return $ColorVal; } function addCount() { $fp = fopen(COUNT_FILE, \"r\"); $count = fgets($fp, 10); fclose($fp); $count++; $fp = fopen(COUNT_FILE, \"w\"); fputs($fp, $count , 10); fclose($fp); return $count; } $strCount = addCount(); $width = strlen($strCount) * ImageFontWidth(COUNT_FONT); $hImg = ImageCreate($width, ImageFontHeight(COUNT_FONT)); list($red, $green, $blue) = ConvertColor($bgColor); $clrBg = ImageColorAllocate($hImg, $red, $green, $blue); list($red, $green, $blue) = ConvertColor($fgColor); $clrFg = ImageColorAllocate($hImg, $red, $green, $blue); ImageFill($hImg, 1, 1, $clrBg); ImageString($hImg, COUNT_FONT, 1, 1, $strCount, $clrFg); header(\"Content-type: image/gif\"); ImageGIF($hImg); ImageDestroy($hImg); ?> Exemplo: <img src=\"icount.php?fgColor=ffffff&bgColor=0000\" border=\"0\"> espero ter ajudado! *Amigo se registra ai... :) tchauzinho!
  19. carol

    Links Dinânicos No Asp.net

    você leu o post? Obrigada Gladisson!! :P
  20. carol

    Alguém Me Ajuda?

    Olá gente, entrei nesse site, nele tem um sistema para gerar classes, porém, ele gera coisa simples sobre classes, gostaria de desenvolver um sistema desse pra mim mais completo... alguém me ajuda? alguém já fez algo parecido e pode me passar? Obrigada a todos! bjos!!!
  21. Oi gente, tenho o seguinte "pobrema" ... fiz um menu DHTML, pra um site que fica sempre alinhado ao centro. so que quando a resolução é 800x600 beleza ta certinho onde quero, mas em 1024 fica completamente desalinhado... <script> if(screen.width == 800) document.write('<!--#include file="inc/scripts800.inc"-->'); else document.write('<!--#include file="inc/scripts.inc"-->'); </script> só que o javascript não está escrevendo os includes... simplesmente ficam vazios... tem como fazer isso ?? fazer o javascript "achar" minha resolução e depois escrever o include ?? desde já obrigada!
  22. di nada, foi um prazer... :P ah! FELIZ ANIVERSÁRIO!!!! :D
  23. carol

    Autenticação

    Oi gente, Como faço uma autentição de um usuário cadastrado no meu banco de dado MySql? Já tenho o banco com usuário e senha. Alguém poderia me dar uma explicação sobre como fazer isso? beijokas e desde já obrigada a todos!
×
×
  • Criar Novo...