806 lines
30 KiB
PHP
Executable File
806 lines
30 KiB
PHP
Executable File
<?php
|
||
/*-----------------------------------------------------*/
|
||
include_once("_inc/config.php");
|
||
/*-----------------------------------------------------*/
|
||
|
||
|
||
/////////////////////////////////////////////////////////////////////////////
|
||
// ACTIONS
|
||
|
||
if(isset($_POST['action'])){
|
||
|
||
header("Content-type: application/json");
|
||
echo '{"results":{';
|
||
|
||
switch($_POST['action']){
|
||
|
||
case "inscription" :
|
||
|
||
if(!isset($_SESSION["gar_front_code_client"])){
|
||
header('Location: index.php');
|
||
}
|
||
|
||
|
||
|
||
$lastname = sqlEscape($_POST['lastname']);
|
||
$firstname = sqlEscape($_POST['firstname']);
|
||
$mobile = sqlEscape($_POST['mobile']);
|
||
$birthdate = sqlEscape($_POST['birthdate']);
|
||
$email = sqlEscape($_POST['email']);
|
||
$opt_sms = sqlEscape($_POST['opt_sms']);
|
||
$opt_email = sqlEscape($_POST['opt_email']);
|
||
$filename = sqlEscape($_POST['filename']);
|
||
|
||
|
||
//uploader fichier !!
|
||
|
||
|
||
|
||
$pharmacie = getPharmacieByCode($_SESSION["gar_front_code_client"]);
|
||
|
||
if($filename != ""){
|
||
$tmpArray = explode(".", $filename);
|
||
$ext = strtolower(end($tmpArray));
|
||
$newFilename = $pharmacie -> id . "." . $ext;
|
||
$filePath = "files/ambassadeurs/sell_out/" . $newFilename;
|
||
|
||
if(file_exists($filePath))unlink($filePath);
|
||
copy("tmp/" . $filename,$filePath);
|
||
unlink("tmp/" . $filename);
|
||
|
||
}else{
|
||
$newFilename = "";
|
||
}
|
||
|
||
|
||
$query = "UPDATE `".$GLOBALS['sql_prefixe']."pharmacies`
|
||
SET
|
||
`ambassadeur` = '1' ,
|
||
`ambassadeur_lastname` = '".$lastname."' ,
|
||
`ambassadeur_firstname` = '".$firstname."' ,
|
||
`ambassadeur_mobile` = '".$mobile."' ,
|
||
`ambassadeur_birthdate` = '".$birthdate."' ,
|
||
`ambassadeur_email` = '".$email."' ,
|
||
`ambassadeur_opt_sms` = '".$opt_sms."' ,
|
||
`ambassadeur_opt_email` = '".$opt_email."' ,
|
||
`ambassadeur_sell_out_file` = '".$newFilename."' ,
|
||
`ambassadeur_date` = CURDATE()
|
||
WHERE `code_client` = '".$_SESSION["gar_front_code_client"]."' ;";
|
||
|
||
|
||
$result = mysql_query($query);
|
||
|
||
if(!$result){
|
||
echo '"error":"Inscription impossible..."';
|
||
echo "}}";
|
||
exit();
|
||
}
|
||
|
||
echo '"complete":"1"';
|
||
|
||
|
||
|
||
$mail_sender = "info@garancia-beauty.com";
|
||
$mail_to = "trade@garancia-beauty.com";
|
||
$objet = "Garancia - inscription ambassadeur";
|
||
|
||
$pharmacie = getPharmacieByCode($_SESSION["gar_front_code_client"]);
|
||
|
||
$delegue = getDelegueBySecteur($pharmacie -> secteur);
|
||
if($delegue){
|
||
$mail_to .= ";" . $delegue -> email;
|
||
}
|
||
|
||
$message = "La pharmacie \"".$pharmacie -> name."\" (CIP : ".$pharmacie -> CIP.") a inscrit un ambassadeur (".$firstname." ".$lastname.").";
|
||
|
||
|
||
$html = file_get_contents("emails/blank.html");
|
||
$html = replaceMailVar($html,"message",$message);
|
||
$html = replaceMailVar($html,"site_url",$GLOBALS['site_url']);
|
||
//$html = replaceMailVar($html,"code_client",$code_client);
|
||
//$html = replaceMailVar($html,"CIP",$row -> CIP);
|
||
//$html = replaceMailVar($html,"password",$password);
|
||
//$html = replaceMailVar($html,"pharmacie_name",$row -> name);
|
||
|
||
$html = html_entity_decode(stripslashes($html));
|
||
$html = preg_replace('/'/', "'", $html);
|
||
|
||
|
||
$headers = "";
|
||
$headers .= "From: Garancia <$mail_sender>"."\n";
|
||
$headers .= "Reply-To: $mail_sender"."\n";
|
||
$headers .= "MIME-Version: 1.0"."\n";
|
||
$headers .= "Return-Path: <$mail_sender>"."\n";
|
||
$headers .= "Content-Type:text/html; charset=\"utf-8\" "."\n";
|
||
$headers .= "Content-Transfer-Encoding: 8bit"."\n";
|
||
|
||
//$headers .= "Bcc:chasleries@gmail.com,".$mail_to."\n";
|
||
//$headers .= "Bcc:".$bcc."\n";
|
||
//$headers .= "Cc:email2@example.com"."\n";
|
||
|
||
$sendMail = @mail($mail_to, $objet, $html , $headers);
|
||
|
||
|
||
|
||
|
||
|
||
break;
|
||
|
||
|
||
}
|
||
|
||
echo "}}";
|
||
exit();
|
||
|
||
}
|
||
//////////////////////////////////////////////////////////
|
||
|
||
$_RUBRIQUE = "le-cercle-des-ambassadeurs";
|
||
|
||
/*-----------------------------------------------------*/
|
||
include_once("_inc/assets/metas.php");
|
||
include_once("_inc/assets/top.php");
|
||
/*-----------------------------------------------------*/
|
||
?>
|
||
|
||
|
||
<div class="page">
|
||
|
||
<div id="arianne">
|
||
<a href="home.php">Accueil</a> |
|
||
<a href="le-conseil-des-mages.php">Informez-vous</a> |
|
||
<span class="current">Le Cercle des Ambassadeurs</span>
|
||
</div>
|
||
|
||
<div class="page_menu">
|
||
<a href="le-conseil-des-mages.php"><span>Le Conseil des Mages</span></a>
|
||
<a href="le-cercle-des-ambassadeurs.php" class="current"><span>Le Cercle des Ambassadeurs</span></a>
|
||
<a href="actualites.php"><span>Actualités</span></a>
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
|
||
<div class="page_contents">
|
||
|
||
<a href="#parcours_ambassadeur" rel="popin" class="parcoursBtn btnRightArrow">Mon parcours</a>
|
||
|
||
<h1><span>[</span> Le Cercle des Ambassadeurs <span>]</span></h1>
|
||
|
||
<div class="ambassadeurs_pres">
|
||
<div class="etapes_menu">
|
||
<div class="btn etape1 active">Découvrez</div>
|
||
<div class="btn etape2 active">Mes avantages</div>
|
||
<div class="btn etape3">Mon engagement</div>
|
||
<div class="bgActif2"></div>
|
||
<div class="bgActif1"></div>
|
||
</div>
|
||
|
||
<div class="etapes_contents">
|
||
|
||
<div class="etapes_slide">
|
||
|
||
<div class="etape etape1">
|
||
<div class="txt1"><b>Parce que c’est dans votre point de vente que l’alchimie opère, nous récompensons votre implication :</b>
|
||
</div>
|
||
<div class="txt2">
|
||
Des outils d’aide à la vente pour votre <b>POINT DE VENTE</b><br />
|
||
& <br />
|
||
Des cadeaux pour <b>VOUS</b>
|
||
</div>
|
||
|
||
<div>
|
||
<img src="_img/ambassadeurs/img01.jpg" />
|
||
</div>
|
||
|
||
<div class="txt2">
|
||
N’attendez plus et rejoignez<br />
|
||
Le Cercle des Ambassadeurs du <b>Laboratoire Garancia !</b>
|
||
</div>
|
||
|
||
<a href="#next" class="btnRightArrow">en savoir plus</a>
|
||
</div>
|
||
|
||
<div class="etape etape2">
|
||
|
||
|
||
<div class="blocEncart">
|
||
<div class="title">POUR VOTRE POINT DE VENTE</div>
|
||
<div class="ctn">
|
||
|
||
<?php
|
||
echo getContent(3) -> content;
|
||
?>
|
||
|
||
<!--
|
||
<ul>
|
||
<li>Un contact privilégié avec le laboratoire Garancia</li>
|
||
<li>
|
||
En exclusivité pour booster vos sorties consommateurs :
|
||
2 Kits Animation par an composés de :<br />
|
||
♦ Testeurs<br />
|
||
♦ Echantillons & Leaflets<br />
|
||
♦ Sacs Garancia & Papier de soie<br />
|
||
♦ 10 Soins Miniatures Garancia<br />
|
||
</li>
|
||
</ul>
|
||
-->
|
||
<img src="_img/ambassadeurs/img02.jpg" />
|
||
</div>
|
||
</div>
|
||
|
||
<div class="blocEncart" style="float:right">
|
||
<div class="title">POUR VOUS</div>
|
||
<div class="ctn">
|
||
<?php
|
||
echo getContent(4) -> content;
|
||
?>
|
||
|
||
<!--<ul>
|
||
<li>
|
||
En Avant-Première : Recevez 1 semaine avant leur lancement TOUTES nos nouveautés : <br />
|
||
♦ La nouveauté OFFERTE <br />
|
||
♦ Sa fiche formation
|
||
</li>
|
||
<li>
|
||
1 Cadeau OFFERT à votre date anniversaire d’adhésion
|
||
</li>
|
||
<li>
|
||
Des <u class="green">SURPRISES</u> tout au long de l’année…
|
||
</li>
|
||
<li>
|
||
<b class="green">VOTRE CADEAU DE BIENVENUE : </b>
|
||
</li>
|
||
</ul>
|
||
-->
|
||
<img src="_img/ambassadeurs/img03.jpg" />
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
<br /><br />
|
||
<a href="#next" class="btnRightArrow">Je suis intéressé(e)</a>
|
||
|
||
|
||
</div>
|
||
|
||
<div class="etape etape3">
|
||
|
||
<div class="formCtn">
|
||
<div class="title">
|
||
<?php if($GLOBALS["gar_front_user"] -> ambassadeur == 1){ ?>
|
||
Vous êtes déjà ambassadeur
|
||
<?php }else{ ?>
|
||
Je souhaite devenir Ambassadeur du Laboratoire Garancia et m’engage à (cases à cocher) : <?php } ?>
|
||
</div>
|
||
|
||
<div class="line ctn">
|
||
<input type="checkbox" name="membre" disabled="disabled" value="1" <?php if($GLOBALS["gar_front_user"] -> mage == 1) echo 'checked="checked"'; ?> class="checkbox" /> <span class="l">Être membre du Conseil des Mages <a href="#mage_home" rel="popin">(?)</a></span>
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<div class="form">
|
||
|
||
<div class="line">
|
||
<input type="checkbox" name="engagement" value="1" class="checkbox" /> <span class="l">Respecter les 3 Engagements de « Mon Parcours » :</span>
|
||
<div class="engagements">
|
||
<b>1er Engagement :</b> Envoyez une photo de votre linéaire Garancia, validez votre niveau Apprenti Sorcier de l’École des Sorciers et incitez un autre membre de l’officine à le valider.<br />
|
||
<b>2ème Engagement :</b> Envoyez une photo d’une mise en avant Garancia, validez votre niveau Sorcier en Devenir et incitez un autre membre de l’officine à le valider.<br />
|
||
<b>3ème Engagement :</b> Envoyez vos ventes Garancia, validez votre niveau Sorcier Diplômé et incitez un autre membre de l’officine à le valider.
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<div class="legend">Tous les champs sont obligatoires</div>
|
||
|
||
<div class="line">
|
||
<label>Nom</label>
|
||
<input class="saisie required" name="lastname" />
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<div class="line">
|
||
<label>Prénom</label>
|
||
<input class="saisie required" name="firstname" />
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<div class="line">
|
||
<label>Numéro de portable</label>
|
||
<input class="saisie required" name="mobile" />
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<div class="line">
|
||
<label>Date de naissance</label>
|
||
<input class="saisie required" name="birthdate" value="jj/mm/aaaa" size="10" style="width:90px;" />
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<div class="line">
|
||
<label>Votre e-mail</label>
|
||
<input class="saisie required" name="email" />
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<div class="line">
|
||
<div style="margin:0 0 20px 0 !important;">
|
||
<b>Pour valider votre inscription, c’est très simple :</b> envoyez-nous vos ventes de chaque référence Garancia par mois depuis les 12 derniers mois soit :
|
||
</div>
|
||
<div style="margin:0 0 20px 0 !important;">
|
||
• Par fax au <span class="green">01 45 20 73 20</span> <em>(Au cours de la semaine suivant votre inscription)</em><br />
|
||
En précisant sur le fax : <b>NOM et Prénom Ambassadeur + code client Omega Pharma</b>
|
||
</div>
|
||
<div style="margin:0 0 20px 0 !important;">
|
||
• Par email à <span class="green">digital@garancia-beauty.com</span> <em>(Au cours de la semaine suivant votre inscription)</em>
|
||
<br />
|
||
En précisant en objet : <b>NOM et Prénom Ambassadeur + code client Omega Pharma</b>
|
||
</div>
|
||
<div>
|
||
• Ou directement en ligne :
|
||
</div>
|
||
<!--
|
||
<input type="checkbox" name="sell_out" value="1" class="checkbox" disabled="disabled" /> <span class="l"> Envoyez-nous <b>vos ventes</b> par mois pour chaque référence Garancia depuis les 12 derniers mois pour valider votre inscription</span>
|
||
-->
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<div class="line file">
|
||
<input type="hidden" name="filename" value="" class="filename" />
|
||
|
||
<input type="file" id="upload_add" class="fileUpload" restrict="pdf,jpg,png,gif,zip" />
|
||
|
||
<div class="done"></div>
|
||
|
||
|
||
<script src="_js/fileUpload/vendor/jquery.ui.widget.js"></script>
|
||
<script src="_js/fileUpload/jquery.iframe-transport.js"></script>
|
||
<script src="_js/fileUpload/jquery.fileupload.js"></script>
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
'use strict';
|
||
// Change this to the location of your server-side upload handler:
|
||
var url = '_js/fileUpload/';
|
||
$('.etape3 .fileUpload').fileupload({
|
||
url: url,
|
||
dataType: 'json',
|
||
|
||
add: function (e, data) {
|
||
var inp = $(e.target);
|
||
var parent = inp.parent();
|
||
var error = false;
|
||
if(inp.attr("restrict")){
|
||
var exts = inp.attr("restrict").split(',');
|
||
$.each(data.files, function (index, file) {
|
||
error = true;
|
||
var fileType = getFileType(file.name);
|
||
var fileExtension = getFileExtension(file.name);
|
||
|
||
|
||
var i = 0;
|
||
var nb = exts.length;
|
||
|
||
while(i < nb){
|
||
if(fileType == exts[i] || fileExtension == exts[i]){
|
||
error = false;
|
||
break;
|
||
}
|
||
i++;
|
||
}
|
||
|
||
if(error){
|
||
alert("format de fichier non accepté !");
|
||
}
|
||
|
||
});
|
||
}
|
||
|
||
if(error) return;
|
||
|
||
|
||
$(e.target).css("display","none");
|
||
parent.find(".done").html("<img src='_img/animated_loader2.gif' />");
|
||
|
||
|
||
var jqXHR = data.submit();
|
||
|
||
},
|
||
|
||
done: function (e, data) {
|
||
|
||
$(e.target).css("display","block");
|
||
|
||
var inp = $(e.target);
|
||
var parent = inp.parent();
|
||
parent.find('.done').html('<span>chargement terminé</span>');
|
||
|
||
$.each(data.result.files, function (index, file) {
|
||
|
||
var filePath = file.name;
|
||
|
||
var fileType = getFileType(file.name);
|
||
parent.find(".filename").val(filePath);
|
||
|
||
|
||
//$(".form input[name='sell_out']").attr("checked","checked");
|
||
//checkCanSubmit();
|
||
|
||
|
||
});
|
||
},
|
||
progressall: function (e, data) {
|
||
|
||
}
|
||
|
||
|
||
|
||
}).prop('disabled', !$.support.fileInput)
|
||
.parent().addClass($.support.fileInput ? undefined : 'disabled');
|
||
});
|
||
|
||
|
||
</script>
|
||
|
||
|
||
|
||
|
||
<!--
|
||
<script type="text/javascript">
|
||
$(function() {
|
||
$("#upload_add").uploadify({
|
||
'method' : 'post',
|
||
'multi' : false,
|
||
'buttonText' : 'Parcourir...',
|
||
'fileSizeLimit' : '0',
|
||
'height' : '30',
|
||
'width' : '130',
|
||
'removeCompleted' : false,
|
||
'fileTypeExts' : '*.pdf;*.jpg;*.png;*.gif;*.zip',
|
||
'formData' : { 'filename' : (new Date()).getTime() + 500 } ,
|
||
'swf' : 'uploadify/uploadify.swf',
|
||
'uploader' : 'uploadify/uploadify.php',
|
||
'onUploadSuccess' : function(file, data, response) {
|
||
var fileName = data;
|
||
$("input[name='filename']").val(fileName);
|
||
$(".form input[name='sell_out']").attr("checked","checked");
|
||
checkCanSubmit();
|
||
|
||
|
||
}
|
||
});
|
||
});
|
||
</script>
|
||
-->
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
|
||
<!--
|
||
|
||
<div class="line">
|
||
<input type="checkbox" name="opt_sms" value="1" class="checkbox" /> <span class="l2">Je souhaite recevoir des informations, avant-premières et offres promotionnelles du Laboratoire Garancia par SMS</span>
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<div class="line">
|
||
<input type="checkbox" name="opt_email" value="1" class="checkbox" /> <span class="l2">Je souhaite recevoir des informations, avant-premières et offres promotionnelles du Laboratoire Garancia par e-mail</span>
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
-->
|
||
|
||
<div class="btnCtn">
|
||
<a href="#subscribe" class="btnRightArrow subscribe">validez votre inscription</a>
|
||
</div>
|
||
|
||
<div class="errorText">
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
<div class="confirm etape">
|
||
<div>
|
||
<img src="_img/felicitations2.png" alt="félicitations" />
|
||
</div>
|
||
<div class="txt1">
|
||
Vous êtes désormais un membre privilégié du Cercle des Ambassadeurs du Laboratoire Garancia !
|
||
</div>
|
||
<div class="txt1">
|
||
Vous pouvez télécharger la fiche récapitulative sur votre rôle d’Ambassadeur du Laboratoire Garancia.
|
||
</div>
|
||
|
||
<div class="btnCnt">
|
||
<a href="files/ambassadeurs/recapitulatif.pdf" class="btnRightArrow" target="_blank">téléchargez la fiche</a>
|
||
</div>
|
||
|
||
<div class="txt2">Pour toutes questions n’hésitez pas à nous contacter au 01.45.20.32.52.</div>
|
||
|
||
|
||
<div class="txt3">
|
||
Cliquez sur<br />
|
||
<a href="#parcours_ambassadeur" rel="popin"><img src="_img/ambassadeurs/parcoursSample.png" /></a><br />
|
||
pour découvrir les surprises que l’on vous réserve …
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="clear"></div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
|
||
<?php if($GLOBALS["gar_front_user"] -> ambassadeur == 1 || $GLOBALS["gar_front_user"] -> mage != 1){ ?>
|
||
TweenLite.to($(".etape3 .form"),0,{opacity:0.2});
|
||
$(".etape3 input").attr("disabled","disabled");
|
||
<?php }else{ ?>
|
||
|
||
|
||
var canSubmit = false;
|
||
var isSending = false;
|
||
|
||
TweenLite.to($(".form .subscribe"),0,{opacity:0.2});
|
||
|
||
|
||
|
||
function checkCanSubmit(){
|
||
canSubmit = true;
|
||
|
||
|
||
|
||
if($(".form input[name='engagement']:checked").length < 1){
|
||
canSubmit = false;
|
||
}
|
||
|
||
/*
|
||
if($(".form input[name='sell_out']:checked").length < 1){
|
||
canSubmit = false;
|
||
}
|
||
*/
|
||
|
||
$(".form .saisie.required").each(function(index, element) {
|
||
if($(this).val() == "") canSubmit = false;
|
||
});
|
||
|
||
if(canSubmit){
|
||
TweenLite.to($(".form .subscribe"),0.2,{opacity:1});
|
||
}else{
|
||
TweenLite.to($(".form .subscribe"),0.2,{opacity:0.2});
|
||
}
|
||
|
||
//alert("checkCanSubmit : " + canSubmit);
|
||
|
||
}
|
||
|
||
function sendForm(){
|
||
var error = false;
|
||
$(".errorText").html('');
|
||
$(".form input").removeClass("error");
|
||
|
||
var datas = {};
|
||
datas.action = "inscription";
|
||
datas.lastname = $(".form input[name='lastname']").val();
|
||
datas.firstname = $(".form input[name='firstname']").val();
|
||
datas.mobile = $(".form input[name='mobile']").val();
|
||
datas.birthdate = $(".form input[name='birthdate']").val();
|
||
datas.email = $(".form input[name='email']").val();
|
||
datas.filename = $(".form input[name='filename']").val();
|
||
|
||
datas.opt_sms = 0;
|
||
datas.opt_email = 0;
|
||
|
||
/*
|
||
if($(".form input[name='opt_sms']:checked").length > 0){
|
||
datas.opt_sms = 1;
|
||
}
|
||
if($(".form input[name='opt_email']:checked").length > 0){
|
||
datas.opt_email = 1;
|
||
}
|
||
*/
|
||
|
||
if(!isPhone(datas.mobile)){
|
||
error = true;
|
||
$(".form input[name='mobile']").addClass("error");
|
||
}
|
||
|
||
if(!isDate(datas.birthdate)){
|
||
error = true;
|
||
$(".form input[name='birthdate']").addClass("error");
|
||
}
|
||
|
||
if(!isMail(datas.email)){
|
||
error = true;
|
||
$(".form input[name='email']").addClass("error");
|
||
}
|
||
|
||
if(error){
|
||
$(".errorText").html("Vous devez remplir correctement tous les champs");
|
||
return;
|
||
}
|
||
|
||
if(isSending) return;
|
||
TweenLite.to($(".formCtn"),0,{opacity:0.2});
|
||
isSending = true;
|
||
|
||
$.ajax({
|
||
url: "<?php echo $pfile; ?>",
|
||
dataType: 'json',
|
||
data: datas,
|
||
type: 'POST',
|
||
success: onDatasInscription,
|
||
error: onDatasError
|
||
});
|
||
|
||
}
|
||
|
||
|
||
function onDatasInscription($datas)
|
||
{
|
||
if($datas.results.complete == 1){
|
||
|
||
|
||
|
||
//$(".formCtn").slideUp(400);
|
||
//$(".confirm").slideDown(400);
|
||
|
||
|
||
/*
|
||
TweenLite.to($(".confirm"),0,{x:960});
|
||
$(".confirm").css("display","block");
|
||
TweenLite.to($(".formCtn"),1,{x:-960});
|
||
TweenLite.to($(".confirm"),1,{x:0});
|
||
*/
|
||
|
||
TweenLite.to($(".etapes_slide"),1,{left:"-2862px"});
|
||
TweenLite.to($(".etapes_contents"),1,{height: $(".etapes_contents .confirm").innerHeight() + "px"});
|
||
|
||
|
||
|
||
updateElements();
|
||
}else if($datas.results.error){
|
||
isSending = false;
|
||
$(".errorText").html($datas.results.error);
|
||
TweenLite.to($(".formCtn"),0,{opacity:1});
|
||
}else{
|
||
isSending = false;
|
||
$(".errorText").html("Erreur inconnue...");
|
||
TweenLite.to($(".formCtn"),0,{opacity:1});
|
||
|
||
}
|
||
}
|
||
|
||
function onDatasError(jqXHR, textStatus, errorThrown)
|
||
{
|
||
isSending = false;
|
||
TweenLite.to($(".formCtn"),0,{opacity:1});
|
||
alert("error : " + textStatus);
|
||
}
|
||
|
||
|
||
$(".form input").blur(checkCanSubmit);
|
||
$(".form input").focus(checkCanSubmit);
|
||
$(".form input").click(checkCanSubmit);
|
||
$(".form input").keyup(checkCanSubmit);
|
||
|
||
|
||
|
||
|
||
$(".form .subscribe").click(function(e) {
|
||
if(canSubmit) sendForm();
|
||
});
|
||
|
||
|
||
|
||
<?php } ?>
|
||
|
||
|
||
|
||
/*TweenLite.to($(".etapes_contents .etape"),0,{x:20,autoAlpha:0});*/
|
||
|
||
function getEtape1(){
|
||
TweenLite.to($(".etapes_menu .bgActif1"),0.3,{width:310});
|
||
TweenLite.to($(".etapes_menu .bgActif2"),0.3,{width:310});
|
||
$(".etapes_menu .etape3").removeClass("active");
|
||
|
||
TweenLite.to($(".etapes_slide"),1,{left:"0px"});
|
||
TweenLite.to($(".etapes_contents"),1,{height: "380px"});
|
||
|
||
//alert($(".etapes_contents .etape1").innerHeight());
|
||
/*
|
||
TweenLite.to($(".etapes_contents .etape:not(etape1)"),0.5,{width:"0%",height:"0%"});
|
||
TweenLite.to($(".etapes_contents .etape1"),0.5,{width:"100%",height:"auto",delay:0.5});*/
|
||
}
|
||
|
||
function getEtape2(){
|
||
TweenLite.to($(".etapes_menu .bgActif1"),0.3,{width:645});
|
||
TweenLite.to($(".etapes_menu .bgActif2"),0.3,{width:635});
|
||
$(".etapes_menu .etape3").addClass("active");
|
||
|
||
TweenLite.to($(".etapes_slide"),1,{left:"-954px"});
|
||
|
||
|
||
|
||
TweenLite.to($(".etapes_contents"),1,{height: $(".etapes_contents .etape2").innerHeight() + "px"});
|
||
|
||
/*
|
||
TweenLite.to($(".etapes_contents .etape:not(etape2)"),0.5,{width:"0%",height:"0%"});
|
||
TweenLite.to($(".etapes_contents .etape2"),0.5,{width:"100%",height:"auto",delay:0.5});
|
||
*/
|
||
}
|
||
|
||
function getEtape3(){
|
||
TweenLite.to($(".etapes_menu .bgActif1"),0.3,{width:954});
|
||
TweenLite.to($(".etapes_menu .bgActif2"),0.3,{width:954});
|
||
|
||
TweenLite.to($(".etapes_slide"),1,{left:"-1908px"});
|
||
TweenLite.to($(".etapes_contents"),1,{height: $(".etapes_contents .etape3").innerHeight() + "px"});
|
||
/*
|
||
TweenLite.to($(".etapes_contents .etape:not(etape3)"),0.5,{width:"0%",height:"0%"});
|
||
TweenLite.to($(".etapes_contents .etape3"),0.5,{width:"100%",height:"auto",delay:0.5});
|
||
*/
|
||
}
|
||
|
||
|
||
$(".etapes_menu .etape1").click(function(e) {
|
||
getEtape1();
|
||
});
|
||
|
||
$(".etapes_menu .etape2").click(function(e) {
|
||
getEtape2();
|
||
});
|
||
|
||
$(".etapes_menu .etape3").click(function(e) {
|
||
if($(this).hasClass("active"))
|
||
getEtape3();
|
||
});
|
||
|
||
$(".etapes_contents .etape1 .btnRightArrow").click(getEtape2);
|
||
$(".etapes_contents .etape2 .btnRightArrow").click(getEtape3);
|
||
|
||
getEtape1();
|
||
|
||
|
||
<?php if($GLOBALS["gar_front_user"] -> ambassadeur ==1){ ?>
|
||
|
||
$(document).bind('CODE_LOADED', function() {
|
||
showPopin("parcours_ambassadeur");
|
||
});
|
||
<?php } ?>
|
||
|
||
|
||
</script>
|
||
|
||
<?php
|
||
|
||
/*-----------------------------------------------------*/
|
||
include_once("_inc/assets/footer.php");
|
||
/*-----------------------------------------------------*/
|
||
?>
|