Esempio n. 1
0
$this_seo_keywords = 'megaman,mega man,protoman,proto man,bass,rpg,prototype,dr.light,dr.wily,dr.cossack,battle,browser,pbbg,ipad,firefox,chrome,safari';
$this_seo_description = 'Battle through more than thirty robot masters in classic RPG style with either Dr. Light and Mega Man, Dr. Wily and Bass, or Dr. Cossack and Proto Man! Mega Man RPG World is a browser-based fangame that combines the mechanics of both the Pokémon and Mega Man series of video games into one strange and wonderful little time waster.';
// Define the default Open Graph tag variables
$this_graph_data = array('title' => 'Mega Man RPG World', 'type' => 'website', 'url' => $this_current_url, 'image' => MMRPG_CONFIG_ROOTURL . 'images/assets/mmrpg-prototype-logo.png?' . MMRPG_CONFIG_CACHE_DATE, 'site_name' => 'Mega Man RPG World', 'description' => $this_seo_description);
// If a reset was intentionally called
if (!empty($_GET['reset']) || rpg_game::is_demo() && !empty($_SESSION['GAME']['CACHE_DATE']) && $_SESSION['GAME']['CACHE_DATE'] != MMRPG_CONFIG_CACHE_DATE) {
    // Reset the game session
    rpg_game::reset_session();
} elseif (rpg_game::is_demo() && !empty($_SESSION['GAME']['CACHE_DATE']) && $_SESSION['GAME']['CACHE_DATE'] != MMRPG_CONFIG_CACHE_DATE) {
    // Reset the game session
    rpg_game::reset_session();
} elseif (!empty($_GET['reload']) || !isset($_SESSION['GAME']['CACHE_DATE']) || rpg_game::is_demo() && $_SESSION['GAME']['CACHE_DATE'] != MMRPG_CONFIG_CACHE_DATE) {
    // Ensure there is a save file to load
    if (rpg_user::is_member()) {
        // Load the save file into memory and overwrite the session
        rpg_game::load_session();
    } else {
        // Reset the game session
        rpg_game::reset_session();
    }
    // Update the cache date to reflect the reload
    $_SESSION['GAME']['CACHE_DATE'] = MMRPG_CONFIG_CACHE_DATE;
    // Save the updated file back to the system
    rpg_game::save_session();
}
// Automatically empty all temporary battle variables
$_SESSION['BATTLES'] = array();
$_SESSION['FIELDS'] = array();
$_SESSION['PLAYERS'] = array();
$_SESSION['ROBOTS'] = array();
$_SESSION['ABILITIES'] = array();
Esempio n. 2
0
             break;
         } elseif ($_REQUEST['dateofbirth'] > $min_dateofbirth && !$bypass_dateofbirth) {
             $html_form_messages .= '<span class="error">(!) You must be at least 13 years of age to use this website or have <a href="images/misc/MMRPG-Prototype_COPPA-Compliance.pdf" target="_blank">a parent or guardian\'s permission</a>.</span>';
             $html_form_verified = false;
             $html_form_show_coppa = true;
             break;
         } elseif ($_REQUEST['dateofbirth'] > $min_dateofbirth && $bypass_dateofbirth) {
             $html_form_messages .= '<span class="success">(!) You are under 13 years of age but have obtained parental consent.</span>';
             $html_form_verified = false;
             $html_form_show_coppa = true;
         }
         // The password was correct! Update the session with these credentials
         $_SESSION['GAME']['DEMO'] = 0;
         $_SESSION['GAME']['USER'] = $this_user;
         // Load the save file into memory and overwrite the session
         rpg_game::load_session($temp_database_user['user_id']);
         // If this is an old, unused save file, reset the game automatically
         if (empty($_SESSION['GAME']['counters']['battle_points']) || empty($_SESSION['GAME']['values']['battle_rewards'])) {
             rpg_game::reset_session();
         }
         // Update the file with the coppa approval flag and birthdate
         $_SESSION['GAME']['USER']['dateofbirth'] = strtotime($_REQUEST['dateofbirth']);
         $_SESSION['GAME']['USER']['approved'] = 1;
         rpg_game::save_session($temp_database_user['user_id']);
         // Update the form markup, then break from the loop
         $file_has_updated = true;
         break;
     }
 }
 // Break from the POST loop
 break;