| 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/protocolo/dev/pages/protocolo/ |
Upload File : |
<?php
/**
* Created by PhpStorm.
* User: ralpb
* Date: 19/06/2018
* Time: 07:49
*/
$id = intval($_GET['id']);
$res = $conn->query("select * from v_lista_usuarios ORDER by nome");
$ptr = $conn->query("select * from v_lista_protocolo_interessado where cod_protocolo=$id");
$qtd = $ptr->rowCount();
?>
<html>
<head>
<script type="text/javascript">
$(document).ready(function () {
$("#cod_interessado").change(function () {
// pega o valor do select selecionado
var valorCod = $(this).val();
// insere o valor no input desejado
$("#id_recebeInt").val(valorCod);
});
});
</script>
</head>
<body onload="javascript:showCarga();">
<section class="content-header">
<h1>
<a href="index.php" title="voltar"><i class="fa fa-reply"><span> </span></i></a>
<span class="text-bold text-blue">Interessados</span>
<small class="text-orange text-bold"><strong>(LISTAGEM)</strong></small>
<a href="#" title="Novo registro" class="pull-right" onclick="m_div('id_cad_tipo_protocolo')"><i class="fa fa-plus-square text-green"></i></a>
</h1>
<ol class="breadcrumb"></ol>
</section>
<!--CADASTRO DE NOVO REGISTRO-->
<section class="content-header">
<div id="id_cad_tipo_protocolo" class="box box-primary" style="display: none;">
<div id="id_cad_tipo_protocolos">
<div class="box-header with-border">
<h3 class="box-title text-bold text-blue titulo">Novo interessado</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse">
<i class="fa fa-minus"></i>
</button>
</div>
</div>
<div class="box-body">
<div class="row">
<form id="f_interessado" name="f_interessado" onsubmit="javascript:showCarga();" method="post" action="?page=protocolo/protocolo_a&var=cadastrar_interessado">
<div class="col-md-12">
<div class="col-md-12">
<h5 class="text-bold text-lbl-campo">Interessado</h5>
<div>
<select multiple="multiple" id="cod_interessado" name="cod_interessado" class="form-control select2" style="width: 100%;">
<?php while ($enc = $res->fetch(PDO::FETCH_OBJ)) { ?>
<option value="<?php echo $enc->cod_usuario ?>"><?php echo strtoupper($enc->nome) . ' | ' . strtoupper($enc->uo_nome) . ' | ' . strtoupper($enc->ocupacao_nome) ?></option>
<?php } ?>
</select>
</div>
<input type="hidden" name="cod_protocolo" value="<?php echo $id ?>">
<input type="hidden" name="tipo_interessado" value="0">
<input type="hidden" name="cod_usuario_int" id="id_recebeInt">
</div>
<div class="col-md-2">
<h5 class="text-bold text-lbl-campo"> </h5>
<div>
<button type="submit" class="btn btn-box-tool form-control text-blue titulo" title="salvar registro">
<i class="fa fa-check-circle fa-2x text-blue"></i> Salvar
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<!--END CADASTRO DE NOVO REGISTRO-->
<!-- TABELA -->
<section class="content">
<div class="card">
<!-- /.box-header -->
<div class="card-content table-responsive">
<table id="dtabelaa" class="table table-bordered table-responsive table-hover">
<thead>
<tr>
<th>ID</th>
<th>Interessado</th>
<th width="2%"></th>
</tr>
</thead>
<tbody>
<?php
while ($d = $ptr->fetch(PDO::FETCH_OBJ)) {
echo "<tr>";
echo "<td>" . $d->cod_usuario . "</td>";
echo "<td>" . $d->nome . ' | ' . $d->uo_nome . "</td>";
$id = $d->cod_usuario;
$cod_protocolo = $d->cod_protocolo;
echo "<td><a href='?page=protocolo/protocolo_a&cod_usuario=$id&cod_protocolo=$cod_protocolo&var=excluir_interessado' class='botao_excluir'><i aling='center' class='fa fa-trash-o' title='Excluir registro'></i></a></td>";
echo "</tr>";
}
?>
</tbody>
</table>
</div>
</div>
</section>
<link href="dist/css/select2.min.css" rel="stylesheet"/>
<script src="dist/js/jquery.min.js"></script>
<script src="dist/js/select2.full.min.js"></script>
<script src="dist/js/jquery.ddslick.min.js"></script>
</body>
</html>