]> andersk Git - sql-web.git/commitdiff
signup: now takes signups by argument
authorJoe Presbrey <presbrey@mit.edu>
Mon, 24 Jul 2006 22:15:22 +0000 (22:15 +0000)
committerJoe Presbrey <presbrey@mit.edu>
Mon, 24 Jul 2006 22:15:22 +0000 (22:15 +0000)
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

batch/signup.php
global.act.php
main.php
tpl/head.php
tpl/index.php

index ecb2ab92f2d1d3feab410012190745c70039dd26..1bb7cd86e851ba9f416f094ac97ae5fd6e7491b8 100755 (executable)
@@ -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);
 
index 1a6a98d0e59db6284920bbc4ccd9970388c5d45c..b7ff5ee370dabd0ca2388af4167f76d8599d78f7 100644 (file)
@@ -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()
 
index 8d60aec421b523e70044a6fbdf3273941dde5622..f83723c35cc6c6aba49cf716e92f367a169def09 100644 (file)
--- 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();
index 1009ad1ccf3a501b049388ecd9d22ec5597328ab..bffc1ed16913f780e5d954bf4786048e9b62fdf6 100644 (file)
@@ -18,7 +18,7 @@ if (isOffline()) {
 <head>\r
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />\r
     <title>MIT SIPB MySQL Service for Athena</title>\r
-       <link rel="stylesheet" href="http://scripts.mit.edu/style.css" type="text/css" />\r
+       <link rel="stylesheet" href="/style.css" type="text/css" />\r
     <link rel="stylesheet" href="<?=$BASE_URL?>mitsql.css" type="text/css" />\r
        <base href="<?=$BASE_URL?>" />\r
 </head>\r
index d584d5de367610f3f45852857d8f92e7ef1b9e92..2386425477b013e4f8d6d3d52007b460be59836c 100644 (file)
@@ -1,22 +1,24 @@
 <?php
 include 'head.php';
 ?>
+<?/*
 <h3>About</h3>
+*/?>
 
 <p>
 This service provides <a target="_blank" href="http://dev.mysql.com/doc">MySQL</a> databases to <a target="_blank" href="http://ca.mit.edu/">MIT certificate</a> holders.
 You must choose a MySQL password (which should be different from your Athena account password) when you <a href="do/signup">sign up</a>, 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 <b>sql.mit.edu</b> using your new MySQL username and password.
-You may want to consider running scripts using the <a target="_blank" href="http://scripts.mit.edu/web">web script service</a> or
+simply connect to the MySQL server at <b>sql.mit.edu</b> using your username and your new MySQL password.
+You may find it convenient to run scripts using the <a target="_blank" href="http://scripts.mit.edu/web">web script service</a> or
 <a target="_blank" href="http://scripts.mit.edu/cron">shortjobs service</a>.
 </p>
 
 <p>
 All uses of this service must comply with the <a target="_blank" href="http://web.mit.edu/olh/Welcome/rules.html">MITnet rules of use</a>.
-The SIPB MySQL Service is part of the <a target="_blank" href="http://scripts.mit.edu/">scripts.mit.edu</a> project.
 </p>
 
+<?/*
 <h3>Backups</h3>
 
 <p>
@@ -24,7 +26,6 @@ The SIPB MySQL Service is part of the <a target="_blank" href="http://scripts.mi
 Although we use various technical means to try to ensure the availability of your data (including hardware-level redundancy and real-time replication), we can make no guarantees about the reliability of the service and access to your data.
 </p>
 
-<?/*
 <h3>Quotas</h3>
 
 <p>
@@ -41,9 +42,9 @@ Users should instead store these types of data in AFS and use SQL tables only to
 <strong>Always use this interface to create and drop databases.</strong>
 Although you can drop any of your databases outside this interface, doing so will not relinquish your rights to that database and will therefore still count against your quota.
 </p>
-*/?>
 
 <h3>Disclaimer</h3>
+*/?>
 
 <p>
 Although this service has been designed with reliability in mind, the SIPB MySQL service should not be used to host critical applications that cannot tolerate downtime.
This page took 0.211383 seconds and 5 git commands to generate.