This repository was archived by the owner on Aug 25, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathadmin.html
More file actions
181 lines (155 loc) · 7.63 KB
/
Copy pathadmin.html
File metadata and controls
181 lines (155 loc) · 7.63 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Panel</title>
<style>
body { font-family: Arial, sans-serif; margin: 0; padding: 0; background-color: #f4f4f4; display: flex; }
#sidebar { width: 220px; background: #333; color: white; height: 100vh; padding: 20px; }
.tab { padding: 12px; cursor: pointer; background: #444; margin: 5px 0; border-radius: 5px; text-align: center; transition: background 0.3s; }
.tab:hover { background: #555; }
.tab.active { background: #007BFF; }
#content { flex: 1; padding: 20px; }
.container { display: none; }
.container.active { display: block; }
.list-container { background: white; padding: 10px; border-radius: 5px; box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); }
.list-container ul { list-style: none; padding: 0; }
.list-container li { padding: 8px; border-bottom: 1px solid #ddd; }
.list-container a { text-decoration: none; color: #007BFF; font-weight: bold; }
.iframe-container { width: 100%; height: 80vh; border: none; }
</style>
</head>
<body>
<div id="sidebar">
<h2>BI6’s Panel</h2>
<div class="tab active" onclick="showTab('dashboard')">Dashboard</div>
<div class="tab" onclick="showTab('games')">Games</div>
<div class="tab" onclick="showTab('apps')">Apps</div>
<div class="tab" onclick="showTab('components')">Components</div>
<div class="tab" onclick="showTab('commits')">Commits</div>
</div>
<div id="content">
<div class="container active" id="dashboard">
<h2>Dashboard</h2>
<iframe class="iframe-container" src="https://counter.dev/dashboard.html?user=BI66IE619&token=8dgw3XH5jw4%3D"></iframe>
</div>
<div class="container" id="games">
<h2>Games List</h2>
<div class="list-container"><ul id="games-list"></ul></div>
</div>
<div class="container" id="apps">
<h2>Apps List</h2>
<div class="list-container"><ul id="apps-list"></ul></div>
</div>
<div class="container" id="components">
<h2>Components - Repository Files</h2>
<div class="list-container"><ul id="file-list"></ul></div>
</div>
<div class="container" id="commits">
<h2>Commit History</h2>
<div class="list-container"><ul id="commit-list"></ul></div>
</div>
</div>
<script>
// Password protection
const passcode = "BI66IE@ADMIN"; // Change this as needed
function checkPasscode() {
if (localStorage.getItem("adminPasscode") === passcode) {
document.body.style.display = "flex";
return;
}
const userPasscode = prompt("Enter The Admin Password");
if (userPasscode === passcode) {
localStorage.setItem("adminPasscode", passcode);
document.body.style.display = "flex";
} else {
alert("Access Denied. Redirecting...");
window.location.href = "https://bi66ie619.github.io";
}
}
document.body.style.display = "none";
checkPasscode();
function showTab(tabId) {
document.querySelectorAll('.container').forEach(container => container.classList.remove('active'));
document.querySelectorAll('.tab').forEach(tab => tab.classList.remove('active'));
document.getElementById(tabId).classList.add('active');
event.target.classList.add('active');
if (tabId === 'games') fetchGames();
else if (tabId === 'apps') fetchApps();
else if (tabId === 'components') fetchRepoFiles();
else if (tabId === 'commits') fetchCommits();
}
function fetchGames() {
fetch('/g.html')
.then(response => response.text())
.then(html => {
const parser = new DOMParser();
const doc = parser.parseFromString(html, 'text/html');
const games = doc.querySelectorAll('.rectangle');
const gamesList = document.getElementById('games-list');
gamesList.innerHTML = '';
games.forEach(game => {
const name = game.querySelector('.game-name').innerText;
const link = game.getAttribute('onclick').match(/'([^']+)'/)[1];
const listItem = document.createElement('li');
listItem.innerHTML = `<a href="${link}" target="_blank">${name}</a>`;
gamesList.appendChild(listItem);
});
})
.catch(error => console.error('Error fetching games:', error));
}
function fetchApps() {
fetch('/a.html')
.then(response => response.text())
.then(html => {
const parser = new DOMParser();
const doc = parser.parseFromString(html, 'text/html');
const apps = doc.querySelectorAll('.rectangle');
const appsList = document.getElementById('apps-list');
appsList.innerHTML = '';
apps.forEach(app => {
const name = app.querySelector('.game-name').innerText;
const link = app.getAttribute('onclick').match(/'([^']+)'/)[1];
const listItem = document.createElement('li');
listItem.innerHTML = `<a href="${link}" target="_blank">${name}</a>`;
appsList.appendChild(listItem);
});
})
.catch(error => console.error('Error fetching apps:', error));
}
function fetchRepoFiles() {
fetch("https://api.github.com/repos/BI66IE619/bi66ie619.github.io/contents/")
.then(response => response.json())
.then(files => {
const fileList = document.getElementById("file-list");
fileList.innerHTML = "";
files.forEach(file => {
const listItem = document.createElement("li");
listItem.innerHTML = `<a href="${file.html_url}" target="_blank">${file.name}</a>`;
fileList.appendChild(listItem);
});
})
.catch(error => console.error("Error fetching repo files:", error));
}
function fetchCommits() {
fetch("https://api.github.com/repos/BI66IE619/bi66ie619.github.io/commits")
.then(response => response.json())
.then(commits => {
const commitList = document.getElementById("commit-list");
commitList.innerHTML = "";
commits.slice(0, 10).forEach(commit => {
const listItem = document.createElement("li");
listItem.innerHTML = `
<strong>${commit.commit.message}</strong><br>
<em>${commit.commit.author.name}</em> - ${new Date(commit.commit.author.date).toLocaleString()}<br>
<a href="${commit.html_url}" target="_blank">View Commit</a>
`;
commitList.appendChild(listItem);
});
})
.catch(error => console.error("Error fetching commits:", error));
}
</script>
</body>
</html>