Changeset 9466 for trunk/MagicSoft/Mars/datacenter/db
- Timestamp:
- 06/22/09 18:40:48 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/db
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/plotinclude.php
r9458 r9466 197 197 } 198 198 199 function getinfofromdb($seq) 200 { 201 include("db.php"); 202 203 $db_id = mysql_pconnect($host, $user, $pw); 204 if ($db_id==FALSE) 205 { 206 printf("mysql_connect returned the following error: %s\n", mysql_error()); 207 die(""); 208 } 209 mysql_select_db($db); 210 211 $query0 = "SELECT fSequenceFirst "; 212 $query0 .= ", DATE_FORMAT(ADDDATE(fRunStart,Interval 12 hour), '%Y-%m-%d') as 'ObsNight'"; 213 $query0 .= ", fSourceName "; 214 $query0 .= ", fZenithDistanceMin "; 215 $query0 .= ", fZenithDistanceMax "; 216 $query0 .= ", fMeanPedRmsInner "; 217 $query0 .= ", fRunTime/60 as 'UpTime' "; 218 $query0 .= ", if(isnull(fStar), 'N/A', if(isnull(fRateSumEvts), 'no', CONCAT('yes (',fRateSumEvts, ')'))) as 'Sum' "; 219 $query0 .= "FROM Sequences "; 220 $query0 .= "LEFT JOIN Source USING(fSourceKEY) "; 221 $query0 .= "LEFT JOIN Calibration USING(fSequenceFirst) "; 222 $query0 .= "LEFT JOIN Star USING(fSequenceFirst) "; 223 $query0 .= "LEFT JOIN SequenceProcessStatus USING(fSequenceFirst) "; 224 $query0 .= "WHERE fSequenceFirst=".$seq; 225 226 // echo $query0; 227 228 $result0 = mysql_query($query0, $db_id); 229 while ($row0 = mysql_fetch_assoc($result0)) 230 $info="<b>".$row0["fSourceName"]."</b> ".$row0["ObsNight"] 231 ." (".$row0["UpTime"]."min)" 232 ." Zd: ".$row0["fZenithDistanceMin"]."-".$row0["fZenithDistanceMax"] 233 ." PedRmsIn: ".$row0["fMeanPedRmsInner"] 234 ." SumTrigger: ".$row0["Sum"]; 235 236 mysql_free_result($result0); 237 mysql_close($db_id); 238 239 return $info; 240 } 241 199 242 function PrintType2Pulldown($type2) 200 243 { -
trunk/MagicSoft/Mars/datacenter/db/showplots-ds.php
r9247 r9466 135 135 { 136 136 if (in_array($seq, $sequon)) 137 printf("<font color='green'>\n");137 $color="green"; 138 138 else 139 printf("<font color='red'>\n"); 140 printf("%s <img src='%s'>", $plot, $plot); 139 $color="red"; 140 141 printf("<div style='color:%s' onmouseover=\"this.innerHTML='%s';style.color='black'\" onmouseout=\"this.innerHTML='%s';style.color='%s'\"> %s </div>\n", $color, getinfofromdb($seq), $plot, $color, $plot); 142 printf("<img src='%s'>\n", $plot); 141 143 } 142 144 else -
trunk/MagicSoft/Mars/datacenter/db/showplots-seq.php
r8794 r9466 173 173 printf("</td>\n</tr>\n<tr>\n<td align='center' colspan='3'>\n"); 174 174 if (!empty($seq)) 175 printf("%s <img src='%s'>", $plot, $plot); 175 { 176 printf("<div onmouseover=\"this.innerHTML='%s'\" onmouseout=\"this.innerHTML='%s'\"> %s </div>", getinfofromdb($seq), $plot, $plot); 177 printf("<img src='%s'>", $plot); 178 } 176 179 else 177 180 printf("Choose a source and/or a range of sequences or just click 'Plot' for going through all sequences."); -
trunk/MagicSoft/Mars/datacenter/db/showplots.php
r9187 r9466 92 92 PrintHomeHelp(); 93 93 printf("<td align='center'>\n"); 94 if (!empty($seq)) 95 printf("<input type='submit' value='<< %d Prev Plot' name='prev'>\n", $prev); 94 96 printf("<input type='text' name='seq' size='10' maxlength='10' value='%s'>\n", $seq); 95 97 PrintType2PullDown($type2); 96 98 printf("<input type='text' name='tabnum' size='2' maxlenght='2' value='%s'>\n", $tabnum); 97 printf("<input type='submit' value='Show Plot'><br>\n"); 99 printf("<input type='submit' value='Show Plot'>\n"); 100 if (!empty($seq)) 101 printf("<input type='submit' value='Next Plot %d >>' name='next'>\n", $next); 102 103 printf("</td>\n</tr>\n<tr>\n<td align='center' colspan='2'>\n"); 98 104 if (!empty($seq)) 99 105 { 100 printf("<input type='submit' value='<< %d Prev Plot' name='prev'>\n", $prev); 101 printf("%s \n", $plot); 102 printf("<input type='submit' value='Next Plot %d >>' name='next'>\n", $next); 106 printf("<div onmouseover=\"this.innerHTML='%s'\" onmouseout=\"this.innerHTML='%s'\"> %s </div>", getinfofromdb($seq), $plot, $plot); 107 printf("<img src='%s'>", $plot); 103 108 } 104 printf("</td>\n</tr>\n<tr>\n<td align='center' colspan='2'>\n");105 if (!empty($seq))106 printf("<img src='%s'>", $plot);107 109 else 108 110 printf("You have to insert a sequence number into the first field.");
Note:
See TracChangeset
for help on using the changeset viewer.