]>
Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | /* | |
3 | (c) 2005 Joe Presbrey | |
4 | */ | |
5 | ||
6 | require_once('mitsql.cfg.php'); | |
7 | require_once('mitsql.lib.php'); | |
8 | ||
9 | include 'tpl/head.php'; | |
10 | ||
11 | function getManagedDBs($owner=null) { | |
12 | $databases = array_keys(fetchRows(DBSelect('SELECT Name FROM DB WHERE bEnabled=1'),'Name')); | |
13 | $owners = array(); | |
14 | foreach($databases as $database) { | |
15 | if (stristr($database, DELIMETER)) { | |
16 | $exp = explode(DELIMETER, $database); | |
17 | $thisowner = array_shift($exp); | |
18 | if (!is_null($owner) && $thisowner!=$owner) { continue; } | |
19 | isset($owners[$thisowner]) || $owners[$thisowner] = array(); | |
20 | $owners[$thisowner][] = $database; | |
21 | } | |
22 | } | |
23 | return $owners; | |
24 | } | |
25 | ||
26 | /* //GET MANAGED DBs | |
27 | $g = getManagedDBs(); | |
28 | print_r($g); | |
29 | */ | |
30 | ||
31 | /* //TEST A LOGIN | |
32 | $l = new Login('6.001'); | |
33 | echo !$l->isEnabled(); | |
34 | echo $l->isValid(); | |
35 | print_r($GLOBALS); | |
36 | */ | |
37 | ||
38 | //phpinfo(); | |
39 | ||
40 | //checkQuotas(); | |
41 | ||
42 | printMsgs(array('this is a test msg: test 0')); | |
43 | printMsgs(array('this is a test msg: test 1', 'this is a test msg: test 2')); | |
44 | ||
45 | printErrors(array('this is a test error: test 0')); | |
46 | printErrors(array('this is a test error: test 1', 'this is a test error: test 2')); | |
47 | ||
48 | include 'tpl/foot.php'; | |
49 | ?> |