T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/soundstudiopro.com/private_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/soundstudiopro.com/private_html/fix_event_status.php
<?php
session_start();
require_once 'config/database.php';

// Only allow admin to run this
if (!isset($_SESSION['user_id']) || !isset($_SESSION['is_admin']) || !$_SESSION['is_admin']) {
    die('Access denied. Admin only.');
}

$pdo = getDBConnection();

echo "<h1>🔧 Fixing Event Status</h1>";

try {
    // Check current events
    $stmt = $pdo->query("SELECT id, title, status, created_at FROM events ORDER BY created_at DESC");
    $events = $stmt->fetchAll();
    
    echo "<h2>Current Events:</h2>";
    echo "<table border='1' style='border-collapse: collapse; width: 100%;'>";
    echo "<tr><th>ID</th><th>Title</th><th>Status</th><th>Created</th></tr>";
    
    foreach ($events as $event) {
        echo "<tr>";
        echo "<td>{$event['id']}</td>";
        echo "<td>{$event['title']}</td>";
        echo "<td style='color: " . ($event['status'] === 'published' ? 'green' : 'red') . "'>{$event['status']}</td>";
        echo "<td>{$event['created_at']}</td>";
        echo "</tr>";
    }
    echo "</table>";
    
    // Update draft events to published
    $stmt = $pdo->prepare("UPDATE events SET status = 'published' WHERE status = 'draft'");
    $result = $stmt->execute();
    $affected = $stmt->rowCount();
    
    echo "<h2>✅ Updated $affected events from draft to published status</h2>";
    
    // Show updated events
    $stmt = $pdo->query("SELECT id, title, status, created_at FROM events ORDER BY created_at DESC");
    $events = $stmt->fetchAll();
    
    echo "<h2>Updated Events:</h2>";
    echo "<table border='1' style='border-collapse: collapse; width: 100%;'>";
    echo "<tr><th>ID</th><th>Title</th><th>Status</th><th>Created</th></tr>";
    
    foreach ($events as $event) {
        echo "<tr>";
        echo "<td>{$event['id']}</td>";
        echo "<td>{$event['title']}</td>";
        echo "<td style='color: " . ($event['status'] === 'published' ? 'green' : 'red') . "'>{$event['status']}</td>";
        echo "<td>{$event['created_at']}</td>";
        echo "</tr>";
    }
    echo "</table>";
    
} catch (Exception $e) {
    echo "<p style='color: red;'>Error: " . $e->getMessage() . "</p>";
}
?>

CasperSecurity Mini