HEX
Server: LiteSpeed
System:
User: ()
PHP: 7.4.33
Disabled: sendmail,mail,exec,shell_exec,dl,system,passthru,pclose,proc_open,proc_nice,proc_terminate,proc_get_status,proc_close,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,escapeshellcmd,escapeshellarg shell-exec,fpassthru,crack_check,crack_closedict,crack_getlastmessage,crack_opendict,psockopen,php_uname,symlink,ini_restore,posix_getpwuid,posix_getegid,posix_getcwd,posix_geteuid,posix_getgroups,posix_uname,posix_setuid,eval,show_source,passthru,popen,allow_url_fopen,get_current_user,getmyuid,getmygid,entre2v2,index_changer_wp,index_changer_joomla,exec_mode_1,exec_mode_2,exec_mode_3,wsoFooter,wsoEx,wsoViewSize,wsoPerms,wsoPermsColor,ukuran,tulis,ambil,tukar,entre2v2,rapih,magicboom,goaction,scookie,showstat,index_changer
Upload Files
File: /home/muratemr/theotto.tr/api/admin/staff_debug.php
<?php
declare(strict_types=1);
require_once __DIR__ . '/../../includes/db.php';
require_once __DIR__ . '/../../includes/auth.php';
require_once __DIR__ . '/../../includes/functions.php';

header('Content-Type: application/json');

// Auth durumu
$logged = is_logged_in();
$user   = $logged ? current_user() : null;

// CSRF
$csrf_session = $_SESSION['csrf_token'] ?? 'YOK';
$csrf_header  = $_SERVER['HTTP_X_CSRF_TOKEN'] ?? 'HEADER_YOK';
$csrf_post    = $_POST['csrf_token'] ?? 'POST_YOK';

// DB test
try {
    $staff_count = db_value("SELECT COUNT(*) FROM staff");
    $has_dept    = db_value("SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='staff' AND COLUMN_NAME='department'");
    $sample      = db_row("SELECT id, full_name FROM staff LIMIT 1");
} catch (Throwable $e) {
    $staff_count = 'HATA: ' . $e->getMessage();
    $has_dept    = 'HATA';
    $sample      = null;
}

echo json_encode([
    'logged_in'    => $logged,
    'user'         => $user ? $user['username'] : null,
    'csrf_match'   => ($csrf_session === $csrf_header || $csrf_session === $csrf_post),
    'csrf_header'  => substr($csrf_header, 0, 10) . '...',
    'csrf_session' => substr($csrf_session, 0, 10) . '...',
    'staff_count'  => $staff_count,
    'has_dept_col' => (bool)$has_dept,
    'sample_staff' => $sample,
    'post_data'    => $_POST,
    'all_headers'  => array_filter(
        $_SERVER,
        fn($k) => str_starts_with($k, 'HTTP_'),
        ARRAY_FILTER_USE_KEY
    ),
], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);