Index: trunk/www/dch/shifteval.php
===================================================================
--- trunk/www/dch/shifteval.php	(revision 18207)
+++ trunk/www/dch/shifteval.php	(revision 18882)
@@ -8,5 +8,5 @@
 <?php
 
-    echo (file_get_contents("../shifteval/header.html"));
+    //echo (file_get_contents("../shifteval/header.html"));
 
     if (!empty($_GET["startdate"]))
@@ -113,4 +113,17 @@
         while ($rowshifters = mysql_fetch_row($resultshifters))
         {
+            if(!isset($shifthours[$rowshifters[0]]))
+               $shifthours[$rowshifters[0]]=0;
+            if(!isset($totalhours[$rowshifters[0]]))
+               $totalhours[$rowshifters[0]]=0;
+	    if (!isset($affiliation[$rowshifters[0]]))
+            {
+	       $affiliation[$rowshifters[0]] = $rowshifters[0];
+               $institutes2[$rowshifters[0]] = 0;
+               $institutenames[$rowshifters[0]] = $rowshifters[0];
+               $institutetotalhours[$rowshifters[0]] = 0;
+               $instituteshifthours[$rowshifters[0]] = 0;
+            }
+
             $shifthours[$rowshifters[0]]+=$numhours/mysql_num_rows($resultshifters);
             $totalhours[$rowshifters[0]]+=$numhours/mysql_num_rows($resultshifters);
@@ -125,4 +138,9 @@
         while ($rowdebug = mysql_fetch_row($resultdebug))
         {
+            if(!isset($debughours[$rowdebug[0]]))
+               $debughours[$rowdebug[0]]=0;
+            if(!isset($totalhours[$rowdebug[0]]))
+               $totalhours[$rowdebug[0]]=0;
+
             $debughours[$rowdebug[0]]+=$numhours*0.5;
             $totalhours[$rowdebug[0]]+=$numhours*0.5;
@@ -149,4 +167,7 @@
         while ($rowexperts = mysql_fetch_row($resultexperts))
         {
+            if (!isset($experthours[$rowexperts[0]]))
+                $experthours[$rowexperts[0]]=0;
+
             $experthours[$rowexperts[0]]+=$numhours/mysql_num_rows($resultexperts)/$devide;
             $totalhours[$rowexperts[0]]+=$numhours/mysql_num_rows($resultexperts)/$devide;
@@ -174,4 +195,8 @@
         //if (!$institutetotalhours[$id])
         //    continue;
+
+        if ($institutes2[$id]==0)
+           continue;
+
         echo "<tr><td>";
         echo $name;//."(".$id.")";
@@ -188,6 +213,14 @@
     foreach ($users as $name=>$id)
     {
-        if (!$totalhours[$id])
+        if (!isset($totalhours[$id]) || !$totalhours[$id])
             continue;
+
+	if(!isset($totalhours[$id]))
+           $totalhours[$id]=0;
+	if(!isset($debughours[$id]))
+           $debughours[$id]=0;
+	if(!isset($experthours[$id]))
+           $experthours[$id]=0;
+
         echo "<tr><td>";
         echo $name;//." (".$id.")";
