function text_show_item($entry, $iconId = 0, $style = 0) { global $dDB, $config; if (!$iconId) { $iconId = $dDB->selectCell('-- CACHE: 1h SELECT `displayid` FROM `item_template` WHERE `entry` = ?d', $entry); } $icon = getItemIcon($iconId); $text = '<a href="?item=' . $entry . '"><img' . ($style ? ' class=' . $style : '') . ' src="' . $icon . '"></a>'; return $text; }
$limit = $config['ls_limit']; // Fill this array $result = array(); // Item search if ($type == 'i' or $type == 'all') { $filter = '`name` like ?'; $tables = '`item_template`'; $filelds = '`item_template`.`entry`, `Quality`, `displayid`, `name`'; if ($localised) { $tables = '`item_template` LEFT JOIN `locales_item` ON `item_template`.`entry` = `locales_item`.`entry`'; $filter = str_replace('`name`', '`name_loc' . $locale . '`', $filter); $filelds = str_replace('`name`', '`locales_item`.`name_loc' . $locale . '` AS `name`', $filelds); } if ($items = $dDB->select("SELECT {$filelds} FROM {$tables} WHERE {$filter} LIMIT 0, ?d", '%' . $name . '%', $limit)) { foreach ($items as $item) { $result['i'][] = array('ico' => getItemIcon($item['displayid'], 0), 'class' => $Quality[$item['Quality']], 'link' => '?item=' . $item['entry'], 'txt' => $item['name'], 'type' => $ls_type_name['i']); } } } // Item Set search if ($type == 'set' or $type == 'all') { if ($set = $wDB->select('SELECT `id`, `name` FROM `wowd_itemset` WHERE `name` LIKE ? LIMIT 0, ?d', '%' . $name . '%', $limit)) { foreach ($set as $s) { $result['set'][] = array('txt' => $s['name'], 'link' => '?itemset=' . $s['id'], 'type' => $ls_type_name['set']); } } } // Quest search if ($type == 'q' or $type == 'all') { $filter = '`Title` like ?'; $tables = '`quest_template`';
include_once "include/functions.php"; include_once "include/report_generator.php"; ########## /* * —крипт показывает список владельцев вещи по ее id */ $itemid = intval(@$_REQUEST['itemOwner']); $FindRefrence = "?itemOwner={$itemid}"; $item = getItem($itemid); if (!$item) { RenderError("{$lang['item_not_found']}"); } else { if ($ajaxmode == 0) { echo "<table cellspacing=0 cellpadding=0 width=500><tbody><tr>"; echo "<td vAlign=top align=right width=20%>"; $icon = getItemIcon($item['displayid']); echo "<br><a href=\"#\"><img height=64 width=64 border=0 src='{$icon}'></a></td>"; echo "<td>"; generateItemTable($item); echo "</td>"; echo "</tr></tbody></table>"; if ($item['BuyPrice']) { echo "{$lang['buy_price']}: " . money($item['BuyPrice']); } echo "<br /><br />"; } $show_fields = array('PL_REPORT_LEVEL', 'PL_REPORT_RACE', 'PL_REPORT_CLASS', 'PL_REPORT_NAME', 'PL_REPORT_ITEM'); $p_search =& new PlayerReportGenerator('item'); $p_search->disableMark(); $p_search->Init($show_fields, $FindRefrence, 'searchOwners', $config['fade_limit'], 'name'); $p_search->itemOwner($itemid);