<?php

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

	$RCSfile: spacecp_header_goods.php,v $
	$Revision: 1.22 $
	$Date: 2007/03/27 23:12:46 $
*/

if(!defined('IN_SUPESITE_SPACECP')) {
	exit('Access Denied');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$_SCONFIG['charset']?>" />
<title>個人空間管理</title>
<link href="<?=IMG_DIR?>/style.css" rel="stylesheet" type="text/css" />
<link href="<?=S_URL?>/images/edit/edit.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var siteUrl = "<?=S_URL?>";
</script>
<script language="javascript" type="text/javascript" src="<?=S_URL?>/images/edit/edit.js"></script>
<script language="javascript" type="text/javascript" src="<?=S_URL?>/include/js/ajax.js"></script>
<script language="javascript" type="text/javascript" src="<?=S_URL?>/include/js/common.js"></script>
<script language="javascript" type="text/javascript" src="<?=S_URL?>/include/js/menu.js"></script>
<script language="javascript" type="text/javascript" src="<?=IMG_DIR?>/common.js"></script>
<script type="text/javascript">
	var spTips = GetCookie('spTips');
	var tipText = '顯示幫助與提示信息';
	if (spTips!=1) {
		tipText = '隱藏幫助與提示信息';
	}
	function showHideTips() {
		var shTips = getbyid('shtips');
		spTips = GetCookie('spTips');
		if (spTips!=1) {
			shTips.innerHTML = '顯示幫助與提示信息'
			CreatCookie('spTips','1');
		} else {
			shTips.innerHTML = '隱藏幫助與提示信息';
			DelCookie('spTips','0')
			
		}
	}
</script>
</head>

<body onload="addMouseEvent();">
<div class="wrap">

<table id="header" summary="header" cellpadding="0" cellspacing="0" border="0" width="100%">
	<tr>
		<td>
			<div id="headertitle">
				<h1><a href="<?=S_URL?>/?<?=$_SGLOBAL['supe_uid']?>" title="回到<?=$space['spacename']?>首頁"><?=$space['spacename']?></a></h1>
				<p><?=$guide?></p>
			</div>
		</td>
		<td>
			<ul id="topmenu">
				<li>歡迎您，<a href="<?=CPURL?>?action=userspaces&op=photo"><?=stripslashes($_SGLOBAL['supe_username'])?></a> |</li>
				<li><a href="<?=S_URL?>/?<?=$_SGLOBAL['supe_uid']?>" target="_blank">我的空間首頁</a> |</li>
				<li><a href="<?=S_URL?>/" target="_blank">站點首頁</a> |</li>
				<li><a href="<?=B_URL?>/" target="_blank">進入論壇</a> |</li>
				<li><a href="<?=S_URL?>/batch.login.php?action=logout">退出</a></li>
			</ul>
			<ul id="actions">
				<li><a href="javascript:;" id="sidectrl" onclick="showContent('sidebar','sidectrl','打開側邊欄','關閉側邊欄');"><?=$sidetitle?></a></li>
				<li><a id="shtips" href="javascript:showHideTips();"><script type="text/javascript">document.write(tipText);</script></a></li>
			</ul>
		</td>
	</tr>
	<tr>
		<td colspan="2" id="menu">
			<ul>
				<?=$menustr?>
			</ul>
			<?=$popupmenustr?>
		</td>
	</tr>
</table>

<?php
$menucurrents = array('spacegoodsadd'=>'',
	'spacegoods1'=>'',
	'spacegoods2'=>'',
	'spacegoods3'=>'',
	'spacegoodsauction'=>'',
	'spacegoodsauction1' => '',
	'itemtypesadd'=>'',
	'itemtypes'=>'',
	'customfieldsadd'=>'',
	'customfields'=>''
);

if(empty($_GET['op'])) $_GET['op'] = '';
if(empty($_GET['folder'])) $_GET['folder'] = '';
if(empty($_GET['status'])) $_GET['status'] = '';
if($_GET['action'] == 'spacegoods' && empty($_GET['folder']) && empty($_GET['op'])) $_GET['folder'] = 1;
$menucurrents[$_GET['action'].$_GET['op'].$_GET['folder'].$_GET['status']] = ' class="current"';

if($_GET['op'] == 'addgoods') $menucurrents['spacegoodsadd'] = ' class="current"';

?>

<table summary="content" cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
	<td id="sidebar" style="display:<?=$sidedisplay?>;">
		<div>
			<ul>
				<li><a href="<?=CPURL?>?action=spacegoods&folder=1"<?=$menucurrents['spacegoods1']?>>出售中的商品</a></li>
				<li><a href="<?=CPURL?>?action=spacegoods&folder=2"<?=$menucurrents['spacegoods2']?>>倉庫中的商品</a></li>
				<li><a href="<?=CPURL?>?action=spacegoods&folder=3"<?=$menucurrents['spacegoods3']?>>過期的商品</a></li>
				<li><a href="<?=CPURL?>?action=spacegoods&op=add"<?=$menucurrents['spacegoodsadd']?>>添加商品</a></li>
			</ul>
		</div>
		<div>
			<ul>
				<li><a href="<?=CPURL?>?action=spacegoods&op=auction&status="<?=$menucurrents['spacegoodsauction']?>>我的全部競拍</a></li>
				<li><a href="<?=CPURL?>?action=spacegoods&op=auction&status=1"<?=$menucurrents['spacegoodsauction1']?>>競拍成功\的商品</a></li>
			</ul>
		</div>
		<div>
			<ul>
				<li><a href="<?=CPURL?>?action=itemtypes&type=goods&op=add"<?=$menucurrents['itemtypesadd']?>>添加商品分類</a></li>
				<li><a href="<?=CPURL?>?action=itemtypes&type=goods"<?=$menucurrents['itemtypes']?>>管理商品分類</a></li>
			</ul>
		</div>
		<div>
			<ul>
				<li><a href="<?=CPURL?>?action=customfields&type=goods&op=add"<?=$menucurrents['customfieldsadd']?>>添加商品自定義信息</a></li>
				<li><a href="<?=CPURL?>?action=customfields&type=goods"<?=$menucurrents['customfields']?>>管理商品自定義信息</a></li>
			</ul>
		</div>
	</td>
	<td id="mainarea">

