source: extensions/captcha/admin.php @ 31085

Last change on this file since 31085 was 8034, checked in by patdenice, 14 years ago

Display corrected in IE8.
Add theme interface select in admin pannel.

File size: 1.0 KB
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4load_language('plugin.lang', CAPTCHA_PATH);
5include(CAPTCHA_PATH.'recaptchalib.php');
6
7if ( isset($_POST['submit']) and !is_adviser() )
8{
9  foreach (array('captcha_publickey', 'captcha_privatekey', 'captcha_theme') as $field)
10  {
11    $conf[$field] = trim($_POST[$field]);
12
13    $query = '
14UPDATE '.CONFIG_TABLE.'
15  SET value="'.$conf[$field].'"
16  WHERE param="'.$field.'"
17  LIMIT 1';
18    pwg_query($query);
19  }
20
21  array_push($page['infos'], l10n('Information data registered in database'));
22}
23
24$template->set_filename('plugin_admin_content', dirname(__FILE__).'/admin.tpl');
25
26$template->assign(array(
27  'CAPTCHA_PUBLICKEY' => $conf['captcha_publickey'],
28  'CAPTCHA_PRIVATEKEY' => $conf['captcha_privatekey'],
29  'reCAPTCHA_URL' => recaptcha_get_signup_url(urlencode($_SERVER['SERVER_NAME']), 'Piwigo'),
30  'captcha_theme_options' => array('red', 'white', 'blackglass'),
31  'captcha_theme_selected' => $conf['captcha_theme'],
32  )
33);
34
35
36$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
37
38?>
Note: See TracBrowser for help on using the repository browser.