'."\n";
}
- function deleteManager(){
+ static function deleteManager(){
include_once('./includes/formDeleteManager.php');
$formDM = new formDeleteManager();
$htmlDForm = $formDM->gestiona();
- echo '
+ return $reply= '
ELIMINAR GERENTE
@@ -333,11 +214,11 @@
//Functions PROMOTIONS
- function addPromotion(){
+ static function addPromotion(){
include_once('./includes/formAddPromotion.php');
$formAP = new formAddPromotion();
$htmlAForm = $formAP->gestiona();
- echo '
+ return $reply= '
AÑADIR PROMOCIÓN
@@ -345,11 +226,12 @@
'."\n";
}
- function editPromotion(){
+
+ static function editPromotion(){
include_once('./includes/formEditPromotion.php');
$formEP = new formEditPromotion();
$htmlEForm = $formEP->gestiona();
- echo '
+ return $reply= '
EDITAR PROMOCIÓN
@@ -358,11 +240,11 @@
'."\n";
}
- function deletePromotion(){
+ static function deletePromotion(){
include_once('./includes/formDeletePromotion.php');
$formDP = new formDeletePromotion();
$htmlDForm = $formDP->gestiona();
- echo '
+ return $reply= '
ELIMINAR PROMOCIÓN
@@ -370,7 +252,7 @@
'."\n";
}
- function print_promotions(){
+ static function print_promotions(){
$promo = new Promotion_DAO("complucine");
$promos = $promo->allPromotionData();
$ids = array();
@@ -389,60 +271,65 @@
}
}
- echo "
-
-
-
-
- Id |
- Título |
- Descripcion |
- Código |
- Activo |
-
-
-
- ";
+ $reply= "
+
+
+
+
+
+ Id |
+ Título |
+ Descripcion |
+ Código |
+ Activo |
+
+
+
+ ";
if(is_array($promos)){
for($i = 0; $i < count($promos); $i++){
- echo '
- '. $ids[$i] .' |
- '. $tittles[$i] .' |
- '. $descriptions[$i] .' |
- '. $codes[$i] .' |
- '. $actives[$i] .' |
-
-
- |
-
-
- |
-
+ $reply.= '
+ '. $ids[$i] .' |
+ '. $tittles[$i] .' |
+ '. $descriptions[$i] .' |
+ '. $codes[$i] .' |
+ '. $actives[$i] .' |
+
+
+ |
+
+
+ |
+
';
}
}
- echo'
-
-
-
+ $reply.='
+
+
+
+
';
-
+ return $reply ;
}
+
}
?>
+
+