<?php
CURSCRIPT != 'wap' && exit('FORBIDDEN');
$user   = isset($user) 	 ? checkhtml($user) : '';
$id 	= isset($id) 	 ? intval($id) 		: '';

$seo = get_seoset();
$rewrite = $seo['seo_force_space'];

if(empty($user)){
	return404();
}

$where  = "WHERE a.userid = '$user'";
$space	= $db -> getRow("SELECT a.* FROM `{$db_mymps}member` AS a $where");
if(!$space){
	return404();
}

$space['if_corp'] = $mymps_global['cfg_if_corp'] != 1 ? 0 : $space['if_corp'];
$space['storeuri'] = $space['if_corp'] == 1 ? Rewrite('store',array('uid'=>$space['id'])) : '';	

$space['uri'] 	 = Rewrite('space',array('user'=>$user,'part'=>'index'));
$space['prelogo'] = $space['prelogo'] ? $space['prelogo'] : '/images/noavatar_small.gif';

$loc 		= get_location('space','',$user);
$location 	= $loc['location'];
$page_title = $loc['page_title'];

globalassign();
include mayi_tpl('space');
?>