403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/meusitei/public_html/painel/assets/scripts/personalizacao.php
<script>
$('.dica_editarbanner_abrirem').click(function(){
        $('.corpodica').html('<?php echo $dica['banners_editarpersonalizado_abrirem']; ?>');
        $('.janeladica').modal('show');
        });

    function trim(x) {
        return x.replace(/^\s+|\s+$/gm, '');
    }

    $('.ver_tema').click(function () {
        var tema = $(this).val();
        var peganumero = tema.split(' ');
        $('.titulo_tema').html(peganumero[0] + ' ' + peganumero[1]);
        //$('.modalativar').removeClass('mudar_tema1');
        //$('.modalativar').removeClass('mudar_tema2');
        //$('.modalativar').removeClass('mudar_tema3');
        //$('.modalativar').removeClass('mudar_tema4');
        $.post("<?php echo HOME_URI; ?>imobiliaria/verificatema/", {tema: 'tema0' + peganumero[1]}, function (data) {

            data = trim(data);

            if (data == 'atual') {
                $('#ativarmodal').removeClass('btn-success');
                $('#ativarmodal').addClass('btn-warning');
                $('#ativarmodal').html('Atual');
                $('#ativarmodal').attr('rol', '');
            } else {
                $('#ativarmodal').removeClass('btn-warning');
                $('#ativarmodal').addClass('btn-success');
                $('#ativarmodal').html('Ativar');
                $('#ativarmodal').attr('rol', peganumero[1]);
            }
            $('#visualizar_tema').modal('show');
            $('#mostrar_imagem_tema').html('');
            $('#mostrar_imagem_tema').html('<div class="col-md-12" style="top: 0px"><img src="<?php echo HOME_URI ?>views/_images/temas/tema' + peganumero[1] + '.jpg" style="width: 100%;top: 0px"></div>');
            
            setTimeout(function () {
                $("#mostrar_imagem_tema").animate({scrollTop: 0}, "fast");
            }, 500);

        });
    });

    $('#ativarmodal').click(function () {

        var tema = $(this).attr('rol');

        if (tema != '') {
            $('#visualizar_tema').modal('hide');
            //alert($('.mudar_tema4').attr('id'));
            $('.mudar_tema' + tema).removeClass('btn-success');
            $('.mudar_tema' + tema).addClass('btn-warning');
            $('.mudar_tema' + tema).html('Atual');
            $('.mudar_tema' + tema).attr('disabled', true);

            $('.atual').removeClass('btn-warning');
            $('.atual').addClass('btn-success');
            $('.atual').html('Ativar');
            $('.atual').attr('disabled', false);
            $('.atual').removeClass('atual');
            $('.mudar_tema' + tema).addClass('atual');

            $('#prog2').css('width', '0%');
            $('#prog1').css('display', 'block');
            $('#progok').hide();
            $('#prog1').show();
            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);
            $.post("<?php echo HOME_URI; ?>imobiliaria/persotema/", {tema: 'tema0' + tema}, function (data) {
                clearInterval(interval);
                clearInterval(interval1);
                clearInterval(interval2);
                clearInterval(interval3);
                $('#prog2').css('width', '85%');
                setTimeout(function () {
                    $('#frasealertok').html('Sistema atualizado.');
                    $('#prog2').css('width', '100%');
                    $('#prog1').hide();
                    $('#progerro').hide();
                    $('#progok').show();
                }, 2500);
            });
        }
    });

    $('.dica_modeloencaixotado').click(function () {
        $('.corpodica').html('<?php echo $dica['personalizacao_modeloencaixotado'] ?>');
        $('.janeladica').modal('show');
    });
    $('.dica_marcadagua_posicao').click(function () {
        $('.corpodica').html('<?php echo $dica['personalizacao_marcadagua_posicao'] ?>');
        $('.janeladica').modal('show');
    });

    $('#dimension-switch').bootstrapSwitch('setSizeClass', 'switch-small');

/*START COLORPICK*/
$('#cp1, #cp2, #cp3, #cp4, #cp5, #cp6, #cp7').colorpicker()
    .on('changeColor', function(e) {
        // Atualiza o quadradinho <i> quando muda pelo picker
        $(this).find('i').css('background-color', e.color.toString('hex'));
    });

// Se digitar manualmente no input
$('input[name="cor_primaria"], input[name="cor_secundaria"], input[name="cor_encaixotado"], input[name="manu_cor"], input[name="manu_texto_cor"], input[name="manu_cor_botton"], input[name="manu_texto_cor_botton"]').on('input change', function() {
    var cor = $(this).val();
    $(this).closest('.colorpicker-component').find('i').css('background-color', cor);
});
/*END COLORPICK*/

    /* EXCLUIR LOGOMARCA */
    $('.excluirlogomarca').click(function (e) {
        e.preventDefault();
        $('#modalConfirmaExclusao').modal('show');
    });

    $('#btnConfirmaExclusao').click(function () {
        $('#modalConfirmaExclusao').modal('hide');

        $('html, body').animate({scrollTop: 0}, 'slow');
        $('#prog2').css('width', '0%');
        $('#prog1').show();
        $('#progok').hide();
        $('#progerro').hide();

        $.ajax({
            url: "<?php echo HOME_URI; ?>imobiliaria/persoexcluirlogomarca/",
            type: 'POST',
            dataType: 'json',
            success: function (data) {
                if (data.success) {
                    var pct = 0;
                    var interval = setInterval(function () {
                        pct += 20;
                        $('#prog2').css('width', pct + '%');
                        if (pct >= 100) {
                            clearInterval(interval);
                            $('#prog1').hide();
                            $('#progok').show();

                            var placeholder = "https://www.placehold.it/300x1/EFEFEF/AAAAAA?text=no+image";

                            var novaImg = $('<img>', {
                                src: placeholder,
                                class: 'preview_logomarca_',
                                alt: '',
                                css: {
                                    width: '100%',
                                    maxWidth: '300px',
                                    height: 'auto'
                                }
                            });

                            $('.preview_logomarca').html(novaImg);

                            $('.excluirlogomarca_1').hide();
                            $('#frasealertok').html('Sistema atualizado.');
                        }
                    }, 100);
                } else {
                    $('#prog1').hide();
                    $('#progerro').show();
                }
            },
            error: function () {
                $('#prog1').hide();
                $('#progerro').show();
            }
        });
    });
    /* END EXCLUIR LOGOMARCA */

    $('.excluirmarcadagua').click(function () {

        $('.preview_marcadagua').html('<img style="width: 100%;height: 0px" src="https://www.placehold.it/300x1/EFEFEF/AAAAAA?text=no+image">');
        $('.excluirmarcadagua_1').css('display', 'none');

        $('html, body').animate({scrollTop: 0}, 'slow');
        $('#prog2').css('width', '0%');
        $('#prog1').css('display', 'block');
        $('#progok').hide();
        $('#prog1').show();
        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 posicao = $('#perso_marcadagua').val();
        $.post("<?php echo HOME_URI; ?>imobiliaria/persoexcluirmarcadagua/", {perso_marcadagua: posicao}, function (data) {
            clearInterval(interval);
            clearInterval(interval1);
            clearInterval(interval2);
            clearInterval(interval3);
            $('#prog2').css('width', '85%');
            //$('INPUT[name="marcadagua"]').value = '';
            setTimeout(function () {
                $('#frasealertok').html('Sistema atualizado.');
                $('#prog2').css('width', '100%');
                $('#prog1').hide();
                $('#progerro').hide();
                $('#progok').show();
            }, 2500);

        });

    });

    $('.perso_cores').click(function () {
        //alert('ok');
        $('html, body').animate({scrollTop: 0}, 'slow');
        $('#prog2').css('width', '0%');
        $('#prog1').css('display', 'block');
        $('#progok').hide();
        $('#prog1').show();
        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 cor_fonte = $("#color").val();
//        if(cor_fonte == "#000000"){
//            cor_fonte = "#000000";
//        }
        
        var formdata1 = $("#form_cores").serialize();
         $.post("<?php echo HOME_URI; ?>imobiliaria/persocorfonte/", {cor_fonte: cor_fonte} , function (data) {
             //alert(data);
         });
        
        $.post("<?php echo HOME_URI; ?>imobiliaria/persocores/", formdata1, function (data) {
            //alert(data);
            clearInterval(interval);
            clearInterval(interval1);
            clearInterval(interval2);
            clearInterval(interval3);
            $('#prog2').css('width', '85%');
            setTimeout(function () {
                $('#frasealertok').html('Sistema atualizado.');
                $('#prog2').css('width', '100%');
                $('#prog1').hide();
                $('#progerro').hide();
                $('#progok').show();
            }, 2500);
        });
    });
    
    /* LOGOMARCA ENVIAR */
    var cropper;
    var fileToUpload = null;

    $('input[name="logomarca"]').on('change', function (e) {
        var file = e.target.files[0];

        if (!file) return;

        var extensao = file.name.split('.').pop().toLowerCase();
        var formatosPermitidos = ['jpg', 'jpeg', 'png'];

        if ($.inArray(extensao, formatosPermitidos) === -1) {
            $('.corpoalerta').html('<p class="alert alert-warning"><?php echo $alerta['logomarca_formato_invalido'] ?></p>');
            $('.janelaalerta').modal('show');
            this.value = '';
            return;
        }

        if (file.size > 1024 * 1024) {
            $('.corpoalerta').html('<p class="alert alert-warning"><?php echo $alerta['arquivo_tamanho_invalido_1mb'] ?></p>');
            $('.janelaalerta').modal('show');
            this.value = '';
            return;
        }

        var reader = new FileReader();
        reader.onload = function (e) {
            $('#cropperImage').attr('src', e.target.result);
            $('#cropperModal').modal('show');
        };
        reader.readAsDataURL(file);

        fileToUpload = file;
    });

    $('#cropperModal').on('shown.bs.modal', function () {
        var image = document.getElementById('cropperImage');
        cropper = new Cropper(image, {
            aspectRatio: 300 / 120,
            viewMode: 1,
            autoCropArea: 1,
            dragMode: 'move',
            responsive: true,
            minContainerWidth: 300,
            minContainerHeight: 120,
    maxContainerWidth: 700
        });
    });

    $('#cropperModal').on('hidden.bs.modal', function () {
        if (cropper) {
            cropper.destroy();
            cropper = null;
        }
    });

    $('#cropperSaveBtn').on('click', function () {
        var canvas = cropper.getCroppedCanvas({
            width: 300,
            height: 120
        });

        canvas.toBlob(function (blob) {
            var formData = new FormData();
            formData.append('logomarca', blob, fileToUpload.name);

            $('html, body').animate({scrollTop: 0}, 'slow');
            $('#prog2').css('width', '0%');
            $('#prog1').show();
            $('#progok').hide();

            $.ajax({
                url: "<?php echo HOME_URI . '/imobiliaria/enviarlogomarca/' ?>",
                type: 'POST',
                data: formData,
                processData: false,
                contentType: false,
                dataType: 'json',
                xhr: function() {
                    var xhr = new window.XMLHttpRequest();
                    xhr.upload.addEventListener("progress", function(evt) {
                        if (evt.lengthComputable) {
                            var percentComplete = evt.loaded / evt.total * 100;
                            $('#prog2').css('width', percentComplete + '%');
                        }
                    }, false);
                    return xhr;
                },
                success: function (data) {
                    $('#prog2').css('width', '100%');
                    $('#prog1').hide();
                    $('#progok').show();

                    if (data.success) {
                        var novaLogoUrl = "<?php echo HOME_URI; ?>subdominios/<?php echo $_SESSION['userdata']['contratante']; ?>/layout/logo/" + data.filename + "?v=" + new Date().getTime();

                        var novaImg = $('<img>', {
                            src: novaLogoUrl,
                            class: 'preview_logomarca_',
                            alt: '',
                            css: {
                                width: '100%',
                                maxWidth: '300px',
                                height: 'auto'
                            }
                        });

                        $('.preview_logomarca').html(novaImg);

                        $('.excluirlogomarca_1').show();
                        $('#frasealertok').html('Sistema atualizado.');
                    } else {
                        $('#frasealertok').html('Erro: ' + data.error);
                    }
                },
                error: function () {
                    $('#prog1').hide();
                    $('#progerro').show();
                }
            });
        }, fileToUpload.type);

        $('#cropperModal').modal('hide');
    });

    /* END LOGOMARCA ENVIAR */
 
    $('INPUT[name="imagem_enviar"]').change(function () {
        //var ext = this.value.match(/\.(.+)$/)[1];
        
        var extensoes = this.value.split("."); 
        var len = extensoes.length;
        var i;
        for (i = 0; i < len; i++) {
            var f = i + 1;
            if (extensoes[f] == null) {
                var ext = extensoes[i];
            }
        }

        //alert(this.value + '/' + ext);        

        var id = this.files[0].size;
        var max = 1024 * 1024;
        if (id > max) {
            ext = 'maisde1mb';
        }
        switch (ext) {
            case 'jpg':
                $('.preview_modal_').css('width', '300px');
                $('html, body').animate({scrollTop: 0}, 'slow');
                $('#prog2').css('width', '0%');
                $('#prog1').css('display', 'block');
                $('#progok').hide();
                $('#prog1').show();
                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);

                clearInterval(interval);
                clearInterval(interval1);
                clearInterval(interval2);
                clearInterval(interval3);
                $('#prog2').css('width', '85%');
                setTimeout(function () {
                    $('#form_imagem_enviar').ajaxForm(function (date) {
                        setTimeout(function () {
                            $('#frasealertok').html('Sistema atualizado.');
                            $('#prog2').css('width', '100%');
                            $('#prog1').hide();
                            $('#progerro').hide();
                            $('#progok').show();
                        }, 500);
                    }).submit();
                }, 500);
                break;
            case 'jpeg':
                $('.preview_modal_').css('width', '300px');
                $('html, body').animate({scrollTop: 0}, 'slow');
                $('#prog2').css('width', '0%');
                $('#prog1').css('display', 'block');
                $('#progok').hide();
                $('#prog1').show();
                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);

                clearInterval(interval);
                clearInterval(interval1);
                clearInterval(interval2);
                clearInterval(interval3);
                $('#prog2').css('width', '85%');
                setTimeout(function () {
                    $('#form_imagem_enviar').ajaxForm(function (date) {
                        setTimeout(function () {
                            $('#frasealertok').html('Sistema atualizado.');
                            $('#prog2').css('width', '100%');
                            $('#prog1').hide();
                            $('#progerro').hide();
                            $('#progok').show();
                        }, 500);
                    }).submit();
                }, 500);
                break;
            case 'png':                
                $('.preview_modal_').css('width', '300px');
                $('html, body').animate({scrollTop: 0}, 'slow');
                $('#prog2').css('width', '0%');
                $('#prog1').css('display', 'block');
                $('#progok').hide();
                $('#prog1').show();
                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);
                clearInterval(interval);
                clearInterval(interval1);
                clearInterval(interval2);
                clearInterval(interval3);
                $('#prog2').css('width', '85%'); 
                
                setTimeout(function () {
                    $('#form_imagem_enviar').ajaxForm(function (date) {
                        setTimeout(function () {
                            $('#frasealertok').html('Sistema atualizado.'); 
                            $('#prog2').css('width', '100%');
                            $('#prog1').hide();
                            $('#progerro').hide();
                            $('#progok').show();
                        }, 500);
                    }).submit();
                }, 500);
                break;
            case 'maisde1mb':
                $('.corpoalerta').html('<p class="alert alert-warning"><?php echo $alerta['arquivo_tamanho_invalido_1mb'] ?></p>');
                $('.janelaalerta').modal('show');
                this.value = '';
                break;
            default:
                $('.corpoalerta').html('<p class="alert alert-warning"><?php echo $alerta['logomarca_formato_invalido'] ?></p>');
                $('.janelaalerta').modal('show');
                this.value = '';
        }
    });
    
    $('.excluirmodal').click(function () {

        $('.preview_modal').html('<img style="width: 100%;height: 0px" src="https://www.placehold.it/300x1/EFEFEF/AAAAAA?text=no+image">');
        $('.excluirlogomarca_1').css('display', 'none');

        $('html, body').animate({scrollTop: 0}, 'slow');
        $('#prog2').css('width', '0%');
        $('#prog1').css('display', 'block'); 
        $('#progok').hide();
        $('#prog1').show();
        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);

        $.post("<?php echo HOME_URI; ?>imobiliaria/persoexcluirmodal/", function (data) {
            clearInterval(interval);
            clearInterval(interval1);
            clearInterval(interval2);
            clearInterval(interval3);
            $('#prog2').css('width', '85%');
            //$('INPUT[name="logomarca"]').value = '';
            setTimeout(function () {
                $('#frasealertok').html('Sistema atualizado.');
                $('#prog2').css('width', '100%');
                $('#prog1').hide();
                $('#progerro').hide();
                $('#progok').show();
            }, 2500);
        });
    });
    
//    $('INPUT[name="popup_status"]').click(function () {
//        var popup_status = $("[name=popup_status]").val();
//           alert(popup_status); 
//    });
    
    $('.sis_sistema').click(function () {           
        
        //var popup_status = $("[name=popup_status]").val();
        var popup_largura = $("[name=popup_largura]").val();
        var popup_altura = $("[name=popup_altura]").val();
        var popup_titulo = $("[name=popup_titulo]").val();
        var popup_video = $("[name=popup_video]").val();
        var popup_link = $("[name=link]").val();
        var popup_abrircomo = $("[name=abrircomo]").val();
        
        var sis_email = $('.sis_email').val();
        if (sis_email != '') {
            $('html, body').animate({scrollTop: 0}, 'slow');
            $('#prog2').css('width', '0%');
            $('#prog1').css('display', 'block');
            $('#progok').hide();
            $('#prog1').show();
            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);

            $('textarea[name="popup_conteudo"]').html($('.summernote').code());
            var formdatapopup_tipo = $("#form_popup_tipo").serialize();
            formdatapopup_tipo = formdatapopup_tipo.split('=');
            var popup_tipo = formdatapopup_tipo[1];
            var popup_conteudo = $("[name=popup_conteudo]").val();
            var formdata_popup_status = $("#form_popup_status").serialize();
            formdata_popup_status = formdata_popup_status.split('=');
            var popup_status = formdata_popup_status[1];
            if(popup_status == '2'){
                popup_status = '2';
            }else{
                popup_status = '0';
            }
            $.post("<?php echo HOME_URI; ?>imobiliaria/sissistemapopup/", {popup_status: popup_status, popup_largura: popup_largura, popup_altura: popup_altura, popup_titulo: popup_titulo, popup_conteudo: popup_conteudo, popup_video: popup_video, popup_tipo: popup_tipo, popup_link: popup_link ,popup_abrircomo: popup_abrircomo}, function (data) {
                                  
                $.post("<?php echo HOME_URI; ?>imobiliaria/integrar/", function (data) {
                    //alert(data);
                });
                //alert(data);
                clearInterval(interval);
                clearInterval(interval1);
                clearInterval(interval2);
                clearInterval(interval3);
                $('#prog2').css('width', '85%');
                setTimeout(function () {
                    $('#frasealertok').html('Sistema atualizado.');
                    $('#prog2').css('width', '100%');
                    $('#prog1').hide();
                    $('#progerro').hide();
                    $('#progok').show();
                }, 2500);
            });
        }else{
        
            $('#cores').removeClass('active');
            $('#redessociais').removeClass('active');
            $('#tarjas').removeClass('active');
            $('#popup').removeClass('active');
            $('#financiamento').removeClass('active');
            $('#tema').removeClass('active');
        
            $('.tabcontatos').removeClass('active');
            $('.tablocalizacao').removeClass('active');
            $('.tabredessociais').removeClass('active');
            $('.tabtarjas').removeClass('active');
            $('.tabpopup').removeClass('active');
            $('.tabfinanciamento').removeClass('active');
            
            $('.tabcontatos').addClass('active');
            $('#cores').addClass('active');
        
        }
    });
           
    $('textarea[name="popup_conteudo"]').append('<?php echo $perso['popup_conteudo'] ?>');
    
    $('.perso_popup').click(function () {
        //alert('ok');
        $('html, body').animate({scrollTop: 0}, 'slow');
        $('#prog2').css('width', '0%');
        $('#prog1').css('display', 'block');
        $('#progok').hide();
        $('#prog1').show();
        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);

        $('textarea[name="popup_conteudo"]').html($('.summernote').code());

        var formdata1 = $("#form_popup").serialize();
        $.post("<?php echo HOME_URI; ?>imobiliaria/persopopup/", formdata1, function (data) {
            //alert(data);
            clearInterval(interval);
            clearInterval(interval1);
            clearInterval(interval2);
            clearInterval(interval3);
            $('#prog2').css('width', '85%');
            setTimeout(function () {
                $('#frasealertok').html('Sistema atualizado.');
                $('#prog2').css('width', '100%');
                $('#prog1').hide();
                $('#progerro').hide();
                $('#progok').show();
            }, 2500);
        });

    });
    
    $('.persotitulo').click(function () {
        //alert('ok');
        var perso_titulo = $("[name=perso_titulo]").val();
        var perso_subtitulo = $("[name=perso_subtitulo]").val();
        $('html, body').animate({scrollTop: 0}, 'slow');
        $('#prog2').css('width', '0%');
        $('#prog1').css('display', 'block');
        $('#progok').hide();
        $('#prog1').show();
        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);
        $.post("<?php echo HOME_URI; ?>imobiliaria/persotitulo/", {perso_titulo: perso_titulo, perso_subtitulo: perso_subtitulo}, function (data) {
            //alert(data); 
            clearInterval(interval);
            clearInterval(interval1);
            clearInterval(interval2);
            clearInterval(interval3);
            $('#prog2').css('width', '85%');
            setTimeout(function () {
                $('#frasealertok').html('Sistema atualizado.');
                $('#prog2').css('width', '100%');
                $('#prog1').hide();
                $('#progerro').hide();
                $('#progok').show();
            }, 2500);
        });
    });
    
    function videoonpaste(data) {
    //alert(data);
    setTimeout(function() {
    var search_input = $('.search_input').val();
    //alert(search_input);
    if (search_input != null){
    var video_id = search_input.split("=");
    if (video_id[1] == null){
    var video_id = search_input.split("/");
    video_id[1] = video_id[3];
    }
    if (video_id[1] != null && video_id[0] == 'https://m.youtube.com/watch?v'){
    $('.result').css('display', 'block');
    $('.result_semvideo').css('display', 'none');
    $('.result_iframe').attr('src', 'https://www.youtube.com/embed/' + video_id[1] + '?autoplay=0');
    } else if (video_id[1] != null && video_id[0] == 'https://www.youtube.com/watch?v'){
    $('.result').css('display', 'block');
    $('.result_semvideo').css('display', 'none');
    $('.result_iframe').attr('src', 'https://www.youtube.com/embed/' + video_id[1] + '?autoplay=0');
    } else if (video_id[1] != null && video_id[0] == 'https:'){
    $('.result').css('display', 'block');
    $('.result_semvideo').css('display', 'none');
    $('.result_iframe').attr('src', 'https://www.youtube.com/embed/' + video_id[1] + '?autoplay=0');
    } else if (video_id[1] != null && video_id[0] == 'http:'){
    $('.result').css('display', 'block');
    $('.result_semvideo').css('display', 'none');
    $('.result_iframe').attr('src', 'https://www.youtube.com/embed/' + video_id[1] + '?autoplay=0');
    } else{
    $('.result').hide();
    $('.result_iframe').attr('src', '');
    $('.result').css('display', 'none');
    $('.result_semvideo').css('display', 'block');
    }
    }
    }, 500);
    }
    
     $(".texto_radio").on('ifClicked', function (event) {        
        $('.texto').css('display', 'block');
        $('.imagem').css('display', 'none');
        $('.video').css('display', 'none');        
    });
   
    $(".imagem_radio").on('ifClicked', function (event) {
        $('.texto').css('display', 'none');
        $('.imagem').css('display', 'block');
        $('.video').css('display', 'none'); 
    });

    $(".video_radio").on('ifClicked', function (event) {
        $('.texto').css('display', 'none');
        $('.imagem').css('display', 'none');
        $('.video').css('display', 'block');
    });

    $('INPUT[name="marcadagua"]').change(function () {
       
        var extensoes = this.value.split(".");
        var len = extensoes.length;
        var i;
        for (i = 0; i < len; i++) {
            var f = i + 1;
            if (extensoes[f] == null) {
                var ext = extensoes[i];
            }
        }
        //alert(ext);

        var id = this.files[0].size;
        var max = 1024 * 1024;
        if (id > max) {
            ext = 'maisde1mb';
        }

        switch (ext) {
            case 'png':
                $('html, body').animate({scrollTop: 0}, 'slow');
                $('#prog2').css('width', '0%');
                $('#prog1').css('display', 'block');
                $('#progok').hide();
                $('#prog1').show();
                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);

                clearInterval(interval);
                clearInterval(interval1);
                clearInterval(interval2);
                clearInterval(interval3);
                $('#prog2').css('width', '85%');
                
                setTimeout(function () {
                    $('#form_marcadagua').ajaxForm(function (date) {
                        //alert(date);
                        setTimeout(function () {
                            $('#frasealertok').html('Sistema atualizado.');
                            $('#prog2').css('width', '100%');
                            $('#prog1').hide();
                            $('#progerro').hide();
                            $('#progok').show();

                        }, 500);
                    }).submit();
                }, 500);
                break;
            case 'maisde1mb':
                $('.corpoalerta').html('<p class="alert alert-warning"><?php echo $alerta['arquivo_tamanho_invalido_1mb'] ?></p>');
                $('.janelaalerta').modal('show');
                this.value = '';
                break;
            default:
                $('.corpoalerta').html('<p class="alert alert-warning"><?php echo $alerta['marcadagua_formato_invalido'] ?></p>');
                $('.janelaalerta').modal('show');
                this.value = '';
        }
    });
    
    $('.perso_marcadagua').change(function () {
        $('html, body').animate({scrollTop: 0}, 'slow');
        $('#prog2').css('width', '0%');
        $('#prog1').css('display', 'block');
        $('#progok').hide();
        $('#prog1').show();
        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);

        clearInterval(interval);
        clearInterval(interval1);
        clearInterval(interval2);
        clearInterval(interval3);
        $('#prog2').css('width', '85%');

        setTimeout(function () {
            $('#form_marcadagua').ajaxForm(function (date) {
                //alert(date);
                setTimeout(function () {
                    $('#frasealertok').html('Sistema atualizado.');
                    $('#prog2').css('width', '100%');
                    $('#prog1').hide();
                    $('#progerro').hide();
                    $('#progok').show();
                }, 500);
            }).submit();
        }, 500);
    });

    $('.perso_logomarca').click(function () {
    });
    /*
    $('.perso_marcadagua').click(function () {
    });
    */
<?php for ($i_tema = 1; $i_tema <= 4; $i_tema++) { ?>
        $('.mudar_tema<?php echo $i_tema ?>').click(function () {

            //alert($('.mudar_tema4').attr('id'));
            $('.mudar_tema<?php echo $i_tema ?>').removeClass('btn-success');
            $('.mudar_tema<?php echo $i_tema ?>').addClass('btn-warning');
            $('.mudar_tema<?php echo $i_tema ?>').html('Atual');
            $('.mudar_tema<?php echo $i_tema ?>').attr('disabled', true);

            $('.atual').removeClass('btn-warning');
            $('.atual').addClass('btn-success');
            $('.atual').html('Ativar');
            $('.atual').attr('disabled', false);
            $('.atual').removeClass('atual');
            $('.mudar_tema<?php echo $i_tema ?>').addClass('atual');

            $('#prog2').css('width', '0%');
            $('#prog1').css('display', 'block');
            $('#progok').hide();
            $('#prog1').show();
            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);
            $.post("<?php echo HOME_URI; ?>imobiliaria/persotema/", {tema: 'tema0<?php echo $i_tema ?>'}, function (data) {
                clearInterval(interval);
                clearInterval(interval1);
                clearInterval(interval2);
                clearInterval(interval3);
                $('#prog2').css('width', '85%');
                setTimeout(function () {
                    $('#frasealertok').html('Sistema atualizado.');
                    $('#prog2').css('width', '100%');
                    $('#prog1').hide();
                    $('#progerro').hide();
                    $('#progok').show();
                }, 2500);
            });

        });
<?php } ?>

<?php for ($i_fundo = 0; $i_fundo <= 12; $i_fundo++) { ?>
        $('.mudar_fundo<?php echo $i_fundo ?>').click(function () {

            //alert($('.mudar_tema4').attr('id'));
            $('.mudar_fundo<?php echo $i_fundo ?>').removeClass('btn-success');
            $('.mudar_fundo<?php echo $i_fundo ?>').addClass('btn-warning');
            $('.mudar_fundo<?php echo $i_fundo ?>').html('Atual');
            $('.mudar_fundo<?php echo $i_fundo ?>').attr('disabled', true);

            $('.fundoatual').removeClass('btn-warning');
            $('.fundoatual').addClass('btn-success');
            $('.fundoatual').html('Selecionar');
            $('.fundoatual').attr('disabled', false);
            $('.fundoatual').removeClass('fundoatual');
            $('.mudar_fundo<?php echo $i_fundo ?>').addClass('fundoatual');

            $('#prog2').css('width', '0%');
            $('#prog1').css('display', 'block');
            $('#progok').hide();
            $('#prog1').show();
            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);
            $.post("<?php echo HOME_URI; ?>imobiliaria/persofundo/", {fundo: 'bg_<?php echo $i_fundo ?>.png'}, function (data) {
                clearInterval(interval);
                clearInterval(interval1);
                clearInterval(interval2);
                clearInterval(interval3);
                $('#prog2').css('width', '85%');
                setTimeout(function () {
                    $('#frasealertok').html('Sistema atualizado.');
                    $('#prog2').css('width', '100%');
                    $('#prog1').hide();
                    $('#progerro').hide();
                    $('#progok').show();
                }, 2500);
            });

        });
<?php } ?>

<?php for ($i_cabecalho = 0; $i_cabecalho <= 22; $i_cabecalho++) { ?>
        $('.mudar_cabecalho<?php echo $i_cabecalho ?>').click(function () {

            //alert($('.mudar_tema4').attr('id'));
            $('.mudar_cabecalho<?php echo $i_cabecalho ?>').removeClass('btn-success');
            $('.mudar_cabecalho<?php echo $i_cabecalho ?>').addClass('btn-warning');
            $('.mudar_cabecalho<?php echo $i_cabecalho ?>').html('Atual');
            $('.mudar_cabecalho<?php echo $i_cabecalho ?>').attr('disabled', true);

            $('.cabecalhoatual').removeClass('btn-warning');
            $('.cabecalhoatual').addClass('btn-success');
            $('.cabecalhoatual').html('Selecionar');
            $('.cabecalhoatual').attr('disabled', false);
            $('.cabecalhoatual').removeClass('cabecalhoatual');
            $('.mudar_cabecalho<?php echo $i_cabecalho ?>').addClass('cabecalhoatual');

            $('#prog2').css('width', '0%');
            $('#prog1').css('display', 'block');
            $('#progok').hide();
            $('#prog1').show();
            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);
            $.post("<?php echo HOME_URI; ?>imobiliaria/persocabecalho/", {cabecalho: 'cabecalho_<?php echo $i_cabecalho ?>.jpg'}, function (data) {
                clearInterval(interval);
                clearInterval(interval1);
                clearInterval(interval2);
                clearInterval(interval3);
                $('#prog2').css('width', '85%');
                setTimeout(function () {
                    $('#frasealertok').html('Sistema atualizado.');
                    $('#prog2').css('width', '100%');
                    $('#prog1').hide();
                    $('#progerro').hide();
                    $('#progok').show();
                }, 2500);
            });

        });
<?php } ?>
function modalcontratarmarca(){
    $('.corpocontrate').html('<div class="row"><div class="col-md-2 col-xs-12"><img src="<?php echo HOME_URI.'views/_images/icone_rubi.png'; ?>"></div>'+
        '<div class="col-md-10 col-xs-12" style="padding-left: 15px"><?php echo $alerta['limiteemails'] ?></div></div></div>');
    $('.janelacontrate').modal('show');
}
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit