Changeset 13264
- Timestamp:
- May 4, 2007, 3:07:41 PM (19 years ago)
- Location:
- trunk/ippMonitor
- Files:
-
- 24 edited
-
def/camPendingExp.d (modified) (1 diff)
-
def/camProcessedExp.d (modified) (2 diffs)
-
def/chipPendingExp.d (modified) (1 diff)
-
def/chipProcessedExp.d (modified) (1 diff)
-
def/chipProcessedImfile.d (modified) (1 diff)
-
def/detInputExp.d (modified) (1 diff)
-
def/detNormalizedExp.d (modified) (1 diff)
-
def/detNormalizedImfile.d (modified) (1 diff)
-
def/detProcessedExp.d (modified) (1 diff)
-
def/detProcessedImfile.d (modified) (1 diff)
-
def/detResidExp.d (modified) (1 diff)
-
def/detResidImfile.d (modified) (1 diff)
-
def/detRun.d (modified) (1 diff)
-
def/detRunSummary.d (modified) (1 diff)
-
def/example.d (modified) (1 diff)
-
def/guidePendingExp.d (modified) (1 diff)
-
def/masterDetrendFrames.d (modified) (1 diff)
-
def/rawDetrendExp.d (modified) (1 diff)
-
def/rawDetrendExp_detrend.d (modified) (1 diff)
-
def/rawScienceExp.d (modified) (1 diff)
-
def/rawUnknownExp.d (modified) (1 diff)
-
generate (modified) (8 diffs)
-
raw/getimage.php (modified) (1 diff)
-
raw/ipp.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/def/camPendingExp.d
r12835 r13264 6 6 WHERE camPendingExp.chip_id = chipProcessedExp.chip_id 7 7 8 ARGS ARG1 chipProcessedExp.exp_tag=$chipProcessedExp.exp_tag 9 8 10 # field size name show link to extras 9 FIELD chipProcessedExp.exp_tag, 20, exposure ID, value, chipProcessedImfile.php, chipProcessedExp.exp_tag=$chipProcessedExp.exp_tag10 FIELD camPendingExp.chip_id, 20, chip ID, value, chipProcessedExp.php, exp_tag=$chipProcessedExp.exp_tag11 FIELD chipProcessedExp.exp_tag, 20, exposure ID, value, chipProcessedImfile.php, ARG1 12 FIELD camPendingExp.chip_id, 20, chip ID, value, chipProcessedExp.php, ARG1 11 13 FIELD camPendingExp.cam_id, 20, cam ID -
trunk/ippMonitor/def/camProcessedExp.d
r12835 r13264 1 TABLE camProcessedExp, chipProcessedExp 1 TABLE camProcessedExp, chipProcessedExp, rawExp 2 2 TITLE Camera-Level Processed Exposures 3 3 FILE camProcessedExp.php … … 5 5 6 6 WHERE camProcessedExp.chip_id = chipProcessedExp.chip_id 7 WHERE camProcessedExp.exp_tag = rawExp.exp_tag 7 8 8 # field size name show link to extras 9 # define image names to be used below 10 # IMAGE VAR basename filerule camera class_id 11 IMAGE JPEG $camProcessedExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE 12 13 # show all chips for this camera exposure, summary stats from the camera tables 14 ARGS ARG1 camera=$rawExp.camera 15 ARGS ARG1 basename=$camProcessedExp.path_base 16 ARGS ARG1 exp_tag=$chipProcessedExp.exp_tag 17 18 # field size name show link to extras 9 19 FIELD 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.JPEG120 FIELD *, 8, image, image=JPEG, chipProcessedImfile.php, ARG1 11 21 FIELD camProcessedExp.bg, 8, backgnd, value 12 22 FIELD camProcessedExp.bg_mean_stdev, 8, [stdev], value -
trunk/ippMonitor/def/chipPendingExp.d
r12835 r13264 4 4 MENU ipp.science.dat 5 5 6 ARGS ARG1 exp_tag=$exp_tag 7 6 8 # field size name show link to extras 7 9 FIELD chip_id, 20, chip ID 8 FIELD exp_tag, 20, exposure ID, value, rawImfile.php, exp_tag=$exp_tag10 FIELD exp_tag, 20, exposure ID, value, rawImfile.php, ARG1 9 11 FIELD recipe, 20, recipe 10 12 FIELD guide_id, 20, guide ID -
trunk/ippMonitor/def/chipProcessedExp.d
r12835 r13264 4 4 MENU ipp.science.dat 5 5 6 # field name show link to extras 7 FIELD exp_tag, 20, exposure ID, value, chipProcessedImfile.php, exp_tag=$exp_tag 6 ARGS ARG1 exp_tag=$exp_tag 7 8 # field size name show link to extras 9 FIELD exp_tag, 20, exposure ID, value, chipProcessedImfile.php, ARG1 8 10 FIELD chip_id, 20, Chip ID 9 FIELD guide_id, 20, guide ID, value, guideProcessedExp.php, exp_tag=$exp_tag11 FIELD guide_id, 20, guide ID, value, guideProcessedExp.php, ARG1 10 12 FIELD label, 20, label 11 13 FIELD workdir, 20, workdir -
trunk/ippMonitor/def/chipProcessedImfile.d
r12835 r13264 13 13 FIELD chipProcessedImfile.bg_stdev, 8, stdev 14 14 15 TAIL PHP insert_image (' image');15 TAIL PHP insert_image ('PPIMAGE_JPEG1'); -
trunk/ippMonitor/def/detInputExp.d
r9347 r13264 4 4 MENU ipp.detrend.dat 5 5 6 # HEAD HTML test head 1 <br> 6 ARGS ARG1 exp_tag=$exp_tag 7 7 8 # field width name show link to extras 8 ARGS ARG2 exp_tag=$exp_tag 9 ARGS ARG2 det_id=$det_id 10 ARGS ARG2 iteration=$iteration 11 12 # field width name show link to extras 9 13 FIELD det_id, 7, det_id 10 FIELD exp_tag, 20, exposure, value, rawImfile.php, exp_tag=$exp_tag14 FIELD exp_tag, 20, exposure, value, rawImfile.php, ARG1 11 15 FIELD iteration, 5, iteration 12 16 FIELD include, 7, include 13 FIELD *, 5, resid, value=goto, detResidImfile.php, exp_tag=$exp_tag,det_id=$det_id,iteration=$iteration14 FIELD *, 5, proc, value=goto, detProcessedImfile.php, exp_tag=$exp_tag,det_id=$det_id,iteration=$iteration17 FIELD *, 5, resid, value=goto, detResidImfile.php, ARG2 18 FIELD *, 5, proc, value=goto, detProcessedImfile.php, ARG2 15 19 16 # TAIL HTML test tail 1 <br> -
trunk/ippMonitor/def/detNormalizedExp.d
r12835 r13264 1 TABLE detNormalizedExp 1 TABLE detNormalizedExp, rawExp 2 2 TITLE detNormalizedExp 3 3 FILE detNormalizedExp.php 4 4 MENU ipp.detrend.dat 5 5 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 7 WHERE detNormalizedExp.exp_tag = rawExp.exp_tag 8 9 # define image names to be used below 10 # IMAGE VAR basename filerule camera class_id 11 IMAGE JPEG2 $detNormalizedExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE 12 13 ARGS ARG2 det_id=$detNormalizedExp.det_id 14 ARGS ARG2 iteration=$detNormalizedExp.iteration 15 ARGS ARG2 exp_tag=$detNormalizedExp.exp_tag 16 ARGS ARG2 camera=$rawExp.camera 17 ARGS ARG2 basename=$detNormalizedExp.path_base 18 19 # field size name show link to extras 20 FIELD detNormalizedExp.det_id, 7, det_id 21 FIELD detNormalizedExp.bg, 8, backgnd 22 FIELD detNormalizedExp.bg_mean_stdev, 8, [stdev] 23 FIELD detNormalizedExp.bg_stdev, 8, stdev 24 FIELD detNormalizedExp.iteration, 5, iteration 25 FIELD *, 8, image, image=JPEG2, detNormalizedImfile.php, ARG2 26 FIELD detNormalizedExp.path_base, 20, path_base, none -
trunk/ippMonitor/def/detNormalizedImfile.d
r12080 r13264 14 14 #FIELD path_base, 20, path_base 15 15 16 TAIL PHP insert_image (' image');16 TAIL PHP insert_image ('PPIMAGE_JPEG1'); -
trunk/ippMonitor/def/detProcessedExp.d
r12835 r13264 1 TABLE detProcessedExp 1 TABLE detProcessedExp, rawExp 2 2 TITLE detProcessedExp 3 3 FILE detProcessedExp.php 4 4 MENU ipp.detrend.dat 5 5 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 7 WHERE detProcessedExp.exp_tag = rawExp.exp_tag 8 9 # define image names to be used below 10 # IMAGE VAR basename filerule camera class_id 11 IMAGE JPEG2 $detProcessedExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE 12 13 ARGS ARG1 det_id=$detProcessedExp.det_id 14 ARGS ARG1 exp_tag=$detProcessedExp.exp_tag 15 ARGS ARG1 camera=$rawExp.camera 16 ARGS ARG1 basename=$detProcessedExp.path_base 17 18 # field size name show link to extras 19 FIELD detProcessedExp.det_id, 7, Det ID, value 20 FIELD rawExp.camera, 10, camera, value 21 FIELD detProcessedExp.exp_tag, 15, Exposure, value 22 FIELD *, 8, image, image=JPEG2, detProcessedImfile.php, ARG1 23 FIELD detProcessedExp.bg, 8, backgnd, value 24 FIELD detProcessedExp.bg_mean_stdev, 8, [stdev], value 25 FIELD detProcessedExp.bg_stdev, 8, stdev, value 26 FIELD detProcessedExp.recipe, 15, Recipe, value 27 FIELD 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 15 15 # FIELD path_base, 20, path_base 16 16 17 TAIL PHP insert_image (' image');17 TAIL PHP insert_image ('PPIMAGE_JPEG1'); -
trunk/ippMonitor/def/detResidExp.d
r13241 r13264 8 8 9 9 # 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 11 IMAGE JPEG2 $detResidExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE 11 12 12 # field size name show link to extras 13 # define the arguments supplied to the links below (if any) 14 ARGS ARG1 exp_tag=$detResidExp.exp_tag 15 16 ARGS ARG2 det_id=$detResidExp.det_id 17 ARGS ARG2 iteration=$detResidExp.iteration 18 ARGS ARG2 exp_tag=$detResidExp.exp_tag 19 ARGS ARG2 camera=$rawExp.camera 20 ARGS ARG2 basename=$detResidExp.path_base 21 22 # field size name show link to linkargs 13 23 FIELD detResidExp.det_id, 7, Det ID, value 14 FIELD detResidExp.exp_tag, 15, Exposure, value, rawImfile.php, exp_tag=$exp_tag24 FIELD detResidExp.exp_tag, 15, Exposure, value, rawImfile.php, ARG1 15 25 FIELD detResidExp.bg, 8, backgnd, value 16 26 FIELD detResidExp.bg_mean_stdev, 8, [stdev] 17 27 FIELD detResidExp.bg_stdev, 8, stdev, value 18 28 FIELD detResidExp.iteration, 5, iter, value 19 FIELD *, 8, image, image=JPEG 1, detResidImfile.php, det_id=$det_id,iteration=$iteration,exp_tag=$exp_tag,image=129 FIELD *, 8, image, image=JPEG2, detResidImfile.php, ARG2 20 30 FIELD 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 31 FIELD detResidExp.path_base, 20, path_base, none 32 FIELD rawExp.camera, 20, camera, none -
trunk/ippMonitor/def/detResidImfile.d
r12080 r13264 16 16 # FIELD path_base, 20, path_base 17 17 18 TAIL PHP insert_image ('image'); 18 TAIL PHP insert_image ('PPIMAGE_JPEG1'); 19 TAIL PHP insert_image ('PPIMAGE_JPEG2'); -
trunk/ippMonitor/def/detRun.d
r12835 r13264 4 4 MENU ipp.detrend.dat 5 5 6 ARGS ARG1 det_id=$det_id 7 6 8 # field width name show link to extras 7 FIELD det_id, 7, det ID, value, detRunSummary.php, det_id=$det_id9 FIELD det_id, 7, det ID, value, detRunSummary.php, ARG1 8 10 FIELD iteration, 5, iteration 9 11 FIELD det_type, 8, det_type -
trunk/ippMonitor/def/detRunSummary.d
r9011 r13264 4 4 MENU ipp.detrend.dat 5 5 6 ARGS ARG1 det_id=$det_id 7 ARGS ARG1 iteration=$iteration 8 6 9 # field name show link to extras 7 10 FIELD det_id, 7, det_id 8 11 FIELD iteration, 5, iter 9 12 FIELD accept, 4, keep 10 FIELD *, 20, choose, value=input, detInputExp.php, det_id=$det_id,iteration=$iteration11 FIELD *, 20, choose, value=resid, detResidExp.php, det_id=$det_id,iteration=$iteration13 FIELD *, 20, choose, value=input, detInputExp.php, ARG1 14 FIELD *, 20, choose, value=resid, detResidExp.php, ARG1 12 15 FIELD bg, 20, bg 13 16 FIELD bg_stdev, 20, bg_stdev -
trunk/ippMonitor/def/example.d
r9439 r13264 12 12 WHERE detRun.iteration = detRunSummary.iteration 13 13 14 ARGS ARG1 det_id=$detRunSummary.det_id 15 ARGS ARG1 iteration=$detRunSummary.iteration 16 14 17 # field width name show link to extras 15 18 FIELD detRunSummary.det_id, 7, det_id 16 19 FIELD detRun.det_type, 5, type 17 20 FIELD detRunSummary.iteration, 5, iter 18 FIELD *, 20, choose, value=input, detInputExp.php, det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration19 FIELD *, 20, choose, value=resid, detResidExp.php, det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration21 FIELD *, 20, choose, value=input, detInputExp.php, ARG1 22 FIELD *, 20, choose, value=resid, detResidExp.php, ARG1 20 23 FIELD detRunSummary.bg, 20, bg 21 24 FIELD detRunSummary.bg_stdev, 20, bg_stdev -
trunk/ippMonitor/def/guidePendingExp.d
r12081 r13264 4 4 MENU ipp.science.dat 5 5 6 ARGS ARG1 exp_tag=$exp_tag 7 6 8 # field name show link to extras 7 FIELD exp_tag, 20, exposure ID, value, rawImfile.php, exp_tag=$exp_tag9 FIELD exp_tag, 20, exposure ID, value, rawImfile.php, ARG1 8 10 FIELD recipe, 20, recipe 9 11 FIELD guide_version, 20, guide version -
trunk/ippMonitor/def/masterDetrendFrames.d
r9439 r13264 12 12 WHERE detRun.iteration = detRunSummary.iteration 13 13 14 ARGS ARG1 det_id=$detRunSummary.det_id 15 16 ARGS ARG2 det_id=$detRunSummary.det_id 17 ARGS ARG2 iteration=$detRunSummary.iteration 18 14 19 # field width name show link to extras 15 FIELD detRunSummary.det_id, 7, det_id, value, detRunSummary.php, det_id=$detRunSummary.det_id20 FIELD detRunSummary.det_id, 7, det_id, value, detRunSummary.php, ARG1 16 21 FIELD detRunSummary.iteration, 5, iter 17 22 FIELD detRun.det_type, 5, type 18 FIELD *, 20, choose, value=files, detNormalizedImfiles.php, det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration19 FIELD *, 20, choose, value=input, detInputExp.php, det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration20 FIELD *, 20, choose, value=resid, detResidExp.php, det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration23 FIELD *, 20, choose, value=files, detNormalizedImfiles.php, ARG2 24 FIELD *, 20, choose, value=input, detInputExp.php, ARG2 25 FIELD *, 20, choose, value=resid, detResidExp.php, ARG2 21 26 FIELD detRunSummary.bg, 20, bg 22 27 FIELD detRunSummary.bg_stdev, 20, bg_stdev -
trunk/ippMonitor/def/rawDetrendExp.d
r11490 r13264 7 7 WHERE rawExp.exp_type != 'OBJECT' 8 8 9 ARGS ARG1 exp_tag=$exp_tag 10 9 11 # field name show link to extras 10 FIELD exp_tag, 10, exposure ID, value, rawImfile.php, exp_tag=$exp_tag12 FIELD exp_tag, 10, exposure ID, value, rawImfile.php, ARG1 11 13 FIELD telescope, 10, Telescope 12 14 FIELD camera, 10, Camera -
trunk/ippMonitor/def/rawDetrendExp_detrend.d
r11490 r13264 7 7 WHERE rawExp.exp_type != 'OBJECT' 8 8 9 # field name show link to extras 10 FIELD exp_tag, 10, exposure ID, value, rawImfile.php, exp_tag=$exp_tag 9 ARGS ARG1 exp_tag=$exp_tag 10 11 # field size name show link to extras 12 FIELD exp_tag, 10, exposure ID, value, rawImfile.php, ARG1 11 13 FIELD telescope, 10, Telescope 12 14 FIELD camera, 10, Camera -
trunk/ippMonitor/def/rawScienceExp.d
r11490 r13264 7 7 WHERE rawExp.exp_type = 'OBJECT' 8 8 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 9 ARGS ARG1 exp_tag=$exp_tag 10 ARGS ARG1 camera=$camera 11 ARGS ARG1 foo=bar 12 13 # field size name show link to extras 14 FIELD exp_tag, 10, exposure Tag, value, rawImfile.php, ARG1 15 FIELD telescope, 10, Telescope, value, telescopes.php 16 FIELD camera, 10, Camera 17 FIELD exp_type, 8, Type 18 FIELD filter, 10, FILTER 19 FIELD ra, 8, ra 20 FIELD decl, 8, decl 21 FIELD object, 10, object 22 FIELD airmass, 5, airmass 23 FIELD exp_time, 5, exp_time 24 FIELD bg, 5, bg 25 FIELD bg_stdev, 5, bg_stdev 22 26 # FIELD imfiles, 20, imfiles 23 27 # FIELD bg_mean_stdev, 20, bg_mean_stdev -
trunk/ippMonitor/def/rawUnknownExp.d
r11491 r13264 7 7 WHERE rawExp.exp_type is NULL 8 8 9 # field name show link to extras 10 FIELD exp_tag, 10, exposure ID, value, rawImfile.php, exp_tag=$exp_tag 9 ARGS ARG1 exp_tag=$exp_tag 10 11 # field size name show link to extras 12 FIELD exp_tag, 10, exposure ID, value, rawImfile.php, ARG1 11 13 FIELD telescope, 10, Telescope 12 14 FIELD camera, 10, Camera -
trunk/ippMonitor/generate
r11490 r13264 14 14 # @headcode, @tailcode : additional HTML or PHP code before or after table 15 15 # @field, @width, @name, @show, @link, @extras : properties of each table column 16 # @imagedefs, %image: array of image defines 16 17 17 18 &parse_schema; … … 61 62 if ($key eq "HEAD") { 62 63 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; 63 74 } 64 75 … … 94 105 &define_where_string (@where); 95 106 107 foreach $linkarg (@linkargs) { 108 &parse_linkarg ($linkarg); 109 } 110 111 foreach $imagedef (@imagedefs) { 112 &parse_imagedef ($imagedef); 113 } 114 96 115 if (0) { 97 116 print STDERR "show: $show[0]\n"; … … 220 239 printf FILE " \$link = \"$link[$i]\" . \"?menu=$MENU&\" . \$ID['link'];\n"; 221 240 # add extra GET data to target 222 if ($extras[$i]) { &parse_extras ($ extras[$i]); }241 if ($extras[$i]) { &parse_extras ($linkarg{$extras[$i]}); } 223 242 # print the actual table cell line with the link... 224 243 if (! $value && ($field[$i] ne "*")) { $value = "\$row[$Nrow]"; } … … 229 248 if (($label eq "image") && !$link[$i]) { 230 249 # 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"; 232 251 next; 233 252 } … … 237 256 printf FILE " \$link = \"$link[$i]\" . \"?menu=$MENU&\" . \$ID['link'];\n"; 238 257 # add extra php data to target 239 if ($extras[$i]) { &parse_extras ($ extras[$i]); }258 if ($extras[$i]) { &parse_extras ($linkarg{$extras[$i]}); } 240 259 # 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"; 242 261 next; 243 262 } … … 314 333 printf FILE " \$link = \$link . \"&$outline\";\n"; 315 334 } 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} 340 sub 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 } 316 350 } 317 351 … … 360 394 } 361 395 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) 399 sub 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 428 sub 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 362 439 sub init_key { 363 440 my ($key) = $_[0]; -
trunk/ippMonitor/raw/getimage.php
r13241 r13264 47 47 exec ("ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id", $output, $status); 48 48 49 # use these to check the environment 50 # passthru ("env"); 51 # passthru ("perl --version"); 52 49 53 $filename = $output[0]; 50 54 if ($status) { -
trunk/ippMonitor/raw/ipp.php
r12835 r13264 1 1 <?php 2 2 3 $dTABLE = 40;3 $dTABLE = 10; 4 4 5 5 function logintext () { … … 316 316 // expect image supplied with key=name 317 317 // this function should define matching hidden inputs in the form 318 function insert_image ($ key) {318 function insert_image ($rule) { 319 319 320 320 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"; 328 334 } 329 335 }
Note:
See TracChangeset
for help on using the changeset viewer.
