initial draft of the achievement system
This commit is contained in:
36
homepage/machs/lib/achievementsLib.php
Normal file
36
homepage/machs/lib/achievementsLib.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user