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.
 
 
 

32 righe
1.2 KiB

  1. <?php
  2. include_once 'gw-connect.php';
  3. $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME);
  4. $cnameid = mysqli_real_escape_string($con, $_GET['toonid']); //need to sanitize this input somehow
  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'] . ' r' . $row['itemreq'] . ' ' . $row['itemattribute'] . ' ' . $row['itemtype'] . ' named something stupid <BR />';
  20. } else {
  21. echo 'a ' . $row['material'] . '!<BR />';
  22. }
  23. }
  24. echo ' at (insert SQL code here) <BR />';
  25. }
  26. } else {
  27. echo 'no data to display for that character';
  28. }
  29. ?>
  30. <TITLE>Treasure Dates</TITLE>