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个字符
 
 
 

44 行
1.6 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. if ($con->connect_errno > 0){
  8. die ('Unable to connect to database [' . $db->connect_errno . ']');
  9. }
  10. $sqlweapattr = "SELECT * FROM `listattribute` ORDER BY `weapattrid` ASC";
  11. if (!$result = $con->query($sqlweapattr)){
  12. die ('There was an error running the query [' . $con->error . ']');
  13. }
  14. echo ' At <insert location SQL code here> a/an ';
  15. $sqlweapreq = "SELECT * FROM `listreq` ORDER BY `req` ASC";
  16. if (!$result = $con->query($sqlweapreq)){
  17. die ('There was an error running the query [' . $con->error . ']');
  18. }
  19. echo '<SELECT NAME="requirement">';
  20. while ($row = $result->fetch_array()){
  21. $reqid = $row['req'];
  22. echo '<OPTION VALUE="' . $reqid . '">' . $reqid . '</OPTION>';
  23. }
  24. echo '</SELECT>';
  25. $sqlweaprare = "SELECT * FROM `listrarity` ORDER BY `rareid` ASC";
  26. if (!$result = $con->query($sqlweaprare)){
  27. die ('There was an error running the query [' . $con->error . ']');
  28. }
  29. echo '<SELECT NAME="rare">';
  30. while ($row = $result->fetch_array()){
  31. $rareid = $row['rareid'];
  32. $rarity = $row['rarity'];
  33. echo '<OPTION VALUE="' . $rareid . '">' . $rarity . '</OPTION>';
  34. }
  35. echo '</SELECT>';
  36. echo '<SELECT NAME="attribute">';
  37. while ($row = $result->fetch_array()){
  38. $attrid = $row['weapattrid'];
  39. $weapattr = $row['weaponattribute'];
  40. echo '<OPTION VALUE="' . $attrid . '">' . $weapattr . '</OPTION>';
  41. }
  42. echo '</SELECT>';
  43. echo '<weapon/mat/rune code here>';
  44. ?>