diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 35eb1ddfbbc029bcab630581847471d7f238ec53..1514572483e55b54343d909b46d664c7e5d6bfb3 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,5 +2,6 @@ <project version="4"> <component name="VcsDirectoryMappings"> <mapping directory="" vcs="Git" /> + <mapping directory="$PROJECT_DIR$/panel_admin" vcs="Git" /> </component> </project> \ No newline at end of file diff --git a/mydb.sql b/database/mydb.sql similarity index 78% rename from mydb.sql rename to database/mydb.sql index 03c1d52e099781b9571816f3f34d82b7cf2d4263..2a5bf98b954cf0efee78f155237efbf72214b24d 100644 --- a/mydb.sql +++ b/database/mydb.sql @@ -1,13 +1,14 @@ -- phpMyAdmin SQL Dump --- version 4.5.4.1 --- http://www.phpmyadmin.net +-- version 5.2.1 +-- https://www.phpmyadmin.net/ -- --- Client : localhost --- Généré le : Sam 06 Janvier 2024 à 17:05 --- Version du serveur : 5.7.11 --- Version de PHP : 5.6.18 +-- Hôte : 127.0.0.1:3306 +-- Généré le : lun. 08 jan. 2024 à 10:16 +-- Version du serveur : 8.2.0 +-- Version de PHP : 8.2.13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +START TRANSACTION; SET time_zone = "+00:00"; @@ -17,7 +18,7 @@ SET time_zone = "+00:00"; /*!40101 SET NAMES utf8mb4 */; -- --- Base de données : `mydb` +-- Base de données : `mydb` -- CREATE DATABASE IF NOT EXISTS `mydb` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `mydb`; @@ -30,17 +31,17 @@ USE `mydb`; DROP TABLE IF EXISTS `adherentsemail`; CREATE TABLE IF NOT EXISTS `adherentsemail` ( - `AdherentID` int(11) NOT NULL DEFAULT '0', + `AdherentID` int NOT NULL DEFAULT '0', `Nom` varchar(255) DEFAULT NULL, `Prenom` varchar(255) DEFAULT NULL, `AdresseMail` varchar(255) DEFAULT NULL, - `Age` int(11) DEFAULT NULL, + `Age` int DEFAULT NULL, `MotDePasse` varchar(255) DEFAULT NULL, PRIMARY KEY (`AdherentID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; -- --- Contenu de la table `adherentsemail` +-- Déchargement des données de la table `adherentsemail` -- INSERT INTO `adherentsemail` (`AdherentID`, `Nom`, `Prenom`, `AdresseMail`, `Age`, `MotDePasse`) VALUES @@ -60,17 +61,17 @@ INSERT INTO `adherentsemail` (`AdherentID`, `Nom`, `Prenom`, `AdresseMail`, `Age DROP TABLE IF EXISTS `adherentstel`; CREATE TABLE IF NOT EXISTS `adherentstel` ( - `AdherentID` int(11) NOT NULL DEFAULT '0', + `AdherentID` int NOT NULL DEFAULT '0', `Nom` varchar(255) DEFAULT NULL, `Prenom` varchar(255) DEFAULT NULL, `NumeroTelephone` varchar(255) DEFAULT NULL, - `Age` int(11) DEFAULT NULL, + `Age` int DEFAULT NULL, `MotDePasse` varchar(255) DEFAULT NULL, PRIMARY KEY (`AdherentID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; -- --- Contenu de la table `adherentstel` +-- Déchargement des données de la table `adherentstel` -- INSERT INTO `adherentstel` (`AdherentID`, `Nom`, `Prenom`, `NumeroTelephone`, `Age`, `MotDePasse`) VALUES @@ -80,22 +81,43 @@ INSERT INTO `adherentstel` (`AdherentID`, `Nom`, `Prenom`, `NumeroTelephone`, `A -- -------------------------------------------------------- +-- +-- Structure de la table `admin` +-- + +DROP TABLE IF EXISTS `admin`; +CREATE TABLE IF NOT EXISTS `admin` ( + `AdminID` int NOT NULL AUTO_INCREMENT, + `password` varchar(255) NOT NULL, + `login` varchar(255) NOT NULL, + PRIMARY KEY (`AdminID`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; + +-- +-- Déchargement des données de la table `admin` +-- + +INSERT INTO `admin` (`AdminID`, `password`, `login`) VALUES +(1, 'mdp', 'admin1'); + +-- -------------------------------------------------------- + -- -- Structure de la table `associationsportive` -- DROP TABLE IF EXISTS `associationsportive`; CREATE TABLE IF NOT EXISTS `associationsportive` ( - `idAssociationSportive` int(11) NOT NULL, + `idAssociationSportive` int NOT NULL, `nom` varchar(45) DEFAULT NULL, `adresse` varchar(45) DEFAULT NULL, `tel` varchar(45) DEFAULT NULL, `siteweb` varchar(45) DEFAULT NULL, PRIMARY KEY (`idAssociationSportive`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; -- --- Contenu de la table `associationsportive` +-- Déchargement des données de la table `associationsportive` -- INSERT INTO `associationsportive` (`idAssociationSportive`, `nom`, `adresse`, `tel`, `siteweb`) VALUES @@ -109,26 +131,24 @@ INSERT INTO `associationsportive` (`idAssociationSportive`, `nom`, `adresse`, `t DROP TABLE IF EXISTS `competitions`; CREATE TABLE IF NOT EXISTS `competitions` ( - `CompetitionID` int(11) NOT NULL, + `CompetitionID` int NOT NULL AUTO_INCREMENT, `Lieu` varchar(255) DEFAULT NULL, `Horaire` datetime DEFAULT NULL, - `PlacesDisponibles` int(11) DEFAULT NULL, + `PlacesDisponibles` int DEFAULT NULL, PRIMARY KEY (`CompetitionID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb3; -- --- Contenu de la table `competitions` +-- Déchargement des données de la table `competitions` -- INSERT INTO `competitions` (`CompetitionID`, `Lieu`, `Horaire`, `PlacesDisponibles`) VALUES (9, 'Stade de la Lumière', '2025-04-18 19:00:00', 95), (10, 'Stade de l\'Aurore', '2025-05-10 16:30:00', 120), -(11, 'Stade du Mont Bleu', '2025-06-25 21:45:00', 80), (12, 'Stade de la Vallée', '2025-07-12 18:15:00', 110), (13, 'Stade des Champs', '2025-08-30 20:45:00', 105), (14, 'Stade du Rivage', '2025-09-22 15:30:00', 130), -(15, 'Stade de l\'Éclat', '2025-10-10 17:15:00', 90), -(16, 'Stade de l\'Horizon', '2025-11-05 21:00:00', 100); +(17, 'St-Dié', '2025-09-22 15:30:00', 5); -- -------------------------------------------------------- @@ -138,11 +158,11 @@ INSERT INTO `competitions` (`CompetitionID`, `Lieu`, `Horaire`, `PlacesDisponibl DROP TABLE IF EXISTS `documentsadministratifs`; CREATE TABLE IF NOT EXISTS `documentsadministratifs` ( - `DocumentID` int(11) NOT NULL, - `AdherentID` int(11) NOT NULL, + `DocumentID` int NOT NULL, + `AdherentID` int NOT NULL, `DossierInscription` blob, `PhotoAdherent` blob -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; -- -------------------------------------------------------- @@ -152,7 +172,7 @@ CREATE TABLE IF NOT EXISTS `documentsadministratifs` ( DROP TABLE IF EXISTS `dossier_inscription`; CREATE TABLE IF NOT EXISTS `dossier_inscription` ( - `ID` int(11) NOT NULL AUTO_INCREMENT, + `ID` int NOT NULL AUTO_INCREMENT, `Nom` varchar(50) NOT NULL, `Prenom` varchar(50) NOT NULL, `DateNaissance` date NOT NULL, @@ -175,15 +195,15 @@ CREATE TABLE IF NOT EXISTS `dossier_inscription` ( DROP TABLE IF EXISTS `inscriptionscompetitions`; CREATE TABLE IF NOT EXISTS `inscriptionscompetitions` ( - `InscriptionID` int(11) NOT NULL, - `AdherentID` int(11) NOT NULL, - `CompetitionID` int(11) NOT NULL, + `InscriptionID` int NOT NULL, + `AdherentID` int NOT NULL, + `CompetitionID` int NOT NULL, `NiveauPratique` varchar(255) DEFAULT NULL, - `ValidationAdmin` tinyint(4) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; + `ValidationAdmin` tinyint DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; -- --- Contenu de la table `inscriptionscompetitions` +-- Déchargement des données de la table `inscriptionscompetitions` -- INSERT INTO `inscriptionscompetitions` (`InscriptionID`, `AdherentID`, `CompetitionID`, `NiveauPratique`, `ValidationAdmin`) VALUES @@ -204,14 +224,14 @@ INSERT INTO `inscriptionscompetitions` (`InscriptionID`, `AdherentID`, `Competit DROP TABLE IF EXISTS `members`; CREATE TABLE IF NOT EXISTS `members` ( - `MemberID` int(11) NOT NULL AUTO_INCREMENT, + `MemberID` int NOT NULL AUTO_INCREMENT, `password` varchar(255) DEFAULT NULL, `login` varchar(255) DEFAULT NULL, PRIMARY KEY (`MemberID`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3; -- --- Contenu de la table `members` +-- Déchargement des données de la table `members` -- INSERT INTO `members` (`MemberID`, `password`, `login`) VALUES @@ -228,15 +248,15 @@ INSERT INTO `members` (`MemberID`, `password`, `login`) VALUES DROP TABLE IF EXISTS `planificationmatchs`; CREATE TABLE IF NOT EXISTS `planificationmatchs` ( - `MatchID` int(11) NOT NULL DEFAULT '0', - `CompetitionID` int(11) NOT NULL DEFAULT '0', + `MatchID` int NOT NULL DEFAULT '0', + `CompetitionID` int NOT NULL DEFAULT '0', `Court` varchar(255) DEFAULT NULL, `Horaire` datetime DEFAULT NULL, - `JoueursNecessaires` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; + `JoueursNecessaires` int DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; -- --- Contenu de la table `planificationmatchs` +-- Déchargement des données de la table `planificationmatchs` -- INSERT INTO `planificationmatchs` (`MatchID`, `CompetitionID`, `Court`, `Horaire`, `JoueursNecessaires`) VALUES @@ -261,16 +281,16 @@ INSERT INTO `planificationmatchs` (`MatchID`, `CompetitionID`, `Court`, `Horaire DROP TABLE IF EXISTS `programme`; CREATE TABLE IF NOT EXISTS `programme` ( - `ProgrammeID` int(11) NOT NULL AUTO_INCREMENT, + `ProgrammeID` int NOT NULL AUTO_INCREMENT, `Nom` varchar(255) NOT NULL, `Description` text, `DateDebut` datetime NOT NULL, `DateFin` datetime NOT NULL, PRIMARY KEY (`ProgrammeID`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3; -- --- Contenu de la table `programme` +-- Déchargement des données de la table `programme` -- INSERT INTO `programme` (`ProgrammeID`, `Nom`, `Description`, `DateDebut`, `DateFin`) VALUES @@ -289,13 +309,13 @@ INSERT INTO `programme` (`ProgrammeID`, `Nom`, `Description`, `DateDebut`, `Date DROP TABLE IF EXISTS `reservationscourts`; CREATE TABLE IF NOT EXISTS `reservationscourts` ( - `ReservationID` int(11) NOT NULL, - `AdherentID` int(11) NOT NULL, + `ReservationID` int NOT NULL, + `AdherentID` int NOT NULL, `HoraireReservation` datetime DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; -- --- Contenu de la table `reservationscourts` +-- Déchargement des données de la table `reservationscourts` -- INSERT INTO `reservationscourts` (`ReservationID`, `AdherentID`, `HoraireReservation`) VALUES @@ -316,14 +336,14 @@ INSERT INTO `reservationscourts` (`ReservationID`, `AdherentID`, `HoraireReserva DROP TABLE IF EXISTS `resultats`; CREATE TABLE IF NOT EXISTS `resultats` ( - `ResultatID` int(11) NOT NULL, - `CompetitionID` int(11) NOT NULL, + `ResultatID` int NOT NULL, + `CompetitionID` int NOT NULL, `Gagnant` varchar(255) DEFAULT NULL, `Score` varchar(255) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; -- --- Contenu de la table `resultats` +-- Déchargement des données de la table `resultats` -- INSERT INTO `resultats` (`ResultatID`, `CompetitionID`, `Gagnant`, `Score`) VALUES @@ -344,12 +364,12 @@ INSERT INTO `resultats` (`ResultatID`, `CompetitionID`, `Gagnant`, `Score`) VALU DROP TABLE IF EXISTS `sponsors`; CREATE TABLE IF NOT EXISTS `sponsors` ( - `idsponsors` int(11) NOT NULL, + `idsponsors` int NOT NULL, `nom` varchar(45) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; -- --- Contenu de la table `sponsors` +-- Déchargement des données de la table `sponsors` -- INSERT INTO `sponsors` (`idsponsors`, `nom`) VALUES @@ -370,7 +390,7 @@ INSERT INTO `sponsors` (`idsponsors`, `nom`) VALUES DROP TABLE IF EXISTS `telechargeable`; CREATE TABLE IF NOT EXISTS `telechargeable` ( - `id` int(11) NOT NULL AUTO_INCREMENT, + `id` int NOT NULL AUTO_INCREMENT, `nom_dossier` varchar(255) NOT NULL, `type_document` varchar(50) NOT NULL, `fichier_path` varchar(255) NOT NULL, @@ -378,13 +398,14 @@ CREATE TABLE IF NOT EXISTS `telechargeable` ( ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; -- --- Contenu de la table `telechargeable` +-- Déchargement des données de la table `telechargeable` -- INSERT INTO `telechargeable` (`id`, `nom_dossier`, `type_document`, `fichier_path`) VALUES (1, 'Dossiers d\'inscription/adhésion', 'PDF', '/chemin/vers/dossier_inscription.pdf'), (2, 'Programmes', 'PDF', '/chemin/vers/programmes.pdf'), (3, 'Calendriers des rencontres', 'PDF', '/chemin/vers/calendriers_rencontres.pdf'); +COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;