From 6d7795563efccc53288f064f773525ca31229076 Mon Sep 17 00:00:00 2001
From: marian1010 <79144276+marian1010@users.noreply.github.com>
Date: Tue, 13 Apr 2021 20:28:33 +0200
Subject: [PATCH] Revert "."
This reverts commit 997209ecf3f5076248193ea07f48e68f519fbd2f.
---
panel_admin/editFilm.php | 2 +-
panel_admin/includes/film_dao.php | 16 ++++++++--------
panel_admin/includes/formFilm.php | 2 +-
panel_admin/index.php | 2 --
panel_admin/manage_films.php | 2 +-
5 files changed, 11 insertions(+), 13 deletions(-)
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'