From 2925084c7c78987a6b86e9c8a35f3fed3d7e9151 Mon Sep 17 00:00:00 2001 From: marian1010 <79144276+marian1010@users.noreply.github.com> Date: Thu, 13 May 2021 12:51:29 +0200 Subject: [PATCH] debug --- panel_admin/includes/formAddPromotion.php | 2 +- panel_admin/includes/formDeletePromotion.php | 2 +- panel_admin/includes/formEditPromotion.php | 2 +- panel_admin/panelAdmin.php | 75 ++++++++++---------- 4 files changed, 42 insertions(+), 39 deletions(-) diff --git a/panel_admin/includes/formAddPromotion.php b/panel_admin/includes/formAddPromotion.php index 41599d7..5dbb28c 100644 --- a/panel_admin/includes/formAddPromotion.php +++ b/panel_admin/includes/formAddPromotion.php @@ -72,7 +72,7 @@ class formAddPromotion extends Form{ } if (count($result) === 0) { - $bd = new Pomotion_DAO("complucine"); + $bd = new Promotion_DAO("complucine"); //FALTARIA SUBIR LA IMAGEN $exist = $bd-> GetPromotion($code); diff --git a/panel_admin/includes/formDeletePromotion.php b/panel_admin/includes/formDeletePromotion.php index 84d8704..071954d 100644 --- a/panel_admin/includes/formDeletePromotion.php +++ b/panel_admin/includes/formDeletePromotion.php @@ -55,7 +55,7 @@ class formDeletePromotion extends Form{ } if (count($result) === 0) { - $bd = new Pomotion_DAO("complucine"); + $bd = new Promotion_DAO("complucine"); //FALTARIA SUBIR LA IMAGEN $exist = $bd-> promotionData($id); diff --git a/panel_admin/includes/formEditPromotion.php b/panel_admin/includes/formEditPromotion.php index 21cba3f..f6d618d 100644 --- a/panel_admin/includes/formEditPromotion.php +++ b/panel_admin/includes/formEditPromotion.php @@ -79,7 +79,7 @@ class formEditPromotion extends Form{ } if (count($result) === 0) { - $bd = new Pomotion_DAO("complucine"); + $bd = new Promotion_DAO("complucine"); //FALTARIA SUBIR LA IMAGEN $exist = $bd-> promotionData($id); diff --git a/panel_admin/panelAdmin.php b/panel_admin/panelAdmin.php index 0954f74..2f2e8c9 100644 --- a/panel_admin/panelAdmin.php +++ b/panel_admin/panelAdmin.php @@ -39,10 +39,10 @@ } else { $this->addFilm(); - echo( $template->print_fimls()); + echo( $template->print_fimls()); }; break; - case 'mp': require_once('manage_promotions.php'); + case 'mp': if(isset($_POST['edit_promotion'])) { $this->editPromotion(); } @@ -167,13 +167,14 @@ $usernames = array(); $email = array(); $rol = array(); - - foreach($managers as $key => $value){ - $ids[$key] = $value->getId(); - $idscinemas[$key] = $value->getIdcinema(); - $usernames[$key] = $value->getUsername(); - $email[$key] = $value->getEmail(); - $rol[$key] = $value->getRoll(); + if(is_array($managers)){ + foreach($managers as $key => $value){ + $ids[$key] = $value->getId(); + $idscinemas[$key] = $value->getIdcinema(); + $usernames[$key] = $value->getUsername(); + $email[$key] = $value->getEmail(); + $rol[$key] = $value->getRoll(); + } } echo "