forked from xzilla/phppgadmin
/
aggregates.php
60 lines (47 loc) · 1.18 KB
/
aggregates.php
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
<?php
/**
* Manage aggregates in a database
*
* $Id: aggregates.php,v 1.10.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
include_once('./libraries/lib.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
if (!isset($msg)) $msg = '';
/**
* Show default list of aggregates in the database
*/
function doDefault($msg = '') {
global $data, $conf, $misc;
global $lang;
$misc->printTrail('schema');
$misc->printTabs('schema', 'aggregates');
$misc->printMsg($msg);
$aggregates = $data->getAggregates();
$columns = array(
'aggregate' => array(
'title' => $lang['strname'],
'field' => 'proname',
),
'type' => array(
'title' => $lang['strtype'],
'field' => 'proargtypes',
'params'=> array('null' => $lang['stralltypes']),
),
'comment' => array(
'title' => $lang['strcomment'],
'field' => 'aggcomment',
),
);
$actions = array();
$misc->printTable($aggregates, $columns, $actions, $lang['strnoaggregates']);
}
$misc->printHeader($lang['straggregates']);
$misc->printBody();
switch ($action) {
default:
doDefault();
break;
}
$misc->printFooter();
?>