Changeset 15155 for trunk/FACT++/www/shift
- Timestamp:
- 03/26/13 17:16:15 (12 years ago)
- Location:
- trunk/FACT++/www/shift
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/shift/calendar.js
r14312 r15155 52 52 } 53 53 54 var institutes= [" User", "EPFL", "ETHZ", "ISDC", "UNIDO", "UNIGE", "UNIWUE" ];54 var institutes= ["Shift", "Debug", "EPFL", "ETHZ", "ISDC", "UNIDO", "UNIGE", "UNIWUE" ]; 55 55 56 56 function CalendarJS() … … 492 492 var user = document.getElementById("body").getAttribute("data-user"); 493 493 var uri = "calendar.php?toggle&y="+td.yy+"&m="+td.mm+"&d="+td.dd; 494 if (user!=" User")494 if (user!="Shift" && user!="Debug") 495 495 uri += "&u="+user; 496 else 497 uri += "&x="+(user=="Debug"?1:0); 496 498 497 499 var xmlHttp = new XMLHttpRequest(); … … 515 517 { 516 518 var x = lines[i].split('\t'); 517 if (x.length!= 2)519 if (x.length!=3) 518 520 continue; 519 521 520 522 var div = document.createElement("div"); 521 523 div.style.fontWeight="normal"; 522 div.appendChild(document.createTextNode(x[ 1]));524 div.appendChild(document.createTextNode(x[2]=="1"?'('+x[1]+')':x[1])); 523 525 td.appendChild(div); 524 526 … … 674 676 { 675 677 var x = lines[i].split('\t'); 676 if (x.length!= 2)678 if (x.length!=3) 677 679 continue; 678 680 … … 681 683 var div = document.createElement("div"); 682 684 div.style.fontWeight="normal"; 683 div.appendChild(document.createTextNode(x[ 1]));685 div.appendChild(document.createTextNode(x[2]=="1"?'('+x[1]+')':x[1])); 684 686 td.appendChild(div); 685 687 -
trunk/FACT++/www/shift/calendar.php
r13687 r15155 142 142 if (mysql_affected_rows()==0) 143 143 { 144 if (!mysql_query("INSERT Data SET y=".$y.", m=".$m.", d=".$d.", u='".$u."'")) 144 $x = $_GET['x']; 145 if (!mysql_query("INSERT Data SET y=".$y.", m=".$m.", d=".$d.", x=".$x.", u='".$u."'")) 145 146 return header('HTTP/1.0 500 '.mysql_error()); 146 147 } 147 148 } 148 149 149 $query = "SELECT d, u FROM Data WHERE y=".$y." AND m=".$m;150 $query = "SELECT d, u, x FROM Data WHERE y=".$y." AND m=".$m; 150 151 if (isset($_GET['d'])) 151 152 $query .= " AND d=".$_GET['d']; … … 156 157 157 158 while ($row = mysql_fetch_array($result, MYSQL_NUM)) 158 print($row[0]."\t".$row[1]."\ n");159 print($row[0]."\t".$row[1]."\t".$row[2]."\n"); 159 160 ?>
Note:
See TracChangeset
for help on using the changeset viewer.