<?php 
if($this->session->flashdata('alert') != NULL) :

	$alert = $this->session->flashdata('alert');
	if($alert['status']=='error'){
		$alert['status'] = 'danger';
	}

?>
<div class="alert alert-<?= $alert['status']; ?> fade in">
	<a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
    <?= $alert['message']; ?>
</div>
<?php 
$this->session->unset_userdata('alert');
endif; ?>