PageSourceSearch

https://volgainfo.net/apps/system/js/sitebillcore.js

js volgainfo.net collected 2026-09-26 05:04:07 UTC 5,960 bytes, 158 lines download raw bytes

1var SitebillCore={
2    ajaxRequest: function(ajax_options){
3        var options = {
4            async: true,
5            cache: true,
6            type: 'post',
7            dataType: '',
8            url: estate_folder+'/js/ajax.php',
9            data: {},
10            success: null,
11            error: null,
12            complete: null
13        }
14        options=$.extend({}, options, ajax_options);
15
16        var request_options = {}
17        request_options.type = options.type;
18        request_options.url = options.url;
19        request_options.data = options.data;
20        if(options.dataType != ''){
21            request_options.dataType = options.dataType;
22        }
23        if(typeof options.success == 'function'){
24            request_options.success = options.success;
25        }
26        if(typeof options.error == 'function'){
27            request_options.error = options.error;
28        }
29        if(typeof options.complete == 'function'){
30            request_options.complete = options.complete;
31        }
32        $.ajax(request_options);
33    },
34    getBodyScrollTop: function(){
35        return self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop);
36    },
37    frozenBody: function () {
38        $('body').css('overflow', 'hidden');
39    },
40    defrozenBody: function () {
41        $('body').css({'overflow': 'auto'});
42    },
43    getDialogPositionCoords: function (dialog_width, dialog_height) {
44        var w_width = (window.innerWidth) ? window.innerWidth : ((document.all) ? document.body.offsetWidth : null);
45        var w_height = (window.innerHeight) ? window.innerHeight : ((document.all) ? document.body.offsetHeight : null);
46        var scroll = this.getBodyScrollTop();
47        var dialog_w = dialog_width;
48        var dialog_h = dialog_height;
49        var dialog_top = ((w_height - dialog_h) / 2);
50        var dialog_left = ((w_width - dialog_w) / 2);
51        return Array(dialog_left, dialog_top + scroll);
52    },
53    isValidEmail: function (email)
54    {
55        return (/^([a-z0-9_-]+.)*[a-z0-9_-]+@([a-z0-9-]*[a-z0-9].)+[a-z]{2,4}$/i).test(email);
56    },
57    serializeFormJSON: function (el) {
58        var el = el;
59        var o = {};
60        var a = el.serializeArray();
61        $.each(a, function () {
62            var name = this.name.replace('[]', '');
63            if (o[name]) {
64                if (!o[name].push) {
65                    o[name] = [o[name]];
66                }
67                o[name].push(this.value || '');
68            } else {
69                o[name] = this.value || '';
70            }
71        });
72        return o;
73    },
74    formsubmit: function (el) {
75        var _this = $(el);
76
77        if (_this.data('valid_me') !== undefined && _this.data('valid_me').length > 0) {
78            var alertwin = $('<div class="modal fade" role="dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h3>Ошибка</h3></div><div class="modal-body"></div></div></div></div>');
79            var vm = _this.data('valid_me');
80            var form = _this.parents('form').eq(0);
81            for (var i in vm) {
82                var validated_element = form.find('#' + vm[i].id);
83                var validated_element_container_uploaded = validated_element.parents('.dropzone_outer').eq(0).parent().eq(0).find('ul.dz-preview-uploaded-list').eq(0);
84
85
86
87                var uploaded_now = validated_element.find('.dz-preview.dz-success').length;
88                var uploaded_yet = validated_element_container_uploaded.find('li').length;
89                if ((uploaded_now + uploaded_yet) < vm[i].count) {
90                    $('html, body').animate({
91                        scrollTop: $('#' + vm[i].id).offset().top
92                    }, 2000);
93                    alertwin.find('.modal-body').text('Согласно правилам сайта, необходимо добавить не менее ' + vm[i].count + ' фотографий!!!!');
94                    alertwin.appendTo($('body'));
95                    alertwin.modal('show');
96                    //alert('Необходимо указать минимум '+vm[i].count+' изображений');
97                    return false;
98                }
99            }
100        }
101
102
103        _this.hide();
104        $('<p class="loading">Сохраняю данные...</p>').insertAfter(_this).slideDown("fast");
105        return true;
106    },
107    number_format: function (number, decimals, dec_point, thousands_sep) {
108        var i, j, kw, kd, km;
109
110        if (isNaN(decimals = Math.abs(decimals))) {
111            decimals = 2;
112        }
113        if (dec_point == undefined) {
114            dec_point = ",";
115        }
116        if (thousands_sep == undefined) {
117            thousands_sep = ".";
118        }
119
120        i = parseInt(number = (+number || 0).toFixed(decimals)) + "";
121
122        if ((j = i.length) > 3) {
123            j = j % 3;
124        } else {
125            j = 0;
126        }
127
128        km = (j ? i.substr(0, j) + thousands_sep : "");
129        kw = i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + thousands_sep);
130        kd = (decimals ? dec_point + Math.abs(number - i).toFixed(decimals).replace(/-/, 0).slice(2) : "");
131
132        return km + kw + kd;
133    }
134};
135function loadScript_beta(url, callback)
136{
137    var head = document.getElementsByTagName('head')[0];
138    var script = document.createElement('script');
139    script.type = 'text/javascript';
140    script.src = url;
141
142    script.onreadystatechange = callback;
143    script.onload = callback;
144
145    head.appendChild(script);
146}
147
148var googleAnalytics_beta = function () {
149    
vendor: 155 bytes, lines 149-155
149window.dataLayer = window.dataLayer || [];
150    function gtag() {
151        dataLayer.push(arguments);
152    }
153    gtag('js', new Date());
154
155    gtag('config', '
155UA-4228243-28
vendor: 4 bytes, line 155
155');
156};
157
158loadScript_beta("https://www.googletagmanager.com/gtag/js?id=UA-4228243-28", googleAnalytics_beta);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.