Iniciante PHP com mysql

1. Iniciante PHP com mysql

Moisés A. Hamester
hamester

(usa Conectiva)

Enviado em 16/07/2006 - 01:29h

Bom é o seguinte eu não entendo quase nada de php, mas tenho que montar um site com php e banco de dados que no caso eu vou usar o sql.
aí eu quero por tipo um cadastro pra se cadastrar pra receber um boletim no caso e um negócio pra mandar e-mails, aí eu consegui configurar pra mandar pro meu e-mail, mas eu queria por ainda pra além de manda pro meu e-mail salvar no banco de dados. ai comno que eu faço????????

agradeço a ajuda

eu tenho o seguinte código:



<?
if (!$_POST){
?>
<form action="envia_form_php.php" method=post>
Nome: <input type=text name="nome" size=16>
<br>
Email: <input type=text name=email size=16>
<br>

Comentários: <textarea name=coment cols=32 rows=6></textarea>
<br>
<input type=submit value="Enviar">
</form>
<?
}else{
//Estou a receber o formulário, componho o corpo
$corpo = "Formulário enviado\n";
$corpo .= "Nome: " . $_POST["nome"] . "\n";
$corpo .= "Email: " . $_POST["email"] . "\n";
$corpo .= "Comentários: " . $_POST["coment"] . "\n";

//envio o correio...
mail("arthur_lindaum@hotmail.com","Formulário recebido",$corpo);

//agradeço pelo envio
echo "Obrigado por preencher o formulário. Foi enviado corretamente.";
}
?>


  


2. Iniciante PHP com mysql

Helber Fernandes
hfernandes

(usa Ubuntu)

Enviado em 04/08/2006 - 16:42h

coloque no seu código uma instrução sql para incerir o dado no banco como a seguin.

mysql_query("INSERT INTO nome da tabela (nome, email, coment)VALUES('$nome', '$email', '$coment');", suaconexao);

se vc não estiver com as variáveis globais habilitadas faça o seguinte antes do código acima

$email=$_POST['email'];
e assim por diante

se não souber como faz a conexão é o seguinte:

$conexao=mysql_connect('localhost', 'user, 'senha') or die("erro ao conectar no banco");
mysql_select_db('seubanco', $conexao);
mas isso tem que vir antes de tudo isso acima, blz


espero ter ajudado


3. te basea por este tem muito campo !

Jose RF Junior
JuniorOsho

(usa Debian)

Enviado em 11/05/2007 - 21:49h

<?
//CONECTA NO BANCO
require_once("config.php");
// FAZEMOS O INCLUDE DO ARQUIVO CONFIG
require_once("verifica.php");

/*
*variaveis enviadas pelo método post
*
*/
//$id = $_POST['id'];
$nome = $_POST['txtnome'];
$cpf = $_POST['txtcpf'];
$rg = $_POST['txtrg'];
$estadocivil = $_POST['txtestadocivil'];
$mae = $_POST['txtmae'];
$pai = $_POST['txtpai'];
$endereco = $_POST['txtendereco'];
$n = $_POST['txtn'];
$complemento = $_POST['txtcomplemento'];
$bairro = $_POST['txtbairro'];
$data = $_POST['txtdata'];
$data_nova = implode(preg_match("~\/~", $data) == 0 ? "/" : "-", array_reverse(explode(preg_match("~\/~", $data) == 0 ? "-" : "/", $data)));
$fone = $_POST['txtfone'];
$celular = $_POST['txtcelular'];
$email = $_POST['txtemail'];
$cidade = $_POST['txtcidade'];
$uf = $_POST['txtuf'];
$cep = $_POST['txtcep'];
$profissao = $_POST['txtprofissao'];
$empresa = $_POST['txtempresa'];
$foneempresa = $_POST['txtfoneempresa'];
$referencia1 = $_POST['txtreferencia1'];
$fone1 = $_POST['txtfone1'];
$referencia2 = $_POST['txtreferencia2'];
$fone2 = $_POST['txtfone2'];
$sexo = $_POST['txtsexo'];
$ssp = $_POST['txtssp'];
$datacadastro = date("d/m/Y");
$data_nova2 = implode(preg_match("~\/~", $datacadastro) == 0 ? "/" : "-", array_reverse(explode(preg_match("~\/~", $datacadastro) == 0 ? "-" : "/", $datacadastro)));

$referencia3 = $_POST['txtreferencia3'];
$fone3 = $_POST['txtfone3'];
$referencia4= $_POST['txtreferencia4'];
$fone4= $_POST['txtfone4'];
$obs= $_POST['txtobs'];

//insere os valores no db
$insere = mysql_query("INSERT INTO `tb_Clientes`(nome,cpf,rg,estadocivil,mae,pai,endereco,n,complemento,bairro,
data,fone,celular,email,cidade,uf,cep,profissao,empresa,foneempresa,referencia1,fone1,referencia2,fone2,sexo,ssp,
datacadastro,referencia3,fone3,referencia4,fone4,obs)
VALUES ('$nome','$cpf','$rg','$estadocivil','$mae','$pai','$endereco','$n','$complemento','$bairro','$data_nova','$fone','$celular',
'$email','$cidade','$uf','$cep','$profissao','$empresa','$foneempresa','$referencia1','$fone1','$referencia2','$fone2','$sexo',
'$ssp','$data_nova2','$referencia3','$fone3','$referencia4','$fone4','$obs')")
//se nao da o post ele retona erro.
or die('O sistema está sobrecarregado. Tente mais tarde. ' . mysql_error());

if($row == 0)
{
Header("Location: frmclientesf.php");
}
//SE $row É DIFERENTE DE ZERO, RETORNOU ALGO
else
{
//Header("Location: erro_cadastro.html");
}
?>



4. formulario

Jose RF Junior
JuniorOsho

(usa Debian)

Enviado em 11/05/2007 - 21:50h

<?php // FAZEMOS O INCLUDE DO ARQUIVO PARA VER SE A SESS?O EST? ATIVA
require_once("config.php");
// FAZEMOS O INCLUDE DO ARQUIVO CONFIG
require_once("verifica.php");
// MONTAMOS NOSSA SQL
?>
<title>..:: SIFAC - Sistema::..</title><style>
<body>
<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8" >
<!-- REFERÊNCIA AO ARQUIVO DAS FUNÇÕES-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="t="text/h; charset=UTF-8" 1>
<style type="text/css"> <!-- não sei pra que serve ainda-->
<script type="text/javascript" src="global.js"> <!-- chama o java global funções -->
<script type="text/javascript" src="popcalendar.js"></script>

<script src='prototype.js' language='JavaScript'></script>

<script src='partialupdater.js' language='JavaScript'></script>

<script language="javascript" src="local_verificar.js"></script>
<script language="javascript" src="mensagens.js"></script>


<!-- New popup calendar -->
<!--link rel="stylesheet" type="text/css" media="all" href="calendar/calendar-win2k-1.css" title="win2k-1" /-->
<!--script type="text/javascript" src="calendar/calendar.js"></script-->
<!--script type="text/javascript" src="calendar/calendar-en.js"></script-->
<!--script type="text/javascript" src="calendar/calendar-setup.js"></script-->

<script language="JavaScript" type="text/javascript">
function check_cpf()
{

if( "cnpj" == 'cnpj')
{
if(!verificaValorCampo (document.frmclientesf.txtcpf, "", true, msgCGCObr))
return false;

// if(!verificaValorCampo (document.frmclientesf.txtcpf, "isCGC", true, msgCGCInv))
// return false;
}
else
{
if(!verificaValorCampo (document.frmclientesf.txtcpf, "", true, msgCPFObr))
return false;

if(!verificaValorCampo (document.frmclientesf.txtcpf, "isCPF", true, msgCPFInv))
return false;
}

return true;

}

</script>
<script language="JavaScript" type="text/javascript">
function envia()
{
document.forms[0].submit();
}
var tecla;
function capturaTecla(e)
{
if(document.all)
tecla=event.keyCode;
else
{
tecla=e.which;
}
if(tecla==13)
{
document.forms[0].submit();
}
}
document.onkeydown = capturaTecla;
<script language="javascript">

// Rollover dos menus
function mOvr(src,clrOver) {
if (!src.contains(event.fromElement)) {
src.style.cursor = 'hand';
src.bgColor = clrOver;
}
}
function mOut(src,clrIn) {
if (!src.contains(event.toElement)) {
src.style.cursor = 'default';
src.bgColor = clrIn;
}
}
function mClk(src) { if(event.srcElement.tagName=='TD'){
src.children.tags('A')[0].click();
}
}
</script>

<!-- função çocal-->
</head>
<body leftmargin="0" topmargin="0" style="background: rgb(192, 192, 192) url(none) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; color: rgb(0, 0, 0);" alink="#000099" link="#000099" marginheight="0" marginwidth="0" vlink="#990099">
<table cellpadding="0" cellspacing="1">
<tbody>
<tr>
<td width="777">
<script type="text/javascript" src="ew.js"> </script>
<script type="text/javascript" src="popcalendar.js"></script>


<form name="frmclientesf" id="frmclientesf" action="post_clientesf.php" method="post" onSubmit=" return validaForm();">


<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" id="listmenu-o" href="listmenu_o.css" title="Vertical 'Office'">
<link rel="alternate stylesheet" type="text/css" id="listmenu-v" href="listmenu_v.css" title="Vertical 'Earth'">
<link rel="alternate stylesheet" type="text/css" id="listmenu-h" href="listmenu_h.css" title="Horizontal 'Earth'">
<link rel="stylesheet" type="text/css" id="fsmenu-fallback" href="listmenu_fallback.css">
<link rel="stylesheet" type="text/css" href="divmenu.css">
<script language="javascript" src="local_verificar.js"></script>
<script language="javascript" src="mensagens.js"></script>
<script type="text/javascript" src="fsmenu.js">
</script>

</head>
<body>
- SIFAC - C A D A S T R O -- P E S S O A -- F I S I C A !

</table>
</td>
</tr>
<tr>
<td style="background-color: rgb(204, 204, 204);" colspan="2">
<table>
<tbody>
<tr>
<td>
<table style="background-color: rgb(192, 192, 192);" class="texto" border="1" cellpadding="1" cellspacing="2">
<tbody>
<tr>
<td style="background-color: rgb(192, 192, 192);"> NOME.: </td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input class="texto" type="text" name="txtnome" size="35" maxlength="100" onKeyUp="somente_txt(this);"></td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">NASCIMENTO</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input onfocus='bgcolor="red";' name="txtdata" size="10" onkeypress="return valida(this)">
<input type="image" style="width: 24px; height: 27px;" alt="DATA" onClick="popUpCalendar(this, this.form.txtdata,'dd/mm/yyyy');return false;" src="img/calendario.jpg" >(dd/mm/aaaa) </td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);"> CPF .:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtcpf" size="15" maxlength="15" onkeypress="mascara(this,cpf)" >
<input type="image" style="width: 45px; height: 27px;" onclick="return check_cpf()" src="img/cpf.jpg" ></td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);"> RG.: </td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtrg" size="30" maxlength="30"> </td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">SSP.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<select name="txtssp" id="txtssp" value="">
<option value="AC">AC</option>
<option value="AL">AL</option>
<option value="AM">AM</option>
<option value="AP">AP</option>
<option value="BA">BA</option>
<option value="CE" selected="selected">CE</option>
<option value="DF">DF</option>
<option value="ES">ES</option>
<option value="GO">GO</option>
<option value="MA">MA</option>
<option value="MG">MG</option>
<option value="MS">MS</option>
<option value="MT">MT</option>
<option value="PA">PA</option>
<option value="PB">PB</option>
<option value="PE">PE</option>
<option value="PI">PI</option>
<option value="PR">PR</option>
<option value="RJ">RJ</option>
<option value="RN">RN</option>
<option value="RO">RO</option>
<option value="RR">RR</option>
<option value="RS">RS</option>
<option value="SC">SC</option>
<option value="SE">SE</option>
<option value="SP">SP</option>
<option value="TO">TO</option>
</select>
</td>
<tr>
<td style="background-color: rgb(192, 192, 192);">SEXO.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<select name="txtsexo" id="txtsexo" value="">
<option value="M">F</option>
<option value="F" selected="selected">M</option>
</select>
</td>
<tr>
<td style="background-color: rgb(192, 192, 192);"> ESTADO CIVIL.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<select name="txtestadocivil">
<option value="Solteiro">Solteiro</option>
<option value="Casado" selected="selected">Casado</option>
<option value="Divorciado">Divorciado</option>
<option value="Desquitado">Desquitado</option>
<option value="Vi&uacute;vo">Vi&uacute;vo</option>
</select>
</td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">M&Atilde;E.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtmae" size="35" maxlength="50" onKeyUp="somente_txt(this);"> </td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">PAI.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtpai" size="35" maxlength="100" onKeyUp="somente_txt(this);"></td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">ENDERE&Ccedil;O.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtendereco" size="35" maxlength="100" onKeyUp="somente_txt(this);"> </td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">N.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtn" size="30" maxlength="20"> </td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">COMPLEMENTO.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtcomplemento" size="35" maxlength="50"></td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">BAIRRO.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtbairro" size="35" maxlength="50" > </td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">FONE.:</td>
<td style="text-align: left; background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtfone" id="txtfone" size="15" maxlength="14" onkeypress="mascara(this,telefone)">(DD)0000-0000
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">CELULAR.:
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtcelular" id="txtcelular" size="15" maxlength="50" onkeypress="mascara(this,telefone)">(DD)0000-0000</td>
</tr>
<td style="background-color: rgb(192, 192, 192);">E-MAIL- @.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtemail" size="35" maxlength="50" value="nome@sevidor.com"></td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">CIDADE</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtcidade" size="30" maxlength="50" onKeyUp="somente_txt(this);"></td>
</tr>
<tr>
<tr>
</tbody>
</table>
</td>
<td>
<table style="background-color: rgb(192, 192, 192);" class="texto" border="1" cellpadding="1" cellspacing="2">
<tbody>
<td style="background-color: rgb(192, 192, 192);">ESTADO - UF.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<select name="txtuf" id="txtuf" >
<option value=""></option>
<option value="AC">AC</option>
<option value="AL">AL</option>
<option value="AM">AM</option>
<option value="AP">AP</option>
<option value="BA">BA</option>
<option value="CE" selected="selected">CE</option>
<option value="DF">DF</option>
<option value="ES">ES</option>
<option value="GO">GO</option>
<option value="MA">MA</option>
<option value="MG">MG</option>
<option value="MS">MS</option>
<option value="MT">MT</option>
<option value="PA">PA</option>
<option value="PB">PB</option>
<option value="PE">PE</option>
<option value="PI">PI</option>
<option value="PR">PR</option>
<option value="RJ">RJ</option>
<option value="RN">RN</option>
<option value="RO">RO</option>
<option value="RR">RR</option>
<option value="RS">RS</option>
<option value="SC">SC</option>
<option value="SE">SE</option>
<option value="SP">SP</option>
<option value="TO">TO</option>
</select>
</td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">CEP.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtcep" size="16" maxlength="9" onkeypress="mascara(this,cep)">
<a href="http://www.correios.com.br/servicos/cep/cep_default.cfm"></a>
<img style="width: 80px; height: 20px;" src="img/correios.jpeg">(00000-000)</td>
</td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">PROFISS&Atilde;O.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtprofissao" size="30" maxlength="50" onKeyUp="somente_txt(this);"></td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">EMPRESA.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtempresa" size="30" maxlength="50" onKeyUp="somente_txt(this);"> </td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">FONE-EMPRESA.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtfoneempresa" size="16" id=" txtfoneempresa" size="20" maxlength="20" onkeypress="mascara(this,telefone)">(DD)0000-0000 </td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">REFERENCIA - 1.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtreferencia1" size="30" maxlength="50" onKeyUp="somente_txt(this);"> </td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">FONE- 1.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtfone1" id="txtfone1" size="16" maxlength="20" onkeypress="mascara(this,telefone)">(DD)0000-0000</td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">REFERENCIA- 2.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtreferencia2" size="30" maxlength="50" onKeyUp="somente_txt(this);"> </td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">FONE- 2</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtfone2" id="txtfone2" size="16" maxlength="20" onkeypress="mascara(this,telefone)">(DD)0000-0000
</td>
</tr>
<tbody>
<tr>
<td style="background-color: rgb(192, 192, 192);">REFERENCIA-3.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtreferencia3" id="txtreferencia3" size="30" maxlength="50" onKeyUp="somente_txt(this);"> </td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">FONE- 3.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtfone3" id="txtfone3" size="16" maxlength="20" onkeypress="mascara(this,telefone)">(DD)0000-0000</td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">REFERENCIA- 4.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtreferencia4" id="txtreferencia4" size="30" maxlength="50" onKeyUp="somente_txt(this);"> </td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">FONE- 4.:</td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<input name="txtfone4" id="txtfone4" size="16" maxlength="20" onkeypress="mascara(this,telefone)">(DD)0000-0000</td>
</tr>
<tr>
<td style="background-color: rgb(192, 192, 192);">OBS.: </td>
<td style="background-color: rgb(204, 204, 204);" bgcolor="#f5f5f5">
<textarea name="txtobs" id="txtobs" cols="50" rows="4" ></textarea>
</td>
</tr>



</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>


<button onSubmit="bug();" type="submit" name="pbotao4" value="Button Enviar" onClick="MM_showHideLayers('Layer1','','show');" target="escondido">
<img src="img/salvar.jpg" height="60" type="image" id="vaiporra" width="60" style="vertical-align: middle;" />Salvar</button>

<button onclick="doPrint(this.form);" type="reset" name="pbotao4" value="Button Enviar" >
<img src="img/imprimir.jpg" height="60" type="image" width="60" style="vertical-align: middle;" />Imprimir</button>

<button type="reset" name="pbotao4" value="Button Enviar" onclick=" pesquisax();" >
<img href="mostratab.php" target="destino" src="img/lupa.jpeg" height="60" type="image" width="60" style="vertical-align: middle;" />Procurar</button

<button type="reset" name="pbotao4" value="Button Enviar">

<img src="img/lixo.jpg" height="60" type="image" width="60" style="vertical-align: middle;" />Excluir</button>
<button onclick="fsair();" type="reset" name="pbotao4" value="Button Enviar">

<img src="img/sair.gif" height="60" type="image" width="60" style="vertical-align: middle;" /> Sair do Sistema</button>
<p>



<span id='error' style='color:red;'></span>

</p>


</p>

</form>
</td>
</tr>
</tbody>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td bgcolor="#f1f2ee" height="40">
<table>
<tbody>
<tr>
<td>
<table align="right" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="rodape" bgcolor="#f1f2ee">
<table>
<tbody>
<tr>
<td class="texto" width="500">
Copyright
&copy; <span style="font-weight: bold;">SIFAC CADASTRO PESSOA FISICA !</span>
<br>
Suporte kafkapvh@hotmail.com<br>
Fone: 85 9125-4360 [Developer by ]<span style="text-decoration: underline;"><span style="font-weight: bold;">SIFAC</span></span> </td>
<span style="text-decoration: underline;"><span style="font-weight: bold;">SIFAC</span></span> </td>
<div id="Layer1" style="position:absolute; left:186px; top:171px; width:362px; height:53px; z-index:1; visibility: hidden;">
<div align="center"><font color="#0066FF" size="7"><strong>Aguarde..........</strong></font></div>

<div id="Layer2" style="position:absolute; left:186px; top:171px; width:362px; height:53px; z-index:1; visibility: hidden;">
<div align="center"><font color="#0066FF" size="7"><strong>Salvo com Sucesso..........</strong></font></div>

</div>
</tbody>
</table>

</tbody>
</table>

</tbody>
</table>

</tbody>
</table>
</body>
</html>



5. tela principal

Jose RF Junior
JuniorOsho

(usa Debian)

Enviado em 11/05/2007 - 21:50h

<?php // FAZEMOS O INCLUDE DO ARQUIVO PARA VER SE A SESS?O EST? ATIVA
require_once("config.php");
// FAZEMOS O INCLUDE DO ARQUIVO CONFIG
require_once("verifica.php");
// MONTAMOS NOSSA SQL
$sql= mysql_query("SELECT * FROM tb_usuarios WHERE ID_USUARIO = '".$_SESSION[iduser]."'")
or die("ERRO NA CONSULTA SQL");
//LINHAS TOTAIS AFETADAS PELA CONSULTA
//$row = mysql_num_rows($sql);
// NOME DO USER LOGADO
echo "<div align=center><font color=blue size=5 face=Verdana align=center>SISTEMA INTEGRADO FINANCEIRO ADMINISTRATIVO COMERCIAL V 1.0 - ABRIL - 2007</br>";
echo"<td><font color=blue size=2 face=Verdana> - Suporte: kafkapvh@hotmail.com -";
echo "<td><font color=red size=2 face=Verdana> Bem Vindo Us&aacute;rio :.".$_SESSION[nomeuser];
// MONTANDO OS DADOS NA TABELA

//EXIBE OS DADOS REFERENTE AO USU?RIO LOGADO NO MOMENTO
//for($i=0; $i<$row; $i++)
//{
// $nome_user = mysql_result($sql, $i, "NOME_USUARIO");

//}
// pega o ip do serv -------------------
$ip = (isset($_SERVER['REMOTE_ADDR'])?$_SERVER['REMOTE_ADDR']:'unknown');
// pegando o endere?o remoto ou definindo-o como desconhecido
$forward = ( isset($_SERVER['HTTP_X_FORWARDED_FOR'])?$_SERVER['HTTP_X_FORWARDED_FOR']:false);
// pegando o endere?o que foi repassado (se houver)
$ip=( $foward?$forward:$ip);
echo " ";
echo "<div align=center><font color=blue size=5 face=Verdana align=center>IP -$ip</br>";
// data e hora
#declara??o das vari?veis dia da semana, dia do m?s, m?s e ano e hora:
$dia=date(d);
$mes=date(n);
$ano=date(Y);
$diasemana = date("l");
$hora=date(H);

#Imprime bom dia, boa tarde ou boa noite em fun??o da hora do dia
if ($hora<="06")
{
echo "<td><div align=center><font size=2 face=Verdana> Boa Noite - ";

}
elseif ($hora<="12")
{
echo "<td><div align=center><font size=2 face=Verdana> Bom Dia - ";
}
elseif ($hora<="19")
{
echo "<td><div align=center><font size=2 face=Verdana> Boa Tarde - ";
}
else
{
echo "<td><div align=center><font size=2 face=Verdana> Boa Noite - ";
}
#imprime dia da semana

if($diasemana == "Monday")
{
print("Segunda-feira");
}
if($diasemana == "Tuesday")
{
print("Ter&ccedil;a-feira");
}
if($diasemana == "Wednesday")
{
print("Quarta-feira");
}
if($diasemana == "Thursday")
{
print("Quinta-feira");
}
if($diasemana == "Friday")
{
print("Sexta-feira");
}
if($diasemana == "Saturday")
{
print("Sab&aacute;do");
}
if($diasemana == "Sunday")
{
print("Domingo");
}

#imprime o m?s

if ($mes=="1")
{

print(", $dia de Janeiro de $ano");
}

if ($mes=="2")
{
print(", $dia de Fevereiro de $ano");
}
if ($mes=="3")
{
print(", $dia de Mar?o de $ano");
}
if ($mes=="4")
{
print(", $dia de Abril de $ano");
}
if ($mes=="5")
{
print(", $dia de Maio de $ano");
}
if ($mes=="6")
{
print(" $dia de Junho de $ano");
}
if ($mes=="7")
{
print(", $dia de Julho de $ano");
}
if ($mes=="8")
{
print(" $dia de Agosto de $ano");
}
if ($mes=="9")
{
print(" $dia de Setembro de $ano");
}
if ($mes=="10")
{
print(", $dia de Outubro de $ano");
}
if ($mes=="11")
{
print(", $dia de Novembro de $ano");
}
if ($mes=="12")
{
print(", $dia de Dezembro de $ano");

}

?>

<head>

</div>
<a href="frmclientesf.php" target="destino">
<img style="border: 0px solid ; width: 57px; height: 56px;"
onmouseout="kill();" onmouseover="popup('CLICK Para Cadastro Pessoas','cc0000')"
src="img/gente.jpg"></a>

<a href="frmclientesf.php">
<img style="border: 0px solid ; width: 57px; height: 56px;"
onmouseout="kill();" onmouseover="popup('CLICK Para Cadastro Financeiro','cc0000')"
src="img/financeiro.jpg"></a>

<a href="frmclientesf.php">
<img style="border: 0px solid ; width: 50px; height: 50px;"
onmouseout="kill();" onmouseover="popup('CLICK Para Cadastro Administrativo','cc0000')"
src="img/novo2.jpg"></a>

<a href="frmclientesf.php">
<img style="border: 0px solid ; width: 57px; height: 56px;"
onmouseout="kill();" onmouseover="popup('CLICK Para Relatórios','cc0000')"
src="img/imprimir.jpg"></a>

<a href="frmclientesf.php">
<img style="border: 0px solid ; width: 57px; height: 56px;"
onmouseout="kill();" onmouseover="popup('CLICK Para Vendas','cc0000')"
src="img/vendas.jpg"></a>

<img style="border: 0px solid ; width: 57px; height: 56px;"
onmouseout="kill();" onmouseover="popup('CLICK Para Mensagens','cc0000')"
src="img/coreio.jpg"></a><a> </a><a href="pes_log.php">
<img style="border: 0px solid ; width: 57px; height: 56px;"
onmouseout="kill();" onmouseover="popup('CLICK Para Pesquisas','cc0000')"
src="img/lupa.jpeg"></a><a> <a><a href="HELP.html">

<img style="border: 0px solid ; width: 57px; height: 56px;"
onmouseout="kill();" onmouseover="popup('CLICK Para Excluir Cadastros','cc0000')"
src="img/lixo.jpg"></a> <a> </a><a href="HELP.html">

<img style="border: 0px solid ; width: 57px; height: 56px;"
onmouseout="kill();" onmouseover="popup('CLICK Para AJUDA do SIFAC','cc0000')"
src="img/globo.jpg"></a> <a> </a>

<a href="index.php"><img style="border: 0px solid ; width: 75px; height: 75px;"
onmouseout="kill();" onmouseover="popup('CLICK Para Configurar o SIFAC','cc0000')"
src="img/conf.jpg" ></a> &nbsp;<a href="index.php">
<img style="border: 0px solid ; width: 50px; height: 50px;" onmouseout="kill();" onmouseover="popup('CLICK Para SAIR DO SIFAC','cc0000')" src="img/sair.gif"></a>
<br>
</div>

<script type="text/javascript">
<!--
.mouseBeOffMe {
border-top: 10px solid #FFFFFF; border-bottom: 10px solid #FFFFFF; border-left: 6px solid #FFFFFF; border-right: 10px solid #FFFFFF; }
.mouseBeOnMe {
border-top: 6px solid #FFFFFF;
border-bottom: 14px solid #FFFFFF; border-left: 10px solid #FFFFFF; border-right: 6px solid #FFFFFF;
}
.mouseBeDown {
border-top: 13px solid #FFFFFF;
border-bottom: 7px solid #FFFFFF; border-left: 10px solid #FFFFFF; border-right: 6px solid #FFFFFF;
}
.mouseBeUp {
border-top: 10px solid #FFFFFF;
border-bottom: 10px solid #FFFFFF; border-left: 10px solid #FFFFFF; border-right: 6px solid #FFFFFF;
}
//-->

</script>

<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" id="listmenu-o" href="listmenu_o.css" title="Vertical 'Office'">
<link rel="alternate stylesheet" type="text/css" id="listmenu-v" href="listmenu_v.css" title="Vertical 'Earth'">
<link rel="alternate stylesheet" type="text/css" id="listmenu-h" href="listmenu_h.css" title="Horizontal 'Earth'">
<link rel="stylesheet" type="text/css" id="fsmenu-fallback" href="listmenu_fallback.css">
<link rel="stylesheet" type="text/css" href="divmenu.css">
<script type="text/javascript" src="fsmenu.js">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" >

<script type="text/javascript" src="global.js">

<body>
</script>

</head>
<body>
<hr>
</div>
<ul class="menulist" id="listMenuRoot">
<li>
<a href="#">MENU</a>
<ul>
<li>
<a href="#" >Cadastro de Pessoas</a>
<ul>
<li>

<a href="#">Clientes F / J</a>
<ul>
<li><a href="frmclientesf.php" target="destino">Fisica</a></li>
<li><a href="frmclientesj.php" target="destino">Jur&iacute;dica</a></li>
</ul>
</li>
<li>
<li><a href="HELP.html" target="destino">Vendedores</a></li>
<li><a href="HELP.html" target="destino">Fornecedores</a></li>
<li><a href="HELP.html" target="destino">Corretores</a></li>
<li><a href="HELP.html" target="destino">Representantes</a></li>
</ul>
</li>
<li>
<a href="HELP.html" target="destino">Cadastro de Produtos</a>
<ul>
<li>
<a href="HELP.html" target="destino">Cadastro de Produtos</a>
</li>
<li><a href="HELP.html" target="destino">Transferencia de Produtos</a></li>
<li><a href="HELP.html" target="destino">Estoque de Produtos</a></li>
<li><a href="HELP.html" target="destino">Consiguinado de Produtos</a></li>
</ul>
</li>
<li>
<a href="HELP.html" target="destino">Financeiro</a>
<ul>
<li><a href="HELP.html" target="destino">Contas a Pagar</a></li>
<li><a href="HELP.html" target="destino">Contas a Receber</a></li>
<li><a href="HELP.html" target="destino">Cadastro de Cheques</a></li>
<li><a href="HELP.html" target="destino">Cadastro de Conta</a></li>
<li><a href="HELP.html" target="destino">Cadastro de Banco</a></li>
<li><a href="HELP.html" target="destino">Cadastro de Cart?o</a></li>
</ul>
</li>
<li>
<a href="HELP.html" target="destino">Cadastro Administrativo</a>
<ul>
<li><a href="tbclientes.php">Clientes</a></li>
<li><a href="#">Funcion&aacute;rio
</a></li>
<li><a href="#">Vendedores</a></li>
<li><a href="#">Fornecedores</a></li>
<li><a href="#">Corretores</a></li>
<li><a href="#">Representantes</a></li>
</ul>
</li>
<li>
<a href="#">Cadastro Comercial</a>
<ul>
<li><a href="tbclientes.php">Clientes</a></li>
<li><a href="#">Funcion&aacute;rio
</a></li>
<li><a href="#">Vendedores</a></li>
<li><a href="#">Fornecedores</a></li>
<li><a href="#">Corretores</a></li>
<li><a href="#">Representantes</a></li>
</ul>
</li>
<li>
<a href="#">Grupos</a>
<ul>
<li><a href="tbclientes.php">Clientes</a></li>
<li><a href="#">Funcion&aacute;rio
</a></li>
<li><a href="#">Vendedores</a></li>
<li><a href="#">Fornecedores</a></li>
<li><a href="#">Corretores</a></li>
<li><a href="#">Representantes</a></li>
</ul>
</li>
<li>
<a href="#">Sub--Grupos</a>
<ul>
<li><a href="tbclientes.php">Clientes</a></li>
<li><a href="#">Funcion&aacute;rio
</a></li>
<li><a href="#">Vendedores</a></li>
<li><a href="#">Fornecedores</a></li>
<li><a href="#">Corretores</a></li>
<li><a href="#">Representantes</a></li>
</ul>
</li>
<li>
<a href="#">Relatórios</a>
<ul>
<li><a href="tbclientes.php">Clientes</a></li>
<li><a href="#">Funcion&aacute;rio
</a></li>
<li><a href="#">Vendedores</a></li>
<li><a href="#">Fornecedores</a></li>
<li><a href="#">Corretores</a></li>
<li><a href="#">Representantes</a></li>
</ul>
</li>
<li>
<a href="#">Configuração</a>
<ul>
<li><a href="tbclientes.php">Clientes</a></li>
<li><a href="#">Funcion&aacute;rio
</a></li>
<li><a href="#">Vendedores</a></li>
<li><a href="#">Fornecedores</a></li>
<li><a href="#">Corretores</a></li>
<li><a href="#">Representantes</a></li>
</ul>
</li>
<li><a href="index.php">.:SAIR DO SISTEMA:.</sair></a></li>
</ul>
</li>


</ul>
</li>

</ul><script type="text/javascript">
//<![CDATA[

var listMenu = new FSMenu('listMenu', true, 'display', 'block', 'none');
var arrow = null;
if (document.createElement && document.documentElement)
{
arrow = document.createElement('span');
arrow.appendChild(document.createTextNode('>'));
// Feel free to replace the above two lines with these for a small arrow image...
//arrow = document.createElement('img');
//arrow.src = 'img/delete.gif';
//arrow.style.borderWidth = '10';
arrow.className = 'subind';
}
addEvent(window, 'load', new Function('listMenu.activateMenu("listMenuRoot", arrow)'));
//]]>
</script>


<tr>
<td align="top">
<iframe name=destino frameBorder=0 marginHeight=0 marginWidth=0 scrolling=aways src="SIFACIMG.php" width=1000 height=800 bordercolor="#000000">

<ilayer id=full visibility=hide width=1000 height=800></ilayer></IFRAME>
<a href="erro_logar.html"><br>
</a>
<div align="center">
<br>
</a><br>
</a></div>
<div align="center">
</div>
<div align="center">
&nbsp;&nbsp;
<div style="text-align: right; margin-left: 40px;">
</div>
<h1> </h1>

<script language="JavaScript">
function moveRelogio(){
momentoAtual = new Date()
hora = momentoAtual.getHours()
minuto = momentoAtual.getMinutes()
segundo = momentoAtual.getSeconds()

horaImprimivel = hora + " : " + minuto + " : " + segundo

document.form_relogio.relogio.value = horaImprimivel

setTimeout("moveRelogio()",1000)
}
</script>
</head>
<body onload="moveRelogio()">
Hora do Sistema SIFAC !
<form name="form_relogio">
<input type="text" name="relogio" size="15" style="background-color: #FFFFFF; color: #0000FF; "><script language="JavaScript">
<!--
//function Remote() {
//var remote = null
//remote = window.open('','vRemote','toolbar=yes, location=no,directories=no,status=no,menubar=no,sc //rollbars=yes,resizable=no,fullscreen=yes')
//if (remote != null) {
//if (remote.opener == null) {
//remote.opener = self
//}
//remote.location.href = 'http://sifac.zip.net'
//}
//}

//Remote();
//history.go(-1);

// -->

</script>

<head>
<meta http-equiv="Pragma" content="no-cache"><style type="text/css">
BODY {OVERFLOW:scroll;OVERFLOW-X:hidden}
.DEK {POSITION:absolute;VISIBILITY:hidden;}
</style>
<link rel="stylesheet" href="css/lightbox.css"
type="text/css" media="screen">
<title>SISTEMA INTEGRADO FINANCEIRO ADMINISTRATIVO COMERCIAL SIFAC, suporte kafkapvh@hotmail.com, alex_normandia@hotmail.com</title>
</head>
<body style="background-image: url(img/bgcode.gif);"
onload="startScroller()" oncopy="return false;"
oncontextmenu="return false;" ondragstart="return false;"
ondrag="return false;" onselectstart="return false;"
onselect="return false;">
<center>
<div id="dek" class="dek"></div><script type="text/javascript">
// DISTÂNCIA
Xoffset=1; // distância da ponta do mouse para o balão
Yoffset= -70; // -250 distância do topo para baixo (-valor fica mais alto)
// DISTÂNCIA
var old,skn,iex=(document.all),yyy=-1000;
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
if (ns4)
skn=document.dek
else if (ns6)
skn=document.getElementById("dek").style
else if (ie4)
skn=document.all.dek.style
if(ns4)document.captureEvents(Event.MOUSEMOVE);
else{
skn.visibility="visible"
skn.display="none"
}
document.onmousemove=get_mouse;
function popup(msg,bak){
var content="<TABLE style='filter:Alpha(Opacity=90,FinishOpacity=80,Style=2,StartX=100,StartY=100,FinishX=100,FinishY=1);' WIDTH=149 height=67 BORDER=0 CELLPADDING=0 CELLSPACING=0 background=balloon.gif><TD ALIGN=center valign=middle><table width=87%><tr><td align=center valign=middle><font style='font-weight:bold;font-family:tahoma,verdana,arial;font-size:8pt;color:#696969;'>"+msg+"</FONT></td></tr></table></TD></TABLE>";
/*
var content="";
content+='<table class="opacity" width="255" height="260" BORDER="0" CELLPADDING="0" CELLSPACING="0" background="teste.gif">'
content+='<tr><td height=10></td></tr>'
content+='<TR><td width=17></td><TD valign="top" align="left">'
content+='<table width="89%" cellpading="5" cellspacing="5" height="80%" border="0" style="border:1px solid #cccccc;">'
content+='<tr>'
content+='<td valign="top" class="titulotopo" height="5%">'+ msg +'</td>'
content+='</tr>'
content+='<tr>'
content+='<td valign="top" align="center" valign="middle"><img src="'+ logo +'" width=120 height=90></td>'
content+='</tr>'
content+='<tr>'
content+='<td valign="top" align="left" class="texto" height="60%">'+ bak +'</td>'
content+='</tr>'
content+='</table>'
content+='</TD></TR></TABLE>'
*/
yyy=Yoffset;
if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
if(ns6){document.getElementById("dek").innerHTML=content;skn.display=''}
if(ie4){document.all("dek").innerHTML=content;skn.display=''}
}
function get_mouse(e){
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
skn.left=x+Xoffset;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
skn.top=y+yyy;
}
function kill(){
yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ns6||ie4)
skn.display="none"
}
</script>
</body>
</html>



6. login e senha

Jose RF Junior
JuniorOsho

(usa Debian)

Enviado em 11/05/2007 - 21:51h

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<meta http-equiv="pragma" content="no-cache" />

<link type="text/css" rel="stylesheet" media="screen" href="SISTEMA/css/album.css" />

<script language="javascript" type="text/javascript" src="SISTEMA/js/anima.js"></script>

<script language="javascript" type="text/javascript" src="SISTEMA/js/ajax.js"></script>
<script language="javascript">
function validar(formautentica) {
campo = document.formautentica.user.value;
if (user == "") {
alert("Escreva algo no campo .:LOGIN:. antes de enviar");
formautentica.user.focus();
return false;
}
}
</script>
<script language="javascript">
function validar(formautentica) {
campo = document.formautentica.senha.value;
if (senha == "") {
alert("Escreva algo no campo .:SENHA:. antes de enviar");
formautentica.senha.focus();
return false;
}
}
</script>
<script language="JavaScript" type="text/javascript">
function envia()
{
document.forms[0].submit();
}
var tecla;
function capturaTecla(e)
{
if(document.all)
tecla=event.keyCode;
else
{
tecla=e.which;
}
if(tecla==13)
{
document.forms[0].submit();
}
}
document.onkeydown = capturaTecla;
</script>
</head>
<body style="color: rgb(0, 0, 0); background-color: rgb(204, 204, 204); background-image: url(red);" alink="#000099" link="#000099" vlink="#990099">
&nbsp;<br>
<div style="text-align: center;"><img style="width: 485px; height: 67px;" alt="" src="img/login.jpg"><span style="font-weight: bold;"></span>
</div>
<br>
<div style="text-align: center;"><small style="font-weight: bold;"><small><br>
</small></small>
</div>
<div style="text-align: center;"><big><span style="font-weight: bold; color: rgb(0, 0, 153);">BEM VINDO
AO SISTEMA - SIFAC -</span></big><br>
</div>
<br>
<form action="autentica.php" method="post" name="formautentica" onsubmit="return validar(this)">
<br>
<div style="text-align: center;">
<div style="text-align: center;"><font color="#666666"><font color="#333333">
<font face="Geneva, Arial, Helvetica, sans-serif" size="3"><strong><br>
</strong></font></font></font>
<div style="text-align: center;"> <font color="#666666"><font color="#333333">
<font face="Geneva, Arial, Helvetica, sans-serif" size="3"><strong>
<img style="width: 205px; height: 23px;" alt="" name="loa" src="img/loading.jpg"></strong></font></font></font></div>
<div style="text-align: center;"><span style="font-weight: bold;"></span>_____________________________________________________________________________<br>
<br>
</div>
<fieldset> <span style="font-weight: bold;"></span><span style="font-weight: bold;">&nbsp; &nbsp; &nbsp;
&nbsp; Login*</span> <span style="font-weight: bold;">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <img style="width: 25px; height: 25px;" name="img1" alt="" src="img/cadiado.jpg">
</span><span style="font-weight: bold;">&nbsp;&nbsp;</span><br>
<span style="font-weight: bold;"></span><span style="font-weight: bold;"></span><span style="font-weight: bold;">&nbsp;
</span><span style="font-weight: bold;"></span><span style="font-weight: bold;"></span>

<input onkeypress='document.img1.src = "img/cadiado2.jpg"' name="user"><br>
<span style="font-weight: bold;">&nbsp; &nbsp;
&nbsp; &nbsp;Senha* &nbsp; &nbsp;&nbsp; &nbsp;
&nbsp; &nbsp;&nbsp; <img style="width: 25px; height: 25px;" name="img2" src="img/cadiado.jpg"></span><br>
<span style="font-weight: bold;"></span><span style="font-weight: bold;"></span>&nbsp;<big><big>
<input onkeypress='document.img2.src = "img/cadiado2.jpg";document.loa.src = "img/loading.gif"' name="senha"
type="password"></big></big><br>
</fieldset>
<div style="text-align: center;"> <font color="#666666"><font color="#333333">
<font face="Geneva, Arial, Helvetica, sans-serif" size="3">
<strong></strong></font></font></font>&nbsp;
&nbsp;
<!--bot?o com referencia ao post, onclick="document.forms.form1.submit();return false -->
<a class="link" href="#" onclick="document.forms.formautentica.submit()">
<img tabindex="3" style="border: 0px solid ; width: 63px; height: 84px;" onmouseout='document.entrar.src="img/entrar.jpg"'
onmousemove='document.entrar.src="img/entrar2.jpg"' src="img/entrar.jpg" name="entrar"><br>

Entrar</a>&nbsp;<br>
</div>
<a class="link" href="#" onclick="document.forms.formautentica.submit()"> </a>
<div style="text-align: center;">_____________________________________________________________________________<br>
</div>
<div style="text-align: center; font-weight: bold;" ;="">
suporte online: kafkapvh@hotmail - alex_normandia@hotmail.com <br>
<small>Sistema Integrado Financeiro Administrativo Comercial
SIFAC<br>
</small><small style="font-weight: bold;"><small>http://sifac.zip.net<br>
</small><small style="font-weight: bold;"><small>LINUX GNU/DEBIAN<br>
<img tabindex="3" src="img/debs.jpg" >
<img tabindex="3" src="img/debl.jpg" ><br>
</small></small><small style="font-weight: bold;"><small><br>
</small></small> </div>
</div>

</form>
</body>
</html>



7. pesquisa clientes

Jose RF Junior
JuniorOsho

(usa Debian)

Enviado em 11/05/2007 - 21:51h

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>phpbrasil.com -
colabora&iuml;&iquest;&frac12;o &lt;-&gt; comunidade</title>


<meta content="text/html; charset=iso-8859-1">

<link href="search.php_arquivos/style.css" rel="stylesheet" type="text/css" media="screen">

</head>


<body>

<!-- Logo --><!-- Menu -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">

<tbody>

<tr>

<td colspan="2" class="tabela" height="18" width="100%"> <span class="menu"> <a href="http://www.phpbrasil.com/index.php" class="menu">http://sifac.zip.net</a>
&nbsp;<img src="search.php_arquivos/arrow.gif">&nbsp;&nbsp;ferramenta
de procura</span> </td>

</tr>

</tbody>
</table>

--&gt;
<table align="center" bgcolor="#fff8d8" border="0" cellpadding="0" cellspacing="0" width="100%">

<tbody>

<tr>

<td valign="top" width="18%">
<table class="tabela" align="center" border="0" cellpadding="1" cellspacing="0" width="95%">

<tbody>

<tr>

<td> PESQUISA SIFAC</td>

</tr>

</tbody>
</table>

<br>

<table class="tabela" align="center" border="0" cellpadding="1" cellspacing="0" width="95%">

<tbody>

<tr>

<td>::&nbsp;PESQUISA SIFAC ::</td>

</tr>

<tr>

<td align="center"> </td>

</tr>

</tbody>
</table>

<br>

<table class="tabela" align="center" border="0" cellpadding="1" cellspacing="0" width="95%">

<tbody>

<tr>

<td>:: PESQUISA SIFAC::</td>

</tr>

<tr>

<td> </td>

</tr>

</tbody>
</table>

<br>

<!-- Scripts -->
<table class="tabela" align="center" border="0" cellpadding="1" cellspacing="0" width="95%">

<tbody>

<tr>

<td> <span style="float: right;"></span>&nbsp;::&nbsp;PESQUISA
SIFAC :: </td>

</tr>

<tr>

<td width="100%"> </td>

</tr>

</tbody>
</table>

<br>

<!-- Elenco phpbrasil -->
<table class="tabela" align="center" border="0" cellpadding="1" cellspacing="0" width="95%">

<tbody>

<tr>

<td>::&nbsp;PESQUISA SIFAC ::</td>

</tr>

<tr>

<td width="100%"> </td>

</tr>

</tbody>
</table>

<br>

</td>

<td> <img src="search.php_arquivos/blank.gif" border="0" width="20"> </td>

<!-- In&#110;&#65533;io do Contedo --> <td valign="top" width="82%">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="95%">

<tbody>

<tr>

<td> <span class="titulo">Pesquisa
Clientes</span></td>

</tr>

</tbody>
</table>

<br>

<form method="post" action="/search.php"> <input name="cat" value="search" type="hidden">
<table class="tabela" align="center" border="0" cellpadding="1" cellspacing="0">

<tbody>

<tr>

<td align="center">
<table class="tabelinha" border="0" cellpadding="4" cellspacing="0" width="100%">

<tbody>

<tr>

<td> Procura: <input name="keyword" size="20" type="text">&nbsp;
<select name="section">
<option value="all">NOME</option>
<option value="articles">CPF</option>
<option value="files">RG</option>
<option value="faqs">MAE</option>
</select>

&nbsp; <input value="Procurar" type="submit"> </td>

</tr>

</tbody>
</table>

</td>

</tr>

</tbody>
</table>

</form>

</td>

<!-- Fim do Contedo --> <td> <img src="search.php_arquivos/blank.gif" border="0" width="20">
</td>

</tr>

</tbody>
</table>

<!-- Degrad&#100;&#65533;-->
<table border="0" cellpadding="2" cellspacing="0" width="100%">

<tbody>

<tr>

<td class="tabela" width="50%"> <span class="menuforum">webmaster: </span><a href="http://www.phpbrasil.com/profile.php/user/jpm" class="menuforum">Junior Ferreira</a> </td>

<td class="tabela" align="center" nowrap="nowrap">&nbsp;
</td>

<td class="tabela" align="right" width="50%">
<span class="menuforum"></span> </td>

</tr>

<tr class="tabela_escura">

<td colspan="3" align="center"> <span class="menuforum"></span> </td>

</tr>

</tbody>
</table>

<layer src="http://ads.impleo.net/adframe.php?n=af936c8b&amp;rewrite=0" width="468" height="60" visibility="hidden" onload="moveToAbsolute(layeraf936c8b.pageX,layeraf936c8b.pageY);clip.width=468;clip.height=60;visibility='show';"></layer>
</body>
</html>



8. global.js --* valida os forms

Jose RF Junior
JuniorOsho

(usa Debian)

Enviado em 11/05/2007 - 21:52h


//FUNÇÃO PARA CADASTRO DE CLIENTESF, VALIDA FORMULARIO 01
function validaForm(){
d = document.frmclientesf;
//validar nome
if (d.txtnome.value == ""){
alert("O campo .:NOME:.deve ser preenchido!");
msg = "_________________________________________________________________\n\n";
msg += "AO PRECIONAR A TECLA ENTER, O REGISTRO TENTAR SER GRAVADO.\n";
msg += " \n";
msg += "_________________________________________________________________\n\n";
msg += "\n\SIFAC"
alert(msg + "\n\n");


d.txtnome.focus();
return false;
}
d = document.frmclientesf;
//se deu certo *
if (d.txtnome.value != ""){
d.txtnome.focus();
}

//valida data
if (d.txtdata.value == ""){
alert("O campo .::DATA NASCIMENTO:. deve ser preenchido!");
d.txtdata.focus();
return false;
}
//validar cpf
if (d.txtcpf.value == ""){
alert("O campo .:CPF.: deve ser preenchido!");
d.txtcpf.focus();
return false;
}
//validar rg
if (d.txtrg.value == ""){
alert("O campo .:RG:. deve ser preenchido!");
d.txtrg.focus();
return false;
}


//validar ENDEREÇO
if (d.txtendereco.value == ""){
alert("O campo .:ENDEREÇO:. deve ser preenchido!");
d.txtendereco.focus();
return false;
}
//validar NUMERO
if (d.txtn.value == ""){
alert("O campo .:NÚMERO:. deve ser preenchido!");
d.txtn.focus();
return false;
}
//validar BAIRRO
if (d.txtbairro.value == ""){
alert("O campo .:BAIRRO:. deve ser preenchido!");
d.txtbairro.focus();
return false;
}
//validar REFERENCIA 1
if (d.txtfone.value == ""){
alert("O campo .:TELEFONE:. deve ser preenchido!");
d.txtfone.focus();
return false;
}
//validar CIDADE
if (d.txtcidade.value == ""){
alert("O campo .:CIDADE:. deve ser preenchido!");
d.txtcidade.focus();
return false;
}
//validar ESTADO
if (d.txtuf.value == ""){
alert("O campo .:ESTADO - UF:. deve ser preenchido!");
d.txtuf.focus();
return false;
}
//validar REFERENCIA 1
if (d.txtreferencia1.value == ""){
alert("O campo .:REFERENCIA 1:. deve ser preenchido!");
d.txtreferencia1.focus();
return false;
}
//validar FONE1
if (d.txtfone1.value == ""){
alert("O campo .:TELEFONE 1:. deve ser preenchido!");
d.txtfone1.focus();
return false;
}
//validar REFERENCIA 2
if (d.txtreferencia2.value == ""){
alert("O campo .:REFERENCIA 2:. deve ser preenchido!");
d.txtreferencia2.focus();
return false;
}
//validar FONE2
if (d.txtfone2.value == ""){
alert("O campo .:TELEFONE 2:. deve ser preenchido!");
d.txtfone2.focus();
return false;
}
//validar REFERENCIA 3
if (d.txtreferencia3.value == ""){
alert("O campo .:REFERENCIA 3:. deve ser preenchido!");
d.txtreferencia3.focus();
return false;
}
//validar FONE3
if (d.txtfone3.value == ""){
alert("O campo .:TELEFONE 3:. deve ser preenchido!");
d.txtfone3.focus();
return false;
}
//validar REFERENCIA 4
if (d.txtreferencia4.value == ""){
alert("O campo .:REFERENCIA 4:. deve ser preenchido!");
d.txtreferencia4.focus();
return false;
}
//validar FONE 4
if (d.txtfone4.value == ""){
alert("O campo .:TELEFONE 4:. deve ser preenchido!");
d.txtfone4.focus();
return false;
}

//validar telefone(verificacao se contem apenas numeros)
// if (isNaN(d.txtfone.value)){
// alert ("O campo .:TELEFONE :. deve conter apenas numeros!");
// d.txtfone.focus();
// return false;
// }


//validar telefone(verificacao se contem apenas numeros)
//if (isNaN(d.txtfone1.value)){
// alert ("O campo .:TELEFONE 1:. deve conter apenas numeros!");
// d.txtfone1.focus();
// return false;
//}

//validar telefone(verificacao se contem apenas numeros)
// if (isNaN(d.txtfone2.value)){
// alert ("O campo .:TELEFONE 2:. deve conter apenas numeros!");
// d.txtfone2.focus();
// return false;
// }

//validar email(verificao de endereco eletrônico)
parte1 = d.txtemail.value.indexOf("@");
parte2 = d.txtemail.value.indexOf(".");
parte3 = d.txtemail.value.length;
if (!(parte1 >= 3 && parte2 >= 6 && parte3 >= 9)) {
alert ("O campo .:E-MAIL:. deve conter um endereco eletronico!");
d.txtemail.focus();
return false;
}
//validar data de nascimento
erro=0;
hoje = new Date();
anoAtual = hoje.getFullYear();
barras = d.txtdata.value.split("/");
if (barras.length == 3){
dia = barras[0];
mes = barras[1];
ano = barras[2];
resultado = (!isNaN(dia) && (dia > 0) && (dia < 32)) && (!isNaN(mes) && (mes > 0) && (mes < 13)) && (!isNaN(ano) && (ano.length == 4) && (ano <= anoAtual && ano >= 1900));
if (!resultado) {
alert("Formato de data invalido!");
d.txtdata.focus();
return false;
}
} else {
alert("Formato de data invalido!");
d.txtdata.focus();
return false;
}

return true;
}

//FIM DA CLIENTESF, VALIDA FORMULARIO 01
//BUG, VALIDA CLIENTESF 02
function bug() {

var men = alert("cadastro confirmado !")

}

//FIM DA BUG CLIENTESF 02
//BOTÃO SAIR CLIENTESF 03
function fsair() {

var con = confirm("CLICK EM (OK) PARA SAIR !")
if (con){

window.location = "sistema.php";

}
else
{

alert("DESEJA CONTINUAR NO SIFAC TRABALHANDO ?")


}
}
//FIM BOTÃO SAIR CLIENTESF 03

//FUNÇÃO VALIDA AS DATAS 04
var tecla;
function valida(campo,event)
{
if (tecla != 9 && tecla != 8)
{
if(frmclientesf.txtdata.value.length==2)
frmclientesf.txtdata.value+="/";
if(frmclientesf.txtdata.value.length==5)
frmclientesf.txtdata.value+="/";

if(frmclientesf.txtdatacadastro.value.length==2)
frmclientesf.txtdatacadastro.value+="/";
if(frmclientesf.txtdatacadastro.value.length==5)
frmclientesf.txtdatacadastro.value+="/";
}
}
//FIM DA FUNÇÃO VALIDA AS DATAS 04
// Rollover dos menus
function mOvr(src,clrOver) {
if (!src.contains(event.fromElement)) {
src.style.cursor = 'hand';
src.bgColor = clrOver;
}
}
function mOut(src,clrIn) {
if (!src.contains(event.toElement)) {
src.style.cursor = 'default';
src.bgColor = clrIn;
}
}
function mClk(src) { if(event.srcElement.tagName=='TD'){
src.children.tags('A')[0].click();
}
}

function doPrint(theForm) {
var i;
for(i=0; i<theForm.elements.length ; i++) {
// Agregar en esta lista de condiciones
// todos aquellos tipos de Input que se quieren ocultar
if( (theForm.elements[i].type == "submit") ||
(theForm.elements[i].type == "reset") ||
(theForm.elements[i].type == "button") )
theForm.elements[i].style.visibility = 'hidden';
}
window.print();

for(i=0; i<theForm.elements.length ; i++) {
if( (theForm.elements[i].type == "submit") ||
(theForm.elements[i].type == "reset") ||
(theForm.elements[i].type == "button") )
theForm.elements[i].style.visibility = 'visible';
}
}
/***************************************

* Função reload do menu

* kafkapvh@hotmail.com

**************************************

*/

function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}

/***************************************

* Função reload do menu MASCARAS

* kafkapvh@hotmail.com

**************************************

*/

function mascara(o,f){
v_obj=o
v_fun=f
setTimeout("execmascara()",1)
}

function execmascara(){
v_obj.value=v_fun(v_obj.value)
}

function leech(v){
v=v.replace(/o/gi,"0")
v=v.replace(/i/gi,"1")
v=v.replace(/z/gi,"2")
v=v.replace(/e/gi,"3")
v=v.replace(/a/gi,"4")
v=v.replace(/s/gi,"5")
v=v.replace(/t/gi,"7")
return v
}

function soNumeros(v){
return v.replace(/\D/g,"")
}

function telefone(v){
v=v.replace(/\D/g,"") //Remove tudo o que não é dígito
v=v.replace(/^(\d\d)(\d)/g,"($1) $2") //Coloca parênteses em volta dos dois primeiros dígitos
v=v.replace(/(\d{4})(\d)/,"$1-$2") //Coloca hífen entre o quarto e o quinto dígitos
return v
}

function cpf(v){
v=v.replace(/\D/g,"") //Remove tudo o que não é dígito
v=v.replace(/(\d{3})(\d)/,"$1.$2") //Coloca um ponto entre o terceiro e o quarto dígitos
v=v.replace(/(\d{3})(\d)/,"$1.$2") //Coloca um ponto entre o terceiro e o quarto dígitos
//de novo (para o segundo bloco de números)
v=v.replace(/(\d{3})(\d{1,2})$/,"$1-$2") //Coloca um hífen entre o terceiro e o quarto dígitos
return v
}

function cep(v){
v=v.replace(/\D/g,"") //Remove tudo o que não é dígito
v=v.replace(/(\d{5})(\d)/,"$1-$2") //Esse é tão fácil que não merece explicações
return v
}

function cnpj(v){
v=v.replace(/\D/g,"") //Remove tudo o que não é dígito
v=v.replace(/^(\d{2})(\d)/,"$1.$2") //Coloca ponto entre o segundo e o terceiro dígitos
v=v.replace(/^(\d{2})\.(\d{3})(\d)/,"$1.$2.$3") //Coloca ponto entre o quinto e o sexto dígitos
v=v.replace(/\.(\d{3})(\d)/,".$1/$2") //Coloca uma barra entre o oitavo e o nono dígitos
v=v.replace(/(\d{4})(\d)/,"$1-$2") //Coloca um hífen depois do bloco de quatro dígitos
return v
}

function romanos(v){
v=v.toUpperCase() //Maiúsculas
v=v.replace(/[^IVXLCDM]/g,"") //Remove tudo o que não for I, V, X, L, C, D ou M
//Essa é complicada! Copiei daqui: http://www.diveintopython.org/refactoring/refactoring.html
while(v.replace(/^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/,"")!="")
v=v.replace(/.$/,"")
return v
}

function site(v){
//Esse sem comentarios para que você entenda sozinho ;-)
v=v.replace(/^http:\/\/?/,"")
dominio=v
caminho=""
if(v.indexOf("/")>-1)
dominio=v.split("/")[0]
caminho=v.replace(/[^\/]*/,"")
dominio=dominio.replace(/[^\w\.\+-:@]/g,"")
caminho=caminho.replace(/[^\w\d\+-@:\?&=%\(\)\.]/g,"")
caminho=caminho.replace(/([\?&])=/,"$1")
if(caminho!="")dominio=dominio.replace(/\.+$/,"")
v="http://"+dominio+caminho
return v
}

function somente_txt(campo){
var digits="ABCDEFGHIJLMNOPQRSTUVXZWKYabcdefghijlmnopqrstuvxzkwy "
var campo_temp
for (var i=0;i<campo.value.length;i++){
campo_temp=campo.value.substring(i,i+1)
if (digits.indexOf(campo_temp)==-1){
campo.value = campo.value.substring(0,i);
break;
}
}
}

//*********************************** cnpj
function FormataCNPJ(Campo, teclapres){

if(window.event){
var tecla = teclapres.keyCode;
}else tecla = teclapres.which;

var vr = new String(Campo.value);
vr = vr.replace(".", "");
vr = vr.replace(".", "");
vr = vr.replace("/", "");
vr = vr.replace("-", "");

tam = vr.length + 1;


if (tecla != 9 && tecla != 8){
if (tam > 2 && tam < 6)
Campo.value = vr.substr(0, 2) + '.' + vr.substr(2, tam);
if (tam >= 6 && tam < 9)
Campo.value = vr.substr(0,2) + '.' + vr.substr(2,3) + '.' + vr.substr(5,tam-5);
if (tam >= 9 && tam < 13)
Campo.value = vr.substr(0,2) + '.' + vr.substr(2,3) + '.' + vr.substr(5,3) + '/' + vr.substr(8,tam-8);
if (tam >= 13 && tam < 15)
Campo.value = vr.substr(0,2) + '.' + vr.substr(2,3) + '.' + vr.substr(5,3) + '/' + vr.substr(8,4)+ '-' + vr.substr(12,tam-12);
}
}
//************************ fim cnpj


9. geral.css

Jose RF Junior
JuniorOsho

(usa Debian)

Enviado em 11/05/2007 - 21:53h

/* CSS Document */

* {

padding: 0;

margin: 0;

list-style: none;

text-decoration: none;

font-family: "Trechebut MS", Arial, Helvetica, sans-serif;

}

body {

text-align: center;

margin: 0 auto;

}

#tudo {

width: 770px;

text-align: left;

margin: 0 auto;

padding: 30px 0;

}

#cadastroTab { border: 1px solid #CCC; padding: 1px; }

#cadastroTab tr { height: 25px; }

#cadastroTab tr th {

font-size: 12px;

text-align: right;

padding-right: 3px;

background: #EEE;

border-left: 1px solid #FFF;

border-top: 1px solid #FFF;

border-right: 1px solid #E5E5E5;

border-bottom: 1px solid #E5E5E5;

}

#cadastroTab tr td {

font-size: 10px;

text-align: left;

padding-left: 2px;

border-left: 1px solid #FFF;

border-top: 1px solid #FFF;

border-right: 1px solid #E5E5E5;

border-bottom: 1px solid #E5E5E5;

background: #FCFCFC;

}

.campos {

border: 1px solid #999;

font-size: 12px;

padding: 3px;

}

.botao {

font-size: 12px;

background: #FFFFFF;

border: 1px solid #555;

}

#msg {

padding: 20px;

height: 30px;

width: 300px;

margin: 0 auto;

text-align: center;

font-size: 12px;

}

#tabelaLista {

font-size: 12px;

border-top: 1px solid #E5E5E5;

border-left: 1px solid #E5E5E5;

}

#tabelaLista tr th {

padding: 3px 5px;

background: #F1F1F1;

border-left: 1px solid #FFF;

border-top: 1px solid #FFF;

border-right: 1px solid #E5E5E5;

border-bottom: 1px solid #E5E5E5;

}

#tabelaLista tr td {

padding: 3px 5px;

background: #F9F9F9;

border-left: 1px solid #FFF;

border-top: 1px solid #FFF;

border-right: 1px solid #E5E5E5;

border-bottom: 1px solid #E5E5E5;

}

.center {

text-align: center;

}

.nobord {

border: none;

}

#logout {

text-align: right;

padding: 5px;

}

#logout a {

font-size: 12px;

color: #666666;

padding: 2px 3px;

border: 1px solid #CCC;

}



#listaFotos {

display: none;

overflow: auto;

position: absolute;

top: 26%;

left: 56.5%;

width: 170px;

height: 200px;

border: 1px solid #000;

background: #FFFFFF

}



ul#listagem {

width: 100%;

background:#F1F1F1;

}



ul#listagem li {

border-left: 1px solid #FFF;

border-top: 1px solid #FFF;

border-right: 1px solid #E5E5E5;

border-bottom: 1px solid #E5E5E5;

}



ul#listagem li a:link, ul#listagem li a:visited {

display:block;

height:1%;

text-decoration:none;

font: 12px Arial, Helvetica, sans-serif;

color: #666;

border-left: 10px solid #CCC;

padding-left:5px;

}



ul#listagem li a:hover {

background: #FFFFFF;

border-left: 10px solid #E5E5E5;

}




10. frmenu.js

Jose RF Junior
JuniorOsho

(usa Debian)

Enviado em 11/05/2007 - 21:54h

/*



FREESTYLE MENUS v1.0 RC (c) 2001-2006 Angus Turnbull, http://www.twinhelix.com

Altering this notice or redistributing this file is prohibited.



*/



var isDOM=document.getElementById?1:0,isIE=document.all?1:0,isNS4=navigator.appName=='Netscape'&&!isDOM?1:0,isOp=self.opera?1:0,isDyn=isDOM||isIE||isNS4;function getRef(i,p){p=!p?document:p.navigator?p.document:p;return isIE?p.all[i]:isDOM?(p.getElementById?p:p.ownerDocument).getElementById(i):isNS4?p.layers[i]:null};function getSty(i,p){var r=getRef(i,p);return r?isNS4?r:r.style:null};if(!self.LayerObj)var LayerObj=new Function('i','p','this.ref=getRef(i,p);this.sty=getSty(i,p);return this');function getLyr(i,p){return new LayerObj(i,p)};function LyrFn(n,f){LayerObj.prototype[n]=new Function('var a=arguments,p=a[0],px=isNS4||isOp?0:"px";with(this){'+f+'}')};LyrFn('x','if(!isNaN(p))sty.left=p+px;else return parseInt(sty.left)');LyrFn('y','if(!isNaN(p))sty.top=p+px;else return parseInt(sty.top)');if(typeof addEvent!='function'){var addEvent=function(o,t,f,l){var d='addEventListener',n='on'+t,rO=o,rT=t,rF=f,rL=l;if(o[d]&&!l)return o[d](t,f,false);if(!o._evts)o._evts={};if(!o._evts[t]){o._evts[t]=o[n]?{b:o[n]}:{};o[n]=new Function('e','var r=true,o=this,a=o._evts["'+t+'"],i;for(i in a){o._f=a[i];r=o._f(e||window.event)!=false&&r;o._f=null}return r');if(t!='unload')addEvent(window,'unload',function(){removeEvent(rO,rT,rF,rL)})}if(!f._i)f._i=addEvent._i++;o._evts[t][f._i]=f};addEvent._i=1;var removeEvent=function(o,t,f,l){var d='removeEventListener';if(o[d]&&!l)return o[d](t,f,false);if(o._evts&&o._evts[t]&&f._i)delete o._evts[t][f._i]}}function FSMenu(myName,nested,cssProp,cssVis,cssHid){this.myName=myName;this.nested=nested;this.cssProp=cssProp;this.cssVis=cssVis;this.cssHid=cssHid;this.cssLitClass='highlighted';this.menus={root:new FSMenuNode('root',true,this)};this.menuToShow=[];this.mtsTimer=null;this.showDelay=0;this.switchDelay=125;this.hideDelay=500;this.showOnClick=0;this.hideOnClick=true;this.animInSpeed=0.2;this.animOutSpeed=0.2;this.animations=[]};FSMenu.prototype.show=function(mN){with(this){menuToShow.length=arguments.length;for(var i=0;i<arguments.length;i++)menuToShow[i]=arguments[i];clearTimeout(mtsTimer);if(!nested)mtsTimer=setTimeout(myName+'.menus.root.over()',10)}};FSMenu.prototype.hide=function(mN){with(this){clearTimeout(mtsTimer);if(menus[mN])menus[mN].out()}};FSMenu.prototype.hideAll=function(){with(this){for(var m in menus)if(menus[m].visible&&!menus[m].isRoot)menus[m].hide(true)}};function FSMenuNode(id,isRoot,obj){this.id=id;this.isRoot=isRoot;this.obj=obj;this.lyr=this.child=this.par=this.timer=this.visible=null;this.args=[];var node=this;this.over=function(evt){with(node)with(obj){if(isNS4&&evt&&lyr.ref)lyr.ref.routeEvent(evt);clearTimeout(timer);clearTimeout(mtsTimer);if(!isRoot&&!visible)node.show();if(menuToShow.length){var a=menuToShow,m=a[0];if(!menus[m]||!menus[m].lyr.ref)menus[m]=new FSMenuNode(m,false,obj);var c=menus[m];if(c==node){menuToShow.length=0;return}clearTimeout(c.timer);if(c!=child&&c.lyr.ref){c.args.length=a.length;for(var i=0;i<a.length;i++)c.args[i]=a[i];var delay=child?switchDelay:showDelay;c.timer=setTimeout('with('+myName+'){menus["'+c.id+'"].par=menus["'+node.id+'"];menus["'+c.id+'"].show()}',delay?delay:1)}menuToShow.length=0}if(!nested&&par)par.over()}};this.out=function(evt){with(node)with(obj){if(isNS4&&evt&&lyr&&lyr.ref)lyr.ref.routeEvent(evt);clearTimeout(timer);if(!isRoot&&hideDelay>=0){timer=setTimeout(myName+'.menus["'+id+'"].hide()',hideDelay);if(!nested&&par)par.out()}}};if(this.id!='root')with(this)with(lyr=getLyr(id))if(ref){if(isNS4)ref.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT);addEvent(ref,'mouseover',this.over);addEvent(ref,'mouseout',this.out);if(obj.nested){addEvent(ref,'focus',this.over);addEvent(ref,'click',this.over);addEvent(ref,'blur',this.out)}}};FSMenuNode.prototype.show=function(forced){with(this)with(obj){if(!lyr||!lyr.ref)return;if(par){if(par.child&&par.child!=this)par.child.hide();par.child=this}var offR=args[1],offX=args[2],offY=args[3],lX=0,lY=0,doX=''+offX!='undefined',doY=''+offY!='undefined';if(self.page&&offR&&(doX||doY)){with(page.elmPos(offR,par.lyr?par.lyr.ref:0))lX=x,lY=y;if(doX)lyr.x(lX+eval(offX));if(doY)lyr.y(lY+eval(offY))}if(offR)lightParent(offR,1);visible=1;if(obj.onshow)obj.onshow(id);lyr.ref.parentNode.style.zIndex='2';setVis(1,forced)}};FSMenuNode.prototype.hide=function(forced){with(this)with(obj){if(!lyr||!lyr.ref||!visible)return;if(isNS4&&self.isMouseIn&&isMouseIn(lyr.ref))return show();if(args[1])lightParent(args[1],0);if(child)child.hide();if(par&&par.child==this)par.child=null;if(lyr){visible=0;if(obj.onhide)obj.onhide(id);lyr.ref.parentNode.style.zIndex='1';setVis(0,forced)}}};FSMenuNode.prototype.lightParent=function(elm,lit){with(this)with(obj){if(!cssLitClass||isNS4)return;if(lit)elm.className+=(elm.className?' ':'')+cssLitClass;else elm.className=elm.className.replace(new RegExp('(\\s*'+cssLitClass+')+$'),'')}};FSMenuNode.prototype.setVis=function(sh,forced){with(this)with(obj){if(lyr.forced&&!forced)return;lyr.forced=forced;lyr.timer=lyr.timer||0;lyr.counter=lyr.counter||0;with(lyr){clearTimeout(timer);if(sh&&!counter)sty[cssProp]=cssVis;var speed=sh?animInSpeed:animOutSpeed;if(isDOM&&speed<1)for(var a=0;a<animations.length;a++)animations[a](ref,counter,sh);counter+=speed*(sh?1:-1);if(counter>1){counter=1;lyr.forced=false}else if(counter<0){counter=0;sty[cssProp]=cssHid;lyr.forced=false}else if(isDOM){timer=setTimeout(myName+'.menus["'+id+'"].setVis('+sh+','+forced+')',50)}}}};FSMenu.animSwipeDown=function(ref,counter,show){if(show&&(counter==0)){ref._fsm_styT=ref.style.top;ref._fsm_styMT=ref.style.marginTop;ref._fsm_offT=ref.offsetTop||0}var cP=Math.pow(Math.sin(Math.PI*counter/2),0.75);var clipY=ref.offsetHeight*(1-cP);ref.style.clip=(counter==1?((window.opera||navigator.userAgent.indexOf('KHTML')>-1)?'':'rect(auto,auto,auto,auto)'):'rect('+clipY+'px,'+ref.offsetWidth+'px,'+ref.offsetHeight+'px,0)');if(counter==1||(counter<0.01&&!show)){ref.style.top=ref._fsm_styT;ref.style.marginTop=ref._fsm_styMT}else{ref.style.top=((0-clipY)+(ref._fsm_offT))+'px';ref.style.marginTop='0'}};FSMenu.animFade=function(ref,counter,show){var done=(counter==1);if(ref.filters){var alpha=!done?' alpha(opacity='+parseInt(counter*100)+')':'';if(ref.style.filter.indexOf("alpha")==-1)ref.style.filter+=alpha;else ref.style.filter=ref.style.filter.replace(/\s*alpha\([^\)]*\)/i,alpha)}else ref.style.opacity=ref.style.MozOpacity=counter/1.001};FSMenu.animClipDown=function(ref,counter,show){var cP=Math.pow(Math.sin(Math.PI*counter/2),0.75);ref.style.clip=(counter==1?((window.opera||navigator.userAgent.indexOf('KHTML')>-1)?'':'rect(auto,auto,auto,auto)'):'rect(0,'+ref.offsetWidth+'px,'+(ref.offsetHeight*cP)+'px,0)')};FSMenu.prototype.activateMenu=function(id,subInd){with(this){if(!isDOM||!document.documentElement)return;var fsmFB=getRef('fsmenu-fallback');if(fsmFB){fsmFB.rel='alternate stylesheet';fsmFB.disabled=true}var a,ul,li,parUL,mRoot=getRef(id),nodes,count=1;var lists=mRoot.getElementsByTagName('ul');for(var i=0;i<lists.length;i++){li=ul=lists[i];while(li){if(li.nodeName.toLowerCase()=='li')break;li=li.parentNode}if(!li)continue;parUL=li;while(parUL){if(parUL.nodeName.toLowerCase()=='ul')break;parUL=parUL.parentNode}a=null;for(var j=0;j<li.childNodes.length;j++)if(li.childNodes[j].nodeName.toLowerCase()=='a')a=li.childNodes[j];if(!a)continue;var menuID=myName+'-id-'+count++;if(ul.id)menuID=ul.id;else ul.setAttribute('id',menuID);var sOC=(showOnClick==1&&li.parentNode==mRoot)||(showOnClick==2);var evtProp=navigator.userAgent.indexOf('Safari')>-1||isOp?'safRtnVal':'returnValue';var eShow=new Function('with('+myName+'){var m=menus["'+menuID+'"],pM=menus["'+parUL.id+'"];'+(sOC?'if((pM&&pM.child)||(m&&m.visible))':'')+' show("'+menuID+'",this)}');var eHide=new Function('e','if(e.'+evtProp+'!=false)'+myName+'.hide("'+menuID+'")');addEvent(a,'mouseover',eShow);addEvent(a,'focus',eShow);addEvent(a,'mouseout',eHide);addEvent(a,'blur',eHide);if(sOC)addEvent(a,'click',new Function('e',myName+'.show("'+menuID+'",this);if(e.cancelable&&e.preventDefault)e.preventDefault();e.'+evtProp+'=false;return false'));if(subInd)a.insertBefore(subInd.cloneNode(true),a.firstChild)}if(isIE&&!isOp){var aNodes=mRoot.getElementsByTagName('a');for(var i=0;i<aNodes.length;i++){addEvent(aNodes[i],'focus',new Function('e','var node=this.parentNode;while(node){if(node.onfocus)node.onfocus(e);node=node.parentNode}'));addEvent(aNodes[i],'blur',new Function('e','var node=this.parentNode;while(node){if(node.onblur)node.onblur(e);node=node.parentNode}'))}}if(hideOnClick)addEvent(mRoot,'click',new Function(myName+'.hideAll()'));menus[id]=new FSMenuNode(id,true,this)}};var page={win:self,minW:0,minH:0,MS:isIE&&!isOp,db:document.compatMode&&document.compatMode.indexOf('CSS')>-1?'documentElement':'body'};page.elmPos=function(e,p){var x=0,y=0,w=p?p:this.win;e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}if(e&&this.MS&&navigator.platform.indexOf('Mac')>-1&&e.tagName=='A'){e.onfocus=new Function('with(event){self.tmpX=clientX-offsetX;self.tmpY=clientY-offsetY}');e.focus();x=tmpX;y=tmpY;e.blur()}else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}return{x:x,y:y}};if(isNS4){var fsmMouseX,fsmMouseY,fsmOR=self.onresize,nsWinW=innerWidth,nsWinH=innerHeight;document.fsmMM=document.onmousemove;self.onresize=function(){if(fsmOR)fsmOR();if(nsWinW!=innerWidth||nsWinH!=innerHeight)location.reload()};document.captureEvents(Event.MOUSEMOVE);document.onmousemove=function(e){fsmMouseX=e.pageX;fsmMouseY=e.pageY;return document.fsmMM?document.fsmMM(e):document.routeEvent(e)};function isMouseIn(sty){with(sty)return((fsmMouseX>left)&&(fsmMouseX<left+clip.width)&&(fsmMouseY>top)&&(fsmMouseY<top+clip.height))}}






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts