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.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 regels
949 B

  1. <?php
  2. $cname = "Chrissi Chan"; //need to make this a POST or GET variable
  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` = '$cname' ORDER BY `historydate` ASC";
  9. if (!$result = $con->query($sql)){
  10. die ('There was an error running the query [' . $con->error . ']');
  11. }
  12. while ($row = $result->fetch_array()){
  13. echo 'On ' . $row['historydate'] . ', "' . $row['charname'] . '" got ' . $row['goldrec'] . 'GP and ';
  14. if (is_null($row['material'])) {
  15. echo 'a ' . $row['itemrarity'] . ' req' . $row['itemreq'] . ' ' . $row['itemattribute'] . ' ' . $row['itemtype'] . ' named something stupid <BR />';
  16. } else {
  17. echo 'a ' . $row['material'] . '!<BR />';
  18. } //add another else statement to cover RUNES here
  19. }
  20. ?>
  21. <TITLE>Treasure Dates</TITLE>