| Server IP : 23.111.136.34 / Your IP : 216.73.216.136 Web Server : Apache System : Linux servidor.eurohost.com.br 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : meusitei ( 1072) PHP Version : 5.6.40 Disable Function : show_source, system, shell_exec, passthru, proc_open MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/meusitei/public_html/painel/assets/scripts/ |
Upload File : |
<script type="text/javascript">
$('.dica_angariador').click(function(){
$('.corpodica').html('<?php echo $dica['editarcliente_angariador'] ?>');
$('.janeladica').modal('show');
});
$('.dica_responsavel').click(function(){
$('.corpodica').html('<?php echo $dica['editarcliente_responsavel'] ?>');
$('.janeladica').modal('show');
});
$('.dica_perfis').click(function(){
$('.corpodica').html('<?php echo $dica['editarcliente_perfis'] ?>');
$('.janeladica').modal('show');
});
$('.dica_datadenascimento').click(function(){
$('.corpodica').html('<?php echo $dica['editarcliente_datadenascimento'] ?>');
$('.janeladica').modal('show');
});
$('.dica_fasedeatendimento').click(function(){
$('.corpodica').html('<?php echo $dica['editarcliente_fasedeatendimento'] ?>');
$('.janeladica').modal('show');
});
$('.definicao').change(function() {
var definicao = $('select#definicao').val();
if (definicao == 'Pessoa Física') {
$('.definicao_cpf').css('display', 'block');
$('.definicao_cnpj').css('display', 'none');
$('.definicao_rg').css('display', 'block');
$('.definicao_inscricao').css('display', 'none');
$('.definicao_profissao').css('display', 'block');
$('.definicao_razao').css('display', 'none');
} else {
$('.definicao_cpf').css('display', 'none');
$('.definicao_cnpj').css('display', 'block');
$('.definicao_rg').css('display', 'none');
$('.definicao_inscricao').css('display', 'block');
$('.definicao_profissao').css('display', 'none');
$('.definicao_razao').css('display', 'block');
}
});
function validaEmail(email) {
var str = email;
var filtro = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
if (filtro.test(str)) {
return true;
} else {
return false;
}
}
$('#add').click(function() {
var nome = $('.nomeval').val();
var email = $('.emailval').val();
var definicao = $('select[name="perfil[]"]')[0].value;.
var valida_email;
if (validaEmail(email)) {
valida_email = 1; //alert("E-Mail Valido!");
} else {
valida_email = 0; //alert("Digite um e-mail valido");
}
if(email == ''){
valida_email = 1;
}
//alert('perfil: '+definicao);
if ((nome == '') || (valida_email == '0') || (definicao == '')) {
if (definicao == '') {
$('.corpoalerta').html('<p class="alert alert-warning"><?php echo $alerta['perfil_vazio'] ?></p>');
$('.janelaalerta').modal('show');
} else {
$('.label_perfil').css('color', '');
}
} else {
var verificanome = $('.nomeval').val();
$.post("<?php echo HOME_URI; ?>imobiliaria/verificanomecliente", {verificanome: verificanome}, function(data) {
//alert(data);
$("body").scrollTop(0);
$('#progerro').hide();
$('#usernmb').removeClass('has-error');
$('#usernmb').addClass('has-success');
$('#texterro').html('')
$('#prog1').css('display', 'block');
var interval = setTimeout(function() {
$('#prog2').css('width', '10%');
}, 500);
var interval1 = setTimeout(function() {
$('#prog2').css('width', '20%');
}, 700);
var interval2 = setTimeout(function() {
$('#prog2').css('width', '40%');
}, 1000);
var interval3 = setTimeout(function() {
$('#prog2').css('width', '80%');
}, 1200);
var formdata = $(".formuseradd").serialize();
//alert($("[name=perfil]").val());
$.post("<?php echo HOME_URI; ?>imobiliaria/proprietarios/insert/", formdata, function(data) {
clearInterval(interval);
clearInterval(interval1);
clearInterval(interval2);
clearInterval(interval3);
$('#prog2').css('width', '85%');
$('#frasealertok').html('Usuário inserido.');
$('#prog2').css('width', '100%');
$('#prog1').hide();
$('#progok').show();
//alert('id: '+data);
window.location.href = '<?php echo HOME_URI; ?>imobiliaria/proprietarios/edit/' + data;
});
});
}
});
window.onload = function() {
$('.ui-slider-range').css('background', '#08c');
$('#ms-my-select').css('width', '100%');
$('#ms-my-select2').css('width', '100%');
$(".search-select").select2({
width: '100%',
heigth: '40px',
placeholder: "Selecione um perfil",
allowClear: true,
formatNoMatches: function() {
return 'Sem nova opção';
},
});
$(".group1").colorbox({rel: 'group1', transition: "none", width: "100%", height: "100%", retinaImage: true});
}
function funcaoremovesug() {
setTimeout(function() {
$("#display").hide();
}, 500);
}
function functionpegarvl(data, cep, lng, lat) {
document.getElementById('searchbox').value = data;
document.getElementById('cepnum').value = cep;
document.getElementById('lngat').value = lat;
document.getElementById('latat').value = lng;
$("#display").hide();
// alert(data);
}
</script>
<style type="text/css">
#display
{
display:none;
border-left:solid 1px #dedede;
border-right:solid 1px #dedede;
border-bottom:solid 1px #dedede;
overflow:hidden;
}
.display_box
{
padding:4px; border-top:solid 1px #dedede; font-size:12px; height:40px;
}
.display_box:hover
{
background:#3b5998;
color:#FFFFFF;
}
#shade
{
background-color:#00CCFF;
}
</style>