diff options
author | neoraider <devnull@localhost> | 2006-01-12 23:18:03 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2006-01-12 23:18:03 +0100 |
commit | ecb8233cd7e9fbacd7614028115161565e841d87 (patch) | |
tree | d99bda8ce61f34a158470ff23e3da7c678f5a705 /code/links.inc.php | |
parent | 73d5e907a797e976e59f328d4f2fd0b8bfcebde6 (diff) | |
download | neon-ecb8233cd7e9fbacd7614028115161565e841d87.tar neon-ecb8233cd7e9fbacd7614028115161565e841d87.zip |
Die Navigationsleiste ist jetzt eingebaut. Viele Bugs wurden gel?st und einiges ?berarbeitet.
Diffstat (limited to 'code/links.inc.php')
-rw-r--r-- | code/links.inc.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/code/links.inc.php b/code/links.inc.php new file mode 100644 index 0000000..ab3b786 --- /dev/null +++ b/code/links.inc.php @@ -0,0 +1,36 @@ +<?PHP + if(!defined('LINKS_INC')) { + define('LINKS_INC', 1); + + class Links { + function GetNeonLink($page) { + return 'index.php?page=' . $page; + } + + function GetExternalLink($link) { + return $link; + } + + function GetMailtoLink($address) { + return 'mailto:' . $address; + } + + function ParseNavLink($link) { + if(!$link) return ''; + + switch($link[0]) { + case ':': + return $this->GetNeonLink(substr($link, 1)); + case '@': + return $this->GetMailtoLink(substr($link, 1)); + case '!': + return ''; + default: + return $this->GetExternalLink($link); + } + } + } + + $links = new Links; + } +?> |