diff --git a/DB/update_20100112_2300.sql b/DB/update_20100112_2300.sql
new file mode 100644
index 00000000..ab944226
--- /dev/null
+++ b/DB/update_20100112_2300.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `UserCVS` ADD `GroupID` INT NULL AFTER `UID` ;
+
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"]. "
";
-// echo "Nick:". $_SESSION["Nick"]. "
";
-
- foreach( $_SESSION as $k => $v)
- echo "$k = $v
\n";
+// foreach( $_SESSION as $k => $v)
+// echo "$k = $v
\n";
+ echo "
\$_SESSION:\n"; + print_r($_SESSION); + echo ""; if( strlen($Page["CVS"]) == 0 ) echo "