Changeset 9150 for trunk/MagicSoft
- Timestamp:
- 11/11/08 11:11:19 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9149 r9150 30 30 31 31 32 2008/11/11 Thomas Bretz, Daniela Dorner 33 34 * datacenter/db/tabs.php: 35 - new script (by chance with the name of an existing sctipt) 36 plotting the tabs of status displays 37 the old script is not needed anymore and is therefore 38 overwritten 39 32 40 2008/11/11 Daniela Dorner 41 42 * datacenter/db/datasetinfo-aio.php, datacenter/db/sequinfo-aio.php:, 43 datacenter/db/index-header.html: 44 - uncommented link to ganymed.php and sequences.php, as these 45 scripts are not yet updated to new data structure 46 47 * datacenter/db/datasetinfo-aio.php, datacenter/db/sequinfo-aio.php: 48 - implemented link to new tabs.php 49 50 * datacenter/db/plotinclude.php: 51 - implemented new files names for showplots*.php 52 53 * datacenter/db/runinfo-aio.php: 54 - ranges are now expanded when page is loaded 33 55 34 56 * datacenter/scripts/budb, datacenter/scripts/fillcamera, -
trunk/MagicSoft/Mars/datacenter/db/datasetinfo-aio.php
r9106 r9150 41 41 if (!empty($_GET["fLinks"])) 42 42 { 43 // $query0 .= ", CONCAT('<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/datasets/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/dataset', LPAD(CONCAT(DataSets.fDataSetNumber , '.txt'), 12,'0') , '\">f</A>' "; 44 // $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/ganymed/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/', LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'), 8), '\">g</A>'"; 45 // $query0 .= ", ' <A&ws;HREF=\"ganymed.php?fDataSetNo=', DataSets.fDataSetNumber, '\">i</A>') "; 43 46 $query0 .= ", CONCAT('<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/datasets/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/dataset', LPAD(CONCAT(DataSets.fDataSetNumber , '.txt'), 12,'0') , '\">f</A>' "; 44 $query0 .= ", ' <A&ws;HREF=\" http://www.astro.uni-wuerzburg.de/datacenter/ganymed/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/', LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'), 8), '\">g</A>'";45 $query0 .= ", ' <A&ws;HREF=\"ganymed.php?fDataSetNo=', DataSets.fDataSetNumber, '\">i</A>')";46 $query0 .= " as 'Links'";47 $query0 .= ", ' <A&ws;HREF=\"tabs.php?t=ganymed&n=' , fDataSetNumber, '\">g</A>'"; 48 // $query0 .= ", ' <A&ws;HREF=\"ganymed.php?fDataSetNo=', DataSets.fDataSetNumber, '\">i</A>' "; 49 $query0 .= ") as 'Links'"; 47 50 } 48 51 -
trunk/MagicSoft/Mars/datacenter/db/index-header.html
r8794 r9150 39 39 <BR> 40 40 more: 41 <!-- 41 42 <A HREF="ganymed.php">Results</A> 42 43 <A HREF="sequence.php">Sequ</A> 44 --> 43 45 <A HREF="sources.php">Sources</A> 44 46 <A HREF="statussbs.php">SequBuildStatus</A> -
trunk/MagicSoft/Mars/datacenter/db/magicdefs.php
r9112 r9150 363 363 $alias["fRawFileKEY"] => "1", 364 364 $alias["fFormatVersion"] => "1", 365 $alias["fRunNumber"] => "1",365 // $alias["fRunNumber"] => "1", 366 366 $alias["fZenithDistance"] => "1", 367 367 $alias["fAzimuth"] => "1", -
trunk/MagicSoft/Mars/datacenter/db/plotinclude.php
r9106 r9150 182 182 $plot = "http://datacenter.astro.uni-wuerzburg.de/"; 183 183 $plot .= $type . "/" . str_pad( $seqshort, 4, "0", STR_PAD_LEFT); 184 $plot .= "/" . $seqlong . "/" . $type2 . $seqlong . "-tab" . $tabnum . ".png"; 184 // $plot .= "/" . $seqlong . "/" . $type2 . $seqlong . "-tab" . $tabnum . ".png"; 185 $plot .= "/" . $seqlong . "/" . $type2 . $tabnum . ".png"; 185 186 return $plot; 186 187 } -
trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php
r9111 r9150 244 244 printf("%s", $_GET["fShowHide"]); 245 245 else 246 printf("10000000 00");246 printf("1000000010"); 247 247 printf("'>\n"); 248 248 printf("<img id='allbutton' src='minus.png' alt='-' onclick=\"showhide('all')\"> <b>Menu</b> \n"); -
trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php
r9111 r9150 56 56 if (!empty($_GET["fLinks"])) 57 57 { 58 $query0 .= ", CONCAT('<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/callisto/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), 'callisto', LPAD(CONCAT(Sequences.fSequenceFirst , '.html'), 13,'0') , '\">cl</A>'"; 59 $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/callisto/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), '\">c</A>'"; 60 $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/star/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), 'star', LPAD(CONCAT(Sequences.fSequenceFirst , '.html'), 13,'0') , '\">sl</A>'"; 61 $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/star/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), '\">s</A>'"; 58 $query0 .= ", CONCAT('<A&ws;HREF=\"tabs.php?t=calibn=', fSequenceFirst, '\">cal</A>'"; 59 $query0 .= ", ' <A&ws;HREF=\"tabs.php?t=signal&n=', fSequenceFirst, '\">sig</A>'"; 60 $query0 .= ", ' <A&ws;HREF=\"tabs.php?t=star&n=', fSequenceFirst, '\">star</A>'"; 62 61 $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/sequences/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/sequence', LPAD(CONCAT(Sequences.fSequenceFirst , '.txt'), 12,'0') , '\">', 'f </A>' "; 63 $query0 .= ", ' <A&ws;HREF=\"sequence.php?fSequenceNo=', Sequences.fSequenceFirst , '&fAll=On\">i</A>'";62 // $query0 .= ", ' <A&ws;HREF=\"sequence.php?fSequenceNo=', Sequences.fSequenceFirst , '&fAll=On\">i</A>'"; 64 63 $query0 .= ", ' <A&ws;HREF=\"queryrbk.php?fNight=', date_format(adddate(fRunStart, interval +13 HOUR), '%Y-%m-%d') , '&fDate=2\">rbk</A>') "; 64 // $query0 .= ", CONCAT('<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/callisto/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), 'callisto', LPAD(CONCAT(Sequences.fSequenceFirst , '.html'), 13,'0') , '\">cl</A>'"; 65 // $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/callisto/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), '\">c</A>'"; 66 // $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/star/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), 'star', LPAD(CONCAT(Sequences.fSequenceFirst , '.html'), 13,'0') , '\">sl</A>'"; 67 // $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/star/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), '\">s</A>'"; 68 // $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/sequences/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/sequence', LPAD(CONCAT(Sequences.fSequenceFirst , '.txt'), 12,'0') , '\">', 'f </A>' "; 69 // $query0 .= ", ' <A&ws;HREF=\"sequence.php?fSequenceNo=', Sequences.fSequenceFirst , '&fAll=On\">i</A>'"; 70 // $query0 .= ", ' <A&ws;HREF=\"queryrbk.php?fNight=', date_format(adddate(fRunStart, interval +13 HOUR), '%Y-%m-%d') , '&fDate=2\">rbk</A>') "; 65 71 $query0 .= " as 'Links'"; 66 72 } -
trunk/MagicSoft/Mars/datacenter/db/tabs.php
r8785 r9150 1 <?php 2 3 $ganymedtabs = array ("0", "SourcePos", "EffOnVsZD", "PreCut", 4 "FSOff", "PostCut", "VsSize", "CutT", 5 "HillasExt", "HilSrc", "ImgPar", "NewPar", 6 "HistOff", "FS", "Hist", "SizeBins"); 7 $ganymedtabsw = array ("0", "EffOnVsZD", "PreCut", "FSOff", "PostCut", 8 "VsSize", "CutT", "HillasExt", "HilSrc", 9 "ImgPar", "NewPar", "HistOff", "SourcePos", 10 "FS", "Hist", "MHPhi", "SizeBins"); 11 12 $startabs = array ("0", "Rate", "EffOnTime", "Cleaned", 13 "CleanedWithoutSparks", "CleanedOnlySparks", "UsedPix", 14 "MHHillas", "MHHillasExt", "MHHillasSrc", 15 "MHImagePar", "MHNewImagePar", "MHMuonPar", 16 "MHWeather", "MHPointing", "MeanPedRms", "Currents", 17 "MeanIPR", "DT"); 18 19 $calibtabs = array ("0", "Ped", "PedExtr", "ExtrdSignal", "ArrTime", 20 "Time", "Charge", "FitCharge", "Conversion", 21 "AbsTime", "Defect", "RelTimes"); 22 23 $signaltabs = array ("0", "PedFLG", "PedRmsFLG", "Extrac'd", 24 "Conv", "Unsuitable", "PedRms", "Interpol'd", 25 "PulsePos", "NumUnsuitablePix", "NumDeadPix", 26 "HiLoCal", "HiLoOffset"); 27 28 ?> 1 <? // To be shifted to magicdefs.pho 2 $htpath = "/www/htdocs/datacenter"; 3 $htlink = "http://datacenter.astro.uni-wuerzburg.de"; 4 5 $htlinks = dirname($_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]); 6 7 $paths = array 8 ( 9 "star" => "/star/", 10 "calib" => "/callisto/", 11 "signal" => "/callisto/", 12 "ganymed" => "/ganymed/", 13 "db" => "/plotdb/", 14 "status" => "/status/", 15 "condor" => "/condor/", 16 "optical" => "/optical/", 17 ); 18 19 $csvname = array 20 ( 21 "star" => "star", 22 "calib" => "calib", 23 "signal" => "signal", 24 "ganymed" => "ganymed", 25 "db" => "plotdb", 26 "status" => "plotstat", 27 "condor" => "plotusage", 28 "optical" => "plotoptical", 29 ); 30 31 $prefix = array 32 ( 33 "star" => "star", 34 "calib" => "calib", 35 "signal" => "signal", 36 "ganymed" => "ganymed", 37 "db" => "plotdb", 38 "status" => "status", 39 "condor" => "condor", 40 "optical" => "optical", 41 ); 42 43 ?> 44 <? // Prepare 45 46 $number = empty($_GET["n"]) ? -1 : $_GET["n"]; 47 $type = empty($_GET["t"]) ? "db" : $_GET["t"]; 48 49 $path = $htpath.$paths[$type]; 50 if ($number>0) 51 $path = sprintf($path."%04d/%08d/", $number/10000, $number); 52 ?> 53 <? 54 // read the file into an array 55 $lines = file($path.$csvname[$type].".csv"); 56 57 // some replacement for the printf 58 $search = array ("%", "\n", "\\" ); 59 $replace = array ("%%", "", "\\\\" ); 60 61 for ($i=0; $i<sizeof($lines); $i++) 62 { 63 //$arr = get_csv($lines[$i], "\t\n"); 64 $tok = strtok($lines[$i], "\t\n"); 65 $j=0; 66 while ($tok!==false) 67 { 68 $arr[$i][$j++] = str_replace($search, $replace, $tok); 69 $tok = strtok("\t"); 70 } 71 } 72 73 fclose($file); 74 ?> 75 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 76 77 <html> 78 <head> 79 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 80 <meta name="Author" content="Thomas Bretz"> 81 <link rel="stylesheet" type="text/css" href="tabs.css"> 82 <script type="text/javascript" src="tabs.js">You need JavaScript switched on for this page to work!</script> 83 <title>Tabs: <? printf($arr[0][2]); ?></title> 84 </head> 85 86 <body onload="Resize();Switch(0);" onresize="Execute();"> 87 <div class="tabs-blue" id="tabs"> 88 <ul id="tabsul"> 89 <li id='prevnext'><A HREF="#" accesskey='alt-shift-P' style="width:6;" class='tooltip' onclick="Add(+1);">+<span class='info'>Switch to previous tab.</span></A></li> 90 <li id='prevnext' style='margin-left:5px'><A HREF="#" accesskey='alt-shift-N' style="width:6;" class='tooltip' onclick="Add(-1);">-<span class='info'>Switch to next tab.</span></A></li> 91 <li id='prevnext'><A HREF="#" accesskey='alt-shift-P' style="width:6;" class='tooltip' onclick="Hide();">><span class='info'>Step in shown tabs to right.</span></A></li> 92 <li id='prevnext' style='margin-left:5px'><A HREF="#" accesskey='alt-shift-N' style="width:6;" class='tooltip' onclick="Show();"><<span class='info'>Step in shown tabs to leaft.</span></A></li> 93 <li id='magnify'><A HREF="#" style="width:8;" class='tooltip' id="magtxt" onclick="ToggleSize();">O<span class='info'>Toggle between original image size and resized to the document's width.</span></A></li> 94 <? 95 $n=0; 96 97 printf(" <li style='margin-right:3px' id='current' class='tabno%d'><A HREF=\"#\" class='tooltip load_def' onclick=\"Switch(%d);\">MARS<span class='info' style='text-align:center;'><P><font style='text-decoration:underline;'>Tab Overview</font><P>%s</span></A></li>\n", 98 $n, $n, $arr[0][2]); 99 100 $n++; 101 102 for ($i=1; $i<sizeof($lines); $i++, $n++) 103 { 104 // Use blur() to remove the focus after the click 105 106 foreach (glob($path.$prefix[$type].$i.".png") as $file) 107 { 108 $link = ereg_replace("^".$htpath, $htlink, $file); 109 $name = basename($file); 110 111 printf(" <li class='tabno".$n."'>"); 112 printf("<A class='tooltip load_png' name='".$link."' "); 113 printf("onclick=\"Switch(".$n.");\" "); 114 printf("onmouseover=\"LoadImgTT('".$link."');\" HREF='#'>"); 115 printf($arr[$i][1]."<span class='info'>".$arr[$i][2]."</span>"); 116 printf("<span class='preview' id='preview'><div>".$arr[$i][2]."</div>"); 117 printf("<span id='image'></span></span></A></li>\n"); 118 } 119 } 120 121 foreach (glob($path."/*") as $file) 122 { 123 $info = pathinfo($file); // dirname, extension, basename, filename 124 125 $link = ereg_replace("^".$htpath, $htlink, $file); 126 $name = $info['basename']; 127 $exten = $info['extension']; 128 129 130 // Define list of valid extension 131 if ($exten!="html" && $exten!="rc") 132 continue; 133 134 printf(" <li class='tabno".$n."'>"); 135 printf("<A class='tooltip load_".$exten."' name='".$link."' "); 136 printf("onclick=\"Switch(".$n.");\" HREF='#'>"); 137 138 if ($exten=="html") 139 printf(ereg_replace("[0-9]{8}\.html", "", $name).".log"); 140 if ($exten=="rc") 141 printf($name); 142 143 printf("<span class='info'>".$name."</span></A></li>\n"); 144 145 $n++; 146 } 147 ?> 148 </ul> 149 </div> 150 <table style="clear:both;" background="box_mtl_ctr.gif" border="0" cellpadding="0" cellspacing="0" width="100%"> 151 <tbody> 152 <tr height="12"> 153 <td width="12"><img src="box_mtl_topl.gif"></td> 154 <td background="box_mtl_top.gif"><img src="spacer.gif"></td> 155 <td width="12"><img src="box_mtl_topr.gif"></td> 156 </tr> 157 <tr> 158 <td background="box_mtl_l.gif" width="12"><img src="spacer.gif"></td> 159 <td align="center" background="bg_spacer.gif" valign="top"> 160 <div class="tabcontent" id="tabcontent"></div> 161 </td> 162 <td background="box_mtl_r.gif" width="12"><img src="spacer.gif"></td> 163 </tr> 164 <tr height="14"> 165 <td width="12"><img src="box_mtl_botl.gif"></td> 166 <td background="box_mtl_bot.gif"><img src="spacer.gif"></td> 167 <td width="12"><img src="box_mtl_botr.gif"></td> 168 </tr> 169 </tbody> 170 </table> 171 <!-- 172 <div class="tabcontent" id="tabcontent"></div> 173 --> 174 <div style="display:none" id="default"> 175 <? 176 printf("<p>\n"); 177 printf("<center>\n"); 178 printf(" <table class='marstable'>\n"); 179 printf(" <tr><td id='title' colspan='3'>%s</td></tr>\n", $arr[0][2]); 180 181 for ($i=1; $i<sizeof($lines); $i++) 182 { 183 foreach (glob($path.$prefix[$type].$i.".png") as $file) 184 { 185 $link = ereg_replace("^".$htpath, $htlink, $file); 186 $name = basename($file); 187 188 printf(" <tr>"); 189 printf("<td id='left'>%d</td>", $i); 190 printf("<td id='middle'><A HREF=\"#\" "); 191 printf("onclick=\"Switch(".$i.");\">"); 192 printf(htmlspecialchars($arr[$i][1])."</A></td>"); 193 printf("<td id='right'>".htmlspecialchars($arr[$i][2])."</td>"); 194 printf("</tr>\n"); 195 } 196 } 197 198 foreach (glob($path."*") as $file) 199 if (ereg("\.(root|log|html|pdf|ps|rc)$", $file)) 200 { 201 $link = ereg_replace("^".$htpath, $htlink, $file); 202 $name = basename($file); 203 204 printf(" <tr>"); 205 printf("<td id='left'></td>"); 206 printf("<td id='middle'>Download</td>"); 207 printf("<td id='middle' colspan='1'><A HREF=\"".$link."\">".$name."</A></td>"); 208 printf("</tr>\n"); 209 } 210 211 printf(" </table>\n"); 212 printf("</center>\n"); 213 printf("</p>\n"); 214 ?> 215 </div> 216 <p id="myContent"> 217 <?/*printf( 218 "SERVER: ".$_SERVER["SERVER_NAME"]."<br>". 219 "HTTP_HOST: ".$_SERVER["HTTP_HOST"]."<br>". 220 "REQ_URI: ".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]."<br>". 221 "DIR: ".dirname($_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"])."<br>". 222 "REQ_URI: ".basename($_SERVER["REQUEST_URI"])."<br>". 223 "PATH_TRANS: ".$_SERVER["PATH_TRANSLATED"]."<br>". 224 "PATH_INFO: ".$_SERVER["PATH_INFO"]."<br>". 225 "SCRIPT_NAME: ".$_SERVER["SCRIP_NAME"]."<br>". 226 "_FILE_: ".__FILE__."<br>". 227 "_DIR_: ".__DIR__."<br>". 228 $paths[$type]."\n".$path."\n".$_GET["number"]."\n".$_GET["type"]."\n".$number."\n".$type); 229 */?> 230 </p> 231 </body> 232 </html>
Note:
See TracChangeset
for help on using the changeset viewer.