]>
Commit | Line | Data |
---|---|---|
b43ab1a6 JP |
1 | <?php |
2 | ||
997305cf JP |
3 | require_once('mitsql.cfg.php'); |
4 | require_once('mitsql.lib.php'); | |
5 | ||
88b7d384 JP |
6 | include 'tpl/head.php'; |
7 | ||
377015e0 | 8 | function getManagedDBs($owner=null) { |
224df904 | 9 | $databases = array_keys(fetchRows(DBSelect('SELECT Name FROM DB WHERE bEnabled=1'),'Name')); |
377015e0 JP |
10 | $owners = array(); |
11 | foreach($databases as $database) { | |
12 | if (stristr($database, DELIMETER)) { | |
13 | $exp = explode(DELIMETER, $database); | |
14 | $thisowner = array_shift($exp); | |
15 | if (!is_null($owner) && $thisowner!=$owner) { continue; } | |
16 | isset($owners[$thisowner]) || $owners[$thisowner] = array(); | |
17 | $owners[$thisowner][] = $database; | |
18 | } | |
19 | } | |
20 | return $owners; | |
21 | } | |
997305cf | 22 | |
88b7d384 | 23 | /* |
377015e0 JP |
24 | $g = getManagedDBs(); |
25 | print_r($g); | |
88b7d384 JP |
26 | |
27 | $User = new User($Login->getUserId()); | |
28 | print_r($User->getDBList()); | |
224df904 JP |
29 | */ |
30 | ||
53f8750e JP |
31 | phpinfo(); |
32 | ||
33 | //checkQuotas(); | |
997305cf | 34 | |
88b7d384 JP |
35 | include 'tpl/foot.php'; |
36 | ?> |