public function getTeamMember($id, $isFor=false)
{
global $_W;
global $_GPC;
static $arr = [];
if ($isFor==true) $arr = array();
$tempmerbers = pdo_fetchall('select id from ' . tablename('wx_shop_member') . ' where agentid=:agentid and uniacid=:uniacid ', array(':agentid' => $id, ':uniacid' => $_W['uniacid']));
$arr = array_merge($arr, $tempmerbers);
if (count($tempmerbers) > 0) {
foreach ($tempmerbers as $k => $value) {
$this->getTeamMember($value['id'],false);
}
}
return $arr;
}