<?php require "../includes/verifica_logado_safpostal.inc.php"; require '../includes/classQuery_sistecart.php'; require "../includes/funcoes.php"; require "../includes/global.inc.php"; $permissao = verifica_permissao('EXPANSAO', $safpostal_departamento_saf); if ($permissao == 'FALSE' or $safpostal_id_empresa != '1') { echo '<br><br><strong>Você não tem permissão para acessar essa página</strong>'; exit; } pt_register('GET', 'id'); $dt = new ListaInteressadosDAO(); $dt1 = new StatusDAO(); $c = new stdClass(); $e = $dt->buscaFichaCadastros($id); if (count($e) > 0) { foreach ($e as $cp => $valor) { $c->{$cp} = $valor; } } $e = $dt->buscaCadastroAdicionais($id); if (count($e) > 0) { foreach ($e as $cp => $valor) { $c->{$cp} = $valor; } } $e = $dt->buscaConjuge($id); if (count($e) > 0) { foreach ($e as $cp => $valor) { $c->{$cp} = $valor;
function EmailFichaHTML($id, $safpostal_fantasia) { $ficha = new ListaInteressadosDAO(); $a = $ficha->buscaCadastroAdicionais($id); $e = $ficha->buscaEndereco2($id); $f = $ficha->buscaFichaCadastros($id); $fantasia = utf8_encode($safpostal_fantasia); $nome = $f->nome == '' ? ' ' : utf8_encode(strtoupper($f->nome)); $rg = $f->rg == '' ? ' ' : utf8_encode(strtoupper($f->rg)); $cpf = $f->cpf == '' ? ' ' : utf8_encode(strtoupper($f->cpf)); $email = $f->email == '' ? ' ' : utf8_encode(strtolower($f->email)); $nascimento = $f->nascimento == '' ? ' ' : $f->nascimento; $tel_res = $f->tel_res == '' ? ' ' : utf8_encode(strtoupper($f->tel_res)); $tel_rec = $f->tel_rec == '' ? ' ' : utf8_encode(strtoupper($f->tel_rec)); $tel_cel = $f->tel_cel == '' ? ' ' : utf8_encode(strtoupper($f->tel_cel)); $nacionalidade = $a->nacionalidade == '' ? ' ' : utf8_encode(strtoupper($a->nacionalidade)); $nascimento = $a->local_nascimento == '' ? '-' : utf8_encode(strtoupper($a->local_nascimento)); $estado_civil = $f->estado_civil == '' ? ' ' : utf8_encode(strtoupper($f->estado_civil)); $filhos = $f->filhos == '' ? ' ' : utf8_encode(strtoupper($f->filhos)); $quant = $f->quant == '' ? ' ' : utf8_encode(strtoupper($f->quant)); $regime = $a->regime == '' ? ' ' : utf8_encode(strtoupper($a->regime)); $casamento = $a->data_casamento == '' ? ' ' : utf8_encode(strtoupper($a->data_casamento)); $pai = $a->nome_pai == '' ? ' ' : utf8_encode(strtoupper($a->nome_pai)); $mae = $a->nome_mae == '' ? ' ' : utf8_encode(strtoupper($a->nome_mae)); $endereco = $f->endereco == '' ? '-' : utf8_encode(strtoupper($f->endereco)); $numero = $f->numero == '' ? '-' : utf8_encode(strtoupper($f->numero)); $complemento = $f->complemento == '' ? '-' : utf8_encode(strtoupper($f->complemento)); $bairro = $teste = $e->bairro == '' ? '-' : utf8_encode(strtoupper($e->bairro)); $estado = $f->estado == '' ? '-' : utf8_encode(strtoupper($f->estado)); $cidade = $f->cidade == '' ? '-' : utf8_encode(strtoupper($f->cidade)); $cep = $f->cep == '' ? '-' : utf8_encode(strtoupper($f->cep)); switch ($a->tip_imovel) { case 0: $tip_imovel = ' '; break; case 1: $tip_imovel = 'Pr�prio'; break; case 2: $tip_imovel = 'Alugada'; break; case 3: $tip_imovel = 'Familiares'; break; } $reside_praca = $a->reside_praca == '' ? '-' : utf8_encode(strtoupper($a->reside_praca)); $endereco2 = $e->endereco == '' ? '-' : utf8_encode(strtoupper($e->endereco)); $numero2 = $e->numero == '' ? '-' : utf8_encode(strtoupper($e->numero)); $complemento2 = $e->complemento == '' ? '-' : utf8_encode(strtoupper($e->complemento)); $estado2 = $e->estado == '' ? '-' : utf8_encode(strtoupper($e->estado)); $cidade2 = $e->cidade == '' ? '-' : utf8_encode(strtoupper($e->cidade)); $cep2 = $e->cep == '' ? '-' : utf8_encode(strtoupper($e->cep)); $html = ' <!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="text/html; charset=utf-8" /> <title>SAF Postal</title> <style type="text/css"> <!-- body,td,th { font-family: Verdana; font-size: 11px; color: #333333; } body { margin:15px; } hr { margin:0; padding:0; width:600px; background-color:#0071B6; height:3px; border:none; float:left; } .topo1 { float:left; width:25%; text-align:left; } .topo2 { float:right; width:75%; text-align:right; } .id { font-size:16px; font-weight:bold; float:left; color:#0071B6; width:600px; } .estrutura { border:solid 1px #0071B6; float:left; width:600px; margin-bottom:15px; padding-bottom:15px; } .titulo { background-color:#95D8FF; border-bottom:solid 2px #0071B6; float:left; width:600px; } .titulo p { margin:3px; padding:3px; font-weight:bold; } .subtitulo { background-color:#FFE391; border-bottom:solid 1px #AE8300; float:left; width:600px; } .subtitulo2 { border-top:solid 1px #AE8300; } .subtitulo p { margin:3px; padding:3px; } .corpo { width:600px; margin-bottom:8px; padding-bottom:8px; float:left; } .corpo p { float:left; margin:0; padding:0; margin-left:10px; margin-top:5px; padding-left:10px; padding-top:5px; } --> </style> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> <td width="600"> <p class="topo1">Novos Interessados</p> <p class="topo2">Franquia: ' . $fantasia . '</p> <hr /> <p class="id">#ID Ficha: ' . $id . '</p> <p style="width:100%;"><span style="color:#FF0000;">Aten��o, voc� deve solicitar os seguintes documentos, junto ao cliente:</span><br /> - C�pias de documentos (RG e CPF);<br /> - Comprovante de endere�o (C.N ou C.C); e<br /> - Bens (Matr�cula do im�vel)</p> <div class="estrutura"> <div class="titulo"><p>Dados do Solicitante</p></div> <div class="subtitulo"><p>- Dados Pessoais</p></div> <div class="corpo"> <p style="width:325px;"><strong>Nome:</strong><br />' . $nome . ' </p> <p style="width:100px;"><strong>RG:</strong><br />' . $rg . ' </p> <p style="width:100px;"><strong>CPF:</strong><br />' . $cpf . ' </p> <p style="width:325px;"><strong>E-mail:</strong><br />' . $email . ' </p> <p style="width:200px;"><strong>Data de Nascimento:</strong><br />' . $nascimento . ' </p> <p style="width:175px;"><strong>Residencial:</strong><br />' . $tel_res . ' </p> <p style="width:175px;"><strong>Recado:</strong><br />' . $tel_rec . ' </p> <p style="width:175px;"><strong>Celular:</strong><br />' . $tel_cel . ' </p> <p style="width:100px;"><strong>Nacionalidade:</strong><br />' . $nacionalidade . ' </p> <p style="width:145px;"><strong>Local de Nascimento:</strong><br />' . $nascimento . ' </p> <p style="width:80px;"><strong>Estado Civil:</strong><br />' . $estado_civil . ' </p> <p style="width:95px;"><strong>Possui Filhos?</strong><br />' . $filhos . ' </p> <p style="width:80px;"><strong>Quantos?</strong><br />' . $quant . ' </p> <p style="width:262px;"><strong>Regime de Casamento:</strong><br />' . $regime . ' </p> <p style="width:262px;"><strong>Data do Casamento:</strong><br />' . $casamento . ' </p> <p style="width:262px;"><strong>Nome do nome pai:</strong><br />' . $pai . ' </p> <p style="width:262px;"><strong>Nome da M�e:</strong><br />' . $mae . ' </p> </div> <div class="subtitulo subtitulo2"><p>- Endere�o Atual do Solicitante</p></div> <div class="corpo"> <p style="width:262px;"><strong>Endere�o:</strong><br />' . $endereco . ' </p> <p style="width:43px;"><strong>N�:</strong><br />' . $numero . ' </p> <p style="width:150px;"><strong>Complemento:</strong><br />' . $complemento . ' </p> <p style="width:180px;"><strong>Bairro:</strong><br />' . $bairro . ' </p> <p style="width:40px;"><strong>Estado:</strong><br />' . $estado . ' </p> <p style="width:200px;"><strong>Cidade:</strong><br />' . $cidade . ' </p> <p style="width:60px;"><strong>CEP:</strong><br />' . $cep . ' </p> <p style="width:262px;"><strong>Tipo do Im�vel:</strong><br />' . strtoupper($tip_imovel) . ' </p> <p style="width:262px;"><strong>Reside na Pra�a Desde:</strong><br />' . $reside_praca . ' </p> </div> <div class="subtitulo subtitulo2"><p>- Endere�o Anterior do Solicitante</p></div> <div class="corpo"> <p style="width:262px;"><strong>Endere�o:</strong><br />' . $endereco2 . ' </p> <p style="width:43px;"><strong>N�:</strong><br />' . $numero2 . ' </p> <p style="width:150px;"><strong>Complemento:</strong><br />' . $complemento2 . ' </p> <p style="width:180px;"><strong>Bairro:</strong><br />' . $bairro . ' </p> <p style="width:40px;"><strong>Estado:</strong><br />' . $estado2 . ' </p> <p style="width:200px;"><strong>Cidade:</strong><br />' . $cidade2 . ' </p> <p style="width:60px;"><strong>CEP:</strong><br />' . $cep2 . ' </p> </div> </div> </td> <td> </td> </tr> </table> </body> </html>'; return $html; }