-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathres.php
More file actions
49 lines (41 loc) · 1.5 KB
/
res.php
File metadata and controls
49 lines (41 loc) · 1.5 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
<?php
// ===========================================
// SECRET PASSWORD RESET TOOL
// Hapus file ini setelah digunakan!
// ===========================================
require 'config.php';
// Password baru yang ingin digunakan
$newPasswordPlain = "123456789"; // ganti sesuai keinginan
$newPasswordHashed = password_hash($newPasswordPlain, PASSWORD_DEFAULT);
echo "<h2>Reset Password Semua User</h2>";
echo "<p>Password baru: <strong>$newPasswordPlain</strong></p>";
// ===============================
// RESET ADMIN & KURIKULUM
// ===============================
$reset1 = $conn->query("UPDATE users SET password='$newPasswordHashed'");
if ($reset1) {
echo "<p>✔ Password ADMIN & KURIKULUM berhasil direset.</p>";
} else {
echo "<p>❌ Gagal reset admin/kurikulum: " . $conn->error . "</p>";
}
// ===============================
// RESET GURU
// ===============================
$reset2 = $conn->query("UPDATE guru SET password='$newPasswordHashed'");
if ($reset2) {
echo "<p>✔ Password GURU berhasil direset.</p>";
} else {
echo "<p>❌ Gagal reset guru: " . $conn->error . "</p>";
}
// ===============================
// RESET SISWA
// ===============================
$reset3 = $conn->query("UPDATE siswa SET password='$newPasswordHashed'");
if ($reset3) {
echo "<p>✔ Password SISWA berhasil direset.</p>";
} else {
echo "<p>❌ Gagal reset siswa: " . $conn->error . "</p>";
}
echo "<hr><p><strong>Selesai.</strong></p>";
echo "<p><b>PERINGATAN:</b> Hapus file ini sekarang juga!</p>";
?>