allPromotionData();
        $ids = array();
        $tittles = array();
        $descriptions = array();
        $codes = array();
        $actives = array();
        foreach($promos as $key => $value){
            $ids[$key] = $value->getId();
            $tittles[$key] = $value->getTittle();
            $descriptions[$key] = $value->getDescription();
            $codes[$key] = $value->getCode();
            $actives[$key] = $value->getActive();
        }
        
        echo "
            
            
                
                
                
                    | Id | 
                    Título | 
                    Descripcion | 
                    Código | 
                    Activo | 
                
                
                
                "; 
        for($i = 0; $i < count($promos); $i++){
            echo '
                    | '. $ids[$i] .' | 
                    '. $tittles[$i] .' | 
                    '. $descriptions[$i] .' | 
                    '. $codes[$i] .' | 
                    '. $actives[$i] .' | 
                    
                         
                     |  
                     
                         
                     |  
                
                '; 
        } 
        echo'
                
             
            
        ';
            
    }
    function addPromotion(){
        echo'   
                
                
             
            ';
    }
    function deletePromotion() {
        echo'
            
            
            ';
    }
    function editPromotion() {
        echo'
            
            
            ';
    }
    // Logic Functions
       function confirmDelete() {
        $cine = new FormPromotion();
        $cine->processesForm($_POST['id'],null,null,null,null,"del");
        $_SESSION['message'] = $cine->getReply();
        header('Location: ../panel_admin/index.php?state=mp');
    }
    function confirmEdit() {
        $cine = new FormPromotion();
        $cine->processesForm($_POST['id'], $_POST['tittle'], $_POST['description'], $_POST['code'],$_POST['active'],"edit");
        $_SESSION['message']= $cine->getReply();
        header('Location: ../panel_admin/index.php?state=mp');
    }
    function confirmAdd() {
        $cine = new FormPromotion();
        $cine->processesForm(null,$_POST['tittle'], $_POST['description'], $_POST['code'],$_POST['active'],"new");
        $_SESSION['message'] = $cine->getReply();
        header('Location: ../panel_admin/index.php?state=mp');
    }
?>