AnonSec Shell
Server IP : 162.214.74.102  /  Your IP : 216.73.216.192
Web Server : Apache
System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64
User : lrsys ( 1015)
PHP Version : 5.6.40
Disable Function : exec,passthru,shell_exec,system
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/lrsys/www/lrsys_apps/imobles/application/plugins/module_imobles/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/lrsys/www/lrsys_apps/imobles/application/plugins/module_imobles/assets/js/enterprise-image.js
/* global bootbox */
var _url = $("#_url").val();

$(function () {
    findDataSelect("#filterTags", 'module_imobles/ajax/tags_' + $("#type_form").val(), '');
 
    $('#filterTags').on('change', function (event) {
        event.preventDefault();
        $('#form-filter').submit();
    });


    $(".edit_image").click(function (e) {
        var type = $(this).data("type");
        e.preventDefault();

        var $modal = $('#ajax-modal');

        $modal.load(_url + 'module_imobles/enterprises/editImage/' + $(this).data("id"), function () {
            $modal.modal();
            findDataSelect("#ajax-modal #tags", 'module_imobles/ajax/tags_' + type, '');
        });
    });



    $('body').on('click', '.submit_edit_image', function () {
        $.post(_url + "module_imobles/enterprises/postEditImage/", $("#form-post-edit-image").serialize())
                .done(function (data) {
                    location.reload();
                }
                );

    });

//tag backend
    var _msg_add_new_enterprise_img_backend_tags = $("#_msg_add_new_enterprise_img_backend_tags").val();
    var _msg_enterprise_img_backend_tags_name = $("#_msg_enterprise_img_backend_tags_name").val();
    var _msg_edit = $("#_msg_edit").val();
    var _msg_ok = $("#_msg_ok").val();
    var _msg_cancel = $("#_msg_cancel").val();


    var ib_form_bootboxboxbackend = "<form class=\"form-horizontal push-10\" method=\"post\" onsubmit=\"return false;\">\n    <div class=\"form-enterprise_img_backend_tags row\">\n        <div class=\"col-xs-12\">\n            <div class=\"form-material floating\">\n                <input class=\"form-control\" enterprise_img_backend_tags=\"text\" id=\"enterprise_img_backend_tags_name\" name=\"enterprise_img_backend_tags_name\">\n                <label for=\"enterprise_img_backend_tags_name\">" + _msg_enterprise_img_backend_tags_name + "</label>\n                           </div>\n        </div>\n    </div>\n\n</form>";


    var boxbackend;





    $('body').on('click', "#add_new_enterprise_img_backend_tags", function (e) {
        e.preventDefault();
        boxbackend = bootbox.dialog({
            title: _msg_add_new_enterprise_img_backend_tags,
            message: ib_form_bootboxboxbackend,
            buttons: {
                success: {
                    label: $("#_msg_save").val(),
                    className: "btn-primary",
                    callback: function () {

                        var enterprise_img_backend_tags_name_val = $('#enterprise_img_backend_tags_name').val();

                        $.post(_url + "module_imobles/enterpriseimgtagsbackend/post/", {name: enterprise_img_backend_tags_name_val})
                                .done(function (data) {

                                    if (data == 'OK') {
                                        toastr.success("Tag adicionada");
                                        //  location.reload();
                                    } else {
                                        bootbox.alert(data);
                                    }

                                });


                    }
                }
            },
            show: false
        }
        );
        boxbackend.modal('show');

        boxbackend.on("shown.bs.modal", function () {

            var enterprise_img_backend_tags_name = $('#enterprise_img_backend_tags_name');
            setTimeout(function () {
                enterprise_img_backend_tags_name.focus();
            }, 1000);

        });

    });




//box listing
    var _msg_add_new_enterprise_img_listing_tags = $("#_msg_add_new_enterprise_img_listing_tags").val();
    var _msg_enterprise_img_listing_tags_name = $("#_msg_enterprise_img_listing_tags_name").val();
    var _msg_edit = $("#_msg_edit").val();
    var _msg_ok = $("#_msg_ok").val();
    var _msg_cancel = $("#_msg_cancel").val();


    var ib_form_bootbox = "<form class=\"form-horizontal push-10\" method=\"post\" onsubmit=\"return false;\">\n    <div class=\"form-enterprise_img_listing_tags row\">\n        <div class=\"col-xs-12\">\n            <div class=\"form-material floating\">\n                <input class=\"form-control\" enterprise_img_listing_tags=\"text\" id=\"enterprise_img_listing_tags_name\" name=\"enterprise_img_listing_tags_name\">\n                <label for=\"enterprise_img_listing_tags_name\">" + _msg_enterprise_img_listing_tags_name + "</label>\n                           </div>\n        </div>\n    </div>\n\n</form>";


    var box;




    $('body').on('click', "#add_new_enterprise_img_listing_tags", function (e) {

        e.preventDefault();
        box = bootbox.dialog({
            title: _msg_add_new_enterprise_img_listing_tags,
            message: ib_form_bootbox,
            buttons: {
                success: {
                    label: $("#_msg_save").val(),
                    className: "btn-primary",
                    callback: function () {

                        var enterprise_img_listing_tags_name_val = $('#enterprise_img_listing_tags_name').val();

                        $.post(_url + "module_imobles/enterpriseimgtagslisting/post/", {name: enterprise_img_listing_tags_name_val})
                                .done(function (data) {

                                    if (data == 'OK') {
                                        toastr.success("Tag adicionada com sucesso")
                                    } else {
                                        bootbox.alert(data);
                                    }

                                });


                    }
                }
            },
            show: false
        }
        );

        box.modal('show');
        box.on("shown.bs.modal", function () {

            var enterprise_img_listing_tags_name = $('#enterprise_img_listing_tags_name');
            setTimeout(function () {
                enterprise_img_listing_tags_name.focus();
            }, 1000);

        });
    });
});

function confirmDeleteImage(id) {
    var dialog = bootbox.confirm({
        message: _L['module_imobles Delete Image?'],
        buttons: {
            confirm: {
                label: _L['Yes'],
                className: "btn-primary"
            },
            cancel: {
                label: _L['No'],
                className: "btn-danger"
            }
        },
        callback: function (result) {
            if (result == true) {

                $.post(_url + "module_imobles/enterprises/deleteImage", {id: id})
                        .done(function (data) {
                            if (data == "OK") {
                                $(".div_image_" + id).remove();
                                toastr.success(_L['module_imobles image delete success']);
                            } else {
                                var body = $("html, body");
                                body.animate({scrollTop: 0}, '1000', 'swing');
                                $("#emsgbody").html(data);
                                $("#emsg").show("slow");
                            }
                        });

            } else {
                dialog.modal('hide');
                return false;
            }
        }
    });
}

function uploadArquivo() {

    $.ajax(
            {
                type: 'POST',
                url: $("#_url").val() + "module_imobles/enterprises/postImages",
                data: new FormData($("#form-enterprises-images")[0]),
                processData: false,
                contentType: false,
                success: function (data) {
//                    if (data == "OK") {
                    location.reload();
//                    } else {
//                        var body = $("html, body");
//                        body.animate({scrollTop: 0}, '1000', 'swing');
//                        $("#emsgbody").html(data);
//                        $("#emsg").show("slow");
//                    }
                }
            });

}

Anon7 - 2022
AnonSec Team