[ Index ]

PHP Cross Reference of phpBB 3.0 Beta 3

title

Body

[close]

/includes/acp/ -> acp_captcha.php (source)

   1  <?php
   2  /** 
   3  *
   4  * @package acp
   5  * @version $Id: acp_captcha.php,v 1.8 2006/11/03 23:09:14 davidmj Exp $
   6  * @copyright (c) 2005 phpBB Group 
   7  * @license http://opensource.org/licenses/gpl-license.php GNU Public License 
   8  */
   9  
  10  /**
  11  * @package acp
  12  */
  13  class acp_captcha
  14  {
  15      var $u_action;
  16  
  17  	function main($id, $mode)
  18      {
  19          global $db, $user, $auth, $template;
  20          global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
  21  
  22          $user->add_lang('acp/board');
  23  
  24          $config_vars = array(
  25              'enable_confirm'        => 'REG_ENABLE',
  26              'enable_post_confirm'    => 'POST_ENABLE',
  27              'captcha_gd'            => 'CAPTCHA_GD',
  28              'captcha_gd_noise'        => 'CAPTCHA_GD_NOISE',
  29          );
  30  
  31          $this->tpl_name = 'acp_captcha';
  32          $this->page_title = 'ACP_VC_SETTINGS';
  33          $submit = request_var('submit', '');
  34          if ($submit)
  35          {
  36              $config_vars = array_keys($config_vars);
  37              foreach ($config_vars as $config_var)
  38              {
  39                  set_config($config_var, request_var($config_var, ''));
  40              }
  41              trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
  42          }
  43          else
  44          {
  45              $array = array();
  46  
  47              if (@extension_loaded('gd') && function_exists('imagettfbbox') && function_exists('imagettftext'))
  48              {
  49                  $template->assign_var('GD', true);
  50              }
  51              foreach ($config_vars as $config_var => $template_var)
  52              {
  53                  $template->assign_var($template_var, $config[$config_var]);
  54              }
  55          }
  56      }
  57  }
  58  
  59  ?>


Generated: Wed Nov 22 00:35:05 2006 Cross-referenced by PHPXref 0.6