diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2196147
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/templates_c/
+/templates_c/**
\ No newline at end of file
diff --git a/assests/img/Logo.png b/assests/img/logo.png
similarity index 100%
rename from assests/img/Logo.png
rename to assests/img/logo.png
diff --git a/controllers/project_controller.php b/controllers/project_controller.php
index 7395647..47f9372 100644
--- a/controllers/project_controller.php
+++ b/controllers/project_controller.php
@@ -85,6 +85,7 @@
$this->_arrData['arrProjectToDisplay'] = $arrProjectToDisplay;
$this->_arrData['arrCategory'] = $arrCategory;
+ $this->_arrData['arrProject'] = $arrProject;
$this->_arrData['arrUser'] = $arrUser;
@@ -100,56 +101,58 @@
$objProjectModel = new ProjectModel;
$arrProject = $objProjectModel->findAll(4);
- $arrProjectToDiplay = array();
+ $arrProjectToDisplay = array();
foreach($arrProject as $arrDetProject){
$objProject = new Project;
$objProject->hydrate($arrDetProject);
- $arrProjectToDiplay[] = $objProject;
+ $arrProjectToDisplay[] = $objProject;
}
$objImageModel = new ImageModel;
$arrImage = $objImageModel->findAllImage(4);
- $arrImageToDiplay = array();
+ $arrImageToDisplay = array();
foreach($arrImage as $arrDetImage){
$objImage = new Image;
$objImage->hydrate($arrDetImage);
- $arrImageToDiplay[] = $objImage;
+ $arrImageToDisplay[] = $objImage;
}
//Variable data
$_SESSION['title'] = $_POST['titleProject']??"";
$_SESSION['description'] = $_POST['descProject']??"";
$_SESSION['content'] = $_POST['textProject']??"";
- $_SESSION['thumbnail'] = $_FILES['imageProject']['name']??"";
+ $_SESSION['thumbnail'] = $_FILES['imageThumbnail']['name']??"";
$_SESSION['status'] = 'en_attente';
+ $_SESSION['user_id'] = $_SESSION['user']['user_id'];
$objProject = new Project();
/**
- /* Créer par Besnik le GOAT et l'autre GOAT de Guillaume
- /*
- /* @return bool pour savoir si le fichier existe,
- /* puis déplace vers le fichier uploads avec les images projet des utilisateurs
- /* Communication avec la BDD
+ * Créer par Besnik le GOAT et l'autre GOAT de Guillaume
+ *
+ * @return bool pour savoir si le fichier existe,
+ * puis déplace vers le fichier uploads avec les images projet des utilisateurs
+ * Communication avec la BDD
*/
if (($_SESSION['thumbnail'] != null)){
$strDest = "";
if ((count($_FILES) > 0) && ($_FILES['imageProject']['error'] != 4)){
- $strDest = '../public/uploads/projects/'.$_FILES['imageProject']['name'];
- var_dump($strDest);
+ $strDest = 'uploads/projects/'.$_FILES['imageProject']['name'];
move_uploaded_file($_FILES['imageProject']['tmp_name'], $strDest);
}
}
/** En cas d'appuis sur le bouton d'envoie ou celui de remettre a plus tard
- /* 1. Changement de status
- /* 2. Hydratation avec les informations récupéré de l'utilisateur
- /* 3. Envoie des données à la BDD
- */
+ * 1. Changement de status
+ * 2. Hydratation avec les informations récupéré de l'utilisateur
+ * 3. Envoie des données à la BDD
+ */
if (isset($_POST['sendMessage'])) {
$_SESSION['status'] = 'publié';
$objProject->hydrate($_SESSION);
- $objProject->setThumbnail($strDest);
+ $objProject->setThumbnail($strDest);
+ var_dump($strDest);
+ var_dump($objProject);
$objProjectModel->insert($objProject);
} else if (isset($_POST['toContinue'])) {
@@ -158,14 +161,12 @@
$objProjectModel->insert($objProject);
}
- /*Débuggage
var_dump($_SESSION);
- var_dump($objProject);*/
- $this->_arrData['arrProjectToDiplay'] = $arrProjectToDiplay;
- $this->_arrData['arrImageToDiplay'] = $arrImageToDiplay;
+ var_dump($objProject);
+ $this->_arrData['arrProjectToDiplay'] = $arrProjectToDisplay;
+ $this->_arrData['arrImageToDiplay'] = $arrImageToDisplay;
$this->_display("project");
-
}
@@ -192,8 +193,7 @@
}
}
- public function sendEmail()
- {
+ public function sendEmail(){
if (count($_POST) > 0) {
$projectId = (int)($_POST['project_id'] ?? 0);
@@ -224,6 +224,7 @@
$objMail->SMTPDebug = 0;
+
$objMail->SMTPAuth = TRUE;
$objMail->SMTPSecure = "tls";
$objMail->Port = 587;
diff --git a/controllers/templates_c/299f75d7692a19207f23bf5795a2721f507c3fc6_0.file_home.tpl.php b/controllers/templates_c/299f75d7692a19207f23bf5795a2721f507c3fc6_0.file_home.tpl.php
deleted file mode 100644
index 208dcfd..0000000
--- a/controllers/templates_c/299f75d7692a19207f23bf5795a2721f507c3fc6_0.file_home.tpl.php
+++ /dev/null
@@ -1,69 +0,0 @@
-getCompiled()->isFresh($_smarty_tpl, array (
- 'version' => '5.7.0',
- 'unifunc' => 'content_6985a47abcda40_19846426',
- 'has_nocache_code' => false,
- 'file_dependency' =>
- array (
- '299f75d7692a19207f23bf5795a2721f507c3fc6' =>
- array (
- 0 => 'views/home.tpl',
- 1 => 1770365364,
- 2 => 'file',
- ),
- ),
- 'includes' =>
- array (
- 'file:views/_partial/preview.tpl' => 1,
- ),
-))) {
-function content_6985a47abcda40_19846426 (\Smarty\Template $_smarty_tpl) {
-$_smarty_current_dir = 'C:\\wamp64\\www\\projetphp\\views';
-$_smarty_tpl->getInheritance()->init($_smarty_tpl, false);
-?>
-
-getInheritance()->instanceBlock($_smarty_tpl, 'Block_3150142016985a47abb6c29_00747518', "content");
-?>
-
-
-
-
-
Folliow
-
Là où les talents rencontrent leur avenir
-
Une plateforme de portfolio adapté à vos besoins et aux besoins des entreprises.
- Créer un portfolio réellement pertinent aux exigences du marché et rentrez
- directement en contact avec les entreprises.
Une plateforme de portfolio adapté à vos besoins et aux besoins des entreprises.
- Créer un portfolio réellement pertinent aux exigences du marché et rentrez
- directement en contact avec les entreprises.