Skip to content
Snippets Groups Projects
Commit f14f2753 authored by LANTZ Nathan's avatar LANTZ Nathan
Browse files

formulaire qui remarche, bdd modifiée + page accueil modifiée

parent 84aa4bc1
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
-- http://www.phpmyadmin.net -- http://www.phpmyadmin.net
-- --
-- Client : localhost -- Client : localhost
-- Généré le : Sam 13 Janvier 2024 à 15:38 -- Généré le : Dim 14 Janvier 2024 à 12:56
-- Version du serveur : 5.7.11 -- Version du serveur : 5.7.11
-- Version de PHP : 5.6.18 -- Version de PHP : 5.6.18
...@@ -29,27 +29,29 @@ USE `mydb`; ...@@ -29,27 +29,29 @@ USE `mydb`;
-- --
DROP TABLE IF EXISTS `adherentsemail`; DROP TABLE IF EXISTS `adherentsemail`;
CREATE TABLE `adherentsemail` ( CREATE TABLE IF NOT EXISTS `adherentsemail` (
`AdherentID` int(11) NOT NULL DEFAULT '0', `AdherentmailID` int(11) NOT NULL AUTO_INCREMENT,
`Nom` varchar(255) DEFAULT NULL, `Nom` varchar(255) DEFAULT NULL,
`Prenom` varchar(255) DEFAULT NULL, `Prenom` varchar(255) DEFAULT NULL,
`AdresseMail` varchar(255) DEFAULT NULL, `AdresseMail` varchar(255) DEFAULT NULL,
`Age` int(11) DEFAULT NULL, `Age` int(11) DEFAULT NULL,
`MotDePasse` varchar(255) DEFAULT NULL `MotDePasse` varchar(255) DEFAULT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=utf8; PRIMARY KEY (`AdherentmailID`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
-- --
-- Contenu de la table `adherentsemail` -- Contenu de la table `adherentsemail`
-- --
INSERT INTO `adherentsemail` (`AdherentID`, `Nom`, `Prenom`, `AdresseMail`, `Age`, `MotDePasse`) VALUES INSERT INTO `adherentsemail` (`AdherentmailID`, `Nom`, `Prenom`, `AdresseMail`, `Age`, `MotDePasse`) VALUES
(0, 'chevalier', 'noemy', 'nono@email.com', 38, '$2y$10$KBJzTu7tBgUmGtQ1eyhImO6rc4Fb/JlnLD9OeQAkRUBFp.TcRfGX.'), (0, 'chevalier', 'noemy', 'nono@email.com', 38, '$2y$10$KBJzTu7tBgUmGtQ1eyhImO6rc4Fb/JlnLD9OeQAkRUBFp.TcRfGX.'),
(1, 'nathan', 'lantz', 'nathanlantz57560@gmail.com', 19, 'test1'), (1, 'nathan', 'lantz', 'nathanlantz57560@gmail.com', 19, 'test1'),
(2, 'nathan', 'lantz', 'nathanlantz57560@gmail.com', 19, 'test1'), (2, 'nathan', 'lantz', 'nathanlantz57560@gmail.com', 19, 'test1'),
(3, 'nathan', 'lantz', 'nathanlantz57560@gmail.com', 19, 'test1'), (3, 'nathan', 'lantz', 'nathanlantz57560@gmail.com', 19, 'test1'),
(4, 'lantz', 'theo', 'nathanlantz22@gmail.com', 22, 'test3'), (4, 'lantz', 'theo', 'nathanlantz22@gmail.com', 22, 'test3'),
(5, 'lantz', 'theo', 'nathanlantz22@gmail.com', 22, 'test3'), (5, 'lantz', 'theo', 'nathanlantz22@gmail.com', 22, 'test3'),
(6, 'mammeri', 'rayan', 'nathanlantz2022@gmail.com', 20, 'test4'); (6, 'mammeri', 'rayan', 'nathanlantz2022@gmail.com', 20, 'test4'),
(7, 'lantz', 'nathan', 'nathanlantz12@gmail.com', 29, '$2y$10$U1x..r4zlyU5kRKZIICRTutViXjwoCBvLmeez9KnO7MHcELLxZYx.');
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -58,20 +60,21 @@ INSERT INTO `adherentsemail` (`AdherentID`, `Nom`, `Prenom`, `AdresseMail`, `Age ...@@ -58,20 +60,21 @@ INSERT INTO `adherentsemail` (`AdherentID`, `Nom`, `Prenom`, `AdresseMail`, `Age
-- --
DROP TABLE IF EXISTS `adherentstel`; DROP TABLE IF EXISTS `adherentstel`;
CREATE TABLE `adherentstel` ( CREATE TABLE IF NOT EXISTS `adherentstel` (
`AdherentID` int(11) NOT NULL DEFAULT '0', `AdherenttelID` int(11) NOT NULL AUTO_INCREMENT,
`Nom` varchar(255) DEFAULT NULL, `Nom` varchar(255) DEFAULT NULL,
`Prenom` varchar(255) DEFAULT NULL, `Prenom` varchar(255) DEFAULT NULL,
`NumeroTelephone` varchar(255) DEFAULT NULL, `NumeroTelephone` varchar(255) DEFAULT NULL,
`Age` int(11) DEFAULT NULL, `Age` int(11) DEFAULT NULL,
`MotDePasse` varchar(255) DEFAULT NULL `MotDePasse` varchar(255) DEFAULT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=utf8; PRIMARY KEY (`AdherenttelID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- --
-- Contenu de la table `adherentstel` -- Contenu de la table `adherentstel`
-- --
INSERT INTO `adherentstel` (`AdherentID`, `Nom`, `Prenom`, `NumeroTelephone`, `Age`, `MotDePasse`) VALUES INSERT INTO `adherentstel` (`AdherenttelID`, `Nom`, `Prenom`, `NumeroTelephone`, `Age`, `MotDePasse`) VALUES
(0, 'lantz', 'nathan', '07 82 70 53 51', 28, '$2y$10$FAp2/7LGaFrqEeUbnm/nyOX2T1z1uLUl8h946xjy/3nnhy30TElP6'), (0, 'lantz', 'nathan', '07 82 70 53 51', 28, '$2y$10$FAp2/7LGaFrqEeUbnm/nyOX2T1z1uLUl8h946xjy/3nnhy30TElP6'),
(1, 'nathan', 'lantz', '07 82 70 53 51', 19, 'test2'), (1, 'nathan', 'lantz', '07 82 70 53 51', 19, 'test2'),
(2, 'bbbb', 'aaaa', '11111111', 15, 'aaa'); (2, 'bbbb', 'aaaa', '11111111', 15, 'aaa');
...@@ -83,11 +86,12 @@ INSERT INTO `adherentstel` (`AdherentID`, `Nom`, `Prenom`, `NumeroTelephone`, `A ...@@ -83,11 +86,12 @@ INSERT INTO `adherentstel` (`AdherentID`, `Nom`, `Prenom`, `NumeroTelephone`, `A
-- --
DROP TABLE IF EXISTS `admin`; DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` ( CREATE TABLE IF NOT EXISTS `admin` (
`AdminID` int(11) NOT NULL, `AdminID` int(11) NOT NULL AUTO_INCREMENT,
`password` varchar(255) NOT NULL, `password` varchar(255) NOT NULL,
`login` varchar(255) NOT NULL `login` varchar(255) NOT NULL,
) ENGINE=MyISAM DEFAULT CHARSET=latin1; PRIMARY KEY (`AdminID`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
-- --
-- Contenu de la table `admin` -- Contenu de la table `admin`
...@@ -103,12 +107,13 @@ INSERT INTO `admin` (`AdminID`, `password`, `login`) VALUES ...@@ -103,12 +107,13 @@ INSERT INTO `admin` (`AdminID`, `password`, `login`) VALUES
-- --
DROP TABLE IF EXISTS `associationsportive`; DROP TABLE IF EXISTS `associationsportive`;
CREATE TABLE `associationsportive` ( CREATE TABLE IF NOT EXISTS `associationsportive` (
`idAssociationSportive` int(11) NOT NULL, `idAssociationSportive` int(11) NOT NULL,
`nom` varchar(45) DEFAULT NULL, `nom` varchar(45) DEFAULT NULL,
`adresse` varchar(45) DEFAULT NULL, `adresse` varchar(45) DEFAULT NULL,
`tel` varchar(45) DEFAULT NULL, `tel` varchar(45) DEFAULT NULL,
`siteweb` varchar(45) DEFAULT NULL `siteweb` varchar(45) DEFAULT NULL,
PRIMARY KEY (`idAssociationSportive`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --
...@@ -125,12 +130,13 @@ INSERT INTO `associationsportive` (`idAssociationSportive`, `nom`, `adresse`, `t ...@@ -125,12 +130,13 @@ INSERT INTO `associationsportive` (`idAssociationSportive`, `nom`, `adresse`, `t
-- --
DROP TABLE IF EXISTS `competitions`; DROP TABLE IF EXISTS `competitions`;
CREATE TABLE `competitions` ( CREATE TABLE IF NOT EXISTS `competitions` (
`CompetitionID` int(11) NOT NULL, `CompetitionID` int(11) NOT NULL AUTO_INCREMENT,
`Lieu` varchar(255) DEFAULT NULL, `Lieu` varchar(255) DEFAULT NULL,
`Horaire` datetime DEFAULT NULL, `Horaire` datetime DEFAULT NULL,
`PlacesDisponibles` int(11) DEFAULT NULL `PlacesDisponibles` int(11) DEFAULT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=utf8; PRIMARY KEY (`CompetitionID`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
-- --
-- Contenu de la table `competitions` -- Contenu de la table `competitions`
...@@ -151,7 +157,7 @@ INSERT INTO `competitions` (`CompetitionID`, `Lieu`, `Horaire`, `PlacesDisponibl ...@@ -151,7 +157,7 @@ INSERT INTO `competitions` (`CompetitionID`, `Lieu`, `Horaire`, `PlacesDisponibl
-- --
DROP TABLE IF EXISTS `documentsadministratifs`; DROP TABLE IF EXISTS `documentsadministratifs`;
CREATE TABLE `documentsadministratifs` ( CREATE TABLE IF NOT EXISTS `documentsadministratifs` (
`DocumentID` int(11) NOT NULL, `DocumentID` int(11) NOT NULL,
`AdherentID` int(11) NOT NULL, `AdherentID` int(11) NOT NULL,
`DossierInscription` blob, `DossierInscription` blob,
...@@ -165,8 +171,8 @@ CREATE TABLE `documentsadministratifs` ( ...@@ -165,8 +171,8 @@ CREATE TABLE `documentsadministratifs` (
-- --
DROP TABLE IF EXISTS `dossier_inscription`; DROP TABLE IF EXISTS `dossier_inscription`;
CREATE TABLE `dossier_inscription` ( CREATE TABLE IF NOT EXISTS `dossier_inscription` (
`ID` int(11) NOT NULL, `ID` int(11) NOT NULL AUTO_INCREMENT,
`Nom` varchar(50) NOT NULL, `Nom` varchar(50) NOT NULL,
`Prenom` varchar(50) NOT NULL, `Prenom` varchar(50) NOT NULL,
`DateNaissance` date NOT NULL, `DateNaissance` date NOT NULL,
...@@ -177,7 +183,8 @@ CREATE TABLE `dossier_inscription` ( ...@@ -177,7 +183,8 @@ CREATE TABLE `dossier_inscription` (
`NiveauExperience` varchar(50) DEFAULT NULL, `NiveauExperience` varchar(50) DEFAULT NULL,
`CertificatMedical` tinyint(1) NOT NULL, `CertificatMedical` tinyint(1) NOT NULL,
`AutorisationParentale` tinyint(1) NOT NULL, `AutorisationParentale` tinyint(1) NOT NULL,
`DateInscription` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP `DateInscription` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1; ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -187,11 +194,12 @@ CREATE TABLE `dossier_inscription` ( ...@@ -187,11 +194,12 @@ CREATE TABLE `dossier_inscription` (
-- --
DROP TABLE IF EXISTS `inscriptions`; DROP TABLE IF EXISTS `inscriptions`;
CREATE TABLE `inscriptions` ( CREATE TABLE IF NOT EXISTS `inscriptions` (
`InscriptionID` int(11) NOT NULL, `InscriptionID` int(11) NOT NULL AUTO_INCREMENT,
`AdherentID` int(11) NOT NULL, `AdherentID` int(11) NOT NULL,
`MatchID` int(11) NOT NULL, `MatchID` int(11) NOT NULL,
`DateInscription` datetime DEFAULT CURRENT_TIMESTAMP `DateInscription` datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`InscriptionID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1; ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -201,7 +209,7 @@ CREATE TABLE `inscriptions` ( ...@@ -201,7 +209,7 @@ CREATE TABLE `inscriptions` (
-- --
DROP TABLE IF EXISTS `inscriptionscompetitions`; DROP TABLE IF EXISTS `inscriptionscompetitions`;
CREATE TABLE `inscriptionscompetitions` ( CREATE TABLE IF NOT EXISTS `inscriptionscompetitions` (
`InscriptionID` int(11) NOT NULL, `InscriptionID` int(11) NOT NULL,
`AdherentID` int(11) NOT NULL, `AdherentID` int(11) NOT NULL,
`CompetitionID` int(11) NOT NULL, `CompetitionID` int(11) NOT NULL,
...@@ -230,11 +238,12 @@ INSERT INTO `inscriptionscompetitions` (`InscriptionID`, `AdherentID`, `Competit ...@@ -230,11 +238,12 @@ INSERT INTO `inscriptionscompetitions` (`InscriptionID`, `AdherentID`, `Competit
-- --
DROP TABLE IF EXISTS `members`; DROP TABLE IF EXISTS `members`;
CREATE TABLE `members` ( CREATE TABLE IF NOT EXISTS `members` (
`MemberID` int(11) NOT NULL, `MemberID` int(11) NOT NULL AUTO_INCREMENT,
`password` varchar(255) DEFAULT NULL, `password` varchar(255) DEFAULT NULL,
`login` varchar(255) DEFAULT NULL `login` varchar(255) DEFAULT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=utf8; PRIMARY KEY (`MemberID`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
-- --
-- Contenu de la table `members` -- Contenu de la table `members`
...@@ -248,7 +257,8 @@ INSERT INTO `members` (`MemberID`, `password`, `login`) VALUES ...@@ -248,7 +257,8 @@ INSERT INTO `members` (`MemberID`, `password`, `login`) VALUES
(5, '$2y$10$/hUhuXb9cC9f/ks2TFs0y.K2NnFASCpsqkwcenIyRmmLYcj9rz5Vu', '07 82 70 53 53'), (5, '$2y$10$/hUhuXb9cC9f/ks2TFs0y.K2NnFASCpsqkwcenIyRmmLYcj9rz5Vu', '07 82 70 53 53'),
(6, '$2y$10$/mdgq7yq2MIJdT8thGJmweljdIRURGLHofYmy8MWFeQ2PITSL/N6G', '07 82 70 53 53'), (6, '$2y$10$/mdgq7yq2MIJdT8thGJmweljdIRURGLHofYmy8MWFeQ2PITSL/N6G', '07 82 70 53 53'),
(7, '$2y$10$k6euRX3qHWEkpCrxOa3QVeQgNsKGSMZRjehkPan4Xw5Gt/sZb6DNy', 'nathanlantz88@gmail.com'), (7, '$2y$10$k6euRX3qHWEkpCrxOa3QVeQgNsKGSMZRjehkPan4Xw5Gt/sZb6DNy', 'nathanlantz88@gmail.com'),
(8, '$2y$10$5RQ25VRg8gFEu8eTtSjpJu9bv67CjF4dMCw.144mXphtQ.iqQfOua', '07 82 70 53 55'); (8, '$2y$10$5RQ25VRg8gFEu8eTtSjpJu9bv67CjF4dMCw.144mXphtQ.iqQfOua', '07 82 70 53 55'),
(9, '$2y$10$U1x..r4zlyU5kRKZIICRTutViXjwoCBvLmeez9KnO7MHcELLxZYx.', 'nathanlantz12@gmail.com');
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -257,7 +267,7 @@ INSERT INTO `members` (`MemberID`, `password`, `login`) VALUES ...@@ -257,7 +267,7 @@ INSERT INTO `members` (`MemberID`, `password`, `login`) VALUES
-- --
DROP TABLE IF EXISTS `planificationmatchs`; DROP TABLE IF EXISTS `planificationmatchs`;
CREATE TABLE `planificationmatchs` ( CREATE TABLE IF NOT EXISTS `planificationmatchs` (
`MatchID` int(11) NOT NULL DEFAULT '0', `MatchID` int(11) NOT NULL DEFAULT '0',
`CompetitionID` int(11) NOT NULL DEFAULT '0', `CompetitionID` int(11) NOT NULL DEFAULT '0',
`Court` varchar(255) DEFAULT NULL, `Court` varchar(255) DEFAULT NULL,
...@@ -291,13 +301,14 @@ INSERT INTO `planificationmatchs` (`MatchID`, `CompetitionID`, `Court`, `Horaire ...@@ -291,13 +301,14 @@ INSERT INTO `planificationmatchs` (`MatchID`, `CompetitionID`, `Court`, `Horaire
-- --
DROP TABLE IF EXISTS `programme`; DROP TABLE IF EXISTS `programme`;
CREATE TABLE `programme` ( CREATE TABLE IF NOT EXISTS `programme` (
`ProgrammeID` int(11) NOT NULL, `ProgrammeID` int(11) NOT NULL AUTO_INCREMENT,
`Nom` varchar(255) NOT NULL, `Nom` varchar(255) NOT NULL,
`Description` text, `Description` text,
`DateDebut` datetime NOT NULL, `DateDebut` datetime NOT NULL,
`DateFin` datetime NOT NULL `DateFin` datetime NOT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=utf8; PRIMARY KEY (`ProgrammeID`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
-- --
-- Contenu de la table `programme` -- Contenu de la table `programme`
...@@ -318,7 +329,7 @@ INSERT INTO `programme` (`ProgrammeID`, `Nom`, `Description`, `DateDebut`, `Date ...@@ -318,7 +329,7 @@ INSERT INTO `programme` (`ProgrammeID`, `Nom`, `Description`, `DateDebut`, `Date
-- --
DROP TABLE IF EXISTS `reservationscourts`; DROP TABLE IF EXISTS `reservationscourts`;
CREATE TABLE `reservationscourts` ( CREATE TABLE IF NOT EXISTS `reservationscourts` (
`ReservationID` int(11) NOT NULL, `ReservationID` int(11) NOT NULL,
`AdherentID` int(11) NOT NULL, `AdherentID` int(11) NOT NULL,
`HoraireReservation` datetime DEFAULT NULL `HoraireReservation` datetime DEFAULT NULL
...@@ -345,7 +356,7 @@ INSERT INTO `reservationscourts` (`ReservationID`, `AdherentID`, `HoraireReserva ...@@ -345,7 +356,7 @@ INSERT INTO `reservationscourts` (`ReservationID`, `AdherentID`, `HoraireReserva
-- --
DROP TABLE IF EXISTS `resultats`; DROP TABLE IF EXISTS `resultats`;
CREATE TABLE `resultats` ( CREATE TABLE IF NOT EXISTS `resultats` (
`ResultatID` int(11) NOT NULL, `ResultatID` int(11) NOT NULL,
`CompetitionID` int(11) NOT NULL, `CompetitionID` int(11) NOT NULL,
`Gagnant` varchar(255) DEFAULT NULL, `Gagnant` varchar(255) DEFAULT NULL,
...@@ -373,7 +384,7 @@ INSERT INTO `resultats` (`ResultatID`, `CompetitionID`, `Gagnant`, `Score`) VALU ...@@ -373,7 +384,7 @@ INSERT INTO `resultats` (`ResultatID`, `CompetitionID`, `Gagnant`, `Score`) VALU
-- --
DROP TABLE IF EXISTS `sponsors`; DROP TABLE IF EXISTS `sponsors`;
CREATE TABLE `sponsors` ( CREATE TABLE IF NOT EXISTS `sponsors` (
`idsponsors` int(11) NOT NULL, `idsponsors` int(11) NOT NULL,
`nom` varchar(45) DEFAULT NULL `nom` varchar(45) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
...@@ -399,12 +410,13 @@ INSERT INTO `sponsors` (`idsponsors`, `nom`) VALUES ...@@ -399,12 +410,13 @@ INSERT INTO `sponsors` (`idsponsors`, `nom`) VALUES
-- --
DROP TABLE IF EXISTS `telechargeable`; DROP TABLE IF EXISTS `telechargeable`;
CREATE TABLE `telechargeable` ( CREATE TABLE IF NOT EXISTS `telechargeable` (
`id` int(11) NOT NULL, `id` int(11) NOT NULL AUTO_INCREMENT,
`nom_dossier` varchar(255) NOT NULL, `nom_dossier` varchar(255) NOT NULL,
`type_document` varchar(50) NOT NULL, `type_document` varchar(50) NOT NULL,
`fichier_path` varchar(255) NOT NULL `fichier_path` varchar(255) NOT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=latin1; PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
-- --
-- Contenu de la table `telechargeable` -- Contenu de la table `telechargeable`
...@@ -415,109 +427,6 @@ INSERT INTO `telechargeable` (`id`, `nom_dossier`, `type_document`, `fichier_pat ...@@ -415,109 +427,6 @@ INSERT INTO `telechargeable` (`id`, `nom_dossier`, `type_document`, `fichier_pat
(2, 'Programmes', 'PDF', '/chemin/vers/programmes.pdf'), (2, 'Programmes', 'PDF', '/chemin/vers/programmes.pdf'),
(3, 'Calendriers des rencontres', 'PDF', '/chemin/vers/calendriers_rencontres.pdf'); (3, 'Calendriers des rencontres', 'PDF', '/chemin/vers/calendriers_rencontres.pdf');
--
-- Index pour les tables exportées
--
--
-- Index pour la table `adherentsemail`
--
ALTER TABLE `adherentsemail`
ADD PRIMARY KEY (`AdherentID`);
--
-- Index pour la table `adherentstel`
--
ALTER TABLE `adherentstel`
ADD PRIMARY KEY (`AdherentID`);
--
-- Index pour la table `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`AdminID`);
--
-- Index pour la table `associationsportive`
--
ALTER TABLE `associationsportive`
ADD PRIMARY KEY (`idAssociationSportive`);
--
-- Index pour la table `competitions`
--
ALTER TABLE `competitions`
ADD PRIMARY KEY (`CompetitionID`);
--
-- Index pour la table `dossier_inscription`
--
ALTER TABLE `dossier_inscription`
ADD PRIMARY KEY (`ID`);
--
-- Index pour la table `inscriptions`
--
ALTER TABLE `inscriptions`
ADD PRIMARY KEY (`InscriptionID`);
--
-- Index pour la table `members`
--
ALTER TABLE `members`
ADD PRIMARY KEY (`MemberID`);
--
-- Index pour la table `programme`
--
ALTER TABLE `programme`
ADD PRIMARY KEY (`ProgrammeID`);
--
-- Index pour la table `telechargeable`
--
ALTER TABLE `telechargeable`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT pour les tables exportées
--
--
-- AUTO_INCREMENT pour la table `admin`
--
ALTER TABLE `admin`
MODIFY `AdminID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT pour la table `competitions`
--
ALTER TABLE `competitions`
MODIFY `CompetitionID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
--
-- AUTO_INCREMENT pour la table `dossier_inscription`
--
ALTER TABLE `dossier_inscription`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT pour la table `inscriptions`
--
ALTER TABLE `inscriptions`
MODIFY `InscriptionID` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT pour la table `members`
--
ALTER TABLE `members`
MODIFY `MemberID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT pour la table `programme`
--
ALTER TABLE `programme`
MODIFY `ProgrammeID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT pour la table `telechargeable`
--
ALTER TABLE `telechargeable`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
...@@ -6,12 +6,11 @@ $dbname = "mydb"; ...@@ -6,12 +6,11 @@ $dbname = "mydb";
$conn = new mysqli($servername, $username, $password, $dbname); $conn = new mysqli($servername, $username, $password, $dbname);
if ($_SERVER['REQUEST_METHOD'] === 'POST') { if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (isset($_FILES['documentFile']) && $_FILES['documentFile']['error'] === UPLOAD_ERR_OK) { if (isset($_FILES['documentFile']) && $_FILES['documentFile']['error'] === UPLOAD_ERR_OK) {
// Assurez-vous que l'ID de l'adhérent est fourni et qu'il s'agit d'un nombre // Assurez-vous que l'ID de l'adhérent est fourni et qu'il s'agit d'un nombre
if (isset($_POST['adherentID']) && is_numeric($_POST['adherentID'])) { if (isset($_POST['AdherentID']) && is_numeric($_POST['AdherentID'])) {
$adherentID = intval($_POST['adherentID']); $adherentID = intval($_POST['AdherentID']);
} else { } else {
die("L'ID de l'adhérent est manquant ou invalide."); die("L'ID de l'adhérent est manquant ou invalide.");
} }
......
.evenement-page { .evenement-page {
font-family: 'kufam'; font-family: 'kufam';
color: black; color: black;
text-align: justify;
} }
.flex-container { .flex-container {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
font-size: 50px; font-size: 50px;
text-align: left; text-align: left;
margin-top: -820px; margin-top: -820px;
margin-left: 211px; margin-left: 11vh;
font-weight: bold; font-weight: bold;
color: black; color: black;
position: absolute; position: absolute;
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
font-size: 50px; font-size: 50px;
text-align: left; text-align: left;
margin-top: 100px; margin-top: 100px;
margin-left: 211px; margin-left: 11vh;
font-weight: bold; font-weight: bold;
color: black; color: black;
position: relative; position: relative;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<form method="POST" action="ScripInscription.php"> <form method="POST" action="ScripInscription.php">
<div class="EMail" id="emailSection"> <div class="EMail" id="emailSection">
<div class="Rectangle13"></div> <div class="Rectangle13"></div>
<input type="email" id="Rectangle14" name="mail" size="25" required /> <input type="mail" id="Rectangle14" name="mail" size="25" required />
<div class="EntreTonAdresseEMail">Entre ton adresse e-mail</div> <div class="EntreTonAdresseEMail">Entre ton adresse e-mail</div>
<input type="password" id="Rectangle16" name="choisirmdp1" size="25" /> <input type="password" id="Rectangle16" name="choisirmdp1" size="25" />
<div class="ChoisirUnMotDePasse">Choisir un mot de passe</div> <div class="ChoisirUnMotDePasse">Choisir un mot de passe</div>
...@@ -59,5 +59,4 @@ ...@@ -59,5 +59,4 @@
<?php require('footer.php'); ?> <?php require('footer.php'); ?>
<script src="scriptinscription.js"></script> <script src="scriptinscription.js"></script>
<script src="tel.js"></script> \ No newline at end of file
\ No newline at end of file
<?php require('header.php'); ?> <?php require('header.php'); ?>
<?php
// Traitement du formulaire d'envoi de document
if ($_SERVER["REQUEST_METHOD"] == "POST") {
echo "Formulaire soumis.<br>";
if (isset($_FILES['documentFile'])) {
echo "Fichier détecté dans le formulaire.<br>";
var_dump($_FILES['documentFile']);
// Vérifier les erreurs de téléchargement
if ($_FILES['documentFile']['error'] == UPLOAD_ERR_OK) {
echo "Aucune erreur de téléchargement.<br>";
// Connexion à la base de données
$conn = new mysqli("localhost", "root", "root", "mydb");
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Récupérer l'email ou le téléphone de l'utilisateur connecté
$userEmailOrPhone = $_SESSION['user_email_or_phone']; // Assurez-vous que cette session est bien définie
// Récupération et traitement du fichier
$file = $_FILES['documentFile']['tmp_name'];
$fileName = $_FILES['documentFile']['name'];
// Lecture du contenu du fichier
$fp = fopen($file, "r");
$content = fread($fp, filesize($file));
$content = addslashes($content);
fclose($fp);
// Préparation de la requête SQL
$sql = "INSERT INTO documentsadministratifs (AdherentID, DossierInscription) VALUES ('$userEmailOrPhone', '$content')";
// Exécution de la requête
if ($conn->query($sql) === TRUE) {
echo "Document envoyé avec succès.<br>";
} else {
echo "Erreur lors de l'envoi du document: " . mysqli_error($conn) . "<br>";
}
// Fermeture de la connexion
$conn->close();
} else {
echo "Erreur de téléchargement: " . $_FILES['documentFile']['error'] . "<br>";
}
} else {
echo "Aucun fichier dans le formulaire.<br>";
}
} else {
echo "Le formulaire n'a pas été soumis.<br>";
}
?>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
...@@ -46,9 +103,7 @@ ...@@ -46,9 +103,7 @@
<div class="document-upload"> <div class="document-upload">
<h2>Envoyer vos Documents</h2> <h2>Envoyer vos Documents</h2>
<form id="documentForm" enctype="multipart/form-data"> <form id="documentForm" enctype="multipart/form-data" method="post">
<input type="hidden" id="adherentID" name="adherentID" value="<?php echo $adherentID; ?>">
<label for="documentType">Type de Document :</label> <label for="documentType">Type de Document :</label>
<select id="documentType" name="documentType"> <select id="documentType" name="documentType">
<option value="carte_adherent">Carte d'Adhérent</option> <option value="carte_adherent">Carte d'Adhérent</option>
...@@ -58,7 +113,8 @@ ...@@ -58,7 +113,8 @@
<label for="documentFile">Sélectionnez le document à envoyer :</label> <label for="documentFile">Sélectionnez le document à envoyer :</label>
<input type="file" id="documentFile" name="documentFile" accept=".jpg, .jpeg, .png, .pdf"> <input type="file" id="documentFile" name="documentFile" accept=".jpg, .jpeg, .png, .pdf">
<br> <br>
<button type="button" class="buttonUpload" onclick="submitDocument()">Envoyer</button> <input type="hidden" name="form_type" value="upload_document">
<button type="submit" class="buttonUpload">Envoyer</button>
</form> </form>
</div> </div>
...@@ -75,6 +131,4 @@ ...@@ -75,6 +131,4 @@
</div> </div>
</div> </div>
<?php require('footer.php'); ?> <?php require('footer.php'); ?>
\ No newline at end of file
<script src="scriptenvoie.js"></script>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment