<?php
include "../core.php";
if ( empty( $_REQUEST['uid'] ) || !is_numeric( $_REQUEST['uid'] ) ) {
		include SAXUE_WEB_PATH . "/404.php";
} 
include SAXUE_WEB_PATH . "/header.php";
$saxueTset['saxue_page_template'] = SAXUE_THEME_PATH . "/space/home.html";
$saxueTset['saxue_page_cacheid'] = $_REQUEST['uid'];
if ( SAXUE_USE_CACHE ) {
		$saxueTpl -> setcaching( 1 );
} else {
		$saxueTpl -> setcaching( 0 );
} 
if ( !SAXUE_USE_CACHE || !$saxueTpl -> is_cached( $saxueTset['saxue_page_template'], $saxueTset['saxue_page_cacheid'] ) ) {
		/* 用户信息 */
		include SAXUE_ROOT_PATH . "/model/member_users.php";
		$users_handler = &saxuememberusershandler :: getinstance( "saxuememberusershandler" );
		$saxueUsers = $users_handler -> get( $_REQUEST['uid'] );
		if ( !is_object( $saxueUsers ) ) {
				include SAXUE_WEB_PATH . "/404.php";
		} 
		include SAXUE_ROOT_PATH . "/model/member_userdata.php";
		$userdata_handler = &saxuememberuserdatahandler :: getinstance( "saxuememberuserdatahandler" );
		$saxueUserdata = $userdata_handler -> get( $_REQUEST['uid'] );
		$user = $saxueUsers -> getvars( "n" ) + $saxueUserdata -> getvars( "n" );
		$user['uavatar'] = saxue_geturl( 'user_avatar', $_REQUEST['uid'], 'l', $user['avatar'] );
		$user['uhome'] = saxue_geturl( 'user_home', $_REQUEST['uid'] );
		$saxueTpl -> assign_by_ref( "user", $user );
		$saxueTpl -> assign( "uid", $_REQUEST['uid'] );
		/* 用户信息 */
		$saxueTpl -> assign( "spacenav", 'home' );
}
include SAXUE_ROOT_PATH . "/common/funstat.php";
saxue_visit_stat( $_REQUEST['uid'], 'member_users', 'views', 'uid' );
include SAXUE_WEB_PATH . "/footer.php";