wgs_switchepp.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. use Illuminate\Database\Capsule\Manager as Capsule;
  3. if (!defined("WHMCS"))
  4. die("This file cannot be accessed directly");
  5. if (!class_exists('Net_EPP_Protocol')) {
  6. if (file_exists(__DIR__ . "/../../registrars/switchepp/Net/EPP/Client.php"))
  7. require_once __DIR__ . "/../../registrars/switchepp/Net/EPP/Client.php";
  8. }
  9. if (file_exists(__DIR__ . '/classes/switchepp.class.php'))
  10. require_once __DIR__ . '/classes/switchepp.class.php';
  11. function wgs_switchepp_config() {
  12. $configarray = array(
  13. "name" => "Switch EPP",
  14. "description" => "In this addon you can manage the poll and confirmation messege of Switch EPP registrar",
  15. "version" => "3.0.5",
  16. "author" => '<a href = "https://whmcsglobalservices.com" target = "_blank;">WHMCSGLOBALSERVICES</a>',
  17. "language" => "english"
  18. );
  19. return $configarray;
  20. }
  21. function wgs_switchepp_activate() {
  22. # Return Result
  23. return array('status' => 'success', 'description' => 'Addons Image');
  24. }
  25. function wgs_switchepp_deactivate($vars) {
  26. return array('status' => 'success', 'description' => 'Deactivated successfully.');
  27. }
  28. function wgs_switchepp_output($vars) {
  29. $modulelink = $vars['modulelink'];
  30. $LANG = $vars['_lang'];
  31. $SWITCHEPP = new SWITCHEPP();
  32. if (isset($_REQUEST["action"])) {
  33. if (file_exists(__DIR__ . '/includes/' . $_REQUEST["action"] . '.php')) {
  34. require_once __DIR__ . '/includes/' . $_REQUEST["action"] . '.php';
  35. }
  36. } else {
  37. if (file_exists(__DIR__ . '/includes/' . 'homepage.php')) {
  38. require_once __DIR__ . '/includes/' . 'homepage.php';
  39. }
  40. }
  41. }
  42. ?>