| @@ -12,7 +12,7 @@ if ($droptype == 1){ | |||||
| $attrib = mysqli_real_escape_string($con, $_POST['attribute']); | $attrib = mysqli_real_escape_string($con, $_POST['attribute']); | ||||
| $weap = mysqli_real_escape_string($con, $_POST['weapon']); | $weap = mysqli_real_escape_string($con, $_POST['weapon']); | ||||
| $itname = mysqli_real_escape_string($con, $_POST['itemname']); | $itname = mysqli_real_escape_string($con, $_POST['itemname']); | ||||
| 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 />"; | |||||
| 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', '$itname');\"<BR />"; | |||||
| //echo '<BR />Well something broke somewhere!<BR />'; | //echo '<BR />Well something broke somewhere!<BR />'; | ||||
| } else if ($droptype == 2){ | } else if ($droptype == 2){ | ||||
| echo 'drop was a rare material!<BR />'; | echo 'drop was a rare material!<BR />'; | ||||
| @@ -16,7 +16,7 @@ if (!$result = $con->query($sql)){ | |||||
| if (mysqli_num_rows($result) > 0) { | if (mysqli_num_rows($result) > 0) { | ||||
| while ($row = $result->fetch_array()){ | while ($row = $result->fetch_array()){ | ||||
| echo 'On ' . $row['historydate'] . ', "' . $row['charname'] . '" got ' . $row['goldrec'] . 'GP and '; | echo 'On ' . $row['historydate'] . ', "' . $row['charname'] . '" got ' . $row['goldrec'] . 'GP and '; | ||||
| if ($row['itemtype'] == "Rune") { | |||||
| if ($row['itemtype'] == 16) { //this would be a rune | |||||
| echo 'a ' . $row['itemtype'] . ' of ' . $row['runetype']; | echo 'a ' . $row['itemtype'] . ' of ' . $row['runetype']; | ||||
| } else { | } else { | ||||
| if (is_null($row['material'])) { | if (is_null($row['material'])) { | ||||
| @@ -3,7 +3,7 @@ | |||||
| include_once 'gw-connect.php'; | include_once 'gw-connect.php'; | ||||
| $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME); | $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME); | ||||
| #$toonid = mysqli_real_escape_string($con, $_POST['playerid']); //enable this after character selection is working | #$toonid = mysqli_real_escape_string($con, $_POST['playerid']); //enable this after character selection is working | ||||
| $toonid = 'Chrissi Chan'; //delete this line after character selection is finished/working | |||||
| $toonid = '3'; //delete this line after character selection is finished/working | |||||
| #$location = mysqli_real_escape_string($con, $_POST['locationid']); //enable this after location selection is working | #$location = mysqli_real_escape_string($con, $_POST['locationid']); //enable this after location selection is working | ||||
| $location = 4; //delete this line after location selection is finished/working | $location = 4; //delete this line after location selection is finished/working | ||||
| $whatdropped = mysqli_real_escape_string($con, $_POST['gwdrop']); | $whatdropped = mysqli_real_escape_string($con, $_POST['gwdrop']); | ||||
| @@ -21,6 +21,7 @@ while ($row = $result->fetch_array()){ | |||||
| $locid = $row['treasureid']; | $locid = $row['treasureid']; | ||||
| echo '<A HREF="' . $loclink . '">' . $locname . '</A>'; | echo '<A HREF="' . $loclink . '">' . $locname . '</A>'; | ||||
| } | } | ||||
| echo 'on |insert date code here| <INPUT NAME="treasuredate" TYPE="DATETIME-LOCAL"> '; | |||||
| echo ' a '; | echo ' a '; | ||||
| if ($whatdropped == "1"){ | if ($whatdropped == "1"){ | ||||
| echo '<FORM METHOD="POST" ACTION="gw-insert.php">'; | echo '<FORM METHOD="POST" ACTION="gw-insert.php">'; | ||||