+
+
+
+ - Id
+ - Nombre
+ - Dirección
+ - Teléfono
+ - Editar
+ - Eliminar
+ ";
+
+ for($i = 0; $i < count($cinemas); $i++){
+ $reply .= '
+ - '. $ids[$i] .'
+ - '. $names[$i] .'
+ - '. $directions[$i] .'
+ - '. $phones[$i] .'
+ -
+
+
+ -
+
+
+
+ ';
+ }
+ $reply .='
+
+
+ ';
break;
default:
break;
-
+ }
}
-
return $reply;
}
diff --git a/panel_admin/panelAdmin.php b/panel_admin/panelAdmin.php
index ee8ad3b..7e63596 100644
--- a/panel_admin/panelAdmin.php
+++ b/panel_admin/panelAdmin.php
@@ -98,7 +98,10 @@
$usernames = array();
$email = array();
$rol = array();
- if(is_array($managers)){
+ if(!is_array($managers)){
+ $reply = "
No hay ningun manager
";
+ }
+ else{
foreach($managers as $key => $value){
$ids[$key] = $value->getId();
$idscinemas[$key] = $value->getIdcinema();
@@ -106,38 +109,35 @@
$email[$key] = $value->getEmail();
$rol[$key] = $value->getRoll();
}
- }
+
$reply= "
-
-
-
- Id |
- IdCinema |
- Nombre |
- Email |
- Rol |
-
-
-
+
+ - Id
+ - IdCinema
+ - Nombre
+ - Email
+ - Rol
+ - Editar
+ - Eliminar
";
- if(is_array($managers)){
+
for($i = 0; $i < count($managers); $i++){
- $reply.= '
- '. $ids[$i] .' |
- '. $idscinemas[$i] .' |
- '. $usernames[$i] .' |
- '. $email[$i] .' |
- '. $rol[$i] .' |
-
+ $reply.= '
+ - '. $ids[$i] .'
+ - '. $idscinemas[$i] .'
+ - '. $usernames[$i] .'
+ - '. $email[$i] .'
+ - '. $rol[$i] .'
+ -
-
|
-
+
+ -
-
|
-
+
';
}
- }
- $reply.='
-
+
+ $reply.='
';
+ }
return $reply;
}
static function showAddBotton() {
@@ -260,7 +259,10 @@
$codes = array();
$actives = array();
- if(is_array($promos)){
+ if(!is_array($promos)){
+ $reply = "
No hay promociones
";
+ }
+ else{
foreach($promos as $key => $value){
$ids[$key] = $value->getId();
$tittles[$key] = $value->getTittle();
@@ -268,32 +270,27 @@
$codes[$key] = $value->getCode();
$actives[$key] = $value->getActive();
}
- }
$reply= "
-
-
-
-
-
- Id |
- Título |
- Descripcion |
- Código |
- Activo |
-
-
-
+
+
+ - Id
+ - Título
+ - Descripcion
+ - Código
+ - Activo
+ - Editar
+ - Eliminar
";
- if(is_array($promos)){
+
for($i = 0; $i < count($promos); $i++){
- $reply.= '
- '. $ids[$i] .' |
- '. $tittles[$i] .' |
- '. $descriptions[$i] .' |
- '. $codes[$i] .' |
- '. $actives[$i] .' |
-
+ $reply.= '
+ - '. $ids[$i] .'
+ - '. $tittles[$i] .'
+ - '. $descriptions[$i] .'
+ - '. $codes[$i] .'
+ - '. $actives[$i] .'
+ -
-
|
-
+
+ -
-
|
-
+
+
';
}
- }
- $reply.='
-
+
+ $reply.='
+
';
+ }
return $reply ;
}