*
{bold}, {endbold}: All text between these tags is printed bold.
*
{color=#123456}, {endcolor}: All text between these tags is printed in the given color.
*
{link=http://nodomain.org}, {endlink}: A link with the given target is created. The link text is the text between the tags.
*
* @param string $MessageTyp The type of the message to be printed. It must be one of
* the following types: 'INFO', 'WARN' or 'ERROR'.
*
Every other type will lead to an error message indicating an invalid message type.
* @param string $MessageHeadline The headline of the status message.
*
It may be formatted with special color/link/bold tags.
* @param string $MessageText The text of the status message.
*
It may be formatted with special color/link/bold tags. This parameter is optional.
* @param array $MessageVariables The variables that are used to replace the spacers (%s) in the
* submitted text. This parameter is optional.
*/
function StatusMessage($MessageTyp,$MessageHeadline,$MessageText='',$MessageVariables = array()) {
/* Setting CSS-StyleSheet class depending on the $MessageTyp and rewriting $MessageTyp with a readable string. */
if($MessageTyp == "INFO") {
$class = "class=\"statusInfo\"";
}
elseif($MessageTyp == "WARN") {
$class = "class=\"statusWarn\"";
}
elseif($MessageTyp == "ERROR") {
$class = "class=\"statusError\"";
}
/* Set output-message, when none or false $MessageTyp is submitted. */
else {
$class = "class=\"statusError\"";
$MessageTyp = _("LAM Internal Error");
$MessageHeadline = _("Invalid/Missing Message type");
$MessageText = _("Please report this error to the Bug-Tracker at {link=http://lam.sourceforge.net}LDAP Account Manager Development Team{endlink}. The error number is {bold}0001:Invalid/Missing Message type.{endbold} Thank you.");
}
$MessageHeadline = parseMessageString($MessageHeadline);
$MessageText = parseMessageString($MessageText);
if (is_file("../graphics/error.png")) {
$MessageTyp = "";
}
else {
$MessageTyp = "";
}
$MessageHeadline = "
" . $MessageText . "
"; // Format $MessageText $format = "" . $MessageTyp . " | \n" . $MessageHeadline . $MessageText . " | \n