diff --git a/.gitignore b/.gitignore index 803cfc1..5f11555 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,7 @@ node_modules/ logs/ .DS_Store package-lock.json +code_secret_client_222874178146-m2ul49riou277tjl431nbfdb8ibp2nl5.apps.googleusercontent.com.json +code_secret_client_738202486676-su2vn8602qqfehool3jqkjvdrdlrl1kd.apps.googleusercontent.com.json +pdfservices-api-credentials.json +testapi336520-3105cc3caa46.json \ No newline at end of file diff --git a/pdf/adhesion/2526/attente/mathieu.janmotpro@gmail.com_adhesion_2526_attente_2026-07-20T17-31-30.pdf b/pdf/adhesion/2526/attente/mathieu.janmotpro@gmail.com_adhesion_2526_attente_2026-07-20T17-31-30.pdf new file mode 100644 index 0000000..e33d56b Binary files /dev/null and b/pdf/adhesion/2526/attente/mathieu.janmotpro@gmail.com_adhesion_2526_attente_2026-07-20T17-31-30.pdf differ diff --git a/pdf/adhesion/2526/paye/mathieu.janmotproaaaaa@gmail.com_adhesion_2526_paye_2026-07-20T17-38-29.pdf b/pdf/adhesion/2526/paye/mathieu.janmotproaaaaa@gmail.com_adhesion_2526_paye_2026-07-20T17-38-29.pdf new file mode 100644 index 0000000..bd8c81d Binary files /dev/null and b/pdf/adhesion/2526/paye/mathieu.janmotproaaaaa@gmail.com_adhesion_2526_paye_2026-07-20T17-38-29.pdf differ diff --git a/readme.docx b/readme.docx deleted file mode 100644 index 1528bc0..0000000 Binary files a/readme.docx and /dev/null differ diff --git a/readme.html b/readme.html deleted file mode 100644 index ad01dc5..0000000 --- a/readme.html +++ /dev/null @@ -1,262 +0,0 @@ -

NODE.JS

-

MODIFICATION IMPORTANTE

-

app.use(bodyparser.urlencoded({ extended: false}));

-

DÉMARRAGE DU PROJET

-
cd /Users/juliechaumard/Documents/GitHub/Aduzuki_v2
-npm start
-

DOCUMENTATION

- -

DOMAIN

-
inscription.afpedagogiesuzuki.fr
-

OVH ZONE DNS

-

inscription.afpedagogiesuzuki.fr A 162.19.79.63 -inscription.afpedagogiesuzuki.fr AAAA 2001:41d0:304:200::537f -www.inscription.afpedagogiesuzuki.fr CNAME -inscription.afpedagogiesuzuki.fr

-

VPS

-

port = 8891 proxy_pass http://localhost:8891; proxy_http_version 1.1; -proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection -‘upgrade’; proxy_set_header Host $host; proxy_cache_bypass -$http_upgrade;

-

DB SQL

-

CREATE USER ‘sqladmin’@‘37.170.212.144’ IDENTIFIED BY -‘Squser1admin!’; GRANT ALL PRIVILEGES ON . TO -‘sqladmin’@‘37.170.212.144’; FLUSH PRIVILEGES;

-

db_connection_host=“localhost” db_connection_port=3306 -db_connection_user=“root” db_connection_password=“G1plumeverte!” -db_connection_database=“aduzuki”

-

PM2

-

/var/www/aduzuki pm2 start -/var/www/aduzuki/modules/adhesion/majgs_webhook.js –name -majgs_webhook

-

GOOGLE SHEET

-

Partager avec

-
- afpedagogiesuzuki@gmail.com
-- al.sauvegrain@gmail.com
-- userapi@inscriptionsafps.iam.gserviceaccount.com
-

SITE DE DEV

-

NEW

-

URL

-

aduzuki.darkweb.land

-

NGNINX sites-available

-

server {

-
    root /var/www/aduzuki;
-    index index.html index.htm index.nginx-debian.html;
-
-    server_name aduzuki.darkweb.land;
-
-    location / {
-        proxy_pass http://localhost:8893;
-        proxy_http_version 1.1;
-        proxy_set_header Upgrade $http_upgrade;
-        proxy_set_header Connection 'upgrade';
-        proxy_set_header Host $host;
-        proxy_cache_bypass $http_upgrade;
-    }
-
-listen [::]:443 ssl; # managed by Certbot
-listen 443 ssl; # managed by Certbot
-ssl_certificate /etc/letsencrypt/live/aduzuki.darkweb.land/fullchain.pem; # managed by Certbot
-ssl_certificate_key /etc/letsencrypt/live/aduzuki.darkweb.land/privkey.pem; # managed by Certbot
-include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
-ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
-

} server { if ($host = -aduzuki.darkweb.land) { - return 301 https://$host$request_uri; } # managed by -Certbot

-
    listen 80;
-    listen [::]:80;
-
-    server_name aduzuki.darkweb.land;
-return 404; # managed by Certbot
-

}

-

vps-38339055.vps.ovh.net:49170 /var/www debian G1plumeverte!

-

URLs

-

ACCUEIL

-
https://www.adhesion.afpedagogiesuzuki.fr/inscription/accueil
-

FORMULAIRE ADHÉSION

-
http://localhost:8890/adhesion
-https://www.adusuki.juliechaumard.paris/adhesion
-https://inscription.afpedagogiesuzuki.fr/adhesion
-

GESTION DES ADHÉSION

-
https://inscription.afpedagogiesuzuki.fr/adhesion/maj_googlesheet_auto
-https://www.inscription.afpedagogiesuzuki.fr/adhesion/maj_googlesheet
-

ENVOIE -CARTE ADHÉRENT ET JUSTIFICATIF DE DON MANUEL

-
http://localhost:8888/inscription/adhesion/carte_manuelle
-https://www.adusuki.juliechaumard.paris/inscription/adhesion/carte_manuelle
-https://inscription.afpedagogiesuzuki.fr/adhesion/carte_manuelle
-

STAGE ANNUEL

-
http://localhost:8890/stagenational
-https://adusuki.juliechaumard.paris/stagenational
-https://inscription.afpedagogiesuzuki.fr/stagenational
-

GESTION DU STAGE

-
https://www.inscription.afpedagogiesuzuki.fr/adhesion/admin
-

RASSEMBLEMENT IDF

-
http://localhost:8890/rassemblementidf
-https://www.adusuki.juliechaumard.paris/rassemblementidf
-https://www.inscription.afpedagogiesuzuki.fr/rassemblementidf
-

RASSEMBLEMENT IDF

-
http://localhost:8890/rassemblementra
-https://adusuki.juliechaumard.paris/rassemblementidf
-https://inscription.afpedagogiesuzuki.fr/rassemblementra
-

CONCERT UNESCO

-
http://localhost:8890/concert
-https://www.adusuki.juliechaumard.paris/concert
-https://www.inscription.afpedagogiesuzuki.fr/concert
-https://inscription.afpedagogiesuzuki.fr/
-https://inscription.afpedagogiesuzuki.fr/concert/concert_paiement/annule?id={CHECKOUT_SESSION_ID}
-https://inscription.afpedagogiesuzuki.fr/concert/concert_paiement/reussi?id={CHECKOUT_SESSION_ID}
-

BOUTIQUE

-

VIDÉOS

-
https://inscription.afpedagogiesuzuki.fr/boutique/videos
-

STRIPE_VENTEVIDEO_SUCCESSURL=https://inscription.afpedagogiesuzuki.fr/boutique/videos/paiement_reussi?id={CHECKOUT_SESSION_ID} -STRIPE_VENTEVIDEO_CANCELURL=https://inscription.afpedagogiesuzuki.fr/boutique/videos/paiement_annule?id={CHECKOUT_SESSION_ID}

-

STRIPE_PRIVATE_KEY_TEST=sk_test_51Kv1j8BAHsmvBJpQhGQV4hHbLEKGls7MMm5wuMRa3xBqYXtF5JP4RUPFyK0QBQwrrCPPF1l3dSW3KZ3AYDGEdwSd00uDYg3ACp -STRIPE_PUBLISHABLE_KEY_TEST=pk_test_51Kv1j8BAHsmvBJpQ8SVqXOMsgQs0slKAbtSUqUnqQZt4FBvr9t5TY5ZlEkQjWqTwTIhdx3H2iRCgQizqn1NN0BWU00239nRLYv

-

https://inscription.afpedagogiesuzuki.fr/wh_stripe Traitements après -paiement. Pour le moment effectif pour le paiement d’un don via le -bouton “SOUTENIR” du site de l’AFPS

-

checkout.session.async_payment_failed -checkout.session.async_payment_succeeded checkout.session.completed -checkout.session.expired

-

Version de l’API : 2024-11-20.acacia

-

DOMAIN_EXTERNE=“https://inscription.afpedagogiesuzuki.fr/”

-

VARIABLES D’ENVIRONNEMENT DE -PROD

-

PORT=“8891” ENV=“production” COOKIE_SECRET=‘patapuf’ -DOMAIN=“http://localhost:8891/”

-

STRIPE_PRIVATE_KEY=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 -STRIPE_PUBLISHABLE_KEY=pk_live_51L888YBaJ0SjyxPrhYkkZ0zTH54PQQlsnfmZQ7obB3HsZzvscNFssjVdDMyuH4fyRZEyybOg9UKoDfTn5JIuI6OI003bou1D3Y -STRIPE_SUCCESSURL=https://inscription.afpedagogiesuzuki.fr/adhesion/adhesion_paiement/reussi?id={CHECKOUT_SESSION_ID} -STRIPE_CANCELURL=https://inscription.afpedagogiesuzuki.fr/adhesion/adhesion_paiement/annule?id={CHECKOUT_SESSION_ID} -STRIPE_SN_SUCCESSURL=https://inscription.afpedagogiesuzuki.fr/stagenational/paiement_reussi?id={CHECKOUT_SESSION_ID} -STRIPE_SN_CANCELURL=https://inscription.afpedagogiesuzuki.fr/stagenational/paiement_annule?id={CHECKOUT_SESSION_ID} -STRIPE_RI_SUCCESSURL=https://inscription.afpedagogiesuzuki.fr/rassemblementidf/paiement_reussi?id={CHECKOUT_SESSION_ID} -STRIPE_RI_CANCELURL=https://inscription.afpedagogiesuzuki.fr/rassemblementidf/paiement_annule?id={CHECKOUT_SESSION_ID} -STRIPE_RI_PRIVATE_KEY=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 -STRIPE_RI_PUBLISHABLE_KEY=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 -STRIPE_CONCERT_SUCCESSURL=https://inscription.afpedagogiesuzuki.fr/concert/concert_paiement/reussi?id={CHECKOUT_SESSION_ID} -STRIPE_CONCERT_CANCELURL=https://inscription.afpedagogiesuzuki.fr/concert/concert_paiement/annule?id={CHECKOUT_SESSION_ID}

-

PDF_SERVICES_CLIENT_ID_julie=7596ed8f2a634c84a631d17e9d841844 -PDF_SERVICES_CLIENT_SECRET_julie=p8e-Rf13NOjxHR1EUvlhhsn8aTwc2fHROSw0 -PDF_SERVICES_CLIENT_ID=3f87412e36174973864e7c678c6fe918 -PDF_SERVICES_CLIENT_SECRET=p8e-U5qFwt7VT7mUspkww9Tloj5kK4tVreDW

-

nodemailer_user=“afps.inscription@gmail.com” nodemailer_pass=“fuqw -qbtu mlly dcvu”

-

gsheet_adhesion=“1kk3w5yGnHxGb9dtUkTlizVSvnf40erk6zYzR2QTk16g” -gsheet_concertannuel=“1KHU5uIJnOWWs3xWifJGxalYG2fFsMzSec84ikU8dPcY” -gsheet_stagenat=“1STdRD5lXP316hgtdQfNqcqSQavzaoOXDMOqmfqPc3_0”

-

db_connection_host=“localhost” db_connection_port=3306 -db_connection_user=“root” db_connection_password=“G1plumeverte!” -db_connection_database=“aduzuki”

-

weezevent_API_KEY=“17f7767ebe199c534b2cf1848dcb3490” -weezevent_API_KEY_AFPS=“17f7767ebe199c534b2cf1848dcb3490” -weezevent_USER_AFPS=“julie@parisweb.art” -weezevent_USER=“julie@parisweb.art” weezevent_PASSWORD=“testapi123” -weezevent_TOKEN_afps=“ecba0495a54cb69c10c34945a51abaec” -weezevent_TOKEN=“ecba0495a54cb69c10c34945a51abaec” -weezevent_id_event_concertiste=“1043199” -weezevent_id_event_encacrant=“1043198” -weezevent_id_event_spect=“1043050” weez_id_billet_concertiste=“3875316” -weez_id_billet_spectateur=“3874933” -weez_id_billet_encadrant_parent=“3875313” -weez_id_billet_encadrant_prof=“3875315”

-

spectateur_nb_places=1308 remiseenvente_spect=“non” -encadr_parent_nb_places=60 piano_nb_places=55 alto_nb_places=33 -flute_nb_places=32 trompette_nb_places=15 harpe_nb_places=10 -violon1_nb_places=220 violon2_nb_places=43 violoncelle1_nb_places=62 -violoncelle2_nb_places=37

-

DEV

-
OVH WEB CLOUD
-    jivciei.cluster024.hosting.ovh.net
-DOMAINE
-    adusuki.juliechaumard.paris
-DOSSIER
-    adusuki
-MOTEUR D'EXECUTION
-    nodejs-14
-SYNCHRO GOODSYNC
-    ADUZUKI DEV - OVH WebCloud Julie
-BD
-    jivcieiadmin.mysql.db
-CONNEXION TERMINAL
-    /usr/bin/ssh jivciei@sshcloud.cluster024.hosting.ovh.net -p 46057
-    password = uTpn9mcDAVsC
-    cd /home/jivciei/adusuki
-GMAIL
-    nodemailer_user="juliechaumard@gmail.com"
-    nodemailer_pass="etfq umof iwbx ltxk"
-
-### GNROK
-https://bf89-2a01-e0a-5ee-1510-4021-f309-9a2c-823.ngrok-free.app/wh_stripe
-https://9243-2a01-e0a-5ee-1510-4c7b-ac31-5c89-f077.ngrok-free.app
-

MODULES

-
npm-node14 install htmltopdf-weasyprint
-

PROD

-
GMAIL
-    nodemailer_user="afps.inscription@gmail.com"
-    nodemailer_pass="fuqw qbtu mlly dcvu"
-    
-

ABBRÉVIATIONS

-

SN ou stn = STAGE NATIONAL

-

LOGGING

-

Exemples de traces

-
N'importe où
-    logger.info("NOUS SOMMES DANS LE FICHIER : " + __filename,
-

{ label: __filename });

-
Dans une fonction req res :
-    logger.info('bonjour Julie',
-

{ numsession: req.session.id }); logger.info(‘process.env.PORT :’ + -process.env.PORT), { numsession: req.session.id }, { label: __filename -};

-
    logger.info("XXX" + ZZZ, { numsession: req.session.id }, { label: __filename });
-

ENV

-

Si on change une variable d’environnement, il faut redémarrer le -projet

-

HTACCESS

-

–ORIGINAL RewriteEngine On RewriteCond %{ENV:HTTPS} !on RewriteRule -(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

-

PDF

-
try {
-    var pdf_html = fs.readFileSync(path.resolve(__dirname,"../pdf/template/carte_adherent.html"), "utf8");
-    var pdf_buffer = await weasyprint(pdf_html);
-    fs.writeFileSync("juju.pdf", pdf_buffer);
-} catch (error) {
-    logger.info("Erreur durant la création du PDF : " + error, { numsession: req.session.id });
-}
-

STRIPE

-

TEST CARD

-
ok normal
-4242424242424242
-4242 4242 4242 4242
-
-ok 3DS
-4000000000003063
-
-pb
-4000000000000002
-

RETOUR -https://www.adusuki.afpedagogiesuzuki.fr/inscription/adhesion_paiement/reussi?id=cs_test_b1teU2a5wbTFwdPKGefvrKS1N6deBGPK86xFhdbxqKo9dtmgCzwoYZ8fJ6

-

INSCRIPTION MAJ Google -Sheet automatique

-

CRON - le cron est lancé par la librairie cron de NodeJS - fichier -modules/adhesion/majgs_webhook.js - mise en prod - ne pas oublier de -changer l’URL à lancer dans le fichier majgs_webhook.js : commenter -l’URL de dev localhost et décommenter l’URL de prod - pm2 start -/var/www/aduzuki/modules/adhesion/majgs_webhook.js –name -majgs_webhook

-

/Users/juliechaumard/Documents/GitHub/Aduzuki_v2/controllers/vente_video/files

-

INSERT INTO ras_adherent ( identifiant, association_suzuki, lieu, -saison, date_maj, adherent_nom, adherent_prenom, adherent_telephone, -adherent_mail, adherent_adresse_rue, adherent_adresse_complement, -adherent_adresse_codepostal, adherent_adresse_ville, -adherent_adresse_pays, ras_commentaire, accompagnant_nom, -accompagnant_prenom, tarif_rassemblement, cout_total, statut_paiement, -statut_suppression ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, -?, ?, ?, ?, ?, ?, ?)

diff --git a/sql.sql b/sql.sql deleted file mode 100644 index 818e37c..0000000 --- a/sql.sql +++ /dev/null @@ -1,1058 +0,0 @@ - --- ADD 0 in ca_decompte_place -INSERT INTO ca_decompte_place -VALUES (1,"2024/2025", "2023-11-13 13:50:34",0,0,0,0,0,0,0,0,0,0,0,0,0); - -SELECT * FROM ca_decompte_place - - --- TROUVER DOUBLON -SELECT COUNT(identifiant) AS nbr_doublon, identifiant -FROM adherent -GROUP BY identifiant -HAVING COUNT(identifiant) > 1 - - - --- CONCERTISTES QUI N'EST PAS DANS CA_ADHERENT -SELECT * FROM `ca_concertiste` WHERE ca_concertiste.identifiant NOT IN (SELECT identifiant FROM ca_adherent where ca_adherent.commande_nb_concertiste>0) - - - - ---CLE UNIQUE - --- voir les cles -SHOW INDEX FROM tbl_name - --- suprimer clé -DROP INDEX index_name ON tbl_name - --- double -ALTER TABLE mytable ADD UNIQUE my_unique_index(field1,field2); - --------------------- --------------------- --- CONCERT --------------------- --------------------- - --- PAIEMENT EN ATTENTE -SELECT * FROM `ca_adherent` WHERE ca_adherent.stripe_statut_paiement = "attente" - - --- FINANCE --- TOTAL CONCERT -SELECT sum(ca_adherent.commande_cout_spectateur + ca_adherent.commande_cout_concertiste) AS TOTAL_CONCERT FROM ca_adherent -SELECT sum(ca_adherent.don) AS TOTAL_DON FROM ca_adherent -SELECT sum(ca_adherent.montant_total) AS TOTAL_GENERAL FROM ca_adherent - - --------------------- --- COMPTEUR DE PLACES : - --- ENCADRANT --- PROF -SELECT count(ca_encadrant.identifiant) AS PROF_NB FROM ca_encadrant -WHERE - ca_encadrant.encadrant_type="Professeur" - - --- Parent -SELECT count(ca_encadrant.identifiant) AS PAR_NB FROM ca_encadrant -WHERE - ca_encadrant.encadrant_type="Parent" - - --- SPECTATEUR : nombre de spectateur qui a payé -SELECT sum(ca_adherent.commande_nb_spectateur) FROM `ca_adherent` - - --- CONCERTISTE : nombre de concertiste qui a payé -SELECT sum(ca_adherent.commande_nb_concertiste) FROM `ca_adherent` WHERE ca_adherent.stripe_statut_paiement="paye" - - - --- Table concertiste qui a paye --- Tout instrument -SELECT count(ca_concertiste.concertiste_intrument) AS nb_concertiste -FROM ca_concertiste -LEFT JOIN ca_adherent ON ca_concertiste.identifiant = ca_adherent.identifiant -WHERE ca_adherent.stripe_statut_paiement = "paye" - --- Compte par instrument - --- piano -SELECT count(ca_concertiste.concertiste_intrument) AS piano_nb -FROM ca_concertiste -LEFT JOIN ca_adherent ON ca_concertiste.identifiant = ca_adherent.identifiant -WHERE ca_concertiste.concertiste_intrument = "Piano" -AND ca_adherent.stripe_statut_paiement = "paye" - --- violon 1 -SELECT count(ca_concertiste.concertiste_intrument) AS violon_1_nb -FROM ca_concertiste -LEFT JOIN ca_adherent ON ca_concertiste.identifiant = ca_adherent.identifiant -WHERE ca_concertiste.concertiste_intrument = "Violon" -AND (ca_concertiste.concertiste_cahier = "Cahier 1" OR ca_concertiste.concertiste_cahier = "Cahier 2" OR ca_concertiste.concertiste_cahier = "Cahier 3" OR ca_concertiste.concertiste_cahier = "Cahier 4" OR ca_concertiste.concertiste_cahier = "Cahier 5") -AND ca_adherent.stripe_statut_paiement = "paye" - --- violon 2 -SELECT count(ca_concertiste.concertiste_intrument) AS violon_2_nb -FROM ca_concertiste -LEFT JOIN ca_adherent ON ca_concertiste.identifiant = ca_adherent.identifiant -WHERE ca_concertiste.concertiste_intrument = "Violon" -AND (ca_concertiste.concertiste_cahier = "Cahier 6" OR ca_concertiste.concertiste_cahier = "Cahier 7" OR ca_concertiste.concertiste_cahier = "Cahier 8" OR ca_concertiste.concertiste_cahier = "Cahier 9" OR ca_concertiste.concertiste_cahier = "Cahier 10") -AND ca_adherent.stripe_statut_paiement = "paye" - --- violoncelle 1 -SELECT count(ca_concertiste.concertiste_intrument) AS violoncelle_1_nb -FROM ca_concertiste -LEFT JOIN ca_adherent ON ca_concertiste.identifiant = ca_adherent.identifiant -WHERE ca_concertiste.concertiste_intrument = "Violoncelle" -AND (ca_concertiste.concertiste_cahier = "Cahier 1" OR ca_concertiste.concertiste_cahier = "Cahier 2" OR ca_concertiste.concertiste_cahier = "Cahier 3" OR ca_concertiste.concertiste_cahier = "Cahier 4") -AND ca_adherent.stripe_statut_paiement = "paye" - --- violoncelle 2 -SELECT count(ca_concertiste.concertiste_intrument) AS violoncelle_2_nb -FROM ca_concertiste -LEFT JOIN ca_adherent ON ca_concertiste.identifiant = ca_adherent.identifiant -WHERE ca_concertiste.concertiste_intrument = "Violoncelle" -AND (ca_concertiste.concertiste_cahier = "Cahier 5" OR ca_concertiste.concertiste_cahier = "Cahier 6" OR ca_concertiste.concertiste_cahier = "Cahier 7" OR ca_concertiste.concertiste_cahier = "Cahier 8" OR ca_concertiste.concertiste_cahier = "Cahier 9" OR ca_concertiste.concertiste_cahier = "Cahier 10") -AND ca_adherent.stripe_statut_paiement = "paye" - - --- Trompette -SELECT count(ca_concertiste.concertiste_intrument) AS Trompette_nb -FROM ca_concertiste -LEFT JOIN ca_adherent ON ca_concertiste.identifiant = ca_adherent.identifiant -WHERE ca_concertiste.concertiste_intrument = "Trompette" -AND ca_adherent.stripe_statut_paiement = "paye" - - --- Alto -SELECT count(ca_concertiste.concertiste_intrument) AS Alto_nb -FROM ca_concertiste -LEFT JOIN ca_adherent ON ca_concertiste.identifiant = ca_adherent.identifiant -WHERE ca_concertiste.concertiste_intrument = "Alto" -AND ca_adherent.stripe_statut_paiement = "paye" - --- Flute -SELECT count(ca_concertiste.concertiste_intrument) AS Flute_nb -FROM ca_concertiste -LEFT JOIN ca_adherent ON ca_concertiste.identifiant = ca_adherent.identifiant -WHERE ca_concertiste.concertiste_intrument = "Flute" -AND ca_adherent.stripe_statut_paiement = "paye" - --- Harpe -SELECT count(ca_concertiste.concertiste_intrument) AS Harpe_nb -FROM ca_concertiste -LEFT JOIN ca_adherent ON ca_concertiste.identifiant = ca_adherent.identifiant -WHERE ca_concertiste.concertiste_intrument = "Harpe" -AND ca_adherent.stripe_statut_paiement = "paye" - --- TRIGGERS - ------------------------------------------------------------------ ------------------------------------------------------------------ --- CALCULER LE NOMBRE DE BILLETS VENDUS PAR WEEZEVENT DANS LA TABLE ca_adherent --- APRÈS INSERTION DES BILLETS DEPUIS L'API WEEZEVENT - --- USER LOCAL root@localhost - --- UNE REQUÊTE PAR CATÉGORIE DE BILLET - --- SPECTATEUR -CREATE TRIGGER `compteur_spectateur` AFTER INSERT ON `weez_unesco_participants` - FOR EACH ROW UPDATE ca_adherent, -(select - weez_unesco_participants.numero_adherent , COUNT(weez_unesco_participants.numero_adherent) AS compteur -from weez_unesco_participants -WHERE weez_unesco_participants.categorie = "Spectateur" -GROUP BY weez_unesco_participants.numero_adherent) -AS toto -SET ca_adherent.achatweez_nb_spectateur = toto.compteur -WHERE ca_adherent.identifiant = toto.numero_adherent - --- Élève musicien -CREATE TRIGGER `compteur_musicien` AFTER INSERT ON `weez_unesco_participants` - FOR EACH ROW UPDATE ca_adherent, -(select - weez_unesco_participants.numero_adherent , COUNT(weez_unesco_participants.numero_adherent) AS compteur -from weez_unesco_participants -WHERE weez_unesco_participants.categorie = "Élève musicien" -GROUP BY weez_unesco_participants.numero_adherent) -AS toto -SET ca_adherent.achatweez_nb_concertiste = toto.compteur -WHERE ca_adherent.identifiant = toto.numero_adherent - --- Parent encadrant -CREATE TRIGGER `compteur_parent_encadrant` AFTER INSERT ON `weez_unesco_participants` - FOR EACH ROW UPDATE ca_adherent, -(select - weez_unesco_participants.numero_adherent , COUNT(weez_unesco_participants.numero_adherent) AS compteur -from weez_unesco_participants -WHERE weez_unesco_participants.categorie = "Parent encadrant" -GROUP BY weez_unesco_participants.numero_adherent) -AS toto -SET ca_adherent.achatweez_nb_encadr_par = toto.compteur -WHERE ca_adherent.identifiant = toto.numero_adherent - --- Professeur encadrant -CREATE TRIGGER `compteur_prof_encadrant` AFTER INSERT ON `weez_unesco_participants` - FOR EACH ROW UPDATE ca_adherent, -(select - weez_unesco_participants.numero_adherent , COUNT(weez_unesco_participants.numero_adherent) AS compteur -from weez_unesco_participants -WHERE weez_unesco_participants.categorie = "Professeur encadrant" -GROUP BY weez_unesco_participants.numero_adherent) -AS toto -SET ca_adherent.achatweez_nb_encadr_prof = toto.compteur -WHERE ca_adherent.identifiant = toto.numero_adherent - ---------------------------------- ---ANCIENNES --- SPECTATEUR -CREATE TRIGGER `spectateur` AFTER INSERT ON `weez_unesco_participants` - FOR EACH ROW FOLLOWS `compteur_spectateur` UPDATE ca_adherent, -(select weez_unesco_participants.numero_adherent, - CASE - WHEN ca_adherent.precommande_nb_spectateur = COUNT(weez_unesco_participants.numero_adherent) THEN 'identique' - ELSE 'different spectateur' - END AS state -from ca_adherent -LEFT JOIN weez_unesco_participants ON ca_adherent.identifiant = weez_unesco_participants.numero_adherent -WHERE weez_unesco_participants.categorie = "Spectateur" -GROUP BY ca_adherent.identifiant, weez_unesco_participants.numero_adherent,ca_adherent.precommande_nb_spectateur) -AS toto -SET ca_adherent.status_weezevent = toto.state -WHERE ca_adherent.identifiant = toto.numero_adherent - --- Élève musicien -CREATE TRIGGER `musicien` AFTER INSERT ON `weez_unesco_participants` - FOR EACH ROW FOLLOWS `compteur_musicien` UPDATE ca_adherent, -(select weez_unesco_participants.numero_adherent, - CASE - WHEN ca_adherent.precommande_nb_concertiste = COUNT(weez_unesco_participants.numero_adherent) THEN 'identique / ' - ELSE 'different concertiste / ' - END AS state -from ca_adherent -LEFT JOIN weez_unesco_participants ON ca_adherent.identifiant = weez_unesco_participants.numero_adherent -WHERE weez_unesco_participants.categorie = "Élève musicien" AND ca_adherent.identifiant = weez_unesco_participants.numero_adherent -GROUP BY ca_adherent.identifiant, weez_unesco_participants.numero_adherent,ca_adherent.precommande_nb_concertiste) -AS toto -SET ca_adherent.status_weezevent=concat(ca_adherent.status_weezevent, toto.state) -WHERE ca_adherent.identifiant = toto.numero_adherent - --- Parent encadrant -CREATE TRIGGER `parent_encadrant` AFTER INSERT ON `weez_unesco_participants` - FOR EACH ROW FOLLOWS `compteur_parent_encadrant` UPDATE ca_adherent, -(select weez_unesco_participants.numero_adherent, - CASE - WHEN ca_adherent.precommande_nb_encadr_par = COUNT(weez_unesco_participants.numero_adherent) THEN 'identique' - ELSE 'different_encadr_par' - END AS state -from ca_adherent -LEFT JOIN weez_unesco_participants ON ca_adherent.identifiant = weez_unesco_participants.numero_adherent -WHERE weez_unesco_participants.categorie = "Parent encadrant" -GROUP BY ca_adherent.identifiant, weez_unesco_participants.numero_adherent,ca_adherent.precommande_nb_encadr_par) -AS toto -SET ca_adherent.status_weezevent = toto.state -WHERE ca_adherent.identifiant = toto.numero_adherent - --- Professeur encadrant -CREATE TRIGGER `prof_encadrant` AFTER INSERT ON `weez_unesco_participants` - FOR EACH ROW FOLLOWS `compteur_prof_encadrant` UPDATE ca_adherent, -(select weez_unesco_participants.numero_adherent, - CASE - WHEN ca_adherent.precommande_nb_encadr_prof = COUNT(weez_unesco_participants.numero_adherent) THEN 'identique' - ELSE 'different_encadr_prof' - END AS state -from ca_adherent -LEFT JOIN weez_unesco_participants ON ca_adherent.identifiant = weez_unesco_participants.numero_adherent -WHERE weez_unesco_participants.categorie = "Professeur encadrant" -GROUP BY ca_adherent.identifiant, weez_unesco_participants.numero_adherent,ca_adherent.precommande_nb_encadr_prof) -AS toto -SET ca_adherent.status_weezevent = toto.state -WHERE ca_adherent.identifiant = toto.numero_adherent - -ca_adherent.status_weezevent=concat(ca_adherent.status_weezevent, toto.state) - --- VÉRIFIER QUE LA COMMANDE SUR LE FORMULAIR CORRESPOND AU NOMBRE DE BILLETS ACHETÉS SUR WEEZEVENT -UPDATE ca_adherent -SET ca_adherent.status_weezevent = "different" -WHERE (precommande_nb_spectateur <> achatweez_nb_spectateur) - OR (precommande_nb_concertiste <> achatweez_nb_concertiste) - OR (precommande_nb_encadr_par <> achatweez_nb_encadr_par) - OR (precommande_nb_encadr_prof <> achatweez_nb_encadr_prof) - -UPDATE ca_adherent -SET ca_adherent.status_weezevent = "identique" -WHERE (precommande_nb_spectateur = achatweez_nb_spectateur) - AND (precommande_nb_concertiste = achatweez_nb_concertiste) - AND (precommande_nb_encadr_par = achatweez_nb_encadr_par) - AND (precommande_nb_encadr_prof = achatweez_nb_encadr_prof) - --- METTRE À JOUR SUITE À AJOUT DE BILLET POUR PERSONNE DÉJA INSCRITE -UPDATE ca_adherent -SET date_maj - ---------------------------------------------- ---------------------------------------------- --- DÉCHARGEMENT DES DONNÉES DANS GOOGLE SHEET --- MODULE CONCERT ANNUEL ---------------------------------------------- ---------------------------------------------- - --- ONGLET concertistes -SELECT -ca_concertiste.saison, -ca_concertiste.identifiant, -ca_concertiste.date_maj, -ca_concertiste.concertiste_nom, -ca_concertiste.concertiste_prenom, -ca_concertiste.concertiste_age, -ca_concertiste.concertiste_intrument, -ca_concertiste.concertiste_cahier, -ca_concertiste.concertiste_piece, -ca_concertiste.concertiste_prof_nom, -ca_concertiste.concertiste_prof_mail, -ca_adherent.statut_paiement, -ca_adherent.status_weezevent, -ca_adherent.adherent_telephone_mobile, -ca_adherent.adherent_mail -FROM ca_concertiste -LEFT JOIN ca_adherent ON ca_concertiste.identifiant = ca_adherent.identifiant -WHERE ca_concertiste.gsheet <> "true" OR ca_concertiste.gsheet IS NULL - --- ONGLET encadrants -SELECT -ca_encadrant.saison, -ca_encadrant.identifiant, -ca_encadrant.date_maj, -ca_encadrant.encadrant_type, -ca_encadrant.encadrant_nom, -ca_encadrant.encadrant_prenom, -ca_encadrant.encadrant__telephone_mobile, -ca_encadrant.encadrant_mail, -ca_encadrant.encadrant__prof_instrument, -ca_adherent.status_weezevent -FROM ca_encadrant -LEFT JOIN ca_adherent ON ca_encadrant.identifiant = ca_adherent.identifiant -WHERE ca_encadrant.gsheet <> "true" OR ca_encadrant.gsheet IS NULL - - ---------------------------------------------- ---------------------------------------------- --- DÉCHARGEMENT DES DONNÉES DANS GOOGLE SHEET --- MODULE ADHESION ---------------------------------------------- ---------------------------------------------- - - --- Réinitialiser les chargements -UPDATE adherent SET gsheet = NULL; -UPDATE adherent_eleve SET gsheet = NULL; -UPDATE adherent_finance SET gsheet = NULL; -UPDATE adherent_formation_prof SET gsheet = NULL; -UPDATE adherent_professeur SET gsheet = NULL; -UPDATE adherent_finance SET gs_adherent_att = NULL; - - --- MAJ ONGLET adherent -select - adherent.date_maj, - adherent.saison, - adherent.identifiant, - adherent.association_suzuki, - adherent.adherent_type, - adherent.adherent_nom, - adherent.adherent_prenom, - adherent.adherent_telephone_mobile, - adherent.adherent_mail, - adherent.adherent_adresse_rue, - adherent.adherent_adresse_complement, - adherent.adherent_adresse_codepostal, - adherent.adherent_adresse_ville, - adherent.adherent_adresse_pays, - adherent.adherent_telephone_fixe, - adherent.carte_envoi, - adherent_finance.statut_paiement -FROM adherent -INNER JOIN adherent_finance ON adherent_finance.identifiant = adherent.identifiant -WHERE - (adherent.gsheet = '' OR adherent.gsheet IS NULL) - AND adherent_finance.statut_paiement = 'paye' - --- adherent TAGUER DB COMME DÉCHARGÉE DANS GOOGLE SHEET -UPDATE adherent -SET gsheet = "' + now + '" -WHERE identifiant = "' + results[i].identifiant + '" - - --- MAJ ONGLET professeurs -SELECT - adherent_professeur.date_maj, - adherent_professeur.saison, - adherent_professeur.identifiant, - adherent_professeur.association_suzuki, - adherent_professeur.adherent_nom, - adherent_professeur.adherent_prenom, - adherent_professeur.adherent_mail, - adherent_professeur.adherent_telephone_mobile, - adherent_professeur.adherent_prof_instrument1, - adherent_professeur.adherent_prof_instrument1_esa, - adherent_professeur.adherent_prof_instrument2, - adherent_professeur.adherent_prof_instrument2_esa, - adherent_professeur.adherent_prof_sece, - adherent_professeur.adherent_prof_ecole1, - adherent_professeur.adherent_prof_ecole1_mail, - adherent_professeur.adherent_prof_ecole1_web, - adherent_professeur.adherent_prof_ecole1_adresse, - adherent_professeur.adherent_prof_ecole1_cp, - adherent_professeur.adherent_prof_ecole1_ville, - adherent_professeur.adherent_prof_ecole2, - adherent_professeur.adherent_prof_ecole2_mail, - adherent_professeur.adherent_prof_ecole2_web, - adherent_professeur.adherent_prof_ecole2_adresse, - adherent_professeur.adherent_prof_ecole2_cp, - adherent_professeur.adherent_prof_ecole2_ville, - adherent_professeur.adherent_prof_ecole3, - adherent_professeur.adherent_prof_ecole3_mail, - adherent_professeur.adherent_prof_ecole3_web, - adherent_professeur.adherent_prof_ecole3_adresse, - adherent_professeur.adherent_prof_ecole3_cp, - adherent_professeur.adherent_prof_ecole3_ville, - adherent_finance.statut_paiement -FROM adherent_professeur -INNER JOIN adherent_finance ON adherent_finance.identifiant = adherent_professeur.identifiant -WHERE - (adherent_professeur.gsheet = '' OR adherent_professeur.gsheet IS NULL) - AND adherent_finance.statut_paiement = 'paye' - --- professeurs TAGUER DB COMME DÉCHARGÉE DANS GOOGLE SHEET -UPDATE adherent_professeur -SET gsheet = "' + now + '" -WHERE identifiant = "' + results3[i].identifiant + '" - - --- MAJ ONGLET professeurs_stagiaires -SELECT - adherent_formation_prof.date_maj, - adherent_formation_prof.saison, - adherent_formation_prof.identifiant, - adherent_formation_prof.association_suzuki, - adherent_formation_prof.adherent_nom, - adherent_formation_prof.adherent_prenom, - adherent_formation_prof.adherent_mail, - adherent_formation_prof.adherent_telephone_mobile, - adherent_formation_prof.adherent_prof_stagiaire_instrument1, - adherent_formation_prof.adherent_prof_stagiaire_instrument1_esa, - adherent_formation_prof.adherent_prof_stagiaire_instrument1_prof, - adherent_formation_prof.adherent_prof_stagiaire_instrument2, - adherent_formation_prof.adherent_prof_stagiaire_instrument2_esa, - adherent_formation_prof.adherent_prof_stagiaire_instrument2_prof, - adherent_finance.statut_paiement -FROM adherent_formation_prof -INNER JOIN adherent_finance ON adherent_finance.identifiant = adherent_formation_prof.identifiant -WHERE - (adherent_formation_prof.gsheet = '' OR adherent_formation_prof.gsheet IS NULL) - AND adherent_finance.statut_paiement = 'paye' - --- professeurs_stagiaires TAGUER DB COMME DÉCHARGÉE DANS GOOGLE SHEET -UPDATE adherent_formation_prof -SET gsheet = "' + now + '" -WHERE identifiant = "' + results5[i].identifiant + '" - --- MAJ ONGLET élèves -SELECT - adherent_eleve.date_maj, - adherent_eleve.saison, - adherent_eleve.identifiant, - adherent_eleve.association_suzuki, - adherent_eleve.eleve_nom, - adherent_eleve.eleve_prenom, - adherent_eleve.adherent_mail, - adherent_eleve.adherent_telephone_mobile, - adherent_eleve.eleve_datenaissance, - adherent_eleve.eleve_instrumentA, - adherent_eleve.eleve_instrumentA_cahier, - adherent_eleve.eleve_instrumentA_prof, - adherent_eleve.eleve_instrumentB, - adherent_eleve.eleve_instrumentB_cahier, - adherent_eleve.eleve_instrumentB_prof, - adherent_eleve.eleve_droitimage, - adherent_eleve.eleve_contactsup_nom, - adherent_eleve.eleve_contactsup_prenom, - adherent_eleve.eleve_contactsup_mail, - adherent_finance.statut_paiement -FROM adherent_eleve -INNER JOIN adherent_finance ON adherent_finance.identifiant = adherent_eleve.identifiant -WHERE - (adherent_eleve.gsheet = '' OR adherent_eleve.gsheet IS NULL) - AND adherent_finance.statut_paiement = 'paye' - --- élèves TAGUER DB COMME DÉCHARGÉE DANS GOOGLE SHEET -UPDATE adherent_eleve -SET gsheet = "' + now + '" -where identifiant = "' + results7[i].identifiant + '" - --- MAJ ONGLET finances -SELECT - adherent_finance.date_maj, - adherent_finance.saison, - adherent_finance.identifiant, - adherent_finance.association_suzuki, - adherent_finance.adherent_type, - adherent_finance.adherent_nom, - adherent_finance.adherent_prenom, - adherent_finance.adherent_telephone_mobile, - adherent_finance.adherent_mail, - adherent_finance.montant_adhesion, - adherent_finance.montant_don, - adherent_finance.montant_total, - adherent_finance.paiement_mode, - adherent_finance.date_paiement, - adherent_finance.stripe_retour, - adherent_finance.cheque_banque, - adherent_finance.cheque_numero, - adherent_finance.statut_paiement -FROM adherent_finance -WHERE - (adherent_finance.gsheet = '' OR adherent_finance.gsheet IS NULL) - AND adherent_finance.statut_paiement = 'paye' - -WHERE (adherent_finance.gsheet = '' OR adherent_finance.gsheet IS NULL) AND adherent_finance.statut_paiement = 'paye' - --- finances TAGUER DB COMME DÉCHARGÉE DANS GOOGLE SHEET -UPDATE adherent_finance -SET gsheet = "' + now + '" -WHERE identifiant = "' + results9[i].identifiant + '" - --- MAJ ONGLET adherent_en_attente -SELECT - adherent_finance.date_maj, - adherent_finance.saison, - adherent_finance.identifiant, - adherent_finance.association_suzuki, - adherent_finance.adherent_type, - adherent_finance.adherent_nom, - adherent_finance.adherent_prenom, - adherent_finance.adherent_telephone_mobile, - adherent_finance.adherent_mail, - adherent_finance.montant_adhesion, - adherent_finance.montant_don, - adherent_finance.montant_total, - adherent_finance.paiement_mode, - adherent_finance.date_paiement, - adherent_finance.stripe_retour, - adherent_finance.cheque_banque, - adherent_finance.cheque_numero, - adherent_finance.statut_paiement -FROM adherent_finance -WHERE - (adherent_finance.gs_adherent_att = '' OR adherent_finance.gs_adherent_att IS NULL) - AND (adherent_finance.statut_paiement <> 'paye' OR adherent_finance.statut_paiement IS NULL OR adherent_finance.statut_paiement = '') - - --- adherent_en_attente TAGUER DB COMME DÉCHARGÉE DANS GOOGLE SHEET -UPDATE adherent_finance -SET gs_adherent_att = "' + now + '" -WHERE identifiant = "' + results11[i].identifiant + '" - - - ---------------------------------------------- ---------------------------------------------- --- METTRE À JOUR LE STATUS DE PAIEMENT --- MANUELLEMENT ---------------------------------------------- ---------------------------------------------- -SELECT - adherent.adherent_type, - adherent.adherent_adresse_rue, - adherent.adherent_adresse_codepostal, - adherent.adherent_adresse_ville, - adherent.adherent_nom, - adherent.adherent_prenom, - adherent.adherent_mail -FROM adherent -WHERE - adherent.identifiant = req.session.maj_identifiant - - -SELECT adherent.adherent_type, adherent.adherent_adresse_rue, adherent.adherent_adresse_codepostal, adherent.adherent_adresse_ville, adherent.adherent_nom, adherent.adherent_prenom, adherent.adherent_mail FROM adherent WHERE adherent.identifiant = req.session.maj_identifiant - - - ---------------------------------------------- ---------------------------------------------- --- SUPPRESSION D'UN ADHERENT --- MANUELLEMENT ---------------------------------------------- ---------------------------------------------- -UPDATE adherent SET identifiant = "supprime", date_maj = "'+now+'", identifiant_supprime = "'+req.session.supp_identifiant+'" WHERE identifiant = "'+req.session.supp_identifiant+'"; -UPDATE adherent_eleve SET identifiant = "supprime", date_maj = "'+now+'", identifiant_supprime = "'+req.session.supp_identifiant+'" WHERE identifiant = "'+req.session.supp_identifiant+'"; -UPDATE adherent_finance SET identifiant = "supprime", date_maj = "'+now+'", identifiant_supprime = "'+req.session.supp_identifiant+'" WHERE identifiant = "'+req.session.supp_identifiant+'"; -UPDATE adherent_formation_prof SET identifiant = "supprime", date_maj = "'+now+'", identifiant_supprime = "'+req.session.supp_identifiant+'" WHERE identifiant = "'+req.session.supp_identifiant+'"; -UPDATE adherent_professeur SET identifiant = "supprime", date_maj = "'+now+'", identifiant_supprime = "'+req.session.supp_identifiant+'" WHERE identifiant = "'+req.session.supp_identifiant+'"; - - - ---------------------------------------------- ---------------------------------------------- --- ASSOCIATIONS LOCACLES --- IMPORTS ADHÉRENTS DANS DB ---------------------------------------------- ---------------------------------------------- - - -association_suzuki, -saison, -identifiant, -date_maj, -adherent_type, -adherent_nom, -adherent_prenom, -adherent_adresse_rue, -adherent_adresse_complement, -adherent_adresse_codepostal, -adherent_adresse_ville, -adherent_adresse_pays, -adherent_telephone_fixe, -adherent_telephone_mobile, -adherent_mail - - -GS_asso_locales_rows[i].association, -GS_asso_locales_rows[i].saison, -GS_asso_locales_rows[i].identifiant, -GS_asso_locales_rows[i].adhesion_date, -GS_asso_locales_rows[i].adherent_type, -GS_asso_locales_rows[i].adherent_nom, -GS_asso_locales_rows[i].adherent_prenom, -GS_asso_locales_rows[i].adherent_adresse_rue, -GS_asso_locales_rows[i].adherent_adresse_complement, -GS_asso_locales_rows[i].adherent_adresse_codepostal, -GS_asso_locales_rows[i].adherent_adresse_ville, -GS_asso_locales_rows[i].adherent_adresse_pays, -GS_asso_locales_rows[i].adherent_telephone_fixe, -GS_asso_locales_rows[i].adherent_telephone_mobile, -GS_asso_locales_rows[i].adherent_mail - -adherent_finance - -date_maj -saison -identifiant -association_suzuki -adherent_type -adherent_nom -adherent_prenom -adherent_telephone_mobile -adherent_mail -statut_paiement -paiement_mode -date_paiement -montant_adhesion -montant_don -montant_total - - -now, -GS_asso_locales_rows[i].saison, -GS_asso_locales_rows[i].identifiant, -GS_asso_locales_rows[i].association, -GS_asso_locales_rows[i].adherent_type, -GS_asso_locales_rows[i].adherent_nom, -GS_asso_locales_rows[i].adherent_prenom, -GS_asso_locales_rows[i].adherent_telephone_mobile, -GS_asso_locales_rows[i].adherent_mail, -GS_asso_locales_rows[i].adhesion_paye, -GS_asso_locales_rows[i].adherent_paiement_mode, -now, -GS_asso_locales_rows[i].adherent_paiement_montant_adhesion, -GS_asso_locales_rows[i].adherent_paiement_montant_don, -GS_asso_locales_rows[i].adherent_paiement_montant_total - -date_maj, saison, identifiant, association_suzuki, adherent_type, adherent_nom, adherent_prenom, adherent_telephone_mobile, adherent_mail, statut_paiement, paiement_mode, date_paiement, montant_adhesion, montant_don, montant_total - -INSERT INTO adherent -(association_suzuki, saison, identifiant, date_maj, adherent_type, adherent_nom, adherent_prenom, adherent_adresse_rue, adherent_adresse_complement, adherent_adresse_codepostal, adherent_adresse_ville, adherent_adresse_pays, adherent_telephone_fixe, adherent_telephone_mobile, adherent_mail) -VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) - - -INSERT INTO adherent_finance -(date_maj, saison, identifiant, association_suzuki, adherent_type, adherent_nom, adherent_prenom, adherent_telephone_mobile, adherent_mail, statut_paiement, paiement_mode, date_paiement, montant_adhesion, montant_don, montant_total) -VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) - - -INSERT INTO adherent_finance (date_maj, saison, identifiant, association_suzuki, adherent_type, adherent_nom, adherent_prenom, adherent_telephone_mobile, adherent_mail, statut_paiement, paiement_mode, date_paiement, montant_adhesion, montant_don, montant_total) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) - -now, GS_asso_locales_rows[i].saison, GS_asso_locales_rows[i].identifiant, GS_asso_locales_rows[i].association, GS_asso_locales_rows[i].adherent_type, GS_asso_locales_rows[i].adherent_nom, GS_asso_locales_rows[i].adherent_prenom, GS_asso_locales_rows[i].adherent_telephone_mobile, GS_asso_locales_rows[i].adherent_mail, GS_asso_locales_rows[i].adhesion_paye, GS_asso_locales_rows[i].adherent_paiement_mode, now, GS_asso_locales_rows[i].adherent_paiement_montant_adhesion, GS_asso_locales_rows[i].adherent_paiement_montant_don, GS_asso_locales_rows[i].adherent_paiement_montant_total - -INSERT INTO adherent_professeur -(date_maj, saison, identifiant, association_suzuki, adherent_nom, adherent_prenom, adherent_telephone_mobile, adherent_mail, adherent_prof_instrument1, adherent_prof_instrument1_esa, adherent_prof_instrument2, adherent_prof_instrument2_esa, adherent_prof_sece, adherent_prof_ecole1, adherent_prof_ecole1_adresse, adherent_prof_ecole1_cp, adherent_prof_ecole1_ville, adherent_prof_ecole1_mail, adherent_prof_ecole1_web, adherent_prof_ecole2, adherent_prof_ecole2_adresse, adherent_prof_ecole2_cp, adherent_prof_ecole2_ville, adherent_prof_ecole2_mail, adherent_prof_ecole2_web, adherent_prof_ecole3, adherent_prof_ecole3_adresse, adherent_prof_ecole3_cp, adherent_prof_ecole3_ville, adherent_prof_ecole3_mail, adherent_prof_ecole3_web) -VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) - -date_maj, -saison, -identifiant, -association_suzuki, -adherent_nom, -adherent_prenom, -adherent_telephone_mobile, -adherent_mail, -adherent_prof_instrument1, -adherent_prof_instrument1_esa, -adherent_prof_instrument2, -adherent_prof_instrument2_esa, -adherent_prof_sece, -adherent_prof_ecole1, -adherent_prof_ecole1_adresse, -adherent_prof_ecole1_cp, -adherent_prof_ecole1_ville, -adherent_prof_ecole1_mail, -adherent_prof_ecole1_web, -adherent_prof_ecole2, -adherent_prof_ecole2_adresse, -adherent_prof_ecole2_cp, -adherent_prof_ecole2_ville, -adherent_prof_ecole2_mail, -adherent_prof_ecole2_web, -adherent_prof_ecole3, -adherent_prof_ecole3_adresse, -adherent_prof_ecole3_cp, -adherent_prof_ecole3_ville, -adherent_prof_ecole3_mail, -adherent_prof_ecole3_web - -now, -GS_asso_locales_rows[i].saison, -GS_asso_locales_rows[i].identifiant, -GS_asso_locales_rows[i].association, -GS_asso_locales_rows[i].adherent_nom, -GS_asso_locales_rows[i].adherent_prenom, -GS_asso_locales_rows[i].adherent_telephone_mobile, -GS_asso_locales_rows[i].adherent_mail, -GS_asso_locales_rows[i].adherent_prof_instrument1, -GS_asso_locales_rows[i].adherent_prof_instrument1_esa, -GS_asso_locales_rows[i].adherent_prof_instrument2, -GS_asso_locales_rows[i].adherent_prof_instrument2_esa, -GS_asso_locales_rows[i].adherent_prof_sece, -GS_asso_locales_rows[i].adherent_prof_ecole1, -GS_asso_locales_rows[i].adherent_prof_ecole1_adresse, -GS_asso_locales_rows[i].adherent_prof_ecole1_cp, -GS_asso_locales_rows[i].adherent_prof_ecole1_ville, -GS_asso_locales_rows[i].adherent_prof_ecole1_mail, -GS_asso_locales_rows[i].adherent_prof_ecole1_web, -GS_asso_locales_rows[i].adherent_prof_ecole2, -GS_asso_locales_rows[i].adherent_prof_ecole2_adresse, -GS_asso_locales_rows[i].adherent_prof_ecole2_cp, -GS_asso_locales_rows[i].adherent_prof_ecole2_ville, -GS_asso_locales_rows[i].adherent_prof_ecole2_mail, -GS_asso_locales_rows[i].adherent_prof_ecole2_web, -GS_asso_locales_rows[i].adherent_prof_ecole3, -GS_asso_locales_rows[i].adherent_prof_ecole3_adresse, -GS_asso_locales_rows[i].adherent_prof_ecole3_cp, -GS_asso_locales_rows[i].adherent_prof_ecole3_ville, -GS_asso_locales_rows[i].adherent_prof_ecole3_mail, -GS_asso_locales_rows[i].adherent_prof_ecole3_web, - -now, GS_asso_locales_rows[i].saison, GS_asso_locales_rows[i].identifiant, GS_asso_locales_rows[i].association, GS_asso_locales_rows[i].adherent_nom, GS_asso_locales_rows[i].adherent_prenom, GS_asso_locales_rows[i].adherent_telephone_mobile, GS_asso_locales_rows[i].adherent_mail, GS_asso_locales_rows[i].adherent_prof_instrument1, GS_asso_locales_rows[i].adherent_prof_instrument1_esa, GS_asso_locales_rows[i].adherent_prof_instrument2, GS_asso_locales_rows[i].adherent_prof_instrument2_esa, GS_asso_locales_rows[i].adherent_prof_sece, GS_asso_locales_rows[i].adherent_prof_ecole1, GS_asso_locales_rows[i].adherent_prof_ecole1_adresse, GS_asso_locales_rows[i].adherent_prof_ecole1_cp, GS_asso_locales_rows[i].adherent_prof_ecole1_ville, GS_asso_locales_rows[i].adherent_prof_ecole1_mail, GS_asso_locales_rows[i].adherent_prof_ecole1_web, GS_asso_locales_rows[i].adherent_prof_ecole2, GS_asso_locales_rows[i].adherent_prof_ecole2_adresse, GS_asso_locales_rows[i].adherent_prof_ecole2_cp, GS_asso_locales_rows[i].adherent_prof_ecole2_ville, GS_asso_locales_rows[i].adherent_prof_ecole2_mail, GS_asso_locales_rows[i].adherent_prof_ecole2_web, GS_asso_locales_rows[i].adherent_prof_ecole3, GS_asso_locales_rows[i].adherent_prof_ecole3_adresse, GS_asso_locales_rows[i].adherent_prof_ecole3_cp, GS_asso_locales_rows[i].adherent_prof_ecole3_ville, GS_asso_locales_rows[i].adherent_prof_ecole3_mail, GS_asso_locales_rows[i].adherent_prof_ecole3_web - - -INSERT INTO adherent_formation_prof -(date_maj, saison, identifiant, association_suzuki, adherent_nom, adherent_prenom, adherent_telephone_mobile, adherent_mail, adherent_prof_stagiaire_instrument1, adherent_prof_stagiaire_instrument1_prof, adherent_prof_stagiaire_instrument1_esa, adherent_prof_stagiaire_instrument2, adherent_prof_stagiaire_instrument2_prof, adherent_prof_stagiaire_instrument2_esa) -VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?) - - -date_maj, -saison, -identifiant, -association_suzuki, -adherent_nom, -adherent_prenom, -adherent_telephone_mobile, -adherent_mail, -adherent_prof_stagiaire_instrument1, -adherent_prof_stagiaire_instrument1_prof, -adherent_prof_stagiaire_instrument1_esa, -adherent_prof_stagiaire_instrument2, -adherent_prof_stagiaire_instrument2_prof, -adherent_prof_stagiaire_instrument2_esa - -now, -GS_asso_locales_rows[i].saison, -GS_asso_locales_rows[i].identifiant, -GS_asso_locales_rows[i].association, -GS_asso_locales_rows[i].adherent_nom, -GS_asso_locales_rows[i].adherent_prenom, -GS_asso_locales_rows[i].adherent_telephone_mobile, -GS_asso_locales_rows[i].adherent_mail, -GS_asso_locales_rows[i].adherent_prof_stagiaire_instrument1, -GS_asso_locales_rows[i].adherent_prof_stagiaire_instrument1_prof, -GS_asso_locales_rows[i].adherent_prof_stagiaire_instrument1_esa, -GS_asso_locales_rows[i].adherent_prof_stagiaire_instrument2, -GS_asso_locales_rows[i].adherent_prof_stagiaire_instrument2_prof, -GS_asso_locales_rows[i].adherent_prof_stagiaire_instrument2_esa - - -INSERT INTO adherent_eleve -(date_maj, saison, identifiant, association_suzuki, adherent_telephone_mobile, adherent_mail, eleve_nom, eleve_prenom, eleve_datenaissance, eleve_contactsup_nom, eleve_contactsup_prenom, eleve_contactsup_mail, eleve_instrumentA, eleve_instrumentA_prof, eleve_instrumentA_cahier, eleve_instrumentB, eleve_instrumentB_prof, eleve_instrumentB_cahier, eleve_droitimage) -VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,) - - -date_maj, -saison, -identifiant, -association_suzuki, -adherent_telephone_mobile, -adherent_mail, -eleve_nom, -eleve_prenom, -eleve_datenaissance, -eleve_contactsup_nom, -eleve_contactsup_prenom, -eleve_contactsup_mail, -eleve_instrumentA, -eleve_instrumentA_prof, -eleve_instrumentA_cahier, -eleve_instrumentB, -eleve_instrumentB_prof, -eleve_instrumentB_cahier, -eleve_droitimage - -now, -GS_asso_locales_rows[i].saison, -GS_asso_locales_rows[i].identifiant, -GS_asso_locales_rows[i].association, -GS_asso_locales_rows[i].adherent_telephone_mobile, -GS_asso_locales_rows[i].adherent_mail, -GS_asso_locales_rows[i].adherent_eleve1_nom, -GS_asso_locales_rows[i].adherent_eleve1_prenom, -GS_asso_locales_rows[i].adherent_eleve1_datenaissance, -GS_asso_locales_rows[i].adherent_eleve1_contactsup_nom, -GS_asso_locales_rows[i].adherent_eleve1_contactsup_prenom, -GS_asso_locales_rows[i].adherent_eleve1_contactsup_mail, -GS_asso_locales_rows[i].adherent_eleve1_InstrumentA, -GS_asso_locales_rows[i].adherent_eleve1_InstrumentA_prof, -GS_asso_locales_rows[i].adherent_eleve1_InstrumentA_cahier, -GS_asso_locales_rows[i].adherent_eleve1_InstrumentB, -GS_asso_locales_rows[i].adherent_eleve1_InstrumentB_prof, -GS_asso_locales_rows[i].adherent_eleve1_InstrumentB_cahier, -GS_asso_locales_rows[i].adherent_eleve1_droitimage - -now, GS_asso_locales_rows[i].saison, GS_asso_locales_rows[i].identifiant, GS_asso_locales_rows[i].association, GS_asso_locales_rows[i].adherent_telephone_mobile, GS_asso_locales_rows[i].adherent_mail, GS_asso_locales_rows[i].adherent_eleve1_nom, GS_asso_locales_rows[i].adherent_eleve1_prenom, GS_asso_locales_rows[i].adherent_eleve1_datenaissance, GS_asso_locales_rows[i].adherent_eleve1_contactsup_nom, GS_asso_locales_rows[i].adherent_eleve1_contactsup_prenom, GS_asso_locales_rows[i].adherent_eleve1_contactsup_mail, GS_asso_locales_rows[i].adherent_eleve1_InstrumentA, GS_asso_locales_rows[i].adherent_eleve1_InstrumentA_prof, GS_asso_locales_rows[i].adherent_eleve1_InstrumentA_cahier, GS_asso_locales_rows[i].adherent_eleve1_InstrumentB, GS_asso_locales_rows[i].adherent_eleve1_InstrumentB_prof, GS_asso_locales_rows[i].adherent_eleve1_InstrumentB_cahier, GS_asso_locales_rows[i].adherent_eleve1_droitimage - - -SELECT -adherent.date_maj, -adherent.saison, -adherent.identifiant, -adherent.association_suzuki, -adherent.adherent_type, -adherent.adherent_nom, -adherent.adherent_prenom, -adherent.adherent_telephone_mobile, -adherent.adherent_mail, -adherent.adherent_adresse_rue, -adherent.adherent_adresse_complement, -adherent.adherent_adresse_codepostal, -adherent.adherent_adresse_ville, -adherent.adherent_adresse_pays, - adherent.adherent_telephone_fixe, - adherent.carte_envoi, - adherent_finance.statut_paiement - FROM adherent - INNER JOIN adherent_finance ON adherent_finance.identifiant = adherent.identifiant - WHERE (adherent.gsheet = '' OR adherent.gsheet IS NULL) - AND adherent_finance.statut_paiement = 'paye'"; - -SELECT -adherent_professeur.date_maj, -adherent_professeur.saison, -adherent_professeur.identifiant, -adherent_professeur.association_suzuki, -adherent_professeur.adherent_nom, -adherent_professeur.adherent_prenom, -adherent_professeur.adherent_mail, -adherent_professeur.adherent_telephone_mobile, -adherent_professeur.adherent_prof_instrument1, -adherent_professeur.adherent_prof_instrument1_esa, -adherent_professeur.adherent_prof_instrument2, -adherent_professeur.adherent_prof_instrument2_esa, -adherent_professeur.adherent_prof_sece, -adherent_professeur.adherent_prof_ecole1, -adherent_professeur.adherent_prof_ecole1_mail, -adherent_professeur.adherent_prof_ecole1_web, -adherent_professeur.adherent_prof_ecole1_adresse, -adherent_professeur.adherent_prof_ecole1_cp, -adherent_professeur.adherent_prof_ecole1_ville, -adherent_professeur.adherent_prof_ecole2, -adherent_professeur.adherent_prof_ecole2_mail, -adherent_professeur.adherent_prof_ecole2_web, -adherent_professeur.adherent_prof_ecole2_adresse, -adherent_professeur.adherent_prof_ecole2_cp, -adherent_professeur.adherent_prof_ecole2_ville, -adherent_professeur.adherent_prof_ecole3, -adherent_professeur.adherent_prof_ecole3_mail, -adherent_professeur.adherent_prof_ecole3_web, -adherent_professeur.adherent_prof_ecole3_adresse, -adherent_professeur.adherent_prof_ecole3_cp, -adherent_professeur.adherent_prof_ecole3_ville, -adherent_finance.statut_paiement -FROM adherent_professeur -INNER JOIN adherent_finance ON adherent_finance.identifiant = adherent_professeur.identifiant -WHERE (adherent_professeur.gsheet = '' OR adherent_professeur.gsheet IS NULL) -AND adherent_finance.statut_paiement = 'paye'"; - - -SELECT -adherent_formation_prof.date_maj, -adherent_formation_prof.saison, -adherent_formation_prof.identifiant, -adherent_formation_prof.association_suzuki, -adherent_formation_prof.adherent_nom, -adherent_formation_prof.adherent_prenom, -adherent_formation_prof.adherent_mail, -adherent_formation_prof.adherent_telephone_mobile, -adherent_formation_prof.adherent_prof_stagiaire_instrument1, -adherent_formation_prof.adherent_prof_stagiaire_instrument1_esa, -adherent_formation_prof.adherent_prof_stagiaire_instrument1_prof, -adherent_formation_prof.adherent_prof_stagiaire_instrument2, -adherent_formation_prof.adherent_prof_stagiaire_instrument2_esa, -adherent_formation_prof.adherent_prof_stagiaire_instrument2_prof, -adherent_finance.statut_paiement -FROM adherent_formation_prof -INNER JOIN adherent_finance ON adherent_finance.identifiant = adherent_formation_prof.identifiant -WHERE (adherent_formation_prof.gsheet = '' OR adherent_formation_prof.gsheet IS NULL) -AND adherent_finance.statut_paiement = 'paye' - -SELECT -adherent_eleve.date_maj, -adherent_eleve.saison, -adherent_eleve.identifiant, -adherent_eleve.association_suzuki, -adherent_eleve.eleve_nom, -adherent_eleve.eleve_prenom, -adherent_eleve.adherent_mail, -adherent_eleve.adherent_telephone_mobile, -adherent_eleve.eleve_datenaissance, -adherent_eleve.eleve_instrumentA, -adherent_eleve.eleve_instrumentA_cahier, -adherent_eleve.eleve_instrumentA_prof, -adherent_eleve.eleve_instrumentB, -adherent_eleve.eleve_instrumentB_cahier, -adherent_eleve.eleve_instrumentB_prof, -adherent_eleve.eleve_droitimage, -adherent_eleve.eleve_contactsup_nom, -adherent_eleve.eleve_contactsup_prenom, -adherent_eleve.eleve_contactsup_mail, -adherent_finance.statut_paiement -FROM adherent_eleve -INNER JOIN adherent_finance ON adherent_finance.identifiant = adherent_eleve.identifiant -WHERE (adherent_eleve.gsheet = '' OR adherent_eleve.gsheet IS NULL) -AND adherent_finance.statut_paiement = 'paye' - -SELECT -adherent_finance.date_maj, -adherent_finance.saison, -adherent_finance.identifiant, -adherent_finance.association_suzuki, -adherent_finance.adherent_type, -adherent_finance.adherent_nom, -adherent_finance.adherent_prenom, -adherent_finance.adherent_telephone_mobile, -adherent_finance.adherent_mail, -adherent_finance.montant_adhesion, -adherent_finance.montant_don, -adherent_finance.montant_total, -adherent_finance.paiement_mode, -adherent_finance.date_paiement, -adherent_finance.stripe_retour, -adherent_finance.cheque_banque, -adherent_finance.cheque_numero, -adherent_finance.statut_paiement -FROM adherent_finance WHERE (adherent_finance.gsheet = '' OR adherent_finance.gsheet IS NULL) -AND adherent_finance.statut_paiement = 'paye' - -SELECT - adherent.date_maj, - adherent.saison, - adherent.identifiant, - adherent.association_suzuki, - adherent.adherent_type, - adherent.adherent_nom, - adherent.adherent_prenom, - adherent.adherent_telephone_mobile, - adherent.adherent_mail, - adherent.adherent_adresse_rue, - adherent.adherent_adresse_complement, - adherent.adherent_adresse_codepostal, - adherent.adherent_adresse_ville, - adherent.adherent_adresse_pays, - adherent.adherent_telephone_fixe, - adherent.carte_envoi, - adherent_finance.statut_paiement, - adherent_finance.montant_adhesion, - adherent_finance.montant_don, - adherent_finance.montant_total, - adherent_finance.paiement_mode, - adherent_finance.date_paiement, - adherent_finance.stripe_retour, - adherent_finance.cheque_banque, - adherent_finance.cheque_numero, - adherent_professeur.adherent_prof_instrument1, - adherent_professeur.adherent_prof_instrument1_esa, - adherent_professeur.adherent_prof_instrument2, - adherent_professeur.adherent_prof_instrument2_esa, - adherent_professeur.adherent_prof_sece, - adherent_professeur.adherent_prof_ecole1, - adherent_professeur.adherent_prof_ecole1_mail, - adherent_professeur.adherent_prof_ecole1_web, - adherent_professeur.adherent_prof_ecole1_adresse, - adherent_professeur.adherent_prof_ecole1_cp, - adherent_professeur.adherent_prof_ecole1_ville, - adherent_professeur.adherent_prof_ecole2, - adherent_professeur.adherent_prof_ecole2_mail, - adherent_professeur.adherent_prof_ecole2_web, - adherent_professeur.adherent_prof_ecole2_adresse, - adherent_professeur.adherent_prof_ecole2_cp, - adherent_professeur.adherent_prof_ecole2_ville, - adherent_professeur.adherent_prof_ecole3, - adherent_professeur.adherent_prof_ecole3_mail, - adherent_professeur.adherent_prof_ecole3_web, - adherent_professeur.adherent_prof_ecole3_adresse, - adherent_professeur.adherent_prof_ecole3_cp, - adherent_professeur.adherent_prof_ecole3_ville, - adherent_formation_prof.adherent_prof_stagiaire_instrument1, - adherent_formation_prof.adherent_prof_stagiaire_instrument1_esa, - adherent_formation_prof.adherent_prof_stagiaire_instrument1_prof, - adherent_formation_prof.adherent_prof_stagiaire_instrument2, - adherent_formation_prof.adherent_prof_stagiaire_instrument2_esa, - adherent_formation_prof.adherent_prof_stagiaire_instrument2_prof, - adherent_eleve.eleve_nom, - adherent_eleve.eleve_prenom, - adherent_eleve.eleve_datenaissance, - adherent_eleve.eleve_instrumentA, - adherent_eleve.eleve_instrumentA_cahier, - adherent_eleve.eleve_instrumentA_prof, - adherent_eleve.eleve_instrumentB, - adherent_eleve.eleve_instrumentB_cahier, - adherent_eleve.eleve_instrumentB_prof, - adherent_eleve.eleve_droitimage, - adherent_eleve.eleve_contactsup_nom, - adherent_eleve.eleve_contactsup_prenom, - adherent_eleve.eleve_contactsup_mail -FROM adherent --- Jointure avec adherent_finance -INNER JOIN adherent_finance ON adherent.identifiant = adherent_finance.identifiant --- Jointure avec adherent_professeur -LEFT JOIN adherent_professeur ON adherent.identifiant = adherent_professeur.identifiant --- Jointure avec adherent_formation_prof -LEFT JOIN adherent_formation_prof ON adherent.identifiant = adherent_formation_prof.identifiant --- Jointure avec adherent_eleve -LEFT JOIN adherent_eleve ON adherent.identifiant = adherent_eleve.identifiant -WHERE (adherent.gsheet = '' OR adherent.gsheet IS NULL) -AND (adherent_finance.statut_paiement = 'paye' OR adherent_finance.statut_paiement = 'attente');