diff --git a/panel_admin/editFilm.php b/panel_admin/editFilm.php
index 3ac8f90..3058869 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 70e24bc..61efe56 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 $resul;
+ return $films;
}
//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){
- return new FilmDTO( $id, $tittle, $duration, $language);
+ public function loadFilm($id, $tittle, $duration, $language,$description){
+ return new Film_DTO( $id, $tittle, $duration, $language,$description);
}
}
diff --git a/panel_admin/includes/formFilm.php b/panel_admin/includes/formFilm.php
index 9982558..68c4146 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 FilmDAO('complucine');
+ $bd = new Film_DAO('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 3ad1eea..7516ee7 100644
--- a/panel_admin/index.php
+++ b/panel_admin/index.php
@@ -6,6 +6,8 @@
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 2348ed8..b7e9402 100644
--- a/panel_admin/manage_films.php
+++ b/panel_admin/manage_films.php
@@ -60,7 +60,7 @@
';
}
function addFilm(){
- echo'