소스 검색

added date form and post data

development
mauirixxx 8 년 전
부모
커밋
2ab95efc85
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. +2
    -1
      gw-insert.php
  2. +1
    -2
      gw-record.php

+ 2
- 1
gw-insert.php 파일 보기

@@ -12,7 +12,8 @@ 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', '$itname');\"<BR />";
$treasdate = mysqli_real_escape_string($con, $_POST['treasuredate']);
echo "SQL code to run: \"INSERT INTO `history` (historydate, charnameid, locationid, goldrec, itemreq, itemtype, itemattribute, itemrarity, itemname) VALUES ('$treasdate', $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
- 2
gw-record.php 파일 보기

@@ -21,10 +21,9 @@ while ($row = $result->fetch_array()){
$locid = $row['treasureid'];
echo '<A HREF="' . $loclink . '">' . $locname . '</A>';
}
echo ' a ';
if ($whatdropped == "1"){
echo '<FORM METHOD="POST" ACTION="gw-insert.php">';
echo 'on <INPUT NAME="treasuredate" TYPE="DATETIME-LOCAL"> ';
echo 'on <INPUT NAME="treasuredate" TYPE="DATE"> a ';
//code for white blue purple etc
$sqlweaprare = "SELECT * FROM `listrarity` ORDER BY `rareid` ASC";
if (!$result = $con->query($sqlweaprare)){


불러오는 중...
취소
저장