Index: trunk/FACT++/www/shift/calendar.js
===================================================================
--- trunk/FACT++/www/shift/calendar.js	(revision 15114)
+++ trunk/FACT++/www/shift/calendar.js	(revision 15155)
@@ -52,5 +52,5 @@
 }
 
-var institutes= ["User", "EPFL", "ETHZ", "ISDC", "UNIDO", "UNIGE", "UNIWUE" ];
+var institutes= ["Shift", "Debug", "EPFL", "ETHZ", "ISDC", "UNIDO", "UNIGE", "UNIWUE" ];
 
 function CalendarJS()
@@ -492,6 +492,8 @@
         var user = document.getElementById("body").getAttribute("data-user");
         var uri = "calendar.php?toggle&y="+td.yy+"&m="+td.mm+"&d="+td.dd;
-        if (user!="User")
+        if (user!="Shift" && user!="Debug")
             uri += "&u="+user;
+        else
+            uri += "&x="+(user=="Debug"?1:0);
 
         var xmlHttp = new XMLHttpRequest();
@@ -515,10 +517,10 @@
             {
                 var x = lines[i].split('\t');
-                if (x.length!=2)
+                if (x.length!=3)
                     continue;
 
                 var div = document.createElement("div");
                 div.style.fontWeight="normal";
-                div.appendChild(document.createTextNode(x[1]));
+                div.appendChild(document.createTextNode(x[2]=="1"?'('+x[1]+')':x[1]));
                 td.appendChild(div);
 
@@ -674,5 +676,5 @@
             {
                 var x = lines[i].split('\t');
-                if (x.length!=2)
+                if (x.length!=3)
                     continue;
 
@@ -681,5 +683,5 @@
                 var div = document.createElement("div");
                 div.style.fontWeight="normal";
-                div.appendChild(document.createTextNode(x[1]));
+                div.appendChild(document.createTextNode(x[2]=="1"?'('+x[1]+')':x[1]));
                 td.appendChild(div);
 
Index: trunk/FACT++/www/shift/calendar.php
===================================================================
--- trunk/FACT++/www/shift/calendar.php	(revision 15114)
+++ trunk/FACT++/www/shift/calendar.php	(revision 15155)
@@ -142,10 +142,11 @@
     if (mysql_affected_rows()==0)
     {
-        if (!mysql_query("INSERT Data SET y=".$y.", m=".$m.", d=".$d.", u='".$u."'"))
+    	$x = $_GET['x'];
+        if (!mysql_query("INSERT Data SET y=".$y.", m=".$m.", d=".$d.", x=".$x.", u='".$u."'"))
             return header('HTTP/1.0 500 '.mysql_error());
     }
 }
 
-$query = "SELECT d, u FROM Data WHERE y=".$y." AND m=".$m;
+$query = "SELECT d, u, x FROM Data WHERE y=".$y." AND m=".$m;
 if (isset($_GET['d']))
     $query .= " AND d=".$_GET['d'];
@@ -156,4 +157,4 @@
 
 while ($row = mysql_fetch_array($result, MYSQL_NUM))
-    print($row[0]."\t".$row[1]."\n");
+    print($row[0]."\t".$row[1]."\t".$row[2]."\n");
 ?>
