<?php
$check = 0;
if (($this->session->flashdata('message')) != null) {
    $message = $this->session->flashdata('message');
    $check = 1;
}
if ($this->session->flashdata('error') != null) {
    $error = $this->session->flashdata('error');
    $check = 1;
}
?>   
<?php if ($check): ?>
    <div class="container-fluid" id="divNaKomunikat">
        <div class="container-fluid" id="komunikat">
            <div class="container">
                <?php if (isset($message)): ?>                    
                    <div class="alert alert-info">
                        <p>
                            <?php echo $message; ?>
                        </p>
                    </div>
                <?php endif; ?>
                <?php if (isset($error)): ?>                    
                    <div class="alert alert-danger">
                        <p>
                            <?php echo $error; ?>
                        </p>
                    </div>
                <?php endif; ?>

            </div>
        </div>
    </div>
<?php endif; ?>
