51
| <![CDATA[<script type="text/javascript">
$(function() {
$("input[type=submit]").click(function() {
$.blockUI({message: "<span style='font-size: 20px'><b>Aguarde um instante...</b></span>"});
return true;
});
});
</script>]]>
|
153
| <![CDATA[<script language="javascript">
$(document).ready(function(){
$('#btnPesquisa').click(function(){
$('#processos').show();
//$('#formularios').hide();
if( $('#txtcpf').val() === '' )
{
alert('Digite o CPF');
$('#txtcpf').focus();
return false;
}
if( !check_cpf($('#txtcpf').val()) )
{
alert("CPF incorreto!");
$('#txtcpf').focus();
return;
}
$.post('/formularios/listaProcesso', {cpf:$('#txtcpf').val().trim()}, function(data, type){
if( type === 'success')
{
if( data.length !== 0 )
{
$('#processo').empty();
$('#nomeBolsista').html('');
$('#nomeBolsista').append('<p class="paragrafo"><font><span>'+data[0].Nome+'</span></font></p>');
$('#processo').append('<option value="">Selecione...</option>');
$('#nrodocumento').val($('#txtcpf').val().trim());
for(var i=0; i < data.length; i++)
{
if( data[i].Processo !== null )
{
$('#processo').append('<option value="' +trim(data[i].CodigoProjeto)+'#'+data[i].Setor+'#'+data[i].NumeroInscricao+'#'+data[i].Processo+'#'+data[i].Nivel+'">'+data[i].Processo+' '+data[i].DescricaoProjeto+'</option>');
}
}
} else {
$('#processo').html('');
$('#processos').hide();
alert('Não encontrado processos para este CPF.');
return false;
}
}
}, 'json');
});
$('#processo').change(function(){
if($(this).val().trim() !== '') {
$.post('/formularios/listaFormulario', {processo:$(this).val().trim(), cpf:$('#nrodocumento').val() }, function(data, type){
if( type === 'success') {
$('#formularios').html('');
$('#formularios').append(data);
$('#formularios').show();
}
}, 'json');
} else {
$('#formularios').hide();
}
});
});
function check_cpf(numcpf)
{
x = 0;
soma = 0;
dig1 = 0;
dig2 = 0;
texto = "";
numcpf1="";
len = numcpf.length; x = len -1;
for (var i=0; i <= len - 3; i++) {
y = numcpf.substring(i,i+1);
soma = soma + ( y * x);
x = x - 1;
texto = texto + y;
}
dig1 = 11 - (soma % 11);
if (dig1 == 10) dig1=0 ;
if (dig1 == 11) dig1=0 ;
numcpf1 = numcpf.substring(0,len - 2) + dig1 ;
x = 11; soma=0;
for (var i=0; i <= len - 2; i++) {
soma = soma + (numcpf1.substring(i,i+1) * x);
x = x - 1;
}
dig2= 11 - (soma % 11);
if (dig2 == 10) dig2=0;
if (dig2 == 11) dig2=0;
if ((dig1 + "" + dig2) == numcpf.substring(len,len-2)) {
return true;
}
return false;
}
</script>]]>
|
433
| <![CDATA[<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-4253018-7', 'auto');
ga('send', 'pageview');
</script>]]>
|