diff --git a/index.css b/index.css index 4443f61..3225c4d 100644 --- a/index.css +++ b/index.css @@ -149,6 +149,10 @@ a.tool { color: #eeeeee; } +a.missing-link { + color: #ba0000; +} + input.tool { font-size: 11px; color: #000000; diff --git a/index.php b/index.php index e1313ac..4b4d5fe 100644 --- a/index.php +++ b/index.php @@ -84,7 +84,13 @@ function _handle_links($match) { - return "" . htmlentities($match[1]) . ""; + $link_page = $match[1]; + $link_filename = PAGES_PATH . "/$link_page.txt"; + $link_page_exists = file_exists($link_filename); + if ($link_page_exists) + return "" . htmlentities($link_page) . ""; + else + return "" . htmlentities($link_page) . ""; } @@ -246,6 +252,7 @@ function file_put_contents($n, $d) $page = DEFAULT_PAGE; $filename = PAGES_PATH . "/$page.txt"; +$text = ""; if ( file_exists($filename) ) {