<?php
if(!defined('InEmpireCMS'))
{
	exit();
}

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

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

//上下横线背景色
$bgcolor_line='#06A74A';

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

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


//识别并显示当前菜单
function EcmsShowThisMemberMenu(){
	global $memberskinurl,$noaddimgurl;
	$selffile=eReturnSelfPage(0);
	if(stristr($selffile,'/member/msg'))
	{
		$menuname='menumsg';
	}
	elseif(stristr($selffile,'e/DoInfo'))
	{
		$menuname='menuinfo';
	}
	elseif(stristr($selffile,'/member/mspace'))
	{
		$menuname='menuspace';
	}
	elseif(stristr($selffile,'e/ShopSys'))
	{
		$menuname='menushop';
	}
	elseif(stristr($selffile,'e/payapi')||stristr($selffile,'/member/buygroup')||stristr($selffile,'/member/card')||stristr($selffile,'/member/buybak')||stristr($selffile,'/member/downbak'))
	{
		$menuname='menupay';
	}
	else
	{
		$menuname='menumember';
	}
	echo'<script>turnit(do'.$menuname.',"'.$menuname.'img");</script>';
	?>
	<script>
	do<?=$menuname?>.style.display="";
	document.images.<?=$menuname?>img.src="<?=$noaddimgurl?>";
	</script>
	<?php
}

//网页标题
$thispagetitle=$public_diyr['pagetitle']?$public_diyr['pagetitle']:'会员中心';
//会员信息
$tmgetuserid=(int)getcvar('mluserid');	//用户ID
$tmgetusername=RepPostVar(getcvar('mlusername'));	//用户名
$tmgetgroupid=(int)getcvar('mlgroupid');	//用户组ID
$tmgetgroupname='游客';

$tuserpic='';
if($tmgetuserid)	//已登录
	{
$addar=$empire->fetch1("select * from {$dbtbpre}enewsmemberadd where userid='".$tmgetuserid."' limit 1");
//头像
$tuserpic=$addar['userpic']?$addar['userpic']:$public_r[newsurl].'e/data/images/nouserpic.gif';
	}
//会员组名称
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 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" />
<title><?=$thispagetitle?> - <?=$public_r['sitename']?></title>
<link href="/templets/member/common/css/common.css" rel="stylesheet" type="text/css" />
<link href="/templets/member/common/css/member.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/templets/member/common/js/jquery.js"></script>
</head>
<body><!--头部开始-->
<div id="tool">
  <div class="tool_content">
   <?
require(ECMS_PATH.'e/template/incfile/head.php');
?>
    <dl>
      <dt>
         <?php
	if($tmgetuserid)	//已登录
	{
	?>
      	       <a href="<?=$public_r['newsurl']?>e/member/cp/" class="member_base"> <img src="<?=$tuserpic?>" /> <span><?=$tmgetusername?></span> </a>
        <ul>
          <li><a href="<?=$public_r['newsurl']?>e/member/cp/">管理中心</a></li>
          <li><a href="<?=$public_r['newsurl']?>e/space/?userid=<?=$tmgetuserid?>">我的主页</a></li>
          <li><a href="<?=$public_r['newsurl']?>e/member/doaction.php?enews=exit" onClick="return confirm('确认要退出?');">退　　出</a></li>
        </ul>
        <?
	}else{
		?> <a class="l" href="<?=$public_r['newsurl']?>e/member/login/">登录</a>
         <a class="l" href="<?=$public_r['newsurl']?>e/member/register/">注册</a>
        <?
	}
	?>
              </dt>
    </dl>
  </div>
</div>
<div class="tool_clear"></div>
<script type="text/javascript">
$(function(){
	//个人资料下拉
	$(".tool_content dt").hover(
		function(){
			$(this).children("ul").show();
		},
		function(){
			$(this).children("ul").hide();
		}
	);
});
</script>
<!--头部结束--><div id="main">
<?
if(empty($login)){
	$membercontact=str_replace('\"','"',$public_r['add_member-lefttext']);
?>
    <div class="left-warp">
    <div id="left">
        <dl class="menu">
            <dt><div>文章管理</div><a href="<?=$public_r['newsurl']?>e/DoInfo/ChangeClass.php?mid=1">发布文章</a>|<a href="<?=$public_r['newsurl']?>e/DoInfo/ListInfo.php?mid=1">我的文章</a></dt>
            <dt><div>日记管理</div><a href="<?=$public_r['newsurl']?>e/DoInfo/ChangeClass.php?mid=1&classid=3">写日记</a>|<a href="<?=$public_r['newsurl']?>e/DoInfo/ListInfo.php?mid=1&classid=3">我的日记</a></dt>
            <dd><a href="<?=$public_r['newsurl']?>e/member/msg/">短消息 </a></dd>
            <dd><a href="<?=$public_r['newsurl']?>e/member/comment/">评论管理</a></dd>
            <dd><a href="<?=$public_r['newsurl']?>e/member/mspace/gbook.php">留言管理</a></dd>
            <dd><a href="<?=$public_r['newsurl']?>e/member/fava/">我的收藏</a></dd>
            <dd><a href="<?=$public_r['newsurl']?>e/member/mspace/SetSpace.php">空间设置</a></dd>
            <dd><a href="<?=$public_r['newsurl']?>e/member/EditInfo/">个人设置</a></dd>
        </dl>
    </div>
    
    <div class="wx-box">
    	<div class="wx-title">联系小编</div>
        <?=$membercontact?>
    </div>
</div>    <div id="right">

<?
}
?>