menu+main: targets an HTTPS phpMyAdmin instead
security: account lookup bug fix
proc: dot in username fix (course lockers)
git-svn-id: svn://presbrey.mit.edu/sql/mitsql@94
a142d4bd-2cfb-0310-9673-
cb33a7e74f58
$myEmail = $myUsername.'@mit.edu';
$myPassword = substr(uniqid(),0,7);
-if ($myUID<1000) exit;
+if ($myUID<1000) exit('bad UID');
$Login = new Login($myUsername);
if (!$Login->exists() && !empty($myUsername)) {
class proc {
static function newdb(&$User, $i_newdb) {
$msg1 = $err1 = array();
- $dbname = $User->getUsername().DELIMETER.$i_newdb;
+ $uname = $User->getUsername();
+ $uname = str_replace('.','',$uname);
+ $dbname = $uname.DELIMETER.$i_newdb;
if ($User->isOverQuota()) {
$err1[] = 'You are over your quota. You may not add more databases.';
} elseif (count($User->getDBList())>MAXDBS) {
$this->p = $p;
if (is_numeric($u)) {
$this->id = $u;
- $opt = sprintf(" UserId = '%s'", mysql_escape_string($u));
+ $opt = sprintf(" Username = '%s' OR UserId = '%s'", mysql_escape_string($u), mysql_escape_string($u));
} else {
$opt = sprintf(" Username = '%s'", mysql_escape_string($u));
$opt .= (is_null($p)?'':sprintf(" AND Password='%s'", mysql_escape_string(base64_encode($p))));
/*
$g = getManagedDBs();
print_r($g);
-
-$User = new User($Login->getUserId());
-print_r($User->getDBList());
*/
-phpinfo();
+$l = new Login('6.001');
+echo !$l->isEnabled();
+echo $l->isValid();
+print_r($GLOBALS);
+
+//phpinfo();
//checkQuotas();
</form>
<h2>Manage Data</h2>
-<p>One interface we recommend for managing SQL data is <a href="/~tools/phpMyAdmin/" target="_blank">phpMyAdmin</a>. Feel free to use it after you've created your databases.</p>
+<p>One interface we recommend for managing SQL data is <a href="https://scripts.mit.edu/~sql/phpMyAdmin/" target="_blank">phpMyAdmin</a>. Feel free to use it after you've created your databases.</p>
<?php
<?php else: ?>
<div style="float:left; position: relative;">
<a href="do/signup">Sign up</a> |
-<a href="/~sql/phpMyAdmin/" target="_blank">phpMyAdmin</a> |
+<a href="https://scripts.mit.edu/~sql/phpMyAdmin/" target="_blank">phpMyAdmin</a> |
<a href="do/index">Home</a>
</div>
<div style="float: right;">