Hallo,
ich bekomme echt die krise.
wie kann ich das reparieren???
hier ein beispiel:
http://www.gratis-welt.de/index.php?seite=ws&ws_id=4
bbcode.php
[code]
<?php
function bbcode($s)
{
$s = sonderzeichen($s);
$s = php($s);
$s = format_text($s);
$s = url($s);
$s = php($s);
$s = email($s);
$s = Zitat($s);
$s = Liste($s);
$s = Align($s);
$s = code($s);
$s = left_right($s);
$s = nl2br($s);
return $s;
}
function Zitat($s)
{
$eins = "<table width=\"95%\" align=\"center\"><tr><td style=\"padding:5px; border:0px; font-family:'Verdana',sans-serif; font-size:10px;\">";
$zwei = "</td></tr><tr><td style=\"padding:5px; background-color:#ffffff; border:1px solid #666666;\">";
$drei = "</td></tr></table>";
$s = preg_replace('=\[quote\](.*^\[)\[\/quote\]=Uims',$eins.'Zitat:'.$zwei.'\\1'.$drei,$s);
$s = preg_replace('=\[quote\=([a-zA-Z0-9\_\.\&\$]{1,})\](.*)\[\/quote\]=Uims',$eins.'\\1 hat geschrieben:'.$zwei.'\\2'.$drei,$s);
return $s;
}
function Align($s)
{
$s = preg_replace('=\[align\=(.*)\](.*)\[\/align]=Uims','<div align="\\1">\\2</div>',$s);
return $s;
}
function Liste($s)
{
while(preg_match('=\[list\](.*)\[\*\](.*)\[\/list\]=Uims',$s))
$s = preg_replace('=(\[list\])(.*)\[\*\](.*)(\[\/list\])=Uims','\\1\\2[*]\\3\\4',$s);
$s = preg_replace('=\[list\](.*)\[\/list\]=Uims','<ul>\\1[/list]',$s);
while(preg_match('=\[list\=(.*)\](.*)\[\*\](.*)\[\/list\]=Uims',$s))
$s = preg_replace('=(\[list\=.*\])(.*)\[\*\](.*)(\[\/list\])=Uims','\\1\\2[*]\\3\\4',$s);
$s = preg_replace('=\[list\=(.*)\](.*)\[\/list\]=Uims','
return $s;
}
function sonderzeichen($s)
{
$zuers = array("&", "ä", "ö", "ü", "Ä", "Ö", "Ü", "ß", "<", ">", "€", "", "¹", "²", "³");
$ersetz = array("&", "ä", "ö", "ü", "Ä", "Ö", "Ü", "ß", "<", ">", "€", "
ich bekomme echt die krise.
wie kann ich das reparieren???
hier ein beispiel:
http://www.gratis-welt.de/index.php?seite=ws&ws_id=4
bbcode.php
[code]
<?php
function bbcode($s)
{
$s = sonderzeichen($s);
$s = php($s);
$s = format_text($s);
$s = url($s);
$s = php($s);
$s = email($s);
$s = Zitat($s);
$s = Liste($s);
$s = Align($s);
$s = code($s);
$s = left_right($s);
$s = nl2br($s);
return $s;
}
function Zitat($s)
{
$eins = "<table width=\"95%\" align=\"center\"><tr><td style=\"padding:5px; border:0px; font-family:'Verdana',sans-serif; font-size:10px;\">";
$zwei = "</td></tr><tr><td style=\"padding:5px; background-color:#ffffff; border:1px solid #666666;\">";
$drei = "</td></tr></table>";
$s = preg_replace('=\[quote\](.*^\[)\[\/quote\]=Uims',$eins.'Zitat:'.$zwei.'\\1'.$drei,$s);
$s = preg_replace('=\[quote\=([a-zA-Z0-9\_\.\&\$]{1,})\](.*)\[\/quote\]=Uims',$eins.'\\1 hat geschrieben:'.$zwei.'\\2'.$drei,$s);
return $s;
}
function Align($s)
{
$s = preg_replace('=\[align\=(.*)\](.*)\[\/align]=Uims','<div align="\\1">\\2</div>',$s);
return $s;
}
function Liste($s)
{
while(preg_match('=\[list\](.*)\[\*\](.*)\[\/list\]=Uims',$s))
$s = preg_replace('=(\[list\])(.*)\[\*\](.*)(\[\/list\])=Uims','\\1\\2[*]\\3\\4',$s);
$s = preg_replace('=\[list\](.*)\[\/list\]=Uims','<ul>\\1[/list]',$s);
while(preg_match('=\[list\=(.*)\](.*)\[\*\](.*)\[\/list\]=Uims',$s))
$s = preg_replace('=(\[list\=.*\])(.*)\[\*\](.*)(\[\/list\])=Uims','\\1\\2[*]\\3\\4',$s);
$s = preg_replace('=\[list\=(.*)\](.*)\[\/list\]=Uims','
- \\2
return $s;
}
function sonderzeichen($s)
{
$zuers = array("&", "ä", "ö", "ü", "Ä", "Ö", "Ü", "ß", "<", ">", "€", "", "¹", "²", "³");
$ersetz = array("&", "ä", "ö", "ü", "Ä", "Ö", "Ü", "ß", "<", ">", "€", "
Kommentar