PageSourceSearch

https://bestpeopleclub.com/wp-content/themes/best-people/ajax-login-script.js

js bestpeopleclub.com collected 2026-10-06 10:47:32 UTC 4,222 bytes, 143 lines download raw bytes

1jQuery(document).ready(function ($) {
2
3    $('#registration-btn').on('click', function () {
4        $('#myModal').modal('hide');
5        $('#myModal2').modal('show');
6        return false;
7    });
8
9    $('form[name=loginform]').on('submit', function () {
10
11        var form = $(this);
12        var username = form.find('input[name=username]').val();
13        var password = form.find('input[name=password]').val();
14        var security = form.find('#security').val();
15        var method = form.attr('method');
16
17        $.ajax({
18            type: method,
19            dataType: 'json',
20            url: '/wp-admin/admin-ajax.php',
21            data: {
22                'action': 'ajaxlogin',
23                'username': username,
24                'password': password,
25                'security': security,
26                'isRegistration': false
27            },
28            success: function (data) {
29                if (data.loggedin == false) {
30                    form.find('.wrong').text(data.message).show();
31                } else {
32                    window.location.reload();
33                }
34            }
35        });
36
37        return false;
38    });
39
40    $('form[name=registrationform]').on('submit', function () {
41
42        var form = $(this);
43        var username = form.find('input[name=username]').val();
44        var password = form.find('input[name=password]').val();
45        var confirm = form.find('input[name=confirm]').val();
46        var email = form.find('input[name=email]').val();
47        var security = form.find('#security').val();
48        var method = form.attr('method');
49
50        $.ajax({
51            type: method,
52            dataType: 'json',
53            url: '/wp-admin/admin-ajax.php',
54            data: {
55                'action': 'ajaxlogin',
56                'username': username,
57                'password': password,
58                'confirm': confirm,
59                'email': email,
60                'security': security,
61                'isRegistration': true
62            },
63            success: function (data) {
64                if (data.loggedin == false) {
65                    var errors = '';
66                    for (var item in data.errors.errors) {
67                        if (data.errors.errors.hasOwnProperty(item)) {
68                            errors += data.errors.errors[item][0] + '<br>';
69                        }
70                    }
71                    form.find('.wrong').html(errors).show();
72                } else {
73                    window.location.reload();
74                }
75            }
76        });
77
78        return false;
79    });
80
81    $('#search_link').on('click', function () {
82        $('#search').toggleClass('show-search');
83    });
84
85    $("#datetimepicker5").find("input").datepicker().on('change', function () {
86        var date = $(this).val();
87        insertParam('date', date);
88    });
89    $('#tag-list').on('change', function(){
90        var tag = $(this).val();
91        insertParam('tag', tag);
92    });
93
94    $('#mycomment').on('submit', function(){
95        var text = $.trim($(this).find('input[name=comment]').val());
96        if(text == '') {
97            $(this).find('.wrong').show();
98            return false;
99        } else {
100            $(this).find('.wrong').hide();
101            return true;
102        }
103    });
104
105
106    function insertParam(key, value) {
107        key = encodeURI(key);
108        value = encodeURI(value);
109
110        var kvp = document.location.search.substr(1).split('&');
111
112        var i = kvp.length;
113        var x;
114        while (i--) {
115            x = kvp[i].split('=');
116
117            if (x[0] == key) {
118                x[1] = value;
119                kvp[i] = x.join('=');
120                break;
121            }
122        }
123        if (i < 0) {
124            kvp[kvp.length] = [key, value].join('=');
125        }
126        //this will reload the page, it's likely better to store this until finished
127        document.location.search = kvp.join('&');
128    }
129
130    var list = $('#list1');
131    $('.dropdown').hover(
132        function () {
133            if ($(window).width() > 991) {
134                list.css('border-bottom', '1px solid #ffffff');
135            }
136    },
137        function () {
138            list.css('border-bottom','none');
139        }
140    );
141
142});
143

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.