function products_collection_user($prodid = 0, $count = 999999, $template = 'collectionuser') { global $set, $apx, $db, $user; require_once BASEDIR . getmodulepath('user') . 'tfunctions.php'; $prodid = (int) $prodid; if (!$prodid) { return; } $count = (int) $count; if ($count < 1) { $count = 1; } $apx->lang->drop('func_newuser', 'user'); $data = $db->fetch("SELECT a.userid,a.username,a.email,a.groupid,a.reg_time,a.realname,a.gender,a.city,a.plz,a.country,a.city,a.lastactive,a.avatar,a.avatar_title,a.birthday,a.pub_hidemail,a.custom1,a.custom2,a.custom3,a.custom4,a.custom5,a.custom6,a.custom7,a.custom8,a.custom9,a.custom10 FROM " . PRE . "_products_coll AS c LEFT JOIN " . PRE . "_user AS a USING(userid) WHERE c.prodid='" . $prodid . "' AND a.reg_key='' ORDER BY a.username ASC LIMIT " . $count); user_print($data, 'functions/' . $template, 'USER', false, 'products'); }
function user_buddylist($template = 'buddylist') { global $set, $apx, $db, $user; $apx->lang->drop('func_buddylist', 'user'); $buddies = $user->get_buddies(); if (count($buddies)) { $data = $db->fetch("SELECT userid,username,email,groupid,reg_time,realname,gender,city,plz,country,city,lastactive,pub_invisible,avatar,avatar_title,birthday,pub_hidemail,custom1,custom2,custom3,custom4,custom5,custom6,custom7,custom8,custom9,custom10 FROM " . PRE . "_user WHERE userid IN (" . implode(',', $buddies) . ") ORDER BY username ASC"); } user_print($data, 'functions/' . $template, 'BUDDY', true); }