From ea9ca50d2b4eb37ce100889222092ced0523ee27 Mon Sep 17 00:00:00 2001 From: lantz14u <nathan.lantz1@etu.univ-lorraine.fr> Date: Tue, 2 Jan 2024 16:46:26 +0100 Subject: [PATCH] changement de nom + suppression commentaires --- telecharger_dossier.php => DLdossier.php | 11 ----------- telecharger_programme.php => DLprogramme.php | 12 +----------- telecharger_rdv.php => DLrdv.php | 11 ----------- membre.php | 6 +++--- 4 files changed, 4 insertions(+), 36 deletions(-) rename telecharger_dossier.php => DLdossier.php (84%) rename telecharger_programme.php => DLprogramme.php (69%) rename telecharger_rdv.php => DLrdv.php (74%) diff --git a/telecharger_dossier.php b/DLdossier.php similarity index 84% rename from telecharger_dossier.php rename to DLdossier.php index 6cf45de..6d56751 100644 --- a/telecharger_dossier.php +++ b/DLdossier.php @@ -3,29 +3,22 @@ include('dbconnect.php'); date_default_timezone_set('Europe/Paris'); require_once('TCPDF-main/tcpdf.php'); -// Create a database connection instance $connexion = dbconnect(); -// SQL query to select necessary columns from the "dossier_inscription" table $sql = "SELECT Nom, Prenom, DateNaissance, Adresse, Email, NumeroTel, PostePrefere, NiveauExperience, CertificatMedical, AutorisationParentale, DateInscription FROM dossier_inscription"; $query = $connexion->query($sql); -// Create a new TCPDF instance $pdf = new TCPDF(); -// PDF settings $pdf->SetCreator('Club de Foot'); $pdf->SetAuthor('Club de Foot'); $pdf->SetTitle('Dossiers d\'Inscription - Club MatchZéro'); $pdf->SetMargins(10, 10, 10); -// Add a new page to the PDF $pdf->AddPage(); -// PDF content $pdf->SetFont('helvetica', '', 12); -// Table header $html = '<table border="1">'; $html .= '<tr>'; $html .= '<th>Nom</th>'; @@ -41,7 +34,6 @@ $html .= '<th>Autorisation Parentale</th>'; $html .= '<th>Date Inscription</th>'; $html .= '</tr>'; -// Loop to add table data to the PDF while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $html .= '<tr>'; $html .= '<td>' . $row['Nom'] . '</td>'; @@ -60,12 +52,9 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $html .= '</table>'; -// Output the PDF $pdf->writeHTML($html, true, false, true, false, ''); -// PDF file name for download $file_name = 'Dossiers_Inscription_Club_Foot.pdf'; -// Send the PDF file to the browser for download $pdf->Output($file_name, 'D'); ?> \ No newline at end of file diff --git a/telecharger_programme.php b/DLprogramme.php similarity index 69% rename from telecharger_programme.php rename to DLprogramme.php index 44df806..cf145ef 100644 --- a/telecharger_programme.php +++ b/DLprogramme.php @@ -1,11 +1,9 @@ <?php -// Inclure le fichier de fonctions de base de données + include('dbconnect.php'); -// Créer une instance de connexion à la base de données $connexion = dbconnect(); -// Requête SQL pour sélectionner toutes les lignes de la table "programme" $sql = "SELECT * FROM programme"; $query = $connexion->query($sql); @@ -13,19 +11,15 @@ date_default_timezone_set('Europe/Paris'); require_once('TCPDF-main/tcpdf.php'); $pdf = new TCPDF(); -// Paramètres du PDF $pdf->SetCreator('Club de Foot'); $pdf->SetAuthor('Club de Foot'); $pdf->SetTitle('Programmes du Club MatchZéro'); $pdf->SetMargins(10, 10, 10); -// Ajouter une nouvelle page au PDF $pdf->AddPage(); -// Contenu du PDF $pdf->SetFont('helvetica', '', 12); -// En-tête du tableau $html = '<table border="1">'; $html .= '<tr>'; $html .= '<th>Nom</th>'; @@ -34,7 +28,6 @@ $html .= '<th>Date de Début</th>'; $html .= '<th>Date de Fin</th>'; $html .= '</tr>'; -// Boucle pour ajouter les données de la table au PDF while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $html .= '<tr>'; $html .= '<td>' . $row['Nom'] . '</td>'; @@ -46,12 +39,9 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $html .= '</table>'; -// Sortie du PDF $pdf->writeHTML($html, true, false, true, false, ''); -// Nom du fichier PDF à télécharger $nom_fichier = 'Programmes_Club_Foot.pdf'; -// Envoyer le fichier PDF au navigateur pour téléchargement $pdf->Output($nom_fichier, 'D'); ?> \ No newline at end of file diff --git a/telecharger_rdv.php b/DLrdv.php similarity index 74% rename from telecharger_rdv.php rename to DLrdv.php index b150c66..33cb6ae 100644 --- a/telecharger_rdv.php +++ b/DLrdv.php @@ -3,29 +3,22 @@ include('dbconnect.php'); date_default_timezone_set('Europe/Paris'); require_once('TCPDF-main/tcpdf.php'); -// Create a database connection instance $connexion = dbconnect(); -// SQL query to select necessary columns from the "planificationmatchs" table $sql = "SELECT Court, Horaire, JoueursNecessaires FROM planificationmatchs"; $query = $connexion->query($sql); -// Create a new TCPDF instance $pdf = new TCPDF(); -// PDF settings $pdf->SetCreator('Club de Foot'); $pdf->SetAuthor('Club de Foot'); $pdf->SetTitle('Planifications des Matchs - Club MatchZéro'); $pdf->SetMargins(10, 10, 10); -// Add a new page to the PDF $pdf->AddPage(); -// PDF content $pdf->SetFont('helvetica', '', 12); -// Table header $html = '<table border="1">'; $html .= '<tr>'; $html .= '<th>Court</th>'; @@ -33,7 +26,6 @@ $html .= '<th>Horaire</th>'; $html .= '<th>Joueurs Necessaires</th>'; $html .= '</tr>'; -// Loop to add table data to the PDF while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $html .= '<tr>'; $html .= '<td>' . $row['Court'] . '</td>'; @@ -44,11 +36,8 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $html .= '</table>'; -// Output the PDF $pdf->writeHTML($html, true, false, true, false, ''); -// PDF file name for download $file_name = 'Planifications_Matchs_Club_Foot.pdf'; -// Send the PDF file to the browser for download $pdf->Output($file_name, 'D'); \ No newline at end of file diff --git a/membre.php b/membre.php index 314f0a9..ac10ebd 100644 --- a/membre.php +++ b/membre.php @@ -25,21 +25,21 @@ <h3>Dossiers d'Inscription/Adhésion</h3> <p>Retrouvez ici le dossiers d'inscription/adhésion pour devenir membre de notre club. Remplissez-les soigneusement pour rejoindre notre communauté dynamique (à envoyer par mail).</p> - <p><a href="telecharger_dossier.php">Télécharger le calendrier des rencontres en PDF</a></p> + <p><a href="DLdossier.php">Télécharger le calendrier des rencontres en PDF</a></p> </div> <div class="telechargeable-item"> <h3>Programmes</h3> <p>Découvrez nos programmes d'entraînement conçus pour améliorer vos compétences et renforcer votre condition physique. Téléchargez-les en format PDF ci-dessous.</p> - <p><a href="telecharger_programme.php">Télécharger les Programmes en PDF</a></p> + <p><a href="DLprogramme.php">Télécharger les Programmes en PDF</a></p> </div> <div class="telechargeable-item"> <h3>Calendriers des Rencontres</h3> <p>Consultez nos calendriers des rencontres pour rester informé des événements à venir. Téléchargez-les pour ne rien manquer de nos passionnantes compétitions.</p> - <p><a href="telecharger_rdv.php">Télécharger le calendrier des rencontres en PDF</a></p> + <p><a href="DLrdv.php">Télécharger le calendrier des rencontres en PDF</a></p> </div> </div> -- GitLab