Вход Регистрация
Файл: public_html/sys/fnc/bbcode.php
Строк: 469
<?
function bbcodehightlight($arr)
{
$arr[0]=html_entity_decode($arr[0], ENT_QUOTES'UTF-8');
return 
'<div class="cit" style="overflow:scroll;clip:auto;max-width:480px;">'.preg_replace('#<code>(.*?)</code>#si''\1' ,highlight_string($arr[0],1)).'</div>'."n";
}



function 
BBcode($msg)
{




$bbcode = array(
'/[i](.+)[/i]/isU' => '<em>$1</em>',
'/[b](.+)[/b]/isU' => '<strong>$1</strong>',
'/[u](.+)[/u]/isU' => '<span style="text-decoration:underline;">$1</span>',
'/[ut](.+)[/ut]/isU' => '<span style="border-bottom: 1px dotted;">$1</span>',
'/[xx-small](.+)[/xx-small]/isU' => '<span style="font-size:xx-small;">$1</span>',
'/[x-small](.+)[/x-small]/isU' => '<span style="font-size:x-small;">$1</span>',
'/[in](.+)[/in]/isU' => '<input type="text" value="$1" />',
'/[das](.+)[/das]/isU' => '<span style="border:1px dashed;">$1</span>',
'/[marq](.+)[/marq]/isU' => '<marquee>$1</marquee>',
'/[c](.+)[/c]/isU' => '<center>$1</center>',
'/[sol](.+)[/sol]/isU' => '<span style="border:1px solid;">$1</span>',
'/[ex](.+)[/ex]/isU' => '<span style="text-decoration:line-through;">$1</span>',
'/[up](.+)[/up]/isU' => '<span style="text-decoration:overline;">$1</span>',
'/[bl](.+)[/bl]/isU' => '<span style="text-decoration:blink;">$1</span>',
'/[bblue](.+)[/bblue]/isU' => '<span style="background-color : blue;">$1</span>',
'/[byellow](.+)[/byellow]/isU' => '<span style="background-color : yellow;">$1</span>',
'/[bbrown](.+)[/bbrown]/isU' => '<span style="background-color : brown;">$1</span>',
'/[bwhite](.+)[/bwhite]/isU' => '<span style="background-color : white;">$1</span>',
'/[borange](.+)[/borange]/isU' => '<span style="background-color : orange;">$1</span>',
'/[bblack](.+)[/bblack]/isU' => '<span style="background-color : black;">$1</span>',
'/[bgrey](.+)[/bgrey]/isU' => '<span style="background-color : grey;">$1</span>',
'/[bpink](.+)[/bpink]/isU' => '<span style="background-color : pink;">$1</span>',
'/[bviolet](.+)[/bviolet]/isU' => '<span style="background-color : violet;">$1</span>','/[bblue](.+)[/bblue]/isU' => '<span style="background-color : blue;">$1</span>',
'/[byellow](.+)[/byellow]/isU' => '<span style="background-color : yellow;">$1</span>',
'/[bbrown](.+)[/bbrown]/isU' => '<span style="background-color : brown;">$1</span>',
'/[bwhite](.+)[/bwhite]/isU' => '<span style="background-color : white;">$1</span>',
'/[borange](.+)[/borange]/isU' => '<span style="background-color : orange;">$1</span>',
'/[bblack](.+)[/bblack]/isU' => '<span style="background-color : black;">$1</span>',
'/[bgrey](.+)[/bgrey]/isU' => '<span style="background-color : grey;">$1</span>',
'/[bpink](.+)[/bpink]/isU' => '<span style="background-color : pink;">$1</span>',
'/[bviolet](.+)[/bviolet]/isU' => '<span style="background-color : violet;">$1</span>','/[bred](.+)[/bred]/isU' => '<span style="background-color : red;">$1</span>',
'/[bgreen](.+)[/bgreen]/isU' => '<span style="background-color : green;">$1</span>','/[big](.+)[/big]/isU' => '<span style="font-size:large;">$1</span>',
'/[das](.+)[/das]/isU' => '<span style="border:1px dashed;">$1</span>',
'/[dot](.+)[/dot]/isU' => '<span style="border:1px dotted;">$1</span>',
'/[dou](.+)[/dou]/isU' => '<span style="border:3px double #E1E1E4;">$1</span>','/[dot](.+)[/dot]/isU' => '<span style="border:1px dotted;">$1</span>',
'/[scr-w](.+)[/scr-w]/isU' => '<span style="background-color:#ffffff;"><span style="color:#ffffff;"><span style="border:1px dashed;">$1</span></span></span>',
'/[scr-b](.+)[/scr-b]/isU' => '<span style="background-color:#000000;"><span style="color:#000000;"><span style="border:1px dashed;">$1</span></span></span>',
'/[dou](.+)[/dou]/isU' => '<span style="border:3px double #E1E1E4;">$1</span>',
'/[dou](.+)[/dou]/isU' => '<span style="border:3px double #E1E1E4;">$1</span>',
'/[big](.+)[/big]/isU' => '<span style="font-size:large;">$1</span>',
'/[small](.+)[/small]/isU' => '<span style="font-size:small;">$1</span>',
'/[code](.+)[/code]/isU' => '<code>$1</code>',
'/[f=([0-9]+)/([0-9]+)/([0-9]+)](.+)[/f]/isU' => "<a href='/forum/$1/$2/$3'>$4</a>",
'/[u=([0-9]+)](.+)[/u]/isU' => "<a href='/info.php?id=$1'>$2</a>",
'/[red](.+)[/red]/isU' => '<span style="color:#ff0000;">$1</span>',
'/[yellow](.+)[/yellow]/isU' => '<span style="color:#ffff22;">$1</span>',
'/[green](.+)[/green]/isU' => '<span style="color:#00bb00;">$1</span>',
'/[blue](.+)[/blue]/isU' => '<span style="color:#0000bb;">$1</span>',
'/[brown](.+)[/brown]/isU' => '<span style="color:brown;">$1</span>',
'/[white](.+)[/white]/isU' => '<span style="color:#ffffff;">$1</span>',
'/[black](.+)[/black]/isU' => '<span style="color:black;">$1</span>',
'/[orange](.+)[/orange]/isU' => '<span style="color:orange;">$1</span>',
'/[pink](.+)[/pink]/isU' => '<span style="color:pink;">$1</span>',
'/[violet](.+)[/violet]/isU' => '<span style="color:violet;">$1</span>',
'/[gray](.+)[/gray]/isU' => '<span style="color:gray;">$1</span>',
'/[size=([0-9]+)](.+)[/size]/isU' => '<span style="font-size:$1px;">$2</span>',
'/[maroon](.+)[/maroon]/isU' => '<span style="color:maroon;">$1</span>',
'/[teal](.+)[/teal]/isU' => '<span style="color:teal;">$1</span>',
'/[scarlet](.+)[/scarlet]/isU' => '<span style="color:scarlet;">$1</span>',
'/[carmine](.+)[/carmine]/isU' => '<span style="color:carmine;">$1</span>',
'/[vermilion](.+)[/vermilion]/isU' => '<span style="color:vermilion;">$1</span>',
'/[alizarin](.+)[/alizarin]/isU' => '<span style="color:alizarin;">$1</span>',
'/[chestnut](.+)[/chestnut]/isU' => '<span style="color:chestnut;">$1</span>',
'/[crimson](.+)[/crimson]/isU' => '<span style="color:crimson;">$1</span>',
'/[darkcoral](.+)[/darkcoral]/isU' => '<span style="color:darkcoral;">$1</span>',
'/[burntsiena](.+)[/burntsiena]/isU' => '<span style="color:burntsiena;">$1</span>',
'/[burntsiena](.+)[/burntsiena]/isU' => '<span style="color:burntsiena;">$1</span>',
'/[coral](.+)[/coral]/isU' => '<span style="color:coral;">$1</span>',
'/[salmon](.+)[/salmon]/isU' => '<span style="color:salmon;">$1</span>',
'/[pinkorange](.+)[/pinkorange]/isU' => '<span style="color:#ff9966;">$1</span>',
'/[palepink](.+)[/palepink]/isU' => '<span style="color:palepink;">$1</span>',
'/[lavenderblush](.+)[/lavenderblush]/isU' => '<span style="color:lavenderblush;">$1</span>',
'/[carrot](.+)[/carrot]/isU' => '<span style="color:carrot;">$1</span>',
'/[jaco](.+)[/jaco]/isU' => '<span style="color:jaco;">$1</span>',
'/[tangerine](.+)[/tangerine]/isU' => '<span style="color:#ff8800;">$1</span>',
'/[margarine](.+)[/margarine]/isU' => '<span style="color:margarine;">$1</span>',
'/[safetyorange](.+)[/safetyorange]/isU' => '<span style="color:safetyorange;">$1</span>',
'/[palebrown](.+)[/palebrown]/isU' => '<span style="color:#987654;">$1</span>',
'/[palebrown](.+)[/palebrown]/isU' => '<span style="color:#442d25;">$1</span>',
'/[coffee](.+)[/coffee]/isU' => '<span style="color:#442d25;">$1</span>',
'/[bistre](.+)[/bistre]/isU' => '<span style="color:#3d2b1f;">$1</span>',
'/[cinnamon](.+)[/cinnamon]/isU' => '<span style="color:cinnamon;">$1</span>',
'/[byron](.+)[/byron]/isU' => '<span style="color:byron;">$1</span>',
'/[sepia](.+)[/sepia]/isU' => '<span style="color:sepia;">$1</span>',
'/[umber](.+)[/umber]/isU' => '<span style="color:umber;">$1</span>',
'/[schoolbus](.+)[/schoolbus]/isU' => '<span style="color:#ff8d00;">$1</span>',
'/[gold](.+)[/gold]/isU' => '<span style="color:gold;">$1</span>',
'/[mustard](.+)[/mustard]/isU' => '<span style="color:#ffdb58;">$1</span>',
'/[sandybrown](.+)[/sandybrown]/isU' => '<span style="color:#fcdd78;">$1</span>',
'/[lemon](.+)[/lemon]/isU' => '<span style="color:#fde910;">$1</span>',
'/[lime](.+)[/lime]/isU' => '<span style="color:lime;">$1</span>',
'/[olive](.+)[/olive]/isU' => '<span style="color:olive;">$1</span>',
'/[asparagus](.+)[/asparagus]/isU' => '<span style="color:asparagus;">$1</span>',
'/[ferngreen](.+)[/ferngreen]/isU' => '<span style="color:#4f7942;">$1</span>',
'/[toadinlove](.+)[/toadinlove]/isU' => '<span style="color:toadinlove;">$1</span>',
'/[vertdepomme](.+)[/vertdepomme]/isU' => '<span style="color:#34c924;">$1</span>',
'/[brightgreen](.+)[/brightgreen]/isU' => '<span style="color:#66ff00;">$1</span>',
'/[pistachio](.+)[/pistachio]/isU' => '<span style="color:#bef574;">$1</span>',
'/[greenyellow](.+)[/greenyellow]/isU' => '<span style="color:#adff2f;">$1</span>',
'/[chartreuse](.+)[/chartreuse]/isU' => '<span style="color:chartreuse;">$1</span>',
'/[mossgreen](.+)[/mossgreen]/isU' => '<span style="color:mossgreen;">$1</span>',
'/[palegreen](.+)[/palegreen]/isU' => '<span style="color:palegreen;">$1</span>',
'/[darkspringgreen](.+)[/darkspringgreen]/isU' => '<span style="color:#177245;">$1</span>',
'/[jade](.+)[/jade]/isU' => '<span style="color:jade;">$1</span>',
'/[navy](.+)[/navy]/isU' => '<span style="color:navy;">$1</span>',
'/[aqua](.+)[/aqua]/isU' => '<span style="color:aqua;">$1</span>',
'/[moray](.+)[/moray]/isU' => '<span style="color:moray;">$1</span>',
'/[pinegreen](.+)[/pinegreen]/isU' => '<span style="color:#01796f;">$1</span>',
'/[robineggblue](.+)[/robineggblue]/isU' => '<span style="color:#00cccc;">$1</span>',
'/[turquoise](.+)[/turquoise]/isU' => '<span style="color:turquoise;">$1</span>',
'/[brightturquoise](.+)[/brightturquoise]/isU' => '<span style="color:#08e0de;">$1</span>',
'/[electric](.+)[/electric]/isU' => '<span style="color:#7df9ff;">$1</span>',
'/[paleblue](.+)[/paleblue]/isU' => '<span style="color:#afeeee;">$1</span>',
'/[sapphire](.+)[/sapphire]/isU' => '<span style="color:#082567;">$1</span>',
'/[powderblue](.+)[/powderblue]/isU' => '<span style="color:powderblue;">$1</span>',
'/[blacksea](.+)[/blacksea]/isU' => '<span style="color:#1a4780;">$1</span>',
'/[cobalt](.+)[/cobalt]/isU' => '<span style="color:cobalt;">$1</span>',
'/[denim](.+)[/denim]/isU' => '<span style="color:#0047ab;">$1</span>',
'/[royalblue](.+)[/royalblue]/isU' => '<span style="color:royalblue;">$1</span>',
'/[kleinblue](.+)[/kleinblue]/isU' => '<span style="color:#3a75c4;">$1</span>',
'/[azure](.+)[/azure]/isU' => '<span style="color:#007fff;">$1</span>',
'/[purple](.+)[/purple]/isU' => '<span style="color:purple;">$1</span>',
'/[amethyst](.+)[/amethyst]/isU' => '<span style="color:amethyst;">$1</span>',
'/[seroburomalinovyj](.+)[/seroburomalinovyj]/isU' => '<span style="color:#735184;">$1</span>',
'/[darkviolet](.+)[/darkviolet]/isU' => '<span style="color:#423181;">$1</span>',
'/[indigo](.+)[/indigo]/isU' => '<span style="color:indigo;">$1</span>',
'/[plum](.+)[/plum]/isU' => '<span style="color:plum;">$1</span>',
'/[silver](.+)[/silver]/isU' => '<span style="color:silver;">$1</span>',
'/[wetasphalt](.+)[/wetasphalt]/isU' => '<span style="color:#505050;">$1</span>',
'/[anthracite](.+)[/anthracite]/isU' => '<span style="color:#808080;">$1</span>',
'/[slategray](.+)[/slategray]/isU' => '<span style="color:slategray;">$1</span>',
'/[lightgrey](.+)[/slategray]/isU' => '<span style="color:lightgrey;">$1</span>',
'/[quartz](.+)[/quartz]/isU' => '<span style="color:quartz;">$1</span>',
'/[img](.+)[/img]/isU' => '<img src="$1" alt="" />'
);
$msgpreg_replace(array_keys($bbcode), array_values($bbcode), $msg);


$msg=preg_replace_callback('#<?(.*?)?>#sui''bbcodehightlight'$msg);
$msg=preg_replace('#[code](.*?)[/code]#si''1'$msg);

return 
$msg;
}
?>
Онлайн: 1
Реклама