<?php 
/**
 * Screen common\message
 * @version 1.0.1
 * @package Base
 * 
*/

	$notifications = getNotifications();
 	if ($notifications != null && count($notifications)>0) {
 		$errors = null;
 		$infos = null;
 		$oks = null;
		foreach ($notifications as $msg) {
			
			switch ($msg->type) {

				case Notification::TYPE_ERROR: ?>
					<div class="alert alert-danger"><?= $msg->message ?></div>
				<?php 
					break;
				case Notification::TYPE_OK: ?>
					<div class="alert alert-success"><?= $msg->message ?></div>
				<?php 
					break;
				case Notification::TYPE_WARNING: ?>
					<div class="alert alert-info"><?= $msg->message ?></div>
				<?php 
					break;				
			}
		}
			 
 	}
	if ($this->data['pvars']['message']) {?>

		<div class="alert alert-danger"><?= $this->data['pvars']['message'] ?></div>

<?php } ?>