]> andersk Git - sql-web.git/blame - test.php
new style: conform to new <scripts.mit.edu> textpattern template
[sql-web.git] / test.php
CommitLineData
b43ab1a6
JP
1<?php
2
997305cf
JP
3require_once('mitsql.cfg.php');
4require_once('mitsql.lib.php');
5
88b7d384
JP
6include 'tpl/head.php';
7
377015e0 8function 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
69e08b46 23/* //GET MANAGED DBs
377015e0
JP
24$g = getManagedDBs();
25print_r($g);
224df904
JP
26*/
27
69e08b46 28/* //TEST A LOGIN
da0d337f
JP
29$l = new Login('6.001');
30echo !$l->isEnabled();
31echo $l->isValid();
32print_r($GLOBALS);
69e08b46 33*/
da0d337f
JP
34
35//phpinfo();
53f8750e
JP
36
37//checkQuotas();
997305cf 38
aaf1710a
JP
39printMsgs(array('this is a test msg: test 0'));
40printMsgs(array('this is a test msg: test 1', 'this is a test msg: test 2'));
41
42printErrors(array('this is a test error: test 0'));
43printErrors(array('this is a test error: test 1', 'this is a test error: test 2'));
44
88b7d384
JP
45include 'tpl/foot.php';
46?>
This page took 0.047677 seconds and 5 git commands to generate.