1$(function(){ 2 $('#surf_add').submit(function(){ 3 var url = '/ajax.php?action=surf&type='+$("#type").val();//$(this).attr('action'); 4 var data = $(this).serialize()+'&ajax=1'; 5 $.post(url, data, function(result){ 6 if(result['id'] != ''){ 7 $('#'+result['id']).addClass('is-invalid'); 8 } 9 swal(result['title'], result['error'], result['status']); 10 if(result['status'] == 'success'){ 11 if(result['redirect'] != ''){ 12 setTimeout(function(){ 13 window.location.replace(result['redirect']); 14 }, 1000); 15 } 16 } 17 }, 'json'); 18 return false; 19 }); 20 21 $('.balance_add').submit(function(){ 22 var url = '/ajax.php?action=surf&type='+$("#type").val();//$(this).attr('action'); 23 var data = $(this).serialize()+'&ajax=1'; 24 $.post(url, data, function(result){ 25 if(result['id'] != ''){ 26 $('#'+result['id']).addClass('is-invalid'); 27 } 28 swal(result['title'], result['error'], result['status']); 29 if(result['status'] == 'success'){ 30 if(result['redirect'] != ''){ 31 setTimeout(function(){ 32 window.location.replace(result['redirect']); 33 }, 1000); 34 } 35 } 36 }, 'json'); 37 return false; 38 }); 39 40 $('#surf_edit').submit(function(){ 41 var url = '/ajax.php?action=surf&type='+$("#type").val();//$(this).attr('action'); 42 var data = $(this).serialize()+'&ajax=1'; 43 $.post(url, data, function(result){ 44 if(result['id'] != ''){ 45 $('#'+result['id']).addClass('is-invalid'); 46 } 47 swal(result['title'], result['error'], result['status']); 48 if(result['status'] == 'success'){ 49 if(result['redirect'] != ''){ 50 setTimeout(function(){ 51 window.location.replace(result['redirect']); 52 }, 1000); 53 } 54 } 55 }, 'json'); 56 return false; 57 }); 58 59 $(document).on('click', '.status_surf',function() { 60 var button = $(this); 61 var surf_id = button.attr('surf_id'); 62 var status = button.attr('action'); 63 $.post('/ajax.php?action=surf&type=status', {'surf_id': surf_id,'status':status}, function(result) { 64 if(result['status'] == 'success'){ 65 if(status === '1'){ 66 button.attr('action','2'); 67 button.html('<i class="fa fa-pause"></i>'); 68 button.removeClass('btn-success'); 69 button.addClass('btn-warning'); 70 button.attr('title', 'Stop'); 71 }else if(status === '2'){ 72 button.attr('action','1'); 73 button.html('<i class="fa fa-play"></i>'); 74 button.removeClass('btn-warning'); 75 button.addClass('btn-success'); 76 button.attr('title', 'Start'); 77 } 78 } 79 }, 'json'); 80 return false; 81 }); 82 83 $(document).on('click', '.delete',function() { 84 var surf_id = $(this).attr('surf_id'); 85 $.post('/ajax.php?action=surf&type=delete', {'surf_id': surf_id}, function(result) { 86 swal(result['title'], result['error'], result['status']); 87 if(result['status'] == 'success'){ 88 $('#surf_'+surf_id).remove(); 89 } 90 }, 'json'); 91 return false; 92 }); 93 94}); 95 96
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.