| 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/ |
Upload File : |
<script>
function box() {
// $('.dtabelas').DataTable({
// stateSave: true, "oLanguage": {
// "sProcessing": "Processando. Aguarde...",
// "sLengthMenu": "Mostrar _MENU_ registros",
// "sZeroRecords": "NENHUM REGISTRO ENCONTRADO!",
// "sInfo": "Mostrando _START_ até _END_ de _TOTAL_ registros",
// "sInfoEmpty": "Mostrando 0 até 0 de 0 registros",
// "sInfoFiltered": "(de _MAX_ registros no total)",
// "sInfoPostFix": "",
// "sSearch": "<i aling='center' class='fa fa-search' title='pesquisar registro'>",
// "sUrl": "",
// "oPaginate": {
// "sFirst": "<<",
// "sPrevious": "<i aling='center' class='fa fa-arrow-circle-left' title='registro anterior'></i>",
// "sNext": "<i aling='center' class='fa fa-arrow-circle-right' title='próximo registro'>",
// "sLast": ">>"
// }
// }
// });
$(".j40").colorbox({iframe: true, width: "40%", height: "43%"});
$(".j50").colorbox({iframe: true, width: "50%", height: "52%"});
$(".j60").colorbox({iframe: true, width: "60%", height: "72%"});
$(".j70").colorbox({iframe: true, width: "70%", height: "72%"});
$(".j80").colorbox({iframe: true, width: "85%", height: "80%"});
$(".j90").colorbox({iframe: true, width: "95%", height: "85%"});
$(".j00").colorbox({iframe: true, width: "100%", height: "100%"});
}
</script>
<?php
ini_set('display_errors', 1);
ini_set('display_startup_erros', 1);
error_reporting(E_ALL);
include("includes/conexao.php");
class ajax
{
public function acao($a)
{
switch ($a) {
case 'sel_comarca':
$this->sel_comarca($_GET['valor']);
break;
case 'sel_instancia':
$this->sel_instancia($_GET['valor']);
break;
case 'sel_bairro':
$this->sel_bairro($_GET['valor']);
break;
case 'sel_tipo_pessoa':
$this->sel_tipo_pessoa($_GET['valor']);
break;
case 'sel_endereco':
$this->sel_endereco($_GET['valor']);
break;
case 'sel_telefone':
$this->sel_telefone($_GET['valor']);
break;
case 'sel_contrato':
$this->sel_contrato($_GET['valor']);
break;
case 'sel_agenda':
$this->sel_agenda($_GET['valor']);
break;
case 'sel_fornecedor':
$this->sel_fornecedor($_GET['valor']);
break;
case 'sel_cliente':
$this->sel_cliente($_GET['valor']);
break;
case 'sel_polo_ativo':
$this->sel_polo_ativo($_GET['valor']);
break;
case 'sel_polo_passivo':
$this->sel_polo_passivo($_GET['valor']);
break;
case 'sel_adv_resp':
$this->sel_adv_resp($_GET['valor']);
break;
case 'sel_tipo_acao':
$this->sel_tipo_acao($_GET['valor']);
break;
case 'sel_tipo_vara':
$this->sel_tipo_vara($_GET['valor']);
break;
case 'sel_comarca2':
$this->sel_comarca2($_GET['valor']);
break;
case 'sel_rito':
$this->sel_rito($_GET['valor']);
break;
case 'sel_foro':
$this->sel_foro($_GET['valor']);
break;
case 'sel_area':
$this->sel_area($_GET['valor']);
break;
case 'sel_fase':
$this->sel_fase($_GET['valor']);
break;
case 'sel_instancia2':
$this->sel_instancia2($_GET['valor']);
break;
case 'sel_orgao':
$this->sel_orgao($_GET['valor']);
break;
case 'sel_proc_andamento':
$this->sel_proc_andamento($_GET['valor']);
break;
case 'sel_proc_historico':
$this->sel_proc_historico($_GET['valor']);
break;
case 'sel_proc_despesa':
$this->sel_proc_despesa($_GET['valor']);
break;
case 'sel_proc_peticao':
$this->sel_proc_peticao($_GET['valor']);
break;
case 'sel_proc_honorario':
$this->sel_proc_honorario($_GET['valor']);
break;
case 'sel_proc_prazo':
$this->sel_proc_prazo($_GET['valor']);
break;
case 'sel_advAutor':
$this->sel_advAutor($_GET['valor']);
break;
case 'sel_advReu':
$this->sel_advReu($_GET['valor']);
break;
case 'sel_litsPassivo':
$this->sel_litsPassivo($_GET['valor']);
break;
case 'sel_litsAtivo':
$this->sel_litsAtivo($_GET['valor']);
break;
}
}
public function sel_comarca()
{
$conn = conexao::getInstance();
$com = $conn->query("SELECT * FROM comarcas");
?>
<select id="cod_comarca" name="cod_comarca" class="form-control">
<?php while ($icom = $com->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $icom->codigo ?>"><?php echo $icom->comarca ?></option>
<?php } ?>
</select>
<?
}
public function sel_instancia()
{
$conn = conexao::getInstance();
$ins = $conn->query("SELECT * FROM instancias");
?>
<select id="cod_instancia" name="cod_instancia" class="form-control">
<?php while ($iins = $ins->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $iins->codigo ?>"><?php echo $iins->instancia ?></option>
<?php } ?>
</select>
<?
}
public function sel_bairro()
{
$conn = conexao::getInstance();
$bai = $conn->query("SELECT * FROM bairros");
?>
<select id="cod_bairro" name="cod_bairro" class="form-control">
<?php while ($ibai = $bai->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $ibai->codigo ?>"><?php echo $ibai->bairro ?></option>
<?php } ?>
</select>
<?
}
public function sel_tipo_pessoa()
{
$conn = conexao::getInstance();
$tpes = $conn->query("SELECT * FROM tipo_pessoas");
?>
<select id="cod_tipo_pessoa" name="cod_tipo_pessoa" class="form-control select2">
<?php while ($ipes = $tpes->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $ipes->codigo ?>"><?php echo $ipes->tipo ?></option>
<?php } ?>
</select>
<?
}
public function sel_endereco($valor)
{
$conn = conexao::getInstance();
$endp = $conn->query("select * from v_lista_pessoas_endereco where cod_pessoa='$valor'");
?>
<table class='table dtabelas table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<thead>
<tr class="success">
<th width="2%">ID</th>
<th>Tipo</th>
<th>Endereço</th>
<th>Número</th>
<th>Compl.</th>
<th>Bairro</th>
<th>Cidade</th>
<th>CEP</th>
<th width="2%"></th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
while ($e = $endp->fetch(PDO::FETCH_OBJ)) {
echo "<tr>";
echo "<td>" . $e->codigo . "</td>";
echo "<td>" . $e->tipo . "</td>";
echo "<td>" . $e->endereco . "</td>";
echo "<td>" . $e->numero . "</td>";
echo "<td>" . $e->complemento . "</td>";
echo "<td>" . $e->bairro . "</td>";
echo "<td>" . $e->cidade . "</td>";
echo "<td>" . $e->cep . "</td>";
$idend = $e->codigo;
//$pes = $e->cod_pessoa;
////if($direito == "1") {
echo "<td><a class='j50' href='index2.php?page=pessoa/endereco_edt&id=$valor&idend=$idend&var=editar'><i aling='center' class='fa fa-pencil' title='Editar registro'></i></a></td>";
//}
if ($e->principal==1) {
echo "<td><i class='fa fa-check-circle'></td>";
} else {
echo "<td><i class='fa fa-circle-o'></td>";
}
echo "</tr>";
}
?>
</tbody>
</table>
<?
}
public function sel_telefone($valor)
{
$conn = conexao::getInstance();
$tele = $conn->query("select * from v_lista_pessoas_telefone where cod_pessoa='$valor'");
?>
<!--ABRIR JANELA COLORBOX-->
<table class='table dtabelas table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<thead>
<tr class="success">
<th width="2%">ID</th>
<th>Tipo</th>
<th>Telefone</th>
<th>Ramal</th>
<th>Contato</th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
while ($e = $tele->fetch(PDO::FETCH_OBJ)) {
echo "<tr>";
echo "<td>" . $e->codigo . "</td>";
echo "<td>" . $e->tipo . "</td>";
echo "<td>" . $e->telefone . "</td>";
echo "<td>" . $e->ramal . "</td>";
echo "<td>" . $e->contato . "</td>";
$idend = $e->codigo;
//$pes = $e->cod_pessoa;
////if($direito == "1") {
echo "<td><a class='j50' href='index2.php?page=pessoa/telefone_edt&id=$valor&idend=$idend&var=editar'><i aling='center' class='fa fa-pencil' title='Editar registro'></i></a></td>";
//}
echo "</tr>";
}
?>
</tbody>
</table>
<?
}
public function sel_contrato($valor)
{
$conn = conexao::getInstance();
$cont = $conn->query("select * from v_lista_contratos where cod_contratante='$valor'");
?>
<table class='table dtabelas table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<thead>
<tr class="success">
<th width="2%">ID</th>
<th>Contratante</th>
<th>Descrição</th>
<th>Situação</th>
<th>Tipo</th>
<th>Valor</th>
<th>Valor mensal</th>
<th>Vencimento</th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
$soma = 0;
while ($d = $cont->fetch(PDO::FETCH_OBJ)) {
echo "<tr>";
echo "<td>" . $d->codigo . "</td>";
echo "<td>" . $d->nome . "</td>";
echo "<td>" . $d->descricao . "</td>";
echo "<td>" . $d->situacao . "</td>";
echo "<td>" . $d->lancamento . "</td>";
echo "<td>" . $d->valor . "</td>";
echo "<td>" . $d->valor_mensal . "</td>";
echo "<td>dia: " . $d->dia_venc . "</td>";
$soma += $d->valor;
$id = $d->codigo;
//if($direito == "1") {
echo "<td><a class='j80' href='index2.php?page=contrato/contrato_edt&id=$id'><i aling='center' class='fa fa-pencil' title='Editar registro'></i></a></td>";
//}
echo "</tr>";
}
?>
</tbody>
</table>
<div class='centro'>
<label>Total dos contratos: R$ </label>
<?php echo number_format($soma, 2, ',', '.'); ?>
</div>
<?
}
public function sel_agenda($valor)
{
$conn = conexao::getInstance();
$data = $conn->query("select * from v_lista_agenda where cod_pessoa='$valor'");
?>
<table class='table dtabelas table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<thead>
<tr class="success">
<th width="2%">ID</th>
<th>Solicitante</th>
<th>Compromisso</th>
<th>Data</th>
<th>Hora início</th>
<th>Lembrar (H:M antes)</th>
<th>Local</th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
while ($d = $data->fetch(PDO::FETCH_OBJ)) {
echo "<tr>";
echo "<td>" . $d->codigo . "</td>";
echo "<td>" . $d->nome . "</td>";
echo "<td>" . $d->compromisso . "</td>";
echo "<td>" . date('d/m/Y', strtotime($d->data_compromisso)) . "</td>";
echo "<td>" . $d->hora_inicio . "</td>";
echo "<td>" . $d->lembrar . "</td>";
echo "<td>" . $d->local . "</td>";
$id = $d->codigo;
//if($direito == "1") {
echo "<td><a class='j60' href='index2.php?page=agenda/agenda_edt&id=$d->codigo&acao=pessoa'><i aling='center' class='fa fa-eye' title='Visualizar registro'></i></a></td>";
//}
echo "</tr>";
}
?>
</tbody>
</table>
<?
}
public function sel_fornecedor()
{
$conn = conexao::getInstance();
$tpfj = $conn->query("SELECT * FROM fornecedores");
?>
<select id="cod_fornecedor" name="cod_fornecedor" autofocus class="form-control">
<?php while ($ipfj = $tpfj->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $ipfj->codigo ?>"><?php echo $ipfj->fornecedor ?></option>
<?php } ?>
</select>
<?
}
public function sel_cliente()
{
$conn = conexao::getInstance();
$clien = $conn->query("SELECT * FROM pessoas");
?>
<select id="cod_cli" name="cod_cli" class="form-control">
<option value="99">Selecione</option>
<?php while ($iclien = $clien->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $iclien->codigo ?>"><?php echo $iclien->nome ?></option>
<?php } ?>
</select>
<?
}
public function sel_polo_ativo()
{
$conn = conexao::getInstance();
$poloa = $conn->query("SELECT * FROM pessoas");
?>
<select id="cod_parte" name="cod_parte" class="form-control">
<option value="99">Selecione</option>
<?php while ($ipoloa = $poloa->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $ipoloa->codigo ?>"><?php echo $ipoloa->nome ?></option>
<?php } ?>
</select>
<?
}
public function sel_polo_passivo()
{
$conn = conexao::getInstance();
$polop = $conn->query("SELECT * FROM pessoas");
?>
<select id="cod_contra" name="cod_contra" class="form-control">
<option value="99">Selecione</option>
<?php while ($ipolop = $polop->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $ipolop->codigo ?>"><?php echo $ipolop->nome ?></option>
<?php } ?>
</select>
<?
}
public function sel_adv_resp()
{
$conn = conexao::getInstance();
$advre = $conn->query("SELECT * FROM pessoas");
?>
<select id="cod_adv_resp" name="cod_adv_resp" class="form-control">
<option value="99">Selecione</option>
<?php while ($iadvre = $advre->fetch(PDO::FETCH_OBJ)) {
?>
<option value="<?php echo $iadvre->codigo ?>"><?php echo $iadvre->nome ?></option>
<?php } ?>
</select>
<?
}
public function sel_tipo_acao()
{
$conn = conexao::getInstance();
$tacao = $conn->query("SELECT * FROM tipo_acao");
?>
<select id="cod_tipo_acao" name="cod_tipo_acao" class="form-control">
<option value="99">Selecione</option>
<?php while ($itacao = $tacao->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $itacao->codigo ?>"><?php echo $itacao->acao ?></option>
<?php } ?>
</select>
<?
}
public function sel_tipo_vara()
{
$conn = conexao::getInstance();
$tvara = $conn->query("SELECT * FROM varas");
?>
<select id="cod_vara" name="cod_vara" class="form-control">
<option value="99">Selecione</option>
<?php while ($itvara = $tvara->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $itvara->codigo ?>"><?php echo $itvara->vara ?></option>
<?php } ?>
</select>
<?
}
public function sel_comarca2()
{
$conn = conexao::getInstance();
$comar = $conn->query("SELECT * FROM comarcas");
?>
<select id="cod_comarca" name="cod_comarca" class="form-control">
<option value="99">Selecione</option>
<?php while ($icomar = $comar->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $icomar->codigo ?>"><?php echo $icomar->comarca ?></option>
<?php } ?>
</select>
<?
}
public function sel_rito()
{
$conn = conexao::getInstance();
$ritos = $conn->query("SELECT * FROM rito");
?>
<select id="cod_rito" name="cod_rito" class="form-control">
<option value="99">Selecione</option>
<?php while ($iritos = $ritos->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $iritos->codigo ?>"><?php echo $iritos->rito ?></option>
<?php } ?>
</select>
<?
}
public function sel_foro()
{
$conn = conexao::getInstance();
$foros = $conn->query("SELECT * FROM foros");
?>
<select id="cod_foro" name="cod_foro" class="form-control">
<option value="99">Selecione</option>
<?php while ($iforos = $foros->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $iforos->codigo ?>"><?php echo $iforos->foro ?></option>
<?php } ?>
</select>
<?
}
public function sel_area()
{
$conn = conexao::getInstance();
$areas = $conn->query("SELECT * FROM areas");
?>
<select id="cod_area" name="cod_area" class="form-control">
<option value="99">Selecione</option>
<?php while ($iareas = $areas->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $iareas->codigo ?>"><?php echo $iareas->area ?></option>
<?php } ?>
</select>
<?
}
public function sel_fase()
{
$conn = conexao::getInstance();
$fases = $conn->query("SELECT * FROM fases");
?>
<select id="cod_fase" name="cod_fase" class="form-control">
<option value="99">Selecione</option>
<?php while ($ifases = $fases->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $ifases->codigo ?>"><?php echo $ifases->fase ?></option>
<?php } ?>
</select>
<?
}
public function sel_instancia2()
{
$conn = conexao::getInstance();
$insta = $conn->query("SELECT * FROM instancias");
?>
<select id="cod_instancia" name="cod_instancia" class="form-control">
<option value="99">Selecione</option>
<?php while ($iinsta = $insta->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $iinsta->codigo ?>"><?php echo $iinsta->instancia ?></option>
<?php } ?>
</select>
<?
}
public function sel_orgao()
{
$conn = conexao::getInstance();
$orgao = $conn->query("SELECT * FROM orgao");
?>
<select id="cod_orgao" name="cod_orgao" class="form-control">
<option value="99">Selecione</option>
<?php while ($iorgao = $orgao->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $iorgao->codigo ?>"><?php echo $iorgao->orgao . '|' . $iorgao->funcao ?></option>
<?php } ?>
</select>
<?
}
public function sel_proc_andamento($valor)
{
$conn = conexao::getInstance();
$andamento = $conn->query("select * from andamentos where cod_proc='$valor' and status=1");
?>
<script type="text/javascript">box();</script>
<table class='table dtabelas table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<thead>
<tr class="success">
<th width="2%">ID</th>
<th>Data</th>
<th>hora</th>
<th>Andamento</th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
while ($e = $andamento->fetch(PDO::FETCH_OBJ)) {
echo "<tr>";
echo "<td>" . $e->codigo . "</td>";
echo "<td>" . date('d/m/Y', strtotime($e->data)) . "</td>";
echo "<td>" . $e->hora . "</td>";
echo "<td>" . $e->andamento . "</td>";
$idend = $e->codigo;
////if($direito == "1") {
echo "<td><a class='j60' href='index2.php?page=processos/andamento_edt&id=$valor&idend=$idend&var=andamento_edt' title=\"editar registro\"><i aling='center' class='fa fa-pencil'></i></a></td>";
//}
echo "</tr>";
}
?>
</tbody>
</table>
<?
}
public function sel_proc_historico($valor)
{
$conn = conexao::getInstance();
$historico = $conn->query("select * from hist_proc where cod_proc='$valor' and status=1");
?>
<script type="text/javascript">box();</script>
<table class='table dtabelas table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<thead>
<tr class="success">
<th width="2%">ID</th>
<th>Data</th>
<th>hora</th>
<th>Descrição</th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
while ($h = $historico->fetch(PDO::FETCH_OBJ)) {
echo "<tr>";
echo "<td>" . $h->codigo . "</td>";
echo "<td>" . date('d/m/Y', strtotime($h->data)) . "</td>";
echo "<td>" . $h->hora . "</td>";
echo "<td>" . $h->descri . "</td>";
$idend = $h->codigo;
////if($direito == "1") {
echo "<td><a class='j50' href='index2.php?page=processos/historico_edt&id=$valor&idend=$idend&var=andamento_edt' title=\"editar registro\"><i aling='center' class='fa fa-pencil'></i></a></td>";
//}
echo "</tr>";
}
?>
</tbody>
</table>
<?
}
public function sel_proc_despesa($valor)
{
$conn = conexao::getInstance();
$despesa = $conn->query("select * from despesas_proc where cod_proc='$valor'");
?>
<script type="text/javascript">box();</script>
<table class='table dtabelas table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<thead>
<tr class="success">
<th width="2%">ID</th>
<th>Data</th>
<th>Descrição</th>
<th>Valor</th>
<th>Titularidade</th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
$somaC = 0;
$somaE = 0;
while ($h = $despesa->fetch(PDO::FETCH_OBJ)) {
$tit = $conn->query("select * from titularidade WHERE codigo='$h->tipo'");
$ti = $tit->fetch(PDO::FETCH_OBJ);
echo "<tr>";
echo "<td>" . $h->codigo . "</td>";
echo "<td>" . date('d/m/Y', strtotime($h->data)) . "</td>";
echo "<td>" . $h->descricao . "</td>";
echo "<td>" . number_format($h->valor, 2, ',', '.') . "</td>";
echo "<td>" . $ti->titularidade . "</td>";
$idend = $h->codigo;
if ($h->tipo==1) {
$somaE += $h->valor;
} else {
$somaC += $h->valor;
}
////if($direito == "1") {
echo "<td><a class='j50' href='index2.php?page=processos/despesa_edt&id=$valor&idend=$idend&var=despesa_edt' title=\"editar registro\"><i aling='center' class='fa fa-pencil'></i></a></td>";
//}
echo "</tr>";
}
?>
</tbody>
</table>
<?
}
public function sel_proc_peticao($valor)
{
$conn = conexao::getInstance();
$peticao = $conn->query("select * from peticoes where cod_proc='$valor'");
?>
<script type="text/javascript">box();</script>
<table id="id_peticao" class='dtabelas table table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<thead>
<tr class="success">
<th width="2%">ID</th>
<th>Data</th>
<th>Descrição</th>
<th width="2%"></th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
while ($h = $peticao->fetch(PDO::FETCH_OBJ)) {
echo "<tr>";
echo "<td>" . $h->codigo . "</td>";
echo "<td>" . date('d/m/Y', strtotime($h->data)) . "</td>";
echo "<td>" . $h->descri . "</td>";
$idend = $h->codigo;
////if($direito == "1") {
echo "<td><a href='#' data-toggle='modal' data-target='#myModal$h->codigo' title='visualizar arquivo'><i aling='center' class='text-red fa fa-file-pdf-o'></i></a></td>";
echo "<td><a class='j50' href='index2.php?page=processos/peticao_edt&id=$valor&idend=$idend&var=andamento_edt' title='editar registro'><i aling='center' class='fa fa-pencil'></i></a></td>";
//}
echo "</tr>";
?>
<!-- Modal -->
<div class="modal fade bs-example-modal-lg" id="myModal<?=$h->codigo?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header text-green">
<button type="button" class="close" data-dismiss="modal" aria-label="Fechar">
<span aria-hidden="true"><i title="fechar" aling='center' class='text-red fa fa-power-off'></i></span>
</button>
<h5 class="modal-title" id="myModalLabel"><?=$h->descri?></h5>
</div>
<div class="modal-body">
<?php
$filename = $h->caminho;
if ((substr($filename, -4)==".JPG") || (substr($filename, -4)==".jpg") || (substr($filename, -5)==".jpeg") || (substr($filename, -5)==".JPEG")) { ?>
<img src='" . $filename . "' alt='Imagem' width='100%'>
<?php } else { ?>
<object type="application/pdf" data="<?php echo $filename ?>" width="100%" height="65%">
<a href='<?php echo $filename ?>'><i aling='center' class='text-red fa fa-file-pdf-o'></i> Visualizar arquivo</a>
</object>
<?php }
?>
</div>
<div class="modal-footer text-green">
<!-- Processo Nº: --><?php //echo $valor ?><!-- <br> --><?php //echo $d->objeto ?>
</div>
</div>
</div>
</div>
<?php
}
?>
</tbody>
</table>
<?
}
public function sel_proc_honorario($valor)
{
$conn = conexao::getInstance();
$honorario = $conn->query("select * from honorarios where cod_proc='$valor'");
?>
<script type="text/javascript">box();</script>
<table id="id_honorario" class='dtabelas table table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<thead>
<tr class="success">
<th width="2%">ID</th>
<th>Descrição</th>
<th>Lançamento</th>
<th>Vencimento</th>
<th>Valor</th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
$calc = 0;
while ($h = $honorario->fetch(PDO::FETCH_OBJ)) {
echo "<tr>";
echo "<td>" . $h->codigo . "</td>";
echo "<td>" . $h->descri . "</td>";
echo "<td>" . date('d/m/Y', strtotime($h->data_lanc)) . "</td>";
echo "<td>" . date('d/m/Y', strtotime($h->data_venc)) . "</td>";
echo "<td>" . number_format($h->valor, 2, ',', '.') . "</td>";
$idend = $h->codigo;
$calc += $h->valor;
////if($direito == "1") {
echo "<td><a class='j50' href='index2.php?page=processos/honorario_edt&id=$valor&idend=$idend&var=honorario_edt' title='editar registro'><i aling='center' class='fa fa-pencil'></i></a></td>";
//}
echo "</tr>";
}
?>
</tbody>
<tfoot>
<tr class="label-warning_amarelo">
<th width="2%"></th>
<th></th>
<th></th>
<th>Total de honorários:</th>
<th style="color: #2b542c;font-size: 13px;"><b><?php echo number_format($calc, 2, ',', '.') ?></b></th>
<th width="2%"></th>
</tr>
</tfoot>
</table>
<?
}
public function sel_proc_prazo($valor)
{
$conn = conexao::getInstance();
$prazo = $conn->query("select * from prazos where cod_proc='$valor'");
?>
<script type="text/javascript">box();</script>
<table id="id_prazo" class='dtabelas table table-striped table-hover dt-responsive' cellspacing='0' width='100%' border='0'>
<thead>
<tr class="success">
<th width="2%">ID</th>
<th>Descrição</th>
<th>Publicação</th>
<th>Vencimento</th>
<th>Hora</th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
while ($prz = $prazo->fetch(PDO::FETCH_OBJ)) {
echo "<tr>";
echo "<td>" . $prz->codigo . "</td>";
echo "<td>" . $prz->descricao . "</td>";
echo "<td>" . date('d/m/Y', strtotime($prz->data_publicacao)) . "</td>";
echo "<td>" . date('d/m/Y', strtotime($prz->data_venc)) . "</td>";
echo "<td>" . $prz->hora_venc . "</td>";
$idend = $prz->codigo;
////if($direito == "1") {
echo "<td><a class='j60' href='index2.php?page=processos/prazo_edt&id=$valor&idend=$idend&var=prazo_edt' title='editar registro'><i aling='center' class='fa fa-pencil'></i></a></td>";
//}
echo "</tr>";
}
?>
</tbody>
</table>
<?
}
public function sel_advAutor()
{
$conn = conexao::getInstance();
$adva = $conn->query("SELECT * FROM pessoas");
?>
<select id="codigo_adv" name="codigo_adv" class="form-control">
<?php while ($iadva = $adva->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $iadva->codigo ?>"><?php echo $iadva->nome ?></option>
<?php } ?>
</select>
<?
}
public function sel_advReu()
{
$conn = conexao::getInstance();
$advr = $conn->query("SELECT * FROM pessoas");
?>
<select id="codigo_adv" name="codigo_adv" class="form-control">
<?php while ($iadvr = $advr->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $iadvr->codigo ?>"><?php echo $iadvr->nome ?></option>
<?php } ?>
</select>
<?
}
public function sel_litsPassivo()
{
$conn = conexao::getInstance();
$litr = $conn->query("SELECT * FROM pessoas");
?>
<select id="codpessoa" name="codpessoa" class="form-control">
<?php while ($ilitr = $litr->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $ilitr->codigo ?>"><?php echo $ilitr->nome ?></option>
<?php } ?>
</select>
<?
}
public function sel_litsAtivo()
{
$conn = conexao::getInstance();
$lita = $conn->query("SELECT * FROM pessoas");
?>
<select id="codpessoa" name="codpessoa" class="form-control">
<?php while ($ilita = $lita->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $ilita->codigo ?>"><?php echo $ilita->nome ?></option>
<?php } ?>
</select>
<?
}
}
$ajax = new ajax();
$ajax->acao($_GET['a']);