]> andersk Git - sql-web.git/blame - test.php
Fix CSRF vulnerabilities
[sql-web.git] / test.php
CommitLineData
b43ab1a6 1<?php
79ffa771
JP
2/*
3 (c) 2005 Joe Presbrey
4*/
b43ab1a6 5
997305cf
JP
6require_once('mitsql.cfg.php');
7require_once('mitsql.lib.php');
8
89905822 9//include 'tpl/head.php';
88b7d384 10
377015e0 11function getManagedDBs($owner=null) {
224df904 12 $databases = array_keys(fetchRows(DBSelect('SELECT Name FROM DB WHERE bEnabled=1'),'Name'));
377015e0
JP
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}
997305cf 25
69e08b46 26/* //GET MANAGED DBs
377015e0
JP
27$g = getManagedDBs();
28print_r($g);
224df904
JP
29*/
30
69e08b46 31/* //TEST A LOGIN
da0d337f
JP
32$l = new Login('6.001');
33echo !$l->isEnabled();
34echo $l->isValid();
35print_r($GLOBALS);
69e08b46 36*/
da0d337f 37
1c1d1ffe 38//phpinfo();
53f8750e
JP
39
40//checkQuotas();
997305cf 41
aaf1710a
JP
42printMsgs(array('this is a test msg: test 0'));
43printMsgs(array('this is a test msg: test 1', 'this is a test msg: test 2'));
44
45printErrors(array('this is a test error: test 0'));
46printErrors(array('this is a test error: test 1', 'this is a test error: test 2'));
47
89905822
QS
48print_r(getUsernameID('presbrey'));
49
50//include 'tpl/foot.php';
88b7d384 51?>
This page took 0.063186 seconds and 5 git commands to generate.