2003-06-11 23:36:47 +00:00
|
|
|
<?php
|
2008-08-05 22:43:14 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2008 University of California
|
|
|
|
//
|
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2005-02-08 03:33:35 +00:00
|
|
|
|
|
|
|
require_once("../inc/util_ops.inc");
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/db_ops.inc");
|
2003-06-11 23:36:47 +00:00
|
|
|
|
2005-02-08 03:33:35 +00:00
|
|
|
db_init();
|
2003-06-11 23:36:47 +00:00
|
|
|
|
2005-02-08 03:33:35 +00:00
|
|
|
$show_aggregate = false;
|
2008-09-07 07:40:56 +00:00
|
|
|
$table = get_str("table");
|
2003-06-11 23:36:47 +00:00
|
|
|
|
2005-02-08 03:33:35 +00:00
|
|
|
$title = table_title($table);
|
|
|
|
admin_page_head($title);
|
2003-07-01 18:28:33 +00:00
|
|
|
|
2005-02-08 03:33:35 +00:00
|
|
|
echo "<h2>Query $table table</h2>\n";
|
|
|
|
echo "<form method=\"get\" action=\"db_action.php\">\n";
|
|
|
|
echo "<p>\n";
|
|
|
|
echo "<input type=\"hidden\" name=\"table\" value=\"$table\">\n";
|
2003-06-11 23:36:47 +00:00
|
|
|
|
2005-02-08 03:33:35 +00:00
|
|
|
start_table();
|
2003-06-11 23:36:47 +00:00
|
|
|
|
2005-02-08 03:33:35 +00:00
|
|
|
switch($table){
|
|
|
|
case "platform":
|
|
|
|
break;
|
|
|
|
case "app":
|
|
|
|
break;
|
|
|
|
case "app_version":
|
2003-10-10 22:55:29 +00:00
|
|
|
print_detail_field();
|
2004-11-14 01:55:38 +00:00
|
|
|
print_query_field();
|
2005-02-08 03:33:35 +00:00
|
|
|
break;
|
|
|
|
case "host":
|
2005-01-07 23:20:51 +00:00
|
|
|
echo "
|
|
|
|
<tr>
|
|
|
|
<td align=\"right\">Show Aggregate Information</td>
|
|
|
|
<td>
|
|
|
|
";
|
|
|
|
print_checkbox("", "show_aggregate", $show_aggregate);
|
|
|
|
echo "
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
";
|
2003-07-01 18:28:33 +00:00
|
|
|
print_detail_field();
|
2004-11-14 01:55:38 +00:00
|
|
|
print_query_field();
|
2005-02-08 03:33:35 +00:00
|
|
|
break;
|
|
|
|
case "workunit":
|
2003-10-08 20:44:58 +00:00
|
|
|
print_detail_field();
|
2003-11-08 00:23:06 +00:00
|
|
|
print_query_field();
|
2005-02-08 03:33:35 +00:00
|
|
|
echo "<input type=\"hidden\" name=\"sort_by\" value=\"id\">\n";
|
|
|
|
break;
|
|
|
|
case "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 );
|
2005-02-08 03:33:35 +00:00
|
|
|
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";
|
2005-02-08 03:33:35 +00:00
|
|
|
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";
|
2005-02-08 03:33:35 +00:00
|
|
|
echo "<tr><td align=\"right\">Validate state</td><td>";
|
2004-11-17 10:37:08 +00:00
|
|
|
validate_state_select();
|
|
|
|
echo "</td></tr>\n";
|
2005-02-08 03:33:35 +00:00
|
|
|
echo "<tr><td align=\"right\">Sort by</td><td>";
|
2003-06-11 23:36:47 +00:00
|
|
|
result_sort_select();
|
2005-02-08 03:33:35 +00:00
|
|
|
sort_order_select();
|
2003-06-11 23:36:47 +00:00
|
|
|
echo "</td></tr>\n";
|
2003-07-01 18:28:33 +00:00
|
|
|
print_detail_field();
|
|
|
|
print_query_field();
|
2005-02-08 03:33:35 +00:00
|
|
|
break;
|
|
|
|
case "team":
|
2004-11-14 01:55:38 +00:00
|
|
|
print_query_field();
|
2005-02-08 03:33:35 +00:00
|
|
|
break;
|
|
|
|
case "user":
|
2004-11-14 01:55:38 +00:00
|
|
|
print_query_field();
|
2005-02-08 03:33:35 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
echo "Unknown table name\n";
|
2003-06-11 23:36:47 +00:00
|
|
|
exit();
|
2005-02-08 03:33:35 +00:00
|
|
|
}
|
2003-06-11 23:36:47 +00:00
|
|
|
|
2005-02-08 03:33:35 +00:00
|
|
|
row2("Number of entries to show", "<input name=\"nresults\" value=\"20\">");
|
|
|
|
row2("", "<input type=\"submit\" value=\"OK\">\n");
|
|
|
|
end_table();
|
|
|
|
echo "</form>\n";
|
2003-06-11 23:36:47 +00:00
|
|
|
|
2005-02-08 03:33:35 +00:00
|
|
|
print_describe_table($table, 4);
|
2004-11-14 01:55:38 +00:00
|
|
|
|
2005-02-08 03:33:35 +00:00
|
|
|
admin_page_tail();
|
2008-08-05 22:43:14 +00:00
|
|
|
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
|
2003-06-11 23:36:47 +00:00
|
|
|
?>
|