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 "