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个字符
 
 
 

23 行
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>