Cookie.php 1.5 KB

123456789101112131415161718192021222324252627282930
  1. <?php
  2. if (!defined("WHMCS")) { die("This file cannot be accessed directly");}
  3. function Cookie_config()
  4. {
  5. $message = 'We use cookies to ensure that we give you the best experience on our website. By continuing to visit this site you agree to our use of cookies.';
  6. return [
  7. 'name' => 'Cookie Consent',
  8. 'description' => 'A lightweight addon module that displays a cookie consent message. The addon module displays a message on the user\'s first visit to your website.',
  9. 'author' => '<a href="https://www.hardsoftcode.com" target="_blank">HSCode</a>',
  10. 'language' => 'english',
  11. 'version' => '1.0.1',
  12. 'fields' => [
  13. 'Enable' => ['FriendlyName' => 'Enable', 'Type' => 'yesno', 'Description' => 'Tick this box to enable the cookie dialog'],
  14. 'Title' => ['FriendlyName' => 'Title', 'Type' => 'text', 'Size' => '40', 'Default' => 'Cookies'],
  15. 'Message' => ['FriendlyName' => 'Message', 'Type' => 'textarea', 'Rows' => '4', 'Default' => $message, 'Description' => 'HTML can be included within this message'],
  16. 'Expires' => ['FriendlyName' => 'Expires', 'Type' => 'text', 'Size' => '10', 'Default' => '30', 'Description' => 'Enter the days for the cookie to expire'],
  17. 'PolicyURL' => ['FriendlyName' => 'Cookie Policy URL', 'Type' => 'text', 'Size' => '60'],
  18. 'RedirectURL' => ['FriendlyName' => 'Decline Redirect URL', 'Type' => 'text', 'Size' => '60'],
  19. ]
  20. ];
  21. }
  22. function Cookie_output($vars)
  23. {
  24. header('Location: configaddonmods.php#Cookie');
  25. exit;
  26. }