"./?state=mc");
        parent::__construct('formAddCinema',$op);
    } 
    protected function generaCamposFormulario($datos,$errores=array()){
        $htmlErroresGlobales = self::generaListaErroresGlobales($errores);
        $errorId = self::createMensajeError($errores, 'id', 'span', array('class' => 'error'));
        $html = '
                    
                     
                        
                        
                    
                  ';
         return $html;
    }           
    
     //Process form:
	public function procesaFormulario($datos) {
        $result =array();
        
        $id = $this->test_input($datos['id'])??null;
        if(is_null($id)){
            $result['id']= "El nombre no es válido";
        }
        
        if(count($result)===0){
		    $bd = new Cinema_DAO('complucine');
            $exist = $bd -> existCinema($id);
		    if(mysqli_num_rows($exist)==1){
                $bd->deleteCinema($id);
                $_SESSION['message'] = "
                                        
                                        
                                            
                                                 Operacion realizada con exito 
                                                 Se ha eliminado el cine correctamente en la base de datos.
                                                
                                             
                                         
                                        
                                     
                                    ";
                $result = './?state=mc';                    
            }	
            $exist->free();
            }
            else{
                $result[] = "El cine seleccionado no existe.";	
		}
        return $result;	
	}
}
?>