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.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

56 行
2.1 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 = 'Issnur Isles';
  9. if ($con->connect_errno > 0){
  10. die ('Unable to connect to database [' . $db->connect_errno . ']');
  11. }
  12. /*
  13. echo 'At ';
  14. echo $location //code for selecting location from DB via locationid
  15. echo ' a/an ';
  16. */
  17. //code for weapon attribute requirment
  18. $sqlweapreq = "SELECT * FROM `listreq` ORDER BY `req` ASC";
  19. if (!$result = $con->query($sqlweapreq)){
  20. die ('There was an error running the query [' . $con->error . ']');
  21. }
  22. echo '<SELECT NAME="requirement">';
  23. while ($row = $result->fetch_array()){
  24. $reqid = $row['req'];
  25. echo '<OPTION VALUE="' . $reqid . '">' . $reqid . '</OPTION>\n';
  26. }
  27. echo '</SELECT>';
  28. //code for white blue purple etc
  29. $sqlweaprare = "SELECT * FROM `listrarity` ORDER BY `rareid` ASC";
  30. if (!$result = $con->query($sqlweaprare)){
  31. die ('There was an error running the query [' . $con->error . ']');
  32. }
  33. echo '<SELECT NAME="rare">';
  34. while ($row = $result->fetch_array()){
  35. $rareid = $row['rareid'];
  36. $rarity = $row['rarity'];
  37. echo '<OPTION VALUE="' . $rareid . '">' . $rarity . '</OPTION>\n';
  38. }
  39. echo '</SELECT>';
  40. //code for what attribute the weapon is (command, axe mastery, energy storage, etc
  41. $sqlweapattr = "SELECT * FROM `listattribute` ORDER BY `weapattrid` ASC";
  42. if (!$result = $con->query($sqlweapattr)){
  43. die ('There was an error running the query [' . $con->error . ']');
  44. }
  45. echo '<SELECT NAME="attribute">';
  46. while ($row = $result->fetch_array()){
  47. $attrid = $row['weapattrid'];
  48. $weapattr = $row['weaponattribute'];
  49. echo '<OPTION VALUE="' . $attrid . '">' . $weapattr . '</OPTION>\n';
  50. //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.
  51. }
  52. echo '</SELECT>';
  53. echo ' |weapon/mat/rune code here|';
  54. ?>