IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 25, 2011, 9:04:33 AM (15 years ago)
Author:
rhenders
Message:

ordering labels alphabetically; choosing first on list if none selected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/raw/czartool_ipptopsps.php

    r32784 r32818  
    5353$columnHeaderColor = "lavender";
    5454
    55 if ($selectedLabel == "") { $selectedLabel = "ThreePi.V3_P2"; }
     55$labels = getLabels($czardb);
     56
     57# if no label is selected, use first one in the list
     58if ($selectedLabel == "") {
     59   
     60    if (sizeof($labels) > 0) $selectedLabel = $labels[0];
     61    else $selectedLabel = "no labels";
     62}
    5663if ($selectedStage == "") { $selectedStage = "all_stages"; }
    5764if ($plotType == "") { $plotType = "linear"; }
     
    7380$table = "<table bgcolor=\"#FFFFFF\" width=\"700\" align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n";
    7481
    75 $labels = getLabels($czardb);
    7682
    7783if ($debug) {
     
    161167
    162168    # order by descending priority as set in gpc1 database
    163     $sql = "SELECT DISTINCT label FROM processed WHERE  timestamp >= now() - INTERVAL 1 DAY";
     169    $sql = "SELECT DISTINCT label FROM processed WHERE  timestamp >= now() - INTERVAL 1 DAY ORDER BY label";
    164170    if ($debug) {echo "$sql<br>";}
    165171
Note: See TracChangeset for help on using the changeset viewer.