private function WriteLog() { global $LD_Items; $ODBC = new LD_ODBC(); if ($this->buyKit == false) { $ODBC->query("UPDATE Items SET solds=solds+1 WHERE Number='" . $this->ProductID . "'"); } $ODBC->query("INSERT INTO LogSolds (`login`, `itemNumber`, `serial`, `level`, `option`, `luck`, `skill`, `ancient`, `excop1`, `excop2`, `excop3`, `excop4`, `excop5`, `excop6`, `jh`, `refine`, `socket1`, `socket2`, `socket3`, `socket4`, `socket5`, `socket1_int`, `socket2_int`, `socket3_int`, `socket4_int`, `socket5_int`, `price`, `data`, `recovery`, `type`) VALUES \n ('" . $_SESSION['Login'] . "','" . $this->ProductID . "','" . $LD_Items->Item_Serial . "','" . $this->Item_Level . "','" . $this->Item_Option . "','" . $this->Item_Luck . "','" . $this->Item_Skill . "','" . $this->Item_Ancient . "','" . $this->Item_OpExc_1 . "','" . $this->Item_OpExc_2 . "','" . $this->Item_OpExc_3 . "','" . $this->Item_OpExc_4 . "','" . $this->Item_OpExc_5 . "','" . $this->Item_OpExc_6 . "','" . $this->Item_JH . "','" . $this->Item_Refine . "','" . $this->Item_Socket_Slot_1 . "','" . $this->Item_Socket_Slot_2 . "','" . $this->Item_Socket_Slot_3 . "','" . $this->Item_Socket_Slot_4 . "','" . $this->Item_Socket_Slot_5 . "','" . $this->Item_Socket_Slot_1_Option . "','" . $this->Item_Socket_Slot_2_Option . "','" . $this->Item_Socket_Slot_3_Option . "','" . $this->Item_Socket_Slot_4_Option . "','" . $this->Item_Socket_Slot_5_Option . "','" . (int) $this->End_Price . "','" . time() . "','0','" . ($this->buyKit == false ? "common" : "kit") . "')"); if ($this->buyKit == false) { print "<ul><li>Gravando Log.</li></ul>"; } }
public function CutHexSlotsVault() { $ODBC = new LD_ODBC(); for ($i = 0; $i < 120; $i++) { if ($this->Vault_Slots[$i]['Hex'] != str_pad("", DIVISOR, "F") && $this->Vault_Slots[$i]['Hex'] != str_pad("", DIVISOR, "0") && $this->Vault_Slots[$i]['Hex'] != NULL) { if (SYSTEM_ITEMS == "NEW") { $Ancient = hexdec(substr($this->Vault_Slots[$i]['Hex'], 17, 1)); $Categorie = hexdec(substr($this->Vault_Slots[$i]['Hex'], 18, 1)); $Index = hexdec(substr($this->Vault_Slots[$i]['Hex'], 0, 2)); $FindItemDetailsQuery = $ODBC->query("SELECT Number, X, Y, NAME, DUR FROM Items WHERE ID = {$Index} AND TP = {$Categorie}"); $FindItemDetails = odbc_fetch_object($FindItemDetailsQuery); } else { $Ancient = hexdec(substr($this->Vault_Slots[$i]['Hex'], 17, 1)); $Index = substr($this->Vault_Slots[$i]['Hex'], 0, 2); $Unique = substr($this->Vault_Slots[$i]['Hex'], 14, 2); $UniqueIntValue = hexdec($Unique) >= 128 ? 8 : 0; $New = substr($this->Vault_Slots[$i]['Hex'], 6, 2); $ID = $this->GetItemId($Index); if ($New == "F9") { $ID['index'] += 32; } $FindItemDetailsQuery = $ODBC->query("SELECT Number, X, Y, NAME, DUR FROM Items WHERE ID = {$ID['index']} AND TP = " . (int) ($ID['section'] + $UniqueIntValue) . ""); $FindItemDetails = odbc_fetch_object($FindItemDetailsQuery); } //if($FindItemDetails->Number == NULL); // exit(Print_error("<ul><li>Existe um item no seu baú que não foi cadastrado no shopping! A ação foi interrompida, entre em contato com o suporte.</ul></li>")); $this->Vault_Slots[$i]['Key'] = $FindItemDetails->Number; $this->Vault_Slots[$i]['Width'] = $FindItemDetails->X; $this->Vault_Slots[$i]['Height'] = $FindItemDetails->Y; $this->Vault_Slots[$i]['Name'] = $FindItemDetails->NAME; $this->Vault_Slots[$i]['Dur'] = $FindItemDetails->DUR; $this->Vault_Slots[$i]['Free'] = false; } else { $this->Vault_Slots[$i]['Key'] = NULL; $this->Vault_Slots[$i]['Width'] = 0; $this->Vault_Slots[$i]['Height'] = 0; $this->Vault_Slots[$i]['Name'] = NULL; $this->Vault_Slots[$i]['Free'] = true; } } //var_dump($this->Vault_Slots); }
<h1>Update MuShopping versão 3.1.6 para 3.1.7</h1> <?php require "settings.php"; require "modules/odbc.class.php"; $objCon = new LD_ODBC(); $err = 0; if (@$objCon->query("ALTER TABLE [Items] ADD COLUMN [C_96] BIT") == true) { echo "<p>Criada a coluna da classe Rage Fighter</p><br />"; } else { echo "<p>Erro ao criar a coluna da classe Rage Fighter (possivelmente já criada)</p><br />"; $err++; } if (@$objCon->query("ALTER TABLE [Items] ADD COLUMN [C_98] BIT") == true) { echo "<p>Criada a coluna da classe Fist Master</p><br />"; } else { echo "<p>Erro ao criar a coluna da classe Fist Master (possivelmente já criada)</p><br />"; $err++; } if ($err == 0) { if (@unlink(realpath(__FILE__))) { echo "<p>Essa página foi deletada automaticamente!</p>"; } }