<?php
$eqdkp_prefix = "mcdkp_";
include_once($phpbb_root_path . 'itemstats/itemstats.'.$phpEx);
include_once($phpbb_root_path . 'itemstats/includes/itemcache.'.$phpEx);
//$is = new ItemCache;
//
//DB INFO WAS HERE
//
mysql_free_result($result);
$result = mysql_query("SELECT item_name, item_buyer FROM ".$eqdkp_prefix."items order by item_date desc limit 1") or die(mysql_error());
while ($row = mysql_fetch_array($result)) {
$last_mc_loot = $row[item_name];
$buyer = $row[item_buyer];
$loot = itemstatsthis($last_mc_loot);
$loot = $loot." by ".$buyer."<br>";
echo($loot);
}
function itemstatsthis($name)
{
$item_stats = new ItemStats();
$item_name = trim($name);
$item_name = $item_stats->getItemName($item_name, true);
// Initialize the html.
$item_html = '[' . $item_name . ']';
// Get the color of this item and apply it to the html.
$item_color = $item_stats->getItemColor($item_name);
if (!empty($item_color))
{
$item_html = "<span class='" . $item_color . "'>" . $item_html . "</span>";
}
// Get the tooltip html for this item and apply it to the html.
$item_tooltip_html = $item_stats->getItemTooltipHtml($item_name);
if (!empty($item_tooltip_html))
{
$item_html = "<span " . $item_tooltip_html . ">" . $item_html . "</span>";
}
// If this item has a link to the info site, add this link to the HTML. If it doesn't have a link, it
// means the item hasn't been found yet, so put up a link to the update page instead.
$item_link = $item_stats->getItemLink($item_name);
if (!empty($item_link))
{
$item_html = "<a class='forumitemlink' target='_blank' href='" . $item_link . "'>" . $item_html . "</a>";
}
else
{
$item_link = 'itemstats/updateitem.php?item=' . urlencode(urlencode($item_name));
$item_html = "<a class='forumitemlink' href='$item_link'>" . $item_html . "</a>";
}
}
?>