Just a web script to help track when, where, and what you got from the free treasures scattered about Nightfall in the game Guild Wars.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

65 líneas
2.4 KiB

  1. <TITLE>What Dropped?</TITLE>
  2. <?php
  3. include_once 'gw-connect.php';
  4. $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME);
  5. #$toonid = mysqli_real_escape_string($con, $_POST['playerid']); //enable this after character selection is working
  6. $toonid = 'Chrissi Chan';
  7. #$location = mysqli_real_escape_string($con, $_POST['locationid']); //enable this after location selection is working
  8. $location = 4;
  9. if ($con->connect_errno > 0){
  10. die ('Unable to connect to database [' . $db->connect_errno . ']');
  11. }
  12. echo 'At ';
  13. $sqlmaplocation = "SELECT `location`, `wikilink` FROM `treasurelocation` WHERE `treasureid` = $location";
  14. if (!$result = $con->query($sqlmaplocation)){
  15. die ('There was an error running the query [' . $con->error . ']');
  16. }
  17. while ($row = $result->fetch_array()){
  18. $locname = $row['location'];
  19. $loclink = $row['wikilink'];
  20. echo '<A HREF="' . $loclink . '">' . $locname . '</A>\n';
  21. }
  22. echo ' a/an ';
  23. //code for weapon attribute requirment
  24. $sqlweapreq = "SELECT * FROM `listreq` ORDER BY `req` ASC";
  25. if (!$result = $con->query($sqlweapreq)){
  26. die ('There was an error running the query [' . $con->error . ']');
  27. }
  28. echo 'r<SELECT NAME="requirement">';
  29. while ($row = $result->fetch_array()){
  30. $reqid = $row['req'];
  31. echo '<OPTION VALUE="' . $reqid . '">' . $reqid . '</OPTION>\n';
  32. }
  33. echo '</SELECT>';
  34. //code for white blue purple etc
  35. $sqlweaprare = "SELECT * FROM `listrarity` ORDER BY `rareid` ASC";
  36. if (!$result = $con->query($sqlweaprare)){
  37. die ('There was an error running the query [' . $con->error . ']');
  38. }
  39. echo '<SELECT NAME="rare">';
  40. while ($row = $result->fetch_array()){
  41. $rareid = $row['rareid'];
  42. $rarity = $row['rarity'];
  43. echo '<OPTION VALUE="' . $rareid . '">' . $rarity . '</OPTION>\n';
  44. }
  45. echo '</SELECT>';
  46. //code for what attribute the weapon is (command, axe mastery, energy storage, etc
  47. $sqlweapattr = "SELECT * FROM `listattribute` ORDER BY `weapattrid` ASC";
  48. if (!$result = $con->query($sqlweapattr)){
  49. die ('There was an error running the query [' . $con->error . ']');
  50. }
  51. echo '<SELECT NAME="attribute">';
  52. while ($row = $result->fetch_array()){
  53. $attrid = $row['weapattrid'];
  54. $weapattr = $row['weaponattribute'];
  55. echo '<OPTION VALUE="' . $attrid . '">' . $weapattr . '</OPTION>\n';
  56. //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.
  57. }
  58. echo '</SELECT>';
  59. echo ' |weapon/mat/rune code here|';
  60. ?>