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

Last change on this file since 8162 was 8162, checked in by Daniela Dorner, 18 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 4.6 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("<select name='plot' size='1' class='Width'>\n");
38 if ($_GET["plot"]=="prim")
39 printf("<option value='prim' onclick='hidepulldown2()' selected>vs primary</option>\n");
40 else
41 printf("<option value='prim' onclick='hidepulldown2()'>vs primary</option>\n");
42 if ($_GET["plot"]=="val")
43 printf("<option value='val' onclick='showpulldown2()' selected>vs value</option>\n");
44 else
45 printf("<option value='val' onclick='showpulldown2()'>vs value</option>\n");
46 printf("</select><br>\n");
47
48 printf("<select name='prim' size='1' class='Width'>\n");
49 foreach($prims as $primary => $column)
50 if ($_GET["prim"]==$column)
51 printf("<option onclick=\"showpulldown('%s')\" value='%s' selected>%s</option>\n", $column, $column, $primary);
52 else
53 printf("<option onclick=\"showpulldown('%s')\" value='%s'>%s</option>\n", $column, $column, $primary);
54 printf("</select>\n");
55 printf(" from&nbsp;<input name='primstart' type='text' size='6' maxlength='6' value='%s'>", $_GET["primstart"]);
56 printf(" to&nbsp;<input name='primstop' type='text' size='6' maxlength='6' value='%s'><br>\n", $_GET["primstop"]);
57
58 foreach($prims as $primary => $column)
59 {
60 $list=GetList($host, $user, $pw, $db, $column, $tables);
61 PrintDiv($column, $list, "");
62 PrintDiv($column, $list, "2");
63 }
64
65 printf("<br>Set1: <input name='Set' type='text' size='20' maxlength='100' value='%s'>\n", $_GET["Set"]);
66 printf("<br>Set2: <input name='Set2' type='text' size='20' maxlength='100' value='%s'>\n", $_GET["Set2"]);
67 printf("<br><br><input class='Width' type='submit' value='Query Plot'><br>\n");
68 printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"plotdb.php\"'><br>\n");
69
70 printf("</form>");
71 printf("</td>\n");
72
73 printf("<td align='right' width='640px'>\n");
74 if (!empty($_GET))
75 {
76 $img="plot.php?par=hallo";
77 foreach($_GET as $var => $val)
78 $img.="&amp;".$var ."=".$val;
79// printf("link: %s<br>", $img);
80 printf("<img src='%s' alt='plot'>", $img);
81 }
82 printf("</td></tr>\n");
83 printf("<tr><td colspan='2'>\n");
84 printf("some remarks:\n<ul>");
85 printf("<li>For Runs plotting the whole range (i.e. without giving a range or when giving a too large range) ");
86 printf("doesn't work with ChartDirector.</li>\n");
87 printf("<li>In Set1 and Set2 Sets can be given (e.g. on sequences in Set1 and off sequences in Set2) - they ");
88 printf("are displayed in colour (Set: blue, Set2: red). Please give the numbers with space as separator (e.g. 40004 40022).</<li>\n");
89 printf("<li>0 is not accepted in the ranges fields, please write .0 or 00</li>");
90 printf("<li>Be aware, that plotting timestamps, e.g. fRunStart, doesn't work. </li>");
91 printf("</ul></td></tr>\n");
92 /*
93 printf("<tr><td>\n");
94 $query=GetQuery($tables, $joins);
95 printf("Q: %s</td></tr>", $query);
96 */
97 printf("</table>\n");
98 printf("</center>\n");
99
100 echo (file_get_contents("index-footer.html"));
101
102 ini_set("display_errors", "Off");
103 ini_set("mysql.trace_mode", "Off");
104}
105?>
Note: See TracBrowser for help on using the repository browser.