File: db_form.php

package info (click to toggle)
boinc 5.4.11-4%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 21,440 kB
  • ctags: 16,986
  • sloc: cpp: 70,682; ansic: 45,747; php: 35,513; xml: 10,487; sh: 9,324; python: 4,291; makefile: 1,958; asm: 1,258; perl: 914; sql: 395; csh: 126; pascal: 124
file content (90 lines) | stat: -rw-r--r-- 2,382 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
$cvs_version_tracker[]="\$Id: db_form.php,v 1.15 2005/02/08 03:33:35 ballen Exp $";  //Generated automatically - do not edit

require_once("../inc/util_ops.inc");
require_once("../inc/db_ops.inc");

db_init();

$show_aggregate = false;
parse_str(getenv("QUERY_STRING"));

$title = table_title($table);
admin_page_head($title);

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";

start_table();

switch($table){
	case "platform": 
		break;
	case "app": 
		break;
    case "app_version":
        print_detail_field();
        print_query_field();
        break;
    case "host":
        echo "
            <tr>
            <td align=\"right\">Show Aggregate Information</td>
            <td>
        ";
        print_checkbox("", "show_aggregate", $show_aggregate);
        echo "
            </td>
            </tr>
        ";
        print_detail_field();
        print_query_field();
        break;
    case "workunit":
        print_detail_field();
        print_query_field();
        echo "<input type=\"hidden\" name=\"sort_by\" value=\"id\">\n";
        break;
    case "result":
        echo "<tr><td align=\"right\">Server state</td><td> ";
        server_state_select();
        echo "</td></tr>\n";
        //print_text_field( "Batch number:", "batch", $batch );
        echo "<tr><td align=\"right\">Outcome</td><td>";
        outcome_select();
        echo "</td></tr>\n";
        echo "<tr><td align=\"right\">Client state</td><td>";
        client_state_select();
        echo "</td></tr>\n";
        echo "<tr><td align=\"right\">Validate state</td><td>";
        validate_state_select();
        echo "</td></tr>\n";
        echo "<tr><td align=\"right\">Sort by</td><td>";
        result_sort_select();
        sort_order_select();
        echo "</td></tr>\n";
        print_detail_field();
        print_query_field();
        break;
    case "team":
        print_query_field();
        break;
    case "user":
        print_query_field();
        break;
	default:
		echo "Unknown table name\n";
        exit();
}

row2("Number of entries to show", "<input name=\"nresults\" value=\"20\">");
row2("", "<input type=\"submit\" value=\"OK\">\n");
end_table();
echo "</form>\n";

print_describe_table($table, 4);

admin_page_tail();
?>