Add: admin pages

This commit is contained in:
2018-07-09 11:51:29 +09:00
parent 2d4143fca3
commit 9a8b8fc417
10 changed files with 416 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
<html>
<head>
<title>마우스 타자 관리자 페이지</title>
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="./../css/module.css">
<link rel="stylesheet" type="text/css" href="./../css/color_button.css">
<script type="text/javascript" src="./../../../resources/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="./../js/main.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#header").load("admin_header.html");
$("#section").load("admin_section.html");
});
</script>
</head>
<body bgcolor="white">
<div id="wrapper">
<header id="header">
</header>
<section id="section">
</section>
</div>
</body>
</html>
+57
View File
@@ -0,0 +1,57 @@
<style>
.home {
display: inline-block;
float: left;
padding: 0px;
margin: 0px;
}
.header_menu {
float: right;
padding: 0px;
margin: 0px;
}
.header_menu li {
float: left;
list-style: none;
}
</style>
<div class="container">
<span class="home">
<span class="col">
<a id="login_maestro" class="btn btn-orange" onClick="goHome()">마우스 타자 연습<br/></a>
</span>
</span>
<nav>
<ul class="header_menu">
<li>
<span class="col">
<a href="./../admin/admin_register_list.html" id="login_player" class="btn btn-rouge">계정 신청<br/>목록</a>
</span>
</li>
<li>
<span class="col">
<a href="./../admin/admin_upgrade_list.html" id="login_player" class="btn btn-rouge">계정 업그레이드<br/>목록</a>
</span>
</li>
<li>
<span class="col">
<a href="./../admin/admin_expiration_list.html" id="login_player" class="btn btn-rouge">종료 계정<br/>목록</a>
</span>
</li>
<li>
<span class="col">
<a href="./../admin/admin_send_email.html" id="login_maestro" class="btn btn-sea">전체 이메일<br/>보내기</a>
</span>
</li>
</ul>
</nav>
</div>
+38
View File
@@ -0,0 +1,38 @@
<html>
<head>
<title>마우스 타자 관리자 페이지</title>
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="./../css/module.css">
<link rel="stylesheet" type="text/css" href="./../css/color_button.css">
<script type="text/javascript" src="./../../../resources/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="./../js/main.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#header").load("admin_header.html");
$("#section").load("admin_section.html");
});
</script>
</head>
<body bgcolor="white">
<div id="wrapper">
<header id="header">
</header>
<section id="section">
</section>
</div>
</body>
</html>
+135
View File
@@ -0,0 +1,135 @@
<style>
.player_free {
/*background-color: #ff0000;*/
padding: 20px;
}
.maestro_free {
/*background-color: #0000ff;*/
padding: 20px;
}
</style>
<script>
function loadMaestroTestAccountInfo() {
let xhr = new XMLHttpRequest(); //new로 생성.
xhr.open('POST', './../server/maestro/maestro_test_account.php', true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send();
xhr.onload = function() {
if(xhr.readyState === 4 && xhr.status === 200) {
// console.log(xhr.responseText);
// console.log(xhr.responseText.length);
if(xhr.responseText.length === 0 || xhr.responseText === null) {
console.log("no data from server");
return;
}
let replyJSON = JSON.parse(xhr.responseText);
// console.log(replyJSON);
if(replyJSON === null) {
console.log("no data from server");
return;
}
if(replyJSON["ERROR"] !== undefined || replyJSON["RESULT"] === undefined) {
console.log(replyJSON["ERROR"]);
return;
}
if(replyJSON["RESULT"] === "fail") {
console.log(replyJSON["RESULT"]);
return;
}
let maestroID = replyJSON["maestroID"];
let playerID = replyJSON["playerID"];
let playerName = replyJSON["playerName"];
console.log("maestroID : " + maestroID);
console.log("playerID : " + playerID);
console.log("playerName : " + playerName);
sessionStorage.setItem("maestroID", maestroID);
sessionStorage.setItem("playerID", playerID);
sessionStorage.setItem("playerName", playerName);
}
}
}
function playFree() {
loadMaestroTestAccountInfo();
window.open("./../client/menu_app.html", "_blank");
}
function experienceMaestro() {
loadMaestroTestAccountInfo();
location.href = "./../maestro/main_menu.html";
}
</script>
<div class="container">
<div class="player_free">
<div class="col alignCenter">
<a id="player_free_play" class="btn btn-rouge width400" onClick="playFree()" >학생 연습 앱<br/>무료 체험</a>
</div>
<ul id="free_app_list">
<li>
마우스 클릭 연습
</li>
<li>
마우스 더블 클릭 연습
</li>
<li>
한글 키보드 연습
</li>
</ul>
</div>
<div class="maestro_free">
<div class="col alignCenter">
<a id="maestro_free_menu" class="btn btn-sea width400" onClick="experienceMaestro()" >마에스트로<br/>관리자 메뉴 체험</a>
</div>
<ul id="maestro_preview">
<li>
플레이어 관리
</li>
<li>
과목 관리
</li>
<li>
랭킹
</li>
<li>
기록
</li>
</ul>
<div class="col alignCenter">
<a href="./../maestro/register.html" id="maestro_register" class="btn btn-sea width400">마에스트로<br/>가입</a>
</div>
<ul id="register_tip">
<li>
학생 20명 (1만원 / 1년)
</li>
<li>
학생 50명 (2만원 / 1년)
</li>
<li>
학생 100명 (3만원 / 1년)
</li>
</ul>
</div>
</div>
+38
View File
@@ -0,0 +1,38 @@
<html>
<head>
<title>마우스 타자 관리자 페이지</title>
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="./../css/module.css">
<link rel="stylesheet" type="text/css" href="./../css/color_button.css">
<script type="text/javascript" src="./../../../resources/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="./../js/main.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#header").load("admin_header.html");
$("#section").load("admin_section.html");
});
</script>
</head>
<body bgcolor="white">
<div id="wrapper">
<header id="header">
</header>
<section id="section">
</section>
</div>
</body>
</html>
+38
View File
@@ -0,0 +1,38 @@
<html>
<head>
<title>마우스 타자 관리자 페이지</title>
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="./../css/module.css">
<link rel="stylesheet" type="text/css" href="./../css/color_button.css">
<script type="text/javascript" src="./../../../resources/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="./../js/main.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#header").load("admin_header.html");
$("#section").load("admin_section.html");
});
</script>
</head>
<body bgcolor="white">
<div id="wrapper">
<header id="header">
</header>
<section id="section">
</section>
</div>
</body>
</html>
+72
View File
@@ -0,0 +1,72 @@
<html>
<head>
<title>관리자 페이지</title>
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="./../css/module.css">
<link rel="stylesheet" type="text/css" href="./../css/color_button.css">
<script type="text/javascript" src="./../../../resources/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="./../js/main.js"></script>
<script type="text/javascript">
$(document).ready(function() {
sessionStorage.setItem("maestroID", -1);
$("#section").load("admin_section.html");
});
function login() {
let name = $("#maestro_name").val();
let password = $("#password").val();
let xhr = new XMLHttpRequest(); //new로 생성.
xhr.open('POST', './../server/maestro/login.php', true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send("maestro_name=" + name + "&password=" + password);
xhr.onload = function() {
if(xhr.readyState === 4 && xhr.status === 200) {
let replyJSON = JSON.parse(xhr.responseText);
// console.log(replyJSON);
// if(replyJSON !== null)
// console.log(replyJSON);
// if(replyJSON["MaestroID"] !== undefined)
// console.log(replyJSON["MaestroID"]);
if(replyJSON !== null && replyJSON["MaestroID"] !== undefined && replyJSON["MaestroID"] !== null) {
maestroID = replyJSON["MaestroID"];
sessionStorage.setItem("maestroID", maestroID);
location.href = 'admin_register_list.html';
} else {
$("#error_message").val(replyJSON["ERROR"]);
}
}
}
}
</script>
</head>
<body bgcolor="white">
<div>
관리자 아이디
<input type="text" id="maestro_name" name="maestro_name"><br/>
암호
<input type="password" id="password" name="password"><br/>
</div>
<div class="col alignCenter">
<a id="login" class="btn btn-sea width400" onClick="login()">로그인</a>
</div>
</body>
</html>