IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 27, 2010, 11:53:25 AM (16 years ago)
Author:
Serge CHASTEL
Message:

Change for 3x2 table display

File:
1 edited

Legend:

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

    r28688 r28718  
    319319    $warpIdCollection[$warpId] = array();
    320320    $skyCellValue = preg_replace("|skycell[.]|","",$row[23]);
    321     $warpIdCollection[$warpId]["11"] = $skyCellValue;
     321    $warpIdCollection[$warpId]["12"] = $skyCellValue;
    322322/*     echo "<tr><td>Skycell is [$skyCellValue]</td></tr>"; */
    323323
     
    344344    echo "<td class=\"$class\">\n";
    345345    echo "<table border=\"1\"><tr>\n";
    346     echo "  <td class=\"ul2x2\" id=\"$warpId.00\">$noImageValue</td>\n";
    347     echo "  <td class=\"ur2x2\" id=\"$warpId.01\">$noImageValue</td>\n";
     346/*     echo "  <td class=\"ul3x2\" id=\"$warpId.00\">$noImageValue</td>\n"; */
     347    echo "  <td class=\"ul3x2\" id=\"$warpId.00\"></td>\n";
     348    echo "  <td class=\"uc3x2\" id=\"$warpId.01\">$noImageValue</td>\n";
     349    echo "  <td class=\"ur3x2\" id=\"$warpId.02\">$noImageValue</td>\n";
    348350    echo "</tr><tr>\n";
    349     echo "  <td class=\"ll2x2\" id=\"$warpId.10\">$noImageValue</td>\n";
    350     echo "  <td class=\"lr2x2\" id=\"$warpId.11\">$noImageValue</td></tr></table>\n";
     351/*     echo "  <td class=\"ll3x2\" id=\"$warpId.10\">$noImageValue</td>\n"; */
     352    echo "  <td class=\"ll3x2\" id=\"$warpId.10\"></td>\n";
     353    echo "  <td class=\"lc3x2\" id=\"$warpId.11\">$noImageValue</td>\n";
     354    echo "  <td class=\"lr3x2\" id=\"$warpId.12\">$noImageValue</td>\n";
     355    echo "</tr></table>\n";
    351356    echo "</td>\n";
    352357    $link = "getimage.php" . "?menu=ipp.science.dat&" . $ID['link'];
     
    359364    echo "<td class=\"$class\">\n";
    360365    echo "<table border=\"1\"><tr>\n";
    361     echo "  <td class=\"ul2x2\" id=\"t$warpId.00\">No image</td>\n";
    362     echo "  <td class=\"ur2x2\" id=\"t$warpId.01\">No image</td>\n";
     366/*     echo "  <td class=\"ul3x2\" id=\"t$warpId.00\">No image</td>\n"; */
     367    echo "  <td class=\"ul3x2\" id=\"t$warpId.00\"></td>\n";
     368    echo "  <td class=\"uc3x2\" id=\"t$warpId.01\">No image</td>\n";
     369    echo "  <td class=\"ur3x2\" id=\"t$warpId.02\">No image</td>\n";
    363370    echo "</tr><tr>\n";
    364     echo "  <td class=\"ll2x2\" id=\"t$warpId.10\">No image</td>\n";
    365     echo "  <td class=\"lr2x2\" id=\"t$warpId.11\">No image</td></tr></table>\n";
     371/*     echo "  <td class=\"ll3x2\" id=\"t$warpId.10\">No image</td>\n"; */
     372    echo "  <td class=\"ll3x2\" id=\"t$warpId.10\"></td>\n";
     373    echo "  <td class=\"lc3x2\" id=\"t$warpId.11\">No image</td>\n";
     374    echo "  <td class=\"lr3x2\" id=\"t$warpId.12\">No image</td>\n";
     375    echo "</tr></table>\n";
    366376    echo "</td>\n";
    367377
    368378    $cellContent = "<a href=\\\"$link\\\"> <img src=\\\"getimage.php?name=$row[22].$row[23]&rule=PPSKYCELL.JPEG2&camera=$row[11]&class_id=NONE\\\"> </a>";
    369     echo "<script type=\"text/javascript\">changeCell(\"$warpId.11\", \"$cellContent\");</script>";
     379    echo "<script type=\"text/javascript\">changeCell(\"$warpId.12\", \"$cellContent\");</script>";
    370380    $imageNameValue = ($row[23]=="noimage" ?
    371381                       "No image" : $row[23]);
    372     echo "<script type=\"text/javascript\">changeCell(\"t$warpId.11\", \"$imageNameValue\");</script>";
     382    echo "<script type=\"text/javascript\">changeCell(\"t$warpId.12\", \"$imageNameValue\");</script>";
    373383
    374384    //resume with "regular" columns
     
    394404    // Update table cell content
    395405/*     echo "<tr><td>$warpId in warpIdCollection</td></tr>"; */
    396     $lrValue =  $warpIdCollection[$warpId]["11"];
     406    $lrValue =  $warpIdCollection[$warpId]["12"];
    397407    $skyCellValue = preg_replace("|skycell[.]|","",$row[23]);
    398408/*     echo "<tr><td>Current skycell is [$skyCellValue] / LowerRight is [$lrValue]</td></tr>"; */
     
    406416
    407417    if ($skyCellValue == $lrValue + 1) {
    408 /*       echo "<tr><td>Update LowerLeft</td></tr>"; */
    409       $warpIdCollection[$warpId]["10"] = $skyCellValue;
    410       echo "<script type=\"text/javascript\">changeCell(\"$warpId.10\", \"$cellContent\");</script>";
    411       echo "<script type=\"text/javascript\">changeCell(\"t$warpId.10\", \"$row[23]\");</script>";
     418      $warpIdCollection[$warpId]["11"] = $skyCellValue;
     419      echo "<script type=\"text/javascript\">changeCell(\"$warpId.11\", \"$cellContent\");</script>";
     420      echo "<script type=\"text/javascript\">changeCell(\"t$warpId.11\", \"$row[23]\");</script>";
    412421    } else {
    413       if (!isSet($warpIdCollection[$warpId]["01"])) {
    414 /*      echo "<tr><td>Update UpperRight</td></tr>"; */
    415         $warpIdCollection[$warpId]["01"] = $skyCellValue;
    416         echo "<script type=\"text/javascript\">changeCell(\"$warpId.01\", \"$cellContent\");</script>";
    417         echo "<script type=\"text/javascript\">changeCell(\"t$warpId.01\", \"$row[23]\");</script>";
     422      if ($skyCellValue == $lrValue + 2) {
     423        $warpIdCollection[$warpId]["10"] = $skyCellValue;
     424        echo "<script type=\"text/javascript\">changeCell(\"$warpId.10\", \"$cellContent\");</script>";
     425        echo "<script type=\"text/javascript\">changeCell(\"t$warpId.10\", \"$row[23]\");</script>";
    418426      } else {
    419         $urValue = $warpIdCollection[$warpId]["01"];
    420         $warpIdCollection[$warpId]["00"] = $skyCellValue;
    421         if ($urValue + 1 != $skyCellValue) {
    422           $expected = $urValue + 1;
    423           $actual = $skyCellValue;
    424           echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"Problem in UpperLeft corner: expected $expected but was $actual\");</script>";
    425           echo "<tr><td>Problem in UpperLeft!</td></tr>";
     427        if (!isSet($warpIdCollection[$warpId]["02"])) {
     428          /*    echo "<tr><td>Update UpperRight</td></tr>"; */
     429          $warpIdCollection[$warpId]["02"] = $skyCellValue;
     430          echo "<script type=\"text/javascript\">changeCell(\"$warpId.02\", \"$cellContent\");</script>";
     431          echo "<script type=\"text/javascript\">changeCell(\"t$warpId.02\", \"$row[23]\");</script>";
    426432        } else {
    427 /*        echo "<tr><td>Update UpperLeft</td></tr>"; */
    428           echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"$cellContent\");</script>";
    429           echo "<script type=\"text/javascript\">changeCell(\"t$warpId.00\", \"$row[23]\");</script>";
     433          $urValue = $warpIdCollection[$warpId]["02"];
     434          if ($urValue + 1 == $skyCellValue) {
     435            echo "<script type=\"text/javascript\">changeCell(\"$warpId.01\", \"$cellContent\");</script>";
     436            echo "<script type=\"text/javascript\">changeCell(\"t$warpId.01\", \"$row[23]\");</script>";
     437          } else {
     438            if ($urValue + 2 == $skyCellValue) {
     439              echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"$cellContent\");</script>";
     440              echo "<script type=\"text/javascript\">changeCell(\"t$warpId.00\", \"$row[23]\");</script>";
     441            } else {
     442              $expected = $urValue + 1;
     443              $actual = $skyCellValue;
     444              echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"Problem in UpperLeft corner: expected $expected but was $actual\");</script>";
     445              echo "<tr><td>Problem in Upper part!</td></tr>";
     446            }
     447          }
    430448        }
    431449      }
    432450    }
    433451  }
    434 
    435 
    436452}
    437453
Note: See TracChangeset for help on using the changeset viewer.