1function showWindow(title, text) { 2 $('#windowtitle').html(title); 3 $('#windowtext').html(text); 4 $('#windowback').css('display', 'block'); 5} 6 7function getCall() { 8 var name = $('#feedbackname').val(); 9 var phone = $('#feedbackphone').val(); 10 11 if (name == null || name.length < 1) { 12 showWindow('ÐÑибка!', '<span class="red">Ðоле ÐÐЯ не должно бÑÑÑ Ð¿ÑÑÑÑм!</span'); 13 return; 14 } 15 if (phone == null || phone.length < 1) { 16 showWindow('ÐÑибка!', '<span class="red">Ðоле ТÐÐÐФÐРне должно бÑÑÑ Ð¿ÑÑÑÑм!</span'); 17 return; 18 } 19 20 $.ajax({ 21 url: "ajax/getcall.php", 22 data: {name: name, phone: phone}, 23 dataType: 'text', 24 success: function(data){ 25 showWindow('СпаÑибо!', '<span class="green">РближайÑее вÑÐµÐ¼Ñ Ð½Ð°Ñи менеджеÑÑ ÑвÑжÑÑÑÑ Ñ Ðами.</span'); 26 } 27 }); 28} 29 30function clearForms() { 31 $('#feedbackname').val(''); 32 $('#feedbackphone').val(''); 33 $('#popupfeedbackname').val(''); 34 $('#popupfeedbackphone').val(''); 35 $('#popupresult').html(''); 36 $('.popupform').show(); 37} 38 39function clearCartWindow() { 40 // $('#cartwindow').html(''); 41} 42 43function getCallPopup() { 44 var name = $('#popupcallname').val(); 45 var phone = $('#popupcallphone').val(); 46 //var email = $('#popupcallemail').val(); 47 var privacy = $('#privacyCall').prop('checked'); 48 var captcha = $('#popupcallcaptcha').val(); 49 50 if (!privacy) { 51 $('.popupresult').html('<span class="red">ÐодÑвеÑдиÑе ÑоглаÑие Ñ Ð¿Ð¾Ð»Ð¸Ñикой конÑиденÑиалÑноÑÑи!</span'); 52 return; 53 } 54 55 if (name == null || name.length < 1) { 56 $('.popupresult').html('<span class="red">Ðоле ÐÐЯ не должно бÑÑÑ Ð¿ÑÑÑÑм!</span'); 57 return; 58 } 59 if (phone == null || phone.length < 1) { 60 $('.popupresult').html('<span class="red">Ðоле ТÐÐÐФÐРне должно бÑÑÑ Ð¿ÑÑÑÑм!</span'); 61 return; 62 } 63 if (captcha == null || captcha.length < 1) { 64 $('.popupresult').html('<span class="red">Ðоле ÐÐРне должно бÑÑÑ Ð¿ÑÑÑÑм!</span'); 65 return; 66 } 67 /*if (!email || email.length < 1) { 68 $('.popupresult').html('<span class="red">УкажиÑе EMAIL</span>'); 69 return; 70 } else { 71 if (!(/^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,4}$/i).test(email)) { 72 $('.popupresult').html('<span class="red">Указан не веÑнÑй EMAIL</span>'); 73 return; 74 } 75 }*/ 76 77 $.post('ajax/getcall_captcha.php', {name: name, phone: phone, captcha: captcha}, function(response) { 78 switch(response.status) 79 { 80 case 'success': 81 $('.popupresult').html('<span style="color: green; font-size: 18px;">'+response.message+'</span'); 82 $('.popupform').hide(); 83 break; 84 85 case 'error': 86 $('.popupresult').html('<span style="color: red;">'+response.message+'</span'); 87 break; 88 89 default: 90 alert(response.status+': '+response.message); 91 break; 92 } 93 }, 'json').fail(function(){ 94 alert('ÐÑи оÑпÑавке возникла оÑибка.'); 95 }); 96 97 98} 99 100function getFeedbackPopup() { 101 var name = $('#popupfeedbackname').val(); 102 var phone = $('#popupfeedbackphone').val(); 103 var email = $('#popupfeedbackemail').val(); 104 var text = $('#popupfeedbackemail').val(); 105 var file = $('input[name=\'feedbackfile\']').val(); 106 107 if (name == null || name.length < 1) { 108 $('.popupresult').html('<span class="red">Ðоле ÐÐЯ не должно бÑÑÑ Ð¿ÑÑÑÑм!</span'); 109 return; 110 } 111 if (phone == null || phone.length < 1) { 112 $('.popupresult').html('<span class="red">Ðоле ТÐÐÐФÐРне должно бÑÑÑ Ð¿ÑÑÑÑм!</span'); 113 return; 114 } 115 if (!email || email.length < 1) { 116 $('.popupresult').html('<span class="red">УкажиÑе EMAIL</span>'); 117 return; 118 } else { 119 if (!(/^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,4}$/i).test(email)) { 120 $('.popupresult').html('<span class="red">Указан не веÑнÑй EMAIL</span>'); 121 return; 122 } 123 } 124 125 var element = document.getElementById('feedback_window_form'); 126 var xhr = new XMLHttpRequest(); 127 xhr.onload = xhr.onerror = function() { 128 if (this.status != 200) { 129 $('.popupresult').html('<span style="color: red;">ÐÑибка оÑпÑавки</span'); 130 return; 131 } 132 133 result = this.responseText; 134 $('#feedback_window_form').hide(); 135 $('.popupresult').html('<span style="color: green; font-size: 18px;">'+result+'</span'); 136 $('.popupform').hide(); 137 } 138 139 xhr.upload.onprogress = function(event) { 140 $('.popupresult').html('<span style="color: green;">ÐодождиÑе...</span'); 141 } 142 143 var formData = new FormData(element); 144 xhr.open('POST', '/ajax/getfeedback.php', true); 145 xhr.send(formData); 146} 147 148function getOnebuyPopup() { 149 var name = $('#popuponename').val(); 150 var phone = $('#popuponephone').val(); 151 var text = $('#popuponemessage').val(); 152 var privacy = $('#privacyOneBuy').prop('checked'); 153 154 if (!privacy) { 155 $('.popupresult').html('<span class="red">ÐодÑвеÑдиÑе ÑоглаÑие Ñ Ð¿Ð¾Ð»Ð¸Ñикой конÑиденÑиалÑноÑÑи!</span'); 156 return; 157 } 158 159 if (name == null || name.length < 1) { 160 $('.popupresult').html('<span class="red">Ðоле ÐÐЯ не должно бÑÑÑ Ð¿ÑÑÑÑм!</span'); 161 return; 162 } 163 if (phone == null || phone.length < 1) { 164 $('.popupresult').html('<span class="red">Ðоле ТÐÐÐФÐРне должно бÑÑÑ Ð¿ÑÑÑÑм!</span'); 165 return; 166 } 167 168 $.ajax({
169 url: "ajax/getonebuy.php", 170 data: {name: name, phone: phone, text: text}, 171 dataType: 'text', 172 success: function(data){ 173 $('.popupresult').html('<span style="color: green; font-size: 18px;">'+data+'</span'); 174 $('.popupform').hide(); 175 } 176 }); 177} 178 179function getFeedback() { 180 var name = $('#footer-form-name').val(); 181 var phone = $('#footer-form-phone').val(); 182 var message = $('#footer-form-text').val(); 183 184 if (name == null || name.length < 1) { 185 $.modal('<h2>ÐÑибка</h2><span class="red">Ðоле ÐÐЯ не должно бÑÑÑ Ð¿ÑÑÑÑм!</span>'); 186 return; 187 } 188 if (phone == null || phone.length < 1) { 189 $.modal('<h2>ÐÑибка</h2><span class="red">Ðоле ТÐÐÐФÐРне должно бÑÑÑ Ð¿ÑÑÑÑм!</span>'); 190 return; 191 } 192 if (message == null || message.length < 1) { 193 message = ''; 194 } 195 196 $.ajax({ 197 url: "ajax/getfeedback.php", 198 data: {name: name, phone: phone, message: message}, 199 type: 'POST', 200 dataType: 'text', 201 success: function(data){ 202 $.modal(data); 203 } 204 }); 205}
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.