<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>会员信息</title>
		<link rel="stylesheet" href="<?php echo WEBURL ?>/public/global/layui/css/layui.css">
	  	<link rel="stylesheet" type="text/css" href="<?php echo WEBURL ?>/public/user/style.css"/>
	  	<script type="text/javascript" src="<?php echo WEBURL ?>/public/global/jquery/1.11.1/jquery.min.js" ></script>
	  	<script type="text/javascript" src="<?php echo WEBURL ?>/public/global/layui/layui.js"></script>
	</head>
	<style>
		.bind{
			position: absolute;
			right: 0;
			top: 40%;
			margin-right: 10px;
		}
		.bind a{
			background-color: #ff5722;
			color: #FFF;
			padding: 5px 10px;
			border-radius: 5px;
			font-weight: bold;
			font-size: 14px;
		}
		.bind a:hover{
			background-color: #F43838;
		}
		red{
			color: red;
			margin: 0 10px;
		}
	</style>
	<body>
		<div class="body">
			<div class="default_user">
				<div class="default_user_logo">
					<?php 
						if(C('MYDB.thumb')){
							$thumb=get_img_url(C('MYDB.thumb'));
						}else{
							$thumb="/public/global/images/face.jpg";
						}
					?>
					<img src="<?php echo $thumb ?>" />
				</div>
				<div class="default_user_info">
					<div>
						<?php echo C('MYDB.username') ?>
						<span>uid:<?php echo C('MYDB.uid') ?></span>
					</div>
					<div>
						<span>email:<?php echo C('MYDB.email') ?></span>
						<span>注册时间:<?php echo date('Y-m-d H:i:s',C('MYDB.regtime')) ?></span>
						<span>积分:<red><?php echo  C('MYDB.integral') ?></red>个</span>
					</div>
					<div>
						<span>上次登录时间:<?php echo  date('Y-m-d H:i:s',C('MYDB.lasttime')) ?></span>
						<span>上次登录IP:<?php echo C('MYDB.lastip') ?></span>
					</div>
					
				</div>
				<?php if($more_login_list){ ?>
				<div class="bind">
					<?php foreach($more_login_list AS $key=> $row){ ?>
					<?php if(!C('MYDB.'.$row['match_field'])){ ?>
					<a href="/user/bind/go_to/name/<?php echo $key ?>">绑定<?php echo $row[name] ?></a>
					<?php } ?>
					<?php } ?>
				</div>
				<?php } ?>
			</div>
			<div class="default_num">
				<dt>您共发布过：</dt>
				<dl>
					<dd>总文章 ：<span class="green"><?php echo $Article_NUM ?></span> 篇</dd>
					<dd>未通过审核的 ：<span class="green"><?php echo $Article_NUM_Noyz ?></span> 篇</dd>
				</dl>
				<dl>
					<dd>总评论： <span class="green"><?php echo $comment_NUM ?></span> 条</dd>
					<dd>未通过审核的 ：<span class="green"><?php echo $comment_NUM_Noyz ?></span> 篇</dd>
				</dl>
			</div>
			<div class="default_news">
				<div class="">
					<dd>
						发布的文章
					</dd>
					<ul>
						<?php foreach (	M($index['table'].'article','uid='.C('MYDB.uid'),'DESC','aid','10') as $row) { ?>
							<li><?php if($row[state]){ ?>
								<span class="green">【已审】</span>
								<?php }else{ ?>
									<span class="red">【待审】</span>
								<?php } ?>
								<a href="<?php echo U(['aid'=>$row[aid],'cid'=>$row[cid]],$module) ?>" target="_blank"><?php echo Get_word_strpos($row[title],20) ?></a>
								<span style="float: right; color: #aaa; font-size: 12px;"><?php echo date('Y-m-d H:i:s',$row[posttime]) ?></span>
							</li>
						<?php } ?>
						
					</ul>
				</div>
				<div>
					<dd>
						发布的评论
					</dd>
					<ul>
						<?php foreach (	M($index['table'].'comment','uid='.C('MYDB.uid'),'DESC','aid','10') as $row) { ?>
							<li><?php if($row[state]){ ?>
								<span style='color:green'>【已审】</span>
								<?php }else{ ?>
									<span style='color:red'>【待审】</span>
								<?php } ?>
								<a href="#" title="<?php echo $row[content]?>" target="_blank"><?php echo Get_word_strpos($row[content],20) ?></a>
								<span style="float: right; color: #aaa; font-size: 12px;"><?php echo date('Y-m-d H:i:s',$row[posttime]) ?></span>
							</li>
						<?php } ?>
					</ul>
				</div>
			</div>
		</div>
	</body>
</html>
