2015-10-13 06:26:47 +00:00
|
|
|
<?php
|
|
|
|
if (empty ( $_SESSION ['username'] ))
|
|
|
|
header ( "Location:" . Url ( 'index', 'login' ) );
|
2015-10-15 12:50:47 +00:00
|
|
|
?>
|
|
|
|
<!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" />
|
|
|
|
|
|
|
|
<!-- 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" />
|
|
|
|
|
|
|
|
<!-- 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" />
|
|
|
|
|
|
|
|
<!-- libraries -->
|
|
|
|
<link rel="stylesheet" type="text/css"
|
|
|
|
href="View/public/css/lib/font-awesome.css" />
|
|
|
|
|
|
|
|
<!-- this page specific styles -->
|
|
|
|
<link rel="stylesheet" href="View/public/css/compiled/personal-info.css"
|
|
|
|
type="text/css" media="screen" />
|
|
|
|
|
|
|
|
<!-- open sans font -->
|
|
|
|
<link
|
|
|
|
href='http://fonts.useso.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800'
|
|
|
|
rel='stylesheet' type='text/css' />
|
|
|
|
|
2015-10-13 06:26:47 +00:00
|
|
|
<!--[if lt IE 9]>
|
|
|
|
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
2015-10-15 12:50:47 +00:00
|
|
|
<![endif]-->
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<!-- navbar -->
|
|
|
|
<?=load('header')?>
|
|
|
|
<!-- end navbar -->
|
|
|
|
|
|
|
|
<!-- main container .wide-content is used for this layout without sidebar :) -->
|
|
|
|
<div class="content wide-content col-xs-12 col-md-12 col-lg-12">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="settings-wrapper" id="pad-wrapper">
|
|
|
|
<!-- avatar column -->
|
|
|
|
<div class="span3 avatar-box">
|
|
|
|
<div class="personal-image">
|
|
|
|
<img src="View/public/tx.jpg" class="avatar img-circle" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- edit form column -->
|
|
|
|
<div class="span7 personal-info">
|
|
|
|
<h5 class="personal-title">Minecraft玩家信息</h5>
|
|
|
|
|
|
|
|
<form>
|
|
|
|
<div class="field-box">
|
|
|
|
<label>游戏帐号:</label> <input class="span3 inline-input" id="user"
|
|
|
|
type="text" value="<?=$_SESSION['username']?>"
|
|
|
|
disabled="disabled" />
|
|
|
|
</div>
|
|
|
|
<div class="field-box">
|
|
|
|
<label>邮箱地址:</label> <input class="span3 inline-input" id="mail"
|
|
|
|
type="text" value="" disabled="disabled" /> <span id="status"></span>
|
|
|
|
</div>
|
|
|
|
<div class="field-box">
|
2015-10-31 12:00:01 +00:00
|
|
|
<label>服务器信息:</label> 在线人数: <span id="now"></span>/<span id="max"></span>
|
2015-10-15 12:50:47 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- end main container -->
|
|
|
|
|
|
|
|
|
|
|
|
<!-- scripts -->
|
|
|
|
<script src="View/public/js/jquery-latest.js"></script>
|
|
|
|
<script src="View/public/js/bootstrap.min.js"></script>
|
|
|
|
<script src="View/public/js/theme.js"></script>
|
2015-10-13 06:26:47 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
select();
|
2015-10-15 12:50:47 +00:00
|
|
|
status();
|
|
|
|
getinfo();
|
2015-10-13 06:26:47 +00:00
|
|
|
var data = "user=<?=$_SESSION['username']?>";
|
2015-10-14 13:07:36 +00:00
|
|
|
function select(){
|
2015-10-13 06:26:47 +00:00
|
|
|
$.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")
|
2015-10-14 13:07:36 +00:00
|
|
|
{
|
2015-10-13 06:26:47 +00:00
|
|
|
$("#mail").val(content.email);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)},
|
|
|
|
error:function(){
|
|
|
|
alert("数据读取失败");
|
|
|
|
return false;
|
|
|
|
}
|
2015-10-14 13:07:36 +00:00
|
|
|
});
|
2015-10-13 06:26:47 +00:00
|
|
|
}
|
2015-10-14 13:07:36 +00:00
|
|
|
function status(){
|
2015-10-13 06:26:47 +00:00
|
|
|
$.ajax({
|
|
|
|
type:"GET",
|
|
|
|
dataType:"json",
|
|
|
|
data:data,
|
|
|
|
url:"<?=Url('mail_status', "stat")?>",
|
2015-10-31 12:00:01 +00:00
|
|
|
success:function(data){
|
2015-11-05 12:22:48 +00:00
|
|
|
if(data.status != "success")
|
2015-10-31 12:00:01 +00:00
|
|
|
{
|
|
|
|
$("#status").html("邮箱验证状态:尚未验证 <a href='<?=Url('index', 'mail')?>' onclick='display()'>点击进行验证</a>");
|
|
|
|
$("#status").css("color", "red");
|
|
|
|
}else{
|
|
|
|
$('#status').html("邮箱验证状态:已验证");
|
|
|
|
$("#status").css("color", "green");
|
|
|
|
}
|
2015-10-13 06:26:47 +00:00
|
|
|
},
|
|
|
|
error:function(){
|
|
|
|
alert("邮箱验证状态读取失败");
|
|
|
|
return false;
|
2015-10-14 13:07:36 +00:00
|
|
|
}
|
|
|
|
})
|
2015-10-31 12:00:01 +00:00
|
|
|
}
|
2015-10-15 12:50:47 +00:00
|
|
|
function getinfo(){
|
|
|
|
$.ajax({
|
|
|
|
type:"GET",
|
|
|
|
dataType:"json",
|
|
|
|
data:{ip:"play.i5mc.com"},
|
|
|
|
url:"https://mcapi.us/server/status",
|
|
|
|
success:function(rdata){
|
|
|
|
if(rdata.status=="success"){
|
|
|
|
$("#max").html( rdata.players.max );
|
|
|
|
$("#now").html( rdata.players.now );
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error:function(){
|
|
|
|
alert("尚未查询到服务器信息");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
2015-10-13 06:26:47 +00:00
|
|
|
}
|
2015-10-15 12:50:47 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
2015-10-13 06:26:47 +00:00
|
|
|
</html>
|