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