diff --git a/php/.htaccess b/php/.htaccess
new file mode 100644
index 0000000..095bf2a
--- /dev/null
+++ b/php/.htaccess
@@ -0,0 +1,6 @@
+
+ RewriteEngine On
+ RewriteBase /php/public/
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^(.*)$ index.php [QSA,L]
+
diff --git a/php/index.php b/php/index.php
deleted file mode 100755
index 242d196..0000000
--- a/php/index.php
+++ /dev/null
@@ -1,16 +0,0 @@
- false,
- 'debug' => true
-]);
-
-$cont = new App\controleur\FrontControleur();
diff --git a/php/css/.DS_Store b/php/public/css/.DS_Store
similarity index 100%
rename from php/css/.DS_Store
rename to php/public/css/.DS_Store
diff --git a/php/css/accueil.css b/php/public/css/accueil.css
similarity index 100%
rename from php/css/accueil.css
rename to php/public/css/accueil.css
diff --git a/php/css/connexion.css b/php/public/css/connexion.css
similarity index 100%
rename from php/css/connexion.css
rename to php/public/css/connexion.css
diff --git a/php/css/erreur.css b/php/public/css/erreur.css
similarity index 100%
rename from php/css/erreur.css
rename to php/public/css/erreur.css
diff --git a/php/css/inscription.css b/php/public/css/inscription.css
similarity index 100%
rename from php/css/inscription.css
rename to php/public/css/inscription.css
diff --git a/php/public/index.php b/php/public/index.php
new file mode 100755
index 0000000..8a015ce
--- /dev/null
+++ b/php/public/index.php
@@ -0,0 +1,16 @@
+ false,
+ 'debug' => true
+]);
+
+$cont = new \App\controleur\FrontControleur();
\ No newline at end of file
diff --git a/php/src/Autoloader.php b/php/src/Autoloader.php
new file mode 100644
index 0000000..7d6ac76
--- /dev/null
+++ b/php/src/Autoloader.php
@@ -0,0 +1,17 @@
+inscription($email, $motDePasse);
// Si l'inscription a réussi, redirigez l'utilisateur vers une page de confirmation
// Vous pouvez également gérer les erreurs ici en cas d'échec de l'inscription
- if ($nouvelUtilisateur instanceof \App\metier\Alumni) {
+ if ($nouvelUtilisateur instanceof \App\modele\Alumni) {
// L'inscription a réussi, redirigez l'utilisateur vers une page de confirmation
// par exemple :
header('Location: index.php?action=inscription_success');
diff --git a/php/src/dal/gateway/AlumniGateway.php b/php/src/gateway/AlumniGateway.php
similarity index 85%
rename from php/src/dal/gateway/AlumniGateway.php
rename to php/src/gateway/AlumniGateway.php
index 7819d4b..1a00ff4 100644
--- a/php/src/dal/gateway/AlumniGateway.php
+++ b/php/src/gateway/AlumniGateway.php
@@ -1,26 +1,28 @@
con = $con;
}
public function insert(string $email, string $motDePasse, string $role){
- $query='INSERT INTO Alumni VALUES (:e, :m, :r)';
+ $query = 'INSERT INTO Alumni (mail, mdp, role) VALUES (:mail, :mdp, :role)';
return $this->con->executeQuery($query, array(
- ':e' => array($email, PDO::PARAM_STR),
- ':m' => array($motDePasse, PDO::PARAM_STR),
- ':r' => array($role, PDO::PARAM_STR)
+ ':mail' => array($email, PDO::PARAM_STR),
+ ':mdp' => array($motDePasse, PDO::PARAM_STR),
+ ':role' => array($role, PDO::PARAM_STR)
));
}
+
public function updateEmail(int $id, string $newEmail){
$query='UPDATE Alumni SET email=:new WHERE id=:i';
$this->con->executeQuery($query, array(
diff --git a/php/src/dal/Connection.php b/php/src/gateway/Connection.php
similarity index 97%
rename from php/src/dal/Connection.php
rename to php/src/gateway/Connection.php
index e8c1e83..1389c2a 100755
--- a/php/src/dal/Connection.php
+++ b/php/src/gateway/Connection.php
@@ -1,6 +1,7 @@
con = $con;
}
diff --git a/php/src/dal/gateway/OffreGateway.php b/php/src/gateway/OffreGateway.php
similarity index 64%
rename from php/src/dal/gateway/OffreGateway.php
rename to php/src/gateway/OffreGateway.php
index d783846..85e4aab 100755
--- a/php/src/dal/gateway/OffreGateway.php
+++ b/php/src/gateway/OffreGateway.php
@@ -1,13 +1,13 @@
con = $con;
}
diff --git a/php/src/models/AdminModele.php b/php/src/modele/AdminModele.php
similarity index 90%
rename from php/src/models/AdminModele.php
rename to php/src/modele/AdminModele.php
index 21bdcdb..5cc4474 100755
--- a/php/src/models/AdminModele.php
+++ b/php/src/modele/AdminModele.php
@@ -1,9 +1,6 @@
id = $id;
$this->offreur = $offreur;
@@ -161,7 +162,7 @@ class Offre
return $this->imageUrl;
}
- public function getTypeContrat(): TypeContrat
+ public function getTypeContrat(): \App\metier\TypeContrat
{
return $this->typeContrat;
}
@@ -191,7 +192,7 @@ class Offre
return $this->experience;
}
- public function getNiveauEtudes(): NiveauEtudes
+ public function getNiveauEtudes(): \App\metier\NiveauEtudes
{
return $this->niveauEtudes;
}
diff --git a/php/src/metier/Profil.php b/php/src/modele/Profil.php
similarity index 98%
rename from php/src/metier/Profil.php
rename to php/src/modele/Profil.php
index a05b32e..69e5bc5 100644
--- a/php/src/metier/Profil.php
+++ b/php/src/modele/Profil.php
@@ -1,5 +1,6 @@
insert($email, $hashpassword, $role)) {
// L'insertion a réussi, retournez le nouvel utilisateur
- $nouvelUtilisateur = new \App\metier\Alumni($email, $hashpassword, $role);
+ $nouvelUtilisateur = new \App\modele\Alumni($email, $hashpassword, $role);
return $nouvelUtilisateur;
} else {
// L'insertion a échoué, renvoyez un utilisateur vide pour indiquer l'échec
- return new \App\metier\Alumni(null, null, null);
+ return new \App\modele\Alumni(null, null, null);
}
}
}
diff --git a/php/src/models/ModerateurControleur.php b/php/src/models/ModerateurControleur.php
deleted file mode 100755
index 608bf52..0000000
--- a/php/src/models/ModerateurControleur.php
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
+
Alica - Accueil
@@ -15,7 +15,7 @@
Vous pouvez aussi consulter les articles
Vous pouvez aussi consulter les annonces
Connexion :
-