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.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

31 rader
1.2 KiB

  1. <?php
  2. $cnameid = $_GET['toonid']; //need to sanitize this input somehow
  3. include_once 'gw-connect.php';
  4. $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME);
  5. if ($con->connect_errno > 0){
  6. die ('Unable to connect to database [' . $db->connect_errno . ']');
  7. }
  8. $sql = "SELECT * FROM `history` WHERE `charname` = '$cnameid' ORDER BY `historydate` ASC";
  9. if (!$result = $con->query($sql)){
  10. die ('There was an error running the query [' . $con->error . ']');
  11. }
  12. if (mysqli_num_rows($result) > 0) {
  13. while ($row = $result->fetch_array()){
  14. echo 'On ' . $row['historydate'] . ', "' . $row['charname'] . '" got ' . $row['goldrec'] . 'GP and ';
  15. if ($row['itemtype'] == "Rune") {
  16. echo 'a ' . $row['itemtype'] . ' of ' . $row['runetype'] . '!<BR />';
  17. } else {
  18. if (is_null($row['material'])) {
  19. echo 'a ' . $row['itemrarity'] . ' req' . $row['itemreq'] . ' ' . $row['itemattribute'] . ' ' . $row['itemtype'] . ' named something stupid <BR />';
  20. } else {
  21. echo 'a ' . $row['material'] . '!<BR />';
  22. }
  23. } //add another else statement to cover RUNES here. or up there.
  24. }
  25. } else {
  26. echo 'no data to display for that character';
  27. }
  28. ?>
  29. <TITLE>Treasure Dates</TITLE>