1 $(document).ready(function () { 2 $('#comment-button:not(.comment-button-processed)').addClass('comment-button-processed').click(function() { 3 $("#comment-button").attr("disabled", "disabled"); 4 $('#message').html('<div class="loading">ÐодождиÑе, пожалÑйÑÑа...</div>'); 5 $('#message').show(); 6 7 var formData = $('#comment_form').serialize(); 8 $.ajax({ 9 type: 'POST', 10 url: '/_ext/commentpost.php', 11 data: formData, 12 datatype: 'json', 13 success: function(response) { 14 var msg = ''; 15 $('#message').delay(500).fadeOut(500); 16 $("#comment-button").removeAttr("disabled"); 17 $.each(response.msg, function(i, e) { 18 msg += e + '<br>'; 19 }); 20 if (msg.length) { 21 if (response.success === true) { 22 $('#form-post').html('<div class="form-post-ok">' + msg + '</div>'); 23 $("#comment_form").trigger('reset'); 24 } else { 25 $('#form-post').html('<div class="form-post">' + msg + '</div>'); 26 27 if(msg.indexOf("ÐевеÑнÑй код") !== -1){ 28 document.getElementsByName('code')[0].style.border = "1px solid red"; 29 document.getElementsByName('code')[0].style.backgroundColor = "rgba(218, 34, 56, 0.1)"; 30 } 31 else { 32 document.getElementsByName('code')[0].style.border = "1px solid #a6a6a6"; 33 document.getElementsByName('code')[0].style.backgroundColor = "#ffffff"; 34 } 35 36 if(msg.indexOf('ÐÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ подÑвеÑдиÑÑ ÑоглаÑие') !== -1){ 37 document.getElementsByName('chk_comment')[0].style.border = "1px solid red"; 38 document.getElementsByName('chk_comment')[0].style.backgroundColor = "rgba(218, 34, 56, 0.1)"; 39 } 40 else { 41 document.getElementsByName('chk_comment')[0].style.border = "1px solid #a6a6a6"; 42 document.getElementsByName('chk_comment')[0].style.backgroundColor = "#ffffff"; 43 } 44 45 if(msg.indexOf("ÐÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ ÑказаÑÑ Ð¸Ð¼Ñ") !== -1 || msg.indexOf("ÐÐ¼Ñ ÑодеÑÐ¶Ð¸Ñ Ð·Ð°Ð¿ÑеÑеннÑй Ñимвол") !== -1){ 46 document.getElementsByName('poster_name')[0].style.border = "1px solid red"; 47 document.getElementsByName('poster_name')[0].style.backgroundColor = "rgba(218, 34, 56, 0.1)"; 48 } 49 else { 50 document.getElementsByName('poster_name')[0].style.border = "1px solid #a6a6a6"; 51 document.getElementsByName('poster_name')[0].style.backgroundColor = "#ffffff"; 52 } 53 54 if(msg.indexOf("Указана невеÑÐ½Ð°Ñ Ñл. поÑÑа") !== -1 || msg.indexOf("ÐÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ ÑказаÑÑ e-mail") !== -1){ 55 document.getElementsByName('poster_email')[0].style.border = "1px solid red"; 56 document.getElementsByName('poster_email')[0].style.backgroundColor = "rgba(218, 34, 56, 0.1)"; 57 } 58 else { 59 document.getElementsByName('poster_email')[0].style.border = "1px solid #a6a6a6"; 60 document.getElementsByName('poster_email')[0].style.backgroundColor = "#ffffff"; 61 } 62 63 if(msg.indexOf("Ðе Ñказан ÑÑаÑÑÑ") !== -1) { 64 document.getElementsByName('poster_status')[0].style.border = "1px solid red"; 65 document.getElementsByName('poster_status')[0].style.backgroundColor = "rgba(218, 34, 56, 0.1)"; 66 } 67 else { 68 document.getElementsByName('poster_status')[0].style.border = "1px solid #a6a6a6"; 69 document.getElementsByName('poster_status')[0].style.backgroundColor = "#ffffff"; 70 } 71 72 if(msg.indexOf("ÐомменÑаÑий не Ð¼Ð¾Ð¶ÐµÑ Ð±ÑÑÑ Ð¿ÑÑÑÑм") !== -1 || msg.indexOf("ЧÑо Ñо поÑло Ð
72½Ðµ Ñак. ÐÐ°Ñ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑий ÑодеÑÐ¶Ð¸Ñ Ð·Ð°Ð¿ÑеÑеннÑе Ñлова.") !== -1 || msg.indexOf("ЧÑо Ñо поÑло не Ñак. ÐÐ°Ñ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑаÑий ÑодеÑÐ¶Ð¸Ñ ÑлиÑком много лаÑинÑÐºÐ¸Ñ Ñимволов.") !== -1){ 73 document.getElementsByName('comment')[0].style.border = "1px solid red"; 74 document.getElementsByName('comment')[0].style.backgroundColor = "rgba(218, 34, 56, 0.1)"; 75 } 76 else { 77 document.getElementsByName('comment')[0].style.border = "1px solid #a6a6a6"; 78 document.getElementsByName('comment')[0].style.backgroundColor = "#ffffff"; 79 } 80 } 81 } 82 console.log(response); 83 }, 84 error: function (xhr, ajaxOptions, thrownError) { 85 console.log(xhr.status); 86 console.log(thrownError); 87 } 88 }); 89 var date = new Date(); 90 $('#capcha').attr('src','/_ext/picutf.php?v=' + date.getTime()); 91 $('#code').val(''); 92 93 }); 94 });
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.