source: trunk/MagicSoft/Mars/datacenter/db/plotdb.php@ 8235

Last change on this file since 8235 was 8204, checked in by Daniela Dorner, 19 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 4.4 KB
Line 
1<?php
2{
3 function PrintDiv($column, $list, $num)
4 {
5 if (($_GET["prim"]==$column && empty($num)) || ($_GET["prim"]==$column && $_GET["plot"]=="val" && $num==2))
6 printf("<div id='%s%s' style='display:inline'>\n", $column, $num);
7 else
8 printf("<div id='%s%s' style='display:none'>\n", $column, $num);
9
10 if (!empty($num))
11 $vs="vs";
12
13 printf("<select name='%sCol%s' size='1' class='Width'>\n", $column, $num);
14 foreach($list as $column2)
15 if ($_GET[$column."Col".$num]==$column2)
16 printf("<option value='%s' selected>%s %s</option>\n", $column2, $vs, $column2);
17 else
18 printf("<option value='%s'>%s %s</option>\n", $column2, $vs, $column2);
19
20 printf("</select>\n");
21 printf(" from&nbsp;<input name='%sStart%s' type='text' size='6' maxlength='6' value='%s'>", $_GET[$column."Col".$num], $num, $_GET[$_GET[$column."Col".$num]."Start".$num]);
22 printf(" to&nbsp;<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]);
23 printf("</div>\n");
24 }
25
26 ini_set("display_errors", "On");
27 ini_set("mysql.trace_mode", "On");
28
29 echo (file_get_contents("index-header.html"));
30
31 include("plotinclude.php");
32
33 printf("<center>\n<table cellpadding='0'>\n");
34 printf("<tr><td align='left'>\n");
35 printf("<form style='margin-bottom:0;' action='plotdb.php' METHOD='GET'>\n");
36
37 printf("&nbsp;<input type='radio' name='plot' value='prim' onclick='hidepulldown2()' %s> vs primary &nbsp;", $_GET["plot"]=="prim" ? "checked" : "");
38 printf("&nbsp;<input type='radio' name='plot' value='val' onclick='showpulldown2()' %s> vs value <br><br>", $_GET["plot"]=="val" ? "checked" : "");
39
40 printf("<select name='prim' size='1' class='Width'>\n");
41 foreach($prims as $primary => $column)
42 if ($_GET["prim"]==$column)
43 printf("<option onclick=\"showpulldown('%s')\" value='%s' selected>%s</option>\n", $column, $column, $primary);
44 else
45 printf("<option onclick=\"showpulldown('%s')\" value='%s'>%s</option>\n", $column, $column, $primary);
46 printf("</select>\n");
47 printf(" from&nbsp;<input name='primstart' type='text' size='6' maxlength='6' value='%s'>", $_GET["primstart"]);
48 printf(" to&nbsp;<input name='primstop' type='text' size='6' maxlength='6' value='%s'><br>\n", $_GET["primstop"]);
49
50 foreach($prims as $primary => $column)
51 {
52 $list=GetList($host, $user, $pw, $db, $column, $tables);
53 PrintDiv($column, $list, "");
54 PrintDiv($column, $list, "2");
55 }
56
57 printf("<br>Set1: <input name='Set' type='text' size='20' maxlength='100' value='%s'>\n", $_GET["Set"]);
58 printf("<br>Set2: <input name='Set2' type='text' size='20' maxlength='100' value='%s'>\n", $_GET["Set2"]);
59 printf("<br><br><input class='Width' type='submit' value='Query Plot'><br>\n");
60 printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"plotdb.php\"'><br>\n");
61
62 printf("</form>");
63 printf("</td>\n");
64
65 printf("<td align='right' width='640px' height='400px'>\n");
66 if (!empty($_GET))
67 {
68 $img="plot.php?par=hallo";
69 foreach($_GET as $var => $val)
70 $img.="&amp;".$var ."=".$val;
71// printf("link: %s<br>", $img);
72 printf("<img src='%s' alt='plot'>", $img);
73 }
74 printf("</td></tr>\n");
75 printf("<tr><td colspan='2'>\n");
76 printf("some remarks:\n<ul>");
77 printf("<li>For Runs plotting the whole range (i.e. without giving a range or when giving a too large range) ");
78 printf("doesn't work with ChartDirector.</li>\n");
79 printf("<li>In Set1 and Set2 Sets can be given (e.g. on sequences in Set1 and off sequences in Set2) - they ");
80 printf("are displayed in colour (Set: blue, Set2: red). Please give the numbers with space as separator (e.g. 40004 40022).</<li>\n");
81 printf("<li>0 is not accepted in the ranges fields, please write .0 or 00</li>");
82 printf("<li>Be aware, that plotting timestamps, e.g. fRunStart, doesn't work. </li>");
83 printf("</ul></td></tr>\n");
84 /*
85 printf("<tr><td>\n");
86 $query=GetQuery($tables, $joins);
87 printf("Q: %s</td></tr>", $query);
88 */
89 printf("</table>\n");
90 printf("</center>\n");
91
92 echo (file_get_contents("index-footer.html"));
93
94 ini_set("display_errors", "Off");
95 ini_set("mysql.trace_mode", "Off");
96}
97?>
Note: See TracBrowser for help on using the repository browser.