<?php
	!defined('DIRCMS_MEMBER') && 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=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>会员中心 - Powered by DirCMS</title>
<base href="<?php echo $DIRCMS['site_url'];?>" />
<link href="member/template/images/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="images/js/jquery.min.js"></script>
<script language="javascript">
$(document).ready(function(){
	if(<?php echo $_message;?>)
	{
		$('#tgmsg').show('slow');
	}
});
</script>
</head>
<body>
<div class="tgmsg" id="tgmsg"><img src="member/template/images/sms.gif" /> <a href="member/index.php?file=msg&action=inbox">您有<?php echo $_message;?>条新信息,不要错过哦！</a></div>
<div id="warp">
<div id="header">
<div id="logo">
<h1><a href="member">会员中心</a></h1>
</div>
<div class="menu"><a href="<?php echo $DIRCMS['site_url'];?>" target="_blank">网站主页</a> | <a href="post/">我要投稿</a> | <a href="wap/">WAP</a> | <a href="space/index.php?id=<?php echo $_userid?>" target="_blank">我的空间</a> <?php if($_groupid==1){?>| <a href="<?php echo ADMIN_FILE;?>" target="_blank">系统设置</a><?php }?> | <a href="member/index.php?file=login&action=logout">退出</a></div>
<div id="nav">
<ul class="clearfix">
<li class="first"><a href="space/index.php?id=<?php echo $_userid?>" target="_blank">我的空间</a></li>
<li class="home"><a href="member/index.php">管理首页</a></li>
<?php if(!$module['msg']['disabled']){?><li class="li"><a href="member/index.php?file=msg&action=inbox">短消息</a></li><?php }?>
<?php if(!$module['content']['disabled']){?><li><a href="member/index.php?file=content&action=manage">信息管理</a></li><?php }?>
<?php if(!$module['collection']['disabled']){?><li class="li"><a href="member/index.php?file=user&action=collect">收藏夹</a></li><?php }?>
<li class="li"><a href="space/index.php?id=<?php echo $_userid?>"> &nbsp;&nbsp;&nbsp;我的空间</a></li>
<li><a href="<?php echo $DIRCMS['site_url'];?>">网站首页</a></li>
</ul>
</div>
</div>
<div class="container clearfix">
<div id="sidebar">
<div class="box">
<?php if(!$module['info']['disabled']){?>
<h2 class="title">我的资料</h2>
<div class="menu">
<ul>
<li><img src="member/template/images/profile.gif" /><a href="member/index.php?file=user&action=editphoto">修改头像</a></li>
<li><img src="member/template/images/edit.gif" /><a href="member/index.php?file=user&action=edit">修改资料</a><em><a href="member/index.php?file=user&action=editpsw">修改密码</a></em></li>
</ul>
</div>
<?php }?>
<?php if(!$module['content']['disabled']){?>
<h2 class="title">信息管理</h2>
<div class="menu">
<ul>
<?php foreach($leftmenu as $_r){?>
	<li><img src="member/template/images/list.gif" /><a href="member/index.php?file=content&action=manage&catid=<?php echo $_r['id'];?>"><?php echo $_r['categoryname'];?></a><em><a href="member/index.php?file=content&action=add&catid=<?php echo $_r['id'];?>">发布</a></em></li>
<?php }?>
</ul>
</div>
<?php }?>
<?php if(!$module['yp']['disabled']){?>
<?php if(in_array($_gradeid,$usepriv) || $_groupid==1){?>
<h2 class="title">商家黄页</h2>
<div class="menu">
<ul>
	<li><img src="member/template/images/list.gif" /><a href="member/index.php?file=user&action=space">商家信息</a><em><a href="member/index.php?file=user&action=space_edit">设置</a></em></li>
	<?php if($_iscompmayed){?>
	<?php if(in_array($_gradeid,$newspriv) || $_groupid==1){?> 
	<li><img src="member/template/images/list.gif" /><a href="member/index.php?file=co_content&action=news_manage">商家新闻</a><em><a href="member/index.php?file=co_content&action=news_add">发布</a></em></li>
	<?php }?>
	<?php if(in_array($_gradeid,$productpriv) || $_groupid==1){?>
	<li><img src="member/template/images/list.gif" /><a href="member/index.php?file=co_content&action=product_manage">产品管理</a><em><a href="member/index.php?file=co_content&action=product_add">发布</a></em></li>
	<?php }?>
	<?php if(in_array($_gradeid,$couponpriv) || $_groupid==1){?>
	<li><img src="member/template/images/list.gif" /><a href="member/index.php?file=co_content&action=coupon_manage">优惠动态</a><em><a href="member/index.php?file=co_content&action=coupon_add">发布</a></em></li>
	<?php }?>
	<li><img src="member/template/images/list.gif" /><a href="member/index.php?file=co_guestbook&action=manage">留言管理</a><em><a href="member/index.php?file=co_guestbook&action=manage&ispassed=0">审核</a></em></li>
	<?php }?>
</ul>
</div>
<?php }?>
<?php }?>
<?php if(!$module['pay']['disabled']){?>
<h2 class="title">支付中心</h2>
<div class="menu">
<ul>
<li><img src="member/template/images/poll.gif" /><a href="member/index.php?file=account&action=payonline">在线充值</a></li>
<li><img src="member/template/images/money.gif" /><a href="member/index.php?file=account&action=paybycard">点卡充值</a></li>
<li><img src="member/template/images/card.gif" /><a href="member/index.php?file=account&action=buypoint">购买点数</a></li>
<li><img src="member/template/images/cart.gif" /><a href="member/index.php?file=account&action=paylog" target="_blank">充值记录</a></li>
<?php if(!$module['order']['disabled']){?>
<li><img src="member/template/images/event.gif" /><a href="member/index.php?file=account&action=buylog">交易记录</a></li>
<li><img src="member/template/images/record.gif" /><a href="member/index.php?file=order&action=manage">订单管理</a></li>
<?php }?>
</ul>
</div>
<?php }?>
<div class="menu">
<ul>
<li><img src="member/template/images/out.gif" /><a href="member/index.php?file=login&action=logout">退出登陆</a></li>
</ul>
</div>
</div>
</div>

<div id="content">
<div class="content_main">
<div class="clearfix" id="user">
<div class="user_img"> <img src="<?php echo $_facephoto;?>" alt="<?php echo $_username.'的头像';?>"  title="<?php echo $_username.'的头像';?>" width="120" height="120" /></div>
<div class="user_info">
<h3 class="title"><em><?php echo $_username;?></em>，欢迎回来！ <span><a href="member/index.php?file=msg&action=inbox"><?php echo max(0,$_message);?></a></span></h3>
<p>你目前拥有 <?php echo $_point;?> 个点数，帐户余额 <?php echo $_amount;?> 元</p>
<ul>
<li>会员类型：<?php echo $membertype;?> </li>
<li>注册时间：<?php echo date('Y-m-d H:i:s',$_regtime);?></li>
<li>个人空间：<a href="space/index.php?id=<?php echo $_userid?>" target="_blank">进入空间</a></li>
<li><input type="button" class="yl_btn" onclick="window.open('<?php echo $DIRCMS['site_url'];?>member/index.php?file=content&action=manage&catid=116')" value="管理团购" />&nbsp;&nbsp; <input type="button" class="yl_btn" onclick="window.open('<?php echo $DIRCMS['site_url'];?>member/index.php?file=content&action=sign')" value="团购报名" />
<?php if($_iscompmayed){?>
&nbsp;&nbsp; <input type="button" class="yl_btn" onclick="window.open('<?php echo $DIRCMS['site_url'];?>member/index.php?file=user&action=myyp')" value="更新店铺" />
<?php }?>
</li>
</ul>
</div>
</div>
<div class="fava">
<div class="tabs_header">
<ul class="tabs clearfix">
<li class="active"><a href="member/index.php?file=content&action=manage">我发布的信息</a></li>
<?php if(!$module['pay']['disabled']){?>
<li><a href="member/index.php?file=account&action=payonline">在线充值</a></li>
<li><a href="member/index.php?file=account&action=paybycard">点卡充值 </a></li>
<?php }?>
</ul>
</div>
<div class="display">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_title">
<tbody>
<tr>
<td class="infotitle">标题</td>
<td class="click">点击</td>
<td class="time">发布时间</td>
</tr>
</tbody>
</table>
<?php if(is_array($result))foreach($result as $val){?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_list">
<tbody>
	<tr>
		<td class="infotitle"><a href="<?php echo $DIRCMS['site_url'].$val['url'];?>" target="_blank"><font <?php echo $val['style']?'style="'.$val['style'].'"':'style="font-size:12px"';?>><?php echo htmlspecialchars($val['title']);?></font></A> &nbsp;<?php echo $val['thumb']?'<font color="#ff0000">图</font>':'';?>&nbsp;<?php echo $val['posid']?'<font color="#00ff00">荐</font>':'';?></td>
		<td class="click"><?php echo $val['clicks'];?></td>
		<td class="time"><?php echo date('Y-m-d',$val['inputtime']);?></td>
	</tr>
</tbody>
</table>
<?php }?>
</div>
</div>
</div>
<div class="content_sub">
<div class="box">
<h2 class="title">网站公告</h2>
<div class="line"></div>
<div class="user_list" style="height:120px">
<ul class="clearfix">
<?php $i=1;if($notice)foreach($notice as $val){?>
	<li><span style="float:left"><a href="member/index.php?file=main&action=read_notice&id=<?php echo $val['id'];?>" title="<?php echo $val['title'];?>" target="_blank"><?php echo $i;?>.<?php echo sub_string(strip_tags($val['title']),60,'...');?></a></span><span style="float:right"><?php echo date('m-d',$val['time']);?></span></li>
<?php $i++;}else{echo '<li>暂无公告！</li>';}?>
</ul>
</div>
</div>
<div class="box" id="search_user">
<h2 class="title">站内搜索</h2>
<div class="line"></div>
<div class="pad">
<form action="member/?" method="get" name="search" class="clearfix">
<input type="hidden" name="file" value="content"> 
<input type="hidden" name="action" value="manage">
<input name="k" type="text" value="搜索关键字" id="keyboard" size="20" class="input_text" />
<input type="submit" name="Submit" value="搜 索" class="input_sub" />
</form>
<p><a href="member/index.php?file=content&action=manage">我发布的信息</a>| <a href="member/index.php?file=content&action=manage">我的收件箱</a></p>
</div>
</div>
</div>
</div>

</div>
<div id="footer">
<p><a href="<?php echo $DIRCMS['site_url'];?>" target="_blank">Site Home</a> - <a href="<?php echo $DIRCMS['site_url'];?>about/connectus.html" target="_blank">联系我们</a> - <?php echo $DIRCMS['icpno'];?></p>
<p>Powered by <strong><a href="http://www.dircms.net/" target="_blank">DirCMS</a></strong> &copy; 2009-<?php echo date('Y');?>&nbsp;
Dircms Inc.</p>
</div>
</div>
</body>
</html>