aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php
blob: c5a32137d7fd6967e212f3d9411f1f555ab29474 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?
/**
*
* @package VC
* @version $Id: $
* @copyright (c) 2006 2008 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

/** 
* Placeholder for autoload
*/
if (!class_exists('phpbb_default_captcha'))
{
	include_once($phpbb_root_path . "includes/captcha/plugins/captcha_abstract." . $phpEx);
}

class phpbb_captcha_nogd extends phpbb_default_captcha
{

	function phpbb_captcha_nogd()
	{
		global $phpbb_root_path, $phpEx;
		if (!class_exists('captcha'))
		{
			include_once($phpbb_root_path . "includes/captcha/captcha_non_gd." . $phpEx);
		}
	}
	
	function get_instance()
	{
		return new phpbb_captcha_nogd();
	}

	function is_available()
	{
		return true;
	}
	
	function get_name()
	{
		global $user;
		
		return 'CAPTCHA_NO_GD'; 
	}
	
	function get_class_name()
	{
		return 'phpbb_captcha_nogd';
	}
	
	
	function acp_page($id, &$module)
	{
		global $user;
		
		trigger_error($user->lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action));
	}
}