<?php
    define( '_FEXEC', 1 );
    ob_start();
    require('includes/application_top.php');
    require('includes/classes/loader.php');
    $mode=$FREQUEST->getvalue('mode');
    if ($mode=='') exit;
    $loader=new loader();
    $captcha=$loader->loadClass("captcha","SecureImage");
    
    if (!$captcha || !$captcha->enabled) exit;
    ob_end_clean();
    switch($mode){
        case 'image':
            $captcha->refreshImage();
            break;
        case 'audio':
            $captcha->getAudio();
            break;
    }
    exit;
?>