function blackbox($Text) {
$Text=trim($Text);
$Text=htmlspecialchars($Text);
$Text=ereg_replace("\n","",$Text);
$Text=ereg_replace("\|","│",$Text);
$Text=preg_replace("/\\t/is"," ",$Text);
$Text=preg_replace("/\[color=(.+?)\](.+?)\[\/color\]/is","\\2",$Text);
$Text=preg_replace("/\[i\](.+?)\[\/i\]/is","\\1",$Text);
$Text=preg_replace("/\[b\](.+?)\[\/b\]/is","\\1",$Text);
$Text=stripslashes($Text);
return $Text;
}
function goback($message){
echo "".$message."请返回\n\n\n";
}
function write_file($file,$data,$method){
$fp=@fopen($file,$method);
fwrite($fp,$data);
fclose($fp);
}
function getip() {
$IP=getenv('REMOTE_ADDR');
$IP_ = getenv('HTTP_X_FORWARDED_FOR');
if (($IP_ != "") && ($IP_ != "unknown")) $IP=$IP_;
return $IP;
}
function gothere($msg,$link,$url){
echo "".$msg."".$link."\n";
}
function get_style_info($style){
$fp=fopen($style, "r");
$pic_info=fgets($fp,1024);
fclose($fp);
$pic_info=str_replace("/*","",$pic_info);
$pic_info=str_replace("*/","",$pic_info);
$pic_info=trim($pic_info);
$pic_info=explode(",",$pic_info);
return $pic_info;
}
?>