|
|
|
@@ -5,9 +5,13 @@ $con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME); |
|
|
|
$gold = mysqli_real_escape_string($con, $_POST['droppedgold']); //how much gold dropped |
|
|
|
$droptype = mysqli_real_escape_string($con, $_POST['droptype']); //this dictates if the drop was a weapon/rune/material |
|
|
|
$locid = mysqli_real_escape_string($con, $_POST['location']); //this is `treasurelocation`.`treasureid` in the database |
|
|
|
$toonid = mysqli_real_escape_string($con, $_POST['chartoon']; //this is the id of the character doing the hunting |
|
|
|
if ($droptype == 1){ |
|
|
|
$rarity = mysqli_real_escape_string($con, $_POST['rare']); |
|
|
|
echo 'a '. $rarity . ' drop was a weapon!<BR />'; |
|
|
|
$req = mysqli_real_escape_string($con, $_POST['requirement']); |
|
|
|
$attrib = mysqli_real_escape_string($con, $_POST['attribute']; |
|
|
|
$weap = mysqli_real_escape_string($con, $_POST['weapon']); |
|
|
|
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');"'; |
|
|
|
} else if ($droptype == 2){ |
|
|
|
echo 'drop was a rare material!<BR />'; |
|
|
|
} else if ($droptype == 3){ |
|
|
|
|