private $dblist;
function User($userId) {
$this->userId = $userId;
- $sql = sprintf("SELECT User.UserId, Username, Password, Name, Email, UL, bEnabled, nBytesSoft, nBytesHard, nBytes, nDatabases, nDatabasesHard, IF(nBytes>nBytesHard,1,0) AS bOverQuota
+ $sql = sprintf("SELECT User.UserId, Username, Name, Email, UL, bEnabled, nBytesSoft, nBytesHard, nBytes, nDatabases, nDatabasesHard, IF(nBytes>nBytesHard,1,0) AS bOverQuota
FROM User
INNER JOIN UserQuota ON User.UserId = UserQuota.UserId
INNER JOIN UserStat ON User.UserId = UserStat.UserId
$r = fetchRows(DBSelect($sql),'UserId');
$this->info = count($r)?array_shift($r):$r;
$this->dblist = $this->getDBList();
-// $this->pass = base64_decode($this->info['Password']);
}
function refresh() {
unset($this->dblist);
$this->User($this->userId);
/*
- $sql = sprintf("SELECT UserId, Username, Password, Name, Email, UL, bEnabled
+ $sql = sprintf("SELECT UserId, Username, Name, Email, UL, bEnabled
FROM User
WHERE UserId = '%s'",
mysql_escape_string($this->userId));
redirectFull(BASE_URL,null);
}
function redirectFull($target,$secure) {
- redirect2((((isSSL()&&is_null($secure))||$secure==true)?'https://':'http://').$_SERVER['SERVER_NAME'].$target);
+ //redirect2((((isSSL()&&is_null($secure))||$secure==true)?'https://':'http://').$_SERVER['SERVER_NAME'].$target);
+ redirect2((((isSSL()&&is_null($secure))||$secure==true)?'https://scripts-cert.mit.edu':'http://scripts.mit.edu').$target);
}
function redirect2($target) {
header('Location: '.$target);
exit;
}
function flipSSL() {
- return (isSSL()?'http://':'https://').$_SERVER['SERVER_NAME'].$_SERVER['REDIRECT_URL'];
+ //return (isSSL()?'http://':'https://').$_SERVER['SERVER_NAME'].$_SERVER['REDIRECT_URL'];
+ return (isSSL()?'http://scripts.mit.edu':'https://scripts-cert.mit.edu').$_SERVER['REDIRECT_URL'];
}
## USER SCRIPTS