37 lines
1.1 KiB
PHP
37 lines
1.1 KiB
PHP
<?php
|
|
// Eine Fehler/Warnung/Notiz/Erfolgsmeldung als divBox im String zurückgeben
|
|
function htmlRetMessage($anRetMessage){
|
|
$retHtmlString = "";
|
|
if( !empty($anRetMessage) ){
|
|
$retHtmlString .= "<div style=\"border: 1px solid;\">";
|
|
if( !empty($anRetMessage['error']) ){
|
|
$retHtmlString .= "<div style=\"border: 1px solid;\">";
|
|
$retHtmlString .= "ERROR:<br />";
|
|
$retHtmlString .= $anRetMessage['error'];
|
|
$retHtmlString .= "</div>";
|
|
}
|
|
if( !empty($anRetMessage['warning']) ){
|
|
$retHtmlString .= "<div style=\"border: 1px solid;\">";
|
|
$retHtmlString .= "WARNING:<br />";
|
|
$retHtmlString .= $anRetMessage['warning'];
|
|
$retHtmlString .= "</div>";
|
|
}
|
|
if( !empty($anRetMessage['notice']) ){
|
|
$retHtmlString .= "<div style=\"border: 1px solid;\">";
|
|
$retHtmlString .= "Info:<br />";
|
|
$retHtmlString .= $anRetMessage['notice'];
|
|
$retHtmlString .= "</div>";
|
|
}
|
|
if( !empty($anRetMessage['success']) ){
|
|
$retHtmlString .= "<div style=\"border: 1px solid;\">";
|
|
$retHtmlString .= "SUCCESS:<br />";
|
|
$retHtmlString .= $anRetMessage['success'];
|
|
$retHtmlString .= "</div>";
|
|
}
|
|
$retHtmlString .= "</div>";
|
|
}
|
|
// print_r($anRetMessage);
|
|
return $retHtmlString;
|
|
}
|
|
?>
|