-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdatabase.php
59 lines (44 loc) · 1.14 KB
/
database.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
<?php
/*
* Manage schemas within a database
*/
// Include application functions
include_once('./libraries/lib.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
if (!isset($msg)) $msg = '';
$scripts = '';
function _highlight($string, $term) {
return str_replace($term, "<b>{$term}</b>", $string);
}
function doTree() {
global $misc, $data, $lang;
$reqvars = $misc->getRequestVars('database');
$tabs = $misc->getNavTabs('database');
$items = $misc->adjustTabsForTree($tabs);
$attrs = array(
'text' => field('title'),
'icon' => field('icon'),
'action' => url(field('url'),
$reqvars,
field('urlvars', array())
),
'branch' => ifempty(field('branch'), '',
url(field('url'),
$reqvars,
field('urlvars'),
array('action' => 'tree')
)),
);
$misc->printTree($items, $attrs, 'database');
exit;
}
/* shortcuts: these functions exit the script */
if ($action == 'tree') doTree();
$misc->printHtmlHeader($lang['strdatabase'], $scripts);
$misc->printBody();
switch ($action) {
default:
break;
}
$misc->printFooter();
?>