htaccess c'est vraiment de la merde
This commit is contained in:
parent
5638c0712d
commit
04d7d564f1
5 changed files with 15 additions and 14 deletions
|
|
@ -21,8 +21,8 @@
|
|||
public function admin(){
|
||||
|
||||
if (!isset($_SESSION['user']) && ($_SESSION['user']['user_status'] != 1 )){
|
||||
header("Location:index.php?ctrl=error&action=error_403");
|
||||
exit;
|
||||
$error = new \Controllers\ErrorCtrl();
|
||||
return $error->error_403();
|
||||
}
|
||||
|
||||
$objCategoryModel = new CategoryModel;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
public function error_404(){
|
||||
http_response_code(404);
|
||||
$this->_display("error_404");
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -21,6 +22,7 @@
|
|||
public function error_403(){
|
||||
http_response_code(403);
|
||||
$this->_display("error_403");
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -124,8 +124,8 @@
|
|||
*/
|
||||
public function addedit_project() {
|
||||
if (!isset($_SESSION['user'])){
|
||||
header("Location:index.php?ctrl=error&action=error_403");
|
||||
exit;
|
||||
$error = new \Controllers\ErrorCtrl();
|
||||
return $error->error_403();
|
||||
}
|
||||
|
||||
$objProject = new Project;
|
||||
|
|
@ -135,8 +135,8 @@
|
|||
if (isset($_GET['id'])){
|
||||
$arrProject = $objProjectModel->findOne($_GET['id']);
|
||||
if($_SESSION['user']['user_id'] != $arrProject['project_user_id']){
|
||||
header("Location:index.php?ctrl=error&action=error_403");
|
||||
exit;
|
||||
$error = new \Controllers\ErrorCtrl();
|
||||
return $error->error_403();
|
||||
}
|
||||
$objProject->hydrate($arrProject);
|
||||
$this->_arrData['arrImages'] = $objProjectModel->getImagesByProjectId($objProject->getId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue