]> andersk Git - sql-web.git/blob - batch/create_db.php
f29b3d78ed9c7d86b8a2d4dd994b6ffe9fbc23e6
[sql-web.git] / batch / create_db.php
1 <?php
2
3 require_once('../mitsql.cfg.php');
4 require_once('mitsql.lib.php');
5 require_once('proc.lib.php');
6
7 require_once('batch.inc.php');
8
9 $Login = new Login($i_u, $i_p);
10 if (!$Login->canLogin()) die('-1');
11
12 $User = new User($Login->getUserID());
13 $myUsername = $User->getUsername();
14
15 if (substr($i_d,0,strlen($myUsername)+1) == $myUsername.DELIMETER) {
16         $i_d = explode(DELIMETER, $i_d);
17         array_shift($i_d);
18         $i_d = implode(DELIMETER, $i_d);
19 }
20
21 list($msg1, $err1) = proc::newdb($User, $i_d);
22 if (!empty($err1)) die('-3');
23 if (empty($err1)) die('0');
24
25 ?>
This page took 0.029291 seconds and 3 git commands to generate.