It appears your waiver has not been accepted:
Deadline for completion is July 14th, Noon MT. Teams will be charged a $50 late fee for any incomplete team dashboard after that date."; $strMsgSubjectWaivers = "Incomplete Dashboard - Waivers unsigned"; $strMsgBody = "Dear Captains/Team Owners;
Your current team dashboard is incomplete, which requires you to take action.
Please log into your team dashboard and ensure that:
You will be charged a $50 late fee for any incomplete team dashboard after that date."; $strMsgSubject = "Incomplete Dashboard"; $strMsgFromName = 'MS1 Inscription - 24 Hours of Adrenlin';// a valider $strMsgFromMail = 'info@ms1timing.com'; // a valider //data pour les waivers non signes $sqlLateWaivers = "SELECT p.pec_id, p.par_nom, p.par_prenom, p.par_courriel FROM resultats_participants p, resultats_epreuves_commandees e WHERE p.eve_id = 175 AND waiver_cleared = 0 and p.pec_id = e.pec_id_original and e.is_cancelled = 0 and e.pec_actif = 1 ORDER BY pec_id"; $tabLateWaivers = $GLOBALS['db']->fxGetResults($sqlLateWaivers); // data pour les dashboards incomplets. $sqlInscriptions = "SELECT ec.pec_id_original AS pec_id, e.epr_type_en AS race, MID(e.epr_type_en, INSTR(e.epr_type_en, '(')) AS category, (CASE ec.pec_equipe WHEN 1 THEN 'Yes' ELSE 'No' END) AS pec_equipe, ec.pec_nom_equipe, (SELECT ach_maj FROM inscriptions_panier_acheteurs WHERE no_commande = ec.no_commande) AS pec_maj, ec.no_equipe, co.com_prenom AS firstname_owner, co.com_nom AS lastname_owner, co.com_login AS login_owner, co.com_nom AS lastname_owner, co.com_courriel AS email_owner, (SELECT CONCAT(COUNT(par_id),'/1') FROM resultats_participants WHERE pec_id = ec.pec_id_original AND is_cancelled = 0 AND rol_id = 1) AS nb_captain, (SELECT CONCAT(COUNT(par_id),'/',e.epr_nb_participants) FROM resultats_participants WHERE pec_id = ec.pec_id_original AND is_cancelled = 0 AND rol_id <= 2) AS nb_participants, (SELECT CONCAT(COUNT(par_id),'/',e.epr_nb_benevole) FROM resultats_participants WHERE pec_id = ec.pec_id_original AND is_cancelled = 0 AND rol_id = 3) AS nb_benevoles, (SELECT CONCAT(COUNT(par_id),'/',e.epr_nb_pit_manager) FROM resultats_participants WHERE pec_id = ec.pec_id_original AND is_cancelled = 0 AND rol_id = 4) AS nb_pit_manager, (SELECT CONCAT(COUNT(pro_id),'/',e.epr_nb_camping) FROM resultats_produits_new WHERE pec_id = ec.pec_id_original) AS nb_camping, (SELECT COALESCE(SUM(par_age), 0) FROM resultats_participants WHERE pec_id = ec.pec_id_original AND is_cancelled = 0 AND rol_id <= 2) AS age_sum, (IF(ec.epr_id = 109, CASE WHEN (SELECT SUM(par_age) FROM resultats_participants WHERE pec_id = ec.pec_id_original AND is_cancelled = 0 AND rol_id <= 2) <= 150 THEN 'Under 150' WHEN (SELECT SUM(par_age) FROM resultats_participants WHERE pec_id = ec.pec_id_original AND is_cancelled = 0 AND rol_id <= 2) <= 189 THEN '150 to 189' WHEN (SELECT SUM(par_age) FROM resultats_participants WHERE pec_id = ec.pec_id_original AND is_cancelled = 0 AND rol_id <= 2) <= 219 THEN '190 to 219' WHEN (SELECT SUM(par_age) FROM resultats_participants WHERE pec_id = ec.pec_id_original AND is_cancelled = 0 AND rol_id <= 2) >= 220 THEN '220+' END, '-')) AS age_category FROM resultats_epreuves_commandees ec, inscriptions_panier_epreuves e, inscriptions_comptes co WHERE ec.epr_id = e.epr_id AND ec.com_id = co.com_id AND ec.eve_id = 175 AND ec.is_cancelled = 0 AND ec.pec_actif = 1 AND ec.pec_dashboard_complete = 0 ORDER BY ec.pec_nom_equipe"; $tabInscriptions = $GLOBALS['db']->fxGetResults($sqlInscriptions); //var_dump($tabInscriptions); $tabLateTeams = array(); // $tabLateTeams['liste'] = array(); $intCtr = 1; for ($i = 1; $i <= count($tabInscriptions); $i++) { // captain $tabCaptain = explode("/", $tabInscriptions[$i]['nb_captain']); $tabParticipant = explode("/", $tabInscriptions[$i]['nb_participants']); $tabVolunteer = explode("/", $tabInscriptions[$i]['nb_benevoles']); $tabPitManager = explode("/", $tabInscriptions[$i]['nb_pit_manager']); $tabCamping = explode("/", $tabInscriptions[$i]['nb_camping']); if($tabCaptain[0] != $tabCaptain[1]){ $tabLateTeams[] = $tabInscriptions[$i]['pec_id']; // $tabLateTeams['liste'][] = $tabInscriptions[$i]['pec_id']; $intCtr++; } // nb participants if($tabParticipant[0] != $tabParticipant[1] || ($tabParticipant[0] < 6 && $tabParticipant[1] == 10)){ if(!in_array($tabInscriptions[$i]['pec_id'], $tabLateTeams)) { $tabLateTeams[] = $tabInscriptions[$i]['pec_id']; } $intCtr++; } // volunteers if($tabVolunteer[0] != $tabVolunteer[1]){ if(!in_array($tabInscriptions[$i]['pec_id'], $tabLateTeams)) { $tabLateTeams[] = $tabInscriptions[$i]['pec_id']; } $intCtr++; } // pit managers if($tabPitManager[0] != $tabPitManager[1]){ if(!in_array($tabInscriptions[$i]['pec_id'], $tabLateTeams)) { $tabLateTeams[] = $tabInscriptions[$i]['pec_id']; } $intCtr++; } // campings if($tabCamping[0] != $tabCamping[1]){ if(!in_array($tabInscriptions[$i]['pec_id'], $tabLateTeams)) { $tabLateTeams[] = $tabInscriptions[$i]['pec_id']; } $intCtr++; } } sort($tabLateTeams); if (isset($_POST['frm_action'])) { switch ($_POST['frm_action']) { case 'retard-depot': $sqlEpreuves = "SELECT c.no_commande, c.no_panier, md.com_id, md.eve_id, c.pec_id_original AS pec_id, CONCAT(e.epr_type_en, ' ', e.epr_nom_en) AS epreuve_nom, c.pec_nom_equipe, CONCAT(a.com_prenom, ' ', a.com_nom) AS nom_complet, a.com_courriel, md.md_montant, md.md_date_limite_paiement, md.md_motif_en FROM resultats_epreuves_commandees c, inscriptions_panier_epreuves e, inscriptions_montants_dus md, inscriptions_panier_acheteurs a WHERE c.pec_id_original = md.pec_id AND c.epr_id = e.epr_id AND c.eve_id = 175 AND c.no_panier = a.no_panier AND (md.no_commande_paye = '' OR md.no_commande_paye IS NULL) ORDER BY md.com_id, md.no_commande DESC, md.md_date_ajout"; $tabEpreuves = $GLOBALS['db']->fxGetResults($sqlEpreuves); if ($tabEpreuves != null) { $strLastAcheteur = ''; $tabAcheteurs = array(); for ($intCtr = 1; $intCtr <= count($tabEpreuves); $intCtr++) { // Ajouter les frais à la table montants_dus $sqlInsert = "INSERT INTO inscriptions_montants_dus SET com_id = " . intval($tabEpreuves[$intCtr]['com_id']) . ", pec_id = " . intval($tabEpreuves[$intCtr]['pec_id']) . ", md_montant = " . floatval($_POST['md_montant']) . ", eve_id = " . intval($tabEpreuves[$intCtr]['eve_id']) . ", no_commande = '" . $GLOBALS['db']->fxEscape(fxUnescape($tabEpreuves[$intCtr]['no_commande'])) . "', no_panier = '" . $GLOBALS['db']->fxEscape(fxUnescape($tabEpreuves[$intCtr]['no_panier'])) . "', md_date_limite_paiement = '" . $GLOBALS['db']->fxEscape($_POST['md_date_limite_paiement']) . "', md_motif_fr = '" . $GLOBALS['db']->fxEscape($_POST['md_motif_fr']) . "', md_motif_en = '" . $GLOBALS['db']->fxEscape($_POST['md_motif_en']) . "'"; $qryInsert = $GLOBALS['db']->fxQuery($sqlInsert); if ($qryInsert != null) { $tabAcheteurs[$tabEpreuves[$intCtr]['com_id']]['nom'] = fxUnescape($tabEpreuves[$intCtr]['nom_complet']); $tabAcheteurs[$tabEpreuves[$intCtr]['com_id']]['courriel'] = fxUnescape($tabEpreuves[$intCtr]['com_courriel']); $tabAcheteurs[$tabEpreuves[$intCtr]['com_id']]['courses'][] = array('epreuve_nom' => fxUnescape($tabEpreuves[$intCtr]['epreuve_nom']), 'nom_equipe' => fxUnescape($tabEpreuves[$intCtr]['pec_nom_equipe']), 'no_commande' => fxUnescape($tabEpreuves[$intCtr]['no_commande'])); } } $from_mail = fxUnescape($GLOBALS['vEmail']); $from_name = fxUnescape($GLOBALS['vClient']); foreach ($tabAcheteurs as $acheteur) { // Avertir le client par courriel (seulement 1 courriel par nom_complet) $to_mail = $acheteur['courriel']; $to_name = $acheteur['nom']; $strSubject = "Late fees added to your account"; $strMessage = " Hello " . $to_name . ",

this message is to notify you that a late fee of $75.00 has been add to your account because the 50% deposit for the following race(s) has not been paid by January 15, 2015.

"; foreach ($acheteur['courses'] as $course) { $strMessage .= "- " . $course['no_commande'] . ": " . $course['epreuve_nom']; if ($course['nom_equipe'] != '') $strMessage .= " (" . $course['nom_equipe'] . ")"; $strMessage .= "
"; } $strMessage .= "

This is an auto-message sent on by " . $from_name . " " . fxShowDate(fxGetDate(), 'en') . " @ " . fxShowTime(fxGetDateTime()) . ". "; fxSendMail($strSubject, $strMessage, $to_mail, $to_name, $from_mail, $from_name, 1, 1); } $_SESSION['msg'] = 667; // message réussite } else $_SESSION['msg'] = 666; // message erreur break; case 'retard-waivers': for($i = 1; $i <= count($tabLateWaivers); $i++){ $strMsgToName = $tabLateWaivers[$i]['par_prenom'] . " " . $tabLateWaivers[$i]['par_nom']; // $strMsgToMail = "alex@progiweb.ca"; // for testing purposes $strMsgToMail = $tabLateWaivers[$i]['par_courriel']; $blnSend = fxSendMail($strMsgSubjectWaivers, $strMsgBodyWaivers, $strMsgToMail, $strMsgToName, $strMsgFromMail, $strMsgFromName, 1,1); // var_dump($blnSend); // for testing // exit; // for testing } break; case 'retard-dashboard': // for($i = 1; $i <= 60; $i++){ for($i = 1; $i <= count($tabLateTeams); $i++){ $sqlCaptain = "SELECT c.com_courriel, c.com_prenom, c.com_nom FROM resultats_participants p, inscriptions_comptes c WHERE c.com_id = p.com_id and p.rol_id = 1 and p.pec_id = " . intval($tabLateTeams[$i]); $tabCaptain = $GLOBALS['db']->fxGetRow($sqlCaptain); if($tabCaptain != null){ $strMsgToName = $tabCaptain['com_prenom'] . " " . $tabCaptain['com_nom']; $strMsgToMail = $tabCaptain['com_courriel']; } else { $sql = "SELECT c.com_courriel, c.com_prenom, c.com_nom FROM resultats_epreuves_commandees e, inscriptions_comptes c WHERE c.com_id = e.com_id and e.pec_id_original = " . intval($tabLateTeams[$i]); $tabOwner = $GLOBALS['db']->fxGetRow($sql); $strMsgToName = $tabOwner['com_prenom'] . " " . $tabOwner['com_nom']; $strMsgToMail = $tabOwner['com_courriel']; } //; // $strMsgBody .= var_dump($strMsgToName); // $strMsgToMail = "alex@progiweb.ca"; // for testing purposes $blnSend = fxSendMail($strMsgSubject, $strMsgBody, $strMsgToMail, $strMsgToName, $strMsgFromMail, $strMsgFromName, 1,1); // var_dump($blnSend); // for testing // exit;// for testing } break; } // retourner à la page d'origine header('Location: ' . $strPage . '?p=' . $strParam); exit; } require_once('inc_header.php'); ?>

Frais de retard

 

fxGetResults($sqlEpreuves); if ($tabEpreuves != null) { ?>

Vous ne devriez cliquer ce bouton qu'une seule fois, soit le 16 janvier 2015. Soyez prudent puisque ça envoie des courriels aux clients. :)

class="odd">
# No commande pec_id Équipe Acheteur Montant du Date limite Motif
@ Voir facture

Il n'y a aucun montant du non-payé pour le moment.

Cliquer pour envoyer un courriel de notification - Waivers manquants (seulement : pas de creation de produit!!)

Waivers not signed ()

"; echo ""; echo ""; // echo ""; } ?>
# Captain/Owner name Email
" . $tabLateWaivers[$i]['pec_id'] . "" . $tabLateWaivers[$i]['par_prenom'] . " " . $tabLateWaivers[$i]['par_nom'] . "" . $tabLateWaivers[$i]['par_courriel'] . "Email

Cliquer pour envoyer un courriel de notification (seulement : pas de creation de produit!!)

Incomplete dashboards - 2015 ()

"; $sql = "SELECT c.com_courriel, c.com_prenom, c.com_nom FROM resultats_epreuves_commandees e, inscriptions_comptes c WHERE c.com_id = e.com_id and e.pec_id_original = " . intval($tabLateTeams[$j]); $tabOwner = $GLOBALS['db']->fxGetRow($sql); echo ""; echo ""; } ?>
ctr # Captain/Owner name Email
" . $j . "" . $tabLateTeams[$j] . "" . $tabOwner['com_prenom'] . " " . $tabOwner['com_nom'] . "" . $tabOwner['com_courriel'] . "