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.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

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