daily pastebin goal
92%
SHARE
TWEET

Untitled

a guest May 11th, 2012 622 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Find:
  2. $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);
  3.  
  4. Add after:
  5. $protect = tep_db_prepare_input($HTTP_POST_VARS['protect']);
  6. $lock = tep_db_prepare_input(base64_decode($HTTP_POST_VARS['lock']));
  7.  
  8. if ($protect != $lock) {
  9.   $error = true;
  10.  
  11.   $messageStack->add('contact', ENTRY_EMAIL_HUMAN_CHECK_ERROR);
  12. }
  13.  
  14. Find:
  15. <?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send'), 'post', '', true); ?>
  16.  
  17. Add after:
  18. <?php
  19. $a = rand(1, 9);
  20. $b = rand(1, 9);
  21. echo tep_draw_hidden_field('lock', base64_encode(($a + $b)));
  22. ?>
  23.  
  24. Find:
  25. <tr>
  26.   <td class="fieldKey" valign="top"><?php echo ENTRY_ENQUIRY; ?></td>
  27.   <td class="fieldValue"><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>
  28. </tr>
  29.  
  30. Add after:
  31. <tr>
  32.   <td class="fieldKey" valign="top"><?php echo sprintf(ENTRY_HUMAN, $a, $b); ?></td>
  33.   <td class="fieldValue"><?php echo tep_draw_input_field('protect'); ?></td>
  34. </tr>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top