59.99) $sec=59.99; return sprintf("%02d:%02d:%05.2f", $hour,$min,$sec); } function deg2dms($d) { if ($d >= 0.) $s = '+'; else { $s = '-'; $d = -$d; } $deg = floor($d); $min = floor(($d-$deg)*60.); $sec = (($d-$deg)*60.-$min)*60.; $deg %= 360; if($sec>59.9) $sec=59.9; return sprintf ("%s%02d:%02d:%04.1f", $s,$deg,$min,$sec); } if(isset($_GET['last'])) $last = $_GET['last']; else $last=10; if($last<=0) $last=10; if(isset($_GET['offset'])) $offset = $_GET['offset']; else $offset=0; if($offset<0) $offset=0; if(isset($_GET['source'])) { $src_str = $_GET['source']; if($src_str === "all") unset($src_str); else $sources = explode(",",$src_str); } if($offset==0 && !isset($src_str)) echo "\n"; ?>
| $head | "; } echo "\n|
|---|---|
| "; if(strlen($value)==0) echo " --- "; else if($key === "recvdate") echo substr($value,0,21); else if($key === "sourcedate") echo substr($value,0,21); else if($key === "instrume" && strstr($value,"(Subthr")) { echo substr($value,0,3)." (Subthresh.)"; } else if($key === "isgrb") { if($value === "t") echo " Yes "; else if($value === "f") echo " No "; else echo " --- "; } else if($key === "ra") { echo "".deg2hms($value).""; } else if($key === "decl") { echo "".deg2dms($value).""; } else if($key === "errradius") { if($value >= 1.) echo "$valueo"; else if($value >= 1./60.) { $min = $value * 60.; echo "$min'"; } else { $asec = $value * 3600.; echo "$asec\""; } } else if($key === "url1") { if($srcid === "LVC") echo "View"; else { // Checking for error in Swift LightCurve URL if(strpos($value,"/gcn/notices_s/sw00") === FALSE) { // Checking for wrong KONUS LightCurve URL if(strpos($value,"/gcn/notices_k/konus_lc") === FALSE) echo "LC"; else // Replace KONUS LightCurve URL echo "LC"; } else { // Making correct Swift LightCurve URL $swift_lc = str_replace("/gcn/notices_s/sw00", "/notices_s/sw0",$value); echo "LC"; } } } else if($key === "url2") { if($srcid === "Fermi") echo "Plot"; else echo "Map"; } else if($key === "sourcedescr") echo "ReadMe"; else echo "$value"; echo " | \n"; } echo "\t\tXML | \n"; echo "\t