'".$_GET["b"]."'" : ""; $end = isset($_GET["e"]) ? "AND fRunStop<'".$_GET["e"]."'" : ""; $limit = isset($_GET["l"]) ? 0+$_GET["l"] : 10; $hidden = isset($_GET["print"]) ? "*{visibility:hidden;}.print{position:fixed;left:0;top:0;}.print *{visibility:visible;}" : ""; // ==================================================================== $query = <<=$limit ORDER BY Time DESC EOT; $html = ""; //$data = "['Source','Observation Time [h]'],\n"; $data = "['Source','Observation Time [h]',{role:'annotation'}],\n"; $var1 = ""; $count = 0; $total = 0; $result = mysql_query($query, $db_id); if ($result) { $html .= "\n"; while ($row = mysql_fetch_assoc($result)) { $html .= " "; $html .= " \n"; $html .= " \n"; $html .= " \n"; $data .= "['".$row['Source']."',".$row['Time'].",'".number_format($row['Time'],0,'','')." h'],\n"; //$data .= "['".$row['Source']."',".$row['Time'].",'".$row['Source']."'],\n"; //$data .= "['',".$row['Time'].",'".$row['Source']."'],\n"; $total += $row['Time']; $count++; } $html .= "
".$row["Source"]."|".$row["Time"]."
\n"; mysql_free_result($result); } else $html = "[empty:".mysql_error()."]\n"; // -------------------------------------------------------------------- mysql_close($db_id); // -------------------------------------------------------------------- if (isset($_GET['test'])) { print(json_encode($data/*, JSON_PRETTY_PRINT*/)); return; } // -------------------------------------------------------------------- $querycol = $query;//colorize($query), // -------------------------------------------------------------------- $height = $count*60; $width = $height*18/9; $total = number_format($total, 0, '', ''); echo << Total observation time: $total h (excluding sources with less than $limit h)
Preparing char... please stand by.



EOT; ?>