source: extensions/CryptograPHP/include/contactform.inc.php @ 28344

Last change on this file since 28344 was 28344, checked in by mistic100, 10 years ago

add 'guest_only' option

File size: 566 bytes
Line 
1<?php
2defined('CRYPTO_ID') or die('Hacking attempt!');
3
4$conf['cryptographp']['template'] = 'contactform';
5include(CRYPTO_PATH.'include/common.inc.php');
6
7add_event_handler('contact_form_check', 'check_crypto', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
8
9function check_crypto($action, $comment)
10{
11  global $conf, $page;
12 
13  include_once(CRYPTO_PATH.'securimage/securimage.php');
14  $securimage = new Securimage();
15
16  if ($securimage->check($_POST['captcha_code']) == false)
17  {
18    $page['errors'][] = l10n('Invalid Captcha');
19    return 'reject';
20  }
21
22  return $action;
23}
Note: See TracBrowser for help on using the repository browser.