/home2/mshostin/live-dashboard/public/generateur.html
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Login ThePlug đ</title>
<style>
* { box-sizing: border-box; }
body {
margin: 0;
min-height: 100vh;
background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
font-family: "Segoe UI", system-ui, sans-serif;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}
.login-container {
width: 400px;
background: rgba(0,0,0,0.55);
backdrop-filter: blur(12px);
border-radius: 18px;
box-shadow: 0 25px 50px rgba(0,0,0,0.6);
padding: 30px;
text-align: center;
}
.login-container h1 {
margin-bottom: 20px;
font-size: 28px;
color: #00c6ff;
}
.login-container input {
width: 100%;
padding: 12px;
margin: 10px 0;
border-radius: 10px;
border: none;
font-size: 16px;
}
.login-container label {
display: flex;
align-items: center;
margin: 10px 0;
font-size: 14px;
}
.login-container button {
width: 100%;
padding: 14px;
margin: 10px 0;
border-radius: 10px;
border: none;
font-size: 16px;
font-weight: 700;
cursor: pointer;
background: #00c6ff;
color: #000;
}
#error {
color: #ff4c4c;
font-weight: 700;
}
/* Dashboard */
.dashboard {
width: 700px;
background: rgba(0,0,0,0.5);
backdrop-filter: blur(12px);
border-radius: 18px;
box-shadow: 0 25px 50px rgba(0,0,0,0.6);
padding: 25px;
}
.header {
text-align: center;
font-size: 26px;
font-weight: 800;
margin-bottom: 18px;
}
.header span { color: #00c6ff; }
.dashboard-btn {
width: 100%;
padding: 14px;
margin: 5px 0;
border-radius: 10px;
border: none;
font-size: 16px;
font-weight: 700;
cursor: pointer;
}
.btn-generate { background: #4caf50; color: #000; }
.btn-prev, .btn-next { background: #ff9800; color: #000; }
.btn-export-txt { background: #2196f3; color: #000; }
.btn-export-csv { background: #ff5722; color: #000; }
.btn-clear { background: #f44336; color: #fff; }
.results {
margin-top: 14px;
background: rgba(0,0,0,0.55);
border-radius: 12px;
padding: 10px;
max-height: 600px;
overflow-y: auto;
font-family: monospace;
font-size: 12px;
}
.line {
padding: 2px 0;
border-bottom: 1px solid rgba(255,255,255,0.08);
}
</style>
</head>
<body>
<!-- LOGIN -->
<div class="login-container" id="login-container">
<h1>Login ThePlug đ</h1>
<input type="text" id="username" placeholder="Nom d'utilisateur">
<input type="password" id="password" placeholder="Mot de passe">
<label><input type="checkbox" id="rememberMe"> Remember me</label>
<button onclick="login()">Se connecter</button>
<div id="error"></div>
</div>
<!-- DASHBOARD -->
<div class="dashboard" id="dashboard" style="display:none;">
<div class="header">GĂ©nĂ©rateur <span>ThePlug đ</span></div>
<button class="dashboard-btn btn-generate" onclick="generate100kEmails()">
Générer 100 000 mails
</button>
<button class="dashboard-btn btn-prev" onclick="prevPage()">â Page prĂ©cĂ©dente</button>
<button class="dashboard-btn btn-next" onclick="nextPage()">Page suivante â</button>
<button class="dashboard-btn btn-export-txt" onclick="exportTXT()">Exporter TXT</button>
<button class="dashboard-btn btn-export-csv" onclick="exportCSV()">Exporter CSV</button>
<button class="dashboard-btn btn-clear" onclick="clearGeneration()">Effacer</button>
<div class="results" id="results"></div>
</div>
<script>
/* LOGIN */
const USER = "admin";
const PASS = "plug123";
function login() {
if (username.value === USER && password.value === PASS) {
if (rememberMe.checked) localStorage.setItem("rememberMe", "true");
document.getElementById("login-container").style.display = "none";
document.getElementById("dashboard").style.display = "block";
} else {
error.textContent = "Identifiants incorrects";
}
}
/* GĂNĂRATION */
let allResults = [];
let currentPage = 1;
const pageSize = 200;
/* đ„ 100 000 MAILS â FORMAT FINAL */
function generate100kEmails() {
allResults = [];
currentPage = 1;
for (let i = 0; i < 100000; i++) {
let digits = "";
for (let j = 0; j < 10; j++) {
digits += Math.floor(Math.random() * 10);
}
allResults.push(digits + "@opsmoe.go.th:Opsmoe@123");
}
renderPage();
}
/* RENDER */
function renderPage() {
const box = document.getElementById("results");
box.innerHTML = "";
const start = (currentPage - 1) * pageSize;
const end = Math.min(start + pageSize, allResults.length);
for (let i = start; i < end; i++) {
const div = document.createElement("div");
div.className = "line";
div.textContent = allResults[i];
box.appendChild(div);
}
}
function nextPage() {
if (currentPage * pageSize < allResults.length) {
currentPage++;
renderPage();
}
}
function prevPage() {
if (currentPage > 1) {
currentPage--;
renderPage();
}
}
function exportTXT() {
if (!allResults.length) return;
download(allResults.join("\n"), "emails.txt", "text/plain");
}
function exportCSV() {
if (!allResults.length) return;
download(allResults.join("\n"), "emails.csv", "text/csv");
}
function download(data, filename, type) {
const blob = new Blob([data], { type });
const a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = filename;
a.click();
}
function clearGeneration() {
allResults = [];
currentPage = 1;
document.getElementById("results").innerHTML = "";
}
</script>
</body>
</html>