<?php
# вывод ошибок
function err() {
global $err;
if (isset($err)) {
if (is_array($err)) {
foreach ($err as $key => $value) {
echo "<div class='list-group-item'>";
echo "<div class='label label-danger'>$value</div>";
echo "</div>";
}
} else {
echo "<div class='list-group-item'>";
echo "<div class='label label-danger'>$err</div>";
echo "</div>";
}
}
}