Changeset 8466 for trunk/MagicSoft/Mars/datacenter/db
- Timestamp:
- 04/28/07 18:22:16 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/db
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/menu.js
r8464 r8466 150 150 } 151 151 152 function showset2() 153 { 154 var el = document.getElementById("set2"); 155 el.style.display="inline"; 156 } 157 158 function hideset2() 159 { 160 var el = document.getElementById("set2"); 161 el.style.display="none"; 162 } 163 -
trunk/MagicSoft/Mars/datacenter/db/plot.php
r8161 r8466 55 55 $labelfont="arialdb.ttf"; 56 56 $labelsize=10; 57 //colours 58 $colour=0x000000; 59 $setcolour=0x0080ff; 60 $set2colour=0xff0000; 61 57 62 if ($_GET["plot"]=="val") 58 63 { 59 64 $column2=$_GET[$primary."Col2"]; 60 $c->addScatterLayer($val2, $val1, $column, CircleSymbol, $small, 0x000000, 0x000000);65 $c->addScatterLayer($val2, $val1, $column, CircleSymbol, $small, $colour, $colour); 61 66 if (!empty($_GET["Set"])) 62 $c->addScatterLayer($Setval2, $Setval1, $column, CircleSymbol, $large, 0x0080ff, 0x0080ff);67 $c->addScatterLayer($Setval2, $Setval1, $column, CircleSymbol, $large, $setcolour, $setcolour); 63 68 if (!empty($_GET["Set2"])) 64 $c->addScatterLayer($Set2val2, $Set2val1, $column, CircleSymbol, $large, 0xff0000, 0xff0000);69 $c->addScatterLayer($Set2val2, $Set2val1, $column, CircleSymbol, $large, $set2colour, $set2colour); 65 70 $c->yAxis->setTitle($column, $axisfont, $axissize); 66 71 $c->xAxis->setTitle($column2, $axisfont, $axissize); … … 69 74 else 70 75 { 71 $c->addScatterLayer($prim, $val1, $column, CircleSymbol, $small, 0x000000, 0x000000);76 $c->addScatterLayer($prim, $val1, $column, CircleSymbol, $small, $colour, $colour); 72 77 if (!empty($_GET["Set"])) 73 $c->addScatterLayer($Setprim, $Setval1, $column, CircleSymbol, $large, 0x0080ff, 0x0080ff);78 $c->addScatterLayer($Setprim, $Setval1, $column, CircleSymbol, $large, $setcolour, $setcolour); 74 79 if (!empty($_GET["Set2"])) 75 $c->addScatterLayer($Set2prim, $Set2val1, $column, CircleSymbol, $large, 0xff0000, 0xff0000);80 $c->addScatterLayer($Set2prim, $Set2val1, $column, CircleSymbol, $large, $set2colour, $set2colour); 76 81 $c->yAxis->setTitle($column, $axisfont, $axissize); 77 82 $c->xAxis->setTitle($primary, $axisfont, $axissize); -
trunk/MagicSoft/Mars/datacenter/db/plotdb.php
r8464 r8466 1 1 <?php 2 2 { 3 function GetSequencesFromDataSet($onoff) 4 { 5 include("db.php"); 6 $db_id = mysql_pconnect($host, $user, $pw); 7 if ($db_id==FALSE) 8 { 9 printf("mysql_connect returned the following error: %s\n", mysql_error()); 10 die(""); 11 } 12 mysql_select_db($db); 13 $query="SELECT fSequenceFirst FROM DataSetSequenceMapping WHERE fDataSetNumber IN ("; 14 $query .= str_replace(" ", ",", trim($_GET["Set"])) . ") AND fOnOff=" . $onoff; 15 // printf("Q: %s<br>", $query); 16 $result=mysql_query($query, $db_id); 17 18 $sequences=""; 19 while ($row = mysql_fetch_row($result)) 20 $sequences.= $row[0] . " "; 21 22 mysql_free_result($result); 23 mysql_close($db_id); 24 25 $text=""; 26 if (!empty($sequences)) 27 $text.= str_replace(" ", "+", trim($sequences)); 28 return $text; 29 } 30 3 31 function PrintDiv($host, $user, $pw, $db, $column, $tables, $num) 4 32 { … … 81 109 if (empty($_GET["Set2"])) 82 110 $_GET["Set2"]=""; 111 if (empty($_GET["set"])) 112 $_GET["set"]=""; 83 113 84 114 printf("<center>\n<table cellpadding='0'>\n"); … … 139 169 140 170 printf("</table>\n"); 141 142 printf("<br>Set1: <input name='Set' type='text' size='20' maxlength='100' value='%s'>\n", $_GET["Set"]); 143 printf("<br>Set2: <input name='Set2' type='text' size='20' maxlength='100' value='%s'>\n", $_GET["Set2"]); 144 145 printf("<br><br><input class='Width' type='submit' value='Query Plot'><br>\n"); 171 printf("<br>\n"); 172 173 printf(" <input type='radio' name='set' value='sequences' onclick='showset2()' %s> sequences \n", $_GET["set"]=="sequences" ? "checked" : ""); 174 printf(" <input type='radio' name='set' value='datasets' onclick='hideset2()' %s> datasets <br>\n", $_GET["set"]=="datasets" ? "checked" : ""); 175 176 printf("<div id='set1' style='display:inline'>Set1: <input name='Set' type='text' size='20' maxlength='100' value='%s'>\n</div>\n<br>\n", $_GET["Set"]); 177 if (empty($_GET["set"]) || $_GET["set"]=="sequences") 178 printf("<div id='set2' style='display:inline'>Set2: <input name='Set2' type='text' size='20' maxlength='100' value='%s'>\n</div>\n<br>\n", $_GET["Set2"]); 179 else 180 printf("<div id='set2' style='display:none'>Set2: <input name='Set2' type='text' size='20' maxlength='100' value='%s'>\n</div>\n<br>\n", $_GET["Set2"]); 181 182 printf("<br><input class='Width' type='submit' value='Query Plot'><br>\n"); 146 183 printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"plotdb.php\"'><br>\n"); 147 184 … … 154 191 $img="plot.php?par=hallo"; 155 192 foreach($_GET as $var => $val) 193 { 194 if ($var=="Set2" && $_GET["set"]=="datasets") 195 continue; 196 if ($var=="Set" && $_GET["set"]=="datasets" && !empty($val)) 197 { 198 $img.= "&Set=" . GetSequencesFromDataSet("1"); 199 $img.= "&Set2=" . GetSequencesFromDataSet("2"); 200 continue; 201 } 156 202 $img.="&".$var ."=".$val; 203 } 157 204 // printf("link: %s<br>", $img); 158 205 printf("<img src='%s' alt='plot'>", $img); … … 161 208 printf("<tr><td colspan='2'>\n"); 162 209 printf("some remarks:\n<ul>"); 163 printf("<li>For Runs plotting the whole range (i.e. without giving a range or when giving a too large range) ");210 printf("<li>For Runs plotting the whole range (i.e. without giving a range or when giving a too large range) \n"); 164 211 printf("doesn't work with ChartDirector.</li>\n"); 165 printf("<li>In Set1 and Set2 Sets can be given (e.g. on sequences in Set1 and off sequences in Set2) - they "); 166 printf("are displayed in colour (Set: blue, Set2: red). Please give the numbers with space as separator (e.g. 40004 40022).</<li>\n"); 167 printf("<li>0 is not accepted in the ranges fields, please write .0 or 00</li>"); 168 printf("<li>Be aware, that plotting timestamps, e.g. fRunStart, doesn't work. </li>"); 169 printf("</ul></td></tr>\n"); 212 printf("<li>In Set1 and Set2 Sets can be given: <br>\n "); 213 printf("If 'sequences' is selected e.g. on sequences in Set1 (displayed in blue) and off sequences in Set2 \n"); 214 printf("(diplayed in red). <br>\n "); 215 printf("If 'datasets' is selected you can enter a dataset number as Set1. The on data is displayed in blue, \n"); 216 printf("the off data in red. <br>\n"); 217 printf(" Please give the numbers with space as separator (e.g. 40004 40022).<br>\n</<li>\n"); 218 printf("<li>0 is not accepted in the ranges fields, please write .0 or 00</li>\n"); 219 printf("<li>Be aware, that plotting timestamps, e.g. fRunStart, and strings, e.g. fComment doesn't work. </li>\n"); 220 printf("</ul>\n</td>\n</tr>\n"); 170 221 171 222 /* 172 printf("<tr><td >\n");223 printf("<tr><td colspan='2'>\n"); 173 224 $query=GetQuery($tables, $joins, ""); 174 printf("Q: %s</td></tr>", $query); 225 printf("Q: %s<br>", $query); 226 if (!empty($_GET["Set"])) 227 { 228 $query=GetQuery($tables, $joins, "Set"); 229 printf("Q: %s<br>", $query); 230 } 231 if (!empty($_GET["Set2"])) 232 { 233 $query=GetQuery($tables, $joins, "Set2"); 234 printf("Q: %s<br>", $query); 235 } 236 printf("</td></tr>"); 175 237 */ 176 238
Note:
See TracChangeset
for help on using the changeset viewer.