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.
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

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