Changeset 13595
- Timestamp:
- Jun 3, 2007, 10:24:09 AM (19 years ago)
- Location:
- trunk/ippMonitor
- Files:
-
- 11 edited
-
Makefile (modified) (1 diff)
-
def/detInputExp.d (modified) (1 diff)
-
def/detProcessedExp.d (modified) (2 diffs)
-
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/masterDetrendFrames.d (modified) (1 diff)
-
generate (modified) (5 diffs)
-
raw/ipp.detrend.dat (modified) (1 diff)
-
raw/ipp.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/Makefile
r12083 r13595 32 32 33 33 DEFSRC = \ 34 $(DESTBIN)/keptDetrendFrames.php \ 34 35 $(DESTBIN)/masterDetrendFrames.php \ 35 36 $(DESTBIN)/masterDetrendImfiles.php \ -
trunk/ippMonitor/def/detInputExp.d
r13566 r13595 14 14 ARGS ARG2 detProcessedImfile.iteration=$detInputExp.iteration 15 15 16 HEAD PHP if ($_GET['detInputExp_det_id']) { 17 HEAD PHP echo "<a href=detResidExp.php?" . $ID['link'] . "> resid </a>"; 18 HEAD PHP echo "<a href=detProcessedExp.php?" . $ID['link'] . "> proc </a>"; } 19 16 20 # field width name show link to extras 17 21 FIELD detInputExp.det_id, 7, det_id -
trunk/ippMonitor/def/detProcessedExp.d
r13264 r13595 16 16 ARGS ARG1 basename=$detProcessedExp.path_base 17 17 18 OP OP1 $detProcessedExp.bg / $detProcessedExp.bg_stdev 19 18 20 # field size name show link to extras 19 21 FIELD detProcessedExp.det_id, 7, Det ID, value … … 24 26 FIELD detProcessedExp.bg_mean_stdev, 8, [stdev], value 25 27 FIELD detProcessedExp.bg_stdev, 8, stdev, value 26 FIELD detProcessedExp.recipe, 15, Recipe, value 28 FIELD *, 8, S/N, op=OP1 29 FIELD rawExp.dateobs, 8, obs date, value 30 FIELD rawExp.filter, 8, filter, value 31 FIELD rawExp.exp_time, 8, exptime, value 32 FIELD rawExp.ccd_temp, 8, ccd temp, value 33 FIELD rawExp.airmass, 8, airmass, value 27 34 FIELD detProcessedExp.path_base, 20, path_base, none 28 35 -
trunk/ippMonitor/def/detResidExp.d
r13566 r13595 20 20 ARGS ARG2 basename=$detResidExp.path_base 21 21 22 OP OP1 $detResidExp.bg / $detResidExp.bg_stdev 23 22 24 # field size name show link to linkargs 23 25 FIELD detResidExp.det_id, 7, Det ID, value 26 FIELD rawExp.camera, 10, camera, value 24 27 FIELD detResidExp.exp_tag, 15, Exposure, value, rawImfile.php, ARG1 28 FIELD detResidExp.iteration, 5, iter, value 29 FIELD *, 8, image, image=JPEG2, detResidImfile.php, ARG2 25 30 FIELD detResidExp.bg, 8, backgnd, value 26 31 FIELD detResidExp.bg_mean_stdev, 8, [stdev] 27 32 FIELD detResidExp.bg_stdev, 8, stdev, value 28 FIELD detResidExp.iteration, 5, iter, value 29 FIELD *, 8, image, image=JPEG2, detResidImfile.php, ARG2 33 FIELD *, 8, S/N, op=OP1 34 FIELD rawExp.dateobs, 8, obs date, value 35 FIELD rawExp.filter, 8, filter, value 36 FIELD rawExp.exp_time, 8, exptime, value 37 FIELD rawExp.ccd_temp, 8, ccd temp, value 38 FIELD rawExp.airmass, 8, airmass, value 30 39 FIELD detResidExp.accept, 4, keep, value 31 FIELD detResidExp.path_base, 20, path_base, none 32 FIELD rawExp.camera, 20, camera, none 40 FIELD detResidExp.path_base, 20, path_base, none 33 41 34 42 TD_CLASS list_off $detResidExp.accept == 0 -
trunk/ippMonitor/def/detResidImfile.d
r13282 r13595 14 14 # FIELD uri, 20, uri 15 15 # FIELD recipe, 20, recipe 16 #FIELD path_base, 20, path_base16 FIELD path_base, 20, path_base 17 17 18 18 TAIL PHP insert_image ('PPIMAGE.JPEG1'); -
trunk/ippMonitor/def/detRun.d
r13264 r13595 4 4 MENU ipp.detrend.dat 5 5 6 ARGS ARG1 det _id=$det_id6 ARGS ARG1 detRunSummary.det_id=$det_id 7 7 8 # field width name show link to extras 9 FIELD det_id, 7, det ID, value, detRunSummary.php, ARG1 10 FIELD iteration, 5, iteration 11 FIELD det_type, 8, det_type 8 ARGS ARG2 detInputExp.det_id=$det_id 9 ARGS ARG2 detInputExp.iteration=$iteration 10 11 ARGS ARG3 detProcessedExp.det_id=$det_id 12 13 ARGS ARG4 detResidExp.det_id=$det_id 14 ARGS ARG4 detResidExp.iteration=$iteration 15 16 # field width name show link to extras 17 FIELD det_id, 5, det ID, value, detRunSummary.php, ARG1 18 FIELD iteration, 3, iter 19 FIELD det_type, 5, type 12 20 FIELD state, 5, state 21 FIELD *, 5, choose, value=input, detInputExp.php, ARG2 22 FIELD *, 5, choose, value=proc, detProcessedExp.php, ARG3 23 FIELD *, 5, choose, value=resid, detResidExp.php, ARG4 13 24 FIELD mode, 5, mode 14 25 FIELD filter, 10, filter -
trunk/ippMonitor/def/detRunSummary.d
r13264 r13595 4 4 MENU ipp.detrend.dat 5 5 6 ARGS ARG1 det _id=$det_id7 ARGS ARG1 iteration=$iteration6 ARGS ARG1 detInputExp.det_id=$detRunSummary.det_id 7 ARGS ARG1 detInputExp.iteration=$detRunSummary.iteration 8 8 9 # field name show link to extras 10 FIELD det_id, 7, det_id 11 FIELD iteration, 5, iter 12 FIELD accept, 4, keep 13 FIELD *, 20, choose, value=input, detInputExp.php, ARG1 14 FIELD *, 20, choose, value=resid, detResidExp.php, ARG1 15 FIELD bg, 20, bg 16 FIELD bg_stdev, 20, bg_stdev 17 # FIELD bg_mean_stdev, 20, bg_mean_stdev 9 ARGS ARG2 detResidExp.det_id=$detRunSummary.det_id 10 ARGS ARG2 detResidExp.iteration=$detRunSummary.iteration 11 12 # field name show link to extras 13 FIELD detRunSummary.det_id, 7, det_id 14 FIELD detRunSummary.iteration, 5, iter 15 FIELD detRunSummary.accept, 4, keep 16 FIELD *, 20, choose, value=input, detInputExp.php, ARG1 17 FIELD *, 20, choose, value=proc, detProcessedExp.php, ARG3 18 FIELD *, 20, choose, value=resid, detResidExp.php, ARG2 19 FIELD detRunSummary.bg, 20, bg 20 FIELD detRunSummary.bg_stdev, 20, bg_stdev 21 22 TD_CLASS list_off $detRunSummary.accept == 0 -
trunk/ippMonitor/def/masterDetrendFrames.d
r13566 r13595 23 23 24 24 # field width name show link to extras 25 FIELD detRunSummary.det_id, 7, det_id, value, detRunSummary.php, ARG126 FIELD detRunSummary.iteration, 5, iter25 FIELD detRunSummary.det_id, 5, det ID, value, detRunSummary.php, ARG1 26 FIELD detRunSummary.iteration, 3, iter 27 27 FIELD detRun.det_type, 5, type 28 FIELD detRun.state, 5, state 28 29 FIELD *, 20, choose, value=input, detInputExp.php, ARG2 29 30 FIELD *, 20, choose, value=proc, detProcessedExp.php, ARG3 -
trunk/ippMonitor/generate
r13566 r13595 73 73 } 74 74 75 # the ARGS commands define sarguments to FIELDS commands75 # the ARGS commands define arguments to FIELDS commands 76 76 if ($key eq "ARGS") { 77 77 push @linkargs, $value; 78 } 79 80 # the OP commands define field operations 81 if ($key eq "OP") { 82 push @opwords, $value; 78 83 } 79 84 … … 123 128 } 124 129 130 foreach $opword (@opwords) { 131 &parse_opwords ($opword); 132 } 133 125 134 if (0) { 126 135 print STDERR "show: $show[0]\n"; … … 219 228 # add column sorting elements here 220 229 for ($i = 0; $i < @field; $i++) { 230 ($label, $value, $string) = &parse_label ($show[$i]); 221 231 if ($show[$i] eq "none") { next; } 222 232 # printf FILE "echo \"<th class=\\\"list\\\"> $name[$i] </th>\\n\";\n"; 223 printf FILE "write_table_header (\"list\", \"$name[$i]\", \"$field[$i]\", \$buttonLink, \$ID, '$myFile');\n"; 233 if ($label eq "op") { 234 printf FILE "write_table_header (\"list\", \"$name[$i]\", \"$opf{$value}\", \$buttonLink, \$ID, '$myFile');\n"; 235 } else { 236 printf FILE "write_table_header (\"list\", \"$name[$i]\", \"$field[$i]\", \$buttonLink, \$ID, '$myFile');\n"; 237 } 224 238 } 225 239 } … … 292 306 } 293 307 308 if ($label eq "op") { 309 # create the basic link variable 310 if ($link[$i]) { 311 printf FILE " \$link = \"$link[$i]\" . \"?menu=$MENU&\" . \$ID['link'];\n"; 312 # add extra GET data to target 313 if ($extras[$i]) { &parse_extras ($linkarg{$extras[$i]}); } 314 $myLink = "\$link"; 315 } else { 316 $myLink = "\"\""; 317 } 318 printf FILE " write_table_cell (\$class, $myLink, $ops{$value});\n"; 319 next; 320 } 321 294 322 if (($label eq "image") && !$link[$i]) { 295 323 # print the actual table cell line with the image... … … 485 513 } 486 514 515 sub parse_opwords { 516 my ($value) = $_[0]; 517 518 @words = split (" ", $value); 519 $name = shift (@words); 520 521 $opline = ""; 522 foreach $word (@words) { 523 $fword = &parse_fieldname ($word); 524 push @outwords, $fword; 525 if ($word =~ m|^\$|) { 526 $word = substr ($word, 1); 527 } 528 push @outfields, $word; 529 } 530 $outline = join (" ", @outwords); 531 $ops{$name} = $outline; 532 $outline = join (" ", @outfields); 533 $opf{$name} = $outline; 534 535 return 1; 536 } 537 487 538 sub init_key { 488 539 my ($key) = $_[0]; -
trunk/ippMonitor/raw/ipp.detrend.dat
r12083 r13595 27 27 28 28 menutop | menutop | plain | | 29 menulink | menuselect | link | Detrend Kept | keptDetrendFrames.php 29 30 menulink | menuselect | link | Detrend Frames | masterDetrendFrames.php 30 31 menulink | menuselect | link | Detrend Runs | detRun.php -
trunk/ippMonitor/raw/ipp.php
r13566 r13595 9 9 } 10 10 11 function loginform ( ) {11 function loginform ($username) { 12 12 echo '<form action="Login.php" method="POST">', "\n"; 13 echo 'Username: <input type="text" name="username"><br>', "\n"; 13 if ($username) { 14 echo "Username: <input type=\"text\" name=\"username\" value=\"$username\"><br>\n"; 15 } else { 16 echo "Username: <input type=\"text\" name=\"username\"><br>\n"; 17 } 14 18 echo 'Password: <input type="text" name="password"><br>', "\n"; 15 19 echo '<input type="submit" name="login" value="login">', "\n"; … … 19 23 function projectform ($ID) { 20 24 menu ('ipp.menu.dat', 'Select Project', 'ipp.css', $ID['link'], $ID['proj']); 25 if ($_GET['new'] && $_GET['proj']) { 26 echo "<p> Project is now <b>" . $_GET['proj'] . "</b></p>\n"; 27 } 21 28 echo "<p> Please select the project of interest </p>\n"; 22 echo "<form action=\"SelectProject.php\" method=\"POST\">\n";23 echo "Project: <input type=\"text\" name=\"proj\"><br>\n";24 echo "<input type=\"submit\" name=\"project\">\n";29 // echo "<form action=\"SelectProject.php\" method=\"POST\">\n"; 30 // echo "Project: <input type=\"text\" name=\"proj\"><br>\n"; 31 // echo "<input type=\"submit\" name=\"project\">\n"; 25 32 26 33 $pass = $ID['pass']; 27 echo "<input type=\"hidden\" name=\"pass\" value=\"$pass\">\n";28 echo "</form>\n";34 // echo "<input type=\"hidden\" name=\"pass\" value=\"$pass\">\n"; 35 // echo "</form>\n"; 29 36 30 37 $db = dbconnect('ippadmin'); … … 42 49 echo "<tr class=select><th class=select> projects </th></tr>\n"; 43 50 while ($qry->fetchInto($row)) { 44 echo "<tr class=select><td class=select> $row[0] </td></tr>\n"; 51 // add a link here to set the database 52 $tmp_proj = $row[0]; 53 $tmp_link = "pass=$pass"; 54 echo "<tr class=select><td class=select><a href=\"SelectProject.php?$tmp_link&proj=$tmp_proj&new=1\"> $row[0] </a></td></tr>\n"; 55 // echo "<tr class=select><td class=select> $row[0] </td></tr>\n"; 45 56 } 46 57 echo "</table>\n"; … … 77 88 $password = $_POST[password]; 78 89 90 // if password is not specified, keep username and ask again 91 if ($password == "") { 92 menu ('ipp.menu.dat', 'Login', 'ipp.css', '', ''); 93 loginform ($username); 94 menu_end (); 95 } 96 79 97 $db = dbconnect('ippadmin'); 80 98 … … 84 102 $qry = $db->query($sql); 85 103 if (DB::iserror($db)) { 104 menu ('ipp.menu.dat', 'Login', 'ipp.css', '', ''); 86 105 echo "<b>error reading users table</b><br>\n"; 87 106 echo "Login Failed, please try again<br>\n"; 88 loginform ( );107 loginform (""); 89 108 menu_end(); 90 109 } … … 94 113 menu ('ipp.menu.dat', 'Login', 'ipp.css', '', ''); 95 114 echo "Login Failed, please try again<br>\n"; 96 loginform ( );115 loginform (""); 97 116 menu_end (); 98 117 exit (); … … 179 198 menu('ipp.menu.dat', 'Login', 'ipp.css', '', ''); 180 199 logintext (); 181 loginform ( );200 loginform (""); 182 201 menu_end (); 183 202 } … … 185 204 $db = dbconnect ('ippadmin'); 186 205 187 // make this a DB lookup188 206 $pass = $ID['pass']; 207 208 // search for password 189 209 $sql = "SELECT username FROM cookies WHERE cookie = '$pass'"; 190 210 $qry = $db->query($sql); … … 192 212 echo "<b>error reading users table</b><br>\n"; 193 213 echo "Login Failed, please try again<br>\n"; 194 loginform ( );214 loginform (""); 195 215 menu_end(); 196 216 } 197 217 198 # $success = (($username == "eugene") && ($password == "test"));199 218 $success = $qry->fetchInto($row); 200 219 if (! $success) { 201 220 menu('ipp.menu.dat', 'Login', 'ipp.css', '', ''); 202 221 echo "unknown user, please login again<br>\n"; 203 loginform ( );222 loginform (""); 204 223 menu_end (); 205 224 }
Note:
See TracChangeset
for help on using the changeset viewer.
