<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<dates>
<?php
include_once("../config.php");

	if(empty($_REQUEST["uuid"])){exit();}
	$uuid=$_REQUEST["uuid"];

$con=mysql_connect($_SC['dbhost'],$_SC['dbuser'],$_SC['dbpw']);
mysql_select_db($_SC['dbname'],$con);
mysql_query("set names'utf8'");
$tablename1=$_SC['tablepre']."space";
$tablename2=$_SC['tablepre']."spacefield"; 
$tablename3=$_SC['tablepre']."session"; 
$result=mysql_query("select s.uid, s.username, s.groupid, s.credit, sf.sex, sf.birthyear, sf.marry, sf.email, sf.mobile, se.host, sf.note, sf.qq from $tablename1 s left join $tablename2 sf on s.uid = sf.uid left join $tablename3 se on s.uid = se.uid where s.uid=$uuid");
while($row=mysql_fetch_array($result)){

$name=$row['username'];
$uid=$row['uid'];
if($uid<10){
	$tp=constant('UC_API')."/data/avatar/000/00/00/0".$uid."_avatar_middle.jpg";
	if(!file_exists("../Ucenter/data/avatar/000/00/00/0".$uid."_avatar_middle.jpg")){$tp="img/ooxx.png";}
}else{
    $tp=constant('UC_API')."/data/avatar/000/00/00/".$uid."_avatar_middle.jpg";
	if(!file_exists("../Ucenter/data/avatar/000/00/00/".$uid."_avatar_middle.jpg")){$tp="img/ooxx.png";}
}



if($row['groupid']==5){
	$groupid="普通";
}elseif($row['groupid']==3){
	$groupid="VIP";
	}else{
		$groupid="呵呵";
	}

$credit=$row['credit'];

if($row['sex']==1){
	$sex="男";
}elseif($row['sex']==2){
	$sex="女";
	}else{
		$sex="保密";
}

if(empty($row['birthyear'])){
	$age="保密";
	}else{
		$age=date("Y",time("this year"))-$row['birthyear'];
		}

if($row['marry']==2){
	$marry="已婚";
}elseif($row['marry']==1){
	$marry="未婚";
}else{
	$marry="保密";
}

if(empty($row['note'])){
	$note="想交个知心朋友...";
	}else{
		$note=$row['note'];
		}


if(empty($row['email'])){
	$email="无";
}else{
	$email=$row['email'];
}

if(empty($row['qq'])){
	$qq="无";
}else{
	$qq=$row['qq'];
}

if(empty($row['mobile'])){
	$mobile="无";
}else{
	$mobile=$row['mobile'];
}

$host = $row['host'];
?>

<date>
<uuid><?=$uid?></uuid>
<tp><?=$tp?></tp>
<groupid><?=$groupid?></groupid>
<credit><?=$credit?></credit>
<uuname><?=$name?></uuname>
<sex><?=$sex?></sex>
<age><?=$age?></age>
<marry><?=$marry?></marry>
<note><?=$note?></note>
<email><?=$email?></email>
<qq><?=$qq?></qq>
<mobile><?=$mobile?></mobile>
<host><?=$host?></host>
</date>

<?php
}
?>
</dates>