<?php
+/*
+ (c) 2005 Joe Presbrey
+*/
require_once('mitsql.cfg.php');
require_once('mitsql.lib.php');
-/*
-include 'phpinfo.php';
-exit;
+include 'tpl/head.php';
+
+function getManagedDBs($owner=null) {
+ $databases = array_keys(fetchRows(DBSelect('SELECT Name FROM DB WHERE bEnabled=1'),'Name'));
+ $owners = array();
+ foreach($databases as $database) {
+ if (stristr($database, DELIMETER)) {
+ $exp = explode(DELIMETER, $database);
+ $thisowner = array_shift($exp);
+ if (!is_null($owner) && $thisowner!=$owner) { continue; }
+ isset($owners[$thisowner]) || $owners[$thisowner] = array();
+ $owners[$thisowner][] = $database;
+ }
+ }
+ return $owners;
+}
+
+/* //GET MANAGED DBs
+$g = getManagedDBs();
+print_r($g);
*/
-$thisPath=pathinfo($_SERVER['SCRIPT_NAME']);
+/* //TEST A LOGIN
+$l = new Login('6.001');
+echo !$l->isEnabled();
+echo $l->isValid();
+print_r($GLOBALS);
+*/
-session_set_cookie_params(0, $thisPath['dirname']);
-@session_start();
+//phpinfo();
-if (isSess('i')) {
- sess('i', sess('i')+1);
-} else {
- echo sess('i', 1);
-}
+//checkQuotas();
+
+printMsgs(array('this is a test msg: test 0'));
+printMsgs(array('this is a test msg: test 1', 'this is a test msg: test 2'));
+
+printErrors(array('this is a test error: test 0'));
+printErrors(array('this is a test error: test 1', 'this is a test error: test 2'));
+
+include 'tpl/foot.php';
+?>