PageSourceSearch

https://www.aelga.com/tpl/en_aelga/assets/js/liuyan.js?v=260126

js aelga.com collected 2026-10-09 23:36:54 UTC 5,345 bytes, 141 lines download raw bytes

1
2$(function () {
3    $('.form2').on('click', '.send2', function (event) {
4        event.preventDefault();
5        var jForm = $(event.delegateTarget), jThis = $(this);
6        if (jThis.hasClass('disabled')) {
7            alert('Please wait...');
8            return;
9        }
10
11        var reg_email = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/;
12
13        var data = {
14            id: 'book', _spam: '{$session.project_spam}',
15            title: $('input[name="title"]', jForm).val().trim(),
16            fullname: $('input[name="fullname"]', jForm).val().trim(),
17            email: $('input[name="email"]', jForm).val().trim(),
18            content: $('textarea[name="content"]', jForm).val().trim(),
19        };
20
21
22        if (!data.email || !reg_email.test(data.email)) {
23            alert('Please enter a valid email address.');
24            // alert('请输入一个有效的邮箱地址。');
25            $('input[name="email"]', jForm).focus();
26            return false;
27        } else if (!data.title) {
28            alert('The Subject cannot be empty.');
29            // alert('请输入留言主题。');
30            $('input[name="title"]', jForm).focus();
31            return false;
32        } else if (!data.content) {
33            alert('The message cannot be empty.');
34            // alert('请输入留言内容。');
35            $('textarea[name="content"]', jForm).focus();
36            return false;
37        } else if (!data.fullname) {
38            alert('The name cannot be empty.');
39            // alert('请输入姓名。');
40            $('input[name="fullname"]', jForm).focus();
41            return false;
42        }
43
44
45        jThis.css({opacity: '.5'}).addClass('disabled');
46
47        $.ajax({
48            'url' : '/api.php?c=post&f=save&_t='+(new Date().getTime()),
49            'data': jForm.serializeArray(),
50            'type' : 'post',
51            'dataType' : 'json',
52            'success' : function (rs) {
53                jThis.css({opacity: '1'}).removeClass('disabled');
54                if (rs.status == 'ok') {
55                    // alert('您的留言已提交,请耐心等候管理员回复。');
56                    if (jForm.hasClass('form2')) {
57                    // alert('Your message has been posted, please wait patiently administrator audit, thank you for your submission.');
58                        location.href = '/message-true.html';
59                    } else {
60                        jForm.get(0).reset();
61                    }
62                } else {
63                    alert(rs.content);
64                    return false;
65                }
66            }
67        });
68        return false;
69    });
70});
71
72
73$(function () {
74    $('.form3').on('click', '.send3', function (event) {
75        event.preventDefault();
76        var jForm = $(event.delegateTarget), jThis = $(this);
77        if (jThis.hasClass('disabled')) {
78            alert('Please wait...');
79            return;
80        }
81
82        var reg_email = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/;
83
84        var data = {
85            id: 'book', _spam: '{$session.project_spam}',
86            title: $('input[name="title"]', jForm).val().trim(),
87            fullname: $('input[name="fullname"]', jForm).val().trim(),
88            email: $('input[name="email"]', jForm).val().trim(),
89            content: $('textarea[name="content"]', jForm).val().trim(),
90        };
91
92
93        if (!data.email || !reg_email.test(data.email)) {
94            alert('Please enter a valid email address.');
95            // alert('请输入一个有效的邮箱地址。');
96            $('input[name="email"]', jForm).focus();
97            return false;
98        } else if (!data.title) {
99            alert('The Subject cannot be empty.');
100            // alert('请输入留言主题。');
101            $('input[name="title"]', jForm).focus();
102            return false;
103        } else if (!data.content) {
104            alert('The message cannot be empty.');
105            // alert('请输入留言内容。');
106            $('textarea[name="content"]', jForm).focus();
107            return false;
108        } else if (!data.fullname) {
109            alert('The name cannot be empty.');
110            // alert('请输入姓名。');
111            $('input[name="fullname"]', jForm).focus();
112            return false;
113        }
114
115
116        jThis.css({opacity: '.5'}).addClass('disabled');
117
118        $.ajax({
119            'url' : '/api.php?c=post&f=save&_t='+(new Date().getTime()),
120            'data': jForm.serializeArray(),
121            'type' : 'post',
122            'dataType' : 'json',
123            'success' : function (rs) {
124                jThis.css({opacity: '1'}).removeClass('disabled');
125                if (rs.status == 'ok') {
126                    // alert('您的留言已提交,请耐心等候管理员回复。');
127                    if (jForm.hasClass('form3')) {
128                    // alert('Your message has been posted, please wait patiently administrator audit, thank you for your submission.');
129                        location.href = '/message-true.html';
130                    } else {
131                        jForm.get(0).reset();
132                    }
133                } else {
134                    alert(rs.content);
135                    return false;
136                }
137            }
138        });
139        return false;
140    });
141});

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.