wgs_switchepp.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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.1.0",
  16. "author" => '<a href = "https://whmcsglobalservices.com" target = "_blank;">WHMCS GLOBAL SERVICES</a>',
  17. "language" => "english",
  18. "fields" => array(
  19. "api_username" => array(
  20. "FriendlyName" => "API Username", "Type" => "text", "Size" => "25",
  21. "Description" => "Username (Enter CSV protected Username to get domains list)"
  22. ),
  23. "api_password" => array(
  24. "FriendlyName" => "API Password", "Type" => "text", "Size" => "25",
  25. "Description" => "Password (Enter CSV protected Password to get domains list)"
  26. ),
  27. )
  28. );
  29. return $configarray;
  30. }
  31. function wgs_switchepp_activate() {
  32. return array('status' => 'success', 'description' => 'Addons Image');
  33. }
  34. function wgs_switchepp_deactivate() {
  35. return array('status' => 'success', 'description' => 'Deactivated successfully.');
  36. }
  37. function wgs_switchepp_output($vars) {
  38. $modulelink = $vars['modulelink'];
  39. $LANG = $vars['_lang'];
  40. $SWITCHEPP = new SWITCHEPP();
  41. if (isset($_REQUEST["action"])) {
  42. if (file_exists(__DIR__ . '/includes/' . $_REQUEST["action"] . '.php')) {
  43. require_once __DIR__ . '/includes/' . $_REQUEST["action"] . '.php';
  44. }
  45. } else {
  46. if (file_exists(__DIR__ . '/includes/' . 'homepage.php')) {
  47. require_once __DIR__ . '/includes/' . 'homepage.php';
  48. }
  49. }
  50. }
  51. ?>