htaccess fini

This commit is contained in:
Yasder5 2026-03-03 22:23:25 +01:00
parent 5071d5f2f3
commit b75ae2542a
22 changed files with 101 additions and 105 deletions

View file

@ -79,7 +79,7 @@
*/
public function search(){
$strKeywords = $_POST['keywords']??'';
$strKeywords = $_POST['keywords']??"";
$intAuthor = $_POST['author']??0;
$intPeriod = $_POST['period']??0;
$strDate = $_POST['date']??'';
@ -325,7 +325,7 @@
}
$_SESSION['success'] = (!isset($_GET['id'])) ? "Le projet a bien été créé" : "Le projet a bien été modifié";
header("Location:index.php");
header('Location:'.$_ENV['BASE_URL']);
exit;
} else {
$arrError[] = "Erreur lors de l'enregistrement en base de données";
@ -373,11 +373,11 @@
$this->_display("project_display");
} else {
header("Location: index.php?ctrl=project&action=home");
header('Location: '.$_ENV['BASE_URL'].'/project/home');
exit;
}
} else {
header("Location: index.php?ctrl=project&action=home");
header('Location: '.$_ENV['BASE_URL'].'/project/home');
exit;
}
}
@ -395,7 +395,7 @@
$arrProject = $objProjectModel->findOne($projectId);
if (!$arrProject) {
header("Location: index.php?ctrl=project&action=home");
header('Location: '.$_ENV['BASE_URL'].'/project/home');
exit;
}
@ -429,8 +429,8 @@
$objMail->Subject = "Projet : " . $objProject->getTitle();
$url = "https://php.boulayoune.com/index.php?ctrl=project&action=display&id=" . $projectId;
$url = $_ENV['BASE_URL'].'/project/display/'.$projectId;
$this->_arrData['projectTitle'] = $objProject->getTitle();
$this->_arrData['projectDescription'] = $objProject->getDescription();
$this->_arrData['projectUrl'] = $url;
@ -438,14 +438,14 @@
$objMail->Body = $this->_display("mail_message", false);
if ($objMail->Send()) {
header("Location: index.php?ctrl=project&action=display&id=".$projectId."&mail=ok");
header('Location: '.$_ENV['BASE_URL'].'/project/display/'.$projectId.'?mail=ok');
} else {
header("Location: index.php?ctrl=project&action=display&id=".$projectId."&mail=fail");
header('Location: '.$_ENV['BASE_URL'].'/project/display/'.$projectId.'?mail=fail');
}
exit;
}
header("Location: index.php?ctrl=project&action=home");
header('Location: '.$_ENV['BASE_URL'].'/project/home');
exit;
}
@ -459,7 +459,7 @@
$objProjectModel = new ProjectModel;
$objProjectModel->accept($intId);
header("Location: index.php");
header('Location: '.$_ENV['BASE_URL']);
exit;
}
@ -473,7 +473,7 @@
$objProjectModel = new ProjectModel;
$objProjectModel->refuse($intId);
header("Location: index.php");
header('Location: '.$_ENV['BASE_URL']);
exit;
}
@ -483,7 +483,7 @@
public function delete(){
if (!isset($_SESSION['user']) || $_SESSION['user']['user_status'] != 2) {
header("Location: index.php");
header('Location: '.$_ENV['BASE_URL']);
exit;
}
@ -498,7 +498,7 @@
}
}
header("Location: index.php");
header('Location: '.$_ENV['BASE_URL']);
exit;
}
@ -518,7 +518,7 @@
}
$urlRedirect = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "index.php";
header("Location: " . $urlRedirect);
header('Location: ' . $urlRedirect);
exit;
}
@ -541,7 +541,7 @@
}
$url = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : "index.php";
header("Location: " . $url);
header('Location: ' . $url);
exit;
}