mirror of
https://github.com/ossrs/srs.git
synced 2025-02-24 06:54:22 +00:00
62 lines
2 KiB
HTML
62 lines
2 KiB
HTML
|
<html>
|
|||
|
<head>
|
|||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|||
|
<meta property="qc:admins" content="35453715257630661457637577164165323" />
|
|||
|
<title>SRS</title>
|
|||
|
<link href="css/style.css" rel="stylesheet" type="text/css">
|
|||
|
<link href="css/index_black.css" rel="stylesheet" type="text/css">
|
|||
|
</head>
|
|||
|
|
|||
|
<body>
|
|||
|
<script type="text/javascript" src="js/jquery.js"></script>
|
|||
|
<script type="text/javascript" src="conf.js"></script>
|
|||
|
|
|||
|
<div id="banner">
|
|||
|
<div id="login" style="padding-top:20px;text-align:center;"></div>
|
|||
|
</div>
|
|||
|
|
|||
|
<script type="text/javascript">
|
|||
|
document.title = get_system_title();
|
|||
|
|
|||
|
function require_login(){
|
|||
|
// 应用的APPID
|
|||
|
var appID = get_qq_oauth_app_id();
|
|||
|
// 成功授权后的回调地址
|
|||
|
var redirectURI = get_qq_oauth_redirect_url();
|
|||
|
// 透传的状态: check, user
|
|||
|
var state = "check";
|
|||
|
|
|||
|
var path = 'https://graph.qq.com/oauth2.0/authorize?';
|
|||
|
var queryParams = [
|
|||
|
'response_type=token',
|
|||
|
'client_id=' + appID,
|
|||
|
'redirect_uri=' + encodeURI(redirectURI),
|
|||
|
'state=' + state,
|
|||
|
'scope=' + 'get_user_info',
|
|||
|
];
|
|||
|
|
|||
|
var query = queryParams.join('&');
|
|||
|
var url = path + query;
|
|||
|
//console.log(url);
|
|||
|
$("#login").empty();
|
|||
|
$("#login").append("<div style='margin-bottom:40px;margin-top:30px;'>Welcome to " + get_system_title() + "!</div>");
|
|||
|
$("#login").append("<a href='" + url + "'><img src='images/login.png'/></a>");
|
|||
|
//window.location.href = url;
|
|||
|
}
|
|||
|
|
|||
|
if(enable_auth()){
|
|||
|
require_login();
|
|||
|
}
|
|||
|
else{
|
|||
|
$("#login").html("<div style='margin-bottom:20px;'>Welcome to " + get_system_title() + "!</div>");
|
|||
|
}
|
|||
|
</script>
|
|||
|
|
|||
|
<div id="footer">
|
|||
|
<span>Copyright © 2013-2014 SRS,保留所有权利</span>
|
|||
|
Email: winlin@vip.126.com<br/>
|
|||
|
<span>京ICP备12047633号</span>
|
|||
|
</div>
|
|||
|
</body>
|
|||
|
</html>
|