You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
666 B
22 lines
666 B
![]()
12 years ago
|
<?php
|
||
|
/* For licensing terms, see /license.txt */
|
||
![]()
9 years ago
|
|
||
|
require_once __DIR__.'/../global.inc.php';
|
||
![]()
12 years ago
|
|
||
|
$action = isset($_REQUEST['a']) ? $_REQUEST['a'] : null;
|
||
|
|
||
|
switch ($action) {
|
||
|
case 'get_captcha':
|
||
|
header('Content-Type: image/jpeg');
|
||
|
|
||
![]()
6 years ago
|
$sessionVar = empty($_REQUEST['var']) ? '_HTML_QuickForm_CAPTCHA' : $_REQUEST['var'];
|
||
|
if (isset($_SESSION[$sessionVar]) && !empty($_SESSION[$sessionVar])) {
|
||
|
$obj = $_SESSION[$sessionVar];
|
||
|
// Force a new CAPTCHA for each one displayed/** @var Text_CAPTCHA $obj */;
|
||
|
$obj->generate(true);
|
||
|
echo $image = $obj->getCAPTCHA();
|
||
|
}
|
||
![]()
12 years ago
|
exit;
|
||
|
break;
|
||
|
}
|