Beispiel #1
0
function item_image($item)
{
    $c = item_class($item);
    $warn = '';
    $quantity = 0;
    $quality = $title = $item['name'];
    $item['img'] = $GLOBALS['schemas_570']['schema']['items'][$item['defindex']]['image_url'];
    return '<div><img alt="' . $item['name'] . '" title="' . $title . '" class="' . $warn . $GLOBALS['schemas_570']['schema']['quality'][$item['quality']]['name'] . $c . '" src="' . $item['img'] . '">' . ($quantity != NULL && $quantity != 1 ? '<span class="icount">' . $quantity . '</span>' : '') . '</div>';
}
Beispiel #2
0
function item_image($item, $quantity = NULL)
{
    //requires a prepared item, price is optional.
    if (strpos($item['name'], 'Australium') && !strpos($item['name'], 'Gold')) {
        //item is made of australium and is not the shitty australium gold paint.
        $flag[] = '';
    }
    $c = item_class($item);
    $warn = '';
    if (isset($_SESSION['pref']['numeric']['warn']) && $_SESSION['pref']['numeric']['warn'] == 1) {
        if ($item['id'] != $item['original_id']) {
            $warn = 'warn3 ';
        } else {
            if (isset($item['equipped'][0]['class'])) {
                $warn = 'warn2 ';
            }
        }
        //set the item change flag and all that shizzle.
    }
    $item['img'] = $GLOBALS['schemas_440']['schema']['items'][$item['defindex']]['image_url'];
    $title = '';
    if ($item['quality'] == 5 && isset($item['_particleEffect'])) {
        $title .= $GLOBALS['schemas_440']['schema']['effect'][$item['crateNum']]['name'] . ' ';
    }
    $title .= $item['name'];
    //item crate number.
    if (isset($item['crateNum']) && $item['crateNum'] != 0 && $GLOBALS['schemas_440']['schema']['items'][$item['defindex']]['item_type_name'] == 'TF_LockedCrate') {
        $title .= ' #' . $item['crateNum'];
    }
    $title .= "\n";
    if (isset($_SESSION['sid']) && $_SESSION['sid'] == 76561198013370444) {
        $title .= 'def: ' . $item['defindex'] . "\n";
    }
    if ($item['price_info']['value'] != -1) {
        $title .= (isset($item['price_info']['est']) && $item['price_info']['est'] == true ? '(est) ' : '') . $item['price_info']['value'] . ' ' . ($item['price_info']['currency'] > 1 ? $item['price_info']['currency'] . 's' : $item['price_info']['currency']);
    } else {
        $title .= 'No Price';
    }
    $title .= "\n";
    $title .= 'Origin: ' . $GLOBALS['schemas_440']['schema']['origin'][$item['origin']] . "\n";
    isset($item['notes']) ? $title .= $item['notes'] . "\n" : '';
    return '<div><a href="http://backpack.tf/item/' . $item['original_id'] . '" target=blank><img alt="' . $item['name'] . '" title="' . $title . '" class="' . $warn . $GLOBALS['schemas_440']['schema']['quality'][$item['quality']]['name'] . $c . '" src="' . $item['img'] . '">' . ($quantity != NULL && $quantity != 1 ? '<span class="icount">' . $quantity . '</span>' : '') . '</a></div>';
}