IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13264


Ignore:
Timestamp:
May 4, 2007, 3:07:41 PM (19 years ago)
Author:
eugene
Message:

updates to use new API for images

Location:
trunk/ippMonitor
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/def/camPendingExp.d

    r12835 r13264  
    66WHERE camPendingExp.chip_id = chipProcessedExp.chip_id
    77
     8ARGS  ARG1  chipProcessedExp.exp_tag=$chipProcessedExp.exp_tag
     9
    810#     field                     size  name          show   link to                  extras
    9 FIELD chipProcessedExp.exp_tag, 20,   exposure ID,  value, chipProcessedImfile.php, chipProcessedExp.exp_tag=$chipProcessedExp.exp_tag
    10 FIELD camPendingExp.chip_id,    20,   chip ID,      value, chipProcessedExp.php,    exp_tag=$chipProcessedExp.exp_tag
     11FIELD chipProcessedExp.exp_tag, 20,   exposure ID,  value, chipProcessedImfile.php, ARG1
     12FIELD camPendingExp.chip_id,    20,   chip ID,      value, chipProcessedExp.php,    ARG1
    1113FIELD camPendingExp.cam_id,     20,   cam ID
  • trunk/ippMonitor/def/camProcessedExp.d

    r12835 r13264  
    1 TABLE camProcessedExp, chipProcessedExp
     1TABLE camProcessedExp, chipProcessedExp, rawExp
    22TITLE Camera-Level Processed Exposures
    33FILE  camProcessedExp.php
     
    55
    66WHERE camProcessedExp.chip_id = chipProcessedExp.chip_id
     7WHERE camProcessedExp.exp_tag = rawExp.exp_tag
    78
    8 #     field                           size  name       show                            link to                  extras
     9# define image names to be used below
     10# IMAGE VAR basename filerule camera class_id
     11IMAGE JPEG  $camProcessedExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE
     12
     13# show all chips for this camera exposure, summary stats from the camera tables
     14ARGS  ARG1  camera=$rawExp.camera
     15ARGS  ARG1  basename=$camProcessedExp.path_base
     16ARGS  ARG1  exp_tag=$chipProcessedExp.exp_tag
     17
     18#     field                           size  name       show        link to                  extras
    919FIELD chipProcessedExp.exp_tag,       15,   Exposure,  value
    10 FIELD *,                              8,    image,     image=$camProcessedExp.path_base@PPIMAGE.JPEG2, chipProcessedImfile.php, exp_tag=$chipProcessedExp.exp_tag,image=$$camProcessedExp.path_base@PPIMAGE.JPEG1
     20FIELD *,                              8,    image,     image=JPEG, chipProcessedImfile.php, ARG1
    1121FIELD camProcessedExp.bg,             8,    backgnd,   value
    1222FIELD camProcessedExp.bg_mean_stdev,  8,    [stdev],   value
  • trunk/ippMonitor/def/chipPendingExp.d

    r12835 r13264  
    44MENU  ipp.science.dat
    55
     6ARGS  ARG1  exp_tag=$exp_tag
     7
    68#     field          size  name         show    link to         extras
    79FIELD chip_id,       20,   chip ID
    8 FIELD exp_tag,       20,   exposure ID, value,  rawImfile.php,  exp_tag=$exp_tag
     10FIELD exp_tag,       20,   exposure ID, value,  rawImfile.php,  ARG1
    911FIELD recipe,        20,   recipe
    1012FIELD guide_id,      20,   guide ID
  • trunk/ippMonitor/def/chipProcessedExp.d

    r12835 r13264  
    44MENU  ipp.science.dat
    55
    6 #     field          name  show           link to  extras
    7 FIELD exp_tag,       20,   exposure ID,   value,   chipProcessedImfile.php,  exp_tag=$exp_tag
     6ARGS  ARG1  exp_tag=$exp_tag
     7
     8#     field          size  name           show     link to                   extras
     9FIELD exp_tag,       20,   exposure ID,   value,   chipProcessedImfile.php,  ARG1
    810FIELD chip_id,       20,   Chip ID
    9 FIELD guide_id,      20,   guide ID,      value,   guideProcessedExp.php,    exp_tag=$exp_tag
     11FIELD guide_id,      20,   guide ID,      value,   guideProcessedExp.php,    ARG1
    1012FIELD label,         20,   label
    1113FIELD workdir,       20,   workdir
  • trunk/ippMonitor/def/chipProcessedImfile.d

    r12835 r13264  
    1313FIELD chipProcessedImfile.bg_stdev,       8,    stdev
    1414
    15 TAIL PHP insert_image ('image');
     15TAIL PHP insert_image ('PPIMAGE_JPEG1');
  • trunk/ippMonitor/def/detInputExp.d

    r9347 r13264  
    44MENU  ipp.detrend.dat
    55
    6 # HEAD HTML  test head 1 <br>
     6ARGS  ARG1  exp_tag=$exp_tag
    77
    8 #     field      width  name        show         link to                       extras
     8ARGS  ARG2  exp_tag=$exp_tag
     9ARGS  ARG2  det_id=$det_id
     10ARGS  ARG2  iteration=$iteration
     11
     12#     field      width  name        show         link to                 extras
    913FIELD det_id,    7,     det_id
    10 FIELD exp_tag,   20,    exposure,   value,       rawImfile.php,          exp_tag=$exp_tag
     14FIELD exp_tag,   20,    exposure,   value,       rawImfile.php,          ARG1
    1115FIELD iteration, 5,     iteration
    1216FIELD include,   7,     include
    13 FIELD *,         5,     resid,      value=goto,  detResidImfile.php,     exp_tag=$exp_tag,det_id=$det_id,iteration=$iteration
    14 FIELD *,         5,     proc,       value=goto,  detProcessedImfile.php, exp_tag=$exp_tag,det_id=$det_id,iteration=$iteration
     17FIELD *,         5,     resid,      value=goto,  detResidImfile.php,     ARG2
     18FIELD *,         5,     proc,       value=goto,  detProcessedImfile.php, ARG2
    1519
    16 # TAIL HTML  test tail 1 <br>
  • trunk/ippMonitor/def/detNormalizedExp.d

    r12835 r13264  
    1 TABLE detNormalizedExp
     1TABLE detNormalizedExp, rawExp
    22TITLE detNormalizedExp
    33FILE  detNormalizedExp.php
    44MENU  ipp.detrend.dat
    55
    6 #     field        size     name       show            link to                  extras
    7 FIELD det_id,        7,     det_id
    8 FIELD bg,            8,     backgnd
    9 FIELD bg_mean_stdev, 8,     [stdev]
    10 FIELD bg_stdev,      8,     stdev
    11 FIELD iteration,     5,     iteration
    12 FIELD *,             8,     image,     image=$path_base@PPIMAGE.JPEG2,  detNormalizedImfile.php, det_id=$det_id,iteration=$iteration,image=$path_base@PPIMAGE.JPEG1
    13 FIELD path_base,     20,    path_base, none
    14 #FIELD recipe, 20,   recipe
     6# the following WHERE clauses are added to all queries joined by AND
     7WHERE detNormalizedExp.exp_tag = rawExp.exp_tag
     8
     9# define image names to be used below
     10# IMAGE VAR basename filerule camera class_id
     11IMAGE JPEG2 $detNormalizedExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE
     12
     13ARGS  ARG2 det_id=$detNormalizedExp.det_id
     14ARGS  ARG2 iteration=$detNormalizedExp.iteration
     15ARGS  ARG2 exp_tag=$detNormalizedExp.exp_tag
     16ARGS  ARG2 camera=$rawExp.camera
     17ARGS  ARG2 basename=$detNormalizedExp.path_base
     18
     19#     field                           size     name     show          link to                  extras
     20FIELD detNormalizedExp.det_id,        7,     det_id
     21FIELD detNormalizedExp.bg,            8,     backgnd
     22FIELD detNormalizedExp.bg_mean_stdev, 8,     [stdev]
     23FIELD detNormalizedExp.bg_stdev,      8,     stdev
     24FIELD detNormalizedExp.iteration,     5,     iteration
     25FIELD *,                              8,     image,     image=JPEG2,  detNormalizedImfile.php, ARG2
     26FIELD detNormalizedExp.path_base,     20,    path_base, none
  • trunk/ippMonitor/def/detNormalizedImfile.d

    r12080 r13264  
    1414#FIELD path_base,     20, path_base
    1515
    16 TAIL PHP insert_image ('image');
     16TAIL PHP insert_image ('PPIMAGE_JPEG1');
  • trunk/ippMonitor/def/detProcessedExp.d

    r12835 r13264  
    1 TABLE detProcessedExp
     1TABLE detProcessedExp, rawExp
    22TITLE detProcessedExp
    33FILE  detProcessedExp.php
    44MENU  ipp.detrend.dat
    55
    6 #     field     size   name       show            link to                 extras
    7 FIELD det_id,     7,   Det ID,    value
    8 FIELD exp_tag,   15,   Exposure,  value
    9 FIELD *,          8,   image,     image=$path_base@PPIMAGE.JPEG2,  detProcessedImfile.php, det_id=$det_id,exp_tag=$exp_tag,image=$path_base@PPIMAGE.JPEG1
    10 FIELD bg,         8,   backgnd,   value
    11 FIELD bg_mean_stdev, 8, [stdev],  value
    12 FIELD bg_stdev,   8,   stdev,     value
    13 FIELD recipe,    15,   Recipe,    value
    14 FIELD path_base, 20,   path_base, none
     6# the following WHERE clauses are added to all queries joined by AND
     7WHERE detProcessedExp.exp_tag = rawExp.exp_tag
     8
     9# define image names to be used below
     10# IMAGE VAR basename filerule camera class_id
     11IMAGE JPEG2 $detProcessedExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE
     12
     13ARGS  ARG1 det_id=$detProcessedExp.det_id
     14ARGS  ARG1 exp_tag=$detProcessedExp.exp_tag
     15ARGS  ARG1 camera=$rawExp.camera
     16ARGS  ARG1 basename=$detProcessedExp.path_base
     17
     18#     field                    size     name       show          link to                 extras
     19FIELD detProcessedExp.det_id,     7,    Det ID,    value
     20FIELD rawExp.camera,             10,    camera,    value
     21FIELD detProcessedExp.exp_tag,   15,    Exposure,  value
     22FIELD *,                          8,    image,     image=JPEG2,  detProcessedImfile.php, ARG1
     23FIELD detProcessedExp.bg,         8,    backgnd,   value
     24FIELD detProcessedExp.bg_mean_stdev, 8, [stdev],   value
     25FIELD detProcessedExp.bg_stdev,   8,    stdev,     value
     26FIELD detProcessedExp.recipe,    15,    Recipe,    value
     27FIELD detProcessedExp.path_base, 20,    path_base, none
     28
     29# note: you must include all desired fields, where ever they are used,
     30# in FIELD
  • trunk/ippMonitor/def/detProcessedImfile.d

    r12080 r13264  
    1515# FIELD path_base,  20,   path_base
    1616
    17 TAIL PHP insert_image ('image');
     17TAIL PHP insert_image ('PPIMAGE_JPEG1');
  • trunk/ippMonitor/def/detResidExp.d

    r13241 r13264  
    88
    99# define image names to be used below
    10 VALUE JPEG1 $detResidExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE
     10# IMAGE VAR basename filerule camera class_id
     11IMAGE JPEG2 $detResidExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE
    1112
    12 #     field                   size    name       show    link to              extras
     13# define the arguments supplied to the links below (if any)
     14ARGS  ARG1 exp_tag=$detResidExp.exp_tag
     15
     16ARGS  ARG2 det_id=$detResidExp.det_id
     17ARGS  ARG2 iteration=$detResidExp.iteration
     18ARGS  ARG2 exp_tag=$detResidExp.exp_tag
     19ARGS  ARG2 camera=$rawExp.camera
     20ARGS  ARG2 basename=$detResidExp.path_base
     21
     22#     field                   size    name       show         link to              linkargs
    1323FIELD detResidExp.det_id,        7,   Det ID,    value
    14 FIELD detResidExp.exp_tag,      15,   Exposure,  value,  rawImfile.php,       exp_tag=$exp_tag
     24FIELD detResidExp.exp_tag,      15,   Exposure,  value,       rawImfile.php,       ARG1
    1525FIELD detResidExp.bg,            8,   backgnd,   value
    1626FIELD detResidExp.bg_mean_stdev, 8,   [stdev]
    1727FIELD detResidExp.bg_stdev,      8,   stdev,     value
    1828FIELD detResidExp.iteration,     5,   iter,      value
    19 FIELD *,                         8,   image,     image=JPEG1, detResidImfile.php, det_id=$det_id,iteration=$iteration,exp_tag=$exp_tag,image=1
     29FIELD *,                         8,   image,     image=JPEG2, detResidImfile.php,  ARG2
    2030FIELD detResidExp.accept,        4,   keep,      value
    21 FIELD detResidExp.path_base,    20,   path_base, none
    22 
    23 # FIELD recipe,     15,    recipe,    value
    24 
    25 # ipp_filename.pl --filerule $rule --basename $name --camera $camera --class_id $class_id
    26 # getimage.php name=$1 rule=$2 camera=$3 class_id=$4
     31FIELD detResidExp.path_base,    20,   path_base,  none
     32FIELD rawExp.camera,            20,   camera,     none
  • trunk/ippMonitor/def/detResidImfile.d

    r12080 r13264  
    1616# FIELD path_base,  20,   path_base
    1717
    18 TAIL PHP insert_image ('image');
     18TAIL PHP insert_image ('PPIMAGE_JPEG1');
     19TAIL PHP insert_image ('PPIMAGE_JPEG2');
  • trunk/ippMonitor/def/detRun.d

    r12835 r13264  
    44MENU  ipp.detrend.dat
    55
     6ARGS  ARG1 det_id=$det_id
     7
    68#     field       width name         show    link to              extras
    7 FIELD det_id,        7,   det ID,      value,  detRunSummary.php,   det_id=$det_id
     9FIELD det_id,        7,   det ID,      value,  detRunSummary.php,   ARG1
    810FIELD iteration,     5,   iteration
    911FIELD det_type,      8,   det_type
  • trunk/ippMonitor/def/detRunSummary.d

    r9011 r13264  
    44MENU  ipp.detrend.dat
    55
     6ARGS  ARG1  det_id=$det_id
     7ARGS  ARG1  iteration=$iteration
     8
    69#     field      name             show         link to           extras
    710FIELD det_id,    7,    det_id   
    811FIELD iteration, 5,    iter
    912FIELD accept,    4,    keep
    10 FIELD *,         20,   choose,    value=input, detInputExp.php,  det_id=$det_id,iteration=$iteration
    11 FIELD *,         20,   choose,    value=resid, detResidExp.php,  det_id=$det_id,iteration=$iteration
     13FIELD *,         20,   choose,    value=input, detInputExp.php,  ARG1
     14FIELD *,         20,   choose,    value=resid, detResidExp.php,  ARG1
    1215FIELD bg,        20,   bg
    1316FIELD bg_stdev,  20,   bg_stdev
  • trunk/ippMonitor/def/example.d

    r9439 r13264  
    1212WHERE detRun.iteration = detRunSummary.iteration
    1313
     14ARGS  ARG1 det_id=$detRunSummary.det_id
     15ARGS  ARG1 iteration=$detRunSummary.iteration
     16
    1417#     field                    width name           show         link to           extras
    1518FIELD detRunSummary.det_id,    7,    det_id
    1619FIELD detRun.det_type,         5,    type
    1720FIELD detRunSummary.iteration, 5,    iter
    18 FIELD *,                       20,   choose,       value=input, detInputExp.php,  det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration
    19 FIELD *,                       20,   choose,       value=resid, detResidExp.php,  det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration
     21FIELD *,                       20,   choose,       value=input, detInputExp.php,  ARG1
     22FIELD *,                       20,   choose,       value=resid, detResidExp.php,  ARG1
    2023FIELD detRunSummary.bg,        20,   bg
    2124FIELD detRunSummary.bg_stdev,  20,   bg_stdev
  • trunk/ippMonitor/def/guidePendingExp.d

    r12081 r13264  
    44MENU  ipp.science.dat
    55
     6ARGS  ARG1  exp_tag=$exp_tag
     7
    68#     field       name         show     link to         extras
    7 FIELD exp_tag,     20,   exposure ID, value,   rawImfile.php,  exp_tag=$exp_tag
     9FIELD exp_tag,     20,   exposure ID, value,   rawImfile.php,  ARG1
    810FIELD recipe,     20,   recipe
    911FIELD guide_version, 20,   guide version
  • trunk/ippMonitor/def/masterDetrendFrames.d

    r9439 r13264  
    1212WHERE detRun.iteration = detRunSummary.iteration
    1313
     14ARGS  ARG1 det_id=$detRunSummary.det_id
     15
     16ARGS  ARG2 det_id=$detRunSummary.det_id
     17ARGS  ARG2 iteration=$detRunSummary.iteration
     18
    1419#     field                    width name          show         link to                   extras
    15 FIELD detRunSummary.det_id,    7,    det_id,       value,       detRunSummary.php,        det_id=$detRunSummary.det_id
     20FIELD detRunSummary.det_id,    7,    det_id,       value,       detRunSummary.php,        ARG1
    1621FIELD detRunSummary.iteration, 5,    iter
    1722FIELD detRun.det_type,         5,    type
    18 FIELD *,                       20,   choose,       value=files, detNormalizedImfiles.php, det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration
    19 FIELD *,                       20,   choose,       value=input, detInputExp.php,          det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration
    20 FIELD *,                       20,   choose,       value=resid, detResidExp.php,          det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration
     23FIELD *,                       20,   choose,       value=files, detNormalizedImfiles.php, ARG2
     24FIELD *,                       20,   choose,       value=input, detInputExp.php,          ARG2
     25FIELD *,                       20,   choose,       value=resid, detResidExp.php,          ARG2
    2126FIELD detRunSummary.bg,        20,   bg
    2227FIELD detRunSummary.bg_stdev,  20,   bg_stdev
  • trunk/ippMonitor/def/rawDetrendExp.d

    r11490 r13264  
    77WHERE rawExp.exp_type != 'OBJECT'
    88
     9ARGS ARG1 exp_tag=$exp_tag
     10
    911#        field        name  show           link to  extras
    10 FIELD    exp_tag,     10,   exposure ID,   value,   rawImfile.php,  exp_tag=$exp_tag
     12FIELD    exp_tag,     10,   exposure ID,   value,   rawImfile.php,  ARG1
    1113FIELD    telescope,   10,   Telescope
    1214FIELD    camera,      10,   Camera
  • trunk/ippMonitor/def/rawDetrendExp_detrend.d

    r11490 r13264  
    77WHERE rawExp.exp_type != 'OBJECT'
    88
    9 #        field        name           show     link to         extras
    10 FIELD    exp_tag,     10,   exposure ID,   value,   rawImfile.php,  exp_tag=$exp_tag
     9ARGS ARG1 exp_tag=$exp_tag
     10
     11#        field        size  name           show     link to         extras
     12FIELD    exp_tag,     10,   exposure ID,   value,   rawImfile.php,  ARG1
    1113FIELD    telescope,   10,   Telescope
    1214FIELD    camera,      10,   Camera
  • trunk/ippMonitor/def/rawScienceExp.d

    r11490 r13264  
    77WHERE rawExp.exp_type = 'OBJECT'
    88
    9 #        field        name           show          link to   extras
    10 FIELD    exp_tag,     10,            exposure Tag, value,    rawImfile.php,  exp_tag=$exp_tag,camera=$camera,foo=bar
    11 FIELD    telescope,   10,            Telescope,    value,    telescopes.php
    12 FIELD    camera,      10,            Camera
    13 FIELD    exp_type,     8,            Type   
    14 FIELD    filter,      10,            FILTER
    15 FIELD    ra,           8,            ra         
    16 FIELD    decl,         8,            decl       
    17 FIELD    object,      10,            object
    18 FIELD    airmass,      5,            airmass     
    19 FIELD    exp_time,     5,            exp_time   
    20 FIELD    bg,           5,            bg         
    21 FIELD    bg_stdev,     5,            bg_stdev   
     9ARGS ARG1 exp_tag=$exp_tag
     10ARGS ARG1 camera=$camera
     11ARGS ARG1 foo=bar
     12
     13#        field        size name           show          link to   extras
     14FIELD    exp_tag,     10,  exposure Tag, value,    rawImfile.php,  ARG1
     15FIELD    telescope,   10,  Telescope,    value,    telescopes.php
     16FIELD    camera,      10,  Camera
     17FIELD    exp_type,     8,  Type   
     18FIELD    filter,      10,  FILTER
     19FIELD    ra,           8,  ra         
     20FIELD    decl,         8,  decl       
     21FIELD    object,      10,  object
     22FIELD    airmass,      5,  airmass     
     23FIELD    exp_time,     5,  exp_time   
     24FIELD    bg,           5,  bg         
     25FIELD    bg_stdev,     5,  bg_stdev   
    2226# FIELD    imfiles, 20,   imfiles     
    2327# FIELD    bg_mean_stdev, 20,   bg_mean_stdev   
  • trunk/ippMonitor/def/rawUnknownExp.d

    r11491 r13264  
    77WHERE rawExp.exp_type is NULL
    88
    9 #        field        name  show           link to  extras
    10 FIELD    exp_tag,     10,   exposure ID,   value,   rawImfile.php,  exp_tag=$exp_tag
     9ARGS ARG1 exp_tag=$exp_tag
     10
     11#        field        size  name           show     link to        extras
     12FIELD    exp_tag,     10,   exposure ID,   value,   rawImfile.php, ARG1
    1113FIELD    telescope,   10,   Telescope
    1214FIELD    camera,      10,   Camera
  • trunk/ippMonitor/generate

    r11490 r13264  
    1414# @headcode, @tailcode                 : additional HTML or PHP code before or after table
    1515# @field, @width, @name, @show, @link, @extras : properties of each table column
     16# @imagedefs, %image: array of image defines
    1617
    1718&parse_schema;
     
    6162        if ($key eq "HEAD") {
    6263            push @headcode, $value;
     64        }
     65
     66        # the IMAGE commands sets up a reference name
     67        if ($key eq "IMAGE") {
     68            push @imagedefs, $value;
     69        }
     70
     71        # the IMAGE commands sets up a reference name
     72        if ($key eq "ARGS") {
     73            push @linkargs, $value;
    6374        }
    6475
     
    94105    &define_where_string (@where);
    95106
     107    foreach $linkarg (@linkargs) {
     108        &parse_linkarg ($linkarg);
     109    }
     110
     111    foreach $imagedef (@imagedefs) {
     112        &parse_imagedef ($imagedef);
     113    }
     114
    96115    if (0) {
    97116        print STDERR "show: $show[0]\n";
     
    220239            printf FILE "  \$link = \"$link[$i]\" . \"?menu=$MENU&\" . \$ID['link'];\n";
    221240            # add extra GET data to target
    222             if ($extras[$i]) { &parse_extras ($extras[$i]); }
     241            if ($extras[$i]) { &parse_extras ($linkarg{$extras[$i]}); }
    223242            # print the actual table cell line with the link...
    224243            if (! $value && ($field[$i] ne "*")) { $value = "\$row[$Nrow]"; }
     
    229248        if (($label eq "image") && !$link[$i]) {
    230249            # print the actual table cell line with the image...
    231             printf FILE "  echo \"<td class=\\\"list\\\"><img src=\\\"getimage.php?name=$value\\\"></td>\\n\";\n";
     250            printf FILE "  echo \"<td class=\\\"list\\\"><img src=\\\"$image{$value}\\\"></td>\\n\";\n";
    232251            next;
    233252        }
     
    237256            printf FILE "  \$link = \"$link[$i]\" . \"?menu=$MENU&\" . \$ID['link'];\n";
    238257            # add extra php data to target
    239             if ($extras[$i]) { &parse_extras ($extras[$i]); }
     258            if ($extras[$i]) { &parse_extras ($linkarg{$extras[$i]}); }
    240259            # print the actual table cell line with the link...
    241             printf FILE "  echo \"<td class=\\\"list\\\"><a href=\\\"\$link\\\"> <img src=\\\"getimage.php?name=$value\\\"> </a></td>\\n\";\n";
     260            printf FILE "  echo \"<td class=\\\"list\\\"><a href=\\\"\$link\\\"> <img src=\\\"$image{$value}\\\"> </a></td>\\n\";\n";
    242261            next;
    243262        }
     
    314333        printf FILE "  \$link = \$link . \"&$outline\";\n";
    315334    }
     335}
     336
     337# each linkarg is an entry of the form "word name=value"
     338# the entries for matching words are concatenated together
     339# separated by commas to create the value $linkarg{word}
     340sub parse_linkarg {
     341    my ($word, $value);
     342
     343    ($word, $value) = split (" ", $_[0]);
     344
     345    if ($linkarg{$word}) {
     346        $linkarg{$word} = "$linkarg{$word},$value";
     347    } else {
     348        $linkarg{$word} = $value;
     349    }   
    316350}
    317351
     
    360394}
    361395
     396# given a variable of the form $fieldname, return the corresponding
     397# row entry in the form $row[N], otherwise return $fieldname
     398# globals: field (list of field names), count (list of sequence)
     399sub parse_fieldname {
     400    my ($variable) = $_[0];
     401    my ($i);
     402   
     403    unless ($variable =~ m|^\$|) {
     404        return $variable;
     405    }
     406
     407    $fieldname = substr ($variable, 1);
     408
     409    print STDERR "fieldname: $fieldname\n";
     410
     411    for ($i = 0; $i < @field; $i++) {
     412        print STDERR "$i: $field[$i] : $fieldname\n";
     413
     414        if ($field[$i] eq "*") { next; }
     415        if ($fieldname ne $field[$i]) { next; }
     416
     417
     418        $Nrow = $count[$i];
     419
     420        $value = "\$row[$Nrow]";
     421
     422        print STDERR "found : $i : $count[$i] : $Nrow : $value\n";
     423        return $value;
     424    }
     425    return $variable;
     426}
     427
     428sub parse_imagedef {
     429    my ($value) = $_[0];
     430
     431    ($var, $name, $rule, $camera, $class) = split (" ", $value);
     432    $name   = &parse_fieldname ($name);
     433    $camera = &parse_fieldname ($camera);
     434    $class  = &parse_fieldname ($class);
     435    $image{$var} = "getimage.php?name=$name&rule=$rule&camera=$camera&class_id=$class";
     436    return 1;
     437}
     438
    362439sub init_key {
    363440    my ($key)   = $_[0];
  • trunk/ippMonitor/raw/getimage.php

    r13241 r13264  
    4747exec ("ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id", $output, $status);
    4848
     49# use these to check the environment
     50# passthru ("env");
     51# passthru ("perl --version");
     52
    4953$filename = $output[0];
    5054if ($status) {
  • trunk/ippMonitor/raw/ipp.php

    r12835 r13264  
    11<?php
    22
    3 $dTABLE = 40;
     3$dTABLE = 10;
    44
    55function logintext () {
     
    316316// expect image supplied with key=name
    317317// this function should define matching hidden inputs in the form
    318 function insert_image ($key) {
     318function insert_image ($rule) {
    319319
    320320  if ($_SERVER[REQUEST_METHOD] == 'GET') {
    321     $name = $_GET[$key];
    322   } else {
    323     $name = $_POST[$key];
    324   }
    325 
    326   if ($name) {
    327     echo "<img src=\"getimage.php?name=$name\">\n";
     321    $basename = $_GET['basename'];
     322    $class_id = $_GET['class'];
     323    $camera   = $_GET['camera'];
     324  } else {
     325    $basename = $_POST['basename'];
     326    $class_id = $_POST['class'];
     327    $camera   = $_POST['camera'];
     328  }
     329
     330  if (! $class_id) { $class_id = "NONE"; }
     331
     332  if ($basename && $camera && $rule) {
     333    echo "<img src=\"getimage.php?name=$basename&rule=$rule&camera=$camera&class_id=$class_id\">\n";
    328334  }
    329335}
Note: See TracChangeset for help on using the changeset viewer.