diff --git a/gw-record.php b/gw-record.php index cd8d7b0..e735331 100644 --- a/gw-record.php +++ b/gw-record.php @@ -10,7 +10,6 @@ $whatdropped = mysqli_real_escape_string($con, $_GET['gwdrop']); if ($con->connect_errno > 0){ die ('Unable to connect to database [' . $db->connect_errno . ']'); } - echo 'At '; $sqlmaplocation = "SELECT `location`, `wikilink` FROM `treasurelocation` WHERE `treasureid` = $location"; if (!$result = $con->query($sqlmaplocation)){ @@ -21,10 +20,7 @@ while ($row = $result->fetch_array()){ $loclink = $row['wikilink']; echo '' . $locname . ''; } - echo ' a '; - -#experimental stuff if ($whatdropped == "1"){ //code for white blue purple etc $sqlweaprare = "SELECT * FROM `listrarity` ORDER BY `rareid` ASC"; @@ -38,7 +34,6 @@ if ($whatdropped == "1"){ echo ''; } echo ', '; - //code for weapon attribute requirment $sqlweapreq = "SELECT * FROM `listreq` ORDER BY `req` ASC"; if (!$result = $con->query($sqlweapreq)){ @@ -50,7 +45,6 @@ if ($whatdropped == "1"){ echo ''; } echo ''; - //code for what attribute the weapon is (command, axe mastery, energy storage, etc $sqlweapattr = "SELECT * FROM `listattribute` ORDER BY `weapattrid` ASC"; if (!$result = $con->query($sqlweapattr)){ @@ -64,7 +58,6 @@ if ($whatdropped == "1"){ //need to add a nested while loop, to preselect the weapon with the attribute, or somehow java it? An r9 Axe of Energy Storage combo doesn't exist. } echo ''; - //code for what the weapon is - staff, dagger, scythe, wand, sword, etc $sqlweaptype = "SELECT * FROM `listtype` ORDER BY `weaponid` ASC"; if (!$result = $con->query($sqlweaptype)){ @@ -75,11 +68,21 @@ if ($whatdropped == "1"){ $typeid = $row['weaponid']; $weapon = $row['weapontype']; echo ''; - //need to figure out how to display the options for weapon, material, or rune } echo ''; } else if ($whatdropped == "2"){ - echo 'run material code'; + //code for what rare material dropped + $sqlraremat = "SELECT * FROM `materials` ORDER BY `materialid` ASC"; + if (!$result = $con->query($sqlraremat)){ + die ('There was an error running the query [' . $con->error . ']'); + } + echo ' '; } else if ($whatdropped == "3"){ echo 'run rune code'; } else { @@ -90,10 +93,7 @@ if ($whatdropped == "1"){ echo ''; echo ''; } - - echo ' and |code for gold dropped here| gold pieces'; echo '

'; -echo 'End result: a Gold r9 Swordsmanship Sword
'; //need to arrange code blocks around to achieve this echo 'Reload the page with no GET data? RELOAD'; ?> \ No newline at end of file