1
0
mirror of https://e.coding.net/circlecloud/McAccount.git synced 2024-11-17 00:58:57 +00:00
McAccount/View/index.php
502647092 3340847e38 add server status and fix some bug...
Signed-off-by: 502647092 <jtb1@163.com>
2015-10-15 20:50:47 +08:00

206 lines
5.9 KiB
PHP

<?php
if (empty ( $_SESSION ['username'] ))
header ( 'Location:' . Url ( 'index', 'login' ) );
?>
<!DOCTYPE html>
<html>
<head>
<title><?=$title?></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="View/public/member.css" />
<!-- bootstrap -->
<link href="View/public/css/bootstrap/bootstrap.css" rel="stylesheet" />
<link href="View/public/css/bootstrap/bootstrap-responsive.css"
rel="stylesheet" />
<link href="View/public/css/bootstrap/bootstrap-overrides.css"
type="text/css" rel="stylesheet" />
<!-- libraries -->
<link href="View/public/css/lib/jquery-ui-1.10.2.custom.css"
rel="stylesheet" type="text/css" />
<link href="View/public/css/lib/font-awesome.css" type="text/css"
rel="stylesheet" />
<!-- global styles -->
<link rel="stylesheet" type="text/css" href="View/public/css/layout.css" />
<link rel="stylesheet" type="text/css"
href="View/public/css/elements.css" />
<link rel="stylesheet" type="text/css" href="View/public/css/icons.css" />
<!-- this page specific styles -->
<link rel="stylesheet" href="View/public/css/compiled/index.css"
type="text/css" media="screen" />
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<!-- navbar -->
<?=load('header')?>
<!-- end navbar -->
<!-- sidebar -->
<?=load('left')?>
<!-- end sidebar -->
<!-- main container -->
<div class="content">
<div class="container-fluid">
<div id="pad-wrapper">
<div class="main">
<div class="main_head"></div>
<div class="mains">
<!--{left-->
<div class="right">
<!--头像 start{-->
<div class="body">
<a href="javascript:void(0);"><img src="View/public/logo.jpg"
width="100" height="100"></a>
</div>
<div class="center"></div>
<!--}头像 end-->
</div>
<!--left end}-->
<div class="left">
<!--{帐户信息-->
<div class="user">
<p>
<strong>欢迎你,<?=$_SESSION['username']?></strong>
<span class="c_999">(普通会员)</span>
<a href="/e/space/?userid=3" class="zone">我的空间</a>
</p>
</div>
<!--说明 start{-->
<div class="sm" style="">
<table class="table table-hover">
<tbody>
<!-- row -->
<tr class="first">
<td>绑定邮箱</td>
<td class="description" id="mail"></td>
<td id="status"></td>
</tr>
<!-- row -->
<tr>
<td>游戏密码</td>
<td class="pass" id="pass"></td>
<td><a href="<?=Url('index', 'pass')?>">点击更改密码</a></td>
</tr>
<!-- row -->
<tr>
<td>游戏币</td>
<td class="description" id="money"></td>
</tr>
</tbody>
</table>
</div>
<!--}说明 end-->
<!--}信息列表 end-->
</div>
</div>
<div class="main_foot"></div>
</div>
<!-- end table sample -->
</div>
</div>
</div>
<!-- scripts -->
<script src="View/public/js/jquery-latest.js"></script>
<script src="View/public/js/bootstrap.min.js"></script>
<script src="View/public/js/jquery-ui-1.10.2.custom.min.js"></script>
<!-- knob -->
<script src="View/public/js/jquery.knob.js"></script>
<!-- flot charts -->
<script src="View/public/js/jquery.flot.js"></script>
<script src="View/public/js/jquery.flot.stack.js"></script>
<script src="View/public/js/jquery.flot.resize.js"></script>
<script src="View/public/js/theme.js"></script>
<script type="text/javascript">
select();
status();
var data = "user=<?=$_SESSION['username']?>";
function select(){
$.ajax({
type:"GET",
dataType:"json",
data:data,
url:"<?=Url('mail_status', "select")?>",
success:function(rdata){
$.each(rdata.info,function(index,content)
{
if(rdata.status == "success")
{
$("#pass").html( content.password );
$("#mail").html( content.email )
}
}
)},
error:function(){
alert("数据读取失败");
return false;
}
});
}
function status(){
$.ajax({
type:"GET",
dataType:"json",
data:data,
url:"<?=Url('mail_status', "stat")?>",
success:function(data){
$.each(data.info,function(index,content)
{
if(content.statu == 0)
{
$("#status").html("邮箱验证状态:尚未验证");
}else{
$('#status').html("邮箱验证状态:已验证");
}
})
},
error:function(){
alert("邮箱验证状态读取失败");
return false;
}
})
}
window.onload = function(){
var html = $('.status').html();
//document.write(html);
if(html.indexOf("尚未验证") !== -1){
$('.status').html($('.status').html()+ " <a href='<?=Url('index', 'mail')?>' onclick='display()'>点击这里进行验证</a>")
}
}
current();
function current(){
$.ajax({
type:"GET",
dataType:"json",
data:{user:"<?=$_SESSION['username']?>"},
url:"<?=Url('user_current' , 'current')?>",
success:function(rdata){
$.each(rdata.info,function(index,content)
{
if(rdata.status == "success")
{
$("#money").html( content.balance );
}
})
},
error:function(){
alert("尚未查询到此用户的游戏币余额");
}
})
}
</script>
</body>
</html>