if($data[1]!==$config_guestsuser){ //отключаем bb-код для гостей$data[0] = preg_replace('#\[url[\s]*=[\s]*([\S]+)[\s]*\][\s]*([^\[]*)\[/url\]#isU ','<a href="\\1" target=_blank>\\2</a>', $data[0]);$data[0]=eregi_replace("(.*)\\[a\\](.*)\\[/a\\](.*)" ,"\\1<a href=\"\\2 \">\\2</a>\\3",$data[0]);$data[0]=eregi_replace("(.*)\\[c=(.*)\\](.*)\ \[/c\\](.*)" ,"\\1<font color=\"\\2\">\\3</font>\\4",$data[0]);$data[0]=preg_replace("#\\[1\\] (.*?)\\[/1\\]#si" ,"<font color=\"ff0000\">\\1</font>",$data[0]);$data[0]=preg_replace("#\\[2\\] (.*?)\\[/2\\]#si" ,"<font color=\"ffff00\">\\1</font>",$data[0]);$data[0]=preg_replace("#\\[3\\] (.*?)\\[/3\\]#si" ,"<font color=\"008800\">\\1</font>",$data[0]);$data[0]=preg_replace("#\\[4\\] (.*?)\\[/4\\]#si" ,"<font color=\"7700ff\">\\1</font>",$data[0]);$data[0]=preg_replace("#\\[5\\] (.*?)\\[/5\\]#si" ,"<font color=\"000077\">\\1</font>",$data[0]);$data[0]=preg_replace("#\\[0\\] (.*?)\\[/0\\]#si" ,"<font color=\"ffffff\">\\1</font>",$data[0]);}