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.
25 lines
667 B
25 lines
667 B
<?php
|
|
/* For licensing terms, see /license.txt */
|
|
|
|
require_once '../global.inc.php';
|
|
|
|
$action = isset($_REQUEST['a']) ? $_REQUEST['a'] : null;
|
|
|
|
switch ($action) {
|
|
case 'get_captcha':
|
|
header('Content-Type: image/jpeg');
|
|
|
|
$sessionVar = (empty($_REQUEST['var']))
|
|
? '_HTML_QuickForm_CAPTCHA'
|
|
: $_REQUEST['var'];
|
|
// Force a new CAPTCHA for each one displayed
|
|
|
|
/** @var Text_CAPTCHA $obj */
|
|
$obj = $_SESSION[$sessionVar];
|
|
$obj->generate(true);
|
|
echo $image = $obj->getCAPTCHA();
|
|
|
|
//echo $_SESSION[$sessionVar]->getCAPTCHAAsJPEG();
|
|
exit;
|
|
break;
|
|
}
|
|
|