includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php
changeset 0 ceef6d64c21d
equal deleted inserted replaced
-1:000000000000 0:ceef6d64c21d
       
     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_gd_wave extends phpbb_default_captcha
       
    31 {
       
    32 
       
    33 	function phpbb_captcha_gd_wave()
       
    34 	{
       
    35 		global $phpbb_root_path, $phpEx;
       
    36 
       
    37 		if (!class_exists('captcha'))
       
    38 		{
       
    39 			include_once($phpbb_root_path . 'includes/captcha/captcha_gd_wave.' . $phpEx);
       
    40 		}
       
    41 	}
       
    42 
       
    43 	function get_instance()
       
    44 	{
       
    45 		return new phpbb_captcha_gd_wave();
       
    46 	}
       
    47 
       
    48 	function is_available()
       
    49 	{
       
    50 		global $phpbb_root_path, $phpEx;
       
    51 
       
    52 		if (@extension_loaded('gd'))
       
    53 		{
       
    54 			return true;
       
    55 		}
       
    56 
       
    57 		if (!function_exists('can_load_dll'))
       
    58 		{
       
    59 			include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
       
    60 		}
       
    61 
       
    62 		return can_load_dll('gd');
       
    63 	}
       
    64 
       
    65 	function get_name()
       
    66 	{
       
    67 		return 'CAPTCHA_GD_3D';
       
    68 	}
       
    69 
       
    70 	function get_class_name()
       
    71 	{
       
    72 		return 'phpbb_captcha_gd_wave';
       
    73 	}
       
    74 
       
    75 	function acp_page($id, &$module)
       
    76 	{
       
    77 		global $config, $db, $template, $user;
       
    78 
       
    79 		trigger_error($user->lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action));
       
    80 	}
       
    81 }
       
    82 
       
    83 ?>