From cb82c3eb15dccecdf2d3501cc5fa56f190ca350a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mu=C3=B1oz=20Garcia?= <73303506+danimu03@users.noreply.github.com> Date: Thu, 27 May 2021 09:18:41 +0200 Subject: [PATCH] Debug --- panel_admin/includes/formAddFilm.php | 3 ++- panel_admin/includes/formAddPromotion.php | 3 ++- panel_admin/includes/formEditFilm.php | 3 ++- panel_admin/includes/formEditPromotion.php | 4 ++-- panel_admin/index.php | 6 +++--- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/panel_admin/includes/formAddFilm.php b/panel_admin/includes/formAddFilm.php index 40d7439..b877f31 100644 --- a/panel_admin/includes/formAddFilm.php +++ b/panel_admin/includes/formAddFilm.php @@ -111,7 +111,8 @@ class formAddFilm extends Form{ //if ( !copy("../img/tmp/{$nombre}", "/{$nombre}") ) { // $result['img'] = 'Error al mover el archivo'; //} - $bd->createFilm(null, $tittle,$duration,$language,$description, $nombre); //Null hasta tener $nombre + $nombreBd = str_replace("_", " ", $nombre); + $bd->createFilm(null, $tittle,$duration,$language,$description, $nombreBd); //Null hasta tener $nombre $_SESSION['message'] = "
diff --git a/panel_admin/includes/formAddPromotion.php b/panel_admin/includes/formAddPromotion.php index 5744cfd..cb6bc09 100644 --- a/panel_admin/includes/formAddPromotion.php +++ b/panel_admin/includes/formAddPromotion.php @@ -111,7 +111,8 @@ class formAddPromotion extends Form{ //if ( !copy("../img/tmp/{$nombre}", "/{$nombre}") ) { // $result['img'] = 'Error al mover el archivo'; //} - $bd->createPromotion(null, $tittle,$description,$code,$active, $nombre); + $nombreBd = str_replace("_", " ", $nombre); + $bd->createPromotion(null, $tittle,$description,$code,$active, $nombreBd); $_SESSION['message'] = "
diff --git a/panel_admin/includes/formEditFilm.php b/panel_admin/includes/formEditFilm.php index 018b9d6..6b17280 100644 --- a/panel_admin/includes/formEditFilm.php +++ b/panel_admin/includes/formEditFilm.php @@ -122,7 +122,8 @@ class formEditFilm extends Form{ //if ( !copy("../img/tmp/{$nombre}", "/{$nombre}") ) { // $result['img'] = 'Error al mover el archivo'; //} - $bd->editFilm($id, $tittle, $duration, $language, $description, $nombre); + $nombreBd = str_replace("_", " ", $nombre); + $bd->editFilm($id, $tittle, $duration, $language, $description, $nombreBd); $_SESSION['message'] = "
diff --git a/panel_admin/includes/formEditPromotion.php b/panel_admin/includes/formEditPromotion.php index a364c91..c656e4f 100644 --- a/panel_admin/includes/formEditPromotion.php +++ b/panel_admin/includes/formEditPromotion.php @@ -84,7 +84,6 @@ class formEditPromotion extends Form{ if (count($result) === 0) { $bd = new Promotion_DAO("complucine"); - //FALTARIA SUBIR LA IMAGEN $exist = $bd-> promotionData($id); if(mysqli_num_rows($exist) == 1){ $ok = count($_FILES) == 1 && $_FILES['archivo']['error'] == UPLOAD_ERR_OK; @@ -119,7 +118,8 @@ class formEditPromotion extends Form{ //if ( !copy("../img/tmp/{$nombre}", "/{$nombre}") ) { // $result['img'] = 'Error al mover el archivo'; //} - $bd->editPromotion($id, $tittle,$description,$code,$active, $nombre); + $nombreBd = str_replace("_", " ", $nombre); + $bd->editPromotion($id, $tittle,$description,$code,$active, $nombreBd); $_SESSION['message'] = "
diff --git a/panel_admin/index.php b/panel_admin/index.php index bdba00d..dcb15dc 100644 --- a/panel_admin/index.php +++ b/panel_admin/index.php @@ -63,7 +63,7 @@ $_SESSION["lastRol"] = $_SESSION["rol"]; //unset($_SESSION["rol"]); $_SESSION["rol"] = null; - header("Location: {$_SERVER['PHP_SELF']}"); + //header("Location: {$_SERVER['PHP_SELF']}"); $_SESSION['message'] = "
@@ -80,7 +80,7 @@ case 'ur': $_SESSION["lastRol"] = $_SESSION["rol"]; $_SESSION["rol"] = "user"; - header("Location: {$_SERVER['PHP_SELF']}"); + //header("Location: {$_SERVER['PHP_SELF']}"); $_SESSION['message'] = "
@@ -97,7 +97,7 @@ case 'ag': $_SESSION["lastRol"] = $_SESSION["rol"]; $_SESSION["rol"] = "manager"; - header("Location: {$_SERVER['PHP_SELF']}"); + //header("Location: {$_SERVER['PHP_SELF']}"); $_SESSION['message'] = "