]> andersk Git - sql-web.git/blobdiff - test.php
change password feature
[sql-web.git] / test.php
index bbea2a484a4a5e2b5a39555e1771228dc05c0c16..7876ba8ad8128b449b9508d98133bfbd2ae0edbf 100755 (executable)
--- a/test.php
+++ b/test.php
@@ -3,18 +3,32 @@
 require_once('mitsql.cfg.php');
 require_once('mitsql.lib.php');
 
+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;
+}
+
 /*
-include 'phpinfo.php';
-exit;
-*/
+$g = getManagedDBs();
+print_r($g);
 
-$thisPath=pathinfo($_SERVER['SCRIPT_NAME']);
+$User = new User($Login->getUserId());
+print_r($User->getDBList());
+*/
 
-session_set_cookie_params(0, $thisPath['dirname']);
-@session_start();
+checkQuotas();
 
-if (isSess('i')) {
-    sess('i', sess('i')+1);
-} else {
-    echo sess('i', 1);
-}
+include 'tpl/foot.php';
+?>
This page took 0.025671 seconds and 4 git commands to generate.