function __construct($idIn) { $query = mysql_query("SELECT * FROM WA_MarketPrices WHERE id='{$idIn}'"); $marketRow = mysql_fetch_object($query); $this->id = $marketRow->id; $this->name = $marketRow->name; $this->damage = $marketRow->damage; $this->price = $marketRow->price; $this->time = $marketRow->time; $this->price = $marketRow->marketprice; $this->fullname = getItemName($this->name, $this->damage); $this->image = getItemImage($this->name, $this->damage); $this->ref = $marketRow->ref; $queryEnchantLinks = mysql_query("SELECT * FROM WA_EnchantLinks WHERE itemId = '{$this->id}' AND itemTableId = '4'"); $itemEnchantsArray = array(); while (list($idt, $enchIdt, $itemTableIdt, $itemIdt) = mysql_fetch_row($queryEnchantLinks)) { $eArray = array(); $q = mysql_query("SELECT * FROM WA_Enchantments WHERE id = '{$enchIdt}'"); list($ide, $fullnamee, $namee, $levele) = mysql_fetch_row($q); $eArray["id"] = $ide; $eArray["name"] = $namee; $eArray["level"] = $levele; $itemEnchantsArray[] = $eArray; } $this->enchants = $itemEnchantsArray; }
</tr> </thead> <tbody> <?php $marketNames = array(); while (list($id, $name, $damage, $time, $price, $ref) = mysql_fetch_row($queryMarket)) { $keyName = array_search($name . ":" . $damage, $marketNames); if (!$keyName == false) { //found this item id } else { $marketNames[] = $name . ":" . $damage; $fullName = getItemName($name, $damage); ?> <tr class="gradeC"> <td><img src="<?php echo getItemImage($name, $damage); ?> " alt="<?php echo $fullName; ?> "/><br/><?php echo $fullName; ?> </td> <td><?php echo $ref; ?> </td> <td><?php echo $price; ?>
$grade = "gradeX"; } } } $row['DT_RowClass'] = $grade; $theId = $aRow[$aColumns[5]]; $tempString = ""; $queryEnchantLinks = mysql_query("SELECT enchId FROM WA_EnchantLinks WHERE itemId='{$theId}' AND itemTableId='1'"); //print_r(mysql_fetch_row($queryEnchantLinks)); while (list($enchId) = mysql_fetch_row($queryEnchantLinks)) { $queryEnchants = mysql_query("SELECT * FROM WA_Enchantments WHERE id='{$enchId}'"); while (list($id, $enchName, $enchantId, $level) = mysql_fetch_row($queryEnchants)) { $tempString = $tempString . "<br/>" . getEnchName($enchantId) . " - Level: " . $level; } } $row[] = "<a href='graph.php?name=" . $aRow[$aColumns[0]] . "&damage=" . $aRow[$aColumns[1]] . "'><img src=" . getItemImage($aRow[$aColumns[0]], $aRow[$aColumns[1]]) . " alt=" . $fullItemName . "/><br/>" . $fullItemName . $tempString . "</a>"; $row[] = "<img width='32px' src='http://minotar.net/avatar/" . $aRow[$aColumns[2]] . "' /><br/>" . $aRow[$aColumns[2]]; if ($quantity == 0) { $row[] = "Never"; } else { $row[] = date($lang['topBoxes']['head']['dateformat'], $timeCreated + $auctionDurationSec); } $row[] = $aRow[$aColumns[3]]; $row[] = $aRow[$aColumns[4]]; $row[] = (double) $aRow[$aColumns[3]] * (double) $aRow[$aColumns[4]]; $row[] = $marketPercent; if ($canBuy == true) { if ($aRow[$aColumns[4]] >= 0.01) { $row[] = "<form action='scripts/purchaseItem.php' method='post'><input type='text' name='Quantity' onKeyPress='return numbersonly(this, event)' class='input'><input type='hidden' name='ID' value='" . $aRow[$aColumns[5]] . "' /><input type='submit' value='" . $lang['server_processing']['form_buy'] . "' class='button' /></form>"; } else { $row[] = "<form action='scripts/purchaseItem.php' method='post'><input type='hidden' name='Quantity' value='" . $aRow[$aColumns[3]] . "' /><input type='hidden' name='ID' value='" . $aRow[$aColumns[5]] . "' /><input type='submit' value='" . $lang['server_processing']['form_buy'] . "' class='button' /></form>";