Changeset 19634 for trunk/www


Ignore:
Timestamp:
09/15/19 13:50:02 (5 years ago)
Author:
Daniela Dorner
Message:
addapted tables to new information, fixed bug in QLA links
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/flare_alerts/index.php

    r19580 r19634  
    115115    $colnames = "";
    116116
    117     $query="SELECT fSourceName AS 'Source', fTriggerKey AS 'Trigger', fTriggerType as 'Type', fRunID as 'Run', fBinning as 'Binning', ";
    118     $query.="fTriggerInserted as 'Inserted', fTriggerAcknowledged as 'Acknowledged', ";
     117    $query="SELECT CONCAT(fTriggerKey, '[', fTriggerType, ']') AS 'Trigger[Type]', if (isnull(fName), fSourceName, fName) AS 'Source', ";
     118    $query.="fPacketTypeKey AS 'Packet', CONCAT(Round(fRa,1), '/', Round(fDec,1), '/', Round(fErr,1)) AS 'Ra/Dec/Err', ";
     119    $query.="CONCAT(fNight, '_', fRunID) AS 'Run', ";
     120    $query.="if (fBinning=-1, 'nightly', CONCAT(fBinning, ' min')) AS 'Binning', ";
     121    $query.="fTriggerInserted AS 'Inserted', fTriggerAcknowledged AS 'Acknowledged', ";
    119122    //$query.="CONCAT('<a target=\"_blank\" href=\"http://fact-project.org/monitoring/index.php?y=".substr($today,0,4)."&m=".substr($today,4,2)."&d=".substr($today,6,2)."&source=', fSourceKey, '&timebin=3&plot=night\">20Min</a> ', ";
    120123    //$query.="'<a target=\"_blank\" href=\"http://fact-project.org/monitoring/index.php?y=".substr($today,0,4)."&m=".substr($today,4,2)."&d=".substr($today,6,2)."&source=', fSourceKey, '&timebin=12&plot=night\">Nightly</a>') as 'QLA', ";
     
    124127    $query.="CONCAT('<a target=\"_blank\" href=\"http://www.fact-project.org/run_db/db/fact_runinfo.php?fSourceKEY=', fSourceKey, '&fStartDate=', "
    125128        .$today.", '&fStopDate=', ".$today.", '&fSourceName=On&fRunTypeKEY=-1\">Summary</a>') AS 'Summary', ";
    126     $query.="CONCAT('<image src=\"https://fact-project.org/lightcurves/".$year."/".$month."/".$day."/lightcurve', fSourceKey, '_20min_".$today.".root-2.png\" width=\"200\" height=\"200\"></image>\n <br>\n "
    127         ."<a target=\"_blank\" href=\"http://fact-project.org/monitoring/index.php?y=".substr($today,0,4)."&m=".substr($today,4,2)."&d=".substr($today,6,2)."&source=', fSourceKey, '&timebin=3&plot=night\">more details</a>\n') AS 'QLA 20min', ";
    128     $query.="CONCAT('<image src=\"https://fact-project.org/lightcurves/".$year."/".$month."/".$day."/lightcurve', fSourceKey, '_1night_".$today.".root-2.png\" width=\"200\" height=\"200\"></image>\n <br>\n "
    129         ."<a target=\"_blank\" href=\"http://fact-project.org/monitoring/index.php?y=".substr($today,0,4)."&m=".substr($today,4,2)."&d=".substr($today,6,2)."&source=', fSourceKey, '&timebin=12&plot=night\">more details</a>\n') AS 'QLA 1night', ";
    130     $query.="CONCAT('<image src=\"https://fact-project.org/lightcurves/".$year."/".$month."/".$day."/lightcurve', fSourceKey, '_1night_week.root-2.png\" width=\"200\" height=\"200\"></image>\n <br>\n "
    131         ."<a target=\"_blank\" href=\"http://fact-project.org/monitoring/index.php?y=".substr($today,0,4)."&m=".substr($today,4,2)."&d=".substr($today,6,2)."&source=', fSourceKey, '&timebin=12&plot=week\">more details</a>\n') AS 'QLA nightly last week' ";
     129    $query.="CONCAT('<image src=\"https://fact-project.org/lightcurves/', DATE_FORMAT(fNight, '%Y/%m/%d'), '/lightcurve', fSourceKey, '_20min_', fNight, '.root-2.png\" width=\"200\" height=\"200\"></image>\n <br>\n "
     130        ."<a target=\"_blank\" href=\"http://fact-project.org/monitoring/index.php?y=', YEAR(fNight), '&m=', MONTH(fNight), '&d=', DAY(fNight), '&source=', fSourceKey, '&timebin=3&plot=night\">more details</a>\n') AS 'QLA 20min', ";
     131    $query.="CONCAT('<image src=\"https://fact-project.org/lightcurves/', DATE_FORMAT(fNight, '%Y/%m/%d'), '/lightcurve', fSourceKey, '_1night_', fNight, '.root-2.png\" width=\"200\" height=\"200\"></image>\n <br>\n "
     132        ."<a target=\"_blank\" href=\"http://fact-project.org/monitoring/index.php?y=', YEAR(fNight), '&m=', MONTH(fNight), '&d=', DAY(fNight), '&source=', fSourceKey, '&timebin=12&plot=night\">more details</a>\n') AS 'QLA 1night', ";
     133    $query.="CONCAT('<image src=\"https://fact-project.org/lightcurves/', DATE_FORMAT(fNight, '%Y/%m/%d'), '/lightcurve', fSourceKey, '_1night_week.root-2.png\" width=\"200\" height=\"200\"></image>\n <br>\n "
     134        ."<a target=\"_blank\" href=\"http://fact-project.org/monitoring/index.php?y=', YEAR(fNight), '&m=', MONTH(fNight), '&d=', DAY(fNight), '&source=', fSourceKey, '&timebin=12&plot=week\">more details</a>\n') AS 'QLA nightly last week' ";
    132135    $query.="FROM FlareTriggers LEFT JOIN factdata.Source USING (fSourceKey) WHERE fNight BETWEEN ".$today." AND ".$today2;
    133136    if ($trigger=="New")
Note: See TracChangeset for help on using the changeset viewer.