- Timestamp:
- 01/23/09 17:27:58 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9243 r9249 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 22 2009/01/23 Daniela Dorner 23 24 * datacenter/db/showplots-ds.php, datacenter/db/tabs.php, 25 datacenter/db/plot.php: 26 - adapted path to new web file structure 27 28 * datacenter/db/sequinfo-aio.php, datacenter/db/runinfo-aio.php: 29 - added option to group by date (year, month, night): pulldown in 30 menu and adapted query 31 32 * datacenter/db/sequinfo-aio.php, datacenter/db/runinfo-aio.php 33 datacenter/db/datasetinfo-aio.php: 34 - enabled possibility to combine all group-bys 35 36 * datacenter/db/datasetinfo-aio.php: 37 - enhances information printed in table in case of group-by 38 39 * datacenter/db/include.php: 40 - adapted pulldown of status-group-by 41 42 * datacenter/db/menu.php: 43 - added pulldown for sumtrigger-flag to sequinfo-menu 44 - added function to print pulldown for group-by date 45 20 46 21 47 -
trunk/MagicSoft/Mars/NEWS
r9239 r9249 48 48 * Websites: added option to query only sequences containing sumtrigger 49 49 events 50 51 * Websites: added option to group by date (year, month, night) for runs 52 and sequences and enabled that combining of different group-bys, 53 e.g. status, date and source is possible 50 54 51 55 ;automatic analyis -
trunk/MagicSoft/Mars/datacenter/db/datasetinfo-aio.php
r9154 r9249 17 17 $query0 = "SELECT "; 18 18 19 if ($groups>0) 20 { 21 foreach ($checkgroup as $key => $element) 22 if ($element==-1) 23 $query0 .= $key . " as '" . $alias[$key] . "' " . ", "; 24 $query0 .= " COUNT(*) as '# Datasets' "; 25 } 26 else 27 { 19 if ($groups>0 || $statusgroups>0) 20 { 21 if ($groups>0) 22 { 23 foreach ($checkgroup as $key => $element) 24 if ($element==-1) 25 $query0 .= $key . " as '" . $alias[$key] . "' " . ", "; 26 $query0 .= " COUNT(*) as '# Datasets', "; 27 } 28 29 //-------------------------------------------------- 30 $query0 .= "SUM(fRunTime)/3600 as '" . $alias["SUM(fRunTime)/3600"] . "', "; 31 //-------------------------------------------------- 32 $query0 .= " Min(fZenithDistanceMin) as '" . $alias["Min(fZenithDistanceMin)"] . "', "; 33 $query0 .= " Max(fZenithDistanceMax) as '" . $alias["Max(fZenithDistanceMax)"] . "', "; 34 $query0 .= " COUNT(*) as '# Sequ' "; 35 28 36 if ($statusgroups>0) 29 37 { 30 38 foreach ($checkstatusgroup as $key => $element) 31 39 if ($element==-1) 32 $query0 .= " (if(IsNull(" . $key . "), if(isnull(fStartTime), 'not done', if(isnull(fFailedTime),if(isnull(" . $needs[$key] . "),'not done',if(date_sub(Now(),interval 12 hour) < fStartTime,'running','crashed')),if(isnull(" . $needs[$key] . "),'not done','failed'))) ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "',";40 $query0 .= ", (if(IsNull(" . $key . "), if(isnull(fStartTime), 'not done', if(isnull(fFailedTime),if(isnull(" . $needs[$key] . "),'not done',if(date_sub(Now(),interval 12 hour) < fStartTime,'running','crashed')),if(isnull(" . $needs[$key] . "),'not done','failed'))) ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "' "; 33 41 // $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', "; 34 42 35 $query0 .= " COUNT(*) as '# Datasets'";43 $query0 .= ", COUNT(*) as '# Datasets'"; 36 44 37 45 } 38 else 46 } 47 else 48 { 49 $query0 .= " " . $fromtable . ".fDataSetNumber as '" . $alias["fDataSetNumber"] . "' "; 50 if (!empty($_GET["fLinks"])) 39 51 { 40 $query0 .= " " . $fromtable . ".fDataSetNumber as '" . $alias["fDataSetNumber"] . "' "; 41 if (!empty($_GET["fLinks"])) 42 { 43 // $query0 .= ", CONCAT('<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/datasets/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/dataset', LPAD(CONCAT(DataSets.fDataSetNumber , '.txt'), 12,'0') , '\">f</A>' "; 44 // $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/ganymed/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/', LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'), 8), '\">g</A>'"; 45 // $query0 .= ", ' <A&ws;HREF=\"ganymed.php?fDataSetNo=', DataSets.fDataSetNumber, '\">i</A>') "; 46 $query0 .= ", CONCAT('<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/datasets/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/dataset', LPAD(CONCAT(DataSets.fDataSetNumber , '.txt'), 12,'0') , '\">f</A>' "; 47 $query0 .= ", ' <A&ws;HREF=\"tabs.php?t=ganymed&n=' , fDataSetNumber, '\">g</A>'"; 48 $query0 .= ", ' <A&ws;HREF=\"tabs.php?t=gplotdb&n=' , fDataSetNumber, '\">pdb</A>'"; 49 // $query0 .= ", ' <A&ws;HREF=\"ganymed.php?fDataSetNo=', DataSets.fDataSetNumber, '\">i</A>' "; 50 $query0 .= ") as 'Links'"; 51 } 52 53 foreach ($_GET as $key => $element) 54 if ($_GET[$key]=="On") 55 if ($key!="fLinks") 56 if (empty($checkwhere[$key]) || $checkwhere[$key]==0) 57 $query0 .= ", " . $key . " as '" . $alias[$key] . "' "; 52 //$query0 .= ", CONCAT('<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/datasets/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/dataset', LPAD(CONCAT(DataSets.fDataSetNumber , '.txt'), 12,'0') , '\">f</A>' "; 53 //$query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/ganymed/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/', LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'), 8), '\">g</A>'"; 54 //$query0 .= ", ' <A&ws;HREF=\"ganymed.php?fDataSetNo=', DataSets.fDataSetNumber, '\">i</A>') "; 55 $query0 .= ", CONCAT('<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/datasets/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/dataset', LPAD(CONCAT(DataSets.fDataSetNumber , '.txt'), 12,'0') , '\">f</A>' "; 56 $query0 .= ", ' <A&ws;HREF=\"tabs.php?t=ganymed&n=' , fDataSetNumber, '\">g</A>'"; 57 $query0 .= ", ' <A&ws;HREF=\"tabs.php?t=gplotdb&n=' , fDataSetNumber, '\">pdb</A>'"; 58 //$query0 .= ", ' <A&ws;HREF=\"ganymed.php?fDataSetNo=', DataSets.fDataSetNumber, '\">i</A>' "; 59 $query0 .= ") as 'Links'"; 58 60 } 61 62 foreach ($_GET as $key => $element) 63 if ($_GET[$key]=="On") 64 if ($key!="fLinks") 65 if (empty($checkwhere[$key]) || $checkwhere[$key]==0) 66 $query0 .= ", " . $key . " as '" . $alias[$key] . "' "; 59 67 } 60 68 … … 120 128 if ($statusgroups>0) 121 129 { 122 $query0 .= " GROUP BY "; 130 if (strpos($query0, " GROUP BY ")==FALSE) 131 $query0 .= " GROUP BY "; 132 else 133 $query0 .= ", "; 123 134 $num = $statusgroups; 124 135 foreach ($checkstatusgroup as $key => $element) -
trunk/MagicSoft/Mars/datacenter/db/include.php
r9184 r9249 84 84 85 85 $status = array 86 ( 0 => " all",86 ( 0 => "ALL", 87 87 1 => "done", 88 88 2 => "not done", … … 91 91 5 => "failed", 92 92 6 => "crashed", 93 7 => " group by",93 7 => "GROUP BY", 94 94 ); 95 95 -
trunk/MagicSoft/Mars/datacenter/db/menu.php
r9218 r9249 161 161 printf(" </td><td>\n"); 162 162 printf(" </td><td>\n"); 163 PrintPullDown($host, $user, $pw, $db, "SumTriggerFlag", "fSumTriggerFlagName", 163 PrintPullDown($host, $user, $pw, $db, "SumTriggerFlag", "fSumTriggerFlagName", "fSumTriggerFlagKEY", "SumTrigger Flag"); 164 164 // printf(" </td><td>\n"); 165 165 // PrintPullDown($host, $user, $pw, $db, "ManuallyChanged", "fManuallyChangedName", "fManuallyChangedKEY", "Manually changed"); … … 564 564 } 565 565 566 function PrintGroupByDateMenu() 567 { 568 printf("Group by Date "); 569 printf("<select name='fGroupByDate' size='1' class='Width'>\n"); 570 if (empty($_GET["fGroupByDate"]) || $_GET["fGroupByDate"]==0) 571 printf(" <option value='0' selected>--- NO GROUP BY ---</option>\n"); 572 else 573 printf(" <option value='0'>--- NO GROUP BY ---</option>\n"); 574 $dates=array("Year", "Month","Night"); 575 foreach ($dates as $date) 576 { 577 if ($_GET["fGroupByDate"]==$date) 578 printf(" <option value='%s' selected> %s </option>\n", $date, $date); 579 else 580 printf(" <option value='%s'> %s </option>\n", $date, $date); 581 } 582 printf(" </select>\n"); 583 } 584 566 585 function PrintSourceMenu($host,$user,$pw,$db) 567 586 { -
trunk/MagicSoft/Mars/datacenter/db/plot.php
r8466 r9249 1 1 <?php 2 require_once(". ./phpchartdir.php");2 require_once("./phpchartdir.php"); 3 3 4 4 include("plotinclude.php"); -
trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php
r9150 r9249 17 17 $query0 = "SELECT "; 18 18 19 if ($groups>0 )19 if ($groups>0 || ((!empty($_GET["fGroupByDate"])) && !$_GET["fGroupByDate"]==0) || $statusgroups>0) 20 20 { 21 21 foreach ($checkgroup as $key => $element) 22 22 if ($element==-1) 23 23 $query0 .= $key . " as '" . $alias[$key] . "' " . ", "; 24 25 if ((!empty($_GET["fGroupByDate"])) && !$_GET["fGroupByDate"]==0) 26 { 27 $query0 .= " DATE_FORMAT(ADDDATE(fRunStart,Interval 12 hour), '"; 28 switch($_GET["fGroupByDate"]) 29 { 30 case "Year": 31 $query0 .= "%Y "; 32 break; 33 case "Month": 34 $query0 .= "%Y-%m "; 35 break; 36 case "Night": 37 $query0 .= "%Y-%m-%d "; 38 break; 39 } 40 $query0 .= "') AS GroupByDate, "; 41 } 42 24 43 //-------------------------------------------------- 25 44 //$query0 .= " TIMEDIFF(fRunStop, fRunStart), "; … … 33 52 $query0 .= " Max(fZenithDistance) as '" . $alias["Max(fZenithDistance)"] . "', "; 34 53 $query0 .= " COUNT(*) as '# Runs' "; 35 } 36 else 37 { 54 38 55 if ($statusgroups>0) 39 56 { 40 57 foreach ($checkstatusgroup as $key => $element) 41 58 if ($element==-1) 42 $query0 .= " (if(IsNull(" . $key . "), if(isnull(fStartTime), 'not done', if(isnull(fFailedTime),if(isnull(" . $needs[$key] . "),'not done',if(date_sub(Now(),interval 12 hour) < fStartTime,'running','crashed')),if(isnull(" . $needs[$key] . "),'not done','failed'))) ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "',";59 $query0 .= ", (if(IsNull(" . $key . "), if(isnull(fStartTime), 'not done', if(isnull(fFailedTime),if(isnull(" . $needs[$key] . "),'not done',if(date_sub(Now(),interval 12 hour) < fStartTime,'running','crashed')),if(isnull(" . $needs[$key] . "),'not done','failed'))) ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "' "; 43 60 // $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', "; 44 61 45 $query0 .= " count(*) as'# Runs'";62 $query0 .= ", COUNT(*) AS '# Runs'"; 46 63 47 64 } 48 else 65 } 66 else 67 { 68 //$query0 .= " RunData.fRunNumber as 'Run#' "; 69 //$query0 .= " Concat(RunData.fTelescopeNumber,':', RunData.fRunNumber,':', RunData.fFileNumber) as 'Run' "; 70 $query0 .= " Concat('M', RunData.fTelescopeNumber,':', LPAD(RunData.fRunNumber,8, ' '),'/', LPAD(RunData.fFileNumber, 3, ' ')) as 'Tel:Run/File' "; 71 72 if (empty($_GET["fSendTxt"]) && !empty($_GET["fLinks"])) 49 73 { 50 // $query0 .= " RunData.fRunNumber as 'Run#' "; 51 // $query0 .= " Concat(RunData.fTelescopeNumber,':', RunData.fRunNumber,':', RunData.fFileNumber) as 'Run' "; 52 $query0 .= " Concat('M', RunData.fTelescopeNumber,':', LPAD(RunData.fRunNumber,8, ' '),'/', LPAD(RunData.fFileNumber, 3, ' ')) as 'Tel:Run/File' "; 53 54 if (empty($_GET["fSendTxt"]) && !empty($_GET["fLinks"])) 55 { 56 $query0 .= ", CONCAT('<A&ws;HREF=\"queryrbk.php?fNight=', date_format(adddate(fRunStart, interval +13 HOUR), '%Y-%m-%d') , '&fDate=2\">rbk</A>') "; 57 $query0 .= " as 'Links'"; 58 } 59 60 foreach ($_GET as $key => $element) 61 if ($key!="fLinks" && $_GET[$key]=="On" && $key!="fTest") 62 if (empty($checkwhere[$key]) || $checkwhere[$key]==0) 63 $query0 .= ", " . $key . " as '" . $alias[$key] . "' "; 74 $query0 .= ", CONCAT('<A&ws;HREF=\"queryrbk.php?fNight=', date_format(adddate(fRunStart, interval +13 HOUR), '%Y-%m-%d') , '&fDate=2\">rbk</A>') "; 75 $query0 .= " as 'Links'"; 64 76 } 77 78 foreach ($_GET as $key => $element) 79 if ($key!="fLinks" && $_GET[$key]=="On" && $key!="fTest") 80 if (empty($checkwhere[$key]) || $checkwhere[$key]==0) 81 $query0 .= ", " . $key . " as '" . $alias[$key] . "' "; 65 82 } 66 83 … … 165 182 } 166 183 184 if ((!empty($_GET["fGroupByDate"])) && !$_GET["fGroupByDate"]==0) 185 if (strpos($query0, " GROUP BY ")==FALSE) 186 $query0 .= " GROUP BY GroupByDate "; 187 else 188 $query0 .= ", GroupByDate "; 189 167 190 if ($statusgroups>0) 168 191 { 169 $query0 .= " GROUP BY "; 192 if (strpos($query0, " GROUP BY ")==FALSE) 193 $query0 .= " GROUP BY "; 194 else 195 $query0 .= ", "; 170 196 $num = $statusgroups; 171 197 foreach ($checkstatusgroup as $key => $element) … … 264 290 printf(" <P>\n"); 265 291 PrintSourceMenu($host,$user,$pw,$db); 292 PrintGroupByDateMenu(); 266 293 printf("<p>"); 267 294 printf("</div>"); -
trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php
r9175 r9249 17 17 $query0 = "SELECT "; 18 18 19 if ($groups>0) 20 { 21 foreach ($checkgroup as $key => $element) 22 if ($element==-1) 23 $query0 .= $key . " as '" . $alias[$key] . "' " . ", "; 19 if ($groups>0 || ((!empty($_GET["fGroupByDate"])) && !$_GET["fGroupByDate"]==0) || $statusgroups>0) 20 { 21 if ($groups>0) 22 foreach ($checkgroup as $key => $element) 23 if ($element==-1) 24 $query0 .= $key . " as '" . $alias[$key] . "' " . ", "; 25 26 if ((!empty($_GET["fGroupByDate"])) && !$_GET["fGroupByDate"]==0) 27 { 28 $query0 .= " DATE_FORMAT(ADDDATE(fRunStart,Interval 12 hour), '"; 29 switch($_GET["fGroupByDate"]) 30 { 31 case "Year": 32 $query0 .= "%Y "; 33 break; 34 case "Month": 35 $query0 .= "%Y-%m "; 36 break; 37 case "Night": 38 $query0 .= "%Y-%m-%d "; 39 break; 40 } 41 $query0 .= "') AS GroupByDate, "; 42 } 43 24 44 //-------------------------------------------------- 25 45 $query0 .= "SUM(fRunTime)/3600 as '" . $alias["SUM(fRunTime)/3600"] . "', "; … … 29 49 $query0 .= " Max(fZenithDistanceMax) as '" . $alias["Max(fZenithDistanceMax)"] . "', "; 30 50 $query0 .= " COUNT(*) as '# Sequ' "; 31 } 32 else 33 { 51 34 52 if ($statusgroups>0) 35 53 { 36 54 foreach ($checkstatusgroup as $key => $element) 37 55 if ($element==-1) 38 $query0 .= " (if(IsNull(" . $key . "), if(isnull(fStartTime), 'not done', if(isnull(fFailedTime),if(isnull(" . $needs[$key] . "),'not done',if(date_sub(Now(),interval 12 hour) < fStartTime,'running','crashed')),if(isnull(" . $needs[$key] . "),'not done','failed'))) ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "',";56 $query0 .= ", (if(IsNull(" . $key . "), if(isnull(fStartTime), 'not done', if(isnull(fFailedTime),if(isnull(" . $needs[$key] . "),'not done',if(date_sub(Now(),interval 12 hour) < fStartTime,'running','crashed')),if(isnull(" . $needs[$key] . "),'not done','failed'))) ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "' "; 39 57 // $query0 .= " (if(IsNull(" . $key . "), 'not done' ,if(" . $key . "='1970-01-01 00:00:00','dont do','done'))) as '" . $alias[$key] . "', "; 40 58 41 $query0 .= " COUNT(*) as '# Sequ'";59 $query0 .= ", COUNT(*) as '# Sequ'"; 42 60 43 61 } 62 } 63 else 64 { 65 if (!empty($_GET["fSendTxt"])) 66 $query0 .= " " . $fromtable . ".fSequenceFirst as '" . $alias["fSequenceFirst"] . "' "; 44 67 else 45 68 { 46 if (!empty($_GET["fSendTxt"])) 47 $query0 .= " " . $fromtable . ".fSequenceFirst as '" . $alias["fSequenceFirst"] . "' "; 48 else 69 //old version using fRunMin, fRunMax 70 //$query0 .= " CONCAT('<A&ws;HREF=\"runinfo-aio.php?', 'fRunStart=On', '&fZenithDistance=On', '&fRunMin=', Sequences.fSequenceFirst, '&fMeanTriggerRate=On', '&fTest=On', '&fRunTypeName=On', '&fRunMax=', fSequenceLast, '&fNumEvents=On', '&fSourceName=On&', 'fExcludedFDAKEY=1', '&fSequenceFirst=On', '&fRawFileAvail=On', '&fCCFileAvail=On', '&fCaCoFileAvail=On', '&fNumResults=500\">', Sequences.fSequenceFirst, '</A>') "; 71 //new version using fSequenceNo 72 $query0 .= " CONCAT('<A&ws;HREF=\"runinfo-aio.php?', 'fRunStart=On', '&fZenithDistance=On', '&fSequenceNo=', Sequences.fSequenceFirst, '&fMeanTriggerRate=On', '&fTest=On', '&fRunTypeName=On', '&fNumEvents=On', '&fSourceName=On&', 'fExcludedFDAKEY=1', '&fSequenceFirst=On', '&fRawFileAvail=On', '&fCCFileAvail=On', '&fCaCoFileAvail=On', '&fNumResults=500\">', 'M', Sequences.fTelescopeNumber, ':', LPAD(Sequences.fSequenceFirst, 8, ' '), '</A>') "; 73 //$query0 .= " as " . $alias["fSequenceFirst"]; 74 $query0 .= " as 'Tel:Sequ'"; 75 if (!empty($_GET["fLinks"])) 49 76 { 50 //old version using fRunMin, fRunMax 51 //$query0 .= " CONCAT('<A&ws;HREF=\"runinfo-aio.php?', 'fRunStart=On', '&fZenithDistance=On', '&fRunMin=', Sequences.fSequenceFirst, '&fMeanTriggerRate=On', '&fTest=On', '&fRunTypeName=On', '&fRunMax=', fSequenceLast, '&fNumEvents=On', '&fSourceName=On&', 'fExcludedFDAKEY=1', '&fSequenceFirst=On', '&fRawFileAvail=On', '&fCCFileAvail=On', '&fCaCoFileAvail=On', '&fNumResults=500\">', Sequences.fSequenceFirst, '</A>') "; 52 //new version using fSequenceNo 53 $query0 .= " CONCAT('<A&ws;HREF=\"runinfo-aio.php?', 'fRunStart=On', '&fZenithDistance=On', '&fSequenceNo=', Sequences.fSequenceFirst, '&fMeanTriggerRate=On', '&fTest=On', '&fRunTypeName=On', '&fNumEvents=On', '&fSourceName=On&', 'fExcludedFDAKEY=1', '&fSequenceFirst=On', '&fRawFileAvail=On', '&fCCFileAvail=On', '&fCaCoFileAvail=On', '&fNumResults=500\">', 'M', Sequences.fTelescopeNumber, ':', LPAD(Sequences.fSequenceFirst, 8, ' '), '</A>') "; 54 // $query0 .= " as " . $alias["fSequenceFirst"]; 55 $query0 .= " as 'Tel:Sequ'"; 56 if (!empty($_GET["fLinks"])) 57 { 58 $query0 .= ", CONCAT('<A&ws;HREF=\"tabs.php?t=calib&n=', fSequenceFirst, '\">cal</A>'"; 59 $query0 .= ", ' <A&ws;HREF=\"tabs.php?t=signal&n=', fSequenceFirst, '\">sig</A>'"; 60 $query0 .= ", ' <A&ws;HREF=\"tabs.php?t=star&n=', fSequenceFirst, '\">star</A>'"; 61 $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/sequences/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/sequence', LPAD(CONCAT(Sequences.fSequenceFirst , '.txt'), 12,'0') , '\">', 'f </A>' "; 62 // $query0 .= ", ' <A&ws;HREF=\"sequence.php?fSequenceNo=', Sequences.fSequenceFirst , '&fAll=On\">i</A>'"; 63 $query0 .= ", ' <A&ws;HREF=\"queryrbk.php?fNight=', date_format(adddate(fRunStart, interval +13 HOUR), '%Y-%m-%d') , '&fDate=2\">rbk</A>') "; 64 // $query0 .= ", CONCAT('<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/callisto/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), 'callisto', LPAD(CONCAT(Sequences.fSequenceFirst , '.html'), 13,'0') , '\">cl</A>'"; 65 // $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/callisto/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), '\">c</A>'"; 66 // $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/star/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), 'star', LPAD(CONCAT(Sequences.fSequenceFirst , '.html'), 13,'0') , '\">sl</A>'"; 67 // $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/star/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), '\">s</A>'"; 68 // $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/sequences/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/sequence', LPAD(CONCAT(Sequences.fSequenceFirst , '.txt'), 12,'0') , '\">', 'f </A>' "; 69 // $query0 .= ", ' <A&ws;HREF=\"sequence.php?fSequenceNo=', Sequences.fSequenceFirst , '&fAll=On\">i</A>'"; 70 // $query0 .= ", ' <A&ws;HREF=\"queryrbk.php?fNight=', date_format(adddate(fRunStart, interval +13 HOUR), '%Y-%m-%d') , '&fDate=2\">rbk</A>') "; 71 $query0 .= " as 'Links'"; 72 } 77 $query0 .= ", CONCAT('<A&ws;HREF=\"tabs.php?t=calib&n=', fSequenceFirst, '\">cal</A>'"; 78 $query0 .= ", ' <A&ws;HREF=\"tabs.php?t=signal&n=', fSequenceFirst, '\">sig</A>'"; 79 $query0 .= ", ' <A&ws;HREF=\"tabs.php?t=star&n=', fSequenceFirst, '\">star</A>'"; 80 $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/sequences/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/sequence', LPAD(CONCAT(Sequences.fSequenceFirst , '.txt'), 12,'0') , '\">', 'f </A>' "; 81 //$query0 .= ", ' <A&ws;HREF=\"sequence.php?fSequenceNo=', Sequences.fSequenceFirst , '&fAll=On\">i</A>'"; 82 $query0 .= ", ' <A&ws;HREF=\"queryrbk.php?fNight=', date_format(adddate(fRunStart, interval +13 HOUR), '%Y-%m-%d') , '&fDate=2\">rbk</A>') "; 83 //$query0 .= ", CONCAT('<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/callisto/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), 'callisto', LPAD(CONCAT(Sequences.fSequenceFirst , '.html'), 13,'0') , '\">cl</A>'"; 84 //$query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/callisto/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), '\">c</A>'"; 85 //$query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/star/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), 'star', LPAD(CONCAT(Sequences.fSequenceFirst , '.html'), 13,'0') , '\">sl</A>'"; 86 //$query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/star/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), '\">s</A>'"; 87 //$query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/sequences/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/sequence', LPAD(CONCAT(Sequences.fSequenceFirst , '.txt'), 12,'0') , '\">', 'f </A>' "; 88 //$query0 .= ", ' <A&ws;HREF=\"sequence.php?fSequenceNo=', Sequences.fSequenceFirst , '&fAll=On\">i</A>'"; 89 //$query0 .= ", ' <A&ws;HREF=\"queryrbk.php?fNight=', date_format(adddate(fRunStart, interval +13 HOUR), '%Y-%m-%d') , '&fDate=2\">rbk</A>') "; 90 $query0 .= " as 'Links'"; 73 91 } 74 75 foreach ($_GET as $key => $element)76 if ($_GET[$key]=="On")77 if ($key!="fLinks" && $key!="fOff" && $key!="fOnlyOff" && $key!="fOnlySum")78 if (empty($checkwhere[$key]) || $checkwhere[$key]==0)79 $query0 .= ", " . $key . " as '" . $alias[$key] . "' ";80 92 } 93 94 foreach ($_GET as $key => $element) 95 if ($_GET[$key]=="On") 96 if ($key!="fLinks" && $key!="fOff" && $key!="fOnlyOff" && $key!="fOnlySum") 97 if (empty($checkwhere[$key]) || $checkwhere[$key]==0) 98 $query0 .= ", " . $key . " as '" . $alias[$key] . "' "; 81 99 } 82 100 … … 219 237 } 220 238 239 if ((!empty($_GET["fGroupByDate"])) && !$_GET["fGroupByDate"]==0) 240 if (strpos($query0, " GROUP BY ")==FALSE) 241 $query0 .= " GROUP BY GroupByDate "; 242 else 243 $query0 .= ", GroupByDate "; 244 221 245 if ($statusgroups>0) 222 246 { 223 $query0 .= " GROUP BY "; 247 // $query0 .= " GROUP BY "; 248 if (strpos($query0, " GROUP BY ")==FALSE) 249 $query0 .= " GROUP BY "; 250 else 251 $query0 .= ", "; 224 252 $num = $statusgroups; 225 253 foreach ($checkstatusgroup as $key => $element) … … 332 360 printf("<p>"); 333 361 PrintSourceMenu($host,$user,$pw,$db); 362 PrintGroupByDateMenu(); 363 printf("<p>"); 334 364 PrintNightRangeMenu($host,$user,$pw,$db, "Sequences"); 335 365 printf("<p>");
Note:
See TracChangeset
for help on using the changeset viewer.