diff --git a/panel_admin/editFilm.php b/panel_admin/editFilm.php index 3058869..3ac8f90 100644 --- a/panel_admin/editFilm.php +++ b/panel_admin/editFilm.php @@ -20,7 +20,7 @@
- +
diff --git a/panel_admin/includes/film_dao.php b/panel_admin/includes/film_dao.php index 61efe56..70e24bc 100644 --- a/panel_admin/includes/film_dao.php +++ b/panel_admin/includes/film_dao.php @@ -1,5 +1,5 @@ mysqli, $sql) or die ('Error into query database'); @@ -40,7 +40,7 @@ $films[] = $this->loadFilm($fila["id"], $fila["tittle"], $fila["duration"], $fila["language"], $fila["description"]); } - return $films; + return $resul; } //Returns a query to get all films tittles. @@ -87,8 +87,8 @@ } //Create a new film Data Transfer Object. - public function loadFilm($id, $tittle, $duration, $language,$description){ - return new Film_DTO( $id, $tittle, $duration, $language,$description); + public function loadFilm($id, $tittle, $duration, $language){ + return new FilmDTO( $id, $tittle, $duration, $language); } } diff --git a/panel_admin/includes/formFilm.php b/panel_admin/includes/formFilm.php index 68c4146..9982558 100644 --- a/panel_admin/includes/formFilm.php +++ b/panel_admin/includes/formFilm.php @@ -52,7 +52,7 @@ class FormFilm extends Form { //Habria que validar todo para que encaje en la base de datos - $bd = new Film_DAO('complucine'); + $bd = new FilmDAO('complucine'); if($bd ){ if($option == "new"){ $bd->createFilm(null, $title,$duration,$languaje,$description); diff --git a/panel_admin/index.php b/panel_admin/index.php index 7516ee7..3ad1eea 100644 --- a/panel_admin/index.php +++ b/panel_admin/index.php @@ -6,8 +6,6 @@ require_once('../panel_admin/panelAdmin.php'); $template = new Template(); - if(isset($_SESSION["login"]) && $_SESSION["rol"] == "admin") $login = true; - if(isset($_REQUEST['state'])) { $panel = new Panel($_REQUEST['state']); } diff --git a/panel_admin/manage_films.php b/panel_admin/manage_films.php index b7e9402..2348ed8 100644 --- a/panel_admin/manage_films.php +++ b/panel_admin/manage_films.php @@ -60,7 +60,7 @@ '; } function addFilm(){ - echo'
+ echo'

AƱadir pelicula