2003-06-11 23:36:47 +00:00
|
|
|
<?php
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/util_ops.inc");
|
|
|
|
require_once("../inc/db_ops.inc");
|
2004-11-14 01:55:38 +00:00
|
|
|
echo "<!--\$Id$ -->\n";
|
2003-06-11 23:36:47 +00:00
|
|
|
|
|
|
|
db_init();
|
|
|
|
|
|
|
|
parse_str(getenv("QUERY_STRING"));
|
|
|
|
|
2003-07-01 18:28:33 +00:00
|
|
|
function print_detail_field() {
|
|
|
|
echo "<tr><td align=right>Detail level</td><td>";
|
|
|
|
echo "<select name=detail>
|
|
|
|
<option value=low>low
|
|
|
|
<option value=high>high
|
|
|
|
</select>
|
|
|
|
</td></tr>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
function print_query_field() {
|
2004-12-02 23:30:25 +00:00
|
|
|
$currenttime=time();
|
|
|
|
$hourago=$currenttime-3600;
|
|
|
|
$dayago=$currenttime-24*3600;
|
|
|
|
$weekago=$currenttime-7*24*3600;
|
2003-07-01 18:28:33 +00:00
|
|
|
echo "
|
|
|
|
<tr>
|
|
|
|
<td align=right>Additional clauses</td>
|
2004-11-14 01:55:38 +00:00
|
|
|
<td><input name=clauses size=100></td>
|
2004-12-02 23:30:25 +00:00
|
|
|
</tr><tr>
|
|
|
|
<td align=right>Unix times</td>
|
|
|
|
<td>Now:<b> $currenttime</b> Hour ago: $hourago Day ago: $dayago Week ago: $weekago</td>
|
2003-07-01 18:28:33 +00:00
|
|
|
</tr>
|
|
|
|
";
|
|
|
|
}
|
|
|
|
|
2003-06-11 23:36:47 +00:00
|
|
|
$first = 1;
|
|
|
|
|
|
|
|
$title = table_title($table);
|
|
|
|
page_head($title);
|
2003-11-11 20:49:07 +00:00
|
|
|
echo "<h2>Query $table table</h2>\n";
|
2003-06-11 23:36:47 +00:00
|
|
|
echo "<form method=get action=db_action.php>\n";
|
|
|
|
echo "<p>\n";
|
|
|
|
echo "<input type=hidden name=table value=$table>\n";
|
|
|
|
|
|
|
|
start_table();
|
|
|
|
if ($table=="platform") {
|
|
|
|
} else if ($table=="app") {
|
|
|
|
} else if ($table=="app_version") {
|
2003-10-10 22:55:29 +00:00
|
|
|
print_detail_field();
|
2004-11-14 01:55:38 +00:00
|
|
|
print_query_field();
|
2003-06-11 23:36:47 +00:00
|
|
|
} else if ($table=="host") {
|
|
|
|
print_checkbox("Show Aggregate Information", "show_aggregate", $show_aggregate);
|
2003-07-01 18:28:33 +00:00
|
|
|
print_detail_field();
|
2004-11-14 01:55:38 +00:00
|
|
|
print_query_field();
|
2003-06-11 23:36:47 +00:00
|
|
|
} else if ($table=="workunit") {
|
2003-10-08 20:44:58 +00:00
|
|
|
print_detail_field();
|
2003-11-08 00:23:06 +00:00
|
|
|
print_query_field();
|
2003-11-07 00:54:53 +00:00
|
|
|
echo "<input type=hidden name=sort_by value=id>\n";
|
2003-06-11 23:36:47 +00:00
|
|
|
} else if ($table=="result") {
|
|
|
|
echo "<tr><td align=right>Server state</td><td> ";
|
2003-08-05 21:40:07 +00:00
|
|
|
server_state_select();
|
2003-06-11 23:36:47 +00:00
|
|
|
echo "</td></tr>\n";
|
|
|
|
//print_text_field( "Batch number:", "batch", $batch );
|
|
|
|
echo "<tr><td align=right>Outcome</td><td>";
|
2003-08-05 21:40:07 +00:00
|
|
|
outcome_select();
|
2003-06-11 23:36:47 +00:00
|
|
|
echo "</td></tr>\n";
|
|
|
|
echo "<tr><td align=right>Client state</td><td>";
|
2003-08-05 21:40:07 +00:00
|
|
|
client_state_select();
|
2003-06-11 23:36:47 +00:00
|
|
|
echo "</td></tr>\n";
|
2004-11-17 10:37:08 +00:00
|
|
|
echo "<tr><td align=right>Validate state</td><td>";
|
|
|
|
validate_state_select();
|
|
|
|
echo "</td></tr>\n";
|
2003-06-11 23:36:47 +00:00
|
|
|
echo "<tr><td align=right>Sort by</td><td>";
|
|
|
|
result_sort_select();
|
|
|
|
echo "</td></tr>\n";
|
2003-07-01 18:28:33 +00:00
|
|
|
print_detail_field();
|
|
|
|
print_query_field();
|
2003-06-11 23:36:47 +00:00
|
|
|
|
|
|
|
} else if ($table=="team") {
|
2004-11-14 01:55:38 +00:00
|
|
|
print_query_field();
|
2003-06-11 23:36:47 +00:00
|
|
|
} else if ($table=="user") {
|
2004-11-14 01:55:38 +00:00
|
|
|
print_query_field();
|
2003-06-11 23:36:47 +00:00
|
|
|
} else {
|
|
|
|
echo "Unknown table name\n";
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2003-11-07 00:54:53 +00:00
|
|
|
row2("Number of entries to show", "<input name=nresults value='20'>");
|
2003-06-11 23:36:47 +00:00
|
|
|
|
|
|
|
row2("", "<input type=submit value=\"OK\">\n");
|
|
|
|
end_table();
|
|
|
|
echo "</form>\n";
|
|
|
|
|
2004-11-14 01:55:38 +00:00
|
|
|
print_describe_table($table, 4);
|
|
|
|
|
2003-06-11 23:36:47 +00:00
|
|
|
page_tail();
|
|
|
|
?>
|