[Start Page]
[ES] [MG] [RJ] [RS] [SP] [?]
[Abstract]
[Links] [E-mail]
[Photo 01]

'; function Conecta() { $GLOBALS['Conn'] = mysql_pconnect($GLOBALS['Host'], $GLOBALS['User'], $GLOBALS['Pass']) or die(mysql_error()); } function SelectDataBase( $table ) { // mysql_select_db( $table, $GLOBALS['Conn'] ) or die(mysql_error()); mysql_select_db( $table ) or die(mysql_error()); } function Autentica() { if ( isset($_POST['usuario']) && isset($_POST['senha']) && $_POST['usuario'] != '' && $_POST['senha'] != '') { // $usuario = addslashes( strip_tags( $_POST['usuario'] ) ); $senha = addslashes( strip_tags( $_POST['senha'] ) ); // $tabela = $GLOBALS['auth_tabl']; $campo1 = $GLOBALS['auth_user']; $campo2 = $GLOBALS['auth_pass']; // mysql_select_db($GLOBALS['base'], $GLOBALS['Conn']) or die(mysql_error()); $sql_user = "select $campo1 from $tabela where Password($campo1) = Password('$usuario') and Password($campo2)=Password('$senha')"; $res_user=mysql_query($sql_user) or die(mysql_error()); $tot_user=mysql_num_rows($res_user); if ($tot_user > 0) { $_SESSION['user'] = $_POST['usuario']; $_SESSION['session'] = $GLOBALS['authentic'] . session_id(); $_SESSION['login'] = '1'; } else { $_SESSION['login'] = '2'; } } else { $_SESSION['login'] = '4'; } } function Verifica() { $num_id = $GLOBALS['authentic'] . session_id(); // if ( ($num_id != $_SESSION['session']) || ($_SESSION['login'] != 1)) { $_SESSION['login'] = (isset($_SESSION['login'])) ? '2' : '4'; echo(""); } } function Logoff() { session_unset(); session_destroy(); header("Location: index.php"); } function RtnSQL( $cmd, $table, $fields, $values, $cond, $ord ) { switch ($cmd) { case 'select': for( $i=0; $iAlteraValor( '$page' );"; } function PrintListHTML($tit, $tb, $tot, $qry, $goback, $col) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; for( $i=0; $i".$tb[$i][0]."\n"; } echo ""; if ($tot > 0) { while ($row=mysql_fetch_assoc($qry)) { $cor = ($cor == $GLOBALS['TbBgc2']) ? $GLOBALS['TbBgc1'] : $GLOBALS['TbBgc2']; echo " \n"; for($i=0; $i" . $x . "\n"; } else { for($idx=0; $idx".$valorX."\n"; } } echo "\n"; } } else { echo "\n"; } echo "\n"; echo "
$tit
Incluir  Imprimir

Não existem existros cadastrados...
 
 
\n"; } function PrintEditHTML($tit, $tb, $fields, $id, $btn) { $Mask = $GLOBALS['mMascara']; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; for( $i=0; $i\n"; echo "\n"; break; case 'blob': echo "\n"; break; default : echo "\n"; break; } } } echo "\n"; echo "\n"; echo "\n"; echo "
$tit
 
".$tb[$i][0].""; if (isset($tb[$i][4])) { Combo( $tb[$i][1], $tb[$i][4], $fields[$tb[$i][1]] ); } else { SelectDataBase( $GLOBALS['base'] ); $Mask = ( isset($Mask[ $tb[$i][1] ]) ) ? ' onKeyPress="mascara(this,'.$Mask[$tb[$i][1]].')"' : ''; $sqlX = 'select '. $tb[$i][1] .' from '. $GLOBALS['tbLocal']; $qryX = mysql_query($sqlX) or die(mysql_error()); $valX = strip_tags( $fields[$tb[$i][1]] ); $typX = mysql_field_type($qryX, 0); // switch ($typX) { case 'date': echo "

\n"; for( $i=0; $i\n"; } echo "
 
Voltar
\n"; echo ""; } function PrintMsgHTML($tit, $msg, $gopage, $img='') { echo "\n"; echo "\n"; if ($img != '') { echo "\n"; } else { echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "
$tit
 
$msg
 
« Voltar »
\n"; } function PrintConfHTML($msg, $btn1, $btn2) { echo "\n"; echo "\n"; echo ""; echo "
$msg
  "; echo "
\n"; } function Combo( $name, $list, $sel, $read='') { $x = explode("#", $list); $y = explode(";", $x[0]); $x = explode(";", $x[1]); echo "\n"; } function ComboDB( $tb, $key, $value, $where='' ) { SelectDataBase( $GLOBALS['base'] ); $sql = RtnSQL( 'select', $tb, array($key, $value), "", $where, $value); $qry = mysql_query($sql) or die(mysql_error()); // $x = ''; $y = ''; while ( $row=mysql_fetch_assoc($qry) ) { $x .= $row[ $key ] . ";"; $y .= $row[ $value ] . ";"; } $rtn = substr($x,0,strlen($x)-1) . "#" . substr($y,0,strlen($y)-1); return $rtn; } function FindValueCombo( $value, $list ){ $x = explode("#", $list); $y = explode(";", $x[0]); $x = explode(";", $x[1]); // for( $i=0; $i 0 ) { $msg .= "Não posso excluir esse registro,
pois existem relacionamento a ele na tabela ".strtoupper($valid[$i][0]).".

"; $img = 'erro.gif'; break; } } } // if ($msg == '') { $sql = RtnSQL( $POST['op'], $tbLocal, array_keys($mCampos), array_values($mCampos), "$TbPKey=$id", ""); $qry = mysql_query($sql); if ($qry) { switch ($POST['op']) { case 'update': $msg="Atualização realizada com sucesso!!!"; break; case 'insert': $msg="Inclusão realizada com sucesso!!!"; break; case 'delete': $msg="Exclusão realizada com sucesso!!!"; break; } $img = 'check.gif'; } else { $msg = "Não foi possível realizar sua requisição !!!"; $img = 'erro.gif'; } } PrintMsgHTML($titulo, $msg, $POST['acao'], $img); } } } function SomarData($data, $dias, $meses, $ano) { $data = explode("/", $data); $newData = date("d/m/Y", mktime(0, 0, 0, $data[1] + $meses, $data[0] + $dias, $data[2] + $ano) ); return $newData; } function StrZero($txt,$num) { $rtn = ''; for ($i=0; $i<($num-strlen($txt)); $i++) { $rtn .='0'; } return $rtn.$txt; } function TiraAcento($txt) { $spec = "áéíóúçâêîôûçãéíõúçàèìòùçäëïöüçÁÉÍÓÚÇÂÊÎÔÛÇÃÉÍÕÚÇÀÈÌÒÙÇÄËÏÖÜÇ"; $char = "aeiouc"; for ($i=0; $i<(strlen($spec)-1); $i++) { $pos = ($i >= 6) ? ($i%6) : $i; $txt = str_replace( substr($spec,$i,1), substr($char,$pos,1), $txt); } return ucwords(strtolower($txt)); } ?>

"; while ( $row_fam = mysql_fetch_assoc( $qry_fam) ) { $cor = ($cor == '#EEEEEE') ? '#DDDDDD' : '#EEEEEE'; ?> 0 ) ? 'consulta' : 'pergunta'; } // switch ($op2) { case 'consulta': PrintTelaCadastro($row,' disabled'); break; case 'consultafamilia': $sql2 = "select * from imigrfam where codfam='$codf'"; $qry2 = mysql_query($sql2) or die(mysql_error()); $row2 = mysql_fetch_assoc( $qry2 ); PrintTelaFamilia($row2, $codf); break; } } ?>
FAMILY
Name of Family:
     
 
Person or family not found