<?php require_once('includes/requirecompere.inc.php'); $mb_id_leader=current_mb_id(); $op=TGET('op'); $invitecount=TGET('invitecount'); $DBConn->connect(true); $members=db_load_team($DBConn,$mb_id_leader); $dataset['TEAM']=$members; $have_status_changable=false; $alias_count=0; foreach ($dataset['TEAM'] as &$m) { $m[$m['tm_status']]=array(0); if ($m['mb_id_member']!=$m['mb_id_leader']) { $m['DELETABLE']=array(0); if ($m['tm_status']!='INVITED') $have_status_changable=true; } else $m['NON-DELETABLE']=array(0); if ($m['tm_is_alias']) $alias_count++; } $dataset['TEAM-EMPTY']=$members?array():array(0); $dataset['HAVE-STATUS-CHANGABLE']=$have_status_changable?array(0):array(); $dataset['teamsize']=sizeof($members); $dataset['size.addable']=get_compere_limit($DBConn,$mb_id_leader,'team.size')-sizeof($members); $dataset['INVITABLE']=$dataset['size.addable']>0?array(0):array(); $dataset['INVITE-OK']=$op=='invite.ok'?array(0):array(); $dataset['ADD-OK']=$op=='add.ok'?array(0):array(); $dataset['invitecount']=$invitecount; $dataset['HAS-PSEUDO-MEMBER']=$alias_count?array(0):array(); ?>