", "[em]", $text);
$text = str_replace("", "[/em]", $text);
$text = str_replace("
", "[pre]", $text);
$text = str_replace("
", "[/pre]", $text);
$text = str_replace("", "[strong]", $text);
$text = str_replace("", "[/strong]", $text);
$text = str_replace("", "[/a]", $text);
$text = ereg_replace("", "[a href=#\\1#]", $text);
$text = htmlentities($text);
$text = ereg_replace("\[a href=#([^#]*)#\]", "", $text);
$text = str_replace("[/a]", "", $text);
$text = str_replace("[em]", "", $text);
$text = str_replace("[/em]", "", $text);
$text = str_replace("[pre]", "", $text);
$text = str_replace("[/pre]", "
", $text);
$text = str_replace("[strong]", "", $text);
$text = str_replace("[/strong]", "", $text);
return $text;
}
function show() {
global $global_mode, $_colors;
if (empty ($messages))
return;
if ($global_mode == "web")
echo "\n
\n";
foreach ($messages as $message) {
if (empty ($message))
continue;
list ($text, $type) = $message;
if ($global_mode == "web") {
$text = myStripTags($text);
$text = nl2br($text);
}
elseif ($global_mode == "eislist") {
$text = str_replace("\n", "\n# ", $text);
$text = br2nl($text);
}
if ($type == "info" && $global_mode == "web") {
echo "- INFO: " . $text . "
\n";
}
elseif ($type == "info" && $global_mode == "console") {
echo $_colors["BOLD"] . $_colors["GREEN"] . $_colors["BOLD"] . "INFO: " . strip_tags($text) . $_colors["NORMAL"] . "\n";
}
elseif ($type == "info" && $global_mode == "eislist") {
echo "# INFO: " . strip_tags($text, "") . "\n";
}
elseif ($type == "info" && $global_mode == "text") {
echo "INFO: " . strip_tags(html_entity_decode($text)) . "\n";
}
elseif ($type == "warning" && $global_mode == "web") {
echo "- WARNUNG: " . $text . "
\n";
}
elseif ($type == "warning" && $global_mode == "console") {
echo $_colors["BOLD"] . "WARNING: " . strip_tags($text) . $_colors["NORMAL"] . "\n";
}
elseif ($type == "warning" && $global_mode == "eislist") {
echo "# WARNING: " . strip_tags($text, "") . "\n";
}
elseif ($type == "warning" && $global_mode == "text") {
echo "WARNING: " . strip_tags(html_entity_decode($text)) . "\n";
}
elseif ($type == "error" && $global_mode == "web") {
echo "- ERROR: " . $text . "
\n";
}
elseif ($type == "error" && $global_mode == "console") {
echo $_colors["BOLD"] . $_colors["LIGHT_RED"] . $_colors["BOLD"] . "ERROR: " . strip_tags($text) . $_colors["NORMAL"] . "\n";
}
elseif ($type == "error" && $global_mode == "eislist") {
echo "# ERROR: " . strip_tags($text, "") . "\n";
}
elseif ($type == "error" && $global_mode == "text") {
echo "ERROR: " . strip_tags(html_entity_decode($text)) . "\n";
} else {
echo "Fehler in der Funktion msg(): " . $text;
}
}
if ($global_mode == "web")
echo "
\n
\n";
unset($messages);
}
}
?>