PhpGedView : changelog ($search)\n"; $text = file_get_contents("changelog.txt"); $wait = @file_get_contents("changelog.local.txt"); $text = $wait.$text; // disable HTML tags $text = preg_replace("/", "<", $text); $text = preg_replace("/>/", ">", $text); // highlight search text (caseless) if (!empty($search)) { $text = preg_replace("/(.*)(?i)($search)(.*)\\n/", "\\0", $text); $text = preg_replace("/(?i)$search/", "\\0", $text); } // add link to tracker $text = preg_replace("/RFE(\d{6,7})/", "RFE \\1", $text); // RFE1234567 ==> RFE 1234567 $text = preg_replace("/#(\d{6,7})/", "# \\1", $text); // #1234567 ==> # 1234567 $text = preg_replace("/\[(\d{6,7})/", "[ \\1", $text); // [1234567 ==> [ 1234567 $text = preg_replace("/(\d{6,7})\]/", "\\1 ]", $text); // 1234567] ==> 1234567 ] $text = preg_replace("/\((\d{6,7})/", "( \\1", $text); // (1234567 ==> ( 1234567 $text = preg_replace("/(\d{6,7})\)/", "\\1 )", $text); // 1234567) ==> 1234567 ) $text = preg_replace("/(\d{6,7})\,/", "\\1 ,", $text); // 1234567, ==> 1234567 , $text = preg_replace("/ (\d{6,7}) /", " \\1 ", $text); $text = preg_replace("/ \(([-\w]{4,13})\)\r\n/", " (\\1)\r\n", $text); $text = preg_replace("/ /", " ", $text); print "
\n$text\n\n"; ?>