<?php

/*
	[SupeSite/X-Space] (C)2001-2006 Comsenz Inc.
	個人管理頁面首頁

	$RCSfile: spacecp_home.php,v $
	$Revision: 1.32 $
	$Date: 2006/11/01 01:52:11 $
*/

if(!defined('IN_SUPESITE')) {
	exit('Access Denied');
}

//用戶信息與論壇進行自動同步
$query = $_SGLOBAL['db']->query('SELECT * FROM '.tname('members', 1).' WHERE uid=\''.$_SGLOBAL['supe_uid'].'\'');
if($member = $_SGLOBAL['db']->fetch_array($query)) {
	$setsqlarr = array(
		'uid' => $member['uid'],
		'groupid' => $member['groupid'],
		'username' => addslashes($member['username']),
		'password' => $member['password'],
		'secques' => $member['secques'],
		'timeoffset' => $member['timeoffset'],
		'dateformat' => $member['dateformat'],
		'timeformat' => $member['timeformat'],
		'havespace' => '1',
		'newpm' => $member['newpm']
	);
	replacetable('members', $setsqlarr);
	if(empty($member['xspacestatus'])) {
		$_SGLOBAL['db']->query('UPDATE '.tname('members', 1).' SET xspacestatus=\'1\' WHERE uid=\''.$_SGLOBAL['supe_uid'].'\'');
	}
}

//公告
if (strpos('str_'.$_SCONFIG['allowannounce'], 'back')) {
	@include_once(S_ROOT.'./data/system/announcement.cache.php');
	$sitemsg = '';
	if (!empty($_SGLOBAL['announcement'])) {
		foreach ($_SGLOBAL['announcement'] as $key => $listvalue) {
			$sitemsg .= '<li><a href="'.geturl('action/announcement/id/'.$listvalue['id']).'" target="_blank">'.$listvalue['subject'].'</a></li>';
		}
	}
}

setcookie('ss_openmenu', '1');

?>

<div class="block">
當前位置: <a href="<?=$siteurl?>/?<?=$_SGLOBAL['supe_uid']?>">我的空間</a> &gt;&gt; <a href="<?=$siteurl?>/spacecp.php">空間管理</a> &gt;&gt; 面板首頁
</div>

<?php if (!empty($sitemsg)) {?>
<div class="notice">
	<strong>站點最新公告：</strong>
	<ul>
		<?=$sitemsg?>
	</ul>
</div>
<?php }?>

<div class="block">
	<ul class="welcomepanel">
		<li><a href="<?=S_URL?>/?<?=$_SGLOBAL['supe_uid']?>">瀏覽我的空間首頁</a></li>
		<?if($_SGLOBAL['group']['groupid'] == 1) {?><li><a href="<?=S_URL?>/admincp.php" style="color:red;">進入站點管理平台</a></li><?}?>
		<?if($allows['blog']) {?><li><a href="<?CPURL?>?action=spaceblogs&op=add">發佈日誌</a></li><?}?>
		<?if($allows['image']) {?><li><a href="<?CPURL?>?action=spaceimages&op=add">上傳圖片</a></li><?}?>
		<?if($allows['goods']) {?><li><a href="<?CPURL?>?action=spacegoods&op=add">發佈商品</a></li><?}?>
		<?if($allows['link']) {?><li><a href="<?CPURL?>?action=spacelinks&op=add">添加書籤</a></li><?}?>
		<?if($allows['file']) {?><li><a href="<?CPURL?>?action=spacefiles&op=add">發佈文件</a></li><?}?>
		<li><a href="<?CPURL?>?action=usertemplates">我的模板</a></li>
	</ul>
</div>
