1jQuery(function($){ 2 3 $('.ajax_post_form').ajaxForm({ 4 dataType: 'json', 5 beforeSubmit: function(a,f,o) { 6 f.addClass('thisactive'); 7 $('.thisactive input[type=submit], .thisactive input[type=button]').attr('disabled',true); 8 $('.thisactive').find('.ajax_submit_ind').show(); 9 }, 10 error: function(res, res2, res3) { 11 for (key in res) { 12 console.log(key + ' = ' + res[key]); 13 } 14 }, 15 success: function(res) { 16 17 if(res['status'] == 'error'){ 18 if(res['status_text']){ 19 $('.thisactive .resultgo').html('<div class="resultfalse"><div class="resultclose"></div>'+res['status_text']+'</div>'); 20 } 21 } 22 if(res['status'] == 'success'){ 23 if(res['status_text']){ 24 $('.thisactive .resultgo').html('<div class="resulttrue"><div class="resultclose"></div>'+res['status_text']+'</div>'); 25 } 26 } 27 28 if(res['clear']){ 29 $('.thisactive input[type=text]:not(.notclear), .thisactive input[type=password]:not(.notclear), .thisactive textarea:not(.notclear)').val(''); 30 } 31 32 if(res['show_hidden']){ 33 $('.thisactive .hidden_line').show(); 34 } 35 36 if(res['url']){ 37 window.location.href = res['url']; 38 } 39 40 if(res['ncapt1']){ 41 $('.captcha1').attr('src',res['ncapt1']); 42 } 43 if(res['ncapt2']){ 44 $('.captcha2').attr('src',res['ncapt2']); 45 } 46 if(res['nsymb']){ 47 $('.captcha_sym').html(res['nsymb']); 48 } 49 $('.captcha_value').val(''); 50 51 $('.thisactive input[type=submit], .thisactive input[type=button]').attr('disabled',false); 52 $('.thisactive').find('.ajax_submit_ind').hide(); 53 $('.thisactive').removeClass('thisactive'); 54 } 55 }); 56 57 if(self != top && window.parent.frames.length > 0){ 58 $('.not_frame').remove(); 59 } 60 61 }); 62 63jQuery(function($){ 64 65 function get_exchange_step1(id){ 66 var id1 = $('#select_give').val(); 67 var id2 = $('#select_get').val(); 68 $('.exch_ajax_wrap_abs').show(); 69 var param='id='+id+'&id1=' + id1 + '&id2=' + id2; 70 $.ajax({ 71 type: "POST", 72 url: "https://z-exchange.pro/premium_site_action-exchange_stepselect.html?meth=post&yid=d0be07ea6cdf&ynd=0", 73 dataType: 'json', 74 data: param, 75 error: function(res, res2, res3){ 76 for (key in res) { 77 console.log(key + ' = ' + res[key]); 78 } 79 }, 80 success: function(res) 81 { 82 $('.exch_ajax_wrap_abs').hide(); 83 84 if(res['status'] == 'success'){ 85 $('#exch_html').html(res['html']); 86 87 if($('#the_title_page').length > 0){ 88 $('#the_title_page, .direction_title').html(res['titlepage']); 89 } 90 91 $('title').html(res['title']); 92 93 if($('meta[name=keywords]').length > 0){ 94 $('meta[name=keywords]').attr('content', res['keywords']); 95 } 96 if($('meta[name=description]').length > 0){ 97 $('meta[name=description]').attr('content', res['description']); 98 } 99 100 if(res['url']){ 101 window.history.replaceState(null, null, res['url']); 102 } 103 104 $(document).JTimer(); 105 $(document).Jselect('init', {trigger: '.js_my_sel', class_ico: 'currency_logo'}); 106 $(document).JcheckboxInit(); 107 } else { 108 if (res['status_text']) { 109 alert(res['status_text']); 110 } 111 } 112 } 113 }); 114 115 } 116 $(document).on('change', '#select_give', function(){ 117 get_exchange_step1(1); 118 }); 119 $(document).on('change', '#select_get', function(){ 120 get_exchange_step1(2); 121 }); 122 123}); 124jQuery(function($){ 125 126 var res_timer = 1; 127 function start_res_timer(){ 128 $('.res_timer').html('0'); 129 130 if(res_timer == 1){ 131 res_timer = 0; 132 setInterval(function(){ 133 if($('.res_timer').length > 0){ 134 var num_t = parseInt($('.res_timer').html()); 135 num_t = num_t + 1; 136 $('.res_timer').html(num_t); 137 } 138 },1000); 139 } 140 } 141 142 $('#check_rule_step').on('change',function(){ 143 if($(this).prop('checked')){ 144 $('#check_rule_step_input').prop('disabled',false); 145 } else { 146 $('#check_rule_step_input').prop('disabled',true); 147 } 148 }); 149 150 $('#check_rule_step_input').on('click',function(){ 151 $(this).parents('.ajax_post_form').find('.resultgo').html('<div class="resulttrue">ÐÐ´ÐµÑ Ð¾Ð±ÑабоÑка. ÐожалÑйÑÑа подождиÑе (<span class="res_timer">0</span>)</div>'); 152 start_res_timer(); 153 }); 154 155}); 156jQuery(function($){ 157 158 $('.iam_pay_bids').on('click', function(){ 159 if (!confirm("ÐÑ ÑвеÑенÑ, ÑÑо Ñже оплаÑили заÑвкÑ?")){ 160 return false;
161 } 162 }); 163 164}); 165jQuery(function($){ 166 167 if($('.check_payment_hash').length > 0){ 168 var nowdata = 0; 169 var redir = 0; 170 171 function check_payment_now(){ 172 var second = parseInt($('.check_payment_hash').attr('data-time')); 173 174 nowdata = parseInt(nowdata) + 1; 175 176 $('.block_check_payment_abs').html(nowdata); 177 $('.block_check_payment').show(); 178 var wid = $('.block_check_payment').width(); 179 if(wid > 1){ 180 var onepr = wid / second; 181 var nwid = onepr * nowdata; 182 if(nwid > wid){ nwid = wid; } 183 $('.block_check_payment_ins').animate({'width': nwid},500); 184 } 185 186 if(nowdata >= second){ 187 if(redir == 0){ 188 var durl = $('.check_payment_hash').attr('data-hash'); 189 redir = 1; 190 if(durl.length > 0){ 191 $('.exchange_status_abs').show(); 192 193 var param = 'hashed='+durl; 194 $.ajax({ 195 type: "POST", 196 url: "https://z-exchange.pro/premium_site_action-refresh_status_bids.html?meth=post&yid=d0be07ea6cdf&ynd=0&auto_check=1", 197 dataType: 'json', 198 data: param, 199 error: function(res, res2, res3){ 200 for (key in res) { 201 console.log(key + ' = ' + res[key]); 202 } 203 }, 204 success: function(res) 205 { 206 $('.exchange_status_abs').hide(); 207 if(res['html']){ 208 $('#exchange_status_html').html(res['html']); 209 $(document).JTimer(); 210 $(document).Jselect('init', {trigger: '.js_my_sel', class_ico: 'currency_logo'}); 211 $(document).JcheckboxInit(); 212 redir = 0; 213 nowdata = 0; 214 } 215 } 216 }); 217 } 218 } 219 } 220 } 221 setInterval(check_payment_now,1000); 222 } 223 224}); 225 226 jQuery(function($){ 227 $(document).on('click', '.js_window_login', function(){ 228 $(document).JsWindow('show', { 229 window_class: 'update_window', 230 title: 'ÐвÑоÑизаÑиÑ', 231 content: $('.loginform_box_html').html(), 232 insert_div: '.loginform_box', 233 shadow: 1 234 }); 235 236 var new_url = window.location.href; 237 $('input[name=return_url]').val(new_url); 238 239 return false; 240 }); 241 }); 242 243 jQuery(function($){ 244 $(document).on('click', '.js_window_join', function(){ 245 $(document).JsWindow('show', { 246 window_class: 'update_window', 247 title: 'РегиÑÑÑаÑиÑ', 248 content: $('.registerform_box_html').html(), 249 insert_div: '.registerform_box', 250 shadow: 1 251 }); 252 253 var new_url = window.location.href; 254 $('input[name=return_url]').val(new_url); 255 256 return false; 257 }); 258 }); 259 jQuery(function($) { 260 var clipboard = new ClipboardJS('.js_copy'); 261 clipboard.on('success', function(e) { 262 $('.js_copy').removeClass('copied'); 263 $(e.trigger).addClass('copied'); 264 }); 265 }); 266 jQuery(function($) { 267 $(document).on('click', '.oncetoggletitle', function() { 268 $(this).parents('.oncetoggle').toggleClass('active'); 269 return false; 270 }); 271 }); 272 jQuery(function($) { 273 $(document).on('focusin', '.has_tooltip input, .has_tooltip textarea', function() { 274 $(this).parents('.has_tooltip').addClass('showed'); 275 }); 276 277 $(document).on('click', '.field_tooltip_label', function() { 278 $(this).parents('.has_tooltip').addClass('showed'); 279 }); 280 281 $(document).on('focusout', '.has_tooltip input, .has_tooltip textarea', function() { 282 $(this).parents('.has_tooltip').removeClass('showed'); 283 }); 284 285 $(document).on('click', '.form_field_line input, .form_field_line textarea', function() { 286 $(this).removeClass('error'); 287 }); 288 }); 289 jQuery(function($){ 290 $(document).on('click', '.captcha_reload', function(){ 291 var thet = $(this); 292 thet.addClass('act'); 293 var param ='have=reload'; 294 $.ajax({ 295 type: "POST", 296 url: "https://z-exchange.pro/premium_site_action-captcha_reload.html?meth=post&yid=d0be07ea6cdf&ynd=0", 297 dataType: 'json', 298 data: param, 299 error: function(res,res2,res3){ 300 for (key in res) { 301 console.log(key + ' = ' + res[key]); 302 } 303 }, 304 success: function(res) 305 { 306 if(res['ncapt1']){ 307 $('.captcha1').attr('src',res['ncapt1']); 308 } 309 if(res['ncapt2']){ 310 $('.captcha2').attr('src',res['ncapt2']); 311 } 312 if(res['nsymb']){ 313 $('.captcha_sym').html(res['nsymb']); 314 } 315 $('.captcha_value').val(''); 316 thet.removeClass('act'); 317 } 318 }); 319 320 return false;
321 }); 322}); 323 324jQuery(function($){ 325 326 $(document).on('focusin', '.js_window_wrap',function(){ 327 $(this).addClass('showed'); 328 }); 329 $(document).on('focusout', '.js_window_wrap',function(){ 330 $(this).removeClass('showed'); 331 }); 332 333}); 334 335 jQuery(function($){ 336 $(document).on('click', '.js_hnotice_close', function(){ 337 var id = $(this).parents('.js_hnotice').attr('id').replace('hnotice_',''); 338 var exp_day = parseInt($(this).attr('data-exp')); 339 340 $(document).PHPCookie('set', {key: "hm"+id, value: 1, domain: 'https://z-exchange.pro/', days: exp_day}); 341 342 $('#hnotice_' + id).hide(); 343 }); 344 345 $(document).on('click', '.wn_div_submit', function(){ 346 var id = $(this).attr('data-id'); 347 var exp_day = parseInt($(this).attr('data-exp')); 348 349 $(document).PHPCookie('set', {key: "hm"+id, value: 1, domain: 'https://z-exchange.pro/', days: exp_day}); 350 351 $(this).parents('.wn_wrap').hide(); 352 }); 353 }); 354 jQuery(function($) { 355 356 $(".promo_menu li a").on('click',function () { 357 if (!$(this).hasClass('act')) { 358 $(".pbcontainer, .promo_menu li").removeClass('act'); 359 $(".pbcontainer").filter(this.hash).addClass('act'); 360 $(this).parents('li').addClass('act'); 361 } 362 363 return false; 364 }); 365 366 $(".bannerboxlink a").on('click',function() { 367 var text = $(this).text(); 368 var st = $(this).attr('show-title'); 369 var ht = $(this).attr('hide-title'); 370 if (text == st) { 371 $(this).html(ht); 372 } else { 373 $(this).html(st); 374 } 375 $(this).parents(".bannerboxone").find(".bannerboxtextarea").toggle(); 376 $(this).toggleClass('act'); 377 378 return false; 379 }); 380 381}); 382 383jQuery(function($){ 384 385 $(document).on('click', '.js_add_userwallet', function(){ 386 $(document).JsWindow('show', { 387 window_class: 'update_window', 388 title: 'ÐобавиÑÑ ÑÑеÑ', 389 content: $('.userwalletsform_box_html').html(), 390 insert_div: '.userwalletsform_box', 391 shadow: 1 392 }); 393 394 var id = $(this).attr('data-currid'); 395 $('.userwalletsform_currency_id').val(id); 396 397 var account = $(this).attr('data-account'); 398 $('.userwalletsform_account').val(account); 399 400 var redir = $(this).attr('data-redir'); 401 $('#userwalletsform_redir').val(redir); 402 403 return false; 404 }); 405 406}); 407 408jQuery(function($) { 409 410 $(document).on('click', '.js_userwallet_verify', function() { 411 var id = $(this).attr('data-id'); 412 var redir = $(this).attr('data-redir'); 413 $('#walletsverify_redir').val(redir); 414 var thet = $(this); 415 if (!thet.hasClass('act')) { 416 thet.addClass('act'); 417 var param = 'id=' + id; 418 $.ajax({ 419 type: "POST", 420 url: "https://z-exchange.pro/premium_site_action-info_userwallets.html?meth=post&yid=d0be07ea6cdf&ynd=0", 421 dataType: 'json', 422 data: param, 423 error: function(res, res2, res3) { 424 for (key in res) { 425 console.log(key + ' = ' + res[key]); 426 } 427 }, 428 success: function(res) 429 { 430 if (res['status'] == 'success') { 431 $(document).JsWindow('show', { 432 window_class: 'walletverify_window', 433 title: 'ÐеÑиÑиÑиÑоваÑÑ ÑÑеÑ', 434 content: res['html'], 435 insert_div: '.walletsverify_box', 436 shadow: 1 437 }); 438 } 439 if (res['status'] == 'error') { 440 if (res['status_text']) { 441 alert(res['status_text']); 442 } 443 } 444 thet.removeClass('act'); 445 } 446 }); 447 } 448 return false; 449 }); 450 451 $(document).on('click','.verify_action_button', function() { 452 var thet = $(this); 453 var id = thet.attr('data-id'); 454 var wait_title = thet.attr('data-title'); 455 var redir = $('#walletsverify_redir').val(); 456 $('.resultgo_walletverify').html('<div class="resulttrue">' + wait_title + '</div>'); 457 458 if (!thet.prop('disabled')) { 459 thet.prop('disabled', true); 460 461 var param = 'id=' + id + '&redir=' + redir; 462 $.ajax({ 463 type: "POST", 464 url: "https://z-exchange.pro/premium_site_action-accountverify.html?meth=post&yid=d0be07ea6cdf&ynd=0", 465 dataType: 'json', 466 data: param, 467 error: function(res, res2, res3) { 468 for (key in res) { 469 console.log(key + ' = ' + res[key]); 470 } 471 }, 472 success: function(res) 473 { 474 if (res['status'] == 'error') { 475 $('.resultgo_walletverify').html('<div class="resultfalse">' + res['status_text'] + '</div>'); 476 } 477 if (res['status'] == 'success') { 478 $(document).JsWindow('hide'); 479 } 480 if (res['url']) { 481 window.location.href = res['url']; 482 } 483 484 thet.prop('disabled', false); 485 } 486 }); 487 } 488 489 return false;
490 }); 491 492 $(document).on('change', '.verify_acc_filesome', function() { 493 var thet = $(this); 494 var text = thet.val(); 495 var par = thet.parents('form'); 496 var ccn = thet[0].files.length; 497 if (ccn > 0) { 498 var fileInput = thet[0]; 499 var bitec = fileInput.files[0].size; 500 if (bitec > 12582912) { 501 alert('ÐакÑ. 12 ÐÐ !'); 502 thet.val(''); 503 } else { 504 par.submit(); 505 } 506 } 507 }); 508 509 $('.verify_acc_form').ajaxForm({ 510 dataType: 'json', 511 beforeSubmit: function(a, f, o) { 512 f.addClass('uploading'); 513 $('.uploading input').prop('disabled', true); 514 $('.uploading').find('.ustbl_bar').show(); 515 $('.uploading').find('.ustbl_bar_abs').width('0px'); 516 }, 517 error: function(res, res2, res3) { 518 for (key in res) { 519 console.log(key + ' = ' + res[key]); 520 } 521 }, 522 uploadProgress: function(event, position, total, percentComplete) { 523 var percentVal = percentComplete + '%'; 524 $('.uploading').find('.ustbl_bar_abs').width(percentVal); 525 }, 526 success: function(res) { 527 if (res['status'] == 'success') { 528 $('.uploading').find('.verify_acc_html').html(res['response']); 529 } 530 if (res['status'] == 'error') { 531 $('.resultgo_walletverify').html('<div class="resultfalse">' + res['status_text'] + '</div>'); 532 } 533 if (res['url']) { 534 window.location.href = res['url']; 535 } 536 537 $('.uploading').find('.ustbl_bar').hide(); 538 $('.uploading input').prop('disabled', false); 539 $('.verify_acc_form').removeClass('uploading'); 540 } 541 }); 542 543 $(document).on('click', '.js_usac_del', function() { 544 var id = $(this).attr('data-id'); 545 var thet = $(this); 546 if (!thet.hasClass('act')) { 547 if (confirm("ÐÑ ÑоÑно Ñ Ð¾ÑиÑе ÑдалиÑÑ Ñайл?")) { 548 thet.addClass('act'); 549 var param='id=' + id; 550 $.ajax({ 551 type: "POST", 552 url: "https://z-exchange.pro/premium_site_action-delete_accverify.html?meth=post&yid=d0be07ea6cdf&ynd=0", 553 dataType: 'json', 554 data: param, 555 error: function(res, res2, res3) { 556 for (key in res) { 557 console.log(key + ' = ' + res[key]); 558 } 559 }, 560 success: function(res) 561 { 562 if (res['status'] == 'success') { 563 $('.accline_' + id).remove(); 564 } 565 if (res['status'] == 'error') { 566 for (key in res) { 567 console.log(key + ' = ' + res[key]); 568 } 569 } 570 thet.removeClass('act'); 571 } 572 }); 573 } 574 } 575 576 return false; 577 }); 578 579 580}); 581 582jQuery(function($){ 583 584 $(document).on('click', '.js_reserve', function(){ 585 $(document).JsWindow('show', { 586 window_class: 'update_window', 587 title: 'ÐапÑÐ¾Ñ ÑезеÑва "<span id="reserve_box_title"></span>"', 588 content: $('.reserve_box_html').html(), 589 insert_div: '.reserve_box', 590 shadow: 1 591 }); 592 593 var title = $(this).attr('data-title'); 594 var id = $(this).attr('data-id'); 595 $('#reserve_box_title').html(title); 596 $('#reserve_box_id').attr('value',id); 597 598 return false; 599 }); 600 601}); 602jQuery(function($){ 603 604 $(document).on('click', function(event) { 605 if ($(event.target).closest(".js_choice_link").length) return; 606 $('.js_choice_ul').hide(); 607 608 event.stopPropagation(); 609 }); 610 $(document).on('click', '.js_choice_link', function(){ 611 $(this).parents('.js_window_wrap').find('.js_choice_ul').show(); 612 613 return false; 614 }); 615 $(document).on('click', '.js_choice_line', function(){ 616 var account = $(this).attr('data-choice'); 617 $(this).parents('.js_window_wrap').find('input').val(account).trigger("change"); 618 $('.js_choice_ul').hide(); 619 return false; 620 }); 621 622}); 623 jQuery(function ($) { 624 625 function create_icons() { 626 627 $('.js_icon_left').hide(); 628 $('.js_icon_left:first').show(); 629 630 $('.js_icon_left').each(function () { 631 632 var vtype = $(this).attr('data-type'); 633 if ($('.js_item_left_' + vtype).length > 0) { 634 $('.js_icon_left_' + vtype).show(); 635 } 636 637 }); 638 639 $('.js_icon_right').hide(); 640 $('.js_icon_right:first').show(); 641 642 $('.js_icon_right').each(function () { 643 644 var vtype = $(this).attr('data-type'); 645 if ($('.js_item_right_' + vtype + ':visible').length > 0) { 646 $('.js_icon_right_' + vtype).show(); 647 } 648 649 }); 650 651 if ($('.js_icon_right.active:visible').length == 0) { 652 653 $('.js_item_right').show(); 654 $('.js_icon_right').removeClass('active'); 655 $('.js_icon_right:first').addClass('active'); 656 657 } 658 659 } 660 661 create_icons(); 662 663 function go_active_left_col() { 664 665 if ($('.xtt_html_abs').length > 0) { 666 if ($('.js_item_left:visible.active').length == 0) { 667 $('.js_item_left').removeClass('active'); 668 $('.js_item_left:visible:first').addClass('active'); 669 }
670 var valid = $('.js_item_left.active').attr('data-id'); 671 672 $('.xtt_html_abs').show(); 673 var param = 'id=' + valid; 674 $.ajax({ 675 type: "POST", 676 url: "https://z-exchange.pro/premium_site_action-table1_change.html?meth=post&yid=d0be07ea6cdf&ynd=0", 677 dataType: 'json', 678 data: param, 679 error: function (res, res2, res3) { 680 for (key in res) { 681 console.log(key + ' = ' + res[key]); 682 } 683 }, 684 success: function (res) { 685 $('.xtt_html_abs').hide(); 686 if (res['status'] == 'success') { 687 $('#xtt_right_col_html').html(res['html']); 688 } 689 create_icons(); 690 } 691 }); 692 } 693 694 } 695 696 $(document).on('click', ".js_item_left", function () { 697 698 if (!$(this).hasClass('active')) { 699 $(".js_item_left").removeClass('active'); 700 $(this).addClass('active'); 701 go_active_left_col(); 702 } 703 704 return false; 705 }); 706 707 $(document).on('click', ".js_icon_left", function () { 708 709 if (!$(this).hasClass('active')) { 710 var vtype = $(this).attr('data-type'); 711 $(".js_icon_left").removeClass('active'); 712 $(this).addClass('active'); 713 if (vtype == 0) { 714 $('.js_item_left').show(); 715 } else { 716 $('.js_item_left').hide(); 717 $('.js_item_left_' + vtype).show(); 718 } 719 go_active_left_col(); 720 } 721 722 return false; 723 }); 724 725 $(document).on('click', ".js_icon_right", function () { 726 727 if (!$(this).hasClass('active')) { 728 var vtype = $(this).attr('data-type'); 729 $(".js_icon_right").removeClass('active'); 730 $(this).addClass('active'); 731 if (vtype == 0) { 732 $('.js_item_right').show(); 733 } else { 734 $('.js_item_right').hide(); 735 $('.js_item_right_' + vtype).show(); 736 } 737 } 738 739 return false; 740 }); 741 742 $(document).on('click', ".xtt_title_link", function () { 743 744 $('.xtt_title_link').removeClass('active'); 745 $(this).addClass('active'); 746 var id = $(this).attr('data-id'); 747 748 $(document).PHPCookie('set', { 749 key: "table5_select", 750 value: id, 751 domain: 'https://z-exchange.pro/', 752 days: '30' 753 }); 754 755 $('.js_check_reserve').each(function () { 756 757 var data_now = $(this).attr('data-reserve'); 758 if (id == 'rate') { 759 data_now = $(this).attr('data-rate'); 760 } 761 $(this).html(data_now); 762 763 }); 764 765 return false; 766 }); 767 768 }); 769 770jQuery(function($){ 771 772 if($('#hexch_html').length > 0){ 773 $(document).on('click', '.js_exchange_link', function(){ 774 775 $('.js_exchange_link').removeClass('active'); 776 $(this).addClass('active'); 777 778 var direction_id = $(this).attr('data-direction-id'); 779 780 $('.js_exchange_widget_abs').show(); 781 782 var tscroll = $('#hexch_html').offset().top - 100; 783 $('body,html').animate({scrollTop : tscroll}, 500); 784 785 var param = 'direction_id=' + direction_id; 786 $.ajax({ 787 type: "POST", 788 url: "https://z-exchange.pro/premium_site_action-exchange_widget.html?meth=post&yid=d0be07ea6cdf&ynd=0", 789 dataType: 'json', 790 data: param, 791 error: function(res, res2, res3){ 792 for (key in res) { 793 console.log(key + ' = ' + res[key]); 794 } 795 }, 796 success: function(res) 797 { 798 if(res['html']){ 799 $('#hexch_html').html(res['html']); 800 } 801 if(res['status'] == 'error'){ 802 $('#hexch_html').html('<div class="resultfalse"><div class="resultclose"></div>'+res['status_text']+'</div>'); 803 } 804 $(document).JTimer(); 805 $(document).Jselect('init', {trigger: '.js_my_sel', class_ico: 'currency_logo'});
806 $(document).JcheckboxInit(); 807 $('.js_exchange_widget_abs').hide(); 808 809 810 } 811 }); 812 813 return false; 814 }); 815 } 816}); 817 818jQuery(function($){ 819 820 $(document).on('click', '.js_amount', function(){ 821 var amount = $(this).attr('data-val'); 822 var id = $(this).attr('data-id'); 823 $('input.js_'+id + ':not(:disabled)').val('0').trigger('keyup'); 824 $('input.js_'+id + ':not(:disabled)').val(amount).trigger('change'); 825 $('.js_'+id + '_html').html(amount); 826 }); 827 828 function cache_exchange_data(thet){ 829 var ind = 0; 830 if(thet.hasClass('check_cache')){ 831 832 ind = 1; 833 834 var not_check_data = 0; 835 if ($('#not_check_data').length > 0) { 836 if ($('#not_check_data').prop('checked')) { 837 not_check_data = 1; 838 } 839 } else { 840 not_check_data = '0'; 841 } 842 if (not_check_data == 1) { 843 ind = 0; 844 } 845 846 } else { 847 ind = 1; 848 } 849 if(ind == 1){ 850 var id = thet.attr('cash-id'); 851 var v = thet.val(); 852 $(document).PHPCookie('set', {key: "cache_"+id, value: v, domain: 'https://z-exchange.pro/', days: '30'}); 853 } 854 } 855 856 $(document).ChangeInput({ 857 trigger: '.cache_data', 858 success: function(obj){ 859 cache_exchange_data(obj); 860 } 861 }); 862 863 $(document).on('change', '#not_check_data', function(){ 864 if($(this).prop('checked')){ 865 $(document).PHPCookie('set', {key: "not_check_data", value: 1, domain: 'https://z-exchange.pro/', days: '30'}); 866 $('.check_cache').each(function(){ 867 var id = $(this).attr('cash-id'); 868 $(document).PHPCookie('set', {key: "cache_"+id, value: '', domain: 'https://z-exchange.pro/', days: '30'}); 869 }); 870 } else { 871 $(document).PHPCookie('set', {key: "not_check_data", value: 0, domain: 'https://z-exchange.pro/', days: '30'}); 872 $('.check_cache').each(function(){ 873 var id = $(this).attr('cash-id'); 874 var v = $(this).val(); 875 $(document).PHPCookie('set', {key: "cache_"+id, value: v, domain: 'https://z-exchange.pro/', days: '30'}); 876 }); 877 } 878 }); 879 880 $(document).on('change', 'select, textarea, input:not(.js_sum_val)', function(){ 881 $(this).parents('.js_wrap_error').removeClass('error'); 882 }); 883 $(document).on('click', 'input, textarea, select', function(){ 884 $(this).parents('.js_wrap_error').removeClass('error'); 885 }); 886 887 $(document).on('click', '.ajax_post_bids input[type=submit]', function(){ 888 var count_window = $('.window_message').length; 889 if(count_window > 0){ 890 891 $(document).JsWindow('show', { 892 window_class: 'update_window', 893 close_class: 'js_direction_window_close', 894 title: 'Ðнимание!', 895 content: $('.window_message').html(), 896 shadow: 1, 897 enable_button: 1, 898 button_title: 'OK', 899 button_class: 'js_window_close js_direction_window_close' 900 }); 901 902 return false; 903 } 904 }); 905 906 $(document).on('click', '.js_direction_window_close', function(){ 907 $('.ajax_post_bids').submit(); 908 }); 909 910 var res_timer = ''; 911 function start_res_timer(){ 912 913 $('.res_timer').html('0'); 914 clearInterval(res_timer); 915 916 res_timer = setInterval(function(){ 917 if($('.res_timer').length > 0){ 918 var num_t = parseInt($('.res_timer').html()); 919 num_t = num_t + 1; 920 $('.res_timer').html(num_t); 921 } 922 },1000); 923 } 924 925 $('.ajax_post_bids').ajaxForm({ 926 dataType: 'json', 927 beforeSubmit: function(a,f,o) { 928 f.addClass('thisactive'); 929 $('.thisactive input[type=submit], .thisactive input[type=button]').attr('disabled',true); 930 $('.ajax_post_bids_res').html('<div class="resulttrue">ÐÐ´ÐµÑ Ð¾Ð±ÑабоÑка. ÐожалÑйÑÑа подождиÑе (<span class="res_timer">0</span>)</div>'); 931 932 start_res_timer(); 933 934 $('.ajax_post_bids_res').find('.js_wrap_error').removeClass('error'); 935 936 }, 937 error: function(res, res2, res3) { 938 $('.ajax_post_bids_res').html('<div class="resultfalse">ÐÑибка ÑкÑипÑа</div>'); 939 for (key in res) { 940 console.log(key + ' = ' + res[key]); 941 } 942 }, 943 success: function(res) { 944 if(res['error_fields']){ 945 $.each(res['error_fields'], function(index, value){ 946 add_error_field(index, value); 947 }); 948 } 949 if(res['status'] && res['status'] == 'error'){ 950 $('.ajax_post_bids_res').html('<div class="resultfalse"><div class="resultclose"></div>'+ res['status_text'] +'</div>'); 951 if($('.js_wrap_error.error').length > 0){ 952 var ftop = $('.js_wrap_error.error:first').offset().top - 100; 953 $('body,html').animate({scrollTop: ftop},500); 954 } 955 } 956 if(res['status'] && res['status'] == 'success'){ 957 $('.ajax_post_bids_res').html('<div class="resulttrue"><div class="resultclose"></div>'+ res['status_text'] +' (<span class="res_timer">0</span>)</div>'); 958 start_res_timer(); 959 } 960 961 if(res['url']){ 962 window.location.href = res['url']; 963 } 964 965 if(res['ncapt1']){ 966 $('.captcha1').attr('src',res['ncapt1']); 967 } 968 if(res['ncapt2']){ 969 $('.captcha2').attr('src',res['ncapt2']); 970 } 971 if(res['nsymb']){ 972 $('.captcha_sym').html(res['nsymb']); 973 } 974 $('.captcha_value').val(''); 975 976 $('.thisactive input[type=submit], .thisactive input[type=button]').attr('disabled',false); 977 $('.thisactive').removeClass('thisactive'); 978 } 979 }); 980 981 function add_error_field(id, text){ 982 $('.js_'+ id).parents('.js_wrap_error').addClass('error'); 983 $('.js_'+ id).parents('.js_line_wrapper').show(); 984 if(text.length > 0){ 985 $('.js_'+ id +'_error').html(text).show(); 986 } 987 } 988 function remove_error_field(id){ 989 $('.js_'+ id).parents('.js_wrap_error').removeClass('error'); 990 } 991 992 function calc_set_value(the_obj, the_num){ 993 $(the_obj).val(the_num); } 994 995 function calc_set_html(the_obj, the_num){ 996 $(the_obj).html(the_num); } 997 998 function collect_other_data() { 999 var set_data = 'sd=1'; 1000 $('.js_changecalc').each(function(){ 1001 var nv = $(this).attr('name'); 1002 if (nv.length > 0) { 1003 var tv = $(this).attr('type'); 1004 var vv = $(this).val(); 1005 if (tv == 'checkbox') { 1006 if (!$(this).prop('checked')) { 1007 vv = 0; 1008 } 1009 } 1010 set_data = set_data + '&' + nv + '=' + vv; 1011 } 1012 }); 1013 1014 return encodeURIComponent(set_data); 1015 } 1016 1017 function go_calc(obj, dej){ 1018
1019 var cd = collect_other_data(); 1020 var sum = obj.val().replace(/,/g,'.'); 1021 var id = $('.js_direction_id:first').val(); 1022 var param = 'id='+id+'&sum='+sum+'&dej='+dej+'&cd='+cd; 1023 1024 1025 $('.exch_ajax_wrap_abs, .js_exchange_widget_abs, .js_loader').show(); 1026 1027 if(dej == 1){ 1028 calc_set_value('input.js_sum1:not(:focus)', sum); 1029 calc_set_html('.js_sum1_html', sum); 1030 } else if(dej == 2){ 1031 calc_set_value('input.js_sum2:not(:focus)', sum); 1032 calc_set_html('.js_sum2_html', sum); 1033 } else if(dej == 3){ 1034 calc_set_value('input.js_sum1c:not(:focus)', sum); 1035 calc_set_html('.js_sum1c_html', sum); 1036 } else if(dej == 4){ 1037 calc_set_value('input.js_sum2c:not(:focus)', sum); 1038 calc_set_html('.js_sum2c_html', sum); 1039 } 1040 1041 remove_error_field('sum1'); 1042 remove_error_field('sum2'); 1043 remove_error_field('sum1c'); 1044 remove_error_field('sum2c'); 1045 1046 $.ajax({ 1047 type: "POST", 1048 url: "https://z-exchange.pro/premium_site_action-exchange_calculator.html?meth=post&yid=d0be07ea6cdf&ynd=0", 1049 data: param, 1050 dataType: 'json', 1051 error: function(res, res2, res3){ 1052 for (key in res) { 1053 console.log(key + ' = ' + res[key]); 1054 } 1055 }, 1056 success: function(res){ 1057 1058 var changed = res['changed']; 1059 1060 if(dej !== 1 || changed == 1){ 1061 calc_set_value('input.js_sum1', res['sum1']); 1062 } 1063 if(dej !== 2 || changed == 1){ 1064 calc_set_value('input.js_sum2', res['sum2']); 1065 } 1066 if(dej !== 3 || changed == 1){ 1067 calc_set_value('input.js_sum1c', res['sum1c']); 1068 } 1069 if(dej !== 4 || changed == 1){ 1070 calc_set_value('input.js_sum2c', res['sum2c']); 1071 } 1072 1073 calc_set_html('.js_sum1_html', res['sum1']); 1074 calc_set_html('.js_sum2_html', res['sum2']); 1075 calc_set_html('.js_sum1c_html', res['sum1c']); 1076 calc_set_html('.js_sum2c_html', res['sum2c']); 1077 1078 $('.js_comis_text1').html(res['comis_text1']); 1079 $('.js_comis_text2').html(res['comis_text2']); 1080 1081 if(res['error_fields']){ 1082 $.each(res['error_fields'], function(index, value){ 1083 add_error_field(index, value); 1084 }); 1085 } 1086 1087 if(res['course_html'] && res['course_html'].length > 0){ 1088 $('.js_course_html').html(res['course_html']); 1089 $('input.js_course_html').val(res['course_html']); 1090 } 1091 if(res['reserve_html'] && res['reserve_html'].length > 0){ 1092 $('.js_reserve_html').html(res['reserve_html']); 1093 $('input.js_reserve_html').val(res['reserve_html']); 1094 } 1095 if(res['user_discount'] && res['user_discount'].length > 0){ 1096 $('.js_direction_user_discount').html(res['user_discount']); 1097 $('input.js_direction_user_discount').html(res['user_discount']); 1098 } 1099 if(res['viv_com1'] && res['viv_com1'] == 1){ 1100 $('.js_viv_com1').show(); 1101 } else { 1102 $('.js_viv_com1').hide(); 1103 } 1104 if(res['viv_com2'] && res['viv_com2'] == 1){ 1105 $('.js_viv_com2').show(); 1106 } else { 1107 $('.js_viv_com2').hide(); 1108 } 1109 1110 if(res['ncapt1']){ 1111 $('.captcha1').attr('src',res['ncapt1']); 1112 } 1113 if(res['ncapt2']){ 1114 $('.captcha2').attr('src',res['ncapt2']); 1115 } 1116 if(res['nsymb']){ 1117 $('.captcha_sym').html(res['nsymb']); 1118 } 1119 $('.captcha_value').val(''); 1120 1121 $('.exch_ajax_wrap_abs, .js_exchange_widget_abs, .js_loader').hide(); 1122 } 1123 }); 1124 1125 } 1126 1127 1128 $(document).ChangeInput({ 1129 trigger: '.js_sum1', 1130 changetime: '1600', 1131 success: function(obj){ 1132 go_calc(obj, 1); 1133 } 1134 }); 1135 1136 $(document).ChangeInput({ 1137 trigger: '.js_sum2', 1138 changetime: '1600', 1139 success: function(obj){ 1140 go_calc(obj, 2); 1141 } 1142 }); 1143 1144 $(document).ChangeInput({ 1145 trigger: '.js_sum1c', 1146 changetime: '1600', 1147 success: function(obj){ 1148 go_calc(obj, 3); 1149 } 1150 }); 1151 1152 $(document).ChangeInput({ 1153 trigger: '.js_sum2c', 1154 changetime: '1600', 1155 success: function(obj){ 1156 go_calc(obj, 4); 1157 } 1158 }); 1159 1160 $(document).on('change','.js_changecalc',function(){ 1161 go_calc($('.js_sum1'),1); 1162 }); 1163 1164 function set_input_decimal(obj){ 1165 var dec = obj.attr('data-decimal'); 1166 var sum = obj.val().replace(new RegExp(",",'g'),'.'); 1167 var len_arr = sum.split('.'); 1168 var len_data = len_arr[1]; 1169 if(len_data !== undefined){ 1170 var len = len_data.length; 1171 if(len > dec){ 1172 var new_data = len_data.substr(0, dec); 1173 obj.val(len_arr[0]+'.'+new_data); 1174 } 1175 } 1176 } 1177 1178 $(document).on('change', '.js_decimal', function(){ 1179 set_input_decimal($(this)); 1180 }); 1181 1182 $(document).on('keyup', '.js_decimal', function(){ 1183 set_input_decimal($(this)); 1184 }); 1185 1186 }); 1187 jQuery(function($){ 1188 $('.widget_reserv_filter').on('click', function(){ 1189 $('.widget_reserv_filter').removeClass('current'); 1190 $(this).addClass('current'); 1191 var id = $(this).attr('data-id'); 1192 $('.widget_reserv_vt').hide(); 1193 $('.widget_reserv_vt_'+id).show(); 1194 1195 return false;
1196 }); 1197 }); 1198
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.