| Server IP : 20.75.53.88 / Your IP : 216.73.217.72 [ Web Server : Apache System : Linux VMRALP-3 4.4.0-256-generic #290~14.04.1-Ubuntu SMP Thu Jun 20 09:24:50 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29+esm15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Domains : 3 Domains MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/juridico/chorozinho/modulos/pessoa/ |
Upload File : |
<?php
$id = $_GET['id'];
$idend = $_GET['idend'];
//$conn = conexao::getInstance();
//ENDERECO
$endp = $conn->query("select * from v_lista_pessoas_endereco where cod_pessoa=$id and codigo=$idend");
$ende = $endp->fetch(PDO::FETCH_OBJ);
$tipe = $conn->query("select * from tipo_enderecos");
$bair = $conn->query("select * from bairros");
$cida = $conn->query("select * from cidades");
?>
<script src="js/mascara.js" type="text/javascript"></script>
<form id="form2" name="form2" OnSubmit="showCarga()" method="post" action="?page=pessoa/endereco_crud&var=editar&idend=<?php echo $idend ?>">
<div class="panel panel-primary active" align="center"><span style="font-size:18px; color: #060606">Endereço</span></div>
<div id="action">
<input type="hidden" name="cod_pessoa" value="<?php echo $id ?>"/>
<div class='col-lg-2 col-md-2 col-sm-2 col-xs-6'>
Tipo
<select name="cod_tipo_end" class="form-control select2">
<?php while ($itipe = $tipe->fetch(PDO::FETCH_OBJ)) {
if ($ende->cod_tipo_end==$itipe->codigo) {
$selected = 'selected';
} else {
$selected = '';
} ?>
<option value="<?php echo $itipe->codigo ?>"<?php echo $selected; ?>><?php echo $itipe->tipo ?></option>
<?php } ?>
</select>
</div>
<div class='col-lg-2 col-md-3 col-sm-3 col-xs-6'>
Bairro
<select name="cod_bairro" class="form-control select2">
<?php while ($ibair = $bair->fetch(PDO::FETCH_OBJ)) {
if ($ende->cod_bairro==$ibair->codigo) {
$selected = 'selected';
} else {
$selected = '';
} ?>
<option value="<?php echo $ibair->codigo ?>"<?php echo $selected; ?>><?php echo $ibair->bairro ?></option>
<?php } ?>
</select>
</div>
<div class='col-lg-3 col-md-3 col-sm-3 col-xs-6'>
Cidade
<select name="cod_cidade" class="form-control select2">
<?php while ($icida = $cida->fetch(PDO::FETCH_OBJ)) {
if ($ende->cod_cidade==$icida->codigo) {
$selected = 'selected';
} else {
$selected = '';
} ?>
<option value="<?php echo $icida->codigo ?>"<?php echo $selected; ?>><?php echo $icida->cidade ?></option>
<?php } ?>
</select>
</div>
<div class='col-xs-6 col-sm-5 col-md-5 col-lg-5'>
<label for='endereco'>Endereço</label>
<input type='text' class='form-control upper' name='endereco' id='endereco' value="<?php echo $ende->endereco ?>"/></div>
<div class='col-xs-3 col-sm-2 col-md-2 col-lg-2'>
<label for='numero'>Número</label>
<input type='text' class='form-control' name='numero' id='numero' value="<?php echo $ende->numero ?>"/></div>
<div class='col-xs-3 col-sm-2 col-md-2 col-lg-2'>
<label for='complemento'>Complemento</label>
<input type='text' class='form-control upper' maxlength="15" name='complemento' id='complemento' value="<?php echo $ende->complemento ?>"/></div>
<div class='col-xs-3 col-sm-2 col-md-2 col-lg-2'>
<label for='cep'>CEP</label>
<input type='text' class='form-control' maxlength="9" onkeyup="formataCEP(this,event)" name='cep' id='cep' value="<?php echo $ende->cep ?>"/></div>
<div class='col-xs-3 col-sm-2 col-md-2 col-lg-2'>
<label for='principal'>Principal</label>
<?php if ($ende->principal==1){ ?>
<input type='checkbox' class='checkbox' checked name='principal' id='principal' value="1"/></div>
<?php }else{ ?>
<input type='checkbox' class='checkbox' name='principal' id='principal' value="1"/></div>
<?php } ?>
<div class='col-xs-3 col-sm-2 col-md-2 col-lg-2'>
<label for='bt_novo'> </label>
<br>
<button type="submit" name="bt_novo" class="btn btn-primary form-control"><i class="glyphicon glyphicon-ok"></i></button>
</div>
</div>
</form>