<div class="server-error col-sm-12 margin-top15px margin-bottom15">
<?php
$flashMessage = $this->flashMessenger()->getMessages();

if (count($flashMessage)) :
    ?>
    <ul class="margin0">
    <?php
        foreach ($flashMessage as $msg) :
            foreach ($msg as $type => $message) :
    ?>
        <li><span class="<?php echo $type; ?> col-sm-12"><?php echo $message; ?></span></li>
    <?php endforeach; ?>
    <?php endforeach; ?>
</ul>
<?php endif; ?>
<?php if(isset($this->messages)) : ?>
<ul>
    <?php foreach ($this->messages as $type => $msg) : ?>
    <li><span class="<?php echo $type; ?>"><?php echo $msg; ?></span></li>
    <?php endforeach; ?>
</ul>
<?php endif; ?>
</div>