includes/captcha/plugins/phpbb_captcha_nogd_plugin.php
author indvdum (gotoindvdum[at]gmail[dot]com)
Wed, 07 Mar 2012 23:10:55 +0400
changeset 7 a0100cde92ff
parent 0 ceef6d64c21d
permissions -rw-r--r--
HG ignore
     1 <?php
     2 /**
     3 *
     4 * @package VC
     5 * @version $Id$
     6 * @copyright (c) 2006, 2008 phpBB Group
     7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
     8 *
     9 */
    10 
    11 /**
    12 * @ignore
    13 */
    14 if (!defined('IN_PHPBB'))
    15 {
    16 	exit;
    17 }
    18 
    19 /**
    20 * Placeholder for autoload
    21 */
    22 if (!class_exists('phpbb_default_captcha'))
    23 {
    24 	include($phpbb_root_path . 'includes/captcha/plugins/captcha_abstract.' . $phpEx);
    25 }
    26 
    27 /**
    28 * @package VC
    29 */
    30 class phpbb_captcha_nogd extends phpbb_default_captcha
    31 {
    32 
    33 	function phpbb_captcha_nogd()
    34 	{
    35 		global $phpbb_root_path, $phpEx;
    36 
    37 		if (!class_exists('captcha'))
    38 		{
    39 			include_once($phpbb_root_path . 'includes/captcha/captcha_non_gd.' . $phpEx);
    40 		}
    41 	}
    42 
    43 	function &get_instance()
    44 	{
    45 		$instance =& new phpbb_captcha_nogd();
    46 		return $instance;
    47 	}
    48 
    49 	function is_available()
    50 	{
    51 		return true;
    52 	}
    53 
    54 	function get_name()
    55 	{
    56 		return 'CAPTCHA_NO_GD';
    57 	}
    58 
    59 	function get_class_name()
    60 	{
    61 		return 'phpbb_captcha_nogd';
    62 	}
    63 
    64 	function acp_page($id, &$module)
    65 	{
    66 		global $user;
    67 
    68 		trigger_error($user->lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action));
    69 	}
    70 }
    71 
    72 ?>