Advertisement
Saxtus

KeyPic Chevereto v2.5.9 contact form integration

Mar 11th, 2014
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.35 KB | None | 0 0
  1. 2a3,24
  2. >
  3. > <?php
  4. > /*
  5. > * This is the Keypic class you must include
  6. > */
  7. > include_once('Keypic.php');
  8. >
  9. > $name= $_REQUEST['name'];
  10. > $email = $_REQUEST['email'];
  11. > $message = $_REQUEST['message'];
  12. > $Token = $_REQUEST['Token'];
  13. >
  14. > /*
  15. >  *    instead of xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx insert your FormID
  16. >  *    get your FormID here -> http://keypic.com/modules/forms/
  17. >  *    IMPORTANT FormID must be secret, don't share it
  18. > */
  19. >
  20. > Keypic::setFormID('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
  21. > $spamthreshold = 80;
  22. > //Keypic::setDebug(true);
  23. > ?>
  24. 34a57,71
  25. >                   $spam = Keypic::isSpam($Token, $email, $name, $message);
  26. >                   if(is_numeric($spam)) {
  27. >                       if($spam > $spamthreshold) {
  28. >                           $output = '<font color="red"> This message has ' . $spam . '% of spam probability</font><br />';
  29. >                           $contact_class = 'contact-error';
  30. >                       } else {
  31. >                           $notspam = TRUE;
  32. >                           $mailbody .= "Keypic spam probability: ".$spam."%\n\n";
  33. >
  34. >                       }
  35. >                   } else {
  36. >                           $output = '<font color="red"> There was an error: '. $spam .'</font><br />';
  37. >                           $contact_class = 'contact-error';
  38. >                           }
  39. >                   if($notspam) {
  40. 65a103
  41. >                   }
  42. 79a118,119
  43. >    <input type="hidden" name="Token" value="<?php echo Keypic::getToken($Token, $email, $name, $message); ?>" /> <br />
  44. >    <?php echo Keypic::getIt('getImage', '234x60'); ?> <br />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement