Changeset 8464 for trunk/MagicSoft/Mars/datacenter/db/plotdb.php
- Timestamp:
- 04/27/07 23:39:10 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/plotdb.php
r8402 r8464 1 1 <?php 2 2 { 3 function PrintDiv($ column, $list, $num)3 function PrintDiv($host, $user, $pw, $db, $column, $tables, $num) 4 4 { 5 if (($_GET["prim"]==$column && empty($num)) || ($_GET["prim"]==$column && $_GET["plot"]=="val" && $num==2)) 5 $list=GetList($host, $user, $pw, $db, $column, $tables); 6 7 if (($_GET["prim"]==$column && empty($num)) 8 || ($_GET["prim"]==$column && $num==3) 9 || ($_GET["prim"]==$column && $num==4) 10 || ($_GET["prim"]==$column && $_GET["plot"]=="val" && $num==2)) 6 11 printf("<div id='%s%s' style='display:inline'>\n", $column, $num); 7 12 else 8 13 printf("<div id='%s%s' style='display:none'>\n", $column, $num); 9 14 10 if ( !empty($num))15 if ($num==2) 11 16 $vs="vs"; 12 17 … … 18 23 printf("<option value='%s'>%s %s</option>\n", $column2, $vs, $column2); 19 24 20 printf("</select>\n"); 21 22 if (empty($_GET[$_GET[$column."Col".$num]."Start".$num])) 23 $_GET[$_GET[$column."Col".$num]."Start".$num]=0; 24 if (empty($_GET[$_GET[$column."Col".$num]."Stop".$num])) 25 $_GET[$_GET[$column."Col".$num]."Stop".$num]=0; 26 27 printf(" from <input name='%sStart%s' type='text' size='6' maxlength='6' value='%s'>", $_GET[$column."Col".$num], $num, $_GET[$_GET[$column."Col".$num]."Start".$num]); 28 printf(" to <input name='%sStop%s' type='text' size='6' maxlength='6' value='%s'><br>\n", $_GET[$column."Col".$num], $num, $_GET[$_GET[$column."Col".$num]."Stop".$num]); 25 printf("</select>\n<br>\n"); 29 26 printf("</div>\n"); 30 27 } … … 39 36 //init 40 37 if (empty($_GET["plot"])) 41 $_GET["plot"]= 0;38 $_GET["plot"]=""; 42 39 if (empty($_GET["primstart"])) 43 $_GET["primstart"]= 0;40 $_GET["primstart"]=""; 44 41 if (empty($_GET["primstop"])) 45 $_GET["primstop"]= 0;42 $_GET["primstop"]=""; 46 43 if (empty($_GET["prim"])) 47 $_GET["prim"]= 0;44 $_GET["prim"]=""; 48 45 if (empty($_GET["fSequenceFirstCol"])) 49 $_GET["fSequenceFirstCol"]= 0;46 $_GET["fSequenceFirstCol"]=""; 50 47 if (empty($_GET["fSequenceFirstCol2"])) 51 $_GET["fSequenceFirstCol2"]=0; 48 $_GET["fSequenceFirstCol2"]=""; 49 if (empty($_GET["fSequenceFirstCol3"])) 50 $_GET["fSequenceFirstCol3"]=""; 52 51 if (empty($_GET["fRunNumberCol"])) 53 $_GET["fRunNumberCol"]= 0;52 $_GET["fRunNumberCol"]=""; 54 53 if (empty($_GET["fRunNumberCol2"])) 55 $_GET["fRunNumberCol2"]=0; 54 $_GET["fRunNumberCol2"]=""; 55 if (empty($_GET["fRunNumberCol3"])) 56 $_GET["fRunNumberCol3"]=""; 56 57 if (empty($_GET["fDataSetNumberCol"])) 57 $_GET["fDataSetNumberCol"]= 0;58 $_GET["fDataSetNumberCol"]=""; 58 59 if (empty($_GET["fDataSetNumberCol2"])) 59 $_GET["fDataSetNumberCol2"]=0; 60 if (empty($_GET["0Start"])) 61 $_GET["0Start"]=0; 62 if (empty($_GET["0Stop"])) 63 $_GET["0Stop"]=0; 64 if (empty($_GET["0Start2"])) 65 $_GET["0Start2"]=0; 66 if (empty($_GET["0Stop2"])) 67 $_GET["0Stop2"]=0; 60 $_GET["fDataSetNumberCol2"]=""; 61 if (empty($_GET["fDataSetNumberCol3"])) 62 $_GET["fDataSetNumberCol3"]=""; 63 if (empty($_GET["Start"])) 64 $_GET["Start"]=""; 65 if (empty($_GET["Stop"])) 66 $_GET["Stop"]=""; 67 if (empty($_GET["Start2"])) 68 $_GET["Start2"]=""; 69 if (empty($_GET["Stop2"])) 70 $_GET["Stop2"]=""; 71 if (empty($_GET["Start3"])) 72 $_GET["Start3"]=""; 73 if (empty($_GET["Stop3"])) 74 $_GET["Stop3"]=""; 75 if (empty($_GET["Start4"])) 76 $_GET["Start4"]=""; 77 if (empty($_GET["Stop4"])) 78 $_GET["Stop4"]=""; 68 79 if (empty($_GET["Set"])) 69 $_GET["Set"]= 0;80 $_GET["Set"]=""; 70 81 if (empty($_GET["Set2"])) 71 $_GET["Set2"]= 0;82 $_GET["Set2"]=""; 72 83 73 84 printf("<center>\n<table cellpadding='0'>\n"); … … 78 89 printf(" <input type='radio' name='plot' value='val' onclick='showpulldown2()' %s> vs value <br><br>", $_GET["plot"]=="val" ? "checked" : ""); 79 90 91 printf("<table>\n"); 92 printf("<tr><td>\n"); 80 93 printf("<select name='prim' size='1' class='Width'>\n"); 81 94 foreach($prims as $primary => $column) … … 85 98 printf("<option onclick=\"showpulldown('%s')\" value='%s'>%s</option>\n", $column, $column, $primary); 86 99 printf("</select>\n"); 100 printf(" </td><td valign='top'>\n "); 87 101 printf(" from <input name='primstart' type='text' size='6' maxlength='6' value='%s'>", $_GET["primstart"]); 88 printf(" to <input name='primstop' type='text' size='6' maxlength='6' value='%s'><br>\n", $_GET["primstop"]); 102 printf(" to <input name='primstop' type='text' size='6' maxlength='6' value='%s'>", $_GET["primstop"]); 103 printf("</td>\n</tr>\n"); 89 104 105 printf("<tr><td>\n"); 90 106 foreach($prims as $primary => $column) 91 { 92 $list=GetList($host, $user, $pw, $db, $column, $tables); 93 PrintDiv($column, $list, ""); 94 PrintDiv($column, $list, "2"); 95 } 107 PrintDiv($host, $user, $pw, $db, $column, $tables, ""); 108 printf(" </td><td valign='top'>\n <div id='Range' style='display:inline'>\n "); 109 printf(" from <input name='Start' type='text' size='6' maxlength='6' value='%s'>", $_GET["Start"]); 110 printf(" to <input name='Stop' type='text' size='6' maxlength='6' value='%s'>\n", $_GET["Stop"]); 111 printf("</div></td>\n</tr>\n"); 112 113 printf("<tr><td>\n"); 114 foreach($prims as $primary => $column) 115 PrintDiv($host, $user, $pw, $db, $column, $tables, "2"); 116 if ($_GET["plot"]=="val") 117 printf(" </td><td valign='top'>\n <div id='Range2' style='display:inline'>\n "); 118 else 119 printf(" </td><td valign='top'>\n <div id='Range2' style='display:none'>\n "); 120 printf(" from <input name='Start2' type='text' size='6' maxlength='6' value='%s'>", $_GET["Start2"]); 121 printf(" to <input name='Stop2' type='text' size='6' maxlength='6' value='%s'>\n", $_GET["Stop2"]); 122 printf("</div></td>\n</tr>\n"); 123 124 printf("<tr>\n<td colspan='2'>\nLimits</td>\n</tr>\n<tr>\n<td>\n"); 125 foreach($prims as $primary => $column) 126 PrintDiv($host, $user, $pw, $db, $column, $tables, "3"); 127 printf(" </td><td valign='top'>\n <div id='Range3' style='display:inline'>\n "); 128 printf(" from <input name='Start3' type='text' size='6' maxlength='6' value='%s'>", $_GET["Start3"]); 129 printf(" to <input name='Stop3' type='text' size='6' maxlength='6' value='%s'>\n", $_GET["Stop3"]); 130 printf("</div></td>\n</tr>\n"); 131 132 printf("<tr>\n<td>\n"); 133 foreach($prims as $primary => $column) 134 PrintDiv($host, $user, $pw, $db, $column, $tables, "4"); 135 printf(" </td><td valign='top'>\n <div id='Range4' style='display:inline'>\n "); 136 printf(" from <input name='Start4' type='text' size='6' maxlength='6' value='%s'>", $_GET["Start4"]); 137 printf(" to <input name='Stop4' type='text' size='6' maxlength='6' value='%s'>\n", $_GET["Stop4"]); 138 printf("</div></td>\n</tr>\n"); 139 140 printf("</table>\n"); 96 141 97 142 printf("<br>Set1: <input name='Set' type='text' size='20' maxlength='100' value='%s'>\n", $_GET["Set"]); 98 143 printf("<br>Set2: <input name='Set2' type='text' size='20' maxlength='100' value='%s'>\n", $_GET["Set2"]); 144 99 145 printf("<br><br><input class='Width' type='submit' value='Query Plot'><br>\n"); 100 146 printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"plotdb.php\"'><br>\n");
Note:
See TracChangeset
for help on using the changeset viewer.