if ($vbulletin->db->num_rows($itemtypes)) { $userinfo['kbank_itemtypes'] = ''; while ($itemtypedata = $vbulletin->db->fetch_array($itemtypes)) { $userinfo['kbank_itemtypes'] .= '<li>' . "<a href=\"{$vbulletin->kbank['phpfile']}?do=shop&username={$userinfo['username']}&itemtypeid={$itemtypedata['itemtypeid']}\" target=\"_blank\">{$itemtypedata['name']}</a>" . '</li>'; } unset($itemtypedata); } $vbulletin->db->free_result($itemtypes); //search for user items if ($vbulletin->userinfo['userid'] != $userinfo['userid']) { //skip 1 query if user is viewing his/her profile. Everything has been loaded! findItemToWork($userinfo['userid'], true); } global $kbank_active_items; if (count($kbank_active_items[$userinfo['userid']])) { $userinfo['kbank_active_items'] = $userinfo['kbank_selling_items'] = ''; $items2show = fetchItemFromCache($kbank_active_items[$userinfo['userid']]); foreach ($items2show as $itemtypeid => $items2show_tmp) { foreach ($items2show_tmp as $item) { if ($item['status'] == KBANK_ITEM_SELLING) { //Selling item $userinfo['kbank_selling_items'] .= '<li>' . "<a href=\"{$vbulletin->kbank['phpfile']}?do=shop&username={$userinfo['username']}&itemtypeid={$itemtypeid}\" target=\"_blank\">{$item['name']}</a>" . iif($item['count'] > 1, " x<strong style=\"color:red\">{$item['count']}</strong>") . '</li>'; } else { $userinfo['kbank_active_items'] .= '<li>' . "<a href=\"{$vbulletin->kbank['phpfile']}?do=shop&itemtypeid={$itemtypeid}\" target=\"_blank\">{$item['name']}</a>" . iif(havePerm($vbulletin->userinfo, KBANK_PERM_ADMIN), " <em>{$item['status_str']}</em>") . iif($item['count'] > 1, " x<strong style=\"color:red\">{$item['count']}</strong>") . '</li>'; } } } } } eval('$template_hook["profile_stats_pregeneral"] .= "' . fetch_template('kbank_profile_stats_pregeneral') . '";'); }
$whotoday = substr($whotoday, 0, -2); } else { $whotoday = $vbphrase['no_visitors']; } $ftotaltoday = vb_number_format($totaltoday); $whotitle = construct_phrase($whodesc, $ftotaltoday); $vbulletin->templatecache['FORUMHOME'] = str_replace('<!-- end logged-in users -->', '<!-- end logged-in users -->' . $vbulletin->templatecache['who_visited_Display_Visitors'], $vbulletin->templatecache['FORUMHOME']); } //Only build navbar item for registered user if ($vbulletin->userinfo['userid']) { //button //eval('$template_hook["navbar_buttons_left"] .= "' . fetch_template('kbank_navbar_button') . '";'); - moved to global start to work better //navbar popup menu $kbank_navbar_popup_menu_more = ''; if (is_array($kbank_active_items[$vbulletin->userinfo['userid']])) { $items2show = fetchItemFromCache($kbank_active_items[$vbulletin->userinfo['userid']], $vbulletin->kbank['phpfile'] . '?do=myitems&itemid=%1$s#item%1$s', 'itemid', true, true); foreach ($items2show as $items2show_tmp) { foreach ($items2show_tmp as $item2show) { $useHead = false; $fulllink = $item2show['fulllink']; $link = $item2show['link']; $text = $item2show['name'] . iif($item2show['status_str'], ' ' . $item2show['status_str']) . iif($item2show['count'] > 1, " x<strong style=\"color:red\">{$item2show['count']}</strong>"); eval('$kbank_navbar_popup_menu_more .= " ' . fetch_template('kbank_navbar_popup_menu_bit') . '";'); } } } //Total Money $fulllink = true; $link = '#'; $text = $vbulletin->kbank['name'] . ': ' . $vbulletin->userinfo['kbank']; eval('$kbank_navbar_popup_menu_more .= " ' . fetch_template('kbank_navbar_popup_menu_bit') . '";');