print print_bestiary_table_head();
    print print_enemy_materials($search_result);
    print "\n                                    </table>";
    if (!empty($augment_search_result[0])) {
        print "<br/><br/><center><h3>Augment Results for " . $material_name . "</h3></center>\n                                    <br/>\n                                    <table class=\"resultsTable\">\n                                        <tr>\n                                            <td>\n                                                <b>Augment Name</b>\n                                            <td/>\n                                            <td>\n                                                <b>Effect</b>\n                                            <td/>\n                                            <td>\n                                                <b>Material 1</b>\n                                            <td/>\n                                            <td>\n                                                <b>Material 2</b>\n                                        <td/>\n                                            <td>\n                                                <b>Material 3</b>\n                                            <td/>\n                                            <td>\n                                                <b>Precious Resource</b>\n                                            <td/>\n                                        </tr>";
        print print_augments($augment_search_result);
        print "\n                                    </table>";
    }
    if (!empty($ground_gear_search_result[0])) {
        print "<br/><br/><center><h3>Ground Gear Results for " . $material_name . "</h3></center>\n                                    <br/>\n                                    <table class=\"resultsTable\">\n                                        <tr>\n                                            <td>\n                                                <b>Gear Name</b>\n                                            <td/>\n                                            <td>\n                                                <b>Gear Slot</b>\n                                            <td/>\n                                            <td>\n                                                <b>Maker</b>\n                                            <td/>\n                                            <td>\n                                                <b>Level</b>\n                                            <td/>\n                                            <td>\n                                                <b>Defense</b>\n                                            <td/>\n                                            <td>\n                                                <b>Battle Traits</b>\n                                            <td/>\n                                        </tr>";
        print print_ground_gear($ground_gear_search_result);
        print "\n                                    </table>";
    }
    if (!empty($superweapons_search_result[0])) {
        print "<br/><br/><center><h3>Superweapon Results for " . $material_name . "</h3></center>\n                                    <br/>\n                                    <table class=\"resultsTable\">\n                                        <tr>\n                                            <td>\n                                                <b>Weapon Name</b>\n                                            <td/>\n                                            <td>\n                                                <b>Slot</b>\n                                            <td/>\n                                            <td>\n                                                <b>Level</b>\n                                            <td/>\n                                            <td>\n                                                <b>Force</b>\n                                            <td/>\n                                            <td>\n                                                <b>Attribute</b>\n                                            <td/>\n                                            <td>\n                                                <b>Battle Traits</b>\n                                            <td/>\n                                        </tr>";
        print print_superweapons($superweapons_search_result);
        print "\n                                    </table>";
    }
    if (!empty($skell_frame_search_result[0])) {
        print "<br/><br/><center><h3>Skell Frame Results for " . $material_name . "</h3></center>\n                                    <br/>\n                                    <table class=\"resultsTable\">\n                                        <tr>\n                                            <td>\n                                                <b>Frame Name</b>\n                                            <td/>\n                                            <td>\n                                                <b>Frame Type</b>\n                                            <td/>\n                                        </tr>";
        print print_skell_frame($skell_frame_search_result);
        print "\n                                    </table>";
    }
}
?>
                                
                            </p>
                        </div>

                    </p>
                                    <li>Miranium costs for all superweapons are: lv 30: 10000, lv 50: 20000, lv 60: 30000.</li>
                                    <br/>
                                    <li><a href ="https://docs.google.com/spreadsheets/d/1g0YR4M8RAHiRhCbAvV4tjXXHLEhRMrARzZMYAUGmyZ4/pub#" target="_blank">Full spreadsheet that was used</a>, created by Gessenkou. I made many additions/corrections for this site's version, but there are still errors and missing entries in the database. If you encounter an enemy with a jumbled name, please email me with the name of the armor, material the enemy drops, and the name of the enemy (if you can find it) at birdonwheels5 4t gm41l d0t com.</li>
                                    <li>This webpage was created by birdonwheels5.</li>
                                    <li><a href="https://github.com/birdonwheels5/xenoblade-x-site/" target="_blank">Source code</a></li>
                                </ul>
								
							</p>
						</div>
                        
                        <?php 
if ($_SERVER["REQUEST_METHOD"] == "GET") {
    if (empty($_GET["superweapon"])) {
        print "<div class=\"box\">\n";
        print "\n                                    <center><h3>Skell Superweapon Index</h3>\n                                        <br/>\n                                        <br/>\n                                        <table class=\"resultsTable\">\n                                            <tr>\n                                                <td>\n                                                    <b>Weapon Name</b>\n                                                <td/>\n                                                <td>\n                                                    <b>Slot</b>\n                                                <td/>\n                                                <td>\n                                                    <b>Lv</b>\n                                                <td/>\n                                                <td>\n                                                    <b>Force</b>\n                                                <td/>\n                                                <td>\n                                                    <b>Attribute</b>\n                                                <td/>\n                                                <td>\n                                                    <b>Battle Traits</b>\n                                                <td/>\n                                            </tr>";
        print print_superweapons($superweapons_raw_data);
        print "</center></div>\n";
        die;
    }
    if (strcasecmp($superweapons_raw_data[0][$search_result], $_GET["superweapon"]) != 0) {
        print "<div class=\"box\">";
        print "The requested superweapon could not be found in the database. <br/><br/>";
        // Explode the search term by spaces
        $exploded_superweapons = explode(" ", $_GET["superweapon"]);
        // Run a linear search with the first word of the search term
        $linear_results = linear_augment_search($superweapons_raw_data, $exploded_superweapons[0]);
        $linear_results_count = count($linear_results);
        if ($linear_results_count != 0) {
            print "<br/><br/>";
            print "Did you mean...<br/><br/>";
            print "<ul>";