-
Notifications
You must be signed in to change notification settings - Fork 11
/
account.php
120 lines (103 loc) · 6.34 KB
/
account.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php
//? |-----------------------------------------------------------------------------------------------|
//? | account.php |
//? | |
//? | Copyright (c) 2018-2021 Belikhun. All right reserved |
//? | Licensed under the MIT License. See LICENSE in the project root for license information. |
//? |-----------------------------------------------------------------------------------------------|
require_once $_SERVER["DOCUMENT_ROOT"] ."/libs/belibrary.php";
require_once $_SERVER["DOCUMENT_ROOT"] ."/modules/config.php";
if ($_SESSION["id"] !== "admin")
stop(31, "Xin lỗi! Bạn không có quyền để xem trang này.", 403);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Quản lý tài khoản | <?php print APPNAME ." v". VERSION; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/default.css?v=<?php print VERSION; ?>" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/statusBar.css?v=<?php print VERSION; ?>" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/scrollbar.css?v=<?php print VERSION; ?>" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/input.css?v=<?php print VERSION; ?>" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/switch.css?v=<?php print VERSION; ?>" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/button.css?v=<?php print VERSION; ?>" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/spinner.css?v=<?php print VERSION; ?>" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/menu.css?v=<?php print VERSION; ?>" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/accountPage.css?v=<?php print VERSION; ?>" />
<!-- Fonts -->
<link rel="stylesheet" type="text/css" media="screen" href="/assets/fonts/calibri/calibri.css?v=<?php print VERSION; ?>" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/fonts/nunito/nunito.css?v=<?php print VERSION; ?>" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/fonts/opensans/opensans.css?v=<?php print VERSION; ?>" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/fonts/consolas/consolas.css?v=<?php print VERSION; ?>" />
<link rel="stylesheet" type="text/css" media="screen" href="/assets/fonts/fontawesome/fontawesome.css?v=<?php print VERSION; ?>" />
</head>
<body id="container">
<div class="wrapper">
<div class="menu">
<div class="group home">
<t class="title big">Quản lý tài khoản</t>
<t class="title small">Thêm, chỉnh sửa hoặc xóa tài khoản</t>
<div class="space"></div>
</div>
<div class="group plus">
<div class="item sound" data-soundhover>
<button id="accountAdd" class="sq-btn dark sound" data-soundhover data-soundselect>Thêm một tài khoản mới</button>
</div>
<div id="accountAddContainer" class="accountEditor">
<form id="accountAddEditor" class="editor" action="javascript:void(0);">
<input type="file" class="avatarInput" id="addUserAvatar" accept="image/*">
<label id="addAvatarPreviewContainer" class="lazyload column avatar sound" data-soundhover data-soundselect for="addUserAvatar">
<img id="addAvatarPreview" onload="this.parentNode.dataset.loaded = 1" src="/api/avatar"/>
<div class="simpleSpinner"></div>
</label>
<span class="column grow">
<div class="row">
<div class="formGroup sound userID" data-color="blue" data-soundselectsoft>
<input id="addUserID" type="text" class="formField" autocomplete="off" placeholder="ID" required>
<label for="addUserID">ID</label>
</div>
<div class="formGroup sound username" data-color="blue" data-soundselectsoft>
<input id="addUserUsername" type="text" class="formField" autocomplete="off" placeholder="Tên người dùng" required>
<label for="addUserUsername">Tên người dùng</label>
</div>
</div>
<div class="row formGroup sound" data-color="blue" data-soundselectsoft>
<input id="addUserPassword" type="text" class="formField" autocomplete="off" placeholder="Mật khẩu" required>
<label for="addUserPassword">Mật khẩu</label>
</div>
<div class="row formGroup sound" data-color="blue" data-soundselectsoft>
<input id="addUserName" type="text" class="formField" autocomplete="off" placeholder="Tên" required>
<label for="addUserName">Tên</label>
</div>
</span>
<span class="column">
<button id="addSubmit" class="row sq-btn blue sound" data-soundhover data-soundselect>Thêm</button>
<button id="addCancel" class="row sq-btn red sound" type="button" data-soundhover data-soundselect>Hủy</button>
</span>
</form>
</div>
</div>
<div id="accountContainer">
</div>
</div>
</div>
<script>
const API_TOKEN = `<?php print isset($_SESSION["apiToken"]) ? $_SESSION["apiToken"] : null; ?>`;
const USERNAME = `<?php print $_SESSION["username"]; ?>`;
</script>
<script src="/assets/js/belibrary.js?v=<?php print VERSION; ?>" type="text/javascript"></script>
<script src="/assets/js/errorHandler.js?v=<?php print VERSION; ?>" type="text/javascript"></script>
<script src="/assets/js/statusBar.js?v=<?php print VERSION; ?>" type="text/javascript"></script>
<script src="/assets/js/sounds.js?v=<?php print VERSION; ?>" type="text/javascript"></script>
<script src="/assets/js/account.js?v=<?php print VERSION; ?>" type="text/javascript"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=<?php print TRACK_ID; ?>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments) }
gtag("js", new Date());
gtag("config", `<?php print TRACK_ID; ?>`);
</script>
</body>