Ejemplo n.º 1
0
 $db = new SmrMySqlDatabase();
 if (SmrSession::$account_id > 0) {
     $account =& SmrAccount::getAccount(SmrSession::$account_id);
     $disabled = $account->isDisabled();
     if ($disabled !== false) {
         $reason = $disabled['Reason'];
         if ($disabled['Time'] > 0) {
             $reason .= '  Your account is set to reopen on ' . date(DEFAULT_DATE_FULL_LONG, $disabled['Time']) . '.';
         } else {
             $reason .= '  Your account is set to never reopen.  If you believe this is wrong contact an admin.';
         }
     }
     //	SmrSession::destroy();
 } else {
     if (USE_COMPATIBILITY && SmrSession::$old_account_id > 0) {
         foreach (Globals::getCompatibilityDatabases('Game') as $databaseClassName => $gameType) {
             require_once get_file_loc($databaseClassName . '.class.inc');
             $db = new $databaseClassName();
             $db->query('SELECT * FROM account_is_closed JOIN closing_reason USING(reason_id) WHERE account_id = ' . $db->escapeNumber(SmrSession::$old_account_id));
             if ($db->nextRecord()) {
                 $time = $db->getField('expires');
                 $reason = $db->getField('reason');
                 if ($time > 0) {
                     $reason .= '  Your account is set to reopen ' . date(DEFAULT_DATE_FULL_LONG, $time) . '.';
                 } else {
                     $reason .= '  Your account is set to never reopen.  If you believe this is wrong contact an admin.';
                 }
             }
         }
         //	SmrSession::destroy();
     } else {
Ejemplo n.º 2
0
        $container = array();
        $container['game_id'] = $container['GameID'] = $game_id;
        $container['url'] = 'skeleton.php';
        $container['game_name'] = $games['Previous'][$game_id]['Name'];
        $container['body'] = 'games_previous.php';
        //		$games['Previous'][$game_id]['PreviousGameLink'] = SmrSession::getNewHREF($container);
        $container['body'] = 'hall_of_fame_new.php';
        $games['Previous'][$game_id]['PreviousGameHOFLink'] = SmrSession::getNewHREF($container);
        $container['body'] = 'news_read.php';
        $games['Previous'][$game_id]['PreviousGameNewsLink'] = SmrSession::getNewHREF($container);
        $container['body'] = 'games_previous_detail.php';
        //		$games['Previous'][$game_id]['PreviousGameStatsLink'] = SmrSession::getNewHREF($container);
    }
}
if (USE_COMPATIBILITY) {
    foreach (Globals::getCompatibilityDatabases('History') as $databaseClassName => $databaseInfo) {
        require_once get_file_loc($databaseClassName . '.class.inc');
        //Old previous games
        $historyDB = new $databaseClassName();
        $historyDB->query('SELECT start_date, end_date, game_name, speed, game_id
							FROM game ORDER BY game_id DESC');
        if ($historyDB->getNumRows()) {
            while ($historyDB->nextRecord()) {
                $game_id = $historyDB->getField('game_id');
                $index = $databaseClassName . $game_id;
                $games['Previous'][$index]['ID'] = $game_id;
                $games['Previous'][$index]['Name'] = $historyDB->getField('game_name');
                $games['Previous'][$index]['StartDate'] = date(DATE_DATE_SHORT, $historyDB->getField('start_date'));
                $games['Previous'][$index]['EndDate'] = date(DATE_DATE_SHORT, $historyDB->getField('end_date'));
                $games['Previous'][$index]['Speed'] = $historyDB->getField('speed');
                // create a container that will hold next url and additional variables.