Procházet zdrojové kódy

forgot to enter the date we grabbed treasure

development
mauirixxx před 8 roky
rodič
revize
496481c33a
3 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. +1
    -1
      gw-insert.php
  2. +1
    -1
      gw-pull.php
  3. +2
    -1
      gw-record.php

+ 1
- 1
gw-insert.php Zobrazit soubor

@@ -12,7 +12,7 @@ if ($droptype == 1){
$attrib = mysqli_real_escape_string($con, $_POST['attribute']);
$weap = mysqli_real_escape_string($con, $_POST['weapon']);
$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 />';
} else if ($droptype == 2){
echo 'drop was a rare material!<BR />';


+ 1
- 1
gw-pull.php Zobrazit soubor

@@ -16,7 +16,7 @@ if (!$result = $con->query($sql)){
if (mysqli_num_rows($result) > 0) {
while ($row = $result->fetch_array()){
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'];
} else {
if (is_null($row['material'])) {


+ 2
- 1
gw-record.php Zobrazit soubor

@@ -3,7 +3,7 @@
include_once 'gw-connect.php';
$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 = '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 = 4; //delete this line after location selection is finished/working
$whatdropped = mysqli_real_escape_string($con, $_POST['gwdrop']);
@@ -21,6 +21,7 @@ while ($row = $result->fetch_array()){
$locid = $row['treasureid'];
echo '<A HREF="' . $loclink . '">' . $locname . '</A>';
}
echo 'on |insert date code here| <INPUT NAME="treasuredate" TYPE="DATETIME-LOCAL"> ';
echo ' a ';
if ($whatdropped == "1"){
echo '<FORM METHOD="POST" ACTION="gw-insert.php">';


Načítá se…
Zrušit
Uložit