Compare commits
2 Commits
2de154611e
...
moha
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f24918f10 | |||
| d7c3cfb0a1 |
@@ -4,8 +4,9 @@
|
|||||||
-- > Le jeu de caractères utilisé est utf8.
|
-- > Le jeu de caractères utilisé est utf8.
|
||||||
-- =====================================================================================================
|
-- =====================================================================================================
|
||||||
-- set names 'utf8';
|
-- set names 'utf8';
|
||||||
Drop database if exists gsbbdcr;
|
DROP DATABASE IF EXISTS bdgsb;
|
||||||
USE gsbbdcr;
|
CREATE DATABASE `bdgsb` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
USE bdgsb;
|
||||||
-- ----------------------------------------------------------------------------------------------
|
-- ----------------------------------------------------------------------------------------------
|
||||||
create table FAMILLE(fCode VARCHAR(3) not null,fLibelle VARCHAR(83),primary key(fCode)) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
create table FAMILLE(fCode VARCHAR(3) not null,fLibelle VARCHAR(83),primary key(fCode)) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
||||||
--
|
--
|
||||||
@@ -21,7 +22,7 @@ create table TYPE_PRATICIEN(tCode VARCHAR(2) not null,tLibelle VARCHAR(31),tLieu
|
|||||||
--
|
--
|
||||||
create table VISITEUR(vNum INT NOT NULL, vNom VARCHAR(25), vPrenom VARCHAR(25), vIdentifiant VARCHAR(30), vMdp VARCHAR(20), PRIMARY KEY (vNum)) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
create table VISITEUR(vNum INT NOT NULL, vNom VARCHAR(25), vPrenom VARCHAR(25), vIdentifiant VARCHAR(30), vMdp VARCHAR(20), PRIMARY KEY (vNum)) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
||||||
--
|
--
|
||||||
create table AVIS(aCode INT AUTO_INCREMENT, mDepotLegal VARCHAR(10) NOT NULL, aAuteur INT NOT NULL, aContenu TEXT NOT NULL, aDate DATE, PRIMARY KEY (aCode)) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
create table AVIS(aCode INT AUTO_INCREMENT, mDepotLegal VARCHAR(10) NOT NULL, aAuteur INT NOT NULL, aContenu TEXT NOT NULL, aDate DATE DEFAULT CURRENT_DATE, PRIMARY KEY (aCode)) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
||||||
--
|
--
|
||||||
create table VISITE(visiteId int not null, visiteDate date, visiteMotif varchar(50), visiteCompteRendu varchar(1200), dateCompteRendu DATE, praticienNum int not null, visiteurNum int, depotLegal1 varchar(10), depotLegal2 varchar(10), primary key(visiteId)) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
create table VISITE(visiteId int not null, visiteDate date, visiteMotif varchar(50), visiteCompteRendu varchar(1200), dateCompteRendu DATE, praticienNum int not null, visiteurNum int, depotLegal1 varchar(10), depotLegal2 varchar(10), primary key(visiteId)) ENGINE=INNODB DEFAULT CHARSET=utf8;
|
||||||
-- ----------------------------------------------------------------------------------------------
|
-- ----------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Dba\Connection;
|
|
||||||
|
|
||||||
class connexionSQL {
|
|
||||||
private static ?connexionSQL $instance = null;
|
|
||||||
private $ip = '10.121.38.71';
|
|
||||||
private $user = 'devEmile';
|
|
||||||
private $pass = 'ileane69b';
|
|
||||||
private $database = 'gsbbdcr';
|
|
||||||
|
|
||||||
|
|
||||||
private function __construct()
|
|
||||||
{
|
|
||||||
$this->creerConnexion($this->ip, $this->database, $this->user, $this->pass);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function creerConnexion($serveur , $bdd , $nomUtilisateur , $motPasse) {
|
|
||||||
// Définition de la source des données pour PDO
|
|
||||||
$dsn = "mysql:host=$serveur;dbname=$bdd;charset=utf8mb4";
|
|
||||||
// Création de l'objet $dbh, de type PDO, qui est la ressource d'accès à la base
|
|
||||||
try {
|
|
||||||
$dbh = new PDO($dsn, $nomUtilisateur, $motPasse);
|
|
||||||
}
|
|
||||||
catch (PDOException $e) {
|
|
||||||
die("Erreur de connexion : ".$e->getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getInstance(){
|
|
||||||
if(self::$instance == null)
|
|
||||||
{
|
|
||||||
echo "Bonjour";
|
|
||||||
self::$instance = new connexionSQL();
|
|
||||||
}
|
|
||||||
return self::$instance;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,12 +1,8 @@
|
|||||||
|
|
||||||
;Connexion base de données
|
;Connexion base de données
|
||||||
[databaseServer]
|
|
||||||
driver = "mysql"
|
|
||||||
dbHost = "localhost"
|
|
||||||
dbName = "bdgsb"
|
|
||||||
charset = "utf8mb4"
|
|
||||||
username = "root"
|
|
||||||
passwd = "root"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
0
Modele/connexionBdd.php
Normal file
0
Modele/connexionBdd.php
Normal file
@@ -98,3 +98,8 @@ body {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type="text"], input[type="password"] {
|
||||||
|
width: 300px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
require('./../Database/connexionBdd.php');
|
|
||||||
|
|
||||||
var_dump(connexionSQL::getInstance());
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>GSB Application - Accueil</title>
|
<title>GSB Application - Connexion</title>
|
||||||
<link rel="stylesheet" href="../Styles\style.css">
|
<link rel="stylesheet" href="../Styles/style.css">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4Q6Gf2aSP4eDXB8Miphtr37CMZZQ5oXLH2yaXMJ2w8e2ZtHTl7GptT4jmndRuHDT" crossorigin="anonymous">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4Q6Gf2aSP4eDXB8Miphtr37CMZZQ5oXLH2yaXMJ2w8e2ZtHTl7GptT4jmndRuHDT" crossorigin="anonymous">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Barlow&family=Cormorant+Garamond:ital@1&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Barlow&family=Cormorant+Garamond:ital@1&display=swap" rel="stylesheet">
|
||||||
<link rel="icon" href="../Images\logodetoure.gif" type="image/png">
|
<link rel="icon" href="../Images/logodetoure.gif" type="image/png">
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
font-family: 'Barlow', sans-serif;
|
font-family: 'Barlow', sans-serif;
|
||||||
@@ -26,6 +26,21 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="main-content">
|
<main class="main-content">
|
||||||
|
<h2>Connexion à l'application</h2>
|
||||||
|
<br>
|
||||||
|
<form action="connexionVerif.php" method="POST" onsubmit="return validateForm()">
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="username" class="form-label">Nom d'utilisateur</label>
|
||||||
|
<input type="text" class="form-control" id="username" name="username" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="password" class="form-label">Mot de passe</label>
|
||||||
|
<input type="password" class="form-control" id="password" name="password" required>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<button type="submit" class="btn btn-primary">Se connecter</button>
|
||||||
|
</form>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer class="main-footer">
|
<footer class="main-footer">
|
||||||
|
|||||||
Reference in New Issue
Block a user