'".strtotime($DateDebut)."') and "; $liens = $liens."moisd=".$_REQUEST["moisd"]."&jourd=".$_REQUEST["jourd"]."&anneed=".$_REQUEST["anneed"]."&"; } if (!empty($_REQUEST["moisf"]) && !empty($_REQUEST["jourf"]) && !empty($_REQUEST["anneef"])) { $DateFin = $_REQUEST["anneef"] . "-" . $_REQUEST["moisf"] . "-" . $_REQUEST["jourf"] ." 00:00:00"; $sSQL = $sSQL."(UNIX_TIMESTAMP(DateIns) < '".strtotime($DateFin)."') and "; //$sSQL = $sSQL."(UNIX_TIMESTAMP(DateFin) < '".strtotime($DateFin)."') and "; $liens = $liens."moisf=".$_REQUEST["moisf"]."&jourf=".$_REQUEST["jourf"]."&anneef=".$_REQUEST["anneef"]."&"; } if ($_REQUEST["TypeHoraire"] == "Semaine") { For ($S=1; $S <= $_REQUEST["NbreSemaines"]; $S++ ) { $semaine = "semaine".$S."" ; if ( $_POST[semaine] == 1 ) { $Semaine = $Semaine . "-".$S."-" ; } } if ($Semaine != "" ) { $sSQL = $sSQL . " inscriptions.Semaines Like '%" . $Semaine . "%' and " ; $text = $text ."Semaines : " . $Semaine . " . " ; $liens = $liens."Semaines=". $Semaine ."&" ; $liens = $liens."NbreSemaines=".$_REQUEST["NbreSemaines"] ."&"; } } //***Jours****** if ( $_REQUEST["TypeHoraire"] == "Jours" ) { if ( $_REQUEST["Lundi"] == "1" ) { $Jours = $Jours ."-Lundi-" ; } if ( $_REQUEST["Mardi"] == "1" ) { $Jours = $Jours ."-Mardi-" ; } if ( $_REQUEST["Mercredi"] == "1" ) { $Jours = $Jours ."-Mercredi-" ; } if ( $_REQUEST["Jeudi"] == "1" ) { $Jours = $Jours ."-Jeudi-" ; } if ( $_REQUEST["Vendredi"] == "1" ) { $Jours = $Jours ."-Vendredi-" ; } if ( $_REQUEST["Samedi"] == "1" ) { $Jours = $Jours ."-Samedi-" ; } if ( $_REQUEST["Dimanche"] == "1" ) { $Jours = $Jours ."-Dimanche-" ; } if ($Jours != "") { $sSQL = $sSQL . "inscriptions.Jours Like '%" . $Jours . "%' and " ; $text = $text ."Jours : " . $Jours . " . " ; $liens = $liens."Jours=". $Jours ."&" ; } } if ( isset($_REQUEST["Activites"]) && !empty($_REQUEST["Activites"]) ) { $sSQL = $sSQL."inscriptions.CodeA = ".$_REQUEST["Activites"]." and "; $text = $text ."nom de l'activité : " . $NomA . " . " ; $liens = $liens."Activites=".$_REQUEST["Activites"]."&"; } if ($_REQUEST["Groupe"] != "" ) { $sSQL = $sSQL . "inscriptions.Groupe = '" . $_REQUEST["Groupe"] . "' and " ; $text = $text ."Groupe : " . $_REQUEST["Groupe"] . " . " ; $liens = $liens."Groupe=".$_REQUEST["Groupe"]."&" ; } if ( isset($_REQUEST["Description"]) && !empty($_REQUEST["Description"]) ) { $sSQL = $sSQL."activites.Description Like '%".addslashes($_REQUEST["Description"])."' and "; $text = $text."Description=".$_REQUEST["Description"]."&"; $liens = $liens."Description=".$_REQUEST["Description"]."&"; } if ( $_REQUEST["Statut"] != "" ) { $sSQL = $sSQL."activites.Statut = '".$_REQUEST["Statut"]."' and "; $liens = $liens."Statut=".$_REQUEST["Statut"]."&"; } if ( isset($_REQUEST["Type"]) && !empty($_REQUEST["Type"]) ) { $sSQL = $sSQL."activites.Type = ".$_REQUEST["Type"]." and "; $text = $text."Type=".$_REQUEST["Type"]."&"; $liens = $liens."Type=".$_REQUEST["Type"]."&"; } if ( isset($_REQUEST["Animateur"]) && !empty($_REQUEST["Animateur"]) ) { $sSQL = $sSQL."activites.Animateur Like '%".addslashes($_REQUEST["Animateur"])."' and "; $text = $text."Animateur=".$_REQUEST["Animateur"]."&"; $liens = $liens."Animateur=".$_REQUEST["Animateur"]."&"; } if ( isset($_REQUEST["AnimateurAdjoint"]) && !empty($_REQUEST["AnimateurAdjoint"]) ) { $sSQL = $sSQL."activites.AnimateurAdjoint Like '%".addslashes($_REQUEST["AnimateurAdjoint"])."' and "; $text = $text."AnimateurAdjoint=".$_REQUEST["AnimateurAdjoint"]."&"; $liens = $liens."AnimateurAdjoint =".$_REQUEST["AnimateurAdjoint"]."&"; } if ( isset($_REQUEST["Cout"]) && !empty($_REQUEST["Cout"]) ) { $sSQL = $sSQL."activites.Cout = '".addslashes($_REQUEST["Cout"])."' and "; $text = $text."Cout=".$_REQUEST["Cout"]."&"; $liens = $liens."Cout =".$_REQUEST["Cout"]."&"; } //******Personne SQL **************** if (!empty($_REQUEST["mois"]) && !empty($_REQUEST["jour"]) && !empty($_REQUEST["annee"])) { $DDNt = $_REQUEST["annee"] . "-" . $_REQUEST["mois"] . "-" . $_REQUEST["jour"] ." 00:00:00"; $sSQL = $sSQL."(UNIX_TIMESTAMP(DDN) = '".strtotime($DDN)."') and "; $liens = $liens."mois=".$_REQUEST["mois"]."&jour=".$_REQUEST["jour"]."&annee=".$_REQUEST["annee"]."&"; } if ( isset($_REQUEST["Sexe"]) && !empty($_REQUEST["Sexe"]) ) { $sSQL = $sSQL."personnes.Sexe = '".$_REQUEST["Sexe"]."' and "; $text = $text ."Sexe: " & $_REQUEST["Sexe"] & " . " ; $liens = $liens."Sexe=".$_REQUEST["Sexe"]."&"; } if ( (!empty($_REQUEST["Age1"])) && (!empty($_REQUEST["Age2"])) ) { $sSQL = $sSQL."(EXTRACT(YEAR FROM NOW()) - EXTRACT(YEAR FROM personnes.DDN)) >= ".$_REQUEST["Age1"]." and (EXTRACT(YEAR FROM NOW()) - EXTRACT(YEAR FROM personnes.DDN) ) <= ".$_REQUEST["Age2"]." and "; $liens = $liens."Age1=".$_REQUEST["Age1"]."&Age2=".$_REQUEST["Age2"]."&"; } if ( isset($_REQUEST["Region"]) && !empty($_REQUEST["Region"]) ) { $sSQL = $sSQL."personnes.Region = '".$_REQUEST["Region"]."' and "; $liens = $liens."Region=".$_REQUEST["Region"]."&"; } if ( isset($_REQUEST["codepostal"]) && !empty($_REQUEST["codepostal"]) ) { $sSQL = $sSQL."personnes.codepostal Like '%".addslashes($_REQUEST["codepostal"])."' and "; $liens = $liens."codepostal=".$_REQUEST["codepostal"]."&"; } //********SQL********************************************** $SQL = "FROM (inscriptions INNER JOIN activites ON inscriptions.CodeA = activites.CodeA) INNER JOIN personnes ON inscriptions.CodeM = personnes.CodeM where ".substr($sSQL, 0, strlen($sSQL) - 4)." "; header("Content-type: application/x-msdownload"); header("Content-Disposition: attachment; filename=Inscriptions.xls"); ?>


Nom Prénom Adresse Ville Code postal Province Téléphone (Résidence) Téléphone (Bureau) DDN Age pays d'origine nom Activité Nbr Jours Montant à payer Acompte Groupe Date Inscription Nom Père Prénom Pére Nom Mère Prénom Mère NoteG Administrateur