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 символов.

27 строки
1.0 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 (is_null($row['material'])) {
  16. echo 'a ' . $row['itemrarity'] . ' req' . $row['itemreq'] . ' ' . $row['itemattribute'] . ' ' . $row['itemtype'] . ' named something stupid <BR />';
  17. } else {
  18. echo 'a ' . $row['material'] . '!<BR />';
  19. } //add another else statement to cover RUNES here
  20. }
  21. } else {
  22. echo 'no data to display for that character';
  23. }
  24. ?>
  25. <TITLE>Treasure Dates</TITLE>