<?php
if(!defined('InEmpireCMS'))
{
	exit();
}
$r=$uu;//防止$r被占用

//--------------- 界面参数 ---------------

//会员界面附件地址前缀
$memberskinurl=$public_r['newsurl'].'skin/member/images/';

//LOGO图片地址
$logoimgurl=$memberskinurl.'logo.jpg';

//加减号图片地址
$addimgurl=$memberskinurl.'add.gif';
$noaddimgurl=$memberskinurl.'noadd.gif';

//上下横线背景色
$bgcolor_line='#324F4F';

//其它色调可修改CSS部分

//--------------- 界面参数 ---------------

if($user[userid]){
	$r=ReturnUserInfo($user[userid]);
	$addr=$empire->fetch1("select * from {$dbtbpre}enewsmemberadd where userid='".$user[userid]."' limit 1");
	$userpic=$addr['userpic']?$addr['userpic']:$public_r[newsurl].'e/data/images/nouserpic.gif';
}



//网页标题
$thispagetitle=$public_diyr['pagetitle']?$public_diyr['pagetitle']:'会员中心';
//会员信息
$tmgetuserid=(int)getcvar('mluserid');	//用户ID
$tmgetusername=RepPostVar(getcvar('mlusername'));	//用户名
$tmgetgroupid=(int)getcvar('mlgroupid');	//用户组ID
$tmgetgroupname='游客';
//会员组名称
if($tmgetgroupid)
{
	$tmgetgroupname=$level_r[$tmgetgroupid]['groupname'];
	if(!$tmgetgroupname)
	{
		include_once(ECMS_PATH.'e/data/dbcache/MemberLevel.php');
		$tmgetgroupname=$level_r[$tmgetgroupid]['groupname'];
	}
}

//模型
$tgetmid=(int)$_GET['mid'];
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?=$thispagetitle?></title>
<link href="<?=$public_r[newsurl]?>skin/v3/t.css" rel="stylesheet" />
<style>
/*顶部导航*/
.topbg{height:30px; line-height:30px; border-bottom:1px solid #EBEBEB; background:#fdfdfd; width:100%; }
#topnav{width:980px; margin:0 auto;}
.tn1{padding-left:5px; width:900px; float:left;}
.tn1 a{padding:0 5px;}
.tn2{padding-right:5px; width:0px; text-align:right; float:right;}

/*分页样式*/
.epages{margin:3px 0;font:11px/12px Tahoma}
.epages *{vertical-align:middle;}
.epages a{padding:1px 4px 1px;border:1px solid #A6CBE7;margin:0 1px 0 0;text-align:center;text-decoration:none;font:normal 12px/14px verdana;}
.epages a:hover{border:#659B28 1px solid;background:#f3f8ef;text-decoration:none;color:#004c7d}
.epages input{margin-bottom:0px;border:1px solid #659B28;height:15px;font:bold 12px/15px Verdana;padding-bottom:1px;padding-left:1px;margin-right:1px;color:#659B28;}
</style>

</head>

<body leftmargin="0" topmargin="0">
<!-- topnav start -->
<div class="topbg">
  <div id="topnav">
    <div class="tn1"><script src="<?=$public_r['newsurl']?>e/member/login/loginjs.php"></script></div>
    <div class="tn2">
    </div>
    <span class="clear"></span>
  </div>
</div>
<!-- topnav end -->

<?php 
include(ECMS_PATH.'inpage/head.html');
include(ECMS_PATH.'inpage/menu.html');
?>
<div class="blank15"></div>
<div class="w990">
  <div class="memberside">
	<?php
	if($tmgetuserid)	//已登录
	{
	?>
	<div class=author>
	  <div class="author_info"><span><?=$user[username]?></span>(<?=$level_r[$r[groupid]][groupname]?>)</div>
	  <div class="author_info">积分：<?=$r[userfen]?></div>
	  <div class="author_picture"><img src="<?=$userpic?>"></div>
	  <div class="authortag"><a href="<?=$public_r['newsurl']?>e/member/EditInfo/" class="show">设置</a><a href="<?=$public_r['newsurl']?>e/member/doaction.php?enews=exit" onclick="return confirm('确认要退出?');">退出</a></div>
	</div>

	<div class="left_menu">
	  <dl>
		<dd><a href="<?=$public_r['newsurl']?>e/member/cp/" class="menu_current" _menu_current="1">个人中心</a></dd>
	  </dl>
	  <?
		if($level_r[$r[groupid]][tg]){
	  ?>
	  <dl>
	  <dt>投稿管理</dt>
		<dd><a href="<?=$public_r['newsurl']?>e/DoInfo/ChangeClass.php?mid=1" class="">创建新作</a></dd>
		<dd><a href="<?=$public_r['newsurl']?>e/DoInfo/ListInfo.php?mid=1" class="">作品列表</a></dd>
		<dd><a href="<?=$public_r['newsurl']?>e/DoInfo/ChangeBook.php" class="">增加章节</a></dd>
	  </dl>
	  <?
		}
	  ?>
	  <dl>
	  <dt>站内应用</dt>
		<dd><a href="<?=$public_r['newsurl']?>e/member/fava/" class="">我的书架</a></dd>
		<dd><a href="<?=$public_r['newsurl']?>e/member/fava/q/" class="">我的书签</a></dd>
	  </dl>
	  <?
		if(!$public_r[openspace]){
	  ?>
	  <dl>
		<dt>个人空间</dt>
		<dd><a href="<?=$public_r['newsurl']?>e/member/mspace/SetSpace.php">设置空间</a></dd>
		<dd><a href="<?=$public_r['newsurl']?>e/member/mspace/ChangeStyle.php">选择模板</a></dd>
	  </dl>
	  <?
		}
	  ?>
	  
	  <dl>
		<dt>沟通与反馈</dt>
		<dd><a href="<?=$public_r['newsurl']?>e/member/msg/">消息列表</a></dd>
		<dd><a href="<?=$public_r['newsurl']?>e/member/msg/AddMsg/?enews=AddMsg">发送消息</a></dd>
 
	  </dl>
	  <dl>
		<dt>财务管理</dt>
		<dd><a href="<?=$public_r['newsurl']?>e/payapi/">在线支付</a></dd>
		<dd><a href="<?=$public_r['newsurl']?>e/member/buygroup/">在线充值</a></dd>
		<dd><a href="<?=$public_r['newsurl']?>e/member/card/">点卡充值</a></dd>
		<dd><a href="<?=$public_r['newsurl']?>e/member/buybak/">点卡充值记录</a></dd>
		<dd><a href="<?=$public_r['newsurl']?>e/member/downbak/">下载消费记录</a></dd>
	  </dl>
	</div>


	<?php
	}
	else	//游客
	{
	?>
欢迎光临！
	<?php
	}
	?>
	<div class="clear"></div>

	
  </div>
  <div class="membercontent">
	<div class="mmeberychd">
	  <h1><?=$public_diyr['pagetitle']?></h1>
	  <span><?=$woinput?></span>
	</div>
	<div class="mmeberycon">