Example #1
0
    print "<tr class='myline' height='6'><td colspan='2'></td><tr>";
    print "<tr><td nowrap='1'><b>This item can be foraged in: </b>";
    while ($row = mysql_fetch_array($result)) {
        print "<li><a href='zone.php?name=" . $row["short_name"] . "'>" . str_replace("_", " ", $row["long_name"]) . "</a></li>";
    }
    print "</td></tr>";
}
// trade skills for which that item is a component
$query = "SELECT {$tbtradeskillrecipe}.name,{$tbtradeskillrecipe}.id,{$tbtradeskillrecipe}.tradeskill\n\t\t\tFROM {$tbtradeskillrecipe},{$tbtradeskillrecipeentries}\n\t\t\tWHERE {$tbtradeskillrecipe}.id={$tbtradeskillrecipeentries}.recipe_id\n\t\t\tAND {$tbtradeskillrecipeentries}.item_id={$id}\n\t\t\tAND {$tbtradeskillrecipeentries}.componentcount>0\n\t\t\tGROUP BY {$tbtradeskillrecipe}.id";
$result = mysql_query($query) or message_die('item.php', 'MYSQL_QUERY', $query, mysql_error());
$TradeskillResults = "";
if (mysql_num_rows($result) > 0) {
    $TradeskillResults .= "<tr class='myline' height='6'><td colspan='2'></td><tr>";
    $TradeskillResults .= "<tr><td nowrap='1'><b>This item is used in the following tradeskill recipes : </b><ul>";
    while ($row = mysql_fetch_array($result)) {
        $TradeskillResults .= "<li><a href='recipe.php?id=" . $row["id"] . "'>" . str_replace("_", " ", $row["name"]) . "</a> (" . ucfirstwords($dbskills[$row["tradeskill"]]) . ")</li>";
    }
    $TradeskillResults .= "</ul></td></tr>";
}
print $TradeskillResults;
// trade skills which result is the component
$query = "SELECT {$tbtradeskillrecipe}.name,{$tbtradeskillrecipe}.id,{$tbtradeskillrecipe}.tradeskill\n\t\t\tFROM {$tbtradeskillrecipe},{$tbtradeskillrecipeentries}\n\t\t\tWHERE {$tbtradeskillrecipe}.id={$tbtradeskillrecipeentries}.recipe_id\n\t\t\tAND {$tbtradeskillrecipeentries}.item_id={$id}\n\t\t\tAND {$tbtradeskillrecipeentries}.successcount>0\n\t\t\tGROUP BY {$tbtradeskillrecipe}.id";
$result = mysql_query($query) or message_die('item.php', 'MYSQL_QUERY', $query, mysql_error());
$TradeskillResults = "";
if (mysql_num_rows($result) > 0) {
    $TradeskillResults .= "<tr class='myline' height='6'><td colspan='2'></td><tr>";
    $TradeskillResults .= "<tr><td nowrap='1'><b>This item is the result of the following tradeskill recipes : </b><ul>";
    while ($row = mysql_fetch_array($result)) {
        $TradeskillResults .= "<li><a href='recipe.php?id=" . $row["id"] . "'>" . str_replace("_", " ", $row["name"]) . "</a> (" . $dbskills[$row["tradeskill"]] . ")</li>";
    }
    $TradeskillResults .= "</ul></td></tr>";
Example #2
0
if (!is_numeric($id)) {
    header("Location: recipes.php");
    exit;
}
$Title = "Recipe : " . str_replace('_', ' ', GetFieldByQuery("name", "SELECT name FROM {$tbtradeskillrecipe} WHERE id={$id}"));
include $includes_dir . 'headers.php';
include $includes_dir . 'functions.php';
if (!isset($id)) {
    print "<script>document.location=\"index.php\";</script>";
}
$query = "SELECT *\n\t\t\tFROM {$tbtradeskillrecipe}\n\t\t\tWHERE id={$id}";
$result = mysql_query($query) or message_die('recipe.php', 'MYSQL_QUERY', $query, mysql_error());
$recipe = mysql_fetch_array($result);
print "<table border=0 width=0%>";
print "<tr><td nowrap><b>Recipe : </b></td><td nowrap>" . ucfirstwords(str_replace('_', ' ', $recipe["name"])) . "</td></tr>";
print "<tr><td nowrap><b>Tradeskill : </b></td><td nowrap>" . ucfirstwords($dbskills[$recipe["tradeskill"]]) . "</td></tr>";
if ($recipe["skillneeded"] > 0) {
    print "<tr><td nowrap><b>Skill needed : </b></td><td nowrap>" . $recipe["skillneeded"] . "</td></tr>";
}
print "<tr><td nowrap><b>Trivial at : </b></td><td nowrap>" . $recipe["trivial"] . "</td></tr>";
if ($recipe["nofail"] > 0) {
    print "<tr><td nowrap colspan=2>This recipe cannot fail.</td></tr>";
}
if ($recipe["notes"] != "") {
    print "<tr><td cospan=2><b>Notes : </b>" . $recipe["notes"] . "</td></tr>";
}
// results containers
$query = "SELECT {$tbtradeskillrecipeentries}.*,{$tbitems}.*,{$tbitems}.id AS item_id\n\t\t\tFROM {$tbtradeskillrecipe},{$tbtradeskillrecipeentries},{$tbitems}\n\t\t\tWHERE {$tbtradeskillrecipe}.id={$tbtradeskillrecipeentries}.recipe_id\n\t\t\t  AND {$tbtradeskillrecipeentries}.recipe_id={$id}\n\t\t\t  AND {$tbtradeskillrecipeentries}.item_id={$tbitems}.id\n\t\t\t  AND {$tbtradeskillrecipeentries}.iscontainer=1";
$result = mysql_query($query) or message_die('recipe.php', 'MYSQL_QUERY', $query, mysql_error());
if (mysql_num_rows($result) > 0) {
    print "<tr class=myline height=6><td colspan=2></td><tr>";
Example #3
0
function BuildItemStats($item, $show_name_icon, $TableClass = '')
{
    global $dbitypes, $dam2h, $dbbagtypes, $dbskills, $icons_url, $icons_dir, $tbspells, $dbiaugrestrict, $dbiracenames, $root_url;
    $TableProperties = " border='0' cellpadding='0' cellspacing='0' ";
    if ($TableClass) {
        $TableClass = " class='" . $TableClass . "'";
    }
    $html_string = "";
    $html_string .= "<table border='0' style='width:500px' " . $TableClass . "><tr><td>";
    if ($show_name_icon) {
        $html_string .= "<h4 style='margin-top:0' class='page-title'>" . $item["Name"] . "</h4><hr style='margin: 0px 0; margin-bottom:10px'></td><td>";
        if (file_exists("cust_assets/icons/item_" . $item["icon"] . ".png")) {
            $html_string .= "<img src='cust_assets/icons/item_" . $item["icon"] . ".png' align='right' valign='top' class='btn btn-default'/>";
        } else {
            $html_string .= "<img src='cust_assets/icons/item_0.png' align='right' valign='top' class='btn btn-default'/>";
        }
        $html_string .= "</td></tr><tr><td colspan='2'>";
    }
    $html_string .= "<table border='0' width='100%'" . $TableClass . ">";
    // lore, nodrop, norent, magic
    $html_string .= "<tr>";
    $html_string .= "<td colspan='2' nowrap='1'><b style='display:inline'>";
    $v = "";
    if ($item["itemtype"] == 54) {
        $html_string .= "{$v} AUGMENTATION";
        $v = " ";
    }
    if ($item["magic"] == 1) {
        $html_string .= "{$v} MAGIC ITEM";
        $v = " ";
    }
    if ($item["loreflag"] == 1) {
        $html_string .= "{$v} LORE ITEM";
        $v = " ";
    }
    if ($item["nodrop"] == 0) {
        $html_string .= "{$v} NO DROP";
        $v = " ";
    }
    if ($item["norent"] == 0) {
        $html_string .= "{$v} NO RENT";
        $v = " ";
    }
    $html_string .= "                            </b><br></td>";
    $html_string .= "                          </tr>";
    // Classes
    if ($item["classes"] > 0) {
        $html_string .= "<tr><td colspan='2'><b>Classes </b> " . getclasses($item["classes"]) . "</td></tr>";
    } else {
        $html_string .= "<tr><td colspan='2' nowrap='1'><b>Classes </b> <b class='btn btn-default btn-xs' style='display:inline'>All classes</b></td></tr>";
    }
    // Races
    if ($item["races"] > 0) {
        $html_string .= "<tr><td colspan='2'><b>Races </b> " . getraces($item["races"]) . "</td></tr>";
    } else {
        $html_string .= "<tr><td colspan='2' nowrap='1'><b>Races</b> <b class='btn btn-default btn-xs' style='display:inline'>All races</b> </td></tr>";
    }
    // Deity
    if ($item["deity"] > 0) {
        $html_string .= "<tr><td colspan='2' nowrap='1'><b>Deity </b> <b class='btn btn-default btn-xs' style='display:inline'>" . gedeities($item["deity"]) . "</b></td></tr>";
    }
    // Slots
    if ($item["slots"] > 0) {
        $html_string .= "<tr><td colspan='2'><b>Slot </b> <b class='btn btn-default btn-xs' style='display:inline'>" . strtoupper(getslots($item["slots"])) . "</b></td></tr>";
    }
    if ($item["slots"] == 0) {
        $html_string .= "<tr><td colspan='2' ><b>Slot </b> <b class='btn btn-default btn-xs' style='display:inline'>NONE</b></td></tr>";
    }
    $TypeString = "";
    switch ($item["itemtype"]) {
        case 0:
            // 1HS
        // 1HS
        case 2:
            // 1HP
        // 1HP
        case 3:
            // 1HB
        // 1HB
        case 42:
            // H2H
        // H2H
        case 1:
            // 2hs
        // 2hs
        case 4:
            // 2hb
        // 2hb
        case 35:
            // 2hp
            $TypeString = "Skill";
            break;
        default:
            $TypeString = "Item Type";
            break;
    }
    // Item type or Skill
    // Bags show as 1HS
    if ($dbitypes[$item["itemtype"]] != "" && $item["bagslots"] == 0) {
        if ($item["slots"] == 0) {
            $html_string .= "<tr><td width='0%' nowrap='1' colspan='2'><b> " . $TypeString . " </b>Inventory";
        } else {
            $html_string .= "<tr><td width='0%' nowrap='1' colspan='2'><b>" . $TypeString . " </b> <b class='btn btn-default btn-xs' style='display:inline'>" . $dbitypes[$item["itemtype"]] . "</b>";
        }
        if ($item["stackable"] > 0) {
            $html_string .= " (stackable)";
        }
        $html_string .= "<hr style='margin: 0px 0;margin-top:10px'></td></tr>";
    }
    // Bag-specific information
    if ($item["bagslots"] > 0) {
        $html_string .= "<tr><td width='0%' nowrap='1'><b>Item Type </b> <b class='btn btn-default btn-xs' style='display:inline'>Container</b></td></tr>";
        $html_string .= "<tr><td width='0%' nowrap='1'><b>Number of Slots </b><b class='btn btn-default btn-xs' style='display:inline'>" . $item["bagslots"] . "</b></td></tr>";
        if ($item["bagtype"] > 0) {
            $html_string .= "<tr><td width='0%' nowrap='1'><b>Trade Skill Container </b> <b class='btn btn-default btn-xs' style='display:inline'>" . $dbbagtypes[$item["bagtype"]] . "</b></td></tr>";
        }
        if ($item["bagwr"] > 0) {
            $html_string .= "<tr><td width='0%'  nowrap='1'><b>Weight Reduction </b> <b class='btn btn-default btn-xs' style='display:inline'>" . $item["bagwr"] . "%</b></td></tr>";
        }
        $html_string .= "<tr><td width='0%' nowrap='1' colspan='2'>This can hold " . strtoupper(getsize($item["bagsize"])) . " and smaller items.</td></tr>";
    }
    $html_string .= "</table>";
    $html_string .= "</td></tr><tr><td colspan='2'>";
    $html_string .= "<table border='0' width='0%'" . $TableClass . ">";
    // Weight, Size, Rec/Req Level, skill
    $html_string .= "<tr valign='top'><td>";
    $html_string .= "<table width='100%'" . $TableProperties . $TableClass . ">";
    $html_string .= "<tr><td><b>Size</b></td><td align='right'><b class='btn btn-default btn-xs' style='display:inline'>" . strtoupper(getsize($item["size"])) . "</b></td></tr>";
    $html_string .= GetItemStatsString("Weight", "<b class='btn btn-default btn-xs' style='display:inline'>" . $item["weight"] / 10 . '</b>');
    $html_string .= GetItemStatsString("Rec Level", "<b class='btn btn-default btn-xs' style='display:inline'>" . $item["reclevel"] . '</b>');
    $html_string .= GetItemStatsString("Req Level", "<b class='btn btn-default btn-xs' style='display:inline'>" . $item["reqlevel"] . '</b>');
    $html_string .= "</table>";
    $html_string .= "</td><td>";
    // AC, HP, Mana, End, Haste
    $html_string .= "<table width='100%'" . $TableProperties . $TableClass . ">";
    $html_string .= GetItemStatsString("AC", "<b class='btn btn-default btn-xs' style='display:inline'>+ " . $item["ac"] . '</b>');
    $html_string .= GetItemStatsString("HP", "<b class='btn btn-default btn-xs' style='display:inline'>+ " . $item["hp"] . '</b>');
    $html_string .= GetItemStatsString("Mana", "<b class='btn btn-default btn-xs' style='display:inline'>+ " . $item["mana"] . '</b>');
    $html_string .= GetItemStatsString("Endur", "<b class='btn btn-default btn-xs' style='display:inline'>+ " . $item["endur"] . '</b>');
    $html_string .= GetItemStatsString("Haste", "<b class='btn btn-default btn-xs' style='display:inline'>+ " . $item["haste" . "%"] . '</b>');
    $html_string .= "</table>";
    $html_string .= "</td><td>";
    // Base Damage, Ele/Bane/BodyType Damage, BS Damage, Delay, Range, Damage Bonus, Range
    $html_string .= "<table width='100%'" . $TableProperties . $TableClass . ">";
    $html_string .= GetItemStatsString("Base Damage", "<b class='btn btn-default btn-xs' style='display:inline'>+ " . $item["damage"] . "</b>");
    $html_string .= GetItemStatsString(ucfirstwords($dbelements[$item["elemdmgtype"]]) . " Damage", $item["elemdmgamt"]);
    if ($item["banedmgrace"] > 0 && $item["banedmgamt"] != 0) {
        $html_string .= "<tr><td><b>Bane Damage (";
        $html_string .= $dbiracenames[$item["banedmgrace"]];
        $html_string .= ") </b></td><td align='right'>" . sign($item["banedmgamt"]) . "</td></tr>";
    }
    $html_string .= GetItemStatsString(ucfirstwords($dbbodytypes[$item["banedmgbody"]]), $item["banedmgamt"]);
    $html_string .= GetItemStatsString("Backstab Damage", $item["backstabdmg"]);
    $html_string .= GetItemStatsString("Delay", $item["delay"]);
    if ($item["damage"] > 0) {
        switch ($item["itemtype"]) {
            case 0:
                // 1HS
            // 1HS
            case 2:
                // 1HP
            // 1HP
            case 3:
                // 1HB
            // 1HB
            case 42:
                // H2H
                $dmgbonus = 13;
                // floor((65-25)/3)  main hand
                $html_string .= "<tr><td><b>Damage Bonus: </b></td><td align='right'>{$dmgbonus}</td></tr>";
                break;
            case 1:
                // 2hs
            // 2hs
            case 4:
                // 2hb
            // 2hb
            case 35:
                // 2hp
                $dmgbonus = $dam2h[$item["delay"]];
                $html_string .= "<tr><td><b>Damage Bonus: </b></td><td align='right'>{$dmgbonus}</td></tr>";
                break;
        }
    }
    $html_string .= GetItemStatsString("Range", $item["range"]);
    $html_string .= "</table>";
    $html_string .= "</td></tr>";
    $html_string .= "<tr valign='top'><td>";
    // Normal Stats
    $html_string .= "<hr style='margin: 0px 0;'><table width='100%'" . $TableProperties . $TableClass . ">";
    $html_string .= GetItemStatsString("Strength", $item["astr"], $item["heroic_str"], "orange");
    $html_string .= GetItemStatsString("Stamina", $item["asta"], $item["heroic_sta"], "orange");
    $html_string .= GetItemStatsString("Intelligence", $item["aint"], $item["heroic_int"], "orange");
    $html_string .= GetItemStatsString("Wisdom", $item["awis"], $item["heroic_wis"], "orange");
    $html_string .= GetItemStatsString("Agility", $item["aagi"], $item["heroic_agi"], "orange");
    $html_string .= GetItemStatsString("Dexterity", $item["adex"], $item["heroic_dex"], "orange");
    $html_string .= GetItemStatsString("Charisma", $item["acha"], $item["heroic_cha"], "orange");
    $html_string .= "</table>";
    $html_string .= "</td><td>";
    // Resists
    $html_string .= "<hr style='margin: 0px 0;'><table width='100%'" . $TableProperties . $TableClass . ">";
    $html_string .= GetItemStatsString("Magic Resist", $item["mr"], $item["heroic_mr"], "orange");
    $html_string .= GetItemStatsString("Fire Resist", $item["fr"], $item["heroic_fr"], "orange");
    $html_string .= GetItemStatsString("Cold Resist", $item["cr"], $item["heroic_cr"], "orange");
    $html_string .= GetItemStatsString("Disease Resist", $item["dr"], $item["heroic_dr"], "orange");
    $html_string .= GetItemStatsString("Poison Resist", $item["pr"], $item["heroic_pr"], "orange");
    $html_string .= "</table>";
    $html_string .= "</td><td>";
    // Modifiers
    $html_string .= "<hr style='margin: 0px 0;'><table width='100%'" . $TableProperties . $TableClass . ">";
    $html_string .= GetItemStatsString("Attack", $item["attack"]);
    $html_string .= GetItemStatsString("HP Regen", $item["regen"]);
    $html_string .= GetItemStatsString("Mana Regen", $item["manaregen"]);
    $html_string .= GetItemStatsString("Endurance Regen", $item["enduranceregen"]);
    $html_string .= GetItemStatsString("Spell Shielding", $item["spellshield"]);
    $html_string .= GetItemStatsString("Combat Effects", $item["combateffects"]);
    $html_string .= GetItemStatsString("Shielding", $item["shielding"]);
    $html_string .= GetItemStatsString("DoT Shielding", $item["dotshielding"]);
    $html_string .= GetItemStatsString("Avoidance", $item["avoidance"]);
    $html_string .= GetItemStatsString("Accuracy", $item["accuracy"]);
    $html_string .= GetItemStatsString("Stun Resist", $item["stunresist"]);
    $html_string .= GetItemStatsString("Strikethrough", $item["strikethrough"]);
    $html_string .= GetItemStatsString("Damage Shield", $item["damageshield"]);
    $html_string .= "</table>";
    $html_string .= "</td></tr></table><hr style='margin: 0px 0;margin-top:10px'>";
    // Extras
    if ($item["extradmgamt"] > 0) {
        $html_string .= "<tr><td><b>" . ucfirstwords($dbskills[$item["extradmgskill"]]) . " Damage</b>" . sign($item["extradmgamt"]) . "</td></tr>";
    }
    // Skill Mods
    if ($item["skillmodtype"] > 0 && $item["skillmodvalue"] != 0) {
        $html_string .= "<tr><td colspan='2' nowrap='1'><b>Skill Mod" . ucfirstwords($dbskills[$item["skillmodtype"]]) . "</b>" . sign($item["skillmodvalue"]) . "%</td></tr>";
    }
    // Augmentations
    for ($i = 1; $i <= 5; $i++) {
        if ($item["augslot" . $i . "type"] > 0) {
            $html_string .= "<tr><td width='0%' nowrap='1' colspan='2'><b>Slot " . $i . "</b> <b style='btn btn-default btn-xs'>Type " . $item["augslot" . $i . "type"] . "</b> </td></tr>";
        }
    }
    //item proc
    if ($item["proceffect"] > 0 && $item["proceffect"] < 65535) {
        $html_string .= "<tr><td colspan='2' nowrap='1'><b>Combat Effect </b><a href='" . $root_url . "spell.php?id=" . $item["proceffect"] . "' target='" . $item["proceffect"] . "'>" . GetFieldByQuery("name", "SELECT name FROM spells_new WHERE id=" . $item["proceffect"]) . "</a>";
        if ($item["proclevel2"] > 0) {
            $html_string .= "<br><b>Level for effect </b>" . $item["proclevel2"];
        }
        $html_string .= "</td></tr>";
    }
    // worn effect
    if ($item["worneffect"] > 0 && $item["worneffect"] < 65535) {
        $html_string .= "<tr><td colspan='2' nowrap='1'><b>Worn Effect </b><a href='" . $root_url . "spell.php?id=" . $item["worneffect"] . "' target='" . $item["worneffect"] . "'>" . GetFieldByQuery("name", "SELECT name FROM spells_new WHERE id=" . $item["worneffect"]) . "</a>";
        if ($item["wornlevel"] > 0) {
            $html_string .= "<br><b>Level for effect </b>" . $item["wornlevel"];
        }
        $html_string .= "</td></tr>";
    }
    // focus effect
    if ($item["focuseffect"] > 0 && $item["focuseffect"] < 65535) {
        $html_string .= "<tr><td colspan='2' nowrap='1'><b>Focus Effect </b><a href='" . $root_url . "spell.php?id=" . $item["focuseffect"] . "' target='" . $item["focuseffect"] . "'>" . GetFieldByQuery("name", "SELECT name FROM spells_new WHERE id=" . $item["focuseffect"]) . "</a>";
        if ($item["focuslevel"] > 0) {
            $html_string .= "<br/><b>Level for effect</b>" . $item["focuslevel"];
        }
        $html_string .= "</td></tr>";
    }
    // clicky effect
    if ($item["clickeffect"] > 0 && $item["clickeffect"] < 65535) {
        $html_string .= "<tr><td colspan='2' nowrap='1'><b>Click Effect </b><a href='" . $root_url . "spell.php?id=" . $item["clickeffect"] . "' target='" . $item["clickeffect"] . "'>" . GetFieldByQuery("name", "SELECT name FROM spells_new WHERE id=" . $item["clickeffect"]) . "</a> (";
        if ($item["clicktype"] == 4) {
            $html_string .= "Must Equip. ";
        }
        if ($item["casttime"] > 0) {
            $html_string .= "<b>Casting time </b>" . $item["casttime"] / 1000 . " sec";
        } else {
            $html_string .= "<b>Casting time </b>Instant";
        }
        $html_string .= ")";
        if ($item["clicklevel"] > 0) {
            $html_string .= "<br/><b>Level for effect </b>" . $item["clicklevel"];
        }
        if ($item["maxcharges"] > 0) {
            $html_string .= "<br/><b>Charges </b>" . $item["maxcharges"];
        } elseif ($item["maxcharges"] < 0) {
            $html_string .= "<br/><b>Charges </b>Unlimited";
        } else {
            $html_string .= "<br/><b>Charges </b>None";
        }
        $html_string .= "</td></tr>";
    }
    // scroll
    if ($item["scrolleffect"] > 0 && $item["scrolleffect"] < 65535) {
        $html_string .= "<tr><td colspan='2' nowrap='1'><b>Spell Scroll Effect </b><a href='" . $root_url . "spell.php?id=" . $item["scrolleffect"] . "' target='" . $item["scrolleffect"] . "'>" . GetFieldByQuery("name", "SELECT name FROM spells_new WHERE id=" . $item["scrolleffect"]) . "</a>";
        $html_string .= "</td></tr>";
    }
    // bard item ?
    if ($item["bardtype"] > 22 && $item["bardtype"] < 65535) {
        $html_string .= "<tr><td width='0%' nowrap='1' colspan='2'><b>Bard skill </b> " . $dbbardskills[$item["bardtype"]];
        if ($dbbardskills[$item["bardtype"]] == "") {
            $html_string .= "Unknown" . $item["bardtype"];
        }
        $val = $item["bardvalue"] * 10 - 100;
        if ($val > 0) {
            $html_string .= " (" . sign($val) . "%)</td></tr>";
        }
    }
    // Augmentation type
    if ($item["itemtype"] == 54) {
        if ($item["augtype"] > 0) {
            $Comma = "";
            $AugSlots = "";
            $AugType = $item["augtype"];
            $Bit = 1;
            for ($i = 1; $i < 25; $i++) {
                if ($Bit <= $AugType && $Bit & $AugType) {
                    $AugSlots .= $Comma . $i;
                    $Comma = ", ";
                }
                $Bit *= 2;
            }
            $html_string .= "<tr><td colspan='2' nowrap='1'><b>Augmentation Slot Type </b>" . $AugSlots . "</td></tr>";
        } else {
            $html_string .= "<tr><td colspan='2' nowrap='1'><b>Augmentation Slot Type </b>All Slots</td></tr>";
        }
        if ($item["augrestrict"] > 0) {
            if ($item["augrestrict"] > 12) {
                $html_string .= "<tr><td colspan='2' nowrap='1'><b>Augmentation Restriction </b>Unknown Type</td></tr>";
            } else {
                $Restriction = $dbiaugrestrict[$item["augrestrict"]];
                $html_string .= "<tr><td colspan='2' nowrap='1'><b>Augmentation Restriction </b>{$Restriction}</td></tr>";
            }
        }
    }
    $ItemPrice = $item["price"];
    $ItemValue = "";
    $Platinum = 0;
    $Gold = 0;
    $Silver = 0;
    $Copper = 0;
    if ($ItemPrice > 1000) {
        $Platinum = (int) ($ItemPrice / 1000);
    }
    if ($ItemPrice - $Platinum * 1000 > 100) {
        $Gold = (int) (($ItemPrice - $Platinum * 1000) / 100);
    }
    if ($ItemPrice - $Platinum * 1000 - $Gold * 100 > 10) {
        $Silver = (int) (($ItemPrice - $Platinum * 1000 - $Gold * 100) / 10);
    }
    if ($ItemPrice - $Platinum * 1000 - $Gold * 100 - $Silver * 10 > 0) {
        $Copper = $ItemPrice - $Platinum * 1000 - $Gold * 100 - $Silver * 10;
    }
    $ItemValue .= "<tr><td colspan='2' nowrap='1'><b>Value </b>";
    $ItemValue .= $Platinum . " <img src='cust_assets/icons/item_644.png' width='14' height='14'/> " . $Gold . " <img src='cust_assets/icons/item_645.png' width='14' height='14'/> " . $Silver . " <img src='cust_assets/icons/item_646.png' width='14' height='14'/> " . $Copper . " <img src='cust_assets/icons/item_647.png' width='14' height='14'/>";
    $ItemValue .= "</td></tr>";
    $html_string .= $ItemValue;
    $html_string .= "</td></tr></table>";
    return $html_string;
}