", $text); $text = str_replace("[/b]", "", $text); $text = str_replace("[i]", "", $text); $text = str_replace("[/i]", "", $text); $text = str_replace("[title]", "

", $text); $text = str_replace("[/title]", "

", $text); $text = str_replace("[smalltitle]", "

", $text); $text = str_replace("[/smalltitle]", "

", $text); $text = str_replace("[ol]", "
    ", $text); $text = str_replace("[/ol]", "
", $text); $text = str_replace("[ul]", "", $text); $text = str_replace("[li]", "
  • ", $text); $text = str_replace("[/li]", "
  • ", $text); $text = preg_replace("/\[a=(.*)\](.*)\[\/a\]/U", "\\2", $text); $text = str_replace("[line]", "\"Separator\"", $text); $text = str_replace("[line2]", "\"Separator\"", $text); $text = str_replace("&", "&", $text); # Images preg_match_all("/\[img=([0-9]*)([lrLRcC])\]/", $text, $Aimgids); foreach($Aimgids[1] as $key => $value){ $Qimg = mysql_query("select `filename`, `text`, `description` from `gallery` where `id` = '".$value."'"); $img = mysql_fetch_assoc($Qimg); # Align if($Aimgids[2][$key] == "l" or $Aimgids[2][$key] == "L"){ $align = "left"; }else if($Aimgids[2][$key] == "r" or $Aimgids[2][$key] == "R"){ $align = "right"; }else{ $align = "center"; } $text = str_replace($Aimgids[0][$key], "
    \"".$img['text']."\"
    ".$img['description']."
    ", $text); } # Articles preg_match_all("/\[article=([0-9]*)\]/", $text, $Aarticles); foreach($Aarticles[1] as $key => $value){ $Qart = mysql_query("select `title` from `articles` where `id` = '".$value."'"); $art = mysql_fetch_assoc($Qart); $text = str_replace($Aarticles[0][$key], "".$art['title']."", $text); } $text = str_replace("\n", "
    ", $text); return $text; } function current_page(){ $c_page = $_SERVER['PHP_SELF']; $last_slash = strrpos($c_page, "/"); $dot = strrpos($c_page, "."); $len = $dot - $last_slash - 1; $c_page = substr($c_page, $last_slash + 1, $len); return $c_page; } function eskaper($text){ $text = mysql_real_escape_string($text); return $text; } function datefix($timestamp){ $date = date("d.m.Y", $timestamp); return $date; } function fixurls($url){ $url = str_replace(":", "", $url); $url = str_replace(" ", "_", $url); return $url; } ?>