Alexandre MOTTIER 1 year ago
parent
commit
ca33c0b233
12 changed files with 784 additions and 84 deletions
  1. 55 25
      ajoutcontact.php
  2. 30 9
      ajoutentreprise.php
  3. 128 0
      creationentretienphy.php
  4. 128 0
      creationentretientel.php
  5. 59 0
      custom.css
  6. 16 3
      index.php
  7. 3 0
      infocontact.php
  8. 69 0
      infoentretien.php
  9. 55 26
      modifcontact.php
  10. 102 0
      modifentretienphy.php
  11. 102 0
      modifentretientel.php
  12. 37 21
      modificationstatut.php

+ 55 - 25
ajoutcontact.php

@@ -1,6 +1,8 @@
 <html>
 <head>
     <title>Ajouter un contact</title>
+    <link href="custom.css" rel="stylesheet">
+    <meta name="viewport" content="width=device-width">
 </head>
 <body>
     <h1>Ajouter un contact</h1>
@@ -18,30 +20,58 @@
         mysqli_query($conn, $sql);
     }
 ?>
-
+<a href="index.php">Revenir à l'accueil</a><br><br>
 <form method="post" action="">
-    <label for="Prenom">Prénom :</label>
-    <input type="text" name="Prenom" required>
-    <br>
-    <label for="Nom">Nom :</label>
-    <input type="text" name="Nom" required>
-    <br>
-    <label for="Poste">Poste occupé :</label>
-    <input type="text" name="Poste" >
-    <br>
-    <label for="Mobile">Numéro de mobile :</label>
-    <input type="text" name="Mobile" >
-    <br>
-    <label for="Entreprise">Entreprise :</label>
-    <select name="IDEntreprise">
-        <?php
-            $sql = "SELECT ID, NomSociete FROM Entreprise";
-            $result = mysqli_query($conn, $sql);
-            while($row = mysqli_fetch_assoc($result)){
-                echo "<option value='" . $row['ID'] . "'>" . $row['NomSociete'] . "</option>";
-            }
-        ?>
-    </select>
-    <br><br>
-    <input type="submit" name="submit" value="Ajouter">
+  <table>
+    <tr>
+      <td>
+        <label for="Prenom">Prénom :</label>
+      </td>
+      <td>
+        <input type="text" name="Prenom" required>
+      </td>
+    </tr>
+    <tr>
+      <td>
+        <label for="Nom">Nom :</label>
+      </td>
+      <td>
+        <input type="text" name="Nom" required>
+      </td>
+    </tr>
+    <tr>
+      <td>
+        <label for="Poste">Poste occupé :</label>
+      </td>
+      <td>
+        <input type="text" name="Poste" >
+      </td>
+    </tr>
+    <tr>
+      <td>
+        <label for="Mobile">Numéro de mobile :</label>
+      </td>
+      <td>
+        <input type="text" name="Mobile" >
+      </td>
+    </tr>
+    <tr>
+      <td>
+        <label for="Entreprise">Entreprise :</label>
+      </td>
+      <td>
+        <select name="IDEntreprise">
+            <?php
+                $sql = "SELECT ID, NomSociete FROM Entreprise";
+                $result = mysqli_query($conn, $sql);
+                while($row = mysqli_fetch_assoc($result)){
+                    echo "<option value='" . $row['ID'] . "'>" . $row['NomSociete'] . "</option>";
+                }
+            ?>
+        </select>
+      </td>
+    </tr>
+  </table>
+  <br>
+  <input type="submit" name="submit" value="Ajouter">
 </form>

+ 30 - 9
ajoutentreprise.php

@@ -1,22 +1,43 @@
 <html>
 <head>
     <title>Ajouter une entreprise</title>
+    <link href="custom.css" rel="stylesheet">
+    <meta name="viewport" content="width=device-width">
 </head>
 <?php
 include("class/sqlconnect.php");
 ?>
 <body>
+    <a href="index.php">Revenir à l'accueil</a><br><br>
     <h1>Ajouter une entreprise</h1>
     <form action="ajoutentreprise.php" method="post">
-        <label for="NomSociete">Nom de la société:</label>
-        <input type="text" id="NomSociete" name="NomSociete" required>
-        <br>
-        <label for="Adresse">Adresse postale de la société:</label>
-        <input type="text" id="Adresse" name="Adresse">
-        <br>
-        <label for="NumeroTel">Numéro de téléphone de la société:</label>
-        <input type="text" id="NumeroTel" name="NumeroTel">
-        <br>
+      <table>
+        <tr>
+          <td>
+            <label for="NomSociete">Nom de la société :</label>
+          </td>
+          <td>
+            <input type="text" id="NomSociete" name="NomSociete" required>
+          </td>
+        </tr>
+        <tr>
+          <td>
+            <label for="Adresse">Adresse postale de la société : (facultatif)</label>
+          </td>
+          <td>
+            <input type="text" id="Adresse" name="Adresse">
+          </td>
+        </tr>
+        <tr>
+          <td>
+            <label for="NumeroTel">Numéro de téléphone de la société : (facultatif)</label>
+          </td>
+          <td>
+            <input type="text" id="NumeroTel" name="NumeroTel">
+          </td>
+        </tr>
+      </table>
+      <br>
         <input type="submit" name="submit" value="Ajouter">
     </form>
     <?php

+ 128 - 0
creationentretienphy.php

@@ -0,0 +1,128 @@
+<?php
+    include 'class/sqlconnect.php';
+    $query = "SELECT ID, NomSociete, Adresse FROM Entreprise";
+    $result = mysqli_query($conn, $query);
+    $options = "";
+    while ($row = mysqli_fetch_assoc($result)) {
+        $options .= "<option value={$row['ID']}>{$row['NomSociete']} - {$row['Adresse']}</option>";
+    }
+
+    $query = "SELECT ID, Prenom, Nom, Mobile, IDEntreprise FROM Contact";
+    $result = mysqli_query($conn, $query);
+    $options2 = "";
+    while ($row = mysqli_fetch_assoc($result)) {
+        $query2 = "SELECT NomSociete FROM Entreprise WHERE ID = {$row['IDEntreprise']}";
+        $result2 = mysqli_query($conn, $query2);
+        $row2 = mysqli_fetch_assoc($result2);
+        $options2 .= "<option value={$row['ID']}>{$row['Prenom']} {$row['Nom']} ({$row['Mobile']}) - {$row2['NomSociete']}</option>";
+    }
+?>
+<!DOCTYPE html>
+<html>
+<head>
+    <link href="custom.css" rel="stylesheet">
+    <title>Création d'un entretien physique/visio</title>
+    <meta name="viewport" content="width=device-width">
+</head>
+<body>
+  <a href="index.php">Revenir à l'accueil</a><br><br>
+  <h1>Création d'un entretien physique/visio</h1>
+    <form action="creationentretienphy.php" method="post">
+      <table style='border:1px solid #000;'>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="idEntreprise">Nom de l'entreprise :</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <select id="idEntreprise" name="idEntreprise">
+            <?php echo $options; ?>
+            </select>
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="idContact">Contact de l'entreprise :</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <select id="idContact" name="idContact">
+            <?php echo $options2; ?>
+            </select>
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="dateHeurePrevueEntretien">Date/heure prévue de l'entretien :</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <input type="datetime-local" id="dateHeurePrevueEntretien" name="dateHeurePrevueEntretien">
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="dateHeureEffectiveEntretien">Date/heure effective de l'entretien :</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <input type="datetime-local" id="dateHeureEffectiveEntretien" name="dateHeureEffectiveEntretien">
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="ponctualiteEntreprise">Ponctualité de l'entreprise :</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <input type="checkbox" id="ponctualiteEntreprise" name="ponctualiteEntreprise">
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="remuneration">Rémunération proposée:</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <input type="text" id="remuneration" name="remuneration" value="<?php echo $remuneration; ?>" >
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="poste">Poste proposé:</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <input type="text" id="poste" name="poste" value="<?php echo $poste; ?>" >
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="suivi">Déroulement et suivi Entretien:</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <textarea id="suivi" name="suivi" value="<?php echo $suivi; ?>" rows="4" cols="50"></textarea>
+          </td>
+        </tr>
+        </table>
+        <br>
+        <input type="submit" value="Enregistrer" name="submit">
+      </form>
+  <?php
+  if (isset($_POST['submit'])) {
+      $idEntreprise = $_POST['idEntreprise'];
+      $idContact = $_POST['idContact'];
+      $dateHeurePrevueEntretien = $_POST['dateHeurePrevueEntretien'];
+      $dateHeureEffectiveEntretien = $_POST['dateHeureEffectiveEntretien'];
+      $ponctualiteEntreprise = $_POST['ponctualiteEntreprise'];
+      $remuneration = $_POST['remuneration'];
+      $poste = $_POST['poste'];
+      $suivi = $_POST['suivi'];
+
+      $sql = "INSERT INTO EntretienPresentiel (IDEntreprise, IDContact, DateHeurePrevueEntretien, DateHeureEffectiveEntretien, PonctualiteEntreprise, Remuneration, PosteAborde, SuiviEntretien)
+      VALUES ('$idEntreprise', '$idContact', '$dateHeurePrevueEntretien', '$dateHeureEffectiveEntretien', '$ponctualiteEntreprise', '$remuneration', '$poste', '$suivi')";
+      
+      if ($conn->query($sql) === TRUE) {
+          echo "L'entretien présentiel a été enregistré avec succès.";
+      } else {
+          echo "Erreur lors de l'enregistrement de l'entretien présentiel: " . $conn->error;
+      }
+  }
+
+  $conn->close();
+  ?>
+</body>
+</html>

+ 128 - 0
creationentretientel.php

@@ -0,0 +1,128 @@
+<?php
+    include 'class/sqlconnect.php';
+    $query = "SELECT ID, NomSociete FROM Entreprise";
+    $result = mysqli_query($conn, $query);
+    $options = "";
+    while ($row = mysqli_fetch_assoc($result)) {
+        $options .= "<option value={$row['ID']}>{$row['NomSociete']}</option>";
+    }
+
+    $query = "SELECT ID, Prenom, Nom, Mobile, IDEntreprise FROM Contact";
+    $result = mysqli_query($conn, $query);
+    $options2 = "";
+    while ($row = mysqli_fetch_assoc($result)) {
+        $query2 = "SELECT NomSociete FROM Entreprise WHERE ID = {$row['IDEntreprise']}";
+        $result2 = mysqli_query($conn, $query2);
+        $row2 = mysqli_fetch_assoc($result2);
+        $options2 .= "<option value={$row['ID']}>{$row['Prenom']} {$row['Nom']} ({$row['Mobile']}) - {$row2['NomSociete']}</option>";
+    }
+?>
+<!DOCTYPE html>
+<html>
+<head>
+    <link href="custom.css" rel="stylesheet">
+    <title>Création d'un entretien téléphonique</title>
+    <meta name="viewport" content="width=device-width">
+</head>
+<body>
+  <a href="index.php">Revenir à l'accueil</a><br><br>
+  <h1>Création d'un entretien téléphonique</h1>
+    <form action="creationentretientel.php" method="post">
+      <table style='border:1px solid #000;'>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="idEntreprise">Nom de l'entreprise :</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <select id="idEntreprise" name="idEntreprise">
+            <?php echo $options; ?>
+            </select>
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="idContact">Contact de l'entreprise :</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <select id="idContact" name="idContact">
+            <?php echo $options2; ?>
+            </select>
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="dateHeurePrevueEntretien">Date/heure prévue de l'entretien :</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <input type="datetime-local" id="dateHeurePrevueEntretien" name="dateHeurePrevueEntretien">
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="dateHeureEffectiveEntretien">Date/heure effective de l'entretien :</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <input type="datetime-local" id="dateHeureEffectiveEntretien" name="dateHeureEffectiveEntretien">
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="ponctualiteEntreprise">Ponctualité de l'entreprise :</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <input type="checkbox" id="ponctualiteEntreprise" name="ponctualiteEntreprise">
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="remuneration">Rémunération proposée:</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <input type="text" id="remuneration" name="remuneration" value="<?php echo $remuneration; ?>" >
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="poste">Poste proposé:</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <input type="text" id="poste" name="poste" value="<?php echo $poste; ?>" >
+          </td>
+        </tr>
+        <tr style='border:1px solid #000;'>
+          <td style='border:1px solid #000;'>
+            <label for="suivi">Déroulement et suivi Entretien :</label>
+          </td>
+          <td style='border:1px solid #000;'>
+            <textarea id="suivi" name="suivi" value="<?php echo $suivi; ?>" rows="4" cols="50"></textarea>
+          </td>
+        </tr>
+        </table>
+        <br>
+        <input type="submit" value="Enregistrer" name="submit">
+      </form>
+  <?php
+  if (isset($_POST['submit'])) {
+      $idEntreprise = $_POST['idEntreprise'];
+      $idContact = $_POST['idContact'];
+      $dateHeurePrevueEntretien = $_POST['dateHeurePrevueEntretien'];
+      $dateHeureEffectiveEntretien = $_POST['dateHeureEffectiveEntretien'];
+      $ponctualiteEntreprise = $_POST['ponctualiteEntreprise'];
+      $remuneration = $_POST['remuneration'];
+      $poste = $_POST['poste'];
+      $suivi = $_POST['suivi'];
+
+      $sql = "INSERT INTO EntretienTelephonique (IDEntreprise, IDContact, DateHeurePrevueEntretien, DateHeureEffectiveEntretien, PonctualiteEntreprise, Remuneration, PosteAborde, SuiviEntretien)
+      VALUES ('$idEntreprise', '$idContact', '$dateHeurePrevueEntretien', '$dateHeureEffectiveEntretien', '$ponctualiteEntreprise', '$remuneration', '$poste', '$suivi')";
+      
+      if ($conn->query($sql) === TRUE) {
+          echo "L'entretien téléphonique a été enregistré avec succès.";
+      } else {
+          echo "Erreur lors de l'enregistrement de l'entretien téléphonique: " . $conn->error;
+      }
+  }
+
+  $conn->close();
+  ?>
+</body>
+</html>

+ 59 - 0
custom.css

@@ -0,0 +1,59 @@
+/* Importation de la police Poppins depuis Google Fonts */
+@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
+@import url('https://fonts.googleapis.com/css2?family=Ubuntu&display=swap');
+
+/* Définition de la couleur bleue pour les tableaux et le fond */
+.table {
+    background-color: #87CEEB;
+    color: #FFFFFF;
+    border: 1px solid #000;
+    font-family: 'Poppins', sans-serif;
+}
+body {
+  background-color: #003153; /* Couleur fond */
+  font-family: 'Poppins', sans-serif; /* Police Poppins */
+  color: #ABCFED; /* Couleur texte */
+}
+a {
+    /* Propriétés de base des liens */
+    color: #4A9FE8; /* Couleur du texte */
+    text-decoration: none; /* Supprime la surbrillance */
+    font-family: 'Poppins', sans-serif; /* Change la police */
+}
+
+footer {
+   position: absolute;
+   bottom: 10;
+   width: 100%;
+}
+
+
+a:hover {
+    /* Propriétés lorsque la souris est sur le lien */
+    color: #FFFF00; /* Change la couleur du texte */
+    text-decoration: underline; /* Ajoute une soulignement */
+    background-color: #003153; /* Change la couleur de fond */
+}
+
+
+/* Définition de la couleur jaune pour le texte */
+.table th, .table td {
+    color: #FFFF00;
+    text-align: left;
+    padding: 8px;
+}
+
+/* Ajout d'un peu d'espacement entre les cellules */
+.table td, .table th, .table tr {
+    border: 1px solid #000;
+    padding: 8px;
+}
+
+/* Ajout d'un peu de relief aux cellules survolées */
+.table tr:hover {background-color: #f5f5f5;}
+
+/* Alignement du texte dans les cellules */
+.table th, .table td {
+    text-align: left;
+    padding: 8px;
+}

+ 16 - 3
index.php

@@ -1,9 +1,12 @@
 <html>
 <head>
-    <title>Liste des entreprises</title>
+  <title>Utilitaire de recherche d'emploi - Liste des entreprises</title>
+  <link href="custom.css" rel="stylesheet">
+  <meta name="viewport" content="width=device-width">
 </head>
 <body>
-    <h1>Liste des entreprises</h1>
+    <h1>Utilitaire PHP de Recherche d'Emploi</h1>
+    <h2>Liste des entreprises</h2>
 <?php
 ini_set('display_errors', 1);
 ini_set('display_startup_errors', 1);
@@ -22,13 +25,14 @@ if (!$result) {
 }
 
 echo "<table style='border:1px solid #000;'>";
-echo "<tr><th style='border:1px solid #000;'>Nom de la société</th><th style='border:1px solid #000;'>Contact</th><th style='border:1px solid #000;'>Adresse</th><th style='border:1px solid #000;'>Statut</th></tr>";
+echo "<tr><th style='border:1px solid #000;'>Nom de la société</th><th style='border:1px solid #000;'>Contact</th><th style='border:1px solid #000;'>Adresse</th><th style='border:1px solid #000;'>Statut</th><th style='border:1px solid #000;'>Entretiens</th></tr>";
 while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
     echo "<tr>";
     echo "<td style='border:1px solid #000;'>" . $row['NomSociete'] . "</td>";
     echo "<td style='border:1px solid #000;'>" . "<a href='infocontact.php?ID=" . $row['ID'] . "'>" . $row['Prenom'] . ' ' . $row['Nom'] . "</a>" . "</td>";
     echo "<td style='border:1px solid #000;'>" . $row['Adresse'] . "</td>";
     echo "<td style='border:1px solid #000;'>" . $row['Statut'] . "</td>";
+    echo "<td style='border:1px solid #000;'>" . "<a href='infoentretien.php?ID=" . $row['ID'] . "'>Afficher les entretiens</a>" . "</td>";
     echo '</tr>';
 }
 echo "</table>";
@@ -38,3 +42,12 @@ mysqli_close($conn);
 <button onclick="window.location.href='ajoutentreprise.php'" class="button">Créer une entreprise</button>
 <button onclick="window.location.href='ajoutcontact.php'" class="button">Créer un contact</button>
 <button onclick="window.location.href='modificationstatut.php'" class="button">Modifier le statut pour une entreprise</button>
+<br><br>
+<a href="creationentretientel.php">Saisir un entretien téléphonique</a><br>
+<a href="creationentretienphy.php">Saisir un entretien présentiel/visio</a>
+
+<footer>
+<a href="https://github.com/alexandremottier/PHP-RechercheEmploi" target="_blank">Made with love by Aiden ♥️</a>
+</footer>
+</body>
+</html>

+ 3 - 0
infocontact.php

@@ -1,8 +1,11 @@
 <html>
 <head>
     <title>Afficher un contact</title>
+    <link href="custom.css" rel="stylesheet">
+    <meta name="viewport" content="width=device-width">
 </head>
 <body>
+    <a href="index.php">Revenir à l'accueil</a><br><br>
     <h1>Afficher un contact</h1>
 <?php
 include('class/sqlconnect.php');

+ 69 - 0
infoentretien.php

@@ -0,0 +1,69 @@
+<html>
+<head>
+    <title>Afficher les entretiens</title>
+    <link href="custom.css" rel="stylesheet">
+    <meta name="viewport" content="width=device-width">
+</head>
+<?php
+include('class/sqlconnect.php');
+$id = $_GET['ID'];
+$sql = "SELECT NomSociete FROM Entreprise JOIN Contact ON Entreprise.ID = Contact.IDEntreprise WHERE Contact.ID =$id";
+$result = mysqli_query($conn, $sql);
+if ($result) {
+    $row = mysqli_fetch_assoc($result);
+}
+$conn->close();
+?>
+<body>
+    <a href="index.php">Revenir à l'accueil</a><br><br>
+    <h1>Afficher les entretiens<br>Société <?php echo $row['NomSociete'] ?></h1>
+<?php
+include('class/sqlconnect.php');
+$id = $_GET['ID'];
+?>
+<h2>Entretien téléphonique</h2>
+<?php
+
+$sql = "SELECT EntretienTelephonique.DateHeurePrevueEntretien, EntretienTelephonique.DateHeureEffectiveEntretien, EntretienTelephonique.PonctualiteEntreprise, EntretienTelephonique.Remuneration, EntretienTelephonique.PosteAborde, EntretienTelephonique.SuiviEntretien FROM EntretienTelephonique JOIN Contact ON EntretienTelephonique.IDContact = Contact.ID WHERE Contact.ID =$id";
+$result = mysqli_query($conn, $sql);
+echo "<table style='border:1px solid #000;'>";
+if ($result->num_rows > 0) {
+while($row = $result->fetch_assoc()) {
+        echo "<tr><td style='border:1px solid #000;'>Date/heure prévue entretien :</td><td style='border:1px solid #000;'>" . $row["DateHeurePrevueEntretien"] . "</td></tr>";
+        echo "<tr><td style='border:1px solid #000;'>Date/heure effective entretien :</td><td style='border:1px solid #000;'>" . $row["DateHeureEffectiveEntretien"] . "</td></tr>";
+        echo "<tr><td style='border:1px solid #000;'>Entreprise ponctuelle :</td><td style='border:1px solid #000;'>" . $row["PonctualiteEntreprise"] . "</td></tr>";
+        echo "<tr><td style='border:1px solid #000;'>Rémunération abordée :</td><td style='border:1px solid #000;'>" . $row["Remuneration"] . "</td></tr>";
+        echo "<tr><td style='border:1px solid #000;'>Poste abordé :</td><td style='border:1px solid #000;'>" . $row["PosteAborde"] . "</td></tr>";
+        echo "<tr><td style='border:1px solid #000;'>Suivi entretien :</td><td style='border:1px solid #000;'>" . $row["SuiviEntretien"] . "</td></tr>";
+        echo "<br><button onclick='window.location.href=`modifentretientel.php?ID=" . $id . "`' class='button'>Modifier l'entretien</button>";
+    };
+  } else {
+    echo "<tr colspan='4'><td>Pas de résultat</td></tr>";
+  }
+$conn->close();
+?>
+</table>
+<br>
+<h2>Entretien physique/visio</h2>
+<?php
+include('class/sqlconnect.php');
+$id = $_GET['ID'];
+$sql = "SELECT EntretienPresentiel.DateHeurePrevueEntretien, EntretienPresentiel.DateHeureEffectiveEntretien, EntretienPresentiel.PonctualiteEntreprise, EntretienPresentiel.Remuneration, EntretienPresentiel.PosteAborde, EntretienPresentiel.SuiviEntretien FROM EntretienPresentiel JOIN Contact ON EntretienPresentiel.IDContact = Contact.ID WHERE Contact.ID =$id";
+$result = mysqli_query($conn, $sql);
+echo "<table style='border:1px solid #000;'>";
+if ($result->num_rows > 0) {
+while($row = $result->fetch_assoc()) {
+        echo "<tr><td style='border:1px solid #000;'>Date/heure prévue entretien :</td><td style='border:1px solid #000;'>" . $row["DateHeurePrevueEntretien"] . "</td></tr>";
+        echo "<tr><td style='border:1px solid #000;'>Date/heure effective entretien :</td><td style='border:1px solid #000;'>" . $row["DateHeureEffectiveEntretien"] . "</td></tr>";
+        echo "<tr><td style='border:1px solid #000;'>Entreprise ponctuelle :</td><td style='border:1px solid #000;'>" . $row["PonctualiteEntreprise"] . "</td></tr>";
+        echo "<tr><td style='border:1px solid #000;'>Rémunération abordée :</td><td style='border:1px solid #000;'>" . $row["Remuneration"] . "</td></tr>";
+        echo "<tr><td style='border:1px solid #000;'>Poste abordé :</td><td style='border:1px solid #000;'>" . $row["PosteAborde"] . "</td></tr>";
+        echo "<tr><td style='border:1px solid #000;'>Suivi entretien :</td><td style='border:1px solid #000;'>" . $row["SuiviEntretien"] . "</td></tr>";
+        echo "<br><button onclick='window.location.href=`modifentretienphy.php?ID=" . $id . "`' class='button'>Modifier l'entretien</button>";
+    };
+  } else {
+    echo "<tr colspan='4'><td>Pas de résultat</td></tr>";
+  }
+$conn->close();
+?>
+</table>

+ 55 - 26
modifcontact.php

@@ -1,6 +1,8 @@
 <html>
 <head>
     <title>Modifier un contact</title>
+    <link href="custom.css" rel="stylesheet">
+    <meta name="viewport" content="width=device-width">
 </head>
 <body>
     <h1>Modifier un contact</h1>
@@ -13,33 +15,60 @@
 ?>
 
 <form action="modifcontact.php" method="post">
-    <input type="hidden" name="ID" value="<?php echo $id; ?>">
-    <label>Prénom :</label>
-    <input type="text" name="Prenom" value="<?php echo $row['Prenom']; ?>">
-    <br>
-    <label>Nom :</label>
-    <input type="text" name="Nom" value="<?php echo $row['Nom']; ?>">
-    <br>
-    <label>Poste :</label>
-    <input type="text" name="Poste" value="<?php echo $row['Poste']; ?>">
-    <br>
-    <label>Entreprise :</label>
-    <select name="IDEntreprise">
-        <?php
-            $sql = "SELECT * FROM Entreprise";
-            $result = $conn->query($sql);
-            while ($entreprise = $result->fetch_assoc()) {
-                if ($entreprise['ID'] == $row['IDEntreprise']) {
-                    echo "<option value='" . $entreprise['ID'] . "' selected>" . $entreprise['NomSociete'] . "</option>";
-                } else {
-                    echo "<option value='" . $entreprise['ID'] . "'>" . $entreprise['NomSociete'] . "</option>";
+  <table>
+    <tr>
+      <td>
+        <input type="hidden" name="ID" value="<?php echo $id; ?>">
+        <label>Prénom :</label>
+      </td>
+      <td>
+        <input type="text" name="Prenom" value="<?php echo $row['Prenom']; ?>">
+      </td>
+    </tr>
+    <tr>
+      <td>
+        <label>Nom :</label>
+      </td>
+      <td>
+        <input type="text" name="Nom" value="<?php echo $row['Nom']; ?>">
+      </td>
+    <tr>
+      <td>
+        <label>Poste :</label>
+      </td>
+      <td>
+        <input type="text" name="Poste" value="<?php echo $row['Poste']; ?>">
+      </td>
+    </tr>
+    <tr>
+      <td>
+        <label>Entreprise :</label>
+      </td>
+      <td>
+        <select name="IDEntreprise">
+            <?php
+                $sql = "SELECT * FROM Entreprise";
+                $result = $conn->query($sql);
+                while ($entreprise = $result->fetch_assoc()) {
+                    if ($entreprise['ID'] == $row['IDEntreprise']) {
+                        echo "<option value='" . $entreprise['ID'] . "' selected>" . $entreprise['NomSociete'] . "</option>";
+                    } else {
+                        echo "<option value='" . $entreprise['ID'] . "'>" . $entreprise['NomSociete'] . "</option>";
+                    }
                 }
-            }
-        ?>
-    </select>
-    <br>
-    <label>Numéro de mobile :</label>
-    <input type="text" name="Mobile" value="<?php echo $row['Mobile']; ?>">
+            ?>
+        </select>
+      </td>
+    </tr>
+    <tr>
+      <td>
+        <label>Numéro de mobile :</label>
+      </td>
+      <td>
+        <input type="text" name="Mobile" value="<?php echo $row['Mobile']; ?>">
+      </td>
+    </tr>
+    </table>
     <br>
     <input type="submit" name="submit" value="Enregistrer les modifications">
 </form>

+ 102 - 0
modifentretienphy.php

@@ -0,0 +1,102 @@
+<html>
+<head>
+    <title>Modifier un entretien présentiel/visio</title>
+    <link href="custom.css" rel="stylesheet">
+    <meta name="viewport" content="width=device-width">
+</head>
+<?php
+include('class/sqlconnect.php');
+$id = $_GET['ID'];
+$sql = "SELECT NomSociete FROM Entreprise JOIN Contact ON Entreprise.ID = Contact.IDEntreprise WHERE Contact.ID =$id";
+$result = mysqli_query($conn, $sql);
+if ($result) {
+    $row = mysqli_fetch_assoc($result);
+}
+$conn->close();
+?>
+<body>
+    <h1>Modifier un entretien présentiel/visio<br>Société <?php echo $row['NomSociete'] ?></h1>
+<?php
+    include('class/sqlconnect.php');
+    $id = $_GET['ID'];
+    $sql = "SELECT * FROM EntretienPresentiel JOIN Contact ON EntretienPresentiel.IDContact = Contact.ID WHERE Contact.ID = '$id'";
+    $result = $conn->query($sql);
+    $row = $result->fetch_assoc();
+?>
+<a href="index.php">Revenir à l'accueil</a><br><br>
+<form action="modifentretienphy.php" method="post">
+  <table style='border:1px solid #000;'>
+      <tr style='border:1px solid #000;'>
+        <td style='border:1px solid #000;'>
+          <input type="hidden" name="ID" value="<?php echo $id; ?>">
+          <label for="DateHeurePrevueEntretien">Date/heure prévue de l'entretien :</label>
+        </td>
+        <td style='border:1px solid #000;'>
+          <input type="datetime-local" id="DateHeurePrevueEntretien" name="DateHeurePrevueEntretien" value="<?php echo $row['DateHeurePrevueEntretien']; ?>">
+        </td>
+      </tr>
+      <tr style='border:1px solid #000;'>
+        <td style='border:1px solid #000;'>
+          <label for="DateHeureEffectiveEntretien">Date/heure effective de l'entretien :</label>
+        </td>
+        <td style='border:1px solid #000;'>
+          <input type="datetime-local" id="DateHeureEffectiveEntretien" name="DateHeureEffectiveEntretien" value="<?php echo $row['DateHeureEffectiveEntretien']; ?>">
+        </td>
+      </tr>
+      <tr style='border:1px solid #000;'>
+        <td style='border:1px solid #000;'>
+          <label for="PonctualiteEntreprise">Ponctualité de l'entreprise :</label>
+        </td>
+        <td style='border:1px solid #000;'>
+          <input type="checkbox" id="PonctualiteEntreprise" name="PonctualiteEntreprise" value="1" <?php if ($row['PonctualiteEntreprise'] == 1) echo "checked"; ?>>
+        </td>
+      </tr>
+      <tr style='border:1px solid #000;'>
+        <td style='border:1px solid #000;'>
+          <label for="Remuneration">Rémunération proposée:</label>
+        </td>
+        <td style='border:1px solid #000;'>
+          <input type="text" id="Remuneration" name="Remuneration" value="<?php echo $row['Remuneration']; ?>">
+        </td>
+      </tr>
+      <tr style='border:1px solid #000;'>
+        <td style='border:1px solid #000;'>
+          <label for="Poste">Poste proposé:</label>
+        </td>
+        <td style='border:1px solid #000;'>
+          <input type="text" id="Poste" name="Poste" value="<?php echo $row['Poste']; ?>">
+        </td>
+      </tr>
+      <tr style='border:1px solid #000;'>
+        <td style='border:1px solid #000;'>
+          <label for="Suivi">Déroulement et suivi Entretien :</label>
+        </td>
+        <td style='border:1px solid #000;'>
+          <textarea id="Suivi" name="Suivi"><?php echo $row['SuiviEntretien']; ?></textarea>
+        </td>
+      </tr>
+    </table>
+    <br>
+    <input type="submit" name="submit" value="Enregistrer les modifications">
+</form>
+
+<?php
+if (isset($_POST['submit'])) {
+    $id = $_POST['ID'];
+    $dateHeurePrevueEntretien = $_POST['DateHeurePrevueEntretien'];
+    $dateHeureEffectiveEntretien = $_POST['DateHeureEffectiveEntretien'];
+    $ponctualiteEntreprise = $_POST['PonctualiteEntreprise'];
+    $remuneration = $_POST['Remuneration'];
+    $poste = $_POST['Poste'];
+    $suivi = $_POST['Suivi'];
+
+$sql = "UPDATE EntretienPresentiel SET DateHeurePrevueEntretien='$dateHeurePrevueEntretien', DateHeureEffectiveEntretien='$dateHeureEffectiveEntretien', PonctualiteEntreprise='$ponctualiteEntreprise', Remuneration='$remuneration', PosteAborde='$poste', SuiviEntretien='$suivi' WHERE IDContact='$id'";
+
+if ($conn->query($sql) === TRUE) {
+    echo "L'entretien a été modifié avec succès";
+    header("refresh:1; url=index.php");
+} else {
+    echo "Erreur lors de la modification : " . $conn->error;
+}
+}
+?>

+ 102 - 0
modifentretientel.php

@@ -0,0 +1,102 @@
+<html>
+<head>
+    <title>Modifier un entretien téléphonique</title>
+    <link href="custom.css" rel="stylesheet">
+    <meta name="viewport" content="width=device-width">
+</head>
+<?php
+include('class/sqlconnect.php');
+$id = $_GET['ID'];
+$sql = "SELECT NomSociete FROM Entreprise JOIN Contact ON Entreprise.ID = Contact.IDEntreprise WHERE Contact.ID =$id";
+$result = mysqli_query($conn, $sql);
+if ($result) {
+    $row = mysqli_fetch_assoc($result);
+}
+$conn->close();
+?>
+<body>
+    <h1>Modifier un entretien téléphonique<br>Société <?php echo $row['NomSociete'] ?></h1>
+<?php
+    include('class/sqlconnect.php');
+    $id = $_GET['ID'];
+    $sql = "SELECT * FROM EntretienTelephonique JOIN Contact ON EntretienTelephonique.IDContact = Contact.ID WHERE Contact.ID = '$id'";
+    $result = $conn->query($sql);
+    $row = $result->fetch_assoc();
+?>
+<a href="index.php">Revenir à l'accueil</a><br><br>
+<form action="modifentretientel.php" method="post">
+  <table style='border:1px solid #000;'>
+      <tr style='border:1px solid #000;'>
+        <td style='border:1px solid #000;'>
+          <input type="hidden" name="ID" value="<?php echo $id; ?>">
+          <label for="DateHeurePrevueEntretien">Date/heure prévue de l'entretien :</label>
+        </td>
+        <td style='border:1px solid #000;'>
+          <input type="datetime-local" id="DateHeurePrevueEntretien" name="DateHeurePrevueEntretien" value="<?php echo $row['DateHeurePrevueEntretien']; ?>">
+        </td>
+      </tr>
+      <tr style='border:1px solid #000;'>
+        <td style='border:1px solid #000;'>
+          <label for="DateHeureEffectiveEntretien">Date/heure effective de l'entretien :</label>
+        </td>
+        <td style='border:1px solid #000;'>
+          <input type="datetime-local" id="DateHeureEffectiveEntretien" name="DateHeureEffectiveEntretien" value="<?php echo $row['DateHeureEffectiveEntretien']; ?>">
+        </td>
+      </tr>
+      <tr style='border:1px solid #000;'>
+        <td style='border:1px solid #000;'>
+          <label for="PonctualiteEntreprise">Ponctualité de l'entreprise :</label>
+        </td>
+        <td style='border:1px solid #000;'>
+          <input type="checkbox" id="PonctualiteEntreprise" name="PonctualiteEntreprise" value="1" <?php if ($row['PonctualiteEntreprise'] == 1) echo "checked"; ?>>
+        </td>
+      </tr>
+      <tr style='border:1px solid #000;'>
+        <td style='border:1px solid #000;'>
+          <label for="Remuneration">Rémunération proposée:</label>
+        </td>
+        <td style='border:1px solid #000;'>
+          <input type="text" id="Remuneration" name="Remuneration" value="<?php echo $row['Remuneration']; ?>">
+        </td>
+      </tr>
+      <tr style='border:1px solid #000;'>
+        <td style='border:1px solid #000;'>
+          <label for="Poste">Poste proposé:</label>
+        </td>
+        <td style='border:1px solid #000;'>
+          <input type="text" id="Poste" name="Poste" value="<?php echo $row['PosteAborde']; ?>">
+        </td>
+      </tr>
+      <tr style='border:1px solid #000;'>
+        <td style='border:1px solid #000;'>
+          <label for="Suivi">Déroulement et suivi Entretien :</label>
+        </td>
+        <td style='border:1px solid #000;'>
+          <textarea id="Suivi" name="Suivi"><?php echo $row['SuiviEntretien']; ?></textarea>
+        </td>
+      </tr>
+    </table>
+    <br>
+    <input type="submit" name="submit" value="Enregistrer les modifications">
+</form>
+
+<?php
+if (isset($_POST['submit'])) {
+    $id = $_POST['ID'];
+    $dateHeurePrevueEntretien = $_POST['DateHeurePrevueEntretien'];
+    $dateHeureEffectiveEntretien = $_POST['DateHeureEffectiveEntretien'];
+    $ponctualiteEntreprise = $_POST['PonctualiteEntreprise'];
+    $remuneration = $_POST['Remuneration'];
+    $poste = $_POST['Poste'];
+    $suivi = $_POST['Suivi'];
+
+$sql = "UPDATE EntretienTelephonique SET DateHeurePrevueEntretien='$dateHeurePrevueEntretien', DateHeureEffectiveEntretien='$dateHeureEffectiveEntretien', PonctualiteEntreprise='$ponctualiteEntreprise', Remuneration='$remuneration', PosteAborde='$poste', SuiviEntretien='$suivi' WHERE IDContact='$id'";
+
+if ($conn->query($sql) === TRUE) {
+    echo "L'entretien a été modifié avec succès";
+    header("refresh:1; url=index.php");
+} else {
+    echo "Erreur lors de la modification : " . $conn->error;
+}
+}
+?>

+ 37 - 21
modificationstatut.php

@@ -2,33 +2,49 @@
 <html>
 <head>
     <title>Modification statut entretien</title>
+    <link href="custom.css" rel="stylesheet">
+    <meta name="viewport" content="width=device-width">
 </head>
 <?php
 include("class/sqlconnect.php");
 ?>
 <body>
+  <a href="index.php">Revenir à l'accueil</a><br><br>
     <form action="modificationstatut.php" method="post">
-        <label for="entreprise">Entreprise</label>
-        <select name="entreprise" id="entreprise">
-            <?php
-                $sql = "SELECT ID, NomSociete FROM Entreprise";
-                $result = mysqli_query($conn, $sql);
-                while($row = mysqli_fetch_assoc($result)){
-                    echo "<option value='" . $row['ID'] . "'>" . $row['NomSociete'] . "</option>";
-                }
-            ?>
-        </select>
-        <br>
-        <label for="statut">Statut d'entretien</label>
-        <select name="statut" id="statut">
-            <?php
-                $sql = "SELECT ID, Statut FROM StatutEntretien";
-                $result = mysqli_query($conn, $sql);
-                while($row = mysqli_fetch_assoc($result)){
-                    echo "<option value='" . $row['ID'] . "'>" . $row['Statut'] . "</option>";
-                }
-            ?>
-        </select>
+      <table>
+        <tr>
+          <td>
+            <label for="entreprise">Entreprise</label>
+          </td>
+          <td>
+            <select name="entreprise" id="entreprise">
+                <?php
+                    $sql = "SELECT ID, NomSociete FROM Entreprise";
+                    $result = mysqli_query($conn, $sql);
+                    while($row = mysqli_fetch_assoc($result)){
+                        echo "<option value='" . $row['ID'] . "'>" . $row['NomSociete'] . "</option>";
+                    }
+                ?>
+            </select>
+          </td>
+        </tr>
+        <tr>
+          <td>
+            <label for="statut">Statut d'entretien</label>
+          </td>
+          <td>
+            <select name="statut" id="statut">
+                <?php
+                    $sql = "SELECT ID, Statut FROM StatutEntretien";
+                    $result = mysqli_query($conn, $sql);
+                    while($row = mysqli_fetch_assoc($result)){
+                        echo "<option value='" . $row['ID'] . "'>" . $row['Statut'] . "</option>";
+                    }
+                ?>
+            </select>
+          </td>
+        </tr>
+      </table>
         <br>
         <input type="submit" name="submit" value="Modifier statut">
     </form>