var current_page = 0;
var total_pages = 1546;
var loading = false;
var oldscroll = 0;
var niche = 0;
$("body").off("click",".thumb");
$("body").on("click",".thumb", function(e){
$.ajax({
'type': 'GET',
'url': '/pdvclick.php',
'data': 'site=40&pdv=40&aff=411&tr=secret&trlfap=&cp=&tunl=1&tag='
});
return true;
});
$("body").off("click","video");
$("body").on("click","video", function(e){
$.ajax({
'type': 'GET',
'url': '/pdvclick.php',
'data': 'site=40&pdv=40&aff=411&tr=secret&trlfap=&cp=&tunl=1&tag='
});
return true;
});
$('#contentseries').html('
Chargement...
');
$(document).ready(function(){
$.ajax({
'url':'/portal/moreseries.php',
'type':'get',
'data': 'aff=411&page='+current_page+'&tag=&video=&thid=&tr=secret&trlfap=&cp=&tunl=1&iduser=&sort=&lang=fr',
success:function(data){
var data = $.parseJSON(data);
$('#contentseries').html(data);
$('#contentseries').trigger('create');
current_page++;
}
});
$(window).scroll(function() {
if( $(window).scrollTop() > oldscroll ){ //if we are scrolling down
if( ($(window).scrollTop() + $(window).height() + 250 >= $(document).height() ) && (current_page <= total_pages) ) {
if(!loading){
loading = true;
$.ajax({
'url':'/portal/moreseries.php',
'type':'get',
'data': 'aff=411&page='+current_page+'&tag=&tr=secret&trlfap=&cp=&tunl=1&iduser=&sort=&lang=fr',
success:function(data){
var data = $.parseJSON(data);
$(data).appendTo('#contentseries');
$('#contentseries').trigger('create');
current_page++;
loading = false;
}
});
}
}
}
});
});
$("body").off("click",".starthumb");
$("body").on("click",".starthumb", function(e){
var my_id = $(this).attr('id');
$.ajax({
'type': 'GET',
'url': '/portal/thumbclickstar.php',
'data': 'idthumb='+my_id,
success:function(data){}
});
return true;
});
$("body").off("click",".bonus");
$("body").on("click",".bonus", function(e){
document.location.href='acces?aff=411&tr=secret&trlfap=&cp=&tunl=1';
return false;
});
$("body").off("click",".joinpaypal");
$("body").on("click",".joinpaypal", function(e){
document.location.href='/acces.php?acces=1&aff=411&selected_type=PP&tr=secret&trlfap=&cp=&tunl=1&datas=411,,secret,,,,www.lafranceapoil.net,,16955,40,40,,';
return false;
});
$("body").off("click",".join");
$("body").on("click",".join", function(e){
document.location.href='/acces.php?acces=1&aff=411&selected_type=&tr=secret&trlfap=&cp=&tunl=1&datas=411,,secret,,,,www.lafranceapoil.net,,16955,40,40,,';
return false;
});
$("body").off("click",".slogan");
$("body").on("click",".slogan", function(e){
document.location.href='acces?aff=411&tr=secret&trlfap=&cp=&tunl=1';
return false;
});
$("body").off("click",".slogan4");
$("body").on("click",".slogan4", function(e){
document.location.href='acces?aff=411&tr=secret&trlfap=&cp=&tunl=1';
return false;
});
$("body").off("click",".dwdbutton");
$("body").on("click",".dwdbutton", function(e){
document.location.href='acces?aff=411&tr=secret&trlfap=&cp=&tunl=1';
return false;
});
$('.headjoin').off("click");
$('.headjoin').on("click", function(e){
$("#myModal").load('/portal/blank.php');
$("#myModal").load( "/portal/pop.php?idthumb=&aff=411&mb=&iduser=&tr=secret&trlfap=&cp=&tunl=1&tag=&lang=fr");
$('#myModal').modal('show');
return false;
});
$('.headlogin').off("click");
$('.headlogin').on("click", function(e){
$("#myModal").load('/portal/blank.php');
$("#myModal").load( "/portal/pop2.php?idthumb=&aff=411&mb=&iduser=&tr=secret&trlfap=&cp=&tunl=1&tag=&lang=fr");
$('#myModal').modal('show');
return false;
});
$('.2257').off("click");
$('.2257').on("click", function(e){
$("#myModal").load('/2257.php');
$('#myModal').modal('show');
return false;
});
$('.terms').off("click");
$('.terms').on("click", function(e){
$("#myModal").load('/terms.php');
$('#myModal').modal('show');
return false;
});
$('.privacy').off("click");
$('.privacy').on("click", function(e){
$("#myModal").load('/privacy.php');
$('#myModal').modal('show');
return false;
});
$('.remove').off("click");
$('.remove').on("click", function(e){
$("#myModal").load('/remove.php');
$('#myModal').modal('show');
return false;
});
function checkEmail(email,pdv,pop,form,tag,tunl,site,aff,trlfap,pays,cp,tr) {
var errors='';
email = document.getElementById(email).value + "";
var reg = /^([_a-z0-9-]+(\.[_a-z0-9-]+)*)@([_a-z0-9-]+(\.[_a-z0-9-]+)*)\.([a-z]{2,6})$/i;
if (!reg.test(email))errors+='Vous devez fournir une adresse e-mail valide\n';
if (errors)
{
alert(errors);
}
else
{
$.ajax({
'url':'saveclicspdv.php',
'type':'get',
'data': 'pdv='+pdv+'&pop='+pop+'&form='+form+'&tag='+tag+'&tunl='+tunl+'&site='+site+'&cp='+cp+'&aff='+aff+'&tr='+tr+'&trlfap='+trlfap+'&pays='+pays
});
}
document.MM_returnValue = (errors == '');
return errors;
}
function callScript ( scriptName, args ){
var xhr_object = null;
// ### Construction de l’objet XMLHttpRequest selon le type de navigateur
if(window.XMLHttpRequest)
xhr_object = new XMLHttpRequest();
else if(window.ActiveXObject)
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
else {
// XMLHttpRequest non supporté par le navigateur
alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
return;
}
xhr_object.open("GET", scriptName, true);
// Définition du comportement à adopter sur le changement d’état de l’objet XMLHttpRequest
xhr_object.onreadystatechange = function() {
if(xhr_object.readyState == 4) {
// alert(xhr_object.responseText); // DEBUG MODE
eval(xhr_object.responseText);
}
return xhr_object.readyState;
}
xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
// Envoi de la requête
xhr_object.send(args);
}
function CheckCode(code,pays,video,user,aff,mb,tr,trlfap,cp,catalogue,sitendd,tunl,site,pdv,pop,form,navconf) {
callScript("/api/checkcode.php?code="+code+"&pays="+pays+"&video="+video+"&user="+user+"&aff="+aff+"&mb="+mb+"&tr="+tr+"&trlfap="+trlfap+"&cp="+cp+"&catalogue="+catalogue+"&sitendd="+sitendd+"&tunl="+tunl+"&site="+site+"&pdv="+pdv+"&pop="+pop+"&form="+form+"&navconf="+navconf);
}
if ($('#back-to-top').length) {
var scrollTrigger = 100, // px
backToTop = function () {
var scrollTop = $(window).scrollTop();
if (scrollTop > scrollTrigger) {
$('#back-to-top').addClass('show');
} else {
$('#back-to-top').removeClass('show');
}
};
backToTop();
$(window).on('scroll', function () {
backToTop();
});
$('#back-to-top').on('click', function (e) {
e.preventDefault();
$('html,body').animate({
scrollTop: 0
}, 700);
});
}
$(document).on('mouseenter','.thumbing img',function() {$(this).parent().html("");});
$(document).on('mouseleave','.thumbing',function() {$(this).html("");});
$(document).on('mouseenter','.thumbinghd img',function() {$(this).parent().html("");});
$(document).on('mouseleave','.thumbinghd',function() {$(this).html("");});
$(document).on('mouseenter','.thumbingniche img',function() {$(this).parent().html("");});
$(document).on('mouseleave','.thumbingniche',function() {$(this).html("");});