]> andersk Git - sql-web.git/blob - test.php
git-svn-id: svn://presbrey.mit.edu/sql/mitsql@109 a142d4bd-2cfb-0310-9673-cb33a7e74f58
[sql-web.git] / test.php
1 <?php
2
3 require_once('mitsql.cfg.php');
4 require_once('mitsql.lib.php');
5
6 include 'tpl/head.php';
7
8 function getManagedDBs($owner=null) {
9         $databases = array_keys(fetchRows(DBSelect('SELECT Name FROM DB WHERE bEnabled=1'),'Name'));
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 }
22
23 /* //GET MANAGED DBs
24 $g = getManagedDBs();
25 print_r($g);
26 */
27
28 /* //TEST A LOGIN
29 $l = new Login('6.001');
30 echo !$l->isEnabled();
31 echo $l->isValid();
32 print_r($GLOBALS);
33 */
34
35 //phpinfo();
36
37 //checkQuotas();
38
39 printMsgs(array('this is a test msg: test 0'));
40 printMsgs(array('this is a test msg: test 1', 'this is a test msg: test 2'));
41
42 printErrors(array('this is a test error: test 0'));
43 printErrors(array('this is a test error: test 1', 'this is a test error: test 2'));
44
45 include 'tpl/foot.php';
46 ?>
This page took 0.030787 seconds and 5 git commands to generate.