Log In
You must log in to continue.
Please correct the following:
=$oTpl->_($sErr)?>If you forgot your password, you may reset it here.
Don't have a username yet? Register here.
After downloading the game, be sure to log out of the site.
isLoggedIn(); if (!$bIsLoggedIn) { // Config stuff $iMaxPasswordLength = 10; $aRequiredFields = array( 'username' => 'Username', 'password' => 'Password' ); require_once('/afs/ece.cmu.edu/web/ece/htdocs/tools/msc-game/encryption-keys.php'); $oErr = new ErrorCollector(); if (!empty($_POST['submit'])) { // Scrub input foreach ($_POST as $sKey => $sVal) { $_POST[$sKey] = getPost($sKey); } // Validate input // Check for missing inputs foreach ($aRequiredFields as $sRequiredField => $sRequiredFieldDescription) { if (empty($_POST[$sRequiredField])) { $oErr->add('"' . $sRequiredFieldDescription . '" must be provided.', true); } } if (!$oErr->hasError()) { // Check correctness of password $sSql = 'SELECT user_id FROM gm_user WHERE user_username = ? AND user_password = AES_ENCRYPT(?, ?)'; $iUserId = DBConn::getValue($sSql, 'user_id', array($_POST['username'], $_POST['password'], AES_ENCRYPTION_KEY_PASSWORD)); if (empty($iUserId)) { $oErr->add('Incorrect username or password.', true); } else { $oLogin->login($_POST['username']); $oLogin->doRedirect('/download/'); } } } $sErr = $oErr->toString(); } else if ($_GET['o'] == 1) { $oLogin->logout(); // doRedirect($oLogin->getSiteLoginPage()); doRedirect('/gettingStarted.html'); } else { doRedirect('/download/'); } $oTpl = new Savant2_Common(); ?>
You must log in to continue.
Please correct the following:
=$oTpl->_($sErr)?>If you forgot your password, you may reset it here.
Don't have a username yet? Register here.
After downloading the game, be sure to log out of the site.