} // Require the database top include file if ($this_class == 'mechas' || $this_class == 'fields') { define('DATA_DATABASE_SHOW_MECHAS', true); } if ($this_class == 'bosses' || $this_class == 'fields') { define('DATA_DATABASE_SHOW_BOSSES', true); } require_once '../data/database.php'; // Proceed based on the type of class the request is switch ($this_class) { // If this was a player request case 'players': $key_counter = array_search($this_token, array_keys($mmrpg_database_players)); $temp_player_info = $mmrpg_database_players[$this_token]; $temp_player_markup = rpg_player::print_database_markup($temp_player_info, array('show_key' => $key_counter)); $temp_player_markup = preg_replace('/\\s+/', ' ', $temp_player_markup); echo 'success : ' . $temp_player_markup; break; // If this was a robot request // If this was a robot request case 'robots': $key_counter = array_search($this_token, array_keys($mmrpg_database_robots)); $temp_robot_info = $mmrpg_database_robots[$this_token]; $temp_robot_markup = rpg_robot::print_database_markup($temp_robot_info, array('show_key' => $key_counter)); $temp_robot_markup = preg_replace('/\\s+/', ' ', $temp_robot_markup); echo 'success : ' . $temp_robot_markup; break; // If this was a mecha request // If this was a mecha request case 'mechas':
Player Listing <?php echo isset($this_current_filter) ? '<span class="count" style="float: right;">( ' . $this_current_filter_name . ' Type )</span>' : ''; ?> </h2> <?php } // If we're in the index view, loop through and display all players if (empty($this_current_token)) { // Loop through the player database and display the appropriate data $key_counter = 0; foreach ($mmrpg_database_players as $player_key => $player_info) { // If a type filter has been applied to the player page if (isset($this_current_filter) && $this_current_filter == 'none' && $player_info['player_type'] != '') { $key_counter++; continue; } elseif (isset($this_current_filter) && $this_current_filter != 'none' && $player_info['player_type'] != $this_current_filter) { $key_counter++; continue; } // Collect information about this player $this_player_image = !empty($player_info['player_image']) ? $player_info['player_image'] : $player_info['player_token']; if ($this_player_image == 'player') { $this_seo_robots = 'noindex'; } // Collect the markup for this player and print it to the browser $temp_player_markup = rpg_player::print_database_markup($player_info, array('layout_style' => 'website_compact', 'show_key' => $key_counter)); echo $temp_player_markup; $key_counter++; } }