diff --git a/WEB/index.html b/WEB/index.html deleted file mode 100755 index 766401d..0000000 --- a/WEB/index.html +++ /dev/null @@ -1,368 +0,0 @@ - - - - - - Apache2 Debian Default Page: It works - - - -
- - -
- - -
-
- It works! -
-
-

- This is the default welcome page used to test the correct - operation of the Apache2 server after installation on Debian systems. - If you can read this page, it means that the Apache HTTP server installed at - this site is working properly. You should replace this file (located at - /var/www/html/index.html) before continuing to operate your HTTP server. -

- - -

- If you are a normal user of this web site and don't know what this page is - about, this probably means that the site is currently unavailable due to - maintenance. - If the problem persists, please contact the site's administrator. -

- -
-
-
- Configuration Overview -
-
-

- Debian's Apache2 default configuration is different from the - upstream default configuration, and split into several files optimized for - interaction with Debian tools. The configuration system is - fully documented in - /usr/share/doc/apache2/README.Debian.gz. Refer to this for the full - documentation. Documentation for the web server itself can be - found by accessing the manual if the apache2-doc - package was installed on this server. - -

-

- The configuration layout for an Apache2 web server installation on Debian systems is as follows: -

-
-/etc/apache2/
-|-- apache2.conf
-|       `--  ports.conf
-|-- mods-enabled
-|       |-- *.load
-|       `-- *.conf
-|-- conf-enabled
-|       `-- *.conf
-|-- sites-enabled
-|       `-- *.conf
-          
-
    -
  • - apache2.conf is the main configuration - file. It puts the pieces together by including all remaining configuration - files when starting up the web server. -
  • - -
  • - ports.conf is always included from the - main configuration file. It is used to determine the listening ports for - incoming connections, and this file can be customized anytime. -
  • - -
  • - Configuration files in the mods-enabled/, - conf-enabled/ and sites-enabled/ directories contain - particular configuration snippets which manage modules, global configuration - fragments, or virtual host configurations, respectively. -
  • - -
  • - They are activated by symlinking available - configuration files from their respective - *-available/ counterparts. These should be managed - by using our helpers - - a2enmod, - a2dismod, - - - a2ensite, - a2dissite, - - and - - a2enconf, - a2disconf - . See their respective man pages for detailed information. -
  • - -
  • - The binary is called apache2. Due to the use of - environment variables, in the default configuration, apache2 needs to be - started/stopped with /etc/init.d/apache2 or apache2ctl. - Calling /usr/bin/apache2 directly will not work with the - default configuration. -
  • -
-
- -
-
- Document Roots -
- -
-

- By default, Debian does not allow access through the web browser to - any file apart of those located in /var/www, - public_html - directories (when enabled) and /usr/share (for web - applications). If your site is using a web document root - located elsewhere (such as in /srv) you may need to whitelist your - document root directory in /etc/apache2/apache2.conf. -

-

- The default Debian document root is /var/www/html. You - can make your own virtual hosts under /var/www. This is different - to previous releases which provides better security out of the box. -

-
- -
-
- Reporting Problems -
-
-

- Please use the reportbug tool to report bugs in the - Apache2 package with Debian. However, check existing bug reports before reporting a new bug. -

-

- Please report bugs specific to modules (such as PHP and others) - to respective packages, not to the web server itself. -

-
- - - - -
-
-
-
- - - diff --git a/WEB/tableauBord/tableauBord.php b/WEB/tableauBord/tableauBord.php index 32c4bed..5dafd9f 100644 --- a/WEB/tableauBord/tableauBord.php +++ b/WEB/tableauBord/tableauBord.php @@ -5,6 +5,25 @@ $db = connexionBD(); init(); + $matricule = isset($_POST['matricule']) ? $_POST['matricule'] : NULL; //recuperation valeur formulaire, isset pour eviter l'erreur "Notice: Undefined index" + $marque = isset($_POST['marque']) ? $_POST['marque'] : NULL; + $modele = isset($_POST['modele']) ? $_POST['modele'] : NULL; + $nbplaces = isset($_POST['nbplaces']) ? $_POST['nbplaces'] : NULL; + $anneefab = isset($_POST['anneefab']) ? $_POST['anneefab'] : NULL; + + if(isset($_POST['submitadd'])) + { + addVoiture($matricule, $marque, $modele, $nbplaces, $anneefab); + } + if(isset($_POST['submitchange'])) + { + changeVoiture($matricule, $marque, $modele, $nbplaces, $anneefab); + } + if(isset($_POST['submitshow'])) + { + showVoiture(); + } + function init(){ session_start(); global $mail; @@ -87,6 +106,33 @@ return "../imageProfil/default.svg"; } + function addVoiture($matricule, $marque, $modele, $nbplaces, $anneefab){ + global $db; + $requete = "INSERT INTO public.voiture (matricule, marque, modele, nbplaces, anneefab, mail) VALUES ('".$matricule."','".$marque."','".$modele."','".$nbplaces."','".$anneefab."','".$_SESSION['mail']."');"; + pg_query($db, $requete); + } + + function changeVoiture($matricule, $marque, $modele, $nbplaces, $anneefab){ + global $db; + $requete = "UPDATE public.voiture SET (matricule, marque, modele, nbplaces, anneefab) = ('".$matricule."','".$marque."','".$modele."','".$nbplaces."','".$anneefab."') WHERE mail = '".$_SESSION['mail']."';"; + echo "requete =".$requete; + pg_query($db, $requete); + } + + function showVoiture(){ + global $db; + $requete = "SELECT * FROM public.voiture WHERE voiture.mail = '".$_SESSION['mail']."';"; + if($donnees = pg_query($db, $requete)){ + while($res = pg_fetch_assoc($donnees)){ + echo "matricule = ".$res['matricule']."
"; + echo "marque = ".$res['marque']."
"; + echo "modele = ".$res['modele']."
"; + echo "nombre de places = ".$res['nbplaces']."
"; + echo "année de fabrication = ".$res['anneefab']."
"; + } + } + } + ?> @@ -96,18 +142,25 @@ Tableau de bord + + -

Bienvenue

@@ -136,7 +189,57 @@

Vous avez avis non lus.

+
+
+ Ajouter une voiture + Modifier ma voiture + Afficher ma voiture +
+
+ + + + + + - \ No newline at end of file + diff --git a/WEB/voiture/fonctionsVoiture.php b/WEB/voiture/fonctionsVoiture.php deleted file mode 100644 index ecb8d49..0000000 --- a/WEB/voiture/fonctionsVoiture.php +++ /dev/null @@ -1,65 +0,0 @@ -"; - echo "marque = ".$res['marque']."
"; - echo "modele = ".$res['modele']."
"; - echo "nombre de places = ".$res['nbplaces']."
"; - echo "année de fabrication = ".$res['anneefab']."
"; - } - } -} -?> diff --git a/WEB/voiture/index.html b/WEB/voiture/index.html deleted file mode 100644 index 593f0f7..0000000 --- a/WEB/voiture/index.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - Tableau de bord - - - - -
-
- Ajouter une voiture - Modifier ma voiture - Afficher ma voiture -
-
- - - - - - - - diff --git a/WEB/voiture/old/Modifier_vehicule.css b/WEB/voiture/old/Modifier_vehicule.css deleted file mode 100644 index bc70881..0000000 --- a/WEB/voiture/old/Modifier_vehicule.css +++ /dev/null @@ -1,33 +0,0 @@ -.centrage{ - text-align : center; - font-size: 20px; - } - -.global { - position: absolute; /* postulat de départ */ - top: 45%; left: 50%; /* à 50%/50% du parent référent */ - transform: translate(-50%, -50%); /* décalage de 50% de sa propre taille */ - text-align : center; - - } - -.fort { - - font-weight: bold; - text-align : center; - text-decoration: underline; - font-size : 30px; - - } - -.bord{ - - border-radius: 20px; - border-left: 2px solid black; - border-right: 2px solid black; - border-top: 2px solid black; - border-bottom: 2px solid black; - padding : 20px 85px 60px 80px; - - } - \ No newline at end of file diff --git a/WEB/voiture/old/Modifier_vehicule.php b/WEB/voiture/old/Modifier_vehicule.php deleted file mode 100644 index a5fa64f..0000000 --- a/WEB/voiture/old/Modifier_vehicule.php +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - -
-

Modification du vehicule

-
-

-

-

-

-

-

-
-
- - diff --git a/WEB/voiture/old/addVoiture.php b/WEB/voiture/old/addVoiture.php deleted file mode 100644 index f95cd99..0000000 --- a/WEB/voiture/old/addVoiture.php +++ /dev/null @@ -1,37 +0,0 @@ - diff --git a/WEB/voiture/old/changeVoiture.php b/WEB/voiture/old/changeVoiture.php deleted file mode 100644 index ebdfe4a..0000000 --- a/WEB/voiture/old/changeVoiture.php +++ /dev/null @@ -1,39 +0,0 @@ - diff --git a/WEB/voiture/old/showVoiture.php b/WEB/voiture/old/showVoiture.php deleted file mode 100644 index e0b5e15..0000000 --- a/WEB/voiture/old/showVoiture.php +++ /dev/null @@ -1,31 +0,0 @@ - diff --git a/WEB/voiture/tableauBord.css b/WEB/voiture/tableauBord.css deleted file mode 100644 index 081f4c0..0000000 --- a/WEB/voiture/tableauBord.css +++ /dev/null @@ -1,128 +0,0 @@ -*{ - margin: 0; - padding: 0; - font-family: "Calibri Light"; -} - -h1{ - font-size: 3em; - text-align: center; - text-decoration: underline; -} - -#content{ - min-width: 320px; - width: 100%; - display: flex; - flex-wrap: nowrap; - justify-content: center; - align-items: center; -} - -#tableauBord{ - margin: 2em; - padding: 1em; - width: 100%; -} - -.menu { - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: center; - background-color: rgb(65, 154, 28); -} - -.menuItem { - display: flex; - flex-wrap: nowrap; - align-items: center; - justify-content: center; - color: white; - width: 10%; - min-width: 5em; - font-weight: bold; - text-decoration: none; - padding: 0.8em; - border-bottom: 4px solid rgb(65, 154, 28); - font-size: 1.1em; - text-align: center; -} - -.menuItem:hover{ - cursor: pointer; - border-bottom: 4px solid orange; -} - -#divImgProfil{ - width: 100%; - display: flex; - flex-wrap: nowrap; - justify-content: center; -} - -#imgProfil{ - background-color: white; - margin-top: 2.5em; - width: 60%; - height: 60%; - max-width: 210px; - max-height: 210px; - border-radius: 10px; -} - -#trajet{ - margin-top: 2em; - display: flex; - flex-wrap: wrap; - flex-direction: row; - justify-content: center; - text-align: center; - width: 100%; -} - -.btnTrajet{ - display: flex; - flex-wrap: nowrap; - justify-content: center; - align-items: center; - text-decoration: none; - padding: 0.4em; - color: black; - background-color: lightgray; - border: 1px solid black; - -} - -.btnTrajet:hover{ - background-color: grey; -} - -#btnTrajet2{ - margin-left: 10%; -} - -#recap{ - margin-top: 2.5em; - width: 50%; - margin-left: 50%; - transform: translate(-50%); -} - -.recapLine{ - margin-bottom: 1.5em; - display: flex; - flex-wrap: nowrap; - justify-content: left; - align-items: center; - width: 100%; -} - -.recapIcon{ - width: 50px; - height: 50px; -} - -p{ - margin-left: 10%; -} \ No newline at end of file