summaryrefslogtreecommitdiff
path: root/includes/UserCVS.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/UserCVS.php')
-rwxr-xr-xincludes/UserCVS.php49
1 files changed, 49 insertions, 0 deletions
diff --git a/includes/UserCVS.php b/includes/UserCVS.php
index 4f606b7e..9210e446 100755
--- a/includes/UserCVS.php
+++ b/includes/UserCVS.php
@@ -50,4 +50,53 @@ if( $DEBUG )
}
+function funktion_isLinkAllowed( $PageName)
+{
+ global $_SESSION;
+
+ // separate page parameter
+ $ParameterPos = strpos( $PageName, ".php?");
+ if( $ParameterPos === FALSE)
+ {
+ $pName = $PageName;
+ }
+ else
+ {
+ $pName = substr( $PageName, 0, $ParameterPos + 4);
+ }
+
+ // check rights
+ if( (isset( $_SESSION['CVS'][ $pName ]) === TRUE) &&
+ ($_SESSION['CVS'][ $pName ] == "Y") )
+ {
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+function funktion_isLinkAllowed_addLink_OrLinkText( $PageName, $LinkText)
+{
+ global $url, $ENGEL_ROOT;
+
+ if( funktion_isLinkAllowed( $PageName) === TRUE)
+ {
+ return "<a href=\"". $url. $ENGEL_ROOT. $PageName. "\">". $LinkText. "</a>";
+ }
+
+ return $LinkText;
+}
+
+function funktion_isLinkAllowed_addLink_OrEmpty( $PageName, $LinkText)
+{
+ global $url, $ENGEL_ROOT;
+
+ if( funktion_isLinkAllowed( $PageName) === TRUE)
+ {
+ return "<a href=\"". $url. $ENGEL_ROOT. $PageName. "\">". $LinkText. "</a>";
+ }
+
+ return "";
+}
+
?>