This commit is contained in:
Daniel Muñoz Garcia 2021-05-27 09:18:41 +02:00 committed by GitHub
parent 90f233fca9
commit cb82c3eb15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 8 deletions

View File

@ -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'] = "<div class='row'>
<div class='column side'></div>
<div class='column middle'>

View File

@ -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'] = "<div class='row'>
<div class='column side'></div>
<div class='column middle'>

View File

@ -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'] = "<div class='row'>
<div class='column side'></div>
<div class='column middle'>

View File

@ -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'] = "<div class='row'>
<div class='column side'></div>
<div class='column middle'>

View File

@ -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'] = "<div class='row'>
<div class='column side'></div>
<div class='column middle'>
@ -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'] = "<div class='row'>
<div class='column side'></div>
<div class='column middle'>
@ -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'] = "<div class='row'>
<div class='column side'></div>
<div class='column middle'>