<member>
<?php
include_once('../common.php');

$uid = intval($_POST[uid]);
$query=$_SGLOBAL['db']->query( "SELECT a.workerid, a.clientid, a.isAudio, s.username, sf.sex, sf.birthyear, se.host from ".tname('avcall')." a LEFT JOIN ".tname('space')." s ON a.workerid=s.uid LEFT JOIN ".tname('spacefield')." sf ON a.workerid=sf.uid LEFT JOIN ".tname('session')." se ON a.workerid=se.uid WHERE clientid='$uid'");
if($query){
	while ($rs = $_SGLOBAL['db']->fetch_array($query)) {
		$workerid = $rs['workerid'];
		$username = $rs['username'];
		$isAudio = $rs['isAudio'];
		$sex = $rs['sex'];
		$birthyear = $rs['birthyear'];
		$host = $rs['host'];
		if(empty($birthyear)){$age = "保密";}else{$age = date("Y",time("this year"))-$birthyear;}
		if($workerid<10){
			$tp=constant('UC_API')."/data/avatar/000/00/00/0".$workerid."_avatar_middle.jpg";
		}else{
			$tp=constant('UC_API')."/data/avatar/000/00/00/".$workerid."_avatar_middle.jpg";
			}
		$arr=explode("ucenter",$tp);
		$tp2="../ucenter".$arr[1];
		if(!file_exists($tp2)){
			$tp="img_xx.png";
			}
?>
		<data>
			<workerid><?=$workerid?></workerid>
			<username><?=iconv("gb2312","UTF-8",$username)?></username>
			<isAudio><?=$isAudio?></isAudio>
			<sex><?=$sex?></sex>
			<age><?=$age?></age>
			<loginhost><?=$host?></loginhost>
			<tp><?=$tp?></tp>
		</data>
<?php	}
	}
?>
</member>