๐Ÿ“‚ File Browser

AgentAIv3
๐ŸŒ™ Dark Mode
๐ŸŽฏ Quick Launch:

๐Ÿ“ Directories

๐Ÿ“ tmp/ ๐Ÿ”“ Open
๐Ÿ“ vendor/ ๐Ÿ”“ Open

๐Ÿ“„ Files

๐Ÿ“„ README.md
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ“ README.txt
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ“ README_content.txt
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ chat_handler.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ check_auth.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ cleanup.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ“„ composer.json
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ database.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ debug_email.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ debug_email_parts.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ debug_emails.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ delete_chat.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ fetch_emails.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ find_models.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ gemini_direct.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ get_chats.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ get_email.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ index.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ index_simple.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ index_test.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ logout.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ mark_read.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ new_chat.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ oauth2callback.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ refresh_token.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ rename_chat.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ session_config.php
โ–ถ Open ๐Ÿ“„ View Source
๐ŸŽจ style.css
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ switch_chat.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ sync_emails.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ test_ajax.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ test_api.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ test_cmd.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ test_curl.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ test_db.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ test_db_ops.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ test_endpoint.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ test_ollama.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ test_ollama_direct.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ test_openrouter.php
โ–ถ Open ๐Ÿ“„ View Source
๐Ÿ˜ test_shell.php
โ–ถ Open ๐Ÿ“„ View Source

๐Ÿ“„ Source: get_chats.php

<?php
session_name('INBOXZERO');
session_start();

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

// Cache รฎn sesiune pentru 5 secunde
if (isset($_SESSION['chats_cache']) && isset($_SESSION['chats_cache_time']) && (time() - $_SESSION['chats_cache_time']) < 5) {
    echo $_SESSION['chats_cache'];
    exit();
}

$chats = [];
if (isset($_SESSION['chat_histories'])) {
    foreach ($_SESSION['chat_histories'] as $id => $history) {
        if (isset($_SESSION['chat_titles'][$id])) {
            $title = $_SESSION['chat_titles'][$id];
        } else {
            $title = 'New Chat';
            foreach ($history as $msg) {
                if (strpos($msg, 'User:') === 0) {
                    $content = substr($msg, 6);
                    $title = strlen($content) > 25 ? substr($content, 0, 25) . '...' : $content;
                    break;
                }
            }
        }
        $chats[] = ['id' => $id, 'title' => $title];
    }
}
$chats = array_reverse($chats);
$output = json_encode($chats);

// Salveazฤƒ รฎn cache
$_SESSION['chats_cache'] = $output;
$_SESSION['chats_cache_time'] = time();

echo $output;
?>
โ† Back