PageSourceSearch

https://khcn.vnua.edu.vn/themes/default/js/users.js

js vnua.edu.vn collected 2026-10-02 03:42:20 UTC 25,138 bytes, 616 lines download raw bytes

1/**
2 * @Project NUKEVIET 4.x
3 * @Author VINADES.,JSC ( [email protected] )
4 * @Copyright ( C ) 2014 VINADES.,JSC. All rights reserved
5 * @License GNU/GPL version 2 or any later version
6 * @Createdate 1 - 31 - 2010 5 : 12
7 */
8
9function addpass() {
10    $("a[href*=edit_password]").click();
11    return !1
12}
13
14function safe_deactivate_show(a, b) {
15    $(b).hide(0);
16    $(a).fadeIn();
17    return !1
18}
19
20function safekeySend(a) {
21    $(".safekeySend", a).prop("disabled", !0);
22    $.ajax({
23        type: $(a).prop("method"),
24        cache: !1,
25        url: $(a).prop("action"),
26        data: $(a).serialize() + '&resend=1',
27        dataType: "json",
28        success: function(e) {
29            "error" == e.status ? ($(".safekeySend", a).prop("disabled", !1), $(".tooltip-current", a).removeClass("tooltip-current"), $("[name=\"" + e.input + "\"]", a).addClass("tooltip-current").attr("data-current-mess", $("[name=\"" + e.input + "\"]", a).attr("data-mess")), validErrorShow($("[name=\"" + e.input + "\"]", a))) : ($(".nv-info", a).html(e.mess).removeClass("error").addClass("success").show(), setTimeout(function() {
30                var d = $(".nv-info", a).attr("data-default");
31                if (!d) d = $(".nv-info-default", a).html();
32                $(".nv-info", a).removeClass("error success").html(d);
33                $(".safekeySend", a).prop("disabled", !1);
34            }, 6E3))
35        }
36    });
37    return !1
38}
39
40function changeAvatar(a) {
41    if (nv_safemode) return !1;
42    nv_open_browse(a, "NVImg", 650, 430, "resizable=no,scrollbars=1,toolbar=no,location=no,status=no");
43    return !1;
44}
45
46function deleteAvatar(a, b, c) {
47    if (nv_safemode) return !1;
48    $(c).prop("disabled", !0);
49    $.ajax({
50        type: 'POST',
51        cache: !1,
52        url: nv_base_siteurl + 'index.php?' + nv_lang_variable + '=' + nv_lang_data + '&' + nv_name_variable + '=users&' + nv_fc_variable + '=avatar/del',
53        data: 'checkss=' + b + '&del=1',
54        dataType: 'json',
55        success: function(e) {
56            $(a).attr("src", $(a).attr("data-default"));
57        }
58    });
59    return !1
60}
61
62function datepickerShow(a) {
63    if ("object" == typeof $.datepicker) {
64        $(a).datepicker({
65            dateFormat: "dd/mm/yy",
66            changeMonth: !0,
67            changeYear: !0,
68            showOtherMonths: !0,
69            showOn: "focus",
70            yearRange: "-90:+0"
71        });
72        $(a).css("z-index", "1000").datepicker('show');
73    }
74}
75
76function button_datepickerShow(a) {
77    var b = $(a).parent();
78    datepickerShow($(".datepicker", b))
79}
80
81function verkeySend(a) {
82    $(".has-error", a).removeClass("has-error");
83    var d = 0;
84    $(a).find("input.required,textarea.required,select.required,div.required").each(function() {
85        var b = $(this).prop("tagName");
86        "INPUT" != b && "TEXTAREA" != b || "password" == $(a).prop("type") || "radio" == $(a).prop("type") || "checkbox" == $(a).prop("type") || $(this).val(trim(strip_tags($(this).val())));
87        if (!validCheck(this)) return d++, $(".tooltip-current", a).removeClass("tooltip-current"), $(this).addClass("tooltip-current").attr("data-current-mess", $(this).attr("data-mess")), validErrorShow(this), !1
88    });
89    d || ($("[name=vsend]", a).val("1"), $("[type=submit]", a).click());
90    return !1
91}
92
93function showQlist(a) {
94    var b = $(".qlist", $(a).parent().parent());
95    if ("no" == b.attr("data-show")) b.attr("data-show", "yes").show();
96    else b.attr("data-show", "no").hide();
97    return !1
98}
99
100function addQuestion(a) {
101    var b = $(a).parent().parent().parent().parent();
102    $("[name=your_question]", b).val($(a).text());
103    $(".qlist", b).attr("data-show", "no").hide();
104    return !1
105}
106
107function usageTermsShow(t) {
108    $.ajax({
109        type: 'POST',
110        cache: !0,
111        url: nv_base_siteurl + 'index.php?' + nv_lang_variable + '=' + nv_lang_data + '&' + nv_name_variable + '=users&' + nv_fc_variable + '=register',
112        data: 'get_usage_terms=1',
113        dataType: 'html',
114        success: function(e) {
115            if ($('#sitemodal').length) {
116                if (!$('#sitemodalTerm').length) {
117                    $('body').append('<div id="sitemodalTerm" class="modal fade" role="dialog">' + $('#sitemodal').html() + '</div>')
118                }
119                "" != t && 'undefined' != typeof t && $("#sitemodalTerm .modal
119-content").prepend('<div class="modal-header"><h2 class="modal-title">' + t + '</h2></div>');
120                $("#sitemodalTerm").find(".modal-title").html(t);
121                $("#sitemodalTerm").find(".modal-body").html(e);
122                $('#sitemodalTerm').on('hidden.bs.modal', function () {
123                    $("#sitemodalTerm .modal-content").find(".modal-header").remove()
124                });
125                $("#sitemodalTerm").modal({backdrop: "static"})
126            } else {
127                alert(strip_tags(e))
128            }
129        }
130    });
131    return !1
132}
133
134function validErrorShow(a) {
135    $(a).parent().parent().addClass("has-error");
136    $("[data-mess]", $(a).parent().parent().parent()).not(".tooltip-current").tooltip("destroy");
137    $(a).tooltip({
138       container: "body",
139        placement: "bottom",
140        title: function() {
141            return "" != $(a).attr("data-current-mess") ? $(a).attr("data-current-mess") : nv_required
142        }
143    });
144    $(a).focus().tooltip("show");
145    "DIV" == $(a).prop("tagName") && $("input", a)[0].focus()
146}
147
148function validCheck(a) {
149    if ($(a).is(':visible')) {
150        var c = $(a).attr("data-pattern"),
151            d = $(a).val(),
152            b = $(a).prop("tagName"),
153            e = $(a).prop("type");
154        if ("INPUT" == b && "email" == e) {
155            if (!nv_mailfilter.test(d)) return !1
156        } else if ("SELECT" == b) {
157            if (!$("option:selected", a).length) return !1
158        } else if ("DIV" == b && $(a).is(".radio-box")) {
159            if (!$("[type=radio]:checked", a).length) return !1
160        } else if ("DIV" == b && $(a).is(".check-box")) {
161            if (!$("[type=checkbox]:checked", a).length) return !1
162        } else if ("INPUT" == b || "TEXTAREA" == b) if ("undefined" == typeof c || "" == c) {
163            if ("" == d) return !1
164        } else if (a = c.match(/^\/(.*?)\/([gim]*)$/), !(a ? new RegExp(a[1], a[2]) : new RegExp(c)).test(d)) return !1;
165    }
166    return !0
167}
168
169function validErrorHidden(a, b) {
170    if (!b) b = 2;
171    b = parseInt(b);
172    var c = $(a),
173        d = $(a);
174    for (var i = 0; i < b; i++) {
175        c = c.parent();
176        if (i >= 2) d = d.parent()
177    }
178    d.tooltip("destroy");
179    c.removeClass("has-error")
180}
181
182function formErrorHidden(a) {
183    $(".has-error", a).removeClass("has-error");
184    $("[data-mess]", a).tooltip("destroy")
185}
186
187function validReset(a) {
188    var d = $(".nv-info", a).attr("data-default");
189    if (!d) d = $(".nv-info-default", a).html();
190    $(".nv-info", a).removeClass("error success").html(d);
191    formErrorHidden(a);
192    $("input,button,select,textarea", a).prop("disabled", !1);
193    $(a)[0].reset()
194}
195
196function login_validForm(a) {
197    $(".has-error", a).removeClass("has-error");
198    var c = 0,
199        b = [];
200    $(a).find(".required").each(function() {
201        "password" == $(a).prop("type") && $(this).val(trim(strip_tags($(this).val())));
202        if (!validCheck(this)) return c++, $(".tooltip-current", a).removeClass("tooltip-current"), $(this).addClass("tooltip-current").attr("data-current-mess", $(this).attr("data-mess")), validErrorShow(this), !1
203    });
204    c || (b.type = $(a).prop("method"), b.url = $(a).prop("action"), b.data = $(a).serialize(), formErrorHidden(a), $(a).find("input,button,select,textarea").prop("disabled", !0), $.ajax({
205        type: b.type,
206        cache: !1,
207        url: b.url,
208        data: b.data,
209        dataType: "json",
210        success: function(d) {
211            var b = $("[onclick*='change_captcha']", a);
212            b && b.click();
213            if (d.status == "error") {
214                $("input,button", a).not("[type=submit]").prop("disabled", !1), 
215                $(".tooltip-current", a).removeClass("tooltip-current"), 
216                "" != d.input ? $(a).find("[name=\"" + d.input + "\"]").each(function() {
217                    $(this).addClass("tooltip-current").attr("data-current-mess", d.mess);
218                    validErrorShow(this)
219                }) : $(".nv-info", a).html(d.mess).addClass("error").show(), setTimeout(function() {
220                    $("[type=submit]", a).prop("disabled", !1)
221                }, 1E3)
222            } else if (d.status == "ok") {
223                $(".nv-info", a).html(d.mess + '<span class="load-bar"></span>').removeClass("error").addClass("success").show(), 
224                $(".form-detail", a).hide(), $("#other_form").hide(), setTimeout(function() {
225                    if( "undefined" != typeof d.redirect && "" != d.redirect){
226                         window.location.href = d.redirect;
227                    }else{
228                         $('#sitemodal').modal('hide');
229                         window.location.href = window.location.href;
230                    }
231                }, 3E3)
232            } else if (d.status == "2steprequire") {
233                $(".form-detail", a).hide(), $("#other_form").hide();
234                $(".nv-info", a).html("<a href=\"" + d.input + "\">" + d.mess + "</a>").removeClass("error").removeClass("success").addClass("info").show();
235            } else {
236                $("input,button", a).prop("disabled", !1);
237                $('.loginstep1, .loginstep2, .loginCaptcha', a).toggleClass('hidden');
238            }
239        }
240    }));
241    return !1
242}
243
244function reg_validForm(a) {
245    $(".has-error", a).removeClass("has-error");
246    var d = 0,
247        c = [];
248    $(a).find("input.required,textarea.required,select.required,div.required").each(function() {
249        var b = $(this).prop("tagName");
250        "INPUT" != b && "TEXTAREA" != b || "password" == $(a).prop("type") || "radio" == $(a).prop("type") || "checkbox" == $(a).prop("type") || $(this).val(trim(strip_tags($(this).val())));
251        if (!validCheck(this)) return d++, $(".tooltip-current", a).removeClass("tooltip-current"), $(this).addClass("tooltip-current").attr("data-current-mess", $(this).attr("data-mess")), validErrorShow(this), !1
252    });
253    d || (c.type = $(a).prop("method"), c.url = $(a).prop("action"), c.data = $(a).serialize(), formErrorHidden(a), $(a).find("input,button,select,textarea").prop("disabled", !0), $.ajax({
254        type: c.type,
255        cache: !1,
256        url: c.url,
257        data: c.data,
258        dataType: "json",
259        success: function(b) {
260            var c = $("[onclick*='change_captcha']", a);
261            c && c.click();
262            "error" == b.status ? ($("input,button,select,textarea", a).prop("disabled", !1), $(".tooltip-current", a).removeClass("tooltip-current"), "" != b.input ? $(a).find("[name=\"" + b.input + "\"]").each(function() {
263                $(this).addClass("tooltip-current").attr("data-current-mess", b.mess);
264                validErrorShow(this)
265            }) : ($(".nv-info", a).html(b.mess).addClass("error").show(), $("html, body").animate({
266                scrollTop: $(".nv-info", a).offset().top
267            }, 800))) : ($(".nv-info", a).html(b.mess + '<span class="load-bar"></span>').removeClass("error").addClass("success").show(), ("ok" == b.input ? setTimeout(function() {
268                $(".nv-info", a).fadeOut();
269                $("input,button,select,textarea", a).prop("disabled", !1);
270                $("[onclick*=validReset]", a).click()
271            }, 6E3) : $("html, body").animate({
272                scrollTop: $(".nv-info", a).offset().top
273            }, 800, function() {
274                $(".form-detail", a).hide();
275                setTimeout(function() {
276                    window.location.href = "" != b.input ? b.input : window.location.href
277                }, 6E3)
278            })))
279        },
280        error: function (xhr, opt, err) {
281            if (window.console.log) {
282                console.log(xhr.status + ': ' + err);
283            } else {
284                alert(xhr.status + ': ' + err);
285            }
286        }
287    }));
288    return !1
289}
290
291function lostpass_validForm(a) {
292    $(".has-error", a).removeClass("has-error");
293    var d = 0,
294        c = [];
295    $(a).find("input.required,textarea.required,select.required,div.required").each(function() {
296        var b = $(this).prop("tagName");
297        "INPUT" != b && "TEXTAREA" != b || "password" == $(a).prop("type") || "radio" == $(a).prop("type") || "checkbox" == $(a).prop("type") || $(this).val(trim(strip_tags($(this).val())));
298        if (!validCheck(this)) return d++, $(".tooltip-current", a).removeClass("tooltip-current"), $(this).addClass("tooltip-current").attr("data-current-mess", $(this).attr("data-mess")), validErrorShow(this), !1
299    });
300    d || (c.type = $(a).prop("method"), c.url = $(a).prop("action"), c.data = $(a).serialize(), formErrorHidden(a), $(a).find("input,button,select,textarea").prop("disabled", !0), $.ajax({
301        type: c.type,
302        cache: !1,
303        url: c.url,
304        data: c.data,
305        dataType: "json",
306        success: function(b) {
307            if (b.status == "error") {
308                $("[name=step]",a).val(b.step);
309                 if(b.step == 'step1') $("[onclick*='change_captcha']", a).click();
310                 if("undefined" != typeof b.info && "" != b.info) $(".nv-info",a).removeClass('error success').text(b.info);
311                $("input,button", a).prop("disabled", !1);
312                $(".required",a).removeClass("required");
313                $(".tooltip-current", a).removeClass("tooltip-current");
314                $("[class*=step]", a).hide();
315                $("." + b.step + " input", a).addClass("required");
316                $("." + b.step, a).show();
317                $(a).find("[name=" + b.input + "]").each(function() {
318                    $(this).addClass("tooltip-current").attr("data-current-mess", b.mess);
319                    validErrorShow(this)
320                })
321            } else {
322                 $(".nv-info", a).html(b.mess + '<span class="load-bar"></span>').removeClass("error").addClass("success").show();
323                 setTimeout(function() {
324                window.location.href = b.input
325                }, 6E3)
326            }
327        }
328    }));
329    return !1
330}
331
332function changemail_validForm(a) {
333    $(".has-error", a).removeClass("has-error");
334    var d = 0,
335        c = [];
336    $(a).find("input.required,textarea.required,select.required,div.required").each(function() {
337        var b = $(this).prop("tagName");
338        "INPUT" != b && "TEXTAREA" != b || "password" == $(a).prop("type") || "radio" == $(a).prop("type") || "checkbox" == $(a).prop("type") || $(this).val(trim(strip_tags($(this).val())));
339        if (!validCheck(this)) return d++, $(".tooltip-current", a).removeClass("tooltip-current"), $(this).addClass("tooltip-current").attr("data-current-mess", $(this).attr("data-mess")), validErrorShow(this), !1
340    });
341    d || (c.type = $(a).prop("method"), c.url = $(a).prop("action"), c.data = $(a).serialize(), formErrorHidden(a), $(a).find("input,button,select,textarea").prop("disabled", !0), $.ajax({
342        type: c.type,
343        cache: !1,
344        url: c.url,
345        data: c.data,
346        dataType: "json",
347        success: function(b) {
348            $("[name=vsend]", a).val("0");
349            "error" == b.status ? ($("input,button,select,textarea", a).prop("disabled", !1), $(".tooltip-current", a).removeClass("tooltip-current"), $(a).find("[name=" + b.input + "]").each(function() {
350                $(this).addClass("tooltip-current").attr("data-current-mess", b.mess);
351                validErrorShow(this)
352            })) : ($(".nv-info", a).html(b.mess + '<span class="load-bar"></span>').removeClass("error").addClass("success").show(), ("ok" == b.status ? setTimeout(function() {
353                $(".nv-info", a).fadeOut();
354                $("input,button,select,textarea", a).prop("disabled", !1)
355            }, 6E3) : $("html, body").animate({
356                scrollTop: $(".nv-info", a).offset().top
357            }, 800, function() {
358                $(".form-detail", a).hide();
359                setTimeout(function() {
360                    window.location.href = "" != b.input ? b.input : window.location.href
361                }, 6E3)
362            })))
363        }
364    }));
365    return !1
366}
367
368function bt_logout(a) {
369    $(a).prop("disabled", !0);
370    $.ajax({
371        type: 'POST',
372        cache: !1,
373        url: nv_base_siteurl + 'index.php?' + nv_lang_variable + '=' + nv_lang_data + '&' + nv_name_variable + '=users&' + nv_fc_variable + '=logout&nocache=' + new Date().getTime(),
374        data: 'nv_ajax_login=1',
375        dataType: 'html',
376        success: function(e) {
377            $('.userBlock', $(a).parent().parent().parent().parent()).hide();
378            $('.nv-info', $(a).parent().parent().parent().parent()).addClass("text-center success").html(e).show();
379            setTimeout(function() {
380                window.location.href = window.location.href
381            }, 2E3)
382        }
383    });
384    return !1
385}
386
387function login2step_change(ele) {
388    var ele = $(ele), form = ele, i = 0;
389    while (!form.is('form')) {
390        if (i++ > 10) {
391            break;
392        }
393        form = form.parent();
394    }
395    if (form.is('form')) {
396        $('.loginstep2 input,.loginstep3 input', form).val('');
397        $('.loginstep2,.loginstep3', form).toggleClass('hidden');
398    }
399    return false;
400}
401
402var UAV = {};
403// Default config, replace it with your own
404UAV.config = {
405    inputFile: 'image_file',
406    uploadIcon: 'upload_icon',
407    pattern: /^(image\/jpeg|image\/png)$/i,
408    maxsize: 2097152,
409    avatar_width: 80,
410    avatar_height: 80,
411    max_width: 1500,
412    max_height: 1500,
413    target: 'preview',
414    uploadInfo: 'uploadInfo',
415    uploadGuide: 'guide',
416    x1: 'x1',
417    y1: 'y1',
418    x2: 'x2',
419    y2: 'y2',
420    w: 'w',
421    h: 'h',
422    originalDimension: 'original-dimension',
423    displayDimension: 'display-dimension',
424    imageType: 'image-type',
425    imageSize: 'image-size',
426    btnSubmit: 'btn-submit',
427    btnReset: 'btn-reset',
428    uploadForm: 'upload-form'
429};
430// Default language, replace it with your own
431UAV.lang = {
432    bigsize: 'File too large',
433    smallsize: 'File too small',
434    filetype: 'Only accept jmage file tyle',
435    bigfile: 'File too big',
436    upload: 'Please upload and drag to crop'
437};
438UAV.data = {
439    error: false,
440    busy: false,
441    jcropApi: null
442};
443UAV.tool = {
444    bytes2Size: function(bytes) {
445        var sizes = ['Bytes', 'KB', 'MB'];
446        if (bytes == 0) return 'n/a';
447        var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
448        return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
449    },
450    update: function(e) {
451        $('#' + UAV.config.x1).val(e.x);
452        $('#' + UAV.config.y1).val(e.y);
453        $('#' + UAV.config.x2).val(e.x2);
454        $('#' + UAV.config.y2).val(e.y2);
455    },
456    clear: function(e) {
457        $('#' + UAV.config.x1).val(0);
458        $('#' + UAV.config.y1).val(0);
459        $('#' + UAV.config.x2).val(0);
460        $('#' + UAV.config.y2).val(0);
461    }
462};
463// Please use this package with Jcrop http://deepliquid.com/content/Jcrop.html
464UAV.common = {
465    read: function(file) {
466        $('#' + UAV.config.uploadIcon).hide();
467        var fRead = new FileReader();
468        fRead.onload = function(e) {
469            $('#' + UAV.config.target).show();
470            $('#' + UAV.config.target).attr('src', e.target.result);
471            $('#' + UAV.config.target).on('load', function() {
472                var img = document.getElementById(UAV.config.target);
473                var boxWidth = $('#' + UAV.config.target).innerWidth();
474                var boxHeight = Math.round(boxWidth * img.naturalHeight / img.naturalWidth);
475                if (img.naturalWidth > UAV.config.max_width || img.naturalHeight > UAV.config.max_height) {
476                    UAV.common.error(UAV.lang.bigsize);
477                    UAV.data.error = true;
478                    return false;
479                }
480                if (img.naturalWidth < UAV.config.avatar_width || img.naturalHeight < UAV.config.avatar_height) {
481                    UAV.common.error(UAV.lang.smallsize);
482                    UAV.data.error = true;
483                    return false;
484                }
485                if (!UAV.data.error) {
486                    // Hide and show data
487                    $('#' + UAV.config.uploadGuide).hide();
488                    $('#' + UAV.config.uploadInfo).show();
489                    $('#' + UAV.config.imageType).html(file.type);
490                    $('#' + UAV.config.imageSize).html(UAV.tool.bytes2Size(file.size));
491                    $('#' + UAV.config.originalDimension).html(img.naturalWidth + ' x ' + img.naturalHeight);
492                    console.log()
493                    $('#' + UAV.config.target).Jcrop({
494                        minSize: [UAV.config.avatar_width, UAV.config.avatar_height],
495                        setSelect: [300, 300, 55, 55],
496                        aspectRatio: 1,
497                        bgFade: true,
498                        bgOpacity: .3,
499                        boxWidth: boxWidth,
500                        boxHeight: boxHeight,
501                        onChange: function(e) {
502                            UAV.tool.update(e);
503                        },
504                        onSelect: function(e) {
505                            UAV.tool.update(e);
506                        },
507                        onRelease: function(e) {
508                            UAV.tool.clear(e);
509                        }
510                    }, function() {
511                        $('#' + UAV.config.w).val(boxWidth);
512                        $('#' + UAV.config.h).val(boxHeight);
513                        $('#' + UAV.config.displayDimension).html(boxWidth + ' x ' + boxHeight);
514                        UAV.data.jcropApi = this;
515                    });
516                } else {
517                    $('#' + UAV.config.uploadIcon).show();
518                }
519            });
520        };
521        fRead.readAsDataURL(file);
522    },
523    init: function() {
524        UAV.data.error = false;
525        if ($('#' + UAV.config.inputFile).val() == '') {
526            UAV.data.error = true;
527        }
528        var image = $('#' + UAV.config.inputFile)[0].files[0];
529        // Check ext
530        if (!UAV.config.pattern.test(image.type)) {
531            UAV.common.error(UAV.lang.filetype);
532            UAV.data.error = true;
533        }
534        // Check size
535        if (image.size > UAV.config.maxsize) {
536            UAV.common.error(UAV.lang.bigfile);
537            UAV.data.error = true;
538        }
539        if (!UAV.data.error) {
540            // Read image
541            UAV.common.read(image);
542        }
543    },
544    error: function(e) {
545        UAV.common.reset();
546        alert(e);
547    },
548    reset: function() {
549        if (UAV.data.jcropApi != null) {
550            UAV.data.jcropApi.destroy();
551        }
552        UAV.data.error = false;
553        UAV.data.busy = false;
554        UAV.tool.clear();
555        $('#' + UAV.config.target).removeAttr('src').removeAttr('style').hide();
556        $('#' + UAV.config.uploadIcon).show();
557        $('#' + UAV.config.uploadInfo).hide();
558        $('#' + UAV.config.uploadGuide).show();
559        $('#' + UAV.config.imageType).html('');
560        $('#' + UAV.config.imageSize).html('');
561        $('#' + UAV.config.originalDimension).html('');
562        $('#' + UAV.config.w).val('');
563        $('#' + UAV.config.h).val('');
564        $('#' + UAV.config.displayDimension).html('');
565    },
566    submit: function() {
567        if (!UAV.data.busy) {
568            if ($('#' + UAV.config.x2).val() == '' || $('#' + UAV.config.x2).val() == '0') {
569                alert(UAV.lang.upload);
570                return false;
571            }
572            UAV.data.busy = true;
573            return true;
574        }
575        return false;
576    }
577};
578UAV.init = function() {
579    $('#' + UAV.config.uploadIcon).click(function() {
580        $('#' + UAV.config.inputFile).trigger('click');
581    });
582    $('#' + UAV.config.inputFile).change(function() {
583        UAV.common.init();
584    });
585    $('#' + UAV.config.btnReset).click(function() {
586        if (!UAV.data.busy) {
587            UAV.common.reset();
588            $('#' + UAV.config.uploadIcon).trigger('click');
589        }
590    });
591    $('#' + UAV.config.uploadForm).submit(function() {
592        return UAV.common.submit();
593    });
594};
595
596$(document).ready(function() {
597    // Delete user handler
598    $('[data-toggle="admindeluser"]').click(function(e) {
599        e.preventDefault();
600        var data = $(this).data();
601        if (confirm(nv_is_del_confirm[0])) {
602            $.post(data.link, 'userid=' + data.userid, function(res) {
603                if (res == 'OK') {
604                    window.location.href = data.back;
605                } else {
606                    var r_split = res.split("_");
607                    if (r_split[0] == 'ERROR') {
608                        alert(r_split[1]);
609                    } else {
610                        alert(nv_is_del_confirm[2]);
611                    }
612                }
613            });
614        }
615    });
616});

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.