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 gettags() { callScript("/inc/gettags.php"); } function gettagsphotos() { callScript("/inc/gettagsphotos.php"); } function addVideo(video,catalog) { signup('videofav');} function delVideo(video,catalog) { signup('videofav');} function addStar(modele) { signup('starfav');} function delStar(modele) { signup('starfav');} function callplay(video,catalog,membre) { callScript("/inc/callplay.php?video="+video+"&catalog="+catalog+"&membre="+membre); } function checkEmailLogin(email) { 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); document.MM_returnValue = (errors == ''); return errors; } function checkform(form) { var errors=''; email = form.joinemail.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'; var illegalChars = /[\W_]/; // allow only letters and numbers pass=form.pwd.value; if (pass=='') { errors+= 'Le mot de passe ne peut etre vide\n'; } else { if (illegalChars.test(pass)) { errors+= 'Le mot de passe contient des caracteres interdit\n'; } } if (errors)alert(errors); document.MM_returnValue = (errors == ''); return errors; } function validlogin(email,pass) { errors=callScript("/inc/validlogin.php?email="+email+"&pass="+pass); document.MM_returnValue = (errors == ''); return errors; } function validrecuppass(email,pass) { errors=callScript("/inc/validlogin.php?recuppass=1&email="+email); document.MM_returnValue = (errors == ''); return errors; } function gethisto() { errors=callScript("/inc/gethisto.php?time=1714202944"); } function loadPageFinish() { callScript("/inc/loadpagefinish.php?time=1714202944"); } function videoLoadFavoris(video,site) { callScript("/inc/videoLoadFavoris.php?video="+video+"&site="+site+"&time=1714202944"); } function videoLoadStars(star) { callScript("/inc/videoLoadStars.php?star="+star+"&time=1714202944"); }