- Implemented.
Rebuilt embed-example.html with inline, full-screen, and popup examples. Fixed host-page/frame scrolling and contained reply navigation. New logins now transactionally replace prior sessions; displaced clients return to login. Added per-user session/IP locking with automatic SQLite migration. Added modular Spam Control dashboard for locks, honeypot, and CAPTCHA settings. Moved CAPTCHA controls out of Plans & Platform.
This commit is contained in:
@@ -13,6 +13,7 @@ define('CONFIG_FILE', ROOT_DIR . '/config.json');
|
||||
define('ADMIN_VERSION', '2.2.0');
|
||||
require_once ROOT_DIR . '/bootstrap.php';
|
||||
require_once ROOT_DIR . '/lib/admin_platform.php';
|
||||
require_once ROOT_DIR . '/lib/admin_spam.php';
|
||||
|
||||
// ─── CHANGE THIS PASSWORD ────────────────────────────────────────────────────
|
||||
define('ADMIN_PASSWORD', (string)getConfigVal('admin.password', 'changeme123'));
|
||||
@@ -200,6 +201,16 @@ if ($isLoggedIn && $_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
redirect('tab=platform');
|
||||
}
|
||||
|
||||
if (in_array($act, ['save_spam_settings','lock_user_session','unlock_user_session'], true)) {
|
||||
try {
|
||||
$message = handleAdminSpamAction($act);
|
||||
flash($message ?: 'Spam control action completed.');
|
||||
} catch (Throwable $e) {
|
||||
flash($e->getMessage(), 'err');
|
||||
}
|
||||
redirect('tab=spam');
|
||||
}
|
||||
|
||||
// ── Messages ──────────────────────────────────────────────────────────────
|
||||
if ($act === 'archive_voice_clip') {
|
||||
$id = (int)($_POST['msg_id'] ?? 0);
|
||||
@@ -888,6 +899,9 @@ td.actions{white-space:nowrap;width:1px}
|
||||
<a class="sb-link <?= $tab==='sessions'?'active':'' ?>" href="?tab=sessions">
|
||||
<span class="ico">⚡</span><span>Sessions</span>
|
||||
</a>
|
||||
<a class="sb-link <?= $tab==='spam'?'active':'' ?>" href="?tab=spam">
|
||||
<span class="ico">!</span><span>Spam Control</span>
|
||||
</a>
|
||||
|
||||
<a class="sb-link <?= $tab==='platform'?'active':'' ?>" href="?tab=platform">
|
||||
<span class="ico">◆</span><span>Plans & Platform</span>
|
||||
@@ -1695,6 +1709,9 @@ td.actions{white-space:nowrap;width:1px}
|
||||
</div>
|
||||
|
||||
<?php /* ════════════════════════════════ CONFIG ══════════════════════ */ ?>
|
||||
<?php elseif ($tab === 'spam'): ?>
|
||||
<?php renderAdminSpamTab(); ?>
|
||||
|
||||
<?php elseif ($tab === 'platform'): ?>
|
||||
<?php renderAdminPlatformTab(); ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user