forked from infosave2007/phpblockchain
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
191 lines (180 loc) · 9.26 KB
/
Copy pathindex.html
File metadata and controls
191 lines (180 loc) · 9.26 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modern Blockchain Platform</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
<style>
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
}
.main-card {
background: rgba(255, 255, 255, 0.95);
border-radius: 15px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(10px);
}
.feature-card {
background: white;
border-radius: 10px;
padding: 30px;
margin-bottom: 20px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
}
.feature-card:hover {
transform: translateY(-5px);
}
.status-badge {
display: inline-block;
padding: 4px 12px;
border-radius: 20px;
font-size: 0.8em;
font-weight: bold;
}
.status-installed { background: #d4edda; color: #155724; }
.status-pending { background: #fff3cd; color: #856404; }
</style>
</head>
<body class="gradient-bg">
<div class="container py-5">
<div class="row justify-content-center">
<div class="col-md-12">
<div class="main-card p-5">
<div class="text-center mb-5">
<h1 class="text-primary mb-3">
<i class="fas fa-coins"></i>
Modern Blockchain Platform
</h1>
<p class="lead text-muted">
A complete blockchain solution with smart contracts, PoS consensus, and modern web interface
</p>
<div id="installationStatus" class="mt-3">
<!-- Status will be loaded here -->
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="feature-card text-center">
<i class="fas fa-wallet fa-3x text-primary mb-3"></i>
<h5>Wallet</h5>
<p class="text-muted">Manage your digital assets, send and receive transactions</p>
<a href="wallet/" class="btn btn-primary">
<i class="fas fa-wallet"></i> Open Wallet
</a>
</div>
</div>
<div class="col-md-4">
<div class="feature-card text-center">
<i class="fas fa-search fa-3x text-info mb-3"></i>
<h5>Explorer</h5>
<p class="text-muted">Browse blocks, transactions, and network statistics</p>
<a href="explorer/" class="btn btn-info">
<i class="fas fa-search"></i> Open Explorer
</a>
</div>
</div>
<div class="col-md-4">
<div class="feature-card text-center">
<i class="fas fa-cog fa-3x text-warning mb-3"></i>
<h5>Admin Panel</h5>
<p class="text-muted">Network administration and system management</p>
<a href="admin/" class="btn btn-warning">
<i class="fas fa-cog"></i> Admin Panel
</a>
</div>
</div>
</div>
<div class="row mt-4">
<div class="col-md-6">
<div class="feature-card">
<h5><i class="fas fa-cube text-success"></i> Blockchain Features</h5>
<ul class="list-unstyled">
<li><i class="fas fa-check text-success"></i> Proof of Stake consensus</li>
<li><i class="fas fa-check text-success"></i> Smart contracts support</li>
<li><i class="fas fa-check text-success"></i> P2P networking</li>
<li><i class="fas fa-check text-success"></i> File-based storage</li>
</ul>
</div>
</div>
<div class="col-md-6">
<div class="feature-card">
<h5><i class="fas fa-tools text-warning"></i> System Status</h5>
<div id="systemStatus">
<p><i class="fas fa-spinner fa-spin"></i> Loading system status...</p>
</div>
</div>
</div>
</div>
<div class="text-center mt-4">
<div class="btn-group" role="group">
<a href="web-installer/" class="btn btn-secondary">
<i class="fas fa-download"></i> Installer
</a>
<a href="api/" class="btn btn-success">
<i class="fas fa-code"></i> API
</a>
<a href="#" class="btn btn-info" onclick="checkSystemStatus()">
<i class="fas fa-sync"></i> Refresh Status
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
checkInstallationStatus();
checkSystemStatus();
});
async function checkInstallationStatus() {
try {
const response = await fetch('config/installation.json');
if (response.ok) {
const data = await response.json();
document.getElementById('installationStatus').innerHTML =
'<span class="status-badge status-installed"><i class="fas fa-check"></i> Installed on ' + data.installation_date + '</span>';
} else {
document.getElementById('installationStatus').innerHTML =
'<span class="status-badge status-pending"><i class="fas fa-exclamation-triangle"></i> Not installed - <a href="web-installer/">Run installer</a></span>';
}
} catch (error) {
document.getElementById('installationStatus').innerHTML =
'<span class="status-badge status-pending"><i class="fas fa-exclamation-triangle"></i> Installation status unknown</span>';
}
}
async function checkSystemStatus() {
document.getElementById('systemStatus').innerHTML = '<p><i class="fas fa-spinner fa-spin"></i> Checking system status...</p>';
try {
const response = await fetch('storage/state/services_status.json');
if (response.ok) {
const data = await response.json();
let statusHtml = '<ul class="list-unstyled mb-0">';
data.active_services.forEach(service => {
statusHtml += `<li><i class="fas fa-check text-success"></i> ${service}</li>`;
});
if (data.errors && data.errors.length > 0) {
data.errors.forEach(error => {
statusHtml += `<li><i class="fas fa-times text-danger"></i> ${error}</li>`;
});
}
statusHtml += '</ul>';
statusHtml += `<small class="text-muted">Last check: ${new Date(data.last_check * 1000).toLocaleString()}</small>`;
document.getElementById('systemStatus').innerHTML = statusHtml;
} else {
document.getElementById('systemStatus').innerHTML =
'<p class="text-warning"><i class="fas fa-exclamation-triangle"></i> System status not available</p>';
}
} catch (error) {
document.getElementById('systemStatus').innerHTML =
'<p class="text-danger"><i class="fas fa-times"></i> Failed to load system status</p>';
}
}
</script>
</body>
</html>