<?php
$base = '/home/brenopai/public_html/brenopaiva.com.br/sistema/application/modules/admin';

// Cria view de debug temporária
$debug_ctrl = '<?php defined(\'BASEPATH\') OR exit(\'No direct script access allowed\');
class Debug_session extends MX_Controller {
    public function index() {
        $admin = $this->session->userdata(\'admin\');
        echo \'<pre>\';
        echo "Sessão admin:\n";
        print_r($admin);
        echo \'</pre>\';
    }
}';
file_put_contents($base.'/controllers/debug_session.php', $debug_ctrl);
echo "✓ Debug controller criado\n";
echo "Acesse: https://sistema.brenopaiva.com.br/index.php/admin/debug_session\n";
