blob: b5ae18e84c3131e5c79bd022b0c82f450c0a28da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<?PHP
require_once('code/user.inc.php');
class Links {
function GetNeonLink($page, $extra = '', $html = true) {
if($GLOBALS['pages']->HasAccess($page, 'c')) {
if($GLOBALS['user']->login_type == 'url')
$ret = 'index.php?page=' . $page . '&login=' . $GLOBALS['user']->login_key
. ($extra ? '&' . $extra : '');
else
$ret = 'index.php?page=' . $page . ($extra ? '&' . $extra : '');
if($html) return htmlspecialchars($ret);
else return $ret;
}
return '';
}
function GetExternalLink($link) {
return $link;
}
function GetMailtoLink($address) {
return 'mailto:' . $address;
}
function GetNavPage($page) {
if($GLOBALS['pages']->HasAccess($page, 'n')) {
$page = $GLOBALS['pages']->Get($page, 'n');
return $page['content'];
}
return '';
}
}
$GLOBALS['links'] = new Links;
?>
|