Php hiba.

Started by kicsiasdvagyok, 2018-07-04, 18:45:07

Sziasztok!
Szerettem volna csinálni egy admin php-t webre, azonban sehogyan sem tudok rájönni, hogy a create_item.php miért nem müködő képes.
Hiba üzenetet amit kapok A létrehozás sikertelen volt. Helytelen adatokat adott meg.
PHP:
<?PHP
  if($_SESSION['user_admin']>=$adminRights['itemerstellung']) {
?>
<h2>Admin - Item Készitő</h2>
<?PHP
 
    if(isset($_POST['submit']) && $_POST['submit']=="Küldés") {
   
      if(checkInt($_POST['aid'])) {
        $sqlCmd = "SELECT COUNT(*) AS checkIn FROM account.account WHERE id='".$_POST['aid']."' LIMIT 1";
        $getCount = mysql_fetch_object(mysql_query($sqlCmd,$sqlServ));
        if($getCount->checkIn==1) {
         
          if(!empty($_POST['window']) && checkInt($_POST['position']) && !empty($_POST['itemtyp']) && checkInt($_POST['stufe']) && checkInt($_POST['stapelmenge'])) {
            if(!empty($_POST['vnum']) && checkInt($_POST['vnum'])) {
              $avnum=$_POST['vnum'];
            }
            else {
              if($_POST['itemtyp']>=11971 && $_POST['itemtyp']<=11974) {
                $_POST['stufe']=0;
              }
              $avnum=$_POST['itemtyp']+$_POST['stufe'];
            }
            $sqlCmd="INSERT INTO player.item
              (id,owner_id,window,pos,count,vnum,socket0,socket1,socket2,socket3,socket4,socket5,attrtype0,attrvalue0,attrtype1,attrvalue1,attrtype2,attrvalue2,attrtype3,attrvalue3,attrtype4,attrvalue4,attrtype5,attrvalue5,attrtype6,attrvalue6)
              VALUES
              ('".$_POST['aid']."','".$_POST['window']."','".$_POST['position']."','".$_POST['stapelmenge']."','".$avnum."','".$_POST['socket0']."','".$_POST['socket1']."','".$_POST['socket2']."','".$_POST['attrtype0']."','".$_POST['attrvalue0']."','".$_POST['attrtype1']."','".$_POST['attrvalue1']."','".$_POST['attrtype2']."','".$_POST['attrvalue2']."','".$_POST['attrtype3']."','".$_POST['attrvalue3']."','".$_POST['attrtype4']."','".$_POST['attrvalue4']."','".$_POST['attrtype5']."','".$_POST['attrvalue5']."','".$_POST['attrtype6']."','".$_POST['attrvalue6']."')";
            $sqlQry = mysql_query($sqlCmd,$sqlServ) or die(mysql_error());
            if($sqlQry) {
              echo'<p class="meldung">Az elem sikeresen be lett állítva.</p>';
            }
          }
          else { echo'<p class="meldung">A létrehozás sikertelen volt. Helytelen adatokat adott meg.</p>'; }         
        }
        else { echo'<p class="meldung">Nincs meglévő fiókazonosító.</p>'; }
      }
      else { echo'<p class="meldung">Nincs érvényes fiókazonosító.</p>'; }
   
    }
 
 
 
?>
<form action="index.php?s=admin&a=create_item" method="POST">
  <table>
    <tr>
      <th class="topLine">Személy AccountID:</th>
      <td class="tdunkel"><input type="text" name="aid" size="11" value="<?PHP echo $_GET['acc']; ?>" maxlength="11"/></td>
    </tr>
    <tr>
      <th class="topLine">Hely</th>
      <td class="thell">
        <select name="window">
          <option value="SAFEBOX">Raktár</option>
          <option value="MALL">IS-Raktár</option>
          <!-- <option value="INVENTORY">Inventar</option> -->
        </select>
      </td>
    </tr>
    <tr>
      <th class="topLine">Slot</th>
      <td class="tdunkel"><input name="position" type="text" size="20" value="0" maxlength="20"/></td>
    </tr>
    <tr>
      <th class="topLine">Item:</th>
      <td class="thell">
          <?PHP
            listItems();
          ?>
        <select name="stufe">
          <?PHP
            for($i=0;$i<10;$i++) {
           
              echo "<option value=\"$i\">+$i</option>";
           
            }
          ?>
        </select>
        Hanyas
        <input type="text" name="vnum" size="6" maxlength="6"/>
      </td>
    </tr>
    <tr>
      <th class="topLine">Mennyiség (egymásra rakható elemek esetén):</th>
      <td class="tdunkel"><input type="text" name="stapelmenge" size="20" maxlength="20" value="1"/></td>
    </tr>
    <tr>
      <th class="topLine">1 Kő.</th>
      <td class="thell">
        <select name="socket0">
          <?PHP
            foreach($itemSteine AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
      </td>
    </tr>
    <tr>
      <th class="topLine">2 Kő.</th>
      <td class="tdunkel">
        <select name="socket1">
          <?PHP
            foreach($itemSteine AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
      </td>
    </tr>
    <tr>
      <th class="topLine">3 Kő.</th>
      <td class="thell">
        <select name="socket2">
          <?PHP
            foreach($itemSteine AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
      </td>
    </tr>
    <tr>
      <th class="topLine">Bónusz #1:</th>
      <td class="tdunkel">
        <select name="boni0">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv0" size="6" maxlength="6"/>
      </td>
    </tr>
    <tr>
      <th class="topLine">Bónusz #2:</th>
      <td class="thell">
        <select name="boni1">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv1" size="6" maxlength="6"/>
      </td>
    </tr>
    <tr>
      <th class="topLine">Bónusz #3:</th>
      <td class="tdunkel">
        <select name="boni2">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv2" size="6" maxlength="6"/>
      </td>
    </tr>
    <tr>
      <th class="topLine">Bónusz #4:</th>
      <td class="thell">
        <select name="boni3">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv3" size="6" maxlength="6"/>
      </td>
    </tr>
    <tr>
      <th class="topLine">Bónusz #5:</th>
      <td class="tdunkel">
        <select name="boni4">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv4" size="6" maxlength="6"/>
      </td>
    </tr>
    <tr>
      <th class="topLine">Bónusz #6:</th>
      <td class="thell">
        <select name="boni5">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv5" size="6" maxlength="6"/>
      </td>
    </tr>
    <tr>
      <th class="topLine">Bónusz #7:</th>
      <td class="tdunkel">
        <select name="boni6">
          <?PHP
            foreach($itemBoni AS $aKey => $aValue) {
              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>
        <input type="text" name="boniv6" size="6" maxlength="6"/>
      </td>
    </tr>
    <tr>
      <th class="topLine" colspan="2" style="text-align:center;"><input type="submit" value="Küldés" name="submit"/> &bull; <input type="Mégse" value="Mégse"/></th>
    </tr>
  </table>
</form>
<?PHP
  }
  else {
    echo'<p class="meldung">Nincs hozzáférés ehhez a területhez!</p>';
  }
?>



Item .sql
CREATE TABLE `item` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `owner_id` int(11) unsigned NOT NULL DEFAULT '0',
  `window` enum('INVENTORY','EQUIPMENT','SAFEBOX','MALL') NOT NULL DEFAULT 'INVENTORY',
  `pos` smallint(5) unsigned NOT NULL DEFAULT '0',
  `count` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `vnum` int(11) unsigned NOT NULL DEFAULT '0',
  `socket0` int(10) unsigned NOT NULL DEFAULT '0',
  `socket1` int(10) unsigned NOT NULL DEFAULT '0',
  `socket2` int(10) unsigned NOT NULL DEFAULT '0',
  `socket3` int(10) unsigned NOT NULL DEFAULT '0',
  `socket4` int(10) unsigned NOT NULL DEFAULT '0',
  `socket5` int(10) unsigned NOT NULL DEFAULT '0',
  `attrtype0` tinyint(4) NOT NULL DEFAULT '0',
  `attrvalue0` smallint(6) NOT NULL DEFAULT '0',
  `attrtype1` tinyint(4) NOT NULL DEFAULT '0',
  `attrvalue1` smallint(6) NOT NULL DEFAULT '0',
  `attrtype2` tinyint(4) NOT NULL DEFAULT '0',
  `attrvalue2` smallint(6) NOT NULL DEFAULT '0',
  `attrtype3` tinyint(4) NOT NULL DEFAULT '0',
  `attrvalue3` smallint(6) NOT NULL DEFAULT '0',
  `attrtype4` tinyint(4) NOT NULL DEFAULT '0',
  `attrvalue4` smallint(6) NOT NULL DEFAULT '0',
  `attrtype5` tinyint(4) NOT NULL DEFAULT '0',
  `attrvalue5` smallint(6) NOT NULL DEFAULT '0',
  `attrtype6` tinyint(4) NOT NULL DEFAULT '0',
  `attrvalue6` smallint(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `owner_id_idx` (`owner_id`),
  KEY `item_vnum_index` (`vnum`)
) ENGINE=MyISAM AUTO_INCREMENT=2000014680 DEFAULT CHARSET=latin1;


Már minden lehetséges dolgot megpróbáltam módosítani/átírni sikertelenül.
Ha valaki észrevenné a hibát, és leírná nekem, nagyon megköszönném:)