Issues (1839)

html/ops/db_form.php (3 issues)

1
<?php
2
// This file is part of BOINC.
3
// http://boinc.berkeley.edu
4
// Copyright (C) 2008 University of California
5
//
6
// BOINC is free software; you can redistribute it and/or modify it
7
// under the terms of the GNU Lesser General Public License
8
// as published by the Free Software Foundation,
9
// either version 3 of the License, or (at your option) any later version.
10
//
11
// BOINC is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
// See the GNU Lesser General Public License for more details.
15
//
16
// You should have received a copy of the GNU Lesser General Public License
17
// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
18
19
require_once("../inc/util_ops.inc");
20
require_once("../inc/db_ops.inc");
21
22
db_init();
23
24
$show_aggregate = false;
25
$table = get_str("table");
26
27
$title = table_title($table);
28
admin_page_head($title);
29
30
echo "<h2>Query $table table</h2>\n";
31
echo "<form method=\"get\" action=\"db_action.php\">\n";
32
echo "<p>\n";
33
echo "<input type=\"hidden\" name=\"table\" value=\"$table\">\n";
34
35
start_table();
36
37
switch($table){
38
	case "platform":
0 ignored issues
show
Empty CASE statements are not allowed
Loading history...
39
		break;
40
	case "app":
0 ignored issues
show
Empty CASE statements are not allowed
Loading history...
41
		break;
42
    case "app_version":
43
        print_detail_field();
44
        print_query_field();
45
        break;
46
    case "host":
47
        echo "
48
            <tr>
49
            <td align=\"right\">Show Aggregate Information</td>
50
            <td>
51
        ";
52
        print_checkbox("", "show_aggregate", $show_aggregate);
53
        echo "
54
            </td>
55
            </tr>
56
        ";
57
        print_detail_field();
58
        print_query_field();
59
        break;
60
    case "workunit":
61
        print_detail_field();
62
        print_query_field();
63
        echo "<input type=\"hidden\" name=\"sort_by\" value=\"id\">\n";
64
        break;
65
    case "result":
66
        echo "<tr><td align=\"right\">Server state</td><td> ";
67
        server_state_select();
68
        echo "</td></tr>\n";
69
        //print_text_field( "Batch number:", "batch", $batch );
70
        echo "<tr><td align=\"right\">Outcome</td><td>";
71
        outcome_select();
72
        echo "</td></tr>\n";
73
        echo "<tr><td align=\"right\">Client state</td><td>";
74
        client_state_select();
75
        echo "</td></tr>\n";
76
        echo "<tr><td align=\"right\">Validate state</td><td>";
77
        validate_state_select();
78
        echo "</td></tr>\n";
79
        echo "<tr><td align=\"right\">Sort by</td><td>";
80
        result_sort_select();
81
        sort_order_select();
82
        echo "</td></tr>\n";
83
        print_detail_field();
84
        print_query_field();
85
        break;
86
    case "team":
87
        print_query_field();
88
        break;
89
    case "user":
90
        print_query_field();
91
        break;
92
	default:
0 ignored issues
show
DEFAULT keyword must be indented 4 spaces from SWITCH keyword
Loading history...
93
		echo "Unknown table name\n";
94
        exit();
95
}
96
97
row2("Number of entries to show", "<input name=\"nresults\" value=\"20\">");
98
row2("", "<input class=\"btn btn-default\" type=\"submit\" value=\"OK\">\n");
99
end_table();
100
echo "</form>\n";
101
102
print_describe_table($table, 4);
103
104
admin_page_tail();
105
$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
106
?>
107