uccode = array( 'pcodecount' => -1, 'codecount' => 0, 'codehtml' => '' ); } function codedisp($code) { $this->uccode['pcodecount']++; $code = str_replace('\\"', '"', preg_replace("/^[\n\r]*(.+?)[\n\r]*$/is", "\\1", $code)); $this->uccode['codehtml'][$this->uccode['pcodecount']] = $this->tpl_codedisp($code); $this->uccode['codecount']++; return "[\tUCENTER_CODE_".$this->uccode[pcodecount]."\t]"; } function complie($message) { $message = htmlspecialchars($message); if(strpos($message, '[/code]') !== FALSE) { $message = preg_replace("/\s*\[code\](.+?)\[\/code\]\s*/ies", "\$this->codedisp('\\1')", $message); } if(strpos($message, '[/url]') !== FALSE) { $message = preg_replace("/\[url(=((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|ed2k|thunder|synacast){1}:\/\/|www\.)([^\[\"']+?))?\](.+?)\[\/url\]/ies", "\$this->parseurl('\\1', '\\5')", $message); } if(strpos($message, '[/email]') !== FALSE) { $message = preg_replace("/\[email(=([a-z0-9\-_.+]+)@([a-z0-9\-_]+[.][a-z0-9\-_.]+))?\](.+?)\[\/email\]/ies", "\$this->parseemail('\\1', '\\4')", $message); } $message = str_replace(array( '[/color]', '[/size]', '[/font]', '[/align]', '[b]', '[/b]', '[i]', '[/i]', '[u]', '[/u]', '[list]', '[list=1]', '[list=a]', '[list=A]', '[*]', '[/list]', '[indent]', '[/indent]', '[/float]' ), array( '', '', '', '

', '', '', '', '', '', '', '