From 100a5505dfc90d0e6ea9913838f34da1d3b8e594 Mon Sep 17 00:00:00 2001 From: Alexandre MOTTIER Date: Mon, 14 Oct 2024 14:03:15 +0200 Subject: [PATCH] First --- LICENSE | 8 ++ README.md | 31 ++++++- ajoutcontact.php | 116 ++++++++++++++++++++++++++ ajoutentreprise.php | 89 ++++++++++++++++++++ class/class.modifcontact.php | 20 +++++ class/sqlconnect.php | 13 +++ creationentretienphy.php | 155 +++++++++++++++++++++++++++++++++++ creationentretientel.php | 155 +++++++++++++++++++++++++++++++++++ custom.css | 72 ++++++++++++++++ index.php | 112 +++++++++++++++++++++++++ infocontact.php | 42 ++++++++++ infoentretien.php | 111 +++++++++++++++++++++++++ login.php | 36 ++++++++ logout.php | 5 ++ modifcontact.php | 114 ++++++++++++++++++++++++++ modifentreprise.php | 100 ++++++++++++++++++++++ modifentretienphy.php | 141 +++++++++++++++++++++++++++++++ modifentretientel.php | 141 +++++++++++++++++++++++++++++++ modifprofil.php | 101 +++++++++++++++++++++++ rechercheemploi.sql | 111 +++++++++++++++++++++++++ register.php | 92 +++++++++++++++++++++ verify.php | 36 ++++++++ 22 files changed, 1800 insertions(+), 1 deletion(-) create mode 100644 LICENSE create mode 100644 ajoutcontact.php create mode 100644 ajoutentreprise.php create mode 100644 class/class.modifcontact.php create mode 100644 class/sqlconnect.php create mode 100644 creationentretienphy.php create mode 100644 creationentretientel.php create mode 100644 custom.css create mode 100644 index.php create mode 100644 infocontact.php create mode 100644 infoentretien.php create mode 100644 login.php create mode 100644 logout.php create mode 100644 modifcontact.php create mode 100644 modifentreprise.php create mode 100644 modifentretienphy.php create mode 100644 modifentretientel.php create mode 100644 modifprofil.php create mode 100644 rechercheemploi.sql create mode 100644 register.php create mode 100644 verify.php diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..472ac23 --- /dev/null +++ b/LICENSE @@ -0,0 +1,8 @@ +MIT License +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index b6ea4d3..f2f0f57 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,31 @@ -# PHP-RechercheEmploi +# Outil PHP de recherche d’emploi +![https://badgen.net/github/release/alexandremottier/PHP-RechercheEmploi](https://badgen.net/github/release/alexandremottier/PHP-RechercheEmploi) + +Cet outil PHP, installable sur votre propre serveur web, est destiné à vous aider à gérer votre recherche d'emploi. + +Étant moi-même en recherche d'emploi à l'heure où j'écris ces lignes, je déplorais qu'il n'y ait pas d'outil simple, pratique, auto-hébergeable et open-source qui permette de conserver les interactions avec les entreprises et les détails sur la recherche d'emploi. + +J'ai donc créé cet outil, très simple, qui permet de remplir les fonctions suivantes : + +- Ajouter une entreprise (nom de l'entreprise, adresse postale et numéro de téléphone) +- Ajouter un contact (prénom, nom, poste occupé et numéro de mobile) +- Saisir les entretiens téléphoniques et présentiels (ou visio) en ayant la possibilité de faire un bref compte rendu sur votre entretien, mais aussi d'évaluer la ponctualité de l'entreprise en notant l'heure prévue de l'entretien, mais aussi l'heure effective de l'entretien. +- Enfin, il permet de saisir le statut de l'échange avec l'entreprise pour avoir les informations les plus pertinentes sur votre recherche d'emploi d'un seul coup d'oeil ! + +## Personnalisation + +L'outil est personnalisable : Il vous suffit de saisir vos informations dans le fichier `config.php` entre les guillemets et le système adaptera l'en-tête à votre effigie. De quoi briller lors de l'entretien ! + +## Responsive + +Le design du site s'adapte parfaitement aux écrans des mobiles et tablettes. + +Vous pouvez donc vous rendre en entretien en emportant uniquement votre tablette pour compléter la fiche d'entretien ! Pratique ! + +## Pour le tester + +Une instance de test est disponible [ICI](https://demo.am-networks.fr/RechercheEmploi) ! À vous d'étudier l'outil et de vous amuser ! +(Mais pensez à préparer vos entretiens quand même !) + +Bonne utilisation ! diff --git a/ajoutcontact.php b/ajoutcontact.php new file mode 100644 index 0000000..74a3b8c --- /dev/null +++ b/ajoutcontact.php @@ -0,0 +1,116 @@ + + + Ajouter un contact + + + + +

Ajouter un contact

+setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("SELECT ID FROM users WHERE username = :username"); + $stmt->bindParam(':username', $_SESSION['username']); + $stmt->execute(); + + $result = $stmt->fetch(PDO::FETCH_ASSOC); + $idsession = $result['ID']; + +} catch (PDOException $e) { + echo "Error: " . $e->getMessage(); +} +$conn = null; + include 'class/sqlconnect.php'; + + if(isset($_POST['submit'])){ + $prenom = $_POST['Prenom']; + $nom = $_POST['Nom']; + $poste = $_POST['Poste']; + $poste = htmlentities($poste); + $poste = str_replace("'", "\'", $poste); + $mobile = $_POST['Mobile']; + $entreprise = $_POST['IDEntreprise']; + $mail = $_POST['Mail']; + + $sql = "INSERT INTO Contact (Prenom, Nom, Poste, Mobile, IDEntreprise, IDUser, Mail) VALUES ('$prenom', '$nom', '$poste', '$mobile', '$entreprise', '$idsession', '$mail')"; + mysqli_query($conn, $sql); + } +?> +Revenir à l'accueil

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+
+ +
+ + diff --git a/ajoutentreprise.php b/ajoutentreprise.php new file mode 100644 index 0000000..3f7cfc7 --- /dev/null +++ b/ajoutentreprise.php @@ -0,0 +1,89 @@ + + + Ajouter une entreprise + + + +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("SELECT ID FROM users WHERE username = :username"); + $stmt->bindParam(':username', $_SESSION['username']); + $stmt->execute(); + + $result = $stmt->fetch(PDO::FETCH_ASSOC); + $idsession = $result['ID']; + +} catch (PDOException $e) { + echo "Error: " . $e->getMessage(); +} +$conn = null; +} +include("class/sqlconnect.php"); +?> + + Revenir à l'accueil

+

Ajouter une entreprise

+
+ + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+
+ +
+ " . mysqli_error($conn); + } + } + ?> diff --git a/class/class.modifcontact.php b/class/class.modifcontact.php new file mode 100644 index 0000000..d02eb3b --- /dev/null +++ b/class/class.modifcontact.php @@ -0,0 +1,20 @@ +query($sql) === TRUE) { + echo "Le contact a été modifié avec succès"; + echo $sql; + // header("refresh:1; url=infocontact.php?ID=".$id); +} else { + echo "Erreur lors de la modification : " . $conn->error; +} +} +?> diff --git a/class/sqlconnect.php b/class/sqlconnect.php new file mode 100644 index 0000000..5938d2b --- /dev/null +++ b/class/sqlconnect.php @@ -0,0 +1,13 @@ +connect_error) { + die("La connexion à la base de données a échoué : " . $conn->connect_error); +} + +?> diff --git a/creationentretienphy.php b/creationentretienphy.php new file mode 100644 index 0000000..b395d7f --- /dev/null +++ b/creationentretienphy.php @@ -0,0 +1,155 @@ + +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("SELECT ID FROM users WHERE username = :username"); + $stmt->bindParam(':username', $_SESSION['username']); + $stmt->execute(); + + $result = $stmt->fetch(PDO::FETCH_ASSOC); + $idsession = $result['ID']; + +} catch (PDOException $e) { + echo "Error: " . $e->getMessage(); +} +$conn = null; + include 'class/sqlconnect.php'; + $query = "SELECT ID, NomSociete, Adresse FROM Entreprise WHERE UserID =" . $idsession . ";"; + $result = mysqli_query($conn, $query); + $options = ""; + while ($row = mysqli_fetch_assoc($result)) { + $options .= ""; + } + + $query = "SELECT ID, Prenom, Nom, Mobile, IDEntreprise FROM Contact WHERE IDUser =" . $idsession . ";"; + $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 .= ""; + } +?> + + + + + Création d'un entretien physique/visio + + + + Revenir à l'accueil

+

Création d'un entretien physique/visio

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+
+ +
+ query($sql) === TRUE) { + echo "L'entretien présentiel a été enregistré avec succès."; + header("refresh:1; url=index.php"); + } else { + echo "Erreur lors de l'enregistrement de l'entretien présentiel: " . $conn->error; + } + } + + $conn->close(); + ?> + + diff --git a/creationentretientel.php b/creationentretientel.php new file mode 100644 index 0000000..68e322c --- /dev/null +++ b/creationentretientel.php @@ -0,0 +1,155 @@ + +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("SELECT ID FROM users WHERE username = :username"); + $stmt->bindParam(':username', $_SESSION['username']); + $stmt->execute(); + + $result = $stmt->fetch(PDO::FETCH_ASSOC); + $idsession = $result['ID']; + +} catch (PDOException $e) { + echo "Error: " . $e->getMessage(); +} +$conn = null; + include 'class/sqlconnect.php'; + $query = "SELECT ID, NomSociete FROM Entreprise WHERE UserID =" . $idsession . ";"; + $result = mysqli_query($conn, $query); + $options = ""; + while ($row = mysqli_fetch_assoc($result)) { + $options .= ""; + } + + $query = "SELECT ID, Prenom, Nom, Mobile, IDEntreprise FROM Contact WHERE IDUser =" . $idsession . ";"; + $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 .= ""; + } +?> + + + + + Création d'un entretien téléphonique + + + + Revenir à l'accueil

+

Création d'un entretien téléphonique

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+
+ +
+ query($sql) === TRUE) { + echo "L'entretien téléphonique a été enregistré avec succès."; + header("refresh:1; url=index.php"); + } else { + echo "Erreur lors de l'enregistrement de l'entretien téléphonique: " . $conn->error; + } + } + + $conn->close(); + ?> + + diff --git a/custom.css b/custom.css new file mode 100644 index 0000000..5798ad5 --- /dev/null +++ b/custom.css @@ -0,0 +1,72 @@ +/* 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 { + border-collapse: collapse; + background-color: #003153; + color: #FFFFFF; + border: 1px solid #FFF; + font-family: 'Poppins', sans-serif; +} +td { + border: 1px solid; + border-color: rgb(255, 255, 255); +} +tr { + border: 1px solid; + border-color: rgb(255, 255, 255); +} +th { + border: 1px solid; + border-color: rgb(255, 255, 255); +} +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; +} */ diff --git a/index.php b/index.php new file mode 100644 index 0000000..108dd66 --- /dev/null +++ b/index.php @@ -0,0 +1,112 @@ + + + Utilitaire de recherche d'emploi - Liste des entreprises + + + setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("SELECT first_name, last_name, profession, ID FROM users WHERE username = :username"); + $stmt->bindParam(':username', $_SESSION['username']); + $stmt->execute(); + + $result = $stmt->fetch(PDO::FETCH_ASSOC); + $prenom = $result['first_name']; + $nom = $result['last_name']; + $profession = $result['profession']; + $idsession = $result['ID']; + +} catch (PDOException $e) { + echo "Error: " . $e->getMessage(); +} +$conn = null; +?> + + + + +
+ + Poste recherché :
+
Se déconnecter - Modifier votre profil - Développé avec amour par Aiden ♥️ +

+ Votre recherche d'emploi - Liste de vos entreprises +

Ci-dessous se trouve la liste de vos entreprises ainsi que le suivi de vos échanges (contacts, entretiens, statuts de vos candidatures). +
Vous pouvez ajouter un nombre illimité d'entreprises, mais vous ne pourrez pas en supprimer (en raison des dépendances avec les entretiens et les contacts). +
En cas de problème, vous pouvez contacter l'équipe support. +
En cas de bug applicatif, vous pouvez créer une issue sur GitHub. +

+
+"; +echo "SociétéContactAdresseStatutEntretiens"; +while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { + if (!empty($row['Mobile'])) { + $mobile = strval($row["Mobile"]); + $mobile = substr($mobile, 0, 2) . "." . substr($mobile, 2, 2) . "." . substr($mobile, 4, 2) . "." . substr($mobile, 6, 2) . "." . substr($mobile, 8, 2); + $mobile = ' 
(' . $mobile . ')'; + } else { + $mobile = ''; + } + echo ""; + echo "" . " " . $row['NomSociete'] . " "; + echo "" . " " . $row['Prenom'] . ' ' . $row['Nom'] . ' ' . $mobile . ""; + echo " " . $row['Adresse'] . " "; + echo " " . $row['Statut'] . " "; + echo "" . " Afficher les entretiens "; + echo ''; +} + +echo ""; +mysqli_close($conn); +?> +
+ +Créer une entreprise -  +Créer un contact -  +Créer un entretien téléphonique -  +Créer un entretien présentiel ou visio + +

+ + diff --git a/infocontact.php b/infocontact.php new file mode 100644 index 0000000..3d48b00 --- /dev/null +++ b/infocontact.php @@ -0,0 +1,42 @@ + + + Afficher un contact + + + + + + + Revenir à l'accueil

+

Afficher un contact

+"; +while($row = $result->fetch_assoc()) { + $mobile = strval($row["Mobile"]); + $mobile2 = substr($mobile, 0, 2) . "." . substr($mobile, 2, 2) . "." . substr($mobile, 4, 2) . "." . substr($mobile, 6, 2) . "." . substr($mobile, 8, 2); + echo "Prénom :" . $row["Prenom"] . ""; + echo "Nom :" . $row["Nom"] . ""; + echo "Poste :" . $row["Poste"] . ""; + echo "Entreprise :" . $row["NomSociete"] . ""; + echo "Numéro de mobile :" . $mobile2 . ""; + echo "Adresse e-mail :" . $row["Mail"] . ""; + }; +$conn->close(); +?> + +

+ diff --git a/infoentretien.php b/infoentretien.php new file mode 100644 index 0000000..93fe950 --- /dev/null +++ b/infoentretien.php @@ -0,0 +1,111 @@ + + + Afficher les entretiens + + + + + +close(); +include('class/sqlconnect.php'); +$sql2 = "SELECT Prenom, Nom FROM Contact WHERE Contact.ID =$id"; +$result2 = mysqli_query($conn, $sql2); +if ($result2) { + $row2 = mysqli_fetch_assoc($result2); +$conn->close(); +} +?> + + Revenir à l'accueil

+
+ Afficher les entretiens + Société
+ Votre interlocuteur(trice) : +
+ +

Entretien téléphonique

+"; +if ($result->num_rows > 0) { +while($row = $result->fetch_assoc()) { + $suivi = $row['SuiviEntretien']; + $suivi = html_entity_decode($suivi); + $suivi = nl2br($suivi); + $newdatepre = date("d/m/Y H:i", strtotime($row["DateHeurePrevueEntretien"])); + $newdateeff = date("d/m/Y H:i", strtotime($row["DateHeureEffectiveEntretien"])); + if ($row["PonctualiteEntreprise"] == 1) { + $ponctualite = "OUI"; + } else { + $ponctualite = "NON"; + }; + echo "  Date/heure prévue entretien    " . $newdatepre . "  "; + echo "  Date/heure effective entretien    " . $newdateeff . "  "; + echo "  Entreprise ponctuelle    " . $ponctualite . "  "; + echo "  Rémunération abordée    " . $row["Remuneration"] . "  "; + echo "  Poste abordé    " . $row["PosteAborde"] . "  "; + echo "  Déroulement et suivi entretien  " . $suivi . ""; + echo "
Modifier l'entretien"; + }; + } else { + echo "  Pas de résultat  "; + } +$conn->close(); +?> + +
+

Entretien présentiel/visio

+"; +if ($result->num_rows > 0) { +while($row = $result->fetch_assoc()) { + $suivi = $row['SuiviEntretien']; + $suivi = html_entity_decode($suivi); + $suivi = nl2br($suivi); + $newdatepre = date("d/m/Y H:i", strtotime($row["DateHeurePrevueEntretien"])); + $newdateeff = date("d/m/Y H:i", strtotime($row["DateHeureEffectiveEntretien"])); + if ($row["PonctualiteEntreprise"] == 1) { + $ponctualite = "OUI"; + } else { + $ponctualite = "NON"; + }; + echo "  Date/heure prévue entretien    " . $newdatepre . "  "; + echo "  Date/heure effective entretien    " . $newdateeff . "  "; + echo "  Entreprise ponctuelle    " . $ponctualite . "  "; + echo "  Rémunération abordée    " . $row["Remuneration"] . "  "; + echo "  Poste abordé    " . $row["PosteAborde"] . "  "; + echo "  Déroulement et suivi entretien  " . $suivi . ""; + echo "
Modifier l'entretien"; + }; + } else { + echo "  Pas de résultat  "; + } +$conn->close(); +?> + + + diff --git a/login.php b/login.php new file mode 100644 index 0000000..248c104 --- /dev/null +++ b/login.php @@ -0,0 +1,36 @@ + + + + Gestionnaire de recherche d'emploi - Connexion + + + + +

Gestionnaire de recherche d'emploi - Connexion

+

Contrôle d'identité ! Vous devez vous connecter pour accéder à cette page !

+
+ + + + + + + + + +
+ + + +
+ + + +
+
+ +


+ Si vous n'avez pas encore de compte, vous pouvez en créer un gratuitement !
+ Si vous avez perdu vos identifiants, vous pouvez envoyer un mail à l'équipe support en indiquant votre identifiant ainsi que vos noms et prénoms ! + + diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..08891f6 --- /dev/null +++ b/logout.php @@ -0,0 +1,5 @@ + diff --git a/modifcontact.php b/modifcontact.php new file mode 100644 index 0000000..b6b9d5c --- /dev/null +++ b/modifcontact.php @@ -0,0 +1,114 @@ + + + Modifier un contact + + + + + + +

Modifier un contact

+query($sql); + $row = $result->fetch_assoc(); +?> +Revenir à l'accueil

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+
+ +
+ +query($sql) === TRUE) { + echo "Le contact a été modifié avec succès"; + header("refresh:1; url=infocontact.php?ID=".$id); +} else { + echo "Erreur lors de la modification : " . $conn->error; +} +} +?> diff --git a/modifentreprise.php b/modifentreprise.php new file mode 100644 index 0000000..4af50b7 --- /dev/null +++ b/modifentreprise.php @@ -0,0 +1,100 @@ + + + Modifier une entreprise + + + + + + +
+ Modifier une entreprise + query($sql); + $row = $result->fetch_assoc(); + $entreprise_id = $row['StatutEntretien']; + ?> + Société +

+Revenir à l'accueil

+
+ + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ + + +
+ + + +
+
+ +
+ +query($sql) === TRUE) { + echo "La société a été modifiée avec succès"; + header("Location: index.php"); +} else { + echo "Erreur lors de la modification : " . $conn->error; +} +} +?> diff --git a/modifentretienphy.php b/modifentretienphy.php new file mode 100644 index 0000000..f543037 --- /dev/null +++ b/modifentretienphy.php @@ -0,0 +1,141 @@ + + + Modifier un entretien présentiel/visio + + + + + +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("SELECT ID FROM users WHERE username = :username"); + $stmt->bindParam(':username', $_SESSION['username']); + $stmt->execute(); + + $result = $stmt->fetch(PDO::FETCH_ASSOC); + $idsession = $result['ID']; + +} catch (PDOException $e) { + echo "Error: " . $e->getMessage(); +} +$conn = null; +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(); +include('class/sqlconnect.php'); +$sql2 = "SELECT Prenom, Nom FROM Contact WHERE Contact.ID =$id"; +$result2 = mysqli_query($conn, $sql2); +if ($result2) { + $row2 = mysqli_fetch_assoc($result2); +$conn->close(); +} +?> + + Revenir à l'accueil

+
+ Modifier un entretien présentiel/visio + Société
+ Votre interlocuteur(trice) : +

+query($sql); + $row = $result->fetch_assoc(); +?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ + + > +
+ + + +
+ + + +
+ + + + +
+
+ +
+ +query($sql) === TRUE) { + echo "L'entretien a été modifié avec succès"; + header("Location: infoentretien.php?ID=" . $id); +} else { + echo "Erreur lors de la modification : " . $conn->error; +} +} +?> diff --git a/modifentretientel.php b/modifentretientel.php new file mode 100644 index 0000000..62a1d62 --- /dev/null +++ b/modifentretientel.php @@ -0,0 +1,141 @@ + + + Modifier un entretien téléphonique + + + + + +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("SELECT ID FROM users WHERE username = :username"); + $stmt->bindParam(':username', $_SESSION['username']); + $stmt->execute(); + + $result = $stmt->fetch(PDO::FETCH_ASSOC); + $idsession = $result['ID']; + +} catch (PDOException $e) { + echo "Error: " . $e->getMessage(); +} +$conn = null; +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(); +include('class/sqlconnect.php'); +$sql2 = "SELECT Prenom, Nom FROM Contact WHERE Contact.ID =$id"; +$result2 = mysqli_query($conn, $sql2); +if ($result2) { + $row2 = mysqli_fetch_assoc($result2); +$conn->close(); +} +?> + + Revenir à l'accueil

+
+ Modifier un entretien téléphonique + Société
+ Votre interlocuteur(trice) : +

+query($sql); + $row = $result->fetch_assoc(); +?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ + + > +
+ + + +
+ + + +
+ + + + +
+
+ +
+ +query($sql) === TRUE) { + echo "L'entretien a été modifié avec succès"; + header("Location: infoentretien.php?ID=" . $id); +} else { + echo "Erreur lors de la modification : " . $conn->error; +} +} +?> diff --git a/modifprofil.php b/modifprofil.php new file mode 100644 index 0000000..efd47d1 --- /dev/null +++ b/modifprofil.php @@ -0,0 +1,101 @@ + + + Modifier votre profil + + + + + +

Modifier votre profil

+setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + $stmt = $conn->prepare("SELECT first_name, last_name, profession, ID, password FROM users WHERE username = :username"); + $stmt->bindParam(':username', $_SESSION['username']); + $stmt->execute(); + + $result = $stmt->fetch(PDO::FETCH_ASSOC); + $prenom = $result['first_name']; + $nom = $result['last_name']; + $profession = $result['profession']; + $idsession = $result['ID']; + +} catch (PDOException $e) { + echo "Error: " . $e->getMessage(); +} +?> +Revenir à l'accueil

+
+ + + + + + + + + + + + + + + + +
+ + + + +
+ + + +
+ + + +
+ + + +
+
+ +
+ +connect_error) { + die("La connexion à la base de données a échoué : " . $conn->connect_error); +} + +if(isset($_POST['submit'])) { + $id = $_POST['ID']; + $prenom = $_POST['first_name']; + $nom = $_POST['last_name']; + $profession = $_POST['profession']; + $password = $_POST['password']; + + $sql = "UPDATE users SET first_name='$prenom', last_name='$nom', profession='$profession', password='$password' WHERE ID='$id'"; + + if ($conn->query($sql) === TRUE) { + echo "Votre profil a été modifié avec succès"; + header("refresh:1; url=index.php"); + } else { + echo "Votre profil a été modifié avec succès"; + header("refresh:1; url=index.php"); + } +} +?> diff --git a/rechercheemploi.sql b/rechercheemploi.sql new file mode 100644 index 0000000..ab58535 --- /dev/null +++ b/rechercheemploi.sql @@ -0,0 +1,111 @@ +-- Adminer 4.7.7 MySQL dump + +SET NAMES utf8; +SET time_zone = '+00:00'; +SET foreign_key_checks = 0; + +SET NAMES utf8mb4; + +DROP DATABASE IF EXISTS `prod_rechercheemploi`; +CREATE DATABASE `prod_rechercheemploi` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */; +USE `prod_rechercheemploi`; + +DROP TABLE IF EXISTS `Contact`; +CREATE TABLE `Contact` ( + `ID` int(3) NOT NULL AUTO_INCREMENT, + `IDEntreprise` int(5) DEFAULT NULL, + `Prenom` varchar(255) NOT NULL, + `Nom` varchar(255) NOT NULL, + `Poste` varchar(255) DEFAULT NULL, + `Mobile` varchar(10) DEFAULT NULL, + `Mail` varchar(100) DEFAULT NULL, + PRIMARY KEY (`ID`), + KEY `IDEntreprise` (`IDEntreprise`), + CONSTRAINT `Contact_ibfk_1` FOREIGN KEY (`IDEntreprise`) REFERENCES `Entreprise` (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + + +DROP TABLE IF EXISTS `Entreprise`; +CREATE TABLE `Entreprise` ( + `ID` int(5) NOT NULL AUTO_INCREMENT, + `NomSociete` varchar(255) NOT NULL, + `Contact` int(3) DEFAULT NULL, + `Adresse` varchar(255) DEFAULT NULL, + `NumeroTel` varchar(255) DEFAULT NULL, + `StatutEntretien` int(2) DEFAULT NULL, + PRIMARY KEY (`ID`), + KEY `Contact` (`Contact`), + CONSTRAINT `Entreprise_ibfk_1` FOREIGN KEY (`Contact`) REFERENCES `Contact` (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + + +DROP TABLE IF EXISTS `EntretienPresentiel`; +CREATE TABLE `EntretienPresentiel` ( + `IDEntretienP` int(3) NOT NULL AUTO_INCREMENT, + `IDEntreprise` int(5) NOT NULL, + `IDContact` int(3) NOT NULL, + `DateHeurePrevueEntretien` varchar(30) DEFAULT NULL, + `DateHeureEffectiveEntretien` varchar(30) DEFAULT NULL, + `PonctualiteEntreprise` binary(1) DEFAULT NULL, + `Remuneration` varchar(255) DEFAULT NULL, + `PosteAborde` varchar(255) DEFAULT NULL, + `SuiviEntretien` longtext DEFAULT NULL, + PRIMARY KEY (`IDEntretienP`), + UNIQUE KEY `IDEntreprise` (`IDEntreprise`), + UNIQUE KEY `IDContact` (`IDContact`), + CONSTRAINT `EntretienPresentiel_ibfk_1` FOREIGN KEY (`IDEntreprise`) REFERENCES `Entreprise` (`ID`), + CONSTRAINT `EntretienPresentiel_ibfk_2` FOREIGN KEY (`IDContact`) REFERENCES `Contact` (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + + +DROP TABLE IF EXISTS `EntretienTelephonique`; +CREATE TABLE `EntretienTelephonique` ( + `IDEntretienT` int(3) NOT NULL AUTO_INCREMENT, + `IDEntreprise` int(5) NOT NULL, + `IDContact` int(3) NOT NULL, + `DateHeurePrevueEntretien` varchar(30) DEFAULT NULL, + `DateHeureEffectiveEntretien` varchar(30) DEFAULT NULL, + `PonctualiteEntreprise` binary(1) DEFAULT NULL, + `Remuneration` varchar(255) DEFAULT NULL, + `PosteAborde` varchar(255) DEFAULT NULL, + `SuiviEntretien` longtext DEFAULT NULL, + PRIMARY KEY (`IDEntretienT`), + UNIQUE KEY `IDEntreprise` (`IDEntreprise`), + UNIQUE KEY `IDContact` (`IDContact`), + CONSTRAINT `EntretienTelephonique_ibfk_1` FOREIGN KEY (`IDEntreprise`) REFERENCES `Entreprise` (`ID`), + CONSTRAINT `EntretienTelephonique_ibfk_2` FOREIGN KEY (`IDContact`) REFERENCES `Contact` (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + + +DROP TABLE IF EXISTS `StatutEntretien`; +CREATE TABLE `StatutEntretien` ( + `ID` int(2) NOT NULL AUTO_INCREMENT, + `Statut` varchar(255) NOT NULL, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +INSERT INTO `StatutEntretien` (`ID`, `Statut`) VALUES +(1, 'OFFRE REFUSÉE'), +(2, 'EN ATTENTE CRÉNEAU ENTRETIEN TÉLÉPHONIQUE'), +(3, 'ENTRETIEN TÉLÉPHONIQUE PLANIFIÉ'), +(4, 'ENTRETIEN TÉLÉPHONIQUE OK - ATTENTE ENTRETIEN PHYSIQUE'), +(5, 'ENTRETIEN PHYSIQUE PLANIFIÉ'), +(6, 'ENTRETIENS OK - EN ATTENTE RETOUR ENTREPRISE'), +(7, 'EMBAUCHE VALIDÉE PAR ENTREPRISE'), +(8, 'ENTRETIEN TÉLÉPHONIQUE NON CONVAINCANT'), +(9, 'ENTRETIEN PHYSIQUE NON CONVAINCANT'), +(10, 'REFUS ENTREPRISE'); + +DROP TABLE IF EXISTS `users`; +CREATE TABLE `users` ( + `ID` int(4) NOT NULL AUTO_INCREMENT, + `first_name` varchar(255) NOT NULL, + `last_name` varchar(255) NOT NULL, + `username` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `profession` varchar(255) NOT NULL, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + + +-- 2023-01-28 18:36:11 diff --git a/register.php b/register.php new file mode 100644 index 0000000..3fda177 --- /dev/null +++ b/register.php @@ -0,0 +1,92 @@ + + + + Gestionnaire de recherche d'emploi - Inscription + + + + +

Gestionnaire de recherche d'emploi - Inscription

+

C'est le moment où vous parlez de vous ! 🙂

+
+ + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +

+ +
+ + +" . mysqli_error($conn); +} +} +mysqli_close($conn); +?> diff --git a/verify.php b/verify.php new file mode 100644 index 0000000..475bbb3 --- /dev/null +++ b/verify.php @@ -0,0 +1,36 @@ +Inscription + + +