summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rwxr-xr-xincludes/UserCVS.php30
-rwxr-xr-xincludes/funktion_user.php19
-rwxr-xr-xincludes/header.php7
3 files changed, 36 insertions, 20 deletions
diff --git a/includes/UserCVS.php b/includes/UserCVS.php
index f6bc30ed..4f606b7e 100755
--- a/includes/UserCVS.php
+++ b/includes/UserCVS.php
@@ -4,14 +4,28 @@ if( !isset($_SESSION['UID']))
$_SESSION['UID'] = -1;
// CVS import Data
-$SQL = "SELECT * FROM `UserCVS` WHERE UID=".$_SESSION['UID'];
-$Erg_CVS = mysql_query($SQL, $con);
+$SQL_CVS = "SELECT * FROM `UserCVS` WHERE UID=".$_SESSION['UID'];
+$Erg_CVS = mysql_query($SQL_CVS, $con);
$_SESSION['CVS'] = mysql_fetch_array($Erg_CVS);
+
+// Group import Data, if nesseary
+if( isset( $_SESSION['CVS'][ "GroupID" ]))
+{
+ $SQL_GRP = "SELECT * FROM `UserCVS` WHERE UID=".$_SESSION['CVS'][ "GroupID" ];
+ $Erg_GRP = mysql_query($SQL_GRP, $con);
+ $_SESSION['CVS_Group'] = mysql_fetch_array($Erg_GRP);
+
+ foreach( $_SESSION['CVS'] as $k => $v)
+ {
+ if($v=="G") // Right == Group
+ $_SESSION['CVS'][$k] = $_SESSION['CVS_Group'][$k];
+ }
+}
+
//pagename ermitteln
$Page["Name"] = substr( $_SERVER['PHP_SELF'], strlen($ENGEL_ROOT) );
-
//recht für diese seite auslesen
if( isset( $_SESSION['CVS'][ $Page["Name"] ]))
$Page["CVS"] = $_SESSION['CVS'][ $Page["Name"] ];
@@ -23,11 +37,11 @@ else
if( $DEBUG )
{
-// echo "UserID:". $_SESSION["UID"]. "<br>";
-// echo "Nick:". $_SESSION["Nick"]. "<br>";
-
- foreach( $_SESSION as $k => $v)
- echo "$k = $v<br>\n";
+// foreach( $_SESSION as $k => $v)
+// echo "$k = $v<br>\n";
+ echo "<pre>\$_SESSION:\n";
+ print_r($_SESSION);
+ echo "</pre>";
if( strlen($Page["CVS"]) == 0 )
echo "<h1><u> CVS ERROR, on page '". $Page["Name"]. "'</u></h1>";
diff --git a/includes/funktion_user.php b/includes/funktion_user.php
index bcb77778..742b2624 100755
--- a/includes/funktion_user.php
+++ b/includes/funktion_user.php
@@ -3,15 +3,22 @@
function UID2Nick($UID)
{
global $con;
-
- $SQL = "SELECT Nick FROM `User` WHERE UID='$UID'";
+
+ if( $UID>0) {
+ $SQL = "SELECT Nick FROM `User` WHERE UID='$UID'";
+ } else {
+ $SQL = "SELECT Name FROM `UserGroups` WHERE UID='$UID'";
+ }
$Erg = mysql_query($SQL, $con);
//echo $UID."#";
- if( mysql_num_rows($Erg))
- return mysql_result($Erg, 0);
- else
- {
+ if( mysql_num_rows($Erg)) {
+ if( $UID>0 ) {
+ return mysql_result($Erg, 0);
+ } else {
+ return "Group-".mysql_result($Erg, 0);
+ }
+ } else {
if( $UID == -1)
return "logout User";
else
diff --git a/includes/header.php b/includes/header.php
index fc5a3a96..6529706a 100755
--- a/includes/header.php
+++ b/includes/header.php
@@ -7,12 +7,7 @@ echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
<HEAD>
<?PHP
-// SVN versions auswertung
-exec("svnversion", $VersionArray);
-if( strlen($VersionArray[0]))
- $Version = "(r ". $VersionArray[0]. ")";
-
-echo "<TITLE>--- $title $Version ---</TITLE>";
+echo "<TITLE>--- $title ---</TITLE>";
?>
<meta name="keywords" content="Engel, Himmelsverwaltung">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">