Debug
This commit is contained in:
parent
90f233fca9
commit
cb82c3eb15
@ -111,7 +111,8 @@ class formAddFilm extends Form{
|
|||||||
//if ( !copy("../img/tmp/{$nombre}", "/{$nombre}") ) {
|
//if ( !copy("../img/tmp/{$nombre}", "/{$nombre}") ) {
|
||||||
// $result['img'] = 'Error al mover el archivo';
|
// $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'>
|
$_SESSION['message'] = "<div class='row'>
|
||||||
<div class='column side'></div>
|
<div class='column side'></div>
|
||||||
<div class='column middle'>
|
<div class='column middle'>
|
||||||
|
@ -111,7 +111,8 @@ class formAddPromotion extends Form{
|
|||||||
//if ( !copy("../img/tmp/{$nombre}", "/{$nombre}") ) {
|
//if ( !copy("../img/tmp/{$nombre}", "/{$nombre}") ) {
|
||||||
// $result['img'] = 'Error al mover el archivo';
|
// $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'>
|
$_SESSION['message'] = "<div class='row'>
|
||||||
<div class='column side'></div>
|
<div class='column side'></div>
|
||||||
<div class='column middle'>
|
<div class='column middle'>
|
||||||
|
@ -122,7 +122,8 @@ class formEditFilm extends Form{
|
|||||||
//if ( !copy("../img/tmp/{$nombre}", "/{$nombre}") ) {
|
//if ( !copy("../img/tmp/{$nombre}", "/{$nombre}") ) {
|
||||||
// $result['img'] = 'Error al mover el archivo';
|
// $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'>
|
$_SESSION['message'] = "<div class='row'>
|
||||||
<div class='column side'></div>
|
<div class='column side'></div>
|
||||||
<div class='column middle'>
|
<div class='column middle'>
|
||||||
|
@ -84,7 +84,6 @@ class formEditPromotion extends Form{
|
|||||||
if (count($result) === 0) {
|
if (count($result) === 0) {
|
||||||
$bd = new Promotion_DAO("complucine");
|
$bd = new Promotion_DAO("complucine");
|
||||||
|
|
||||||
//FALTARIA SUBIR LA IMAGEN
|
|
||||||
$exist = $bd-> promotionData($id);
|
$exist = $bd-> promotionData($id);
|
||||||
if(mysqli_num_rows($exist) == 1){
|
if(mysqli_num_rows($exist) == 1){
|
||||||
$ok = count($_FILES) == 1 && $_FILES['archivo']['error'] == UPLOAD_ERR_OK;
|
$ok = count($_FILES) == 1 && $_FILES['archivo']['error'] == UPLOAD_ERR_OK;
|
||||||
@ -119,7 +118,8 @@ class formEditPromotion extends Form{
|
|||||||
//if ( !copy("../img/tmp/{$nombre}", "/{$nombre}") ) {
|
//if ( !copy("../img/tmp/{$nombre}", "/{$nombre}") ) {
|
||||||
// $result['img'] = 'Error al mover el archivo';
|
// $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'>
|
$_SESSION['message'] = "<div class='row'>
|
||||||
<div class='column side'></div>
|
<div class='column side'></div>
|
||||||
<div class='column middle'>
|
<div class='column middle'>
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
$_SESSION["lastRol"] = $_SESSION["rol"];
|
$_SESSION["lastRol"] = $_SESSION["rol"];
|
||||||
//unset($_SESSION["rol"]);
|
//unset($_SESSION["rol"]);
|
||||||
$_SESSION["rol"] = null;
|
$_SESSION["rol"] = null;
|
||||||
header("Location: {$_SERVER['PHP_SELF']}");
|
//header("Location: {$_SERVER['PHP_SELF']}");
|
||||||
$_SESSION['message'] = "<div class='row'>
|
$_SESSION['message'] = "<div class='row'>
|
||||||
<div class='column side'></div>
|
<div class='column side'></div>
|
||||||
<div class='column middle'>
|
<div class='column middle'>
|
||||||
@ -80,7 +80,7 @@
|
|||||||
case 'ur':
|
case 'ur':
|
||||||
$_SESSION["lastRol"] = $_SESSION["rol"];
|
$_SESSION["lastRol"] = $_SESSION["rol"];
|
||||||
$_SESSION["rol"] = "user";
|
$_SESSION["rol"] = "user";
|
||||||
header("Location: {$_SERVER['PHP_SELF']}");
|
//header("Location: {$_SERVER['PHP_SELF']}");
|
||||||
$_SESSION['message'] = "<div class='row'>
|
$_SESSION['message'] = "<div class='row'>
|
||||||
<div class='column side'></div>
|
<div class='column side'></div>
|
||||||
<div class='column middle'>
|
<div class='column middle'>
|
||||||
@ -97,7 +97,7 @@
|
|||||||
case 'ag':
|
case 'ag':
|
||||||
$_SESSION["lastRol"] = $_SESSION["rol"];
|
$_SESSION["lastRol"] = $_SESSION["rol"];
|
||||||
$_SESSION["rol"] = "manager";
|
$_SESSION["rol"] = "manager";
|
||||||
header("Location: {$_SERVER['PHP_SELF']}");
|
//header("Location: {$_SERVER['PHP_SELF']}");
|
||||||
$_SESSION['message'] = "<div class='row'>
|
$_SESSION['message'] = "<div class='row'>
|
||||||
<div class='column side'></div>
|
<div class='column side'></div>
|
||||||
<div class='column middle'>
|
<div class='column middle'>
|
||||||
|
Loading…
Reference in New Issue
Block a user