Guest User

secure sendy subscribe

a guest
Nov 8th, 2019
102
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1a2
  2. > include('../_connect.php');
  3. 269a271
  4. > $bypass_opt_in = !$subform && $_POST['silent']=='true';
  5. 276,277c278,279
  6. < $list_name = $row['name'];
  7. < $opt_in = $_POST['silent']=='true' ? 0 : $row['opt_in'];
  8. ---
  9. > $list_name = $row['name'];
  10. > $opt_in = $bypass_opt_in ? 0 : $row['opt_in'];
  11. 339c341
  12. <
  13. ---
  14. > $not_a_bot = false;
  15. 361a364,371
  16. > else
  17. > {
  18. > $not_a_bot = true;
  19. > }
  20. > }
  21. > else
  22. > {
  23. > $not_a_bot = true;
  24. 420a431,450
  25. > else
  26. > {
  27. > if(isset($_POST['api_key'])) $api_key = mysqli_real_escape_string($mysqli, $_POST['api_key']);
  28. > else $api_key = null;
  29. >
  30. > if($api_key==null)
  31. > {
  32. > echo 'API key not passed',
  33. > exit;
  34. > }
  35. > else if(!verify_api_key($api_key))
  36. > {
  37. > echo 'Invalid API key'
  38. > exit;
  39. > }
  40. > else
  41. > {
  42. > $not_a_bot = true;
  43. > }
  44. > }
  45. 422c452
  46. < if($feedback!=_('Some fields are missing.') && $feedback!=_('Email address is invalid.') && $feedback!=_('Consent not given.') && $feedback!=_('Failed reCAPTCHA test.') && $feedback!=_('Invalid secret key.'))
  47. ---
  48. > if($not_a_bot && $feedback!=_('Some fields are missing.') && $feedback!=_('Email address is invalid.') && $feedback!=_('Consent not given.') && $feedback!=_('Failed reCAPTCHA test.') && $feedback!=_('Invalid secret key.'))
RAW Paste Data