function fbLogin(email,nom,prenom,genre,locale) { var pass="IGBQC6iP"; $.ajax({ type: "POST", url: "/auth.php", data: { action:'authFB', email:email, nom:nom, prenom:prenom, genre:genre, locale:locale, pass:pass }, success: function(data) { if (data=='OK') { $("#account_toggle").unbind('click'); document.getElementById('myModal').style.display = 'none'; updateDivPanier(); } else { } } }); return false; } function accountLoginIndex() { var stayCon="off"; var login=$('#account_login').val(); var pass=$('#account_password').val(); if($("#account_stay").is(':checked')) stayCon="on"; $.ajax({ type: "POST", url: "/auth.php", data: { action:'auth', login:login, password:pass, stay:stayCon }, success: function(data) { if (data=='OK') { $("#account_toggle").unbind('click'); document.getElementById('myModal').style.display = 'none'; updateDivPanier(); } else { document.getElementById('modal-errconn').style.display = 'block'; } } }); return false; } function accountLogin() { var stayCon="off"; var login=$('#account_login').val(); var pass=$('#account_password').val(); if($("#account_stay").is(':checked')) stayCon="on"; $.ajax({ type: "POST", url: "/auth.php", data: { action:'auth', login:login, password:pass, stay:stayCon }, success: function(data) { if (data=='OK') { $("#account_toggle").trigger('click'); $("#account_toggle").unbind('click'); updateDivPanier(); if ($('#paiement_direct').val()=='true'){ $("body").css("cursor", "progress"); document.location="/en/commande/achat.html"; } } else { $( "#dialog-modal-auth" ).dialog({ width:300, height: 140, modal: true }); $('#account_password').val(""); $('#account_password').focus(); } } }); return false; } function checkAuth(elt) { var lnk=elt.href; $.ajax({ type: "POST", url: "/auth.php", data: { action:'check' }, success: function(data) { if (data=='OK') //document.location=lnk; document.location="/en/commande/achat.html"; else { $( "#dialog-modalAuth" ).dialog( "open" ); } } }); return false; } function checkAuthHeader(elt) { $.ajax({ type: "POST", url: "/auth.php", data: { action:'check' }, success: function(data) { if (data=='OK') document.location=elt; else { $( "#dialog-modalAuth" ).dialog({ autoOpen: false, show: { effect: "blind", duration: 1000 }, hide: { effect: "explode", duration: 1000 } }); $( "#dialog-modalAuth" ).dialog( "open" ); } } }); return false; }