-
Notifications
You must be signed in to change notification settings - Fork 4
/
login.php
208 lines (173 loc) · 4.93 KB
/
login.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<?php
/**
* Claymore-PhoenixMiner-Web-Stats
*
* Simple PHP page to connect to any number of Claymore and PhoenixMiner miners and view hashrates, GPU temps, and fan speeds.
*
* @package claymore-phoenixminer-web-stats
* @version 1.0.2
* @author James D (jimok82@gmail.com)
* @copyright Copyright (c) 2018-2021 James D.
* @license This file is part of claymore-phoenixminer-web-stats - free software licensed under the GNU General Public License version 3
* @link https://github.com/JaymZZZZ/claymore-phoenixminer-web-stats
*
*
* @var boolean $debug_mode
* @var object $miner_list
* @var integer $refresh_interval
* @var integer $require_admin_password
* @var string $admin_password
*/
// ------------------------------------------------------------------------
session_start();
require_once 'conf.php';
if (strpos($_SERVER['REQUEST_URI'], "login.php") !== FALSE) {
$url = "//" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$url = str_replace("login.php", '', $url);
header("Location: " . $url);
die();
}
if (isset($_SESSION['user_logged_in']) && isset($_SESSION['admin_password_hash']) && $_SESSION['admin_password_hash'] == md5($admin_password)) {
die();
}
if ($debug_mode) {
error_reporting(E_ERROR | E_WARNING);
ini_set('display_errors', 1);
ini_set('error_prepend_string', '<p style="color: white;">');
ini_set('error_append_string', '</p>');
} else {
error_reporting(0);
ini_set('display_errors', 0);
}
?>
<!DOCTYPE html>
<html lang='en' class=''>
<head>
<title>Login</title>
<meta charset='UTF-8'>
<meta name="robots" content="noindex">
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css'>
<style class="cp-pen-styles">@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);
/* --------------------CSS----------------- */
body {
background: #222;
font: 16px 'Open Sans', sans-serif;
padding: 20px;
}
.box span {
font-family: 'Lato', sans-serif;
font-weight: 300;
font-size: 20px;
position: absolute;
}
.box span:nth-child(2) {
top: 2px;
left: 125px;
}
.box span:nth-child(7) {
top: 85px;
left: 125px;
}
.box span:nth-child(12) {
top: 165px;
left: 125px;
}
.box {
background: linear-gradient(#194e6e, #4992d9);
position: relative;
display: inline-block;
border-radius: 5px;
width: 550px;
height: 200px;
vertical-align: top;
text-align: center;
margin-bottom: 10px;
}
.box__header {
padding: 10px 25px;
position: relative;
}
.box__body {
padding: 0 25px;
}
/* STATS */
.stats {
color: #fff;
position: relative;
padding-bottom: 18px;
}
.stats__amount {
font-size: 15px;
font-weight: bold;
line-height: 1.1;
}
.stats__name {
font-size: 14px;
font-weight: bold;
line-height: 1.1;
}
.stats__caption {
font-size: 16px;
}
.stats__change {
position: absolute;
top: 6px;
right: 0;
text-align: right;
}
.stats__value {
font-size: 18px;
}
.stats__period {
font-size: 18px;
font-weight: bold;
}
.stats__value--positive {
color: #AEDC6F;
font-weight: bold;
}
.stats__value--negative {
color: #9d050c;
font-weight: bold;
}
.yellow-alert {
color: #d3b715;
font-weight: bold;
}
.red-alert {
color: #ad050c;
font-weight: bold;
}
.login__main {
font-size: 40px;
}
.stats__name {
font-size: 26px;
}
.stats__update_time {
text-align: right;
position: absolute;
bottom: 10px;
color: white;
font-size: 10px;
}
</style>
</head>
<body>
<div id="results_<?php echo $name; ?>"
class="box <?php if ($parser->miner_status->{$name} != 1) { ?> box-down <?php } else { ?> box-up <?php } ?>">
<div class="box__header">
</div>
<div class="box__body">
<div class="stats stats--main">
<div class="stats__name">Enter Password
</div>
<form method="post">
<input type="text" name="password">
<input type="submit" name="submit" value="login">
</form>
</div>
</div>
</div>
</body>
</html>