From: Joe Presbrey Date: Mon, 24 Jul 2006 22:15:22 +0000 (+0000) Subject: signup: now takes signups by argument X-Git-Url: http://andersk.mit.edu/gitweb/sql-web.git/commitdiff_plain/690e37fb59e0ed5c5f90365776f61132eeeba5f8 signup: now takes signups by argument index: shorter intro head: inherit style from scripts homepage main: recalc db sizes on each load git-svn-id: svn://presbrey.mit.edu/sql/mitsql@107 a142d4bd-2cfb-0310-9673-cb33a7e74f58 --- diff --git a/batch/signup.php b/batch/signup.php index ecb2ab9..1bb7cd8 100755 --- a/batch/signup.php +++ b/batch/signup.php @@ -6,17 +6,16 @@ require_once('mitsql.lib.php'); require_once('batch.inc.php'); -$callingUnix = posix_getpwuid(posix_getuid()); - -$myUsername = escapeshellcmd($callingUnix['name']); -$hesinfo = explode(':', trim(`hesinfo $myUsername passwd`)); +$myUsername = $argv[1]; +$myUID = $argv[3]; +$hescmd = "hesinfo $myUsername passwd"; +$hesinfo = explode(':', trim(exec($hescmd))); if (count($hesinfo)>=4) { $myName = explode(',', $hesinfo[4]); $myName = array_shift($myName); } else { $myName = $myUsername; } -$myUID = $callingUnix['uid']; $myEmail = $myUsername.'@mit.edu'; $myPassword = substr(uniqid(),0,7); diff --git a/global.act.php b/global.act.php index 1a6a98d..b7ff5ee 100644 --- a/global.act.php +++ b/global.act.php @@ -47,12 +47,14 @@ if (isOnline()) { unset($_SESSION['LoginSSL']); } + /* if (isPost() || isset($i_refresh)) { if (!empty($UserId)) { checkQuotas($UserId); } - isset($i_refresh) && redirect('main'); + isset($i_refresh) && redirect('main?r'); } + */ } // isOnline() diff --git a/main.php b/main.php index 8d60aec..f83723c 100644 --- a/main.php +++ b/main.php @@ -17,8 +17,11 @@ if (isPost()) { if (isset($i_drop)) { list($msg1, $err1) = proc::drop($User, $i_drop); } - if (!count($err1)) - $User->refresh(); +} + +if (!count($err1)) {//&& !isset($i_r)) + checkQuotas($Login->getUserID()); + $User->refresh(); } $myDBs = $User->getDBList(); diff --git a/tpl/head.php b/tpl/head.php index 1009ad1..bffc1ed 100644 --- a/tpl/head.php +++ b/tpl/head.php @@ -18,7 +18,7 @@ if (isOffline()) { MIT SIPB MySQL Service for Athena - + diff --git a/tpl/index.php b/tpl/index.php index d584d5d..2386425 100644 --- a/tpl/index.php +++ b/tpl/index.php @@ -1,22 +1,24 @@ +About +*/?>

This service provides MySQL databases to MIT certificate holders. You must choose a MySQL password (which should be different from your Athena account password) when you sign up, and you can then use this interface to create and drop databases. All subsequent SQL commands can be issued from any host, client, and/or script of your choice; -simply connect to the MySQL server at sql.mit.edu using your new MySQL username and password. -You may want to consider running scripts using the web script service or +simply connect to the MySQL server at sql.mit.edu using your username and your new MySQL password. +You may find it convenient to run scripts using the web script service or shortjobs service.

All uses of this service must comply with the MITnet rules of use. -The SIPB MySQL Service is part of the scripts.mit.edu project.

+Backups

@@ -24,7 +26,6 @@ The SIPB MySQL Service is part of the