¿Tienes 18 años o más?
',{ text:"Por favor, escribe un resumen de lo que este video fue sobre", class:'report-message-label' })).add($('',{ id:'report-message', rows: 4, placeholder:'Mensaje' })), showCancelButton: true, confirmButtonText: 'Enviar', cancelButtonText: 'cancelar', customClass:'report-video-popup', animation: false, preConfirm: function(name){ return new Promise(function(resolve,reject){ message = $('#report-message').val(); if (message.length ').add($('',{ text:"Por favor describa su solicitud con cuidado y lo más que puede, tenga en cuenta que las solicitudes DMCA falsas pueden dar lugar a la cancelación de cuenta.", class:'report-message-label' })).add($('',{ id:'report-message-copy', rows: 4, placeholder:'Mensaje' })).add($(''+text1+''+text2+'')), showCancelButton: true, confirmButtonText: 'Enviar', cancelButtonText: 'cancelar', customClass:'report-video-popup pt_rep_copy_vid', animation: false, preConfirm: function(name){ return new Promise(function(resolve,reject){ message = $('#report-message-copy').val(); if (message.length '); notif({ msg: "Agregado a " + data.name, type: "default", fade:0, timeout:1500 }); } else if(data.status == 200 && data.code == 0){ self.find('button').html(''); notif({ msg: "Eliminado de " + data.name, type: "default", fade:0, timeout:1500 }); } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { console.log("error"); }) } function PT_WLToggle(id,self){ if (!id || !self) { return false; } var self = $(self); $.ajax({ url: 'https://www.inkasex.com/aj/lists', type: 'GET', dataType: 'json', data: {type: 'list',a:'wl-tg',id:id}, }) .done(function(data) { if (data.status == 200 && data.code == 1) { self.find('.pt-plist-tgl_btn').html(''); notif({ msg: "Agregado a \"Ver despues\"", type: "default", fade:0, timeout:1500 }); } else if(data.status == 200 && data.code == 0){ self.find('.pt-plist-tgl_btn').html(''); notif({ msg: "Eliminado de \"Ver despues\"", type: "default", fade:0, timeout:1500 }); } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { console.log("error"); }) } function PT_NewList(){ swal({ title: '', type: "", html:'Crear nueva lista de reproducciónintimidadPúblicoprivado', showCancelButton: true, allowOutsideClick:false, confirmButtonText:'crear', cancelButtonText:'cancelar', customClass: 'pt_add_to_list_vid', preConfirm: function (email) { return new Promise(function (resolve, reject) { name = $(".create-new-list").find('input').val(); desc = $(".create-new-list").find('textarea').val(); privacy = $(".create-new-list").find('select').val(); setTimeout(function() { if (name == '') { reject('Se requiere el nombre de la lista de reproducción.'); } else if(privacy 1){ reject('Por favor verifique los detalles'); } else { resolve(); } }, 100) }) } }).then(function(){ if (!name){ return;} $.ajax({ url: 'https://www.inkasex.com/aj/lists?type=list&a=new', type: 'POST', dataType: 'json', data: {name:name,desc:desc,pr:privacy}, }) .done(function(data) { if (data.status == 200) { swal({ title:name, text:"¡La lista de reproducción se agregó con éxito!", type:'success' }); PT_Delay(function(){ swal.close(); },2000); } else if(data.status == 200){ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { swal.close(); console.log("error"); }) }, function(){ //Error }) } function PT_EditList(id){ if (!id) { return false; } $.ajax({ url: 'https://www.inkasex.com/aj/lists', type: 'GET', dataType: 'json', data: {type: 'list',a:'edit',id:id}, }) .done(function(data) { if (data.status == 200) { swal({ title: '', type: "", html:data.html, showCancelButton: true, allowOutsideClick:false, confirmButtonText:' Salvar', cancelButtonText:'cancelar', preConfirm: function (email) { return new Promise(function (resolve, reject) { name = $(".edit-list-form").find('input').val(); desc = $(".edit-list-form").find('textarea').val(); privacy = $(".edit-list-form").find('select').val(); setTimeout(function() { if (name == '') { reject(''); } else if(privacy 1){ reject('Por favor verifique los detalles'); } else { resolve(); } }, 100) }) } }).then(function(){ if (!name){ return;} $.ajax({ url: 'https://www.inkasex.com/aj/lists?type=list&a=update', type: 'POST', dataType: 'json', data: {name:name,desc:desc,pr:privacy,id:id}, }) .done(function(data) { if (data.status == 200) { swal({ title:name, text:"¡La lista de reproducción se guardó con éxito!", type:'success' }); PT_Delay(function(){ swal.close(); },2000); } else if(data.status == 200){ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { swal.close(); console.log("error"); }) }, function(){ //Error }) } }) .fail(function() { console.log("error"); }) } function PT_DeleteList(id){ if (!id) { return false;} swal({ title: 'Confirmación!', text: "¿Estás seguro de que quieres eliminar esta PlayList?", type: 'warning', showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: 'Sí, ¡bórralo!' }).then(function(){ $.ajax({ url: 'https://www.inkasex.com/aj/lists', type: 'GET', dataType: 'json', data: {type: 'list',a:'delist',id:id}, }) .done(function(data) { if (data.status == 200) { $("[data-playlist='"+id+"']").slideUp(function(){ $(this).remove(); }); swal({ title:"Borrado!", text:data.name + " ha sido eliminado", type:"success" }); } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { console.log("error"); }) }) } function PT_DelFromList(list_id,video_id){ if (!list_id || !video_id) { return false; } $.ajax({ url: 'https://www.inkasex.com/aj/lists', type: 'GET', dataType: 'json', data: {type: 'list',a:'delvid',video_id:video_id,list_id:list_id}, }) .done(function(data) { if (data.status == 200) { $("[data-video-id='"+video_id+"']").slideUp(function(){ $(this).remove(); }) } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); }) } function PT_RemoveFromWL(video_id){ if (!video_id) { return false; } $.ajax({ url: 'https://www.inkasex.com/aj/lists', type: 'GET', dataType: 'json', data: {type: 'list',a:'delwl',video_id:video_id}, }) .done(function(data) { if (data.status == 200) { $("[data-video-id='"+video_id+"']").slideUp(function(){ $(this).remove(); }) } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); }) } function PT_RVReply(text,comm_id,event,video_id){ if (!text || !comm_id || !event || !video_id) { return false; } else if(event.keyCode == 13 && event.shiftKey == 0){ var reply_id = 0; if($("#comm-reply-"+comm_id).attr('data-reply-id')){ reply_id = $("#comm-reply-"+comm_id).attr('data-reply-id'); } $.ajax({ url: "https://www.inkasex.com/aj/add-reply/video", type: 'POST', dataType: 'json', data: {text:text,id:comm_id,video_id:video_id,reply:reply_id}, }) .done(function(data) { if (data.status == 200) { $("#pt-comment-replies-cont-" + comm_id).append(data.html) $("#comm-reply-"+comm_id).find('input').val('').blur(); } $("#comment-reply-loading-renderer-"+comm_id).addClass('hidden'); }) .fail(function() { alert('Sorry, something went wrong: Please try again later ...'); }) } } function PT_RPReply(text,comm_id,event,post_id){ if (!text || !comm_id || !event || !post_id) { return false; } else if(event.keyCode == 13 && event.shiftKey == 0){ var reply_id = 0; if($("#comm-reply-"+comm_id).attr('data-reply-id')){ reply_id = $("#comm-reply-"+comm_id).attr('data-reply-id'); } $.ajax({ url: "https://www.inkasex.com/aj/add-reply/article", type: 'POST', dataType: 'json', data: {text:text,id:comm_id,post_id:post_id,reply:reply_id}, }) .done(function(data) { if (data.status == 200) { $("#pt-comment-replies-cont-" + comm_id).append(data.html) $("#comm-reply-"+comm_id).find('input').val('').blur(); } $("#comment-reply-loading-renderer-"+comm_id).addClass('hidden'); }) .fail(function() { alert('Sorry, something went wrong: Please try again later ...'); }) } } function PT_RAReply(text,comm_id,event,post_id){ if (!text || !comm_id || !event || !post_id) { return false; } else if(event.keyCode == 13 && event.shiftKey == 0){ var reply_id = 0; if($("#comm-reply-"+comm_id).attr('data-reply-id')){ reply_id = $("#comm-reply-"+comm_id).attr('data-reply-id'); } $.ajax({ url: "https://www.inkasex.com/aj/add-reply/activity", type: 'POST', dataType: 'json', data: {text:text,id:comm_id,post_id:post_id,reply:reply_id}, }) .done(function(data) { if (data.status == 200) { $("#pt-comment-replies-cont-" + comm_id).append(data.html) $("#comm-reply-"+comm_id).find('input').val('').blur(); } $("#comment-reply-loading-renderer-"+comm_id).addClass('hidden'); }) .fail(function() { alert('Sorry, something went wrong: Please try again later ...'); }) } } function PT_DeleteReply(id) { if (!id) { return false; } if (!confirm('¿Seguro que quieres eliminar tu comentario?')) { return false; } $('#reply-' + id).slideUp('fast'); $.post('https://www.inkasex.com/aj/delete-reply', {id: id}); } function PT_LikeComments(self,type,comment_id){ if (!self || (type != 'up' && type != 'down') || !comment_id){ return false; } else if (!$('#main-container').attr('data-logged') && $('#main-url').val()) { window.location.href = PT_Ajax_Requests_File() + 'login?to=' + $('#main-url').val(); return false; } var self = $(self); $.ajax({ url: 'https://www.inkasex.com/aj/comment-like-system/' + type, type: 'POST', dataType: 'json', data: {id:comment_id} }) .done(function(data) { if (data.status == 200 && type == 'up' && data.type == 'added_like'){ self.find('span').text((data.up)); $('[data-comment-dislikes="'+comment_id+'"]').find('span').text((data.down)); self.find('svg.feather').addClass('active'); self.siblings().find('svg.feather').removeClass('active'); } else if (data.status == 200 && type == 'up' && data.type == 'deleted_like'){ self.find('span').text((data.up)); $('[data-comment-dislikes="'+comment_id+'"]').find('span').text((data.down)); self.find('svg.feather').removeClass('active'); self.siblings().find('svg.feather').removeClass('active'); } else if (data.status == 200 && type == 'down' && data.type == 'added_dislike'){ self.find('span').text((data.down)); self.find('svg.feather').addClass('active'); $('[data-comment-likes="'+comment_id+'"]').find('span').text((data.up)); self.siblings().find('svg.feather').removeClass('active'); } else if (data.status == 200 && type == 'down' && data.type == 'deleted_dislike'){ self.find('span').text((data.down)); self.find('svg.feather').removeClass('active'); $('[data-comment-likes="'+comment_id+'"]').find('span').text((data.up)); self.siblings().find('svg.feather').removeClass('active'); } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { console.log("error"); }) } function PT_LikeReplies(self,type,reply_id){ if (!self || (type != 'up' && type != 'down') || !reply_id){ return false; } else if (!$('#main-container').attr('data-logged') && $('#main-url').val()) { window.location.href = PT_Ajax_Requests_File() + 'login?to=' + $('#main-url').val(); return false; } var self = $(self); $.ajax({ url: 'https://www.inkasex.com/aj/reply-like-system/' + type, type: 'POST', dataType: 'json', data: {id:reply_id} }) .done(function(data) { if (data.status == 200 && type == 'up' && data.type == 'added_like'){ self.find('span').text((data.up)); $('[data-reply-dislikes="'+reply_id+'"]').find('span').text((data.down)); self.find('svg.feather').addClass('active'); self.siblings().find('svg.feather').removeClass('active'); } else if (data.status == 200 && type == 'up' && data.type == 'deleted_like'){ self.find('span').text((data.up)); $('[data-reply-dislikes="'+reply_id+'"]').find('span').text((data.down)); self.find('svg.feather').removeClass('active'); self.siblings().find('svg.feather').removeClass('active'); } else if (data.status == 200 && type == 'down' && data.type == 'added_dislike'){ self.find('span').text((data.down)); self.find('svg.feather').addClass('active'); $('[data-reply-likes="'+reply_id+'"]').find('span').text((data.up)); self.siblings().find('svg.feather').removeClass('active'); } else if (data.status == 200 && type == 'down' && data.type == 'deleted_dislike'){ self.find('span').text((data.down)); self.find('svg.feather').removeClass('active'); $('[data-reply-likes="'+reply_id+'"]').find('span').text((data.up)); self.siblings().find('svg.feather').removeClass('active'); } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { console.log("error"); }) } function pt_hide_announcement(id){ if (!id) { return false; } $("#announcement-"+id).slideUp('fast',function(){ $(this).remove(); $.post('https://www.inkasex.com/aj/main/hide-announcement', {id: id}, function(data, textStatus, xhr) { /* pass */ }); }) } function PT_PaySubscribe(user_id,self,type = '',price=0) { if (!user_id || !self) { return false; } var text = $(self).find('span').text(); if (type == 'subscribe') { PayUsingWallet(type,'show',user_id,price); return; $(self).find('span').text("Por favor espera.."); $(self).attr('disabled', 'true'); PT_ShowMethods('subscribe',0,0,user_id); } else{ var html = "¿Seguro que desea darse de baja? Esta acción no se puede deshacer."; swal({ title: "", type: "", html:html, showCancelButton: true, cancelButtonText: "No", customClass: 'sweetalert-lg pt_add_to_list_vid', confirmButtonText:'Sí' }).then(function(){ $(self).removeClass('btn-subscribed').addClass('btn-subscribe'); $(self).find('span').text("Suscribir"); $(self).find('svg').remove(); $(self).prepend(''); $(self).attr('onclick', 'PT_PaySubscribe(' + user_id + ',this,"subscribe")'); $.post('https://www.inkasex.com/aj/subscribe', {user_id: user_id}); },function(){ }); } $(self).removeAttr('disabled'); $(self).find('span').text(text); } function notifyUser(user_id,self) { $.post('https://www.inkasex.com/aj/user/notify', {user_id:user_id}, function(data) { if (data.status == 200) { $(self).replaceWith(data.html); } else { Snackbar.show({text: ''+ data.message +''}); } }); }
',{ text:"Por favor describa su solicitud con cuidado y lo más que puede, tenga en cuenta que las solicitudes DMCA falsas pueden dar lugar a la cancelación de cuenta.", class:'report-message-label' })).add($('',{ id:'report-message-copy', rows: 4, placeholder:'Mensaje' })).add($(''+text1+''+text2+'')), showCancelButton: true, confirmButtonText: 'Enviar', cancelButtonText: 'cancelar', customClass:'report-video-popup pt_rep_copy_vid', animation: false, preConfirm: function(name){ return new Promise(function(resolve,reject){ message = $('#report-message-copy').val(); if (message.length '); notif({ msg: "Agregado a " + data.name, type: "default", fade:0, timeout:1500 }); } else if(data.status == 200 && data.code == 0){ self.find('button').html(''); notif({ msg: "Eliminado de " + data.name, type: "default", fade:0, timeout:1500 }); } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { console.log("error"); }) } function PT_WLToggle(id,self){ if (!id || !self) { return false; } var self = $(self); $.ajax({ url: 'https://www.inkasex.com/aj/lists', type: 'GET', dataType: 'json', data: {type: 'list',a:'wl-tg',id:id}, }) .done(function(data) { if (data.status == 200 && data.code == 1) { self.find('.pt-plist-tgl_btn').html(''); notif({ msg: "Agregado a \"Ver despues\"", type: "default", fade:0, timeout:1500 }); } else if(data.status == 200 && data.code == 0){ self.find('.pt-plist-tgl_btn').html(''); notif({ msg: "Eliminado de \"Ver despues\"", type: "default", fade:0, timeout:1500 }); } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { console.log("error"); }) } function PT_NewList(){ swal({ title: '', type: "", html:'Crear nueva lista de reproducciónintimidadPúblicoprivado', showCancelButton: true, allowOutsideClick:false, confirmButtonText:'crear', cancelButtonText:'cancelar', customClass: 'pt_add_to_list_vid', preConfirm: function (email) { return new Promise(function (resolve, reject) { name = $(".create-new-list").find('input').val(); desc = $(".create-new-list").find('textarea').val(); privacy = $(".create-new-list").find('select').val(); setTimeout(function() { if (name == '') { reject('Se requiere el nombre de la lista de reproducción.'); } else if(privacy 1){ reject('Por favor verifique los detalles'); } else { resolve(); } }, 100) }) } }).then(function(){ if (!name){ return;} $.ajax({ url: 'https://www.inkasex.com/aj/lists?type=list&a=new', type: 'POST', dataType: 'json', data: {name:name,desc:desc,pr:privacy}, }) .done(function(data) { if (data.status == 200) { swal({ title:name, text:"¡La lista de reproducción se agregó con éxito!", type:'success' }); PT_Delay(function(){ swal.close(); },2000); } else if(data.status == 200){ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { swal.close(); console.log("error"); }) }, function(){ //Error }) } function PT_EditList(id){ if (!id) { return false; } $.ajax({ url: 'https://www.inkasex.com/aj/lists', type: 'GET', dataType: 'json', data: {type: 'list',a:'edit',id:id}, }) .done(function(data) { if (data.status == 200) { swal({ title: '', type: "", html:data.html, showCancelButton: true, allowOutsideClick:false, confirmButtonText:' Salvar', cancelButtonText:'cancelar', preConfirm: function (email) { return new Promise(function (resolve, reject) { name = $(".edit-list-form").find('input').val(); desc = $(".edit-list-form").find('textarea').val(); privacy = $(".edit-list-form").find('select').val(); setTimeout(function() { if (name == '') { reject(''); } else if(privacy 1){ reject('Por favor verifique los detalles'); } else { resolve(); } }, 100) }) } }).then(function(){ if (!name){ return;} $.ajax({ url: 'https://www.inkasex.com/aj/lists?type=list&a=update', type: 'POST', dataType: 'json', data: {name:name,desc:desc,pr:privacy,id:id}, }) .done(function(data) { if (data.status == 200) { swal({ title:name, text:"¡La lista de reproducción se guardó con éxito!", type:'success' }); PT_Delay(function(){ swal.close(); },2000); } else if(data.status == 200){ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { swal.close(); console.log("error"); }) }, function(){ //Error }) } }) .fail(function() { console.log("error"); }) } function PT_DeleteList(id){ if (!id) { return false;} swal({ title: 'Confirmación!', text: "¿Estás seguro de que quieres eliminar esta PlayList?", type: 'warning', showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: 'Sí, ¡bórralo!' }).then(function(){ $.ajax({ url: 'https://www.inkasex.com/aj/lists', type: 'GET', dataType: 'json', data: {type: 'list',a:'delist',id:id}, }) .done(function(data) { if (data.status == 200) { $("[data-playlist='"+id+"']").slideUp(function(){ $(this).remove(); }); swal({ title:"Borrado!", text:data.name + " ha sido eliminado", type:"success" }); } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { console.log("error"); }) }) } function PT_DelFromList(list_id,video_id){ if (!list_id || !video_id) { return false; } $.ajax({ url: 'https://www.inkasex.com/aj/lists', type: 'GET', dataType: 'json', data: {type: 'list',a:'delvid',video_id:video_id,list_id:list_id}, }) .done(function(data) { if (data.status == 200) { $("[data-video-id='"+video_id+"']").slideUp(function(){ $(this).remove(); }) } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); }) } function PT_RemoveFromWL(video_id){ if (!video_id) { return false; } $.ajax({ url: 'https://www.inkasex.com/aj/lists', type: 'GET', dataType: 'json', data: {type: 'list',a:'delwl',video_id:video_id}, }) .done(function(data) { if (data.status == 200) { $("[data-video-id='"+video_id+"']").slideUp(function(){ $(this).remove(); }) } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); }) } function PT_RVReply(text,comm_id,event,video_id){ if (!text || !comm_id || !event || !video_id) { return false; } else if(event.keyCode == 13 && event.shiftKey == 0){ var reply_id = 0; if($("#comm-reply-"+comm_id).attr('data-reply-id')){ reply_id = $("#comm-reply-"+comm_id).attr('data-reply-id'); } $.ajax({ url: "https://www.inkasex.com/aj/add-reply/video", type: 'POST', dataType: 'json', data: {text:text,id:comm_id,video_id:video_id,reply:reply_id}, }) .done(function(data) { if (data.status == 200) { $("#pt-comment-replies-cont-" + comm_id).append(data.html) $("#comm-reply-"+comm_id).find('input').val('').blur(); } $("#comment-reply-loading-renderer-"+comm_id).addClass('hidden'); }) .fail(function() { alert('Sorry, something went wrong: Please try again later ...'); }) } } function PT_RPReply(text,comm_id,event,post_id){ if (!text || !comm_id || !event || !post_id) { return false; } else if(event.keyCode == 13 && event.shiftKey == 0){ var reply_id = 0; if($("#comm-reply-"+comm_id).attr('data-reply-id')){ reply_id = $("#comm-reply-"+comm_id).attr('data-reply-id'); } $.ajax({ url: "https://www.inkasex.com/aj/add-reply/article", type: 'POST', dataType: 'json', data: {text:text,id:comm_id,post_id:post_id,reply:reply_id}, }) .done(function(data) { if (data.status == 200) { $("#pt-comment-replies-cont-" + comm_id).append(data.html) $("#comm-reply-"+comm_id).find('input').val('').blur(); } $("#comment-reply-loading-renderer-"+comm_id).addClass('hidden'); }) .fail(function() { alert('Sorry, something went wrong: Please try again later ...'); }) } } function PT_RAReply(text,comm_id,event,post_id){ if (!text || !comm_id || !event || !post_id) { return false; } else if(event.keyCode == 13 && event.shiftKey == 0){ var reply_id = 0; if($("#comm-reply-"+comm_id).attr('data-reply-id')){ reply_id = $("#comm-reply-"+comm_id).attr('data-reply-id'); } $.ajax({ url: "https://www.inkasex.com/aj/add-reply/activity", type: 'POST', dataType: 'json', data: {text:text,id:comm_id,post_id:post_id,reply:reply_id}, }) .done(function(data) { if (data.status == 200) { $("#pt-comment-replies-cont-" + comm_id).append(data.html) $("#comm-reply-"+comm_id).find('input').val('').blur(); } $("#comment-reply-loading-renderer-"+comm_id).addClass('hidden'); }) .fail(function() { alert('Sorry, something went wrong: Please try again later ...'); }) } } function PT_DeleteReply(id) { if (!id) { return false; } if (!confirm('¿Seguro que quieres eliminar tu comentario?')) { return false; } $('#reply-' + id).slideUp('fast'); $.post('https://www.inkasex.com/aj/delete-reply', {id: id}); } function PT_LikeComments(self,type,comment_id){ if (!self || (type != 'up' && type != 'down') || !comment_id){ return false; } else if (!$('#main-container').attr('data-logged') && $('#main-url').val()) { window.location.href = PT_Ajax_Requests_File() + 'login?to=' + $('#main-url').val(); return false; } var self = $(self); $.ajax({ url: 'https://www.inkasex.com/aj/comment-like-system/' + type, type: 'POST', dataType: 'json', data: {id:comment_id} }) .done(function(data) { if (data.status == 200 && type == 'up' && data.type == 'added_like'){ self.find('span').text((data.up)); $('[data-comment-dislikes="'+comment_id+'"]').find('span').text((data.down)); self.find('svg.feather').addClass('active'); self.siblings().find('svg.feather').removeClass('active'); } else if (data.status == 200 && type == 'up' && data.type == 'deleted_like'){ self.find('span').text((data.up)); $('[data-comment-dislikes="'+comment_id+'"]').find('span').text((data.down)); self.find('svg.feather').removeClass('active'); self.siblings().find('svg.feather').removeClass('active'); } else if (data.status == 200 && type == 'down' && data.type == 'added_dislike'){ self.find('span').text((data.down)); self.find('svg.feather').addClass('active'); $('[data-comment-likes="'+comment_id+'"]').find('span').text((data.up)); self.siblings().find('svg.feather').removeClass('active'); } else if (data.status == 200 && type == 'down' && data.type == 'deleted_dislike'){ self.find('span').text((data.down)); self.find('svg.feather').removeClass('active'); $('[data-comment-likes="'+comment_id+'"]').find('span').text((data.up)); self.siblings().find('svg.feather').removeClass('active'); } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { console.log("error"); }) } function PT_LikeReplies(self,type,reply_id){ if (!self || (type != 'up' && type != 'down') || !reply_id){ return false; } else if (!$('#main-container').attr('data-logged') && $('#main-url').val()) { window.location.href = PT_Ajax_Requests_File() + 'login?to=' + $('#main-url').val(); return false; } var self = $(self); $.ajax({ url: 'https://www.inkasex.com/aj/reply-like-system/' + type, type: 'POST', dataType: 'json', data: {id:reply_id} }) .done(function(data) { if (data.status == 200 && type == 'up' && data.type == 'added_like'){ self.find('span').text((data.up)); $('[data-reply-dislikes="'+reply_id+'"]').find('span').text((data.down)); self.find('svg.feather').addClass('active'); self.siblings().find('svg.feather').removeClass('active'); } else if (data.status == 200 && type == 'up' && data.type == 'deleted_like'){ self.find('span').text((data.up)); $('[data-reply-dislikes="'+reply_id+'"]').find('span').text((data.down)); self.find('svg.feather').removeClass('active'); self.siblings().find('svg.feather').removeClass('active'); } else if (data.status == 200 && type == 'down' && data.type == 'added_dislike'){ self.find('span').text((data.down)); self.find('svg.feather').addClass('active'); $('[data-reply-likes="'+reply_id+'"]').find('span').text((data.up)); self.siblings().find('svg.feather').removeClass('active'); } else if (data.status == 200 && type == 'down' && data.type == 'deleted_dislike'){ self.find('span').text((data.down)); self.find('svg.feather').removeClass('active'); $('[data-reply-likes="'+reply_id+'"]').find('span').text((data.up)); self.siblings().find('svg.feather').removeClass('active'); } else{ swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); } }) .fail(function() { console.log("error"); }) } function pt_hide_announcement(id){ if (!id) { return false; } $("#announcement-"+id).slideUp('fast',function(){ $(this).remove(); $.post('https://www.inkasex.com/aj/main/hide-announcement', {id: id}, function(data, textStatus, xhr) { /* pass */ }); }) } function PT_PaySubscribe(user_id,self,type = '',price=0) { if (!user_id || !self) { return false; } var text = $(self).find('span').text(); if (type == 'subscribe') { PayUsingWallet(type,'show',user_id,price); return; $(self).find('span').text("Por favor espera.."); $(self).attr('disabled', 'true'); PT_ShowMethods('subscribe',0,0,user_id); } else{ var html = "¿Seguro que desea darse de baja? Esta acción no se puede deshacer."; swal({ title: "", type: "", html:html, showCancelButton: true, cancelButtonText: "No", customClass: 'sweetalert-lg pt_add_to_list_vid', confirmButtonText:'Sí' }).then(function(){ $(self).removeClass('btn-subscribed').addClass('btn-subscribe'); $(self).find('span').text("Suscribir"); $(self).find('svg').remove(); $(self).prepend(''); $(self).attr('onclick', 'PT_PaySubscribe(' + user_id + ',this,"subscribe")'); $.post('https://www.inkasex.com/aj/subscribe', {user_id: user_id}); },function(){ }); } $(self).removeAttr('disabled'); $(self).find('span').text(text); } function notifyUser(user_id,self) { $.post('https://www.inkasex.com/aj/user/notify', {user_id:user_id}, function(data) { if (data.status == 200) { $(self).replaceWith(data.html); } else { Snackbar.show({text: ''+ data.message +''}); } }); }
Crear nueva lista de reproducción