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.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

25 lignes
1.5 KiB

  1. <?php
  2. include_once 'gw-connect.php';
  3. $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME);
  4. #non-section specific POST data here
  5. $gold = mysqli_real_escape_string($con, $_POST['droppedgold']); //how much gold dropped
  6. $droptype = mysqli_real_escape_string($con, $_POST['droptype']); //this dictates if the drop was a weapon/rune/material
  7. $locid = mysqli_real_escape_string($con, $_POST['location']); //this is `treasurelocation`.`treasureid` in the database
  8. $toonid = mysqli_real_escape_string($con, $_POST['chartoon']); //this is the id of the character doing the hunting
  9. if ($droptype == 1){
  10. $rarity = mysqli_real_escape_string($con, $_POST['rare']);
  11. $req = mysqli_real_escape_string($con, $_POST['requirement']);
  12. $attrib = mysqli_real_escape_string($con, $_POST['attribute']);
  13. $weap = mysqli_real_escape_string($con, $_POST['weapon']);
  14. $itname = mysqli_real_escape_string($con, $_POST['itemname']);
  15. echo "SQL code to run: \"INSERT INTO `history` (historydate, charnameid, locationid, goldrec, itemreq, itemtype, itemattribute, itemrarity, itemname) VALUES ('variable-date-of-treasure', $toonid, $locid, $gold, $req, $weap , 'variable-attribute-of-weapon', 'variable-rarity-of-weapon', 'variable-name-of-weapon');\"<BR />";
  16. //echo '<BR />Well something broke somewhere!<BR />';
  17. } else if ($droptype == 2){
  18. echo 'drop was a rare material!<BR />';
  19. } else if ($droptype == 3){
  20. echo 'drop was a rune!<BR />';
  21. } else {
  22. echo 'No data was sent!<BR />';
  23. }
  24. echo '<BR />Return to <A HREF="gw-record.php">data recording</A> page';
  25. ?>