"; if ($naviheadl[$nlv][LANG]!="") echo "".$naviheadl[$nlv][LANG]."\n"; echo "
    "; if (DB_TYPE=="mysql") $mysql_limit = "LIMIT ".$limit; $tops_query = "SELECT SUM(st.quantity) as stump, st.item_number, inf.name, ite.ID FROM ".TBL_PREFIX."item AS ite LEFT JOIN ".TBL_PREFIX."iteminfo as inf ON inf.itemID=ite.ID LEFT JOIN ".TBL_PREFIX."statistics AS st ON ite.number=st.item_number LEFT JOIN ".TBL_PREFIX."navi as nav ON (ite.itemgrID=nav.ID AND (nav.groupID=".USER_GROUP." OR nav.groupID='2')) WHERE inf.itemID=ite.ID AND inf.langID=".LANG_ID." AND ite.visible>0 AND (ite.itemgrID=nav.ID AND (nav.groupID=".USER_GROUP." OR nav.groupID='2')) GROUP BY st.item_number ORDER BY stump DESC LIMIT 5"; $tops_result = db_query($tops_query); while ($tops_row = db_fetch_row($tops_result)) { echo "
  1. $tops_row[2]"; } echo "
\n"; ?>